@viamedici-spc/configurator-framer 1.4.0 → 1.5.0-alpha0002

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 (3) hide show
  1. package/dist/index.cjs +112 -59
  2. package/dist/index.js +15672 -3004
  3. package/package.json +2 -2
package/dist/index.cjs CHANGED
@@ -1,4 +1,20 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),f=require("framer"),p=require("@viamedici-spc/configurator-ts"),_=require("@viamedici-spc/configurator-react"),T=require("react"),Pi=require("url-join"),M=require("ts-pattern"),Di=require("react-error-boundary"),k=require("styled-components"),v=require("@viamedici-spc/fp-ts-extensions"),Ze=require("@fortawesome/free-solid-svg-icons"),et=require("@fortawesome/react-fontawesome"),Gn=require("react-dom"),Vi=require("clsx"),Jn=require("merge-props"),Oi=require("dyna-guid"),ki=require("mustache"),ji=require("react-number-format"),Fi=require("use-debounce"),Ni=require("framer-motion"),Li=require("hex-to-css-filter"),Mi=require("rgb-hex"),Bi=require("camelcase");function Zn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const E=Zn(T),$i=Zn(Gn);function G(){return f.RenderTarget.current()!==f.RenderTarget.preview}function Ki(e){if(G())return null;const{error:n}=_.useConfigurationInitialization();if(!n)return null;switch(n.type){case p.ConfiguratorErrorType.ConfigurationModelNotFound:return T.Children.toArray(e.configurationModelNotFoundContent).length>0?e.configurationModelNotFoundContent:d.jsx("span",{children:"Configuration Model not found for the specified deployment name."});case p.ConfiguratorErrorType.AuthenticationFailure:return T.Children.toArray(e.accessTokenInvalidContent).length>0?e.accessTokenInvalidContent:d.jsx("span",{children:"The HCA access token is invalid."});case p.ConfiguratorErrorType.SpecifiedDeploymentForbidden:return T.Children.toArray(e.accessTokenRestrictionContent).length>0?e.accessTokenRestrictionContent:d.jsx("span",{children:"The HCA access token does not permit using the specified Configuration Model."});case p.ConfiguratorErrorType.DecisionsToRespectInvalid:return d.jsx("span",{children:"The definition of Attribute Relations is invalid."});default:return T.Children.toArray(e.errorContent).length>0?e.errorContent:d.jsx("span",{children:"An error occurred while initializing the configuration."})}}function se(e){return T.forwardRef((t,n)=>d.jsx(Di.ErrorBoundary,{fallbackRender:()=>d.jsx("span",{children:"Component crashed"}),children:d.jsx(e,{...t,ref:n})}))}const Wi=k.createGlobalStyle`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),x=require("framer"),_=require("@viamedici-spc/configurator-ts"),ce=require("@viamedici-spc/configurator-react"),I=require("react"),rC=require("url-join"),H=require("ts-pattern"),G=require("styled-components"),oC=require("react-error-boundary"),v=require("@viamedici-spc/fp-ts-extensions"),Ru=require("@fortawesome/free-solid-svg-icons"),Vu=require("@fortawesome/react-fontawesome"),Ab=require("react-dom"),iC=require("clsx"),Ib=require("merge-props"),aC=require("dyna-guid"),Qt=require("fp-ts/Record"),uC=require("fp-ts/Monoid"),Ni=require("fp-ts/Either"),ji=require("fp-ts/Eq"),fs=require("fp-ts/Option"),sC=require("fp-ts/pipeable"),Ob=require("fp-ts/ReadonlyArray"),Pb=require("fp-ts/ReadonlyNonEmptyArray"),$e=require("fp-ts/function"),Nb=require("fp-ts/ReadonlySet"),Xt=require("fp-ts/lib/function"),cC=require("fp-ts/NonEmptyArray"),$i=require("fp-ts/Array"),lC=require("fp-ts/Semigroup"),fC=require("fp-ts/Set"),xe=require("fp-ts/es6/Either"),ds=require("fp-ts/lib/pipeable"),ps=require("fp-ts/lib/Either"),jb=require("fp-ts/lib/Option"),dC=require("fp-ts/lib/NonEmptyArray"),pC=require("fp-ts/lib/Array"),hC=require("fp-ts/lib/Set"),$b=require("fp-ts"),Eb=require("fp-ts/Show"),yC=require("fp-ts/es6/Array"),If=require("fp-ts/es6/Const"),D=require("fp-ts/es6/function"),_p=require("fp-ts/es6/Monoid"),dt=require("fp-ts/es6/Option"),B=require("fp-ts/es6/pipeable"),mC=require("fp-ts/es6/ReadonlyMap"),gC=require("fp-ts/es6/ReadonlySet"),bC=require("fp-ts/es6/ReadonlyArray"),vC=require("fp-ts/es6/ReadonlyRecord"),xC=require("mustache"),_C=require("react-number-format"),wC=require("use-debounce"),CC=require("framer-motion"),SC=require("hex-to-css-filter"),TC=require("rgb-hex"),AC=require("camelcase");function Ct(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const P=Ct(I),IC=Ct(Ab),Of=Ct(xe),wp=Ct(yC),Cp=Ct(If),ne=Ct(dt),di=Ct(mC),Il=Ct(gC),rt=Ct(bC),yr=Ct(vC);function _e(){return x.RenderTarget.current()!==x.RenderTarget.preview}const OC=G.div`
2
+ padding: var(--space-md);
3
+ margin: var(--space-md);
4
+ border-radius: var(--shape-border-radius-sm);
5
+
6
+ &.warning {
7
+ border: 1px solid orange;
8
+ border-left-width: 15px;
9
+ }
10
+
11
+ &.error {
12
+ border: 1px solid #DB0100;
13
+ border-left-width: 15px;
14
+ }
15
+ `,PC=G.h3`
16
+ margin: 0 0 var(--space-xs);
17
+ `;function Mb(e){return b.jsxs(OC,{className:e.type,children:[b.jsx(PC,{children:e.title}),b.jsx("div",{children:e.message})]})}function NC(e){if(_e())return null;const{error:n}=ce.useConfigurationInitialization();if(!n)return null;const r=o=>b.jsx(Mb,{type:"error",title:"Configuration initialization failed",message:o});switch(n.type){case _.ConfiguratorErrorType.ConfigurationModelNotFound:return I.Children.toArray(e.configurationModelNotFoundContent).length>0?e.configurationModelNotFoundContent:r("Configuration Model not found for the specified deployment name.");case _.ConfiguratorErrorType.AuthenticationFailure:return I.Children.toArray(e.accessTokenInvalidContent).length>0?e.accessTokenInvalidContent:r("The HCA access token is invalid.");case _.ConfiguratorErrorType.SpecifiedDeploymentForbidden:return I.Children.toArray(e.accessTokenRestrictionContent).length>0?e.accessTokenRestrictionContent:r("The HCA access token does not permit using the specified Configuration Model.");case _.ConfiguratorErrorType.DecisionsToRespectInvalid:return r("The definition of Attribute Relations is invalid.");default:return I.Children.toArray(e.errorContent).length>0?e.errorContent:r("An error occurred while initializing the configuration.")}}function it(e){return I.forwardRef((t,n)=>b.jsx(oC.ErrorBoundary,{fallbackRender:()=>b.jsx("span",{children:"Component crashed"}),children:b.jsx(e,{...t,ref:n})}))}const jC=G.createGlobalStyle`
2
18
  :root {
3
19
  --font-primary: var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif);
4
20
  --font-heading: "Inter-Medium", "Inter", "Inter Placeholder", sans-serif;
@@ -17,7 +33,7 @@
17
33
  --text-xxl: calc(1em * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio));
18
34
  --text-xxxl: calc(1em * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio));
19
35
  }
20
- `,qi=Wi,zi=k.createGlobalStyle`
36
+ `,$C=jC,EC=G.createGlobalStyle`
21
37
  :root {
22
38
  --space-unit: 1em;
23
39
  --space-xxs: calc(0.25 * var(--space-unit));
@@ -37,14 +53,14 @@
37
53
  --space-xl-fixed: calc(3.25 * var(--space-unit-fixed));
38
54
  --space-xxl-fixed: calc(5.25 * var(--space-unit-fixed));
39
55
  }
40
- `,Hi=zi,Ui=k.createGlobalStyle`
56
+ `,MC=EC,kC=G.createGlobalStyle`
41
57
  :root {
42
58
  --shape-border-radius-xs: 5px;
43
59
  --shape-border-radius-sm: 7px;
44
60
  --shape-border-radius-md: 12px;
45
61
  --shape-border-radius-lg: 20px;
46
62
  }
47
- `,_i=Ui,Qi=k.createGlobalStyle`
63
+ `,FC=kC,RC=G.createGlobalStyle`
48
64
  :root {
49
65
  --shadows-popover: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.4));
50
66
  --shadows-dialog: 0.2px 0.4px 2.3px rgba(0, 0, 0, 0.02),
@@ -56,7 +72,7 @@
56
72
  13.9px 23.6px 54.7px rgba(0, 0, 0, 0.061),
57
73
  40px 68px 96px rgba(0, 0, 0, 0.1);
58
74
  }
59
- `,Yi=Qi;function rn(){return d.jsxs(d.Fragment,{children:[d.jsx(Yi,{}),d.jsx(_i,{}),d.jsx(Hi,{}),d.jsx(qi,{})]})}const Ke=T.createContext(null);function ye(){const{process:e,switchMode:t,applySolution:n,dismiss:o}=T.useContext(Ke);return e?{...e,switchMode:t,applySolution:n,dismiss:o}:null}function eo(e){const{explanation:t,...n}=e,o=ye();return d.jsx("button",{...n,onClick:()=>o.applySolution(t.solution),children:e.children})}function to(e,t,n){return M.match(e).returnType().with({type:p.AttributeType.Choice},o=>t.get(o.choiceValueId)??o.choiceValueId).with({type:p.AttributeType.Boolean,state:!0},()=>n.booleanDecisionStateTrueLabel).with({type:p.AttributeType.Boolean,state:!1},()=>n.booleanDecisionStateFalseLabel).with({type:p.AttributeType.Component,state:p.ComponentDecisionState.Included},()=>n.componentDecisionStateIncludedLabel).with({type:p.AttributeType.Component,state:p.ComponentDecisionState.Excluded},()=>n.componentDecisionStateExcludedLabel).with({type:p.AttributeType.Numeric},o=>o.state.toString()).exhaustive()}const no={applySolutionButtonCaption:{title:"Apply Solution Button Caption",type:f.ControlType.String,defaultValue:"Apply Solution"},configurationSubjectTitle:{title:"Configuration Subject Title",type:f.ControlType.String,defaultValue:"Configuration"},generalConflictTitle:{title:"General Conflict Title",type:f.ControlType.String,defaultValue:"Conflict"},componentDecisionStateIncludedLabel:{title:"Component Decision State Included Label",type:f.ControlType.String,defaultValue:"Included"},componentDecisionStateExcludedLabel:{title:"Component Decision State Excluded Label",type:f.ControlType.String,defaultValue:"Excluded"},booleanDecisionStateTrueLabel:{title:"Boolean Decision State True Label",type:f.ControlType.String,defaultValue:"Yes"},booleanDecisionStateFalseLabel:{title:"Boolean Decision State False Label",type:f.ControlType.String,defaultValue:"No"},isBlockedSuffix:{title:"Is Blocked Suffix",type:f.ControlType.String,defaultValue:"is blocked"},isNotSatisfiedSuffix:{title:"Is Not Satisfied Suffix",type:f.ControlType.String,defaultValue:"is not satisfied"}},Xi={fill:{title:"Fill",type:f.ControlType.Color,defaultValue:"#002134"},color:{title:"Color",type:f.ControlType.Color,defaultValue:"white"},attributeValueFill:{title:"Attribute Value Fill",type:f.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.2)"},attributeValueAddFill:{title:"Attribute Value Add Fill",type:f.ControlType.Color,defaultValue:"rgba(47, 255, 0, 0.2)"},attributeValueAddColor:{title:"Attribute Value Add Color",type:f.ControlType.Color,defaultValue:"#63e446"},attributeValueRemoveFill:{title:"Attribute Value Remove Fill",type:f.ControlType.Color,defaultValue:"#ff00004a"},attributeValueRemoveColor:{title:"Attribute Value Remove Color",type:f.ControlType.Color,defaultValue:"#ff6060"},headerValueColor:{title:"Header Value Color",type:f.ControlType.Color,defaultValue:"rgb(0, 161, 230)"},closeButtonOutline:{title:"Close Button Outline",type:f.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.8)"},listSeparator:{title:"List Separator",type:f.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.3)"},applySolutionButtonFill:{title:"Apply Solution Button Fill",type:f.ControlType.Color,defaultValue:"rgb(0, 161, 230)"},applySolutionButtonColor:{title:"Apply Solution Button Color",type:f.ControlType.Color,defaultValue:"white"},applySolutionButtonOutline:{title:"Apply Solution Button Outline",type:f.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.8)"},showMoreButtonOutline:{title:"Show More Button Outline",type:f.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.8)"},solutionTitle:{title:"Solution Title",type:f.ControlType.String,defaultValue:"Solution"},showMoreButtonCaption:{title:"Show More Button Caption",type:f.ControlType.String,defaultValue:"Show more ({{amount}})"},showConstraintsButtonCaption:{title:"Show Constraints Button Caption",type:f.ControlType.String,defaultValue:"Show Constraints"},...no},Mt=T.createContext(null),Bt=()=>T.useContext(Mt),Gi={fill:{title:"Fill",type:f.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.7)"},color:{title:"Color",type:f.ControlType.Color,defaultValue:"#171717"},attributeValueFill:{title:"Attribute Value Fill",type:f.ControlType.Color,defaultValue:"#efefef"},attributeValueAddFill:{title:"Attribute Value Add Fill",type:f.ControlType.Color,defaultValue:"#cfefc7"},attributeValueAddColor:{title:"Attribute Value Add Color",type:f.ControlType.Color,defaultValue:"#48c52b"},attributeValueRemoveFill:{title:"Attribute Value Remove Fill",type:f.ControlType.Color,defaultValue:"#ffdada"},attributeValueRemoveColor:{title:"Attribute Value Remove Color",type:f.ControlType.Color,defaultValue:"#c52b2b"},headerValueColor:{title:"Header Value Color",type:f.ControlType.Color,defaultValue:"#00a1e6"},closeButtonOutline:{title:"Close Button Outline",type:f.ControlType.Color,defaultValue:"#00a1e6"},applySolutionButtonFill:{title:"Apply Solution Button Fill",type:f.ControlType.Color,defaultValue:"#F2F2F2"},applySolutionButtonColor:{title:"Apply Solution Button Color",type:f.ControlType.Color,defaultValue:"#171717"},applySolutionButtonOutline:{title:"Apply Solution Button Outline",type:f.ControlType.Color,defaultValue:"#00a1e6"},explanationCard:{title:"Explanation Card",type:f.ControlType.Color,defaultValue:"white"},scrollShadowBorder:{title:"Scroll Shadow Border",type:f.ControlType.Color,defaultValue:"rgba(0, 0, 0, 0.3)"},backdropFilter:{title:"Backdrop Filter",type:f.ControlType.String,defaultValue:"blur(10px) saturate(200%)"},decisionExplanationSolutionsTitle:{title:"Decision Explanation Solutions Title",type:f.ControlType.String,defaultValue:"Solutions"},constraintExplanationSolutionsTitle:{title:"Constraint Explanation Solutions Title",type:f.ControlType.String,defaultValue:"Constraint Explanations"},...no},$t=T.createContext(null),oo=()=>T.useContext($t),Ji=()=>T.useContext(Mt)||T.useContext($t),Kt=Ji,Zi=k.div`
75
+ `,VC=RC;function Sp(){return b.jsxs(b.Fragment,{children:[b.jsx(VC,{}),b.jsx(FC,{}),b.jsx(MC,{}),b.jsx($C,{})]})}const vi=I.createContext(null);function Zt(){const{process:e,switchMode:t,applySolution:n,dismiss:r}=I.useContext(vi);return e?{...e,switchMode:t,applySolution:n,dismiss:r}:null}function kb(e){const{explanation:t,...n}=e,r=Zt();return b.jsx("button",{...n,onClick:()=>r.applySolution(t.solution),children:e.children})}function Fb(e,t,n){return H.match(e).returnType().with({type:_.AttributeType.Choice},r=>t.get(r.choiceValueId)??r.choiceValueId).with({type:_.AttributeType.Boolean,state:!0},()=>n.booleanDecisionStateTrueLabel).with({type:_.AttributeType.Boolean,state:!1},()=>n.booleanDecisionStateFalseLabel).with({type:_.AttributeType.Component,state:_.ComponentDecisionState.Included},()=>n.componentDecisionStateIncludedLabel).with({type:_.AttributeType.Component,state:_.ComponentDecisionState.Excluded},()=>n.componentDecisionStateExcludedLabel).with({type:_.AttributeType.Numeric},r=>r.state.toString()).exhaustive()}const Rb={applySolutionButtonCaption:{title:"Apply Solution Button Caption",type:x.ControlType.String,defaultValue:"Apply Solution"},configurationSubjectTitle:{title:"Configuration Subject Title",type:x.ControlType.String,defaultValue:"Configuration"},generalConflictTitle:{title:"General Conflict Title",type:x.ControlType.String,defaultValue:"Conflict"},componentDecisionStateIncludedLabel:{title:"Component Decision State Included Label",type:x.ControlType.String,defaultValue:"Included"},componentDecisionStateExcludedLabel:{title:"Component Decision State Excluded Label",type:x.ControlType.String,defaultValue:"Excluded"},booleanDecisionStateTrueLabel:{title:"Boolean Decision State True Label",type:x.ControlType.String,defaultValue:"Yes"},booleanDecisionStateFalseLabel:{title:"Boolean Decision State False Label",type:x.ControlType.String,defaultValue:"No"},isBlockedSuffix:{title:"Is Blocked Suffix",type:x.ControlType.String,defaultValue:"is blocked"},isNotSatisfiedSuffix:{title:"Is Not Satisfied Suffix",type:x.ControlType.String,defaultValue:"is not satisfied"}},UC={fill:{title:"Fill",type:x.ControlType.Color,defaultValue:"#002134"},color:{title:"Color",type:x.ControlType.Color,defaultValue:"white"},attributeValueFill:{title:"Attribute Value Fill",type:x.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.2)"},attributeValueAddFill:{title:"Attribute Value Add Fill",type:x.ControlType.Color,defaultValue:"rgba(47, 255, 0, 0.2)"},attributeValueAddColor:{title:"Attribute Value Add Color",type:x.ControlType.Color,defaultValue:"#63e446"},attributeValueRemoveFill:{title:"Attribute Value Remove Fill",type:x.ControlType.Color,defaultValue:"#ff00004a"},attributeValueRemoveColor:{title:"Attribute Value Remove Color",type:x.ControlType.Color,defaultValue:"#ff6060"},headerValueColor:{title:"Header Value Color",type:x.ControlType.Color,defaultValue:"rgb(0, 161, 230)"},closeButtonOutline:{title:"Close Button Outline",type:x.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.8)"},listSeparator:{title:"List Separator",type:x.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.3)"},applySolutionButtonFill:{title:"Apply Solution Button Fill",type:x.ControlType.Color,defaultValue:"rgb(0, 161, 230)"},applySolutionButtonColor:{title:"Apply Solution Button Color",type:x.ControlType.Color,defaultValue:"white"},applySolutionButtonOutline:{title:"Apply Solution Button Outline",type:x.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.8)"},showMoreButtonOutline:{title:"Show More Button Outline",type:x.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.8)"},solutionTitle:{title:"Solution Title",type:x.ControlType.String,defaultValue:"Solution"},showMoreButtonCaption:{title:"Show More Button Caption",type:x.ControlType.String,defaultValue:"Show more ({{amount}})"},showConstraintsButtonCaption:{title:"Show Constraints Button Caption",type:x.ControlType.String,defaultValue:"Show Constraints"},...Rb},Yf=I.createContext(null),ed=()=>I.useContext(Yf),DC={fill:{title:"Fill",type:x.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.7)"},color:{title:"Color",type:x.ControlType.Color,defaultValue:"#171717"},attributeValueFill:{title:"Attribute Value Fill",type:x.ControlType.Color,defaultValue:"#efefef"},attributeValueAddFill:{title:"Attribute Value Add Fill",type:x.ControlType.Color,defaultValue:"#cfefc7"},attributeValueAddColor:{title:"Attribute Value Add Color",type:x.ControlType.Color,defaultValue:"#48c52b"},attributeValueRemoveFill:{title:"Attribute Value Remove Fill",type:x.ControlType.Color,defaultValue:"#ffdada"},attributeValueRemoveColor:{title:"Attribute Value Remove Color",type:x.ControlType.Color,defaultValue:"#c52b2b"},headerValueColor:{title:"Header Value Color",type:x.ControlType.Color,defaultValue:"#00a1e6"},closeButtonOutline:{title:"Close Button Outline",type:x.ControlType.Color,defaultValue:"#00a1e6"},applySolutionButtonFill:{title:"Apply Solution Button Fill",type:x.ControlType.Color,defaultValue:"#F2F2F2"},applySolutionButtonColor:{title:"Apply Solution Button Color",type:x.ControlType.Color,defaultValue:"#171717"},applySolutionButtonOutline:{title:"Apply Solution Button Outline",type:x.ControlType.Color,defaultValue:"#00a1e6"},explanationCard:{title:"Explanation Card",type:x.ControlType.Color,defaultValue:"white"},scrollShadowBorder:{title:"Scroll Shadow Border",type:x.ControlType.Color,defaultValue:"rgba(0, 0, 0, 0.3)"},backdropFilter:{title:"Backdrop Filter",type:x.ControlType.String,defaultValue:"blur(10px) saturate(200%)"},decisionExplanationSolutionsTitle:{title:"Decision Explanation Solutions Title",type:x.ControlType.String,defaultValue:"Solutions"},constraintExplanationSolutionsTitle:{title:"Constraint Explanation Solutions Title",type:x.ControlType.String,defaultValue:"Constraint Explanations"},...Rb},td=I.createContext(null),Vb=()=>I.useContext(td),qC=()=>I.useContext(Yf)||I.useContext(td),nd=qC,LC=G.div`
60
76
  display: flex;
61
77
  gap: var(--space-xs);
62
78
  align-items: center;
@@ -67,7 +83,7 @@
67
83
  font-family: var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif);
68
84
  font-weight: 500;
69
85
  min-width: 0;
70
- `,er=k.div`
86
+ `,BC=G.div`
71
87
  display: grid;
72
88
  place-content: center;
73
89
  border-top-left-radius: 360px;
@@ -85,36 +101,36 @@
85
101
  background-color: var(--color-explain-attribute-value-remove-fill);
86
102
  color: var(--color-explain-attribute-value-remove-color);
87
103
  }
88
- `,tr=k.div`
104
+ `,zC=G.div`
89
105
  white-space: nowrap;
90
106
  overflow: hidden;
91
107
  text-overflow: ellipsis;
92
- `;function nr(e){const{decision:t,choiceValuesNames:n}=e,o=t.intention,i=Kt(),r=to(t,n,i);return d.jsxs(Zi,{children:[d.jsxs(er,{className:`mode-${o}`,children:[o==="remove"&&d.jsx(et.FontAwesomeIcon,{icon:Ze.faMinus}),o==="add"&&d.jsx(et.FontAwesomeIcon,{icon:Ze.faPlus})]}),d.jsx(tr,{children:r})]})}function J(e){var t;return{localId:e.attributeId,componentPath:e.componentPath===""?[]:((t=e.componentPath)==null?void 0:t.split(" -> "))??[],sharedConfigurationModelId:e.sharedConfigurationModel===""?null:e.sharedConfigurationModel}}const ut=T.createContext(null);function dt(e){const{attributes:t}=T.useContext(ut),{activeLocale:n}=f.useLocaleInfo(),o=n.code;return T.useMemo(()=>v.pipe(t,v.RA.findFirst(i=>p.globalAttributeIdEq.equals(J(i),e)),v.O.map(i=>i.name),v.RA.fromOption,v.RA.flatten,Wt(o),v.O.toUndefined),[t,o,e.localId,e.componentPath,e.sharedConfigurationModelId])}function ze(e){const{choiceValues:t}=T.useContext(ut),{activeLocale:n}=f.useLocaleInfo(),o=_.useChoiceAttribute(e);if(!o)return v.RM.empty;const i=T.useMemo(()=>v.pipe(t,v.RA.filter(s=>p.globalAttributeIdEq.equals(J(s),e))),[t,e.localId,e.componentPath,e.sharedConfigurationModelId]),r=n.code,l=o.attribute.values;return T.useMemo(()=>v.pipe(l,v.RM.mapWithIndex((s,a)=>v.pipe(i,v.RA.findFirst(c=>c.choiceValueId===s),v.O.map(c=>c.name),v.RA.fromOption,v.RA.flatten,Wt(r))),v.RM.compact),[l,i,r])}function io(e,t){const{choiceValues:n}=T.useContext(ut),{activeLocale:o}=f.useLocaleInfo(),i=o.code;return T.useMemo(()=>v.pipe(n,v.RA.findFirst(r=>p.globalAttributeIdEq.equals(J(r),e)&&r.choiceValueId===t),v.O.map(r=>r.name),v.RA.fromOption,v.RA.flatten,Wt(i),v.O.toUndefined),[n,i,e.localId,e.componentPath,e.sharedConfigurationModelId,t])}function Wt(e){return v.flow(v.RA.findFirst(t=>t.localeCode.localeCompare(e,void 0,{sensitivity:"accent"})===0),v.O.map(t=>t.translation))}const or=k.div`
108
+ `;function WC(e){const{decision:t,choiceValuesNames:n}=e,r=t.intention,o=nd(),i=Fb(t,n,o);return b.jsxs(LC,{children:[b.jsxs(BC,{className:`mode-${r}`,children:[r==="remove"&&b.jsx(Vu.FontAwesomeIcon,{icon:Ru.faMinus}),r==="add"&&b.jsx(Vu.FontAwesomeIcon,{icon:Ru.faPlus})]}),b.jsx(zC,{children:i})]})}function Te(e){var t;return{localId:e.attributeId,componentPath:e.componentPath===""?[]:((t=e.componentPath)==null?void 0:t.split(" -> "))??[],sharedConfigurationModelId:e.sharedConfigurationModel===""?null:e.sharedConfigurationModel}}const hs=I.createContext(null);function ys(e){const{attributes:t}=I.useContext(hs),{activeLocale:n}=x.useLocaleInfo(),r=n.code;return I.useMemo(()=>v.pipe(t,v.RA.findFirst(o=>_.globalAttributeIdEq.equals(Te(o),e)),v.O.map(o=>o.name),v.RA.fromOption,v.RA.flatten,rd(r),v.O.toUndefined),[t,r,e.localId,e.componentPath,e.sharedConfigurationModelId])}function Ei(e){const{choiceValues:t}=I.useContext(hs),{activeLocale:n}=x.useLocaleInfo(),r=ce.useChoiceAttribute(e);if(!r)return v.RM.empty;const o=I.useMemo(()=>v.pipe(t,v.RA.filter(u=>_.globalAttributeIdEq.equals(Te(u),e))),[t,e.localId,e.componentPath,e.sharedConfigurationModelId]),i=n.code,a=r.attribute.values;return I.useMemo(()=>v.pipe(a,v.RM.mapWithIndex((u,s)=>v.pipe(o,v.RA.findFirst(c=>c.choiceValueId===u),v.O.map(c=>c.name),v.RA.fromOption,v.RA.flatten,rd(i))),v.RM.compact),[a,o,i])}function Ub(e,t){const{choiceValues:n}=I.useContext(hs),{activeLocale:r}=x.useLocaleInfo(),o=r.code;return I.useMemo(()=>v.pipe(n,v.RA.findFirst(i=>_.globalAttributeIdEq.equals(Te(i),e)&&i.choiceValueId===t),v.O.map(i=>i.name),v.RA.fromOption,v.RA.flatten,rd(o),v.O.toUndefined),[n,o,e.localId,e.componentPath,e.sharedConfigurationModelId,t])}function rd(e){return v.flow(v.RA.findFirst(t=>t.localeCode.localeCompare(e,void 0,{sensitivity:"accent"})===0),v.O.map(t=>t.translation))}const GC=G.div`
93
109
  display: grid;
94
110
  grid-template-columns: subgrid;
95
111
  grid-column: span 2;
96
112
  align-items: center;
97
- `,ir=k.div`
113
+ `,KC=G.div`
98
114
  grid-area: name;
99
115
  white-space: nowrap;
100
116
  overflow: hidden;
101
117
  text-overflow: ellipsis;
102
- `,rr=k.div`
118
+ `,HC=G.div`
103
119
  grid-area: values;
104
120
  display: flex;
105
121
  flex-wrap: wrap;
106
122
  min-width: 0;
107
123
  gap: var(--space-xxs);
108
- `;function lr(e){const{decisions:t}=e,n=t[0].attributeId,o=ze(n),i=dt(n),r=Kt(),l=v.pipe(v.Str.Ord,v.Ord.contramap(a=>to(a,o,r))),s=v.pipe(t,v.RA.sort(l));return d.jsxs(or,{children:[d.jsx(ir,{children:i??n.localId}),d.jsx(rr,{children:s.map((a,c)=>d.jsx(nr,{decision:a,choiceValuesNames:o},c))})]})}function sr(e){const t=e.sharedConfigurationModelId&&`shared::${e.sharedConfigurationModelId}`,n=(e.componentPath??[]).join("::");return[t,n,e.localId].filter(o=>(o==null?void 0:o.length)>0).join("::")}const ar=v.pipe(v.Str.Ord,v.Ord.contramap(e=>e.attributeId.localId));function ro(e){const{blockingDecisions:t,desiredDecisions:n,...o}=e,i=v.pipe([...n.map(r=>({...r,intention:"add"})),...t.map(r=>({...r,intention:"remove"}))],v.RNEA.groupBy(r=>sr(r.attributeId)),v.RR.collect(v.Ord.trivial)((r,l)=>({key:r,attributeId:v.RNEA.head(l).attributeId,decisions:l})),v.RA.sort(ar));return d.jsx("div",{...o,children:i.map(r=>d.jsx(lr,{decisions:r.decisions},r.key))})}const cr=k.div`
124
+ `;function JC(e){const{decisions:t}=e,n=t[0].attributeId,r=Ei(n),o=ys(n),i=nd(),a=v.pipe(v.Str.Ord,v.Ord.contramap(s=>Fb(s,r,i))),u=v.pipe(t,v.RA.sort(a));return b.jsxs(GC,{children:[b.jsx(KC,{children:o??n.localId}),b.jsx(HC,{children:u.map((s,c)=>b.jsx(WC,{decision:s,choiceValuesNames:r},c))})]})}function QC(e){const t=e.sharedConfigurationModelId&&`shared::${e.sharedConfigurationModelId}`,n=(e.componentPath??[]).join("::");return[t,n,e.localId].filter(r=>(r==null?void 0:r.length)>0).join("::")}const XC=v.pipe(v.Str.Ord,v.Ord.contramap(e=>e.attributeId.localId));function Db(e){const{blockingDecisions:t,desiredDecisions:n,...r}=e,o=v.pipe([...n.map(i=>({...i,intention:"add"})),...t.map(i=>({...i,intention:"remove"}))],v.RNEA.groupBy(i=>QC(i.attributeId)),v.RR.collect(v.Ord.trivial)((i,a)=>({key:i,attributeId:v.RNEA.head(a).attributeId,decisions:a})),v.RA.sort(XC));return b.jsx("div",{...r,children:o.map(i=>b.jsx(JC,{decisions:i.decisions},i.key))})}const ZC=G.div`
109
125
  background-color: var(--color-explain-dialog-explanation-card);
110
126
  padding: var(--space-sm-fixed);
111
127
  box-shadow: 2px 1px 10px -5px rgba(0, 0, 0, 0.4);
112
128
  border-radius: var(--shape-border-radius-sm);
113
- `,lo=cr,ur=k(ro)`
129
+ `,qb=ZC,YC=G(Db)`
114
130
  display: grid;
115
131
  grid-template-columns: [name] minmax(150px, auto) [values] minmax(0px, 1fr);
116
132
  gap: var(--space-sm);
117
- `,dr=k(eo)`
133
+ `,eS=G(kb)`
118
134
  border-radius: var(--shape-border-radius-sm);
119
135
  background-color: var(--color-explain-dialog-apply-solution-button-fill);
120
136
  color: var(--color-explain-dialog-apply-solution-button-color);
@@ -131,58 +147,58 @@
131
147
  outline: 2px solid var(--color-explain-dialog-apply-solution-button-outline);
132
148
  outline-offset: 1px;
133
149
  }
134
- `;function fr(e){const{explanation:t}=e,{applySolutionButtonCaption:n}=oo(),o=t.solution.decisions.filter(i=>i.state!=null);return d.jsxs(lo,{children:[d.jsx(ur,{blockingDecisions:t.causedByDecisions,desiredDecisions:o}),d.jsx(dr,{explanation:t,children:n})]})}const pr=k(lo)`
150
+ `;function tS(e){const{explanation:t}=e,{applySolutionButtonCaption:n}=Vb(),r=t.solution.decisions.filter(o=>o.state!=null);return b.jsxs(qb,{children:[b.jsx(YC,{blockingDecisions:t.causedByDecisions,desiredDecisions:r}),b.jsx(eS,{explanation:t,children:n})]})}const nS=G(qb)`
135
151
  ul {
136
152
  margin: 0;
137
153
  }
138
154
 
139
155
  line-height: 1.5em;
140
- `,hr=k.ul`
156
+ `,rS=G.ul`
141
157
  list-style-type: none;
142
158
  margin-inline-start: 0;
143
159
  padding-inline-start: 0;
144
- `,ln=k.ul`
160
+ `,Tp=G.ul`
145
161
  list-style-type: disc;
146
162
  margin-inline-start: 0;
147
163
  padding-inline-start: var(--space-lg);
148
- `,sn=k.li`
164
+ `,Ap=G.li`
149
165
  font-size: 0.9em;
150
166
  font-family: var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif);
151
167
  font-weight: 500;
152
- `;function mr(e){const{explanation:t}=e,n=t.causedByCardinalities,o=v.pipe(t.causedByRules,v.RNEA.groupBy(i=>i.configurationModelId),v.RR.collect(v.Str.Ord)((i,r)=>({configurationModelId:i,rules:v.pipe(r,v.RA.map(l=>l.localId),v.RA.sort(v.Str.Ord))})));return d.jsx(pr,{children:d.jsxs(hr,{children:[o.map(i=>d.jsxs("li",{children:[d.jsx("span",{children:i.configurationModelId}),d.jsx(ln,{children:i.rules.map(r=>d.jsx(sn,{children:r}))})]})),n.length>0&&d.jsxs("li",{children:[d.jsx("span",{children:"Cardinality"}),d.jsx(ln,{children:n.map(i=>d.jsx(sn,{children:i.localId}))})]})]})})}function so(e){const{variant:t,...n}=e,{explainQuestion:o}=ye(),i=M.match(o).returnType().with({question:p.ExplainQuestionType.whyIsStateNotPossible},()=>"why your selection is not possible").with({question:p.ExplainQuestionType.whyIsNotSatisfied,subject:p.ExplainQuestionSubject.configuration},()=>"why your configuration is not satisfied").with({question:p.ExplainQuestionType.whyIsNotSatisfied,subject:p.ExplainQuestionSubject.attribute},()=>"why your attribute is not satisfied").with(M.P.nullish,()=>"why your selections are not possible").exhaustive(),r=M.match(t).returnType().with("failedToExplain",()=>d.jsxs(d.Fragment,{children:["Failed to explain ",i,".",d.jsx("br",{}),"Please check your internet connection and try again."]})).with("noExplanationFound",()=>d.jsxs(d.Fragment,{children:["There was no explanation found for ",i,"."]})).with("noSolutionFound",()=>d.jsxs(d.Fragment,{children:["There was no solution found for ",i,"."]})).exhaustive();return d.jsx("div",{...n,children:r})}const an=k.div`
168
+ `;function oS(e){const{explanation:t}=e,n=t.causedByCardinalities,r=v.pipe(t.causedByRules,v.RNEA.groupBy(o=>o.configurationModelId),v.RR.collect(v.Str.Ord)((o,i)=>({configurationModelId:o,rules:v.pipe(i,v.RA.map(a=>a.localId),v.RA.sort(v.Str.Ord))})));return b.jsx(nS,{children:b.jsxs(rS,{children:[r.map(o=>b.jsxs("li",{children:[b.jsx("span",{children:o.configurationModelId}),b.jsx(Tp,{children:o.rules.map(i=>b.jsx(Ap,{children:i}))})]})),n.length>0&&b.jsxs("li",{children:[b.jsx("span",{children:"Cardinality"}),b.jsx(Tp,{children:n.map(o=>b.jsx(Ap,{children:o.localId}))})]})]})})}function Lb(e){const{variant:t,...n}=e,{explainQuestion:r}=Zt(),o=H.match(r).returnType().with({question:_.ExplainQuestionType.whyIsStateNotPossible},()=>"why your selection is not possible").with({question:_.ExplainQuestionType.whyIsNotSatisfied,subject:_.ExplainQuestionSubject.configuration},()=>"why your configuration is not satisfied").with({question:_.ExplainQuestionType.whyIsNotSatisfied,subject:_.ExplainQuestionSubject.attribute},()=>"why your attribute is not satisfied").with(H.P.nullish,()=>"why your selections are not possible").exhaustive(),i=H.match(t).returnType().with("failedToExplain",()=>b.jsxs(b.Fragment,{children:["Failed to explain ",o,".",b.jsx("br",{}),"Please check your internet connection and try again."]})).with("noExplanationFound",()=>b.jsxs(b.Fragment,{children:["There was no explanation found for ",o,"."]})).with("noSolutionFound",()=>b.jsxs(b.Fragment,{children:["There was no solution found for ",o,"."]})).exhaustive();return b.jsx("div",{...n,children:i})}const Ip=G.div`
153
169
  font-weight: 500;
154
170
  font-family: var(--font-heading);
155
171
  margin-bottom: var(--space-xs);
156
172
  margin-left: var(--space-sm-fixed);
157
- `,cn=k.div`
173
+ `,Op=G.div`
158
174
  display: flex;
159
175
  flex-direction: column;
160
176
  gap: var(--space-xs);
161
- `,yr=k.div`
177
+ `,iS=G.div`
162
178
  display: flex;
163
179
  flex-direction: column;
164
180
  gap: var(--space-md);
165
- `,un=k(so)`
181
+ `,Pp=G(Lb)`
166
182
  width: min-content;
167
183
  min-width: 400px;
168
184
  margin: var(--space-sm-fixed) var(--space-md-fixed) var(--space-sm-fixed) var(--space-sm-fixed);
169
- `;function gr(){const{decisionExplanations:e,constraintExplanations:t,hasError:n}=ye(),{decisionExplanationSolutionsTitle:o,constraintExplanationSolutionsTitle:i}=oo();return n?d.jsx(un,{variant:"failedToExplain"}):e.length===0&&t.length===0?d.jsx(un,{variant:"noExplanationFound"}):d.jsxs(yr,{children:[e.length>0&&d.jsxs("div",{children:[d.jsx(an,{children:o}),d.jsx(cn,{children:e.map(r=>d.jsx(fr,{explanation:r},e.indexOf(r)))})]}),t.length>0&&d.jsxs("div",{children:[d.jsx(an,{children:i}),d.jsx(cn,{children:t.map(r=>d.jsx(mr,{explanation:r},t.indexOf(r)))})]})]})}function me(e){return ao(e)?(e.nodeName||"").toLowerCase():"#document"}function oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ge(e){var t;return(t=(ao(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ao(e){return e instanceof Node||e instanceof oe(e).Node}function X(e){return e instanceof Element||e instanceof oe(e).Element}function te(e){return e instanceof HTMLElement||e instanceof oe(e).HTMLElement}function Dt(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oe(e).ShadowRoot}function He(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=ie(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function br(e){return["table","td","th"].includes(me(e))}function qt(e){const t=zt(),n=ie(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function co(e){let t=Se(e);for(;te(t)&&!Ve(t);){if(qt(t))return t;t=Se(t)}return null}function zt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ve(e){return["html","body","#document"].includes(me(e))}function ie(e){return oe(e).getComputedStyle(e)}function ft(e){return X(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Se(e){if(me(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Dt(e)&&e.host||ge(e);return Dt(t)?t.host:t}function uo(e){const t=Se(e);return Ve(t)?e.ownerDocument?e.ownerDocument.body:e.body:te(t)&&He(t)?t:uo(t)}function be(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=uo(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),l=oe(i);return r?t.concat(l,l.visualViewport||[],He(i)?i:[],l.frameElement&&n?be(l.frameElement):[]):t.concat(i,be(i,[],n))}function Re(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function ne(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Dt(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function fo(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function po(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:o}=t;return n+"/"+o}).join(" "):navigator.userAgent}function xr(e){return e.mozInputSource===0&&e.isTrusted?!0:Vt()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Cr(e){return wr()?!1:!Vt()&&e.width===0&&e.height===0||Vt()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function vr(){return/apple/i.test(navigator.vendor)}function Vt(){const e=/android/i;return e.test(fo())||e.test(po())}function wr(){return po().includes("jsdom/")}function dn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Sr(e){return"nativeEvent"in e}function Tr(e){return e.matches("html,body")}function he(e){return(e==null?void 0:e.ownerDocument)||document}function yt(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Ie(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Er="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ho(e){return te(e)&&e.matches(Er)}function gt(e){e.preventDefault(),e.stopPropagation()}function Ar(e){return e?e.getAttribute("role")==="combobox"&&ho(e):!1}const Oe=Math.min,we=Math.max,tt=Math.round,Ye=Math.floor,xe=e=>({x:e,y:e}),Rr={left:"right",right:"left",bottom:"top",top:"bottom"},Ir={start:"end",end:"start"};function Ot(e,t,n){return we(e,Oe(t,n))}function Ue(e,t){return typeof e=="function"?e(t):e}function Te(e){return e.split("-")[0]}function _e(e){return e.split("-")[1]}function mo(e){return e==="x"?"y":"x"}function Ht(e){return e==="y"?"height":"width"}function pt(e){return["top","bottom"].includes(Te(e))?"y":"x"}function Ut(e){return mo(pt(e))}function Pr(e,t,n){n===void 0&&(n=!1);const o=_e(e),i=Ut(e),r=Ht(i);let l=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=nt(l)),[l,nt(l)]}function Dr(e){const t=nt(e);return[kt(e),t,kt(t)]}function kt(e){return e.replace(/start|end/g,t=>Ir[t])}function Vr(e,t,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:o:t?o:i;case"left":case"right":return t?r:l;default:return[]}}function Or(e,t,n,o){const i=_e(e);let r=Vr(Te(e),n==="start",o);return i&&(r=r.map(l=>l+"-"+i),t&&(r=r.concat(r.map(kt)))),r}function nt(e){return e.replace(/left|right|bottom|top/g,t=>Rr[t])}function kr(e){return{top:0,right:0,bottom:0,left:0,...e}}function yo(e){return typeof e!="number"?kr(e):{top:e,right:e,bottom:e,left:e}}function ot(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function fn(e,t,n){let{reference:o,floating:i}=e;const r=pt(t),l=Ut(t),s=Ht(l),a=Te(t),c=r==="y",x=o.x+o.width/2-i.width/2,h=o.y+o.height/2-i.height/2,g=o[s]/2-i[s]/2;let u;switch(a){case"top":u={x,y:o.y-i.height};break;case"bottom":u={x,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:h};break;case"left":u={x:o.x-i.width,y:h};break;default:u={x:o.x,y:o.y}}switch(_e(t)){case"start":u[l]-=g*(n&&c?-1:1);break;case"end":u[l]+=g*(n&&c?-1:1);break}return u}const jr=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,s=r.filter(Boolean),a=await(l.isRTL==null?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:i}),{x,y:h}=fn(c,o,a),g=o,u={},b=0;for(let w=0;w<s.length;w++){const{name:m,fn:y}=s[w],{x:C,y:P,data:S,reset:R}=await y({x,y:h,initialPlacement:o,placement:g,strategy:i,middlewareData:u,rects:c,platform:l,elements:{reference:e,floating:t}});x=C??x,h=P??h,u={...u,[m]:{...u[m],...S}},R&&b<=50&&(b++,typeof R=="object"&&(R.placement&&(g=R.placement),R.rects&&(c=R.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):R.rects),{x,y:h}=fn(c,g,a)),w=-1)}return{x,y:h,placement:g,strategy:i,middlewareData:u}};async function go(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:r,rects:l,elements:s,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:x="viewport",elementContext:h="floating",altBoundary:g=!1,padding:u=0}=Ue(t,e),b=yo(u),m=s[g?h==="floating"?"reference":"floating":h],y=ot(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(m)))==null||n?m:m.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:x,strategy:a})),C=h==="floating"?{...l.floating,x:o,y:i}:l.reference,P=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),S=await(r.isElement==null?void 0:r.isElement(P))?await(r.getScale==null?void 0:r.getScale(P))||{x:1,y:1}:{x:1,y:1},R=ot(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:C,offsetParent:P,strategy:a}):C);return{top:(y.top-R.top+b.top)/S.y,bottom:(R.bottom-y.bottom+b.bottom)/S.y,left:(y.left-R.left+b.left)/S.x,right:(R.right-y.right+b.right)/S.x}}const Fr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:l,elements:s,middlewareData:a}=t,{element:c,padding:x=0}=Ue(e,t)||{};if(c==null)return{};const h=yo(x),g={x:n,y:o},u=Ut(i),b=Ht(u),w=await l.getDimensions(c),m=u==="y",y=m?"top":"left",C=m?"bottom":"right",P=m?"clientHeight":"clientWidth",S=r.reference[b]+r.reference[u]-g[u]-r.floating[b],R=g[u]-r.reference[u],I=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let V=I?I[P]:0;(!V||!await(l.isElement==null?void 0:l.isElement(I)))&&(V=s.floating[P]||r.floating[b]);const D=S/2-R/2,F=V/2-w[b]/2-1,A=Oe(h[y],F),N=Oe(h[C],F),B=A,W=V-w[b]-N,H=V/2-w[b]/2+D,j=Ot(B,H,W),$=!a.arrow&&_e(i)!=null&&H!==j&&r.reference[b]/2-(H<B?A:N)-w[b]/2<0,O=$?H<B?H-B:H-W:0;return{[u]:g[u]+O,data:{[u]:j,centerOffset:H-j-O,...$&&{alignmentOffset:O}},reset:$}}}),Nr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:s,platform:a,elements:c}=t,{mainAxis:x=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,...m}=Ue(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const y=Te(i),C=Te(s)===s,P=await(a.isRTL==null?void 0:a.isRTL(c.floating)),S=g||(C||!w?[nt(s)]:Dr(s));!g&&b!=="none"&&S.push(...Or(s,w,b,P));const R=[s,...S],I=await go(t,m),V=[];let D=((o=r.flip)==null?void 0:o.overflows)||[];if(x&&V.push(I[y]),h){const B=Pr(i,l,P);V.push(I[B[0]],I[B[1]])}if(D=[...D,{placement:i,overflows:V}],!V.every(B=>B<=0)){var F,A;const B=(((F=r.flip)==null?void 0:F.index)||0)+1,W=R[B];if(W)return{data:{index:B,overflows:D},reset:{placement:W}};let H=(A=D.filter(j=>j.overflows[0]<=0).sort((j,$)=>j.overflows[1]-$.overflows[1])[0])==null?void 0:A.placement;if(!H)switch(u){case"bestFit":{var N;const j=(N=D.map($=>[$.placement,$.overflows.filter(O=>O>0).reduce((O,L)=>O+L,0)]).sort(($,O)=>$[1]-O[1])[0])==null?void 0:N[0];j&&(H=j);break}case"initialPlacement":H=s;break}if(i!==H)return{reset:{placement:H}}}return{}}}};async function Lr(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=Te(n),s=_e(n),a=pt(n)==="y",c=["left","top"].includes(l)?-1:1,x=r&&a?-1:1,h=Ue(t,e);let{mainAxis:g,crossAxis:u,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return s&&typeof b=="number"&&(u=s==="end"?b*-1:b),a?{x:u*x,y:g*c}:{x:g*c,y:u*x}}const Mr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:l,middlewareData:s}=t,a=await Lr(t,e);return l===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+a.x,y:r+a.y,data:{...a,placement:l}}}}},Br=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:m=>{let{x:y,y:C}=m;return{x:y,y:C}}},...a}=Ue(e,t),c={x:n,y:o},x=await go(t,a),h=pt(Te(i)),g=mo(h);let u=c[g],b=c[h];if(r){const m=g==="y"?"top":"left",y=g==="y"?"bottom":"right",C=u+x[m],P=u-x[y];u=Ot(C,u,P)}if(l){const m=h==="y"?"top":"left",y=h==="y"?"bottom":"right",C=b+x[m],P=b-x[y];b=Ot(C,b,P)}const w=s.fn({...t,[g]:u,[h]:b});return{...w,data:{x:w.x-n,y:w.y-o}}}}};function bo(e){const t=ie(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=te(e),r=i?e.offsetWidth:n,l=i?e.offsetHeight:o,s=tt(n)!==r||tt(o)!==l;return s&&(n=r,o=l),{width:n,height:o,$:s}}function _t(e){return X(e)?e:e.contextElement}function De(e){const t=_t(e);if(!te(t))return xe(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=bo(t);let l=(r?tt(n.width):n.width)/o,s=(r?tt(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const $r=xe(0);function xo(e){const t=oe(e);return!zt()||!t.visualViewport?$r:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kr(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==oe(e)?!1:t}function Ee(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=_t(e);let l=xe(1);t&&(o?X(o)&&(l=De(o)):l=De(e));const s=Kr(r,n,o)?xo(r):xe(0);let a=(i.left+s.x)/l.x,c=(i.top+s.y)/l.y,x=i.width/l.x,h=i.height/l.y;if(r){const g=oe(r),u=o&&X(o)?oe(o):o;let b=g.frameElement;for(;b&&o&&u!==g;){const w=De(b),m=b.getBoundingClientRect(),y=ie(b),C=m.left+(b.clientLeft+parseFloat(y.paddingLeft))*w.x,P=m.top+(b.clientTop+parseFloat(y.paddingTop))*w.y;a*=w.x,c*=w.y,x*=w.x,h*=w.y,a+=C,c+=P,b=oe(b).frameElement}}return ot({width:x,height:h,x:a,y:c})}const Wr=[":popover-open",":modal"];function Co(e){let t=!1,n=0,o=0;function i(r){try{t=t||e.matches(r)}catch{}}if(Wr.forEach(r=>{i(r)}),t){const r=co(e);if(r){const l=r.getBoundingClientRect();n=l.x,o=l.y}}return[t,n,o]}function qr(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=ge(o),[l]=t?Co(t.floating):[!1];if(o===r||l)return n;let s={scrollLeft:0,scrollTop:0},a=xe(1);const c=xe(0),x=te(o);if((x||!x&&i!=="fixed")&&((me(o)!=="body"||He(r))&&(s=ft(o)),te(o))){const h=Ee(o);a=De(o),c.x=h.x+o.clientLeft,c.y=h.y+o.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-s.scrollLeft*a.x+c.x,y:n.y*a.y-s.scrollTop*a.y+c.y}}function zr(e){return Array.from(e.getClientRects())}function vo(e){return Ee(ge(e)).left+ft(e).scrollLeft}function Hr(e){const t=ge(e),n=ft(e),o=e.ownerDocument.body,i=we(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=we(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+vo(e);const s=-n.scrollTop;return ie(o).direction==="rtl"&&(l+=we(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:s}}function Ur(e,t){const n=oe(e),o=ge(e),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,s=0,a=0;if(i){r=i.width,l=i.height;const c=zt();(!c||c&&t==="fixed")&&(s=i.offsetLeft,a=i.offsetTop)}return{width:r,height:l,x:s,y:a}}function _r(e,t){const n=Ee(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=te(e)?De(e):xe(1),l=e.clientWidth*r.x,s=e.clientHeight*r.y,a=i*r.x,c=o*r.y;return{width:l,height:s,x:a,y:c}}function pn(e,t,n){let o;if(t==="viewport")o=Ur(e,n);else if(t==="document")o=Hr(ge(e));else if(X(t))o=_r(t,n);else{const i=xo(e);o={...t,x:t.x-i.x,y:t.y-i.y}}return ot(o)}function wo(e,t){const n=Se(e);return n===t||!X(n)||Ve(n)?!1:ie(n).position==="fixed"||wo(n,t)}function Qr(e,t){const n=t.get(e);if(n)return n;let o=be(e,[],!1).filter(s=>X(s)&&me(s)!=="body"),i=null;const r=ie(e).position==="fixed";let l=r?Se(e):e;for(;X(l)&&!Ve(l);){const s=ie(l),a=qt(l);!a&&s.position==="fixed"&&(i=null),(r?!a&&!i:!a&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||He(l)&&!a&&wo(e,l))?o=o.filter(x=>x!==l):i=s,l=Se(l)}return t.set(e,o),o}function Yr(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const l=[...n==="clippingAncestors"?Qr(t,this._c):[].concat(n),o],s=l[0],a=l.reduce((c,x)=>{const h=pn(t,x,i);return c.top=we(h.top,c.top),c.right=Oe(h.right,c.right),c.bottom=Oe(h.bottom,c.bottom),c.left=we(h.left,c.left),c},pn(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Xr(e){const{width:t,height:n}=bo(e);return{width:t,height:n}}function Gr(e,t,n,o){const i=te(t),r=ge(t),l=n==="fixed",s=Ee(e,!0,l,t);let a={scrollLeft:0,scrollTop:0};const c=xe(0);if(i||!i&&!l)if((me(t)!=="body"||He(r))&&(a=ft(t)),i){const w=Ee(t,!0,l,t);c.x=w.x+t.clientLeft,c.y=w.y+t.clientTop}else r&&(c.x=vo(r));let x=s.left+a.scrollLeft-c.x,h=s.top+a.scrollTop-c.y;const[g,u,b]=Co(o);return g&&(x+=u,h+=b,i&&(x+=t.clientLeft,h+=t.clientTop)),{x,y:h,width:s.width,height:s.height}}function hn(e,t){return!te(e)||ie(e).position==="fixed"?null:t?t(e):e.offsetParent}function So(e,t){const n=oe(e);if(!te(e))return n;let o=hn(e,t);for(;o&&br(o)&&ie(o).position==="static";)o=hn(o,t);return o&&(me(o)==="html"||me(o)==="body"&&ie(o).position==="static"&&!qt(o))?n:o||co(e)||n}const Jr=async function(e){const t=this.getOffsetParent||So,n=this.getDimensions;return{reference:Gr(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function Zr(e){return ie(e).direction==="rtl"}const To={convertOffsetParentRelativeRectToViewportRelativeRect:qr,getDocumentElement:ge,getClippingRect:Yr,getOffsetParent:So,getElementRects:Jr,getClientRects:zr,getDimensions:Xr,getScale:De,isElement:X,isRTL:Zr};function el(e,t){let n=null,o;const i=ge(e);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function l(s,a){s===void 0&&(s=!1),a===void 0&&(a=1),r();const{left:c,top:x,width:h,height:g}=e.getBoundingClientRect();if(s||t(),!h||!g)return;const u=Ye(x),b=Ye(i.clientWidth-(c+h)),w=Ye(i.clientHeight-(x+g)),m=Ye(c),C={rootMargin:-u+"px "+-b+"px "+-w+"px "+-m+"px",threshold:we(0,Oe(1,a))||1};let P=!0;function S(R){const I=R[0].intersectionRatio;if(I!==a){if(!P)return l();I?l(!1,I):o=setTimeout(()=>{l(!1,1e-7)},100)}P=!1}try{n=new IntersectionObserver(S,{...C,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,C)}n.observe(e)}return l(!0),r}function tl(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,c=_t(e),x=i||r?[...c?be(c):[],...be(t)]:[];x.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),r&&y.addEventListener("resize",n)});const h=c&&s?el(c,n):null;let g=-1,u=null;l&&(u=new ResizeObserver(y=>{let[C]=y;C&&C.target===c&&u&&(u.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var P;(P=u)==null||P.observe(t)})),n()}),c&&!a&&u.observe(c),u.observe(t));let b,w=a?Ee(e):null;a&&m();function m(){const y=Ee(e);w&&(y.x!==w.x||y.y!==w.y||y.width!==w.width||y.height!==w.height)&&n(),w=y,b=requestAnimationFrame(m)}return n(),()=>{var y;x.forEach(C=>{i&&C.removeEventListener("scroll",n),r&&C.removeEventListener("resize",n)}),h==null||h(),(y=u)==null||y.disconnect(),u=null,a&&cancelAnimationFrame(b)}}const nl=Br,ol=Nr,mn=Fr,il=(e,t,n)=>{const o=new Map,i={platform:To,...n},r={...i.platform,_c:o};return jr(e,t,{...i,platform:r})},rl=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?mn({element:o.current,padding:i}).fn(n):{}:o?mn({element:o,padding:i}).fn(n):{}}}};var Je=typeof document<"u"?T.useLayoutEffect:T.useEffect;function it(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!it(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&e.$$typeof)&&!it(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function Eo(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yn(e,t){const n=Eo(e);return Math.round(t*n)/n}function gn(e){const t=E.useRef(e);return Je(()=>{t.current=e}),t}function ll(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:l}={},transform:s=!0,whileElementsMounted:a,open:c}=e,[x,h]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,u]=E.useState(o);it(g,o)||u(o);const[b,w]=E.useState(null),[m,y]=E.useState(null),C=E.useCallback(O=>{O!==I.current&&(I.current=O,w(O))},[]),P=E.useCallback(O=>{O!==V.current&&(V.current=O,y(O))},[]),S=r||b,R=l||m,I=E.useRef(null),V=E.useRef(null),D=E.useRef(x),F=a!=null,A=gn(a),N=gn(i),B=E.useCallback(()=>{if(!I.current||!V.current)return;const O={placement:t,strategy:n,middleware:g};N.current&&(O.platform=N.current),il(I.current,V.current,O).then(L=>{const ee={...L,isPositioned:!0};W.current&&!it(D.current,ee)&&(D.current=ee,$i.flushSync(()=>{h(ee)}))})},[g,t,n,N]);Je(()=>{c===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(O=>({...O,isPositioned:!1})))},[c]);const W=E.useRef(!1);Je(()=>(W.current=!0,()=>{W.current=!1}),[]),Je(()=>{if(S&&(I.current=S),R&&(V.current=R),S&&R){if(A.current)return A.current(S,R,B);B()}},[S,R,B,A,F]);const H=E.useMemo(()=>({reference:I,floating:V,setReference:C,setFloating:P}),[C,P]),j=E.useMemo(()=>({reference:S,floating:R}),[S,R]),$=E.useMemo(()=>{const O={position:n,left:0,top:0};if(!j.floating)return O;const L=yn(j.floating,x.x),ee=yn(j.floating,x.y);return s?{...O,transform:"translate("+L+"px, "+ee+"px)",...Eo(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:ee}},[n,s,j.floating,x.x,x.y]);return E.useMemo(()=>({...x,update:B,refs:H,elements:j,floatingStyles:$}),[x,B,H,j,$])}/*!
185
+ `;function aS(){const{decisionExplanations:e,constraintExplanations:t,hasError:n}=Zt(),{decisionExplanationSolutionsTitle:r,constraintExplanationSolutionsTitle:o}=Vb();return n?b.jsx(Pp,{variant:"failedToExplain"}):e.length===0&&t.length===0?b.jsx(Pp,{variant:"noExplanationFound"}):b.jsxs(iS,{children:[e.length>0&&b.jsxs("div",{children:[b.jsx(Ip,{children:r}),b.jsx(Op,{children:e.map(i=>b.jsx(tS,{explanation:i},e.indexOf(i)))})]}),t.length>0&&b.jsxs("div",{children:[b.jsx(Ip,{children:o}),b.jsx(Op,{children:t.map(i=>b.jsx(oS,{explanation:i},t.indexOf(i)))})]})]})}function Wt(e){return Bb(e)?(e.nodeName||"").toLowerCase():"#document"}function He(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yt(e){var t;return(t=(Bb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Bb(e){return e instanceof Node||e instanceof He(e).Node}function ve(e){return e instanceof Element||e instanceof He(e).Element}function Ve(e){return e instanceof HTMLElement||e instanceof He(e).HTMLElement}function Pf(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof He(e).ShadowRoot}function Mi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function uS(e){return["table","td","th"].includes(Wt(e))}function od(e){const t=id(),n=Qe(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function zb(e){let t=Fn(e);for(;Ve(t)&&!br(t);){if(od(t))return t;t=Fn(t)}return null}function id(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function br(e){return["html","body","#document"].includes(Wt(e))}function Qe(e){return He(e).getComputedStyle(e)}function ms(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Fn(e){if(Wt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pf(e)&&e.host||Yt(e);return Pf(t)?t.host:t}function Wb(e){const t=Fn(e);return br(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ve(t)&&Mi(t)?t:Wb(t)}function ln(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wb(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=He(o);return i?t.concat(a,a.visualViewport||[],Mi(o)?o:[],a.frameElement&&n?ln(a.frameElement):[]):t.concat(o,ln(o,[],n))}function fr(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function We(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Pf(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Gb(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Kb(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function sS(e){return e.mozInputSource===0&&e.isTrusted?!0:Nf()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function cS(e){return fS()?!1:!Nf()&&e.width===0&&e.height===0||Nf()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function lS(){return/apple/i.test(navigator.vendor)}function Nf(){const e=/android/i;return e.test(Gb())||e.test(Kb())}function fS(){return Kb().includes("jsdom/")}function Np(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function dS(e){return"nativeEvent"in e}function pS(e){return e.matches("html,body")}function qt(e){return(e==null?void 0:e.ownerDocument)||document}function Ol(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function dr(e){return"composedPath"in e?e.composedPath()[0]:e.target}const hS="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Hb(e){return Ve(e)&&e.matches(hS)}function Pl(e){e.preventDefault(),e.stopPropagation()}function yS(e){return e?e.getAttribute("role")==="combobox"&&Hb(e):!1}const vr=Math.min,Mn=Math.max,Uu=Math.round,cu=Math.floor,pn=e=>({x:e,y:e}),mS={left:"right",right:"left",bottom:"top",top:"bottom"},gS={start:"end",end:"start"};function jf(e,t,n){return Mn(e,vr(t,n))}function ki(e,t){return typeof e=="function"?e(t):e}function Rn(e){return e.split("-")[0]}function Fi(e){return e.split("-")[1]}function Jb(e){return e==="x"?"y":"x"}function ad(e){return e==="y"?"height":"width"}function gs(e){return["top","bottom"].includes(Rn(e))?"y":"x"}function ud(e){return Jb(gs(e))}function bS(e,t,n){n===void 0&&(n=!1);const r=Fi(e),o=ud(e),i=ad(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Du(a)),[a,Du(a)]}function vS(e){const t=Du(e);return[$f(e),t,$f(t)]}function $f(e){return e.replace(/start|end/g,t=>gS[t])}function xS(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function _S(e,t,n,r){const o=Fi(e);let i=xS(Rn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map($f)))),i}function Du(e){return e.replace(/left|right|bottom|top/g,t=>mS[t])}function wS(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qb(e){return typeof e!="number"?wS(e):{top:e,right:e,bottom:e,left:e}}function qu(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function jp(e,t,n){let{reference:r,floating:o}=e;const i=gs(t),a=ud(t),u=ad(a),s=Rn(t),c=i==="y",f=r.x+r.width/2-o.width/2,l=r.y+r.height/2-o.height/2,d=r[u]/2-o[u]/2;let p;switch(s){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:l};break;case"left":p={x:r.x-o.width,y:l};break;default:p={x:r.x,y:r.y}}switch(Fi(t)){case"start":p[a]-=d*(n&&c?-1:1);break;case"end":p[a]+=d*(n&&c?-1:1);break}return p}const CS=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,u=i.filter(Boolean),s=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:l}=jp(c,r,s),d=r,p={},y=0;for(let h=0;h<u.length;h++){const{name:m,fn:g}=u[h],{x:w,y:N,data:T,reset:A}=await g({x:f,y:l,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});f=w??f,l=N??l,p={...p,[m]:{...p[m],...T}},A&&y<=50&&(y++,typeof A=="object"&&(A.placement&&(d=A.placement),A.rects&&(c=A.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:f,y:l}=jp(c,d,s)),h=-1)}return{x:f,y:l,placement:d,strategy:o,middlewareData:p}};async function Xb(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:u,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:l="floating",altBoundary:d=!1,padding:p=0}=ki(t,e),y=Qb(p),m=u[d?l==="floating"?"reference":"floating":l],g=qu(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:c,rootBoundary:f,strategy:s})),w=l==="floating"?{...a.floating,x:r,y:o}:a.reference,N=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),T=await(i.isElement==null?void 0:i.isElement(N))?await(i.getScale==null?void 0:i.getScale(N))||{x:1,y:1}:{x:1,y:1},A=qu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:N,strategy:s}):w);return{top:(g.top-A.top+y.top)/T.y,bottom:(A.bottom-g.bottom+y.bottom)/T.y,left:(g.left-A.left+y.left)/T.x,right:(A.right-g.right+y.right)/T.x}}const SS=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:u,middlewareData:s}=t,{element:c,padding:f=0}=ki(e,t)||{};if(c==null)return{};const l=Qb(f),d={x:n,y:r},p=ud(o),y=ad(p),h=await a.getDimensions(c),m=p==="y",g=m?"top":"left",w=m?"bottom":"right",N=m?"clientHeight":"clientWidth",T=i.reference[y]+i.reference[p]-d[p]-i.floating[y],A=d[p]-i.reference[p],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let U=O?O[N]:0;(!U||!await(a.isElement==null?void 0:a.isElement(O)))&&(U=u.floating[N]||i.floating[y]);const E=T/2-A/2,W=U/2-h[y]/2-1,S=vr(l[g],W),$=vr(l[w],W),z=S,R=U-h[y]-$,k=U/2-h[y]/2+E,F=jf(z,k,R),V=!s.arrow&&Fi(o)!=null&&k!==F&&i.reference[y]/2-(k<z?S:$)-h[y]/2<0,j=V?k<z?k-z:k-R:0;return{[p]:d[p]+j,data:{[p]:F,centerOffset:k-F-j,...V&&{alignmentOffset:j}},reset:V}}}),TS=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:u,platform:s,elements:c}=t,{mainAxis:f=!0,crossAxis:l=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:h=!0,...m}=ki(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=Rn(o),w=Rn(u)===u,N=await(s.isRTL==null?void 0:s.isRTL(c.floating)),T=d||(w||!h?[Du(u)]:vS(u));!d&&y!=="none"&&T.push(..._S(u,h,y,N));const A=[u,...T],O=await Xb(t,m),U=[];let E=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&U.push(O[g]),l){const z=bS(o,a,N);U.push(O[z[0]],O[z[1]])}if(E=[...E,{placement:o,overflows:U}],!U.every(z=>z<=0)){var W,S;const z=(((W=i.flip)==null?void 0:W.index)||0)+1,R=A[z];if(R)return{data:{index:z,overflows:E},reset:{placement:R}};let k=(S=E.filter(F=>F.overflows[0]<=0).sort((F,V)=>F.overflows[1]-V.overflows[1])[0])==null?void 0:S.placement;if(!k)switch(p){case"bestFit":{var $;const F=($=E.map(V=>[V.placement,V.overflows.filter(j=>j>0).reduce((j,L)=>j+L,0)]).sort((V,j)=>V[1]-j[1])[0])==null?void 0:$[0];F&&(k=F);break}case"initialPlacement":k=u;break}if(o!==k)return{reset:{placement:k}}}return{}}}};async function AS(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Rn(n),u=Fi(n),s=gs(n)==="y",c=["left","top"].includes(a)?-1:1,f=i&&s?-1:1,l=ki(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:y}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...l};return u&&typeof y=="number"&&(p=u==="end"?y*-1:y),s?{x:p*f,y:d*c}:{x:d*c,y:p*f}}const IS=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:u}=t,s=await AS(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},OS=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:u={fn:m=>{let{x:g,y:w}=m;return{x:g,y:w}}},...s}=ki(e,t),c={x:n,y:r},f=await Xb(t,s),l=gs(Rn(o)),d=Jb(l);let p=c[d],y=c[l];if(i){const m=d==="y"?"top":"left",g=d==="y"?"bottom":"right",w=p+f[m],N=p-f[g];p=jf(w,p,N)}if(a){const m=l==="y"?"top":"left",g=l==="y"?"bottom":"right",w=y+f[m],N=y-f[g];y=jf(w,y,N)}const h=u.fn({...t,[d]:p,[l]:y});return{...h,data:{x:h.x-n,y:h.y-r}}}}};function Zb(e){const t=Qe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ve(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,u=Uu(n)!==i||Uu(r)!==a;return u&&(n=i,r=a),{width:n,height:r,$:u}}function sd(e){return ve(e)?e:e.contextElement}function mr(e){const t=sd(e);if(!Ve(t))return pn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Zb(t);let a=(i?Uu(n.width):n.width)/r,u=(i?Uu(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const PS=pn(0);function Yb(e){const t=He(e);return!id()||!t.visualViewport?PS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function NS(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==He(e)?!1:t}function Vn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=sd(e);let a=pn(1);t&&(r?ve(r)&&(a=mr(r)):a=mr(e));const u=NS(i,n,r)?Yb(i):pn(0);let s=(o.left+u.x)/a.x,c=(o.top+u.y)/a.y,f=o.width/a.x,l=o.height/a.y;if(i){const d=He(i),p=r&&ve(r)?He(r):r;let y=d.frameElement;for(;y&&r&&p!==d;){const h=mr(y),m=y.getBoundingClientRect(),g=Qe(y),w=m.left+(y.clientLeft+parseFloat(g.paddingLeft))*h.x,N=m.top+(y.clientTop+parseFloat(g.paddingTop))*h.y;s*=h.x,c*=h.y,f*=h.x,l*=h.y,s+=w,c+=N,y=He(y).frameElement}}return qu({width:f,height:l,x:s,y:c})}const jS=[":popover-open",":modal"];function ev(e){let t=!1,n=0,r=0;function o(i){try{t=t||e.matches(i)}catch{}}if(jS.forEach(i=>{o(i)}),t){const i=zb(e);if(i){const a=i.getBoundingClientRect();n=a.x,r=a.y}}return[t,n,r]}function $S(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=Yt(r),[a]=t?ev(t.floating):[!1];if(r===i||a)return n;let u={scrollLeft:0,scrollTop:0},s=pn(1);const c=pn(0),f=Ve(r);if((f||!f&&o!=="fixed")&&((Wt(r)!=="body"||Mi(i))&&(u=ms(r)),Ve(r))){const l=Vn(r);s=mr(r),c.x=l.x+r.clientLeft,c.y=l.y+r.clientTop}return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-u.scrollLeft*s.x+c.x,y:n.y*s.y-u.scrollTop*s.y+c.y}}function ES(e){return Array.from(e.getClientRects())}function tv(e){return Vn(Yt(e)).left+ms(e).scrollLeft}function MS(e){const t=Yt(e),n=ms(e),r=e.ownerDocument.body,o=Mn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Mn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+tv(e);const u=-n.scrollTop;return Qe(r).direction==="rtl"&&(a+=Mn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:u}}function kS(e,t){const n=He(e),r=Yt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,u=0,s=0;if(o){i=o.width,a=o.height;const c=id();(!c||c&&t==="fixed")&&(u=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:u,y:s}}function FS(e,t){const n=Vn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ve(e)?mr(e):pn(1),a=e.clientWidth*i.x,u=e.clientHeight*i.y,s=o*i.x,c=r*i.y;return{width:a,height:u,x:s,y:c}}function $p(e,t,n){let r;if(t==="viewport")r=kS(e,n);else if(t==="document")r=MS(Yt(e));else if(ve(t))r=FS(t,n);else{const o=Yb(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return qu(r)}function nv(e,t){const n=Fn(e);return n===t||!ve(n)||br(n)?!1:Qe(n).position==="fixed"||nv(n,t)}function RS(e,t){const n=t.get(e);if(n)return n;let r=ln(e,[],!1).filter(u=>ve(u)&&Wt(u)!=="body"),o=null;const i=Qe(e).position==="fixed";let a=i?Fn(e):e;for(;ve(a)&&!br(a);){const u=Qe(a),s=od(a);!s&&u.position==="fixed"&&(o=null),(i?!s&&!o:!s&&u.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Mi(a)&&!s&&nv(e,a))?r=r.filter(f=>f!==a):o=u,a=Fn(a)}return t.set(e,r),r}function VS(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?RS(t,this._c):[].concat(n),r],u=a[0],s=a.reduce((c,f)=>{const l=$p(t,f,o);return c.top=Mn(l.top,c.top),c.right=vr(l.right,c.right),c.bottom=vr(l.bottom,c.bottom),c.left=Mn(l.left,c.left),c},$p(t,u,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function US(e){const{width:t,height:n}=Zb(e);return{width:t,height:n}}function DS(e,t,n,r){const o=Ve(t),i=Yt(t),a=n==="fixed",u=Vn(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=pn(0);if(o||!o&&!a)if((Wt(t)!=="body"||Mi(i))&&(s=ms(t)),o){const h=Vn(t,!0,a,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else i&&(c.x=tv(i));let f=u.left+s.scrollLeft-c.x,l=u.top+s.scrollTop-c.y;const[d,p,y]=ev(r);return d&&(f+=p,l+=y,o&&(f+=t.clientLeft,l+=t.clientTop)),{x:f,y:l,width:u.width,height:u.height}}function Ep(e,t){return!Ve(e)||Qe(e).position==="fixed"?null:t?t(e):e.offsetParent}function rv(e,t){const n=He(e);if(!Ve(e))return n;let r=Ep(e,t);for(;r&&uS(r)&&Qe(r).position==="static";)r=Ep(r,t);return r&&(Wt(r)==="html"||Wt(r)==="body"&&Qe(r).position==="static"&&!od(r))?n:r||zb(e)||n}const qS=async function(e){const t=this.getOffsetParent||rv,n=this.getDimensions;return{reference:DS(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function LS(e){return Qe(e).direction==="rtl"}const ov={convertOffsetParentRelativeRectToViewportRelativeRect:$S,getDocumentElement:Yt,getClippingRect:VS,getOffsetParent:rv,getElementRects:qS,getClientRects:ES,getDimensions:US,getScale:mr,isElement:ve,isRTL:LS};function BS(e,t){let n=null,r;const o=Yt(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,s){u===void 0&&(u=!1),s===void 0&&(s=1),i();const{left:c,top:f,width:l,height:d}=e.getBoundingClientRect();if(u||t(),!l||!d)return;const p=cu(f),y=cu(o.clientWidth-(c+l)),h=cu(o.clientHeight-(f+d)),m=cu(c),w={rootMargin:-p+"px "+-y+"px "+-h+"px "+-m+"px",threshold:Mn(0,vr(1,s))||1};let N=!0;function T(A){const O=A[0].intersectionRatio;if(O!==s){if(!N)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},100)}N=!1}try{n=new IntersectionObserver(T,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,w)}n.observe(e)}return a(!0),i}function zS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,c=sd(e),f=o||i?[...c?ln(c):[],...ln(t)]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const l=c&&u?BS(c,n):null;let d=-1,p=null;a&&(p=new ResizeObserver(g=>{let[w]=g;w&&w.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var N;(N=p)==null||N.observe(t)})),n()}),c&&!s&&p.observe(c),p.observe(t));let y,h=s?Vn(e):null;s&&m();function m(){const g=Vn(e);h&&(g.x!==h.x||g.y!==h.y||g.width!==h.width||g.height!==h.height)&&n(),h=g,y=requestAnimationFrame(m)}return n(),()=>{var g;f.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),l==null||l(),(g=p)==null||g.disconnect(),p=null,s&&cancelAnimationFrame(y)}}const WS=OS,GS=TS,Mp=SS,KS=(e,t,n)=>{const r=new Map,o={platform:ov,...n},i={...o.platform,_c:r};return CS(e,t,{...o,platform:i})},HS=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Mp({element:r.current,padding:o}).fn(n):{}:r?Mp({element:r,padding:o}).fn(n):{}}}};var $u=typeof document<"u"?I.useLayoutEffect:I.useEffect;function Lu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Lu(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Lu(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function iv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function kp(e,t){const n=iv(e);return Math.round(t*n)/n}function Fp(e){const t=P.useRef(e);return $u(()=>{t.current=e}),t}function JS(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:u=!0,whileElementsMounted:s,open:c}=e,[f,l]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=P.useState(r);Lu(d,r)||p(r);const[y,h]=P.useState(null),[m,g]=P.useState(null),w=P.useCallback(j=>{j!==O.current&&(O.current=j,h(j))},[]),N=P.useCallback(j=>{j!==U.current&&(U.current=j,g(j))},[]),T=i||y,A=a||m,O=P.useRef(null),U=P.useRef(null),E=P.useRef(f),W=s!=null,S=Fp(s),$=Fp(o),z=P.useCallback(()=>{if(!O.current||!U.current)return;const j={placement:t,strategy:n,middleware:d};$.current&&(j.platform=$.current),KS(O.current,U.current,j).then(L=>{const ae={...L,isPositioned:!0};R.current&&!Lu(E.current,ae)&&(E.current=ae,IC.flushSync(()=>{l(ae)}))})},[d,t,n,$]);$u(()=>{c===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,l(j=>({...j,isPositioned:!1})))},[c]);const R=P.useRef(!1);$u(()=>(R.current=!0,()=>{R.current=!1}),[]),$u(()=>{if(T&&(O.current=T),A&&(U.current=A),T&&A){if(S.current)return S.current(T,A,z);z()}},[T,A,z,S,W]);const k=P.useMemo(()=>({reference:O,floating:U,setReference:w,setFloating:N}),[w,N]),F=P.useMemo(()=>({reference:T,floating:A}),[T,A]),V=P.useMemo(()=>{const j={position:n,left:0,top:0};if(!F.floating)return j;const L=kp(F.floating,f.x),ae=kp(F.floating,f.y);return u?{...j,transform:"translate("+L+"px, "+ae+"px)",...iv(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:ae}},[n,u,F.floating,f.x,f.y]);return P.useMemo(()=>({...f,update:z,refs:k,elements:F,floatingStyles:V}),[f,z,k,F,V])}/*!
170
186
  * tabbable 6.2.0
171
187
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
172
- */var sl=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],jt=sl.join(","),Ao=typeof Element>"u",We=Ao?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,rt=!Ao&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},lt=function e(t,n){var o;n===void 0&&(n=!0);var i=t==null||(o=t.getAttribute)===null||o===void 0?void 0:o.call(t,"inert"),r=i===""||i==="true",l=r||n&&t&&e(t.parentNode);return l},al=function(t){var n,o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return o===""||o==="true"},cl=function(t,n,o){if(lt(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(jt));return n&&We.call(t,jt)&&i.unshift(t),i=i.filter(o),i},ul=function e(t,n,o){for(var i=[],r=Array.from(t);r.length;){var l=r.shift();if(!lt(l,!1))if(l.tagName==="SLOT"){var s=l.assignedElements(),a=s.length?s:l.children,c=e(a,!0,o);o.flatten?i.push.apply(i,c):i.push({scopeParent:l,candidates:c})}else{var x=We.call(l,jt);x&&o.filter(l)&&(n||!t.includes(l))&&i.push(l);var h=l.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(l),g=!lt(h,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(l));if(h&&g){var u=e(h===!0?l.children:h.children,!0,o);o.flatten?i.push.apply(i,u):i.push({scopeParent:l,candidates:u})}else r.unshift.apply(r,l.children)}}return i},Ro=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Io=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||al(t))&&!Ro(t)?0:t.tabIndex},dl=function(t,n){var o=Io(t);return o<0&&n&&!Ro(t)?0:o},fl=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Po=function(t){return t.tagName==="INPUT"},pl=function(t){return Po(t)&&t.type==="hidden"},hl=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(o){return o.tagName==="SUMMARY"});return n},ml=function(t,n){for(var o=0;o<t.length;o++)if(t[o].checked&&t[o].form===n)return t[o]},yl=function(t){if(!t.name)return!0;var n=t.form||rt(t),o=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=o(window.CSS.escape(t.name));else try{i=o(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var r=ml(i,t.form);return!r||r===t},gl=function(t){return Po(t)&&t.type==="radio"},bl=function(t){return gl(t)&&!yl(t)},xl=function(t){var n,o=t&&rt(t),i=(n=o)===null||n===void 0?void 0:n.host,r=!1;if(o&&o!==t){var l,s,a;for(r=!!((l=i)!==null&&l!==void 0&&(s=l.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(a=t.ownerDocument)!==null&&a!==void 0&&a.contains(t));!r&&i;){var c,x,h;o=rt(i),i=(c=o)===null||c===void 0?void 0:c.host,r=!!((x=i)!==null&&x!==void 0&&(h=x.ownerDocument)!==null&&h!==void 0&&h.contains(i))}}return r},bn=function(t){var n=t.getBoundingClientRect(),o=n.width,i=n.height;return o===0&&i===0},Cl=function(t,n){var o=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var r=We.call(t,"details>summary:first-of-type"),l=r?t.parentElement:t;if(We.call(l,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var a=t.parentElement,c=rt(t);if(a&&!a.shadowRoot&&i(a)===!0)return bn(t);t.assignedSlot?t=t.assignedSlot:!a&&c!==t.ownerDocument?t=c.host:t=a}t=s}if(xl(t))return!t.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return bn(t);return!1},vl=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var o=0;o<n.children.length;o++){var i=n.children.item(o);if(i.tagName==="LEGEND")return We.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},wl=function(t,n){return!(n.disabled||lt(n)||pl(n)||Cl(n,t)||hl(n)||vl(n))},xn=function(t,n){return!(bl(n)||Io(n)<0||!wl(t,n))},Sl=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Tl=function e(t){var n=[],o=[];return t.forEach(function(i,r){var l=!!i.scopeParent,s=l?i.scopeParent:i,a=dl(s,l),c=l?e(i.candidates):s;a===0?l?n.push.apply(n,c):n.push(s):o.push({documentOrder:r,tabIndex:a,item:i,isScope:l,content:c})}),o.sort(fl).reduce(function(i,r){return r.isScope?i.push.apply(i,r.content):i.push(r.content),i},[]).concat(n)},Qt=function(t,n){n=n||{};var o;return n.getShadowRoot?o=ul([t],n.includeContainer,{filter:xn.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Sl}):o=cl(t,n.includeContainer,xn.bind(null,n)),Tl(o)};function Yt(e){return E.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const El=E["useInsertionEffect".toString()],Al=El||(e=>e());function Pe(e){const t=E.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Al(()=>{t.current=e}),E.useCallback(function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return t.current==null?void 0:t.current(...o)},[])}let Cn=0;function Ce(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:o=!0,sync:i=!1}=t;o&&cancelAnimationFrame(Cn);const r=()=>e==null?void 0:e.focus({preventScroll:n});i?r():Cn=requestAnimationFrame(r)}var le=typeof document<"u"?T.useLayoutEffect:T.useEffect;function ke(){return ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ke.apply(this,arguments)}let bt=!1,Rl=0;const vn=()=>"floating-ui-"+Rl++;function Il(){const[e,t]=E.useState(()=>bt?vn():void 0);return le(()=>{e==null&&t(vn())},[]),E.useEffect(()=>{bt||(bt=!0)},[]),e}const Pl=E["useId".toString()],ht=Pl||Il,Dl=E.forwardRef(function(t,n){let{context:{placement:o,elements:{floating:i},middlewareData:{arrow:r}},width:l=14,height:s=7,tipRadius:a=0,strokeWidth:c=0,staticOffset:x,stroke:h,d:g,style:{transform:u,...b}={},...w}=t;process.env.NODE_ENV!=="production"&&(n||console.warn("Floating UI: The `ref` prop is required for the `FloatingArrow`","component."));const m=ht();if(!i)return null;c*=2;const y=c/2,C=l/2*(a/-8+1),P=s/2*a/4,[S,R]=o.split("-"),I=To.isRTL(i),V=!!g,D=S==="top"||S==="bottom",F=x&&R==="end"?"bottom":"top";let A=x&&R==="end"?"right":"left";x&&I&&(A=R==="end"?"left":"right");const N=(r==null?void 0:r.x)!=null?x||r.x:"",B=(r==null?void 0:r.y)!=null?x||r.y:"",W=g||"M0,0"+(" H"+l)+(" L"+(l-C)+","+(s-P))+(" Q"+l/2+","+s+" "+C+","+(s-P))+" Z",H={top:V?"rotate(180deg)":"",left:V?"rotate(90deg)":"rotate(-90deg)",bottom:V?"":"rotate(180deg)",right:V?"rotate(-90deg)":"rotate(90deg)"}[S];return E.createElement("svg",ke({},w,{"aria-hidden":!0,ref:n,width:V?l:l+c,height:l,viewBox:"0 0 "+l+" "+(s>l?s:l),style:{position:"absolute",pointerEvents:"none",[A]:N,[F]:B,[S]:D||V?"100%":"calc(100% - "+c/2+"px)",transform:""+H+(u??""),...b}}),c>0&&E.createElement("path",{clipPath:"url(#"+m+")",fill:"none",stroke:h,strokeWidth:c+(g?0:1),d:W}),E.createElement("path",{stroke:c&&!g?w.fill:"none",d:W}),E.createElement("clipPath",{id:m},E.createElement("rect",{x:-y,y:y*(V?-1:1),width:l+c,height:l})))});function Vl(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var o;e.set(t,((o=e.get(t))==null?void 0:o.filter(i=>i!==n))||[])}}}const Ol=E.createContext(null),kl=E.createContext(null),jl=()=>{var e;return((e=E.useContext(Ol))==null?void 0:e.id)||null},Xt=()=>E.useContext(kl);function qe(e){return"data-floating-ui-"+e}function xt(e){const t=T.useRef(e);return le(()=>{t.current=e}),t}function Fl(e,t){var n;let o=[],i=(n=e.find(r=>r.id===t))==null?void 0:n.parentId;for(;i;){const r=e.find(l=>l.id===i);i=r==null?void 0:r.parentId,r&&(o=o.concat(r))}return o}function Be(e,t){let n=e.filter(i=>{var r;return i.parentId===t&&((r=i.context)==null?void 0:r.open)}),o=n;for(;o.length;)o=e.filter(i=>{var r;return(r=o)==null?void 0:r.some(l=>{var s;return i.parentId===l.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(o);return n}let Ae=new WeakMap,Xe=new WeakSet,Ge={},Ct=0;const Nl=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Do=e=>e&&(e.host||Do(e.parentNode)),Ll=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=Do(n);return e.contains(o)?o:null}).filter(n=>n!=null);function Ml(e,t,n,o){const i="data-floating-ui-inert",r=o?"inert":n?"aria-hidden":null,l=Ll(t,e),s=new Set,a=new Set(l),c=[];Ge[i]||(Ge[i]=new WeakMap);const x=Ge[i];l.forEach(h),g(t),s.clear();function h(u){!u||s.has(u)||(s.add(u),u.parentNode&&h(u.parentNode))}function g(u){!u||a.has(u)||Array.prototype.forEach.call(u.children,b=>{if(s.has(b))g(b);else{const w=r?b.getAttribute(r):null,m=w!==null&&w!=="false",y=(Ae.get(b)||0)+1,C=(x.get(b)||0)+1;Ae.set(b,y),x.set(b,C),c.push(b),y===1&&m&&Xe.add(b),C===1&&b.setAttribute(i,""),!m&&r&&b.setAttribute(r,"true")}})}return Ct++,()=>{c.forEach(u=>{const b=(Ae.get(u)||0)-1,w=(x.get(u)||0)-1;Ae.set(u,b),x.set(u,w),b||(!Xe.has(u)&&r&&u.removeAttribute(r),Xe.delete(u)),w||u.removeAttribute(i)}),Ct--,Ct||(Ae=new WeakMap,Ae=new WeakMap,Xe=new WeakSet,Ge={})}}function wn(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=he(e[0]).body;return Ml(e.concat(Array.from(o.querySelectorAll("[aria-live]"))),o,t,n)}const Gt=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Vo(e,t){const n=Qt(e,Gt());t==="prev"&&n.reverse();const o=n.indexOf(Re(he(e)));return n.slice(o+1)[0]}function Oo(){return Vo(document.body,"next")}function ko(){return Vo(document.body,"prev")}function $e(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!ne(n,o)}function Bl(e){Qt(e,Gt()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function $l(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const o=n.dataset.tabindex;delete n.dataset.tabindex,o?n.setAttribute("tabindex",o):n.removeAttribute("tabindex")})}const Jt={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let Kl;function Sn(e){e.key==="Tab"&&(e.target,clearTimeout(Kl))}const st=E.forwardRef(function(t,n){const[o,i]=E.useState();le(()=>(vr()&&i("button"),document.addEventListener("keydown",Sn),()=>{document.removeEventListener("keydown",Sn)}),[]);const r={ref:n,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,[qe("focus-guard")]:"",style:Jt};return E.createElement("span",ke({},t,r))}),jo=E.createContext(null),Tn=qe("portal");function Wl(e){let{id:t,root:n}=e===void 0?{}:e;const[o,i]=E.useState(null),r=ht(),l=No(),s=E.useRef(null);return le(()=>()=>{o==null||o.remove(),queueMicrotask(()=>{s.current=null})},[o]),le(()=>{if(s.current)return;const a=t?document.getElementById(t):null;if(!a)return;const c=document.createElement("div");c.id=r,c.setAttribute(Tn,""),a.appendChild(c),s.current=c,i(c)},[t,r]),le(()=>{if(s.current)return;let a=n||(l==null?void 0:l.portalNode);a&&!X(a)&&(a=a.current),a=a||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,a.appendChild(c));const x=document.createElement("div");x.id=r,x.setAttribute(Tn,""),a=c||a,a.appendChild(x),s.current=x,i(x)},[t,n,r,l]),o}function Fo(e){let{children:t,id:n,root:o=null,preserveTabOrder:i=!0}=e;const r=Wl({id:n,root:o}),[l,s]=E.useState(null),a=E.useRef(null),c=E.useRef(null),x=E.useRef(null),h=E.useRef(null),g=!!l&&!l.modal&&l.open&&i&&!!(o||r);return E.useEffect(()=>{if(!r||!i||l!=null&&l.modal)return;function u(b){r&&$e(b)&&(b.type==="focusin"?$l:Bl)(r)}return r.addEventListener("focusin",u,!0),r.addEventListener("focusout",u,!0),()=>{r.removeEventListener("focusin",u,!0),r.removeEventListener("focusout",u,!0)}},[r,i,l==null?void 0:l.modal]),E.createElement(jo.Provider,{value:E.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:a,afterOutsideRef:c,beforeInsideRef:x,afterInsideRef:h,portalNode:r,setFocusManagerState:s}),[i,r])},g&&r&&E.createElement(st,{"data-type":"outside",ref:a,onFocus:u=>{if($e(u,r)){var b;(b=x.current)==null||b.focus()}else{const w=ko()||(l==null?void 0:l.refs.domReference.current);w==null||w.focus()}}}),g&&r&&E.createElement("span",{"aria-owns":r.id,style:Jt}),r&&Gn.createPortal(t,r),g&&r&&E.createElement(st,{"data-type":"outside",ref:c,onFocus:u=>{if($e(u,r)){var b;(b=h.current)==null||b.focus()}else{const w=Oo()||(l==null?void 0:l.refs.domReference.current);w==null||w.focus(),l!=null&&l.closeOnFocusOut&&(l==null||l.onOpenChange(!1,u.nativeEvent))}}}))}const No=()=>E.useContext(jo),En=20;let ve=[];function vt(e){ve=ve.filter(t=>t.isConnected),e&&me(e)!=="body"&&(ve.push(e),ve.length>En&&(ve=ve.slice(-En)))}function An(){return ve.slice().reverse().find(e=>e.isConnected)}const ql=E.forwardRef(function(t,n){return E.createElement("button",ke({},t,{type:"button",ref:n,tabIndex:-1,style:Jt}))});function Lo(e){const{context:t,children:n,disabled:o=!1,order:i=["content"],guards:r=!0,initialFocus:l=0,returnFocus:s=!0,modal:a=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:x=!0}=e,{open:h,refs:g,nodeId:u,onOpenChange:b,events:w,dataRef:m,elements:{domReference:y,floating:C}}=t,P=typeof l=="number"&&l<0,S=Ar(y)&&P,R=Nl()?r:!0,I=xt(i),V=xt(l),D=xt(s),F=Xt(),A=No(),N=E.useRef(null),B=E.useRef(null),W=E.useRef(!1),H=E.useRef(!1),j=A!=null,$=E.useCallback(function(z){return z===void 0&&(z=C),z?Qt(z,Gt()):[]},[C]),O=E.useCallback(z=>{const q=$(z);return I.current.map(K=>y&&K==="reference"?y:C&&K==="floating"?C:q).filter(Boolean).flat()},[y,C,I,$]);E.useEffect(()=>{if(o||!a)return;function z(K){if(K.key==="Tab"){ne(C,Re(he(C)))&&$().length===0&&!S&&gt(K);const U=O(),Q=Ie(K);I.current[0]==="reference"&&Q===y&&(gt(K),K.shiftKey?Ce(U[U.length-1]):Ce(U[1])),I.current[1]==="floating"&&Q===C&&K.shiftKey&&(gt(K),Ce(U[0]))}}const q=he(C);return q.addEventListener("keydown",z),()=>{q.removeEventListener("keydown",z)}},[o,y,C,a,I,S,$,O]),E.useEffect(()=>{if(o||!x)return;function z(){H.current=!0,setTimeout(()=>{H.current=!1})}function q(K){const U=K.relatedTarget;queueMicrotask(()=>{const Q=!(ne(y,U)||ne(C,U)||ne(U,C)||ne(A==null?void 0:A.portalNode,U)||U!=null&&U.hasAttribute(qe("focus-guard"))||F&&(Be(F.nodesRef.current,u).find(Y=>{var Z,ce;return ne((Z=Y.context)==null?void 0:Z.elements.floating,U)||ne((ce=Y.context)==null?void 0:ce.elements.domReference,U)})||Fl(F.nodesRef.current,u).find(Y=>{var Z,ce;return((Z=Y.context)==null?void 0:Z.elements.floating)===U||((ce=Y.context)==null?void 0:ce.elements.domReference)===U})));U&&Q&&!H.current&&U!==An()&&(W.current=!0,b(!1,K))})}if(C&&te(y))return y.addEventListener("focusout",q),y.addEventListener("pointerdown",z),!a&&C.addEventListener("focusout",q),()=>{y.removeEventListener("focusout",q),y.removeEventListener("pointerdown",z),!a&&C.removeEventListener("focusout",q)}},[o,y,C,a,u,F,A,b,x]),E.useEffect(()=>{var z;if(o)return;const q=Array.from((A==null||(z=A.portalNode)==null?void 0:z.querySelectorAll("["+qe("portal")+"]"))||[]);if(C){const K=[C,...q,N.current,B.current,I.current.includes("reference")||S?y:null].filter(Q=>Q!=null),U=a||S?wn(K,R,!R):wn(K);return()=>{U()}}},[o,y,C,a,I,A,S,R]),le(()=>{if(o||!C)return;const z=he(C),q=Re(z);queueMicrotask(()=>{const K=O(C),U=V.current,Q=(typeof U=="number"?K[U]:U.current)||C,Y=ne(C,q);!P&&!Y&&h&&Ce(Q,{preventScroll:Q===C})})},[o,h,C,P,O,V]),le(()=>{if(o||!C)return;let z=!1;const q=he(C),K=Re(q),U=m.current;vt(K);function Q(Y){let{reason:Z,event:ce,nested:Me}=Y;Z==="escape-key"&&g.domReference.current&&vt(g.domReference.current),Z==="hover"&&ce.type==="mouseleave"&&(W.current=!0),Z==="outside-press"&&(Me?(W.current=!1,z=!0):W.current=!(xr(ce)||Cr(ce)))}return w.on("openchange",Q),()=>{w.off("openchange",Q);const Y=Re(q),Z=ne(C,Y)||F&&Be(F.nodesRef.current,u).some(Ii=>{var on;return ne((on=Ii.context)==null?void 0:on.elements.floating,Y)});(Z||U.openEvent&&["click","mousedown"].includes(U.openEvent.type))&&g.domReference.current&&vt(g.domReference.current);const Me=An();D.current&&!W.current&&te(Me)&&(!(Me!==Y&&Y!==q.body)||Z)&&Ce(Me,{cancelPrevious:!1,preventScroll:z})}},[o,C,D,m,g,w,F,u]),le(()=>{if(!(o||!A))return A.setFocusManagerState({modal:a,closeOnFocusOut:x,open:h,onOpenChange:b,refs:g}),()=>{A.setFocusManagerState(null)}},[o,A,a,h,b,g,x]),le(()=>{if(o||!C||typeof MutationObserver!="function"||P)return;const z=()=>{const K=C.getAttribute("tabindex");I.current.includes("floating")||Re(he(C))!==g.domReference.current&&$().length===0?K!=="0"&&C.setAttribute("tabindex","0"):K!=="-1"&&C.setAttribute("tabindex","-1")};z();const q=new MutationObserver(z);return q.observe(C,{childList:!0,subtree:!0,attributes:!0}),()=>{q.disconnect()}},[o,C,g,I,$,P]);function L(z){return o||!c||!a?null:E.createElement(ql,{ref:z==="start"?N:B,onClick:q=>b(!1,q.nativeEvent)},typeof c=="string"?c:"Dismiss")}const ee=!o&&R&&(j||a);return E.createElement(E.Fragment,null,ee&&E.createElement(st,{"data-type":"inside",ref:A==null?void 0:A.beforeInsideRef,onFocus:z=>{if(a){const K=O();Ce(i[0]==="reference"?K[0]:K[K.length-1])}else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(W.current=!1,$e(z,A.portalNode)){const K=Oo()||y;K==null||K.focus()}else{var q;(q=A.beforeOutsideRef.current)==null||q.focus()}}}),!S&&L("start"),n,L("end"),ee&&E.createElement(st,{"data-type":"inside",ref:A==null?void 0:A.afterInsideRef,onFocus:z=>{if(a)Ce(O()[0]);else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(x&&(W.current=!0),$e(z,A.portalNode)){const K=ko()||y;K==null||K.focus()}else{var q;(q=A.afterOutsideRef.current)==null||q.focus()}}}))}const wt=new Set,Mo=E.forwardRef(function(t,n){let{lockScroll:o=!1,...i}=t;const r=ht();return le(()=>{if(!o)return;wt.add(r);const l=/iP(hone|ad|od)|iOS/.test(fo()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",x=window.innerWidth-document.documentElement.clientWidth,h=s.left?parseFloat(s.left):window.pageXOffset,g=s.top?parseFloat(s.top):window.pageYOffset;if(s.overflow="hidden",x&&(s[c]=x+"px"),l){var u,b;const w=((u=window.visualViewport)==null?void 0:u.offsetLeft)||0,m=((b=window.visualViewport)==null?void 0:b.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(g-Math.floor(m))+"px",left:-(h-Math.floor(w))+"px",right:"0"})}return()=>{wt.delete(r),wt.size===0&&(Object.assign(s,{overflow:"",[c]:""}),l&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(h,g)))}},[r,o]),E.createElement("div",ke({ref:n},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))});function Rn(e){return te(e.target)&&e.target.tagName==="BUTTON"}function In(e){return ho(e)}function Bo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:i,elements:{domReference:r}}=e,{enabled:l=!0,event:s="click",toggle:a=!0,ignoreMouse:c=!1,keyboardHandlers:x=!0}=t,h=E.useRef(),g=E.useRef(!1);return E.useMemo(()=>l?{reference:{onPointerDown(u){h.current=u.pointerType},onMouseDown(u){u.button===0&&(dn(h.current,!0)&&c||s!=="click"&&(n&&a&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?o(!1,u.nativeEvent,"click"):(u.preventDefault(),o(!0,u.nativeEvent,"click"))))},onClick(u){if(s==="mousedown"&&h.current){h.current=void 0;return}dn(h.current,!0)&&c||(n&&a&&(!i.current.openEvent||i.current.openEvent.type==="click")?o(!1,u.nativeEvent,"click"):o(!0,u.nativeEvent,"click"))},onKeyDown(u){h.current=void 0,!(u.defaultPrevented||!x||Rn(u))&&(u.key===" "&&!In(r)&&(u.preventDefault(),g.current=!0),u.key==="Enter"&&o(!(n&&a),u.nativeEvent,"click"))},onKeyUp(u){u.defaultPrevented||!x||Rn(u)||In(r)||u.key===" "&&g.current&&(g.current=!1,o(!(n&&a),u.nativeEvent,"click"))}}}:{},[l,i,s,c,x,r,a,n,o])}const zl={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Hl={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Pn=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function $o(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,nodeId:i,elements:{reference:r,domReference:l,floating:s},dataRef:a}=e,{enabled:c=!0,escapeKey:x=!0,outsidePress:h=!0,outsidePressEvent:g="pointerdown",referencePress:u=!1,referencePressEvent:b="pointerdown",ancestorScroll:w=!1,bubbles:m,capture:y}=t,C=Xt(),P=Pe(typeof h=="function"?h:()=>!1),S=typeof h=="function"?P:h,R=E.useRef(!1),I=E.useRef(!1),{escapeKey:V,outsidePress:D}=Pn(m),{escapeKey:F,outsidePress:A}=Pn(y),N=Pe(j=>{if(!n||!c||!x||j.key!=="Escape")return;const $=C?Be(C.nodesRef.current,i):[];if(!V&&(j.stopPropagation(),$.length>0)){let O=!0;if($.forEach(L=>{var ee;if((ee=L.context)!=null&&ee.open&&!L.context.dataRef.current.__escapeKeyBubbles){O=!1;return}}),!O)return}o(!1,Sr(j)?j.nativeEvent:j,"escape-key")}),B=Pe(j=>{var $;const O=()=>{var L;N(j),(L=Ie(j))==null||L.removeEventListener("keydown",O)};($=Ie(j))==null||$.addEventListener("keydown",O)}),W=Pe(j=>{const $=R.current;R.current=!1;const O=I.current;if(I.current=!1,g==="click"&&O||$||typeof S=="function"&&!S(j))return;const L=Ie(j),ee="["+qe("inert")+"]",z=he(s).querySelectorAll(ee);let q=X(L)?L:null;for(;q&&!Ve(q);){const Q=Se(q);if(Ve(Q)||!X(Q))break;q=Q}if(z.length&&X(L)&&!Tr(L)&&!ne(L,s)&&Array.from(z).every(Q=>!ne(q,Q)))return;if(te(L)&&s){const Q=L.clientWidth>0&&L.scrollWidth>L.clientWidth,Y=L.clientHeight>0&&L.scrollHeight>L.clientHeight;let Z=Y&&j.offsetX>L.clientWidth;if(Y&&ie(L).direction==="rtl"&&(Z=j.offsetX<=L.offsetWidth-L.clientWidth),Z||Q&&j.offsetY>L.clientHeight)return}const K=C&&Be(C.nodesRef.current,i).some(Q=>{var Y;return yt(j,(Y=Q.context)==null?void 0:Y.elements.floating)});if(yt(j,s)||yt(j,l)||K)return;const U=C?Be(C.nodesRef.current,i):[];if(U.length>0){let Q=!0;if(U.forEach(Y=>{var Z;if((Z=Y.context)!=null&&Z.open&&!Y.context.dataRef.current.__outsidePressBubbles){Q=!1;return}}),!Q)return}o(!1,j,"outside-press")}),H=Pe(j=>{var $;const O=()=>{var L;W(j),(L=Ie(j))==null||L.removeEventListener(g,O)};($=Ie(j))==null||$.addEventListener(g,O)});return E.useEffect(()=>{if(!n||!c)return;a.current.__escapeKeyBubbles=V,a.current.__outsidePressBubbles=D;function j(L){o(!1,L,"ancestor-scroll")}const $=he(s);x&&$.addEventListener("keydown",F?B:N,F),S&&$.addEventListener(g,A?H:W,A);let O=[];return w&&(X(l)&&(O=be(l)),X(s)&&(O=O.concat(be(s))),!X(r)&&r&&r.contextElement&&(O=O.concat(be(r.contextElement)))),O=O.filter(L=>{var ee;return L!==((ee=$.defaultView)==null?void 0:ee.visualViewport)}),O.forEach(L=>{L.addEventListener("scroll",j,{passive:!0})}),()=>{x&&$.removeEventListener("keydown",F?B:N,F),S&&$.removeEventListener(g,A?H:W,A),O.forEach(L=>{L.removeEventListener("scroll",j)})}},[a,s,l,r,x,S,g,n,o,w,c,V,D,N,F,B,W,A,H]),E.useEffect(()=>{R.current=!1},[S,g]),E.useMemo(()=>c?{reference:{onKeyDown:N,[zl[b]]:j=>{u&&o(!1,j.nativeEvent,"reference-press")}},floating:{onKeyDown:N,onMouseDown(){I.current=!0},onMouseUp(){I.current=!0},[Hl[g]]:()=>{R.current=!0}}}:{},[c,u,g,b,o,N])}let Ft;process.env.NODE_ENV!=="production"&&(Ft=new Set);function Ko(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:o,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var r;const D="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((r=e.elements)!=null&&r.reference&&!X(e.elements.reference)){var l;if(!((l=Ft)!=null&&l.has(D))){var s;(s=Ft)==null||s.add(D),console.error(D)}}}const[a,c]=E.useState(null),x=((t=e.elements)==null?void 0:t.reference)||a,h=ll(e),g=Xt(),u=jl()!=null,b=Pe((D,F,A)=>{D&&(m.current.openEvent=F),y.emit("openchange",{open:D,event:F,reason:A,nested:u}),o==null||o(D,F,A)}),w=E.useRef(null),m=E.useRef({}),y=E.useState(()=>Vl())[0],C=ht(),P=E.useCallback(D=>{const F=X(D)?{getBoundingClientRect:()=>D.getBoundingClientRect(),contextElement:D}:D;h.refs.setReference(F)},[h.refs]),S=E.useCallback(D=>{(X(D)||D===null)&&(w.current=D,c(D)),(X(h.refs.reference.current)||h.refs.reference.current===null||D!==null&&!X(D))&&h.refs.setReference(D)},[h.refs]),R=E.useMemo(()=>({...h.refs,setReference:S,setPositionReference:P,domReference:w}),[h.refs,S,P]),I=E.useMemo(()=>({...h.elements,domReference:x}),[h.elements,x]),V=E.useMemo(()=>({...h,refs:R,elements:I,dataRef:m,nodeId:i,floatingId:C,events:y,open:n,onOpenChange:b}),[h,i,C,y,n,b,R,I]);return le(()=>{const D=g==null?void 0:g.nodesRef.current.find(F=>F.id===i);D&&(D.context=V)}),E.useMemo(()=>({...h,context:V,refs:R,elements:I}),[h,R,I,V])}const Dn="active",Vn="selected";function St(e,t,n){const o=new Map,i=n==="item";let r=e;if(i&&e){const{[Dn]:l,[Vn]:s,...a}=e;r=a}return{...n==="floating"&&{tabIndex:-1},...r,...t.map(l=>{const s=l?l[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((l,s)=>(s&&Object.entries(s).forEach(a=>{let[c,x]=a;if(!(i&&[Dn,Vn].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof x=="function"){var h;(h=o.get(c))==null||h.push(x),l[c]=function(){for(var g,u=arguments.length,b=new Array(u),w=0;w<u;w++)b[w]=arguments[w];return(g=o.get(c))==null?void 0:g.map(m=>m(...b)).find(m=>m!==void 0)}}}else l[c]=x}),l),{})}}function Wo(e){e===void 0&&(e=[]);const t=e,n=E.useCallback(r=>St(r,e,"reference"),t),o=E.useCallback(r=>St(r,e,"floating"),t),i=E.useCallback(r=>St(r,e,"item"),e.map(r=>r==null?void 0:r.item));return E.useMemo(()=>({getReferenceProps:n,getFloatingProps:o,getItemProps:i}),[n,o,i])}function Ul(e={}){const{initialOpen:t=!1,open:n,onOpenChange:o}=e,[i,r]=E.useState(t),l=n??i,s=o??r,a=Ko({open:l,onOpenChange:s}),c=a.context,x=Bo(c,{enabled:n==null}),h=$o(c,{outsidePressEvent:"mousedown"}),g=Wo([x,h]);return E.useMemo(()=>({open:l,setOpen:s,...g,...a}),[l,s,g,a])}const qo=E.createContext(null),zo=()=>{const e=E.useContext(qo);if(e==null)throw new Error("Dialog components must be wrapped in <Dialog />");return e};function _l({children:e,...t}){const n=Ul(t);return d.jsx(qo.Provider,{value:n,children:e})}const Ho=k.css`
188
+ */var QS=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ef=QS.join(","),av=typeof Element>"u",xi=av?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Bu=!av&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},zu=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},XS=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},ZS=function(t,n,r){if(zu(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ef));return n&&xi.call(t,Ef)&&o.unshift(t),o=o.filter(r),o},YS=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!zu(a,!1))if(a.tagName==="SLOT"){var u=a.assignedElements(),s=u.length?u:a.children,c=e(s,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var f=xi.call(a,Ef);f&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var l=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),d=!zu(l,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(l&&d){var p=e(l===!0?a.children:l.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},uv=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},sv=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||XS(t))&&!uv(t)?0:t.tabIndex},eT=function(t,n){var r=sv(t);return r<0&&n&&!uv(t)?0:r},tT=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},cv=function(t){return t.tagName==="INPUT"},nT=function(t){return cv(t)&&t.type==="hidden"},rT=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},oT=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},iT=function(t){if(!t.name)return!0;var n=t.form||Bu(t),r=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=oT(o,t.form);return!i||i===t},aT=function(t){return cv(t)&&t.type==="radio"},uT=function(t){return aT(t)&&!iT(t)},sT=function(t){var n,r=t&&Bu(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,u,s;for(i=!!((a=o)!==null&&a!==void 0&&(u=a.ownerDocument)!==null&&u!==void 0&&u.contains(o)||t!=null&&(s=t.ownerDocument)!==null&&s!==void 0&&s.contains(t));!i&&o;){var c,f,l;r=Bu(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((f=o)!==null&&f!==void 0&&(l=f.ownerDocument)!==null&&l!==void 0&&l.contains(o))}}return i},Rp=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},cT=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=xi.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(xi.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var u=t;t;){var s=t.parentElement,c=Bu(t);if(s&&!s.shadowRoot&&o(s)===!0)return Rp(t);t.assignedSlot?t=t.assignedSlot:!s&&c!==t.ownerDocument?t=c.host:t=s}t=u}if(sT(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Rp(t);return!1},lT=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return xi.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},fT=function(t,n){return!(n.disabled||zu(n)||nT(n)||cT(n,t)||rT(n)||lT(n))},Vp=function(t,n){return!(uT(n)||sv(n)<0||!fT(t,n))},dT=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},pT=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,u=a?o.scopeParent:o,s=eT(u,a),c=a?e(o.candidates):u;s===0?a?n.push.apply(n,c):n.push(u):r.push({documentOrder:i,tabIndex:s,item:o,isScope:a,content:c})}),r.sort(tT).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},cd=function(t,n){n=n||{};var r;return n.getShadowRoot?r=YS([t],n.includeContainer,{filter:Vp.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:dT}):r=ZS(t,n.includeContainer,Vp.bind(null,n)),pT(r)};function ld(e){return P.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const hT=P["useInsertionEffect".toString()],yT=hT||(e=>e());function pr(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return yT(()=>{t.current=e}),P.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}let Up=0;function Sn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Up);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Up=requestAnimationFrame(i)}var nt=typeof document<"u"?I.useLayoutEffect:I.useEffect;function xr(){return xr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xr.apply(this,arguments)}let Nl=!1,mT=0;const Dp=()=>"floating-ui-"+mT++;function gT(){const[e,t]=P.useState(()=>Nl?Dp():void 0);return nt(()=>{e==null&&t(Dp())},[]),P.useEffect(()=>{Nl||(Nl=!0)},[]),e}const bT=P["useId".toString()],bs=bT||gT,vT=P.forwardRef(function(t,n){let{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:u=7,tipRadius:s=0,strokeWidth:c=0,staticOffset:f,stroke:l,d,style:{transform:p,...y}={},...h}=t;process.env.NODE_ENV!=="production"&&(n||console.warn("Floating UI: The `ref` prop is required for the `FloatingArrow`","component."));const m=bs();if(!o)return null;c*=2;const g=c/2,w=a/2*(s/-8+1),N=u/2*s/4,[T,A]=r.split("-"),O=ov.isRTL(o),U=!!d,E=T==="top"||T==="bottom",W=f&&A==="end"?"bottom":"top";let S=f&&A==="end"?"right":"left";f&&O&&(S=A==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?f||i.x:"",z=(i==null?void 0:i.y)!=null?f||i.y:"",R=d||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(u-N))+(" Q"+a/2+","+u+" "+w+","+(u-N))+" Z",k={top:U?"rotate(180deg)":"",left:U?"rotate(90deg)":"rotate(-90deg)",bottom:U?"":"rotate(180deg)",right:U?"rotate(-90deg)":"rotate(90deg)"}[T];return P.createElement("svg",xr({},h,{"aria-hidden":!0,ref:n,width:U?a:a+c,height:a,viewBox:"0 0 "+a+" "+(u>a?u:a),style:{position:"absolute",pointerEvents:"none",[S]:$,[W]:z,[T]:E||U?"100%":"calc(100% - "+c/2+"px)",transform:""+k+(p??""),...y}}),c>0&&P.createElement("path",{clipPath:"url(#"+m+")",fill:"none",stroke:l,strokeWidth:c+(d?0:1),d:R}),P.createElement("path",{stroke:c&&!d?h.fill:"none",d:R}),P.createElement("clipPath",{id:m},P.createElement("rect",{x:-g,y:g*(U?-1:1),width:a+c,height:a})))});function xT(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const _T=P.createContext(null),wT=P.createContext(null),CT=()=>{var e;return((e=P.useContext(_T))==null?void 0:e.id)||null},fd=()=>P.useContext(wT);function _i(e){return"data-floating-ui-"+e}function jl(e){const t=I.useRef(e);return nt(()=>{t.current=e}),t}function ST(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function pi(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var u;return o.parentId===a.id&&((u=o.context)==null?void 0:u.open)})}),n=n.concat(r);return n}let ir=new WeakMap,lu=new WeakSet,fu={},$l=0;const TT=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,lv=e=>e&&(e.host||lv(e.parentNode)),AT=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=lv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function IT(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=AT(t,e),u=new Set,s=new Set(a),c=[];fu[o]||(fu[o]=new WeakMap);const f=fu[o];a.forEach(l),d(t),u.clear();function l(p){!p||u.has(p)||(u.add(p),p.parentNode&&l(p.parentNode))}function d(p){!p||s.has(p)||Array.prototype.forEach.call(p.children,y=>{if(u.has(y))d(y);else{const h=i?y.getAttribute(i):null,m=h!==null&&h!=="false",g=(ir.get(y)||0)+1,w=(f.get(y)||0)+1;ir.set(y,g),f.set(y,w),c.push(y),g===1&&m&&lu.add(y),w===1&&y.setAttribute(o,""),!m&&i&&y.setAttribute(i,"true")}})}return $l++,()=>{c.forEach(p=>{const y=(ir.get(p)||0)-1,h=(f.get(p)||0)-1;ir.set(p,y),f.set(p,h),y||(!lu.has(p)&&i&&p.removeAttribute(i),lu.delete(p)),h||p.removeAttribute(o)}),$l--,$l||(ir=new WeakMap,ir=new WeakMap,lu=new WeakSet,fu={})}}function qp(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=qt(e[0]).body;return IT(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const dd=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function fv(e,t){const n=cd(e,dd());t==="prev"&&n.reverse();const r=n.indexOf(fr(qt(e)));return n.slice(r+1)[0]}function dv(){return fv(document.body,"next")}function pv(){return fv(document.body,"prev")}function hi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!We(n,r)}function OT(e){cd(e,dd()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function PT(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const pd={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let NT;function Lp(e){e.key==="Tab"&&(e.target,clearTimeout(NT))}const Wu=P.forwardRef(function(t,n){const[r,o]=P.useState();nt(()=>(lS()&&o("button"),document.addEventListener("keydown",Lp),()=>{document.removeEventListener("keydown",Lp)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[_i("focus-guard")]:"",style:pd};return P.createElement("span",xr({},t,i))}),hv=P.createContext(null),Bp=_i("portal");function jT(e){let{id:t,root:n}=e===void 0?{}:e;const[r,o]=P.useState(null),i=bs(),a=mv(),u=P.useRef(null);return nt(()=>()=>{r==null||r.remove(),queueMicrotask(()=>{u.current=null})},[r]),nt(()=>{if(u.current)return;const s=t?document.getElementById(t):null;if(!s)return;const c=document.createElement("div");c.id=i,c.setAttribute(Bp,""),s.appendChild(c),u.current=c,o(c)},[t,i]),nt(()=>{if(u.current)return;let s=n||(a==null?void 0:a.portalNode);s&&!ve(s)&&(s=s.current),s=s||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,s.appendChild(c));const f=document.createElement("div");f.id=i,f.setAttribute(Bp,""),s=c||s,s.appendChild(f),u.current=f,o(f)},[t,n,i,a]),r}function yv(e){let{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e;const i=jT({id:n,root:r}),[a,u]=P.useState(null),s=P.useRef(null),c=P.useRef(null),f=P.useRef(null),l=P.useRef(null),d=!!a&&!a.modal&&a.open&&o&&!!(r||i);return P.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function p(y){i&&hi(y)&&(y.type==="focusin"?PT:OT)(i)}return i.addEventListener("focusin",p,!0),i.addEventListener("focusout",p,!0),()=>{i.removeEventListener("focusin",p,!0),i.removeEventListener("focusout",p,!0)}},[i,o,a==null?void 0:a.modal]),P.createElement(hv.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:s,afterOutsideRef:c,beforeInsideRef:f,afterInsideRef:l,portalNode:i,setFocusManagerState:u}),[o,i])},d&&i&&P.createElement(Wu,{"data-type":"outside",ref:s,onFocus:p=>{if(hi(p,i)){var y;(y=f.current)==null||y.focus()}else{const h=pv()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus()}}}),d&&i&&P.createElement("span",{"aria-owns":i.id,style:pd}),i&&Ab.createPortal(t,i),d&&i&&P.createElement(Wu,{"data-type":"outside",ref:c,onFocus:p=>{if(hi(p,i)){var y;(y=l.current)==null||y.focus()}else{const h=dv()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,p.nativeEvent))}}}))}const mv=()=>P.useContext(hv),zp=20;let $n=[];function El(e){$n=$n.filter(t=>t.isConnected),e&&Wt(e)!=="body"&&($n.push(e),$n.length>zp&&($n=$n.slice(-zp)))}function Wp(){return $n.slice().reverse().find(e=>e.isConnected)}const $T=P.forwardRef(function(t,n){return P.createElement("button",xr({},t,{type:"button",ref:n,tabIndex:-1,style:pd}))});function gv(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:u=!0,modal:s=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:f=!0}=e,{open:l,refs:d,nodeId:p,onOpenChange:y,events:h,dataRef:m,elements:{domReference:g,floating:w}}=t,N=typeof a=="number"&&a<0,T=yS(g)&&N,A=TT()?i:!0,O=jl(o),U=jl(a),E=jl(u),W=fd(),S=mv(),$=P.useRef(null),z=P.useRef(null),R=P.useRef(!1),k=P.useRef(!1),F=S!=null,V=P.useCallback(function(Q){return Q===void 0&&(Q=w),Q?cd(Q,dd()):[]},[w]),j=P.useCallback(Q=>{const J=V(Q);return O.current.map(Z=>g&&Z==="reference"?g:w&&Z==="floating"?w:J).filter(Boolean).flat()},[g,w,O,V]);P.useEffect(()=>{if(r||!s)return;function Q(Z){if(Z.key==="Tab"){We(w,fr(qt(w)))&&V().length===0&&!T&&Pl(Z);const ee=j(),ue=dr(Z);O.current[0]==="reference"&&ue===g&&(Pl(Z),Z.shiftKey?Sn(ee[ee.length-1]):Sn(ee[1])),O.current[1]==="floating"&&ue===w&&Z.shiftKey&&(Pl(Z),Sn(ee[0]))}}const J=qt(w);return J.addEventListener("keydown",Q),()=>{J.removeEventListener("keydown",Q)}},[r,g,w,s,O,T,V,j]),P.useEffect(()=>{if(r||!f)return;function Q(){k.current=!0,setTimeout(()=>{k.current=!1})}function J(Z){const ee=Z.relatedTarget;queueMicrotask(()=>{const ue=!(We(g,ee)||We(w,ee)||We(ee,w)||We(S==null?void 0:S.portalNode,ee)||ee!=null&&ee.hasAttribute(_i("focus-guard"))||W&&(pi(W.nodesRef.current,p).find(fe=>{var Ce,Be;return We((Ce=fe.context)==null?void 0:Ce.elements.floating,ee)||We((Be=fe.context)==null?void 0:Be.elements.domReference,ee)})||ST(W.nodesRef.current,p).find(fe=>{var Ce,Be;return((Ce=fe.context)==null?void 0:Ce.elements.floating)===ee||((Be=fe.context)==null?void 0:Be.elements.domReference)===ee})));ee&&ue&&!k.current&&ee!==Wp()&&(R.current=!0,y(!1,Z))})}if(w&&Ve(g))return g.addEventListener("focusout",J),g.addEventListener("pointerdown",Q),!s&&w.addEventListener("focusout",J),()=>{g.removeEventListener("focusout",J),g.removeEventListener("pointerdown",Q),!s&&w.removeEventListener("focusout",J)}},[r,g,w,s,p,W,S,y,f]),P.useEffect(()=>{var Q;if(r)return;const J=Array.from((S==null||(Q=S.portalNode)==null?void 0:Q.querySelectorAll("["+_i("portal")+"]"))||[]);if(w){const Z=[w,...J,$.current,z.current,O.current.includes("reference")||T?g:null].filter(ue=>ue!=null),ee=s||T?qp(Z,A,!A):qp(Z);return()=>{ee()}}},[r,g,w,s,O,S,T,A]),nt(()=>{if(r||!w)return;const Q=qt(w),J=fr(Q);queueMicrotask(()=>{const Z=j(w),ee=U.current,ue=(typeof ee=="number"?Z[ee]:ee.current)||w,fe=We(w,J);!N&&!fe&&l&&Sn(ue,{preventScroll:ue===w})})},[r,l,w,N,j,U]),nt(()=>{if(r||!w)return;let Q=!1;const J=qt(w),Z=fr(J),ee=m.current;El(Z);function ue(fe){let{reason:Ce,event:Be,nested:Cn}=fe;Ce==="escape-key"&&d.domReference.current&&El(d.domReference.current),Ce==="hover"&&Be.type==="mouseleave"&&(R.current=!0),Ce==="outside-press"&&(Cn?(R.current=!1,Q=!0):R.current=!(sS(Be)||cS(Be)))}return h.on("openchange",ue),()=>{h.off("openchange",ue);const fe=fr(J),Ce=We(w,fe)||W&&pi(W.nodesRef.current,p).some(wl=>{var su;return We((su=wl.context)==null?void 0:su.elements.floating,fe)});(Ce||ee.openEvent&&["click","mousedown"].includes(ee.openEvent.type))&&d.domReference.current&&El(d.domReference.current);const Cn=Wp();E.current&&!R.current&&Ve(Cn)&&(!(Cn!==fe&&fe!==J.body)||Ce)&&Sn(Cn,{cancelPrevious:!1,preventScroll:Q})}},[r,w,E,m,d,h,W,p]),nt(()=>{if(!(r||!S))return S.setFocusManagerState({modal:s,closeOnFocusOut:f,open:l,onOpenChange:y,refs:d}),()=>{S.setFocusManagerState(null)}},[r,S,s,l,y,d,f]),nt(()=>{if(r||!w||typeof MutationObserver!="function"||N)return;const Q=()=>{const Z=w.getAttribute("tabindex");O.current.includes("floating")||fr(qt(w))!==d.domReference.current&&V().length===0?Z!=="0"&&w.setAttribute("tabindex","0"):Z!=="-1"&&w.setAttribute("tabindex","-1")};Q();const J=new MutationObserver(Q);return J.observe(w,{childList:!0,subtree:!0,attributes:!0}),()=>{J.disconnect()}},[r,w,d,O,V,N]);function L(Q){return r||!c||!s?null:P.createElement($T,{ref:Q==="start"?$:z,onClick:J=>y(!1,J.nativeEvent)},typeof c=="string"?c:"Dismiss")}const ae=!r&&A&&(F||s);return P.createElement(P.Fragment,null,ae&&P.createElement(Wu,{"data-type":"inside",ref:S==null?void 0:S.beforeInsideRef,onFocus:Q=>{if(s){const Z=j();Sn(o[0]==="reference"?Z[0]:Z[Z.length-1])}else if(S!=null&&S.preserveTabOrder&&S.portalNode)if(R.current=!1,hi(Q,S.portalNode)){const Z=dv()||g;Z==null||Z.focus()}else{var J;(J=S.beforeOutsideRef.current)==null||J.focus()}}}),!T&&L("start"),n,L("end"),ae&&P.createElement(Wu,{"data-type":"inside",ref:S==null?void 0:S.afterInsideRef,onFocus:Q=>{if(s)Sn(j()[0]);else if(S!=null&&S.preserveTabOrder&&S.portalNode)if(f&&(R.current=!0),hi(Q,S.portalNode)){const Z=pv()||g;Z==null||Z.focus()}else{var J;(J=S.afterOutsideRef.current)==null||J.focus()}}}))}const Ml=new Set,bv=P.forwardRef(function(t,n){let{lockScroll:r=!1,...o}=t;const i=bs();return nt(()=>{if(!r)return;Ml.add(i);const a=/iP(hone|ad|od)|iOS/.test(Gb()),u=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",f=window.innerWidth-document.documentElement.clientWidth,l=u.left?parseFloat(u.left):window.pageXOffset,d=u.top?parseFloat(u.top):window.pageYOffset;if(u.overflow="hidden",f&&(u[c]=f+"px"),a){var p,y;const h=((p=window.visualViewport)==null?void 0:p.offsetLeft)||0,m=((y=window.visualViewport)==null?void 0:y.offsetTop)||0;Object.assign(u,{position:"fixed",top:-(d-Math.floor(m))+"px",left:-(l-Math.floor(h))+"px",right:"0"})}return()=>{Ml.delete(i),Ml.size===0&&(Object.assign(u,{overflow:"",[c]:""}),a&&(Object.assign(u,{position:"",top:"",left:"",right:""}),window.scrollTo(l,d)))}},[i,r]),P.createElement("div",xr({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Gp(e){return Ve(e.target)&&e.target.tagName==="BUTTON"}function Kp(e){return Hb(e)}function vv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:u="click",toggle:s=!0,ignoreMouse:c=!1,keyboardHandlers:f=!0}=t,l=P.useRef(),d=P.useRef(!1);return P.useMemo(()=>a?{reference:{onPointerDown(p){l.current=p.pointerType},onMouseDown(p){p.button===0&&(Np(l.current,!0)&&c||u!=="click"&&(n&&s&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){if(u==="mousedown"&&l.current){l.current=void 0;return}Np(l.current,!0)&&c||(n&&s&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){l.current=void 0,!(p.defaultPrevented||!f||Gp(p))&&(p.key===" "&&!Kp(i)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&s),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!f||Gp(p)||Kp(i)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&s),p.nativeEvent,"click"))}}}:{},[a,o,u,c,f,i,s,n,r])}const ET={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},MT={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Hp=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function xv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,nodeId:o,elements:{reference:i,domReference:a,floating:u},dataRef:s}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:l=!0,outsidePressEvent:d="pointerdown",referencePress:p=!1,referencePressEvent:y="pointerdown",ancestorScroll:h=!1,bubbles:m,capture:g}=t,w=fd(),N=pr(typeof l=="function"?l:()=>!1),T=typeof l=="function"?N:l,A=P.useRef(!1),O=P.useRef(!1),{escapeKey:U,outsidePress:E}=Hp(m),{escapeKey:W,outsidePress:S}=Hp(g),$=pr(F=>{if(!n||!c||!f||F.key!=="Escape")return;const V=w?pi(w.nodesRef.current,o):[];if(!U&&(F.stopPropagation(),V.length>0)){let j=!0;if(V.forEach(L=>{var ae;if((ae=L.context)!=null&&ae.open&&!L.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}r(!1,dS(F)?F.nativeEvent:F,"escape-key")}),z=pr(F=>{var V;const j=()=>{var L;$(F),(L=dr(F))==null||L.removeEventListener("keydown",j)};(V=dr(F))==null||V.addEventListener("keydown",j)}),R=pr(F=>{const V=A.current;A.current=!1;const j=O.current;if(O.current=!1,d==="click"&&j||V||typeof T=="function"&&!T(F))return;const L=dr(F),ae="["+_i("inert")+"]",Q=qt(u).querySelectorAll(ae);let J=ve(L)?L:null;for(;J&&!br(J);){const ue=Fn(J);if(br(ue)||!ve(ue))break;J=ue}if(Q.length&&ve(L)&&!pS(L)&&!We(L,u)&&Array.from(Q).every(ue=>!We(J,ue)))return;if(Ve(L)&&u){const ue=L.clientWidth>0&&L.scrollWidth>L.clientWidth,fe=L.clientHeight>0&&L.scrollHeight>L.clientHeight;let Ce=fe&&F.offsetX>L.clientWidth;if(fe&&Qe(L).direction==="rtl"&&(Ce=F.offsetX<=L.offsetWidth-L.clientWidth),Ce||ue&&F.offsetY>L.clientHeight)return}const Z=w&&pi(w.nodesRef.current,o).some(ue=>{var fe;return Ol(F,(fe=ue.context)==null?void 0:fe.elements.floating)});if(Ol(F,u)||Ol(F,a)||Z)return;const ee=w?pi(w.nodesRef.current,o):[];if(ee.length>0){let ue=!0;if(ee.forEach(fe=>{var Ce;if((Ce=fe.context)!=null&&Ce.open&&!fe.context.dataRef.current.__outsidePressBubbles){ue=!1;return}}),!ue)return}r(!1,F,"outside-press")}),k=pr(F=>{var V;const j=()=>{var L;R(F),(L=dr(F))==null||L.removeEventListener(d,j)};(V=dr(F))==null||V.addEventListener(d,j)});return P.useEffect(()=>{if(!n||!c)return;s.current.__escapeKeyBubbles=U,s.current.__outsidePressBubbles=E;function F(L){r(!1,L,"ancestor-scroll")}const V=qt(u);f&&V.addEventListener("keydown",W?z:$,W),T&&V.addEventListener(d,S?k:R,S);let j=[];return h&&(ve(a)&&(j=ln(a)),ve(u)&&(j=j.concat(ln(u))),!ve(i)&&i&&i.contextElement&&(j=j.concat(ln(i.contextElement)))),j=j.filter(L=>{var ae;return L!==((ae=V.defaultView)==null?void 0:ae.visualViewport)}),j.forEach(L=>{L.addEventListener("scroll",F,{passive:!0})}),()=>{f&&V.removeEventListener("keydown",W?z:$,W),T&&V.removeEventListener(d,S?k:R,S),j.forEach(L=>{L.removeEventListener("scroll",F)})}},[s,u,a,i,f,T,d,n,r,h,c,U,E,$,W,z,R,S,k]),P.useEffect(()=>{A.current=!1},[T,d]),P.useMemo(()=>c?{reference:{onKeyDown:$,[ET[y]]:F=>{p&&r(!1,F.nativeEvent,"reference-press")}},floating:{onKeyDown:$,onMouseDown(){O.current=!0},onMouseUp(){O.current=!0},[MT[d]]:()=>{A.current=!0}}}:{},[c,p,d,y,r,$])}let Mf;process.env.NODE_ENV!=="production"&&(Mf=new Set);function _v(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:o}=e;if(process.env.NODE_ENV!=="production"){var i;const E="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((i=e.elements)!=null&&i.reference&&!ve(e.elements.reference)){var a;if(!((a=Mf)!=null&&a.has(E))){var u;(u=Mf)==null||u.add(E),console.error(E)}}}const[s,c]=P.useState(null),f=((t=e.elements)==null?void 0:t.reference)||s,l=JS(e),d=fd(),p=CT()!=null,y=pr((E,W,S)=>{E&&(m.current.openEvent=W),g.emit("openchange",{open:E,event:W,reason:S,nested:p}),r==null||r(E,W,S)}),h=P.useRef(null),m=P.useRef({}),g=P.useState(()=>xT())[0],w=bs(),N=P.useCallback(E=>{const W=ve(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),contextElement:E}:E;l.refs.setReference(W)},[l.refs]),T=P.useCallback(E=>{(ve(E)||E===null)&&(h.current=E,c(E)),(ve(l.refs.reference.current)||l.refs.reference.current===null||E!==null&&!ve(E))&&l.refs.setReference(E)},[l.refs]),A=P.useMemo(()=>({...l.refs,setReference:T,setPositionReference:N,domReference:h}),[l.refs,T,N]),O=P.useMemo(()=>({...l.elements,domReference:f}),[l.elements,f]),U=P.useMemo(()=>({...l,refs:A,elements:O,dataRef:m,nodeId:o,floatingId:w,events:g,open:n,onOpenChange:y}),[l,o,w,g,n,y,A,O]);return nt(()=>{const E=d==null?void 0:d.nodesRef.current.find(W=>W.id===o);E&&(E.context=U)}),P.useMemo(()=>({...l,context:U,refs:A,elements:O}),[l,A,O,U])}const Jp="active",Qp="selected";function kl(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Jp]:a,[Qp]:u,...s}=e;i=s}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(a=>{const u=a?a[n]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((a,u)=>(u&&Object.entries(u).forEach(s=>{let[c,f]=s;if(!(o&&[Jp,Qp].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof f=="function"){var l;(l=r.get(c))==null||l.push(f),a[c]=function(){for(var d,p=arguments.length,y=new Array(p),h=0;h<p;h++)y[h]=arguments[h];return(d=r.get(c))==null?void 0:d.map(m=>m(...y)).find(m=>m!==void 0)}}}else a[c]=f}),a),{})}}function wv(e){e===void 0&&(e=[]);const t=e,n=P.useCallback(i=>kl(i,e,"reference"),t),r=P.useCallback(i=>kl(i,e,"floating"),t),o=P.useCallback(i=>kl(i,e,"item"),e.map(i=>i==null?void 0:i.item));return P.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}function kT(e={}){const{initialOpen:t=!1,open:n,onOpenChange:r}=e,[o,i]=P.useState(t),a=n??o,u=r??i,s=_v({open:a,onOpenChange:u}),c=s.context,f=vv(c,{enabled:n==null}),l=xv(c,{outsidePressEvent:"mousedown"}),d=wv([f,l]);return P.useMemo(()=>({open:a,setOpen:u,...d,...s}),[a,u,d,s])}const Cv=P.createContext(null),Sv=()=>{const e=P.useContext(Cv);if(e==null)throw new Error("Dialog components must be wrapped in <Dialog />");return e};function FT({children:e,...t}){const n=kT(t);return b.jsx(Cv.Provider,{value:n,children:e})}const Tv=G.css`
173
189
  display: flex;
174
190
  justify-content: center;
175
191
  align-items: center;
176
192
  z-index: 100;
177
193
  padding: var(--space-md-fixed);
178
- `,Ql=k(Mo)`
179
- ${Ho};
180
- `,Yl=T.forwardRef((e,t)=>{const{style:n,children:o,components:i,...r}=e,l=zo(),s=Yt([l.refs.setFloating,t]),a=(i==null?void 0:i.Overlay)??Ql;return d.jsx(Fo,{children:d.jsx(a,{lockScroll:!0,children:d.jsx(Lo,{context:l.context,children:d.jsx("div",{ref:s,...l.getFloatingProps(r),children:o})})})})}),Xl=Yl;function Uo(e){const t=T.useContext(Ke),[n,o]=T.useState(t);return d.jsx(Ke.Provider,{value:n,children:e.children})}const Gl=T.forwardRef((e,t)=>{const{setOpen:n}=zo();return d.jsx("button",{type:"button",...e,ref:t,onClick:o=>{var i;(i=e.onClick)==null||i.call(e,o),n(!1)}})}),Jl=Gl,Zl=k.span`
194
+ `,RT=G(bv)`
195
+ ${Tv};
196
+ `,VT=I.forwardRef((e,t)=>{const{style:n,children:r,components:o,...i}=e,a=Sv(),u=ld([a.refs.setFloating,t]),s=(o==null?void 0:o.Overlay)??RT;return b.jsx(yv,{children:b.jsx(s,{lockScroll:!0,children:b.jsx(gv,{context:a.context,children:b.jsx("div",{ref:u,...a.getFloatingProps(i),children:r})})})})}),UT=VT;function Av(e){const t=I.useContext(vi),[n,r]=I.useState(t);return b.jsx(vi.Provider,{value:n,children:e.children})}const DT=I.forwardRef((e,t)=>{const{setOpen:n}=Sv();return b.jsx("button",{type:"button",...e,ref:t,onClick:r=>{var o;(o=e.onClick)==null||o.call(e,r),n(!1)}})}),qT=DT,LT=G.span`
181
197
  color: var(--color-explain-header-value-color);
182
198
  overflow: hidden;
183
199
  white-space: nowrap;
184
200
  text-overflow: ellipsis;
185
- `;function _o(e){const{explainQuestion:t}=ye(),{configurationSubjectTitle:n,componentDecisionStateIncludedLabel:o,componentDecisionStateExcludedLabel:i,booleanDecisionStateFalseLabel:r,booleanDecisionStateTrueLabel:l,isBlockedSuffix:s,isNotSatisfiedSuffix:a,generalConflictTitle:c}=Kt();if(!t)return d.jsx("div",{...e,children:c});const x=M.match(t).returnType().with({subject:p.ExplainQuestionSubject.configuration},()=>n).with({subject:p.ExplainQuestionSubject.attribute},g=>dt(g.attributeId)??g.attributeId.localId).with({subject:p.ExplainQuestionSubject.choiceValue},g=>ze(g.attributeId)[g.choiceValueId]??g.choiceValueId).with({subject:p.ExplainQuestionSubject.component,state:p.ComponentDecisionState.Included},()=>o).with({subject:p.ExplainQuestionSubject.component,state:p.ComponentDecisionState.Excluded},()=>i).with({subject:p.ExplainQuestionSubject.boolean,state:!0},()=>l).with({subject:p.ExplainQuestionSubject.boolean,state:!1},()=>r).with({subject:p.ExplainQuestionSubject.numeric},g=>g.state.toString()).exhaustive(),h=M.match(t).returnType().with({question:p.ExplainQuestionType.whyIsStateNotPossible},()=>s).with({question:p.ExplainQuestionType.whyIsNotSatisfied},()=>a).exhaustive();return d.jsxs("div",{...e,children:[d.jsx(Zl,{children:x})," ",h]})}const es=k.div`
201
+ `;function Iv(e){const{explainQuestion:t}=Zt(),{configurationSubjectTitle:n,componentDecisionStateIncludedLabel:r,componentDecisionStateExcludedLabel:o,booleanDecisionStateFalseLabel:i,booleanDecisionStateTrueLabel:a,isBlockedSuffix:u,isNotSatisfiedSuffix:s,generalConflictTitle:c}=nd();if(!t)return b.jsx("div",{...e,children:c});const f=H.match(t).returnType().with({subject:_.ExplainQuestionSubject.configuration},()=>n).with({subject:_.ExplainQuestionSubject.attribute},d=>ys(d.attributeId)??d.attributeId.localId).with({subject:_.ExplainQuestionSubject.choiceValue},d=>Ei(d.attributeId)[d.choiceValueId]??d.choiceValueId).with({subject:_.ExplainQuestionSubject.component,state:_.ComponentDecisionState.Included},()=>r).with({subject:_.ExplainQuestionSubject.component,state:_.ComponentDecisionState.Excluded},()=>o).with({subject:_.ExplainQuestionSubject.boolean,state:!0},()=>a).with({subject:_.ExplainQuestionSubject.boolean,state:!1},()=>i).with({subject:_.ExplainQuestionSubject.numeric},d=>d.state.toString()).exhaustive(),l=H.match(t).returnType().with({question:_.ExplainQuestionType.whyIsStateNotPossible},()=>u).with({question:_.ExplainQuestionType.whyIsNotSatisfied},()=>s).exhaustive();return b.jsxs("div",{...e,children:[b.jsx(LT,{children:f})," ",l]})}const BT=G.div`
186
202
  position: sticky;
187
203
  top: 0;
188
204
  transition: all 0.1s;
@@ -196,7 +212,7 @@
196
212
  @media only screen and (min-resolution: 2dppx) {
197
213
  border-top-width: 0.5px;
198
214
  }
199
- `;function ts(e){const[t,n]=T.useState(!1),o=T.useRef(null);return T.useEffect(()=>{const i=new IntersectionObserver(([l])=>n(!l.isIntersecting),{root:null,threshold:1}),r=o.current;return r&&i.observe(r),()=>{r&&i.unobserve(r)}},[]),d.jsxs(d.Fragment,{children:[d.jsx("div",{ref:o}),d.jsx(es,{...Jn(e,{className:Vi(t&&"active")})})]})}const ns=k(f.motion.div)`
215
+ `;function zT(e){const[t,n]=I.useState(!1),r=I.useRef(null);return I.useEffect(()=>{const o=new IntersectionObserver(([a])=>n(!a.isIntersecting),{root:null,threshold:1}),i=r.current;return i&&o.observe(i),()=>{i&&o.unobserve(i)}},[]),b.jsxs(b.Fragment,{children:[b.jsx("div",{ref:r}),b.jsx(BT,{...Ib(e,{className:iC(t&&"active")})})]})}const WT=G(x.motion.div)`
200
216
  position: relative;
201
217
  background-color: var(--color-explain-dialog-fill);
202
218
  backdrop-filter: var(--backdrop-filter-explain-dialog);
@@ -215,16 +231,16 @@
215
231
  max-height: min(calc(100vh - var(--space-md) * 2), 700px);
216
232
  max-width: min(calc(100vw - var(--space-md) * 2), 700px);
217
233
  min-width: min(calc(100vw - var(--space-md) * 2), 500px);
218
- `,os=k.div`
234
+ `,GT=G.div`
219
235
  overflow-y: auto;
220
236
  grid-area: content;
221
237
  padding-left: var(--space-xs-fixed);
222
238
  padding-right: var(--space-xs-fixed);
223
239
  padding-bottom: var(--space-xs-fixed);
224
- `,is=k(ts)`
240
+ `,KT=G(zT)`
225
241
  margin-left: calc(var(--space-xs-fixed) * -1);
226
242
  margin-right: calc(var(--space-xs-fixed) * -1);
227
- `,rs=k(Jl)`
243
+ `,HT=G(qT)`
228
244
  position: absolute;
229
245
  right: var(--space-sm-fixed);
230
246
  top: var(--space-sm-fixed);
@@ -239,7 +255,7 @@
239
255
  outline: 2px solid var(--color-explain-dialog-close-button-outline);
240
256
  outline-offset: 1px;
241
257
  }
242
- `,ls=k(_o)`
258
+ `,JT=G(Iv)`
243
259
  grid-area: header;
244
260
  font-size: var(--text-md);
245
261
  font-weight: 500;
@@ -251,7 +267,7 @@
251
267
  text-overflow: ellipsis;
252
268
  margin-right: var(--space-md);
253
269
  margin-left: calc(var(--space-xs-fixed) + var(--space-sm-fixed));
254
- `,ss={initial:{opacity:0,scale:.5},open:{opacity:1,scale:1,transition:{type:"spring",stiffness:600,damping:40}},close:{opacity:0,scale:.7,transition:{duration:.1,ease:"cubicInOut"}}};function as(e){return d.jsxs(ns,{variants:ss,initial:"initial",animate:"open",exit:"close",children:[d.jsx(ls,{}),d.jsxs(os,{children:[d.jsx(is,{}),e.children]}),d.jsx(rs,{children:d.jsx(et.FontAwesomeIcon,{icon:Ze.faXmark})})]})}const cs=k(Xl)`
270
+ `,QT={initial:{opacity:0,scale:.5},open:{opacity:1,scale:1,transition:{type:"spring",stiffness:600,damping:40}},close:{opacity:0,scale:.7,transition:{duration:.1,ease:"cubicInOut"}}};function XT(e){return b.jsxs(WT,{variants:QT,initial:"initial",animate:"open",exit:"close",children:[b.jsx(JT,{}),b.jsxs(GT,{children:[b.jsx(KT,{}),e.children]}),b.jsx(HT,{children:b.jsx(Vu.FontAwesomeIcon,{icon:Ru.faXmark})})]})}const ZT=G(UT)`
255
271
  --color-explain-attribute-value-fill: ${e=>e.attributeValueFill};
256
272
  --color-explain-attribute-value-add-fill: ${e=>e.attributeValueAddFill};
257
273
  --color-explain-attribute-value-add-color: ${e=>e.attributeValueAddColor};
@@ -273,9 +289,46 @@
273
289
  &:focus {
274
290
  outline: none;
275
291
  }
276
- `;function us(e){const t=ye(),n=(t==null?void 0:t.displayMode)==="dialog";return d.jsx(_l,{open:n,onOpenChange:o=>!o&&n&&(t==null?void 0:t.dismiss()),children:d.jsx(ds,{...e,isOpen:n,children:T.Children.toArray(e.content)[0]??d.jsx(as,{children:d.jsx(gr,{})})})})}function ds(e){return d.jsx(f.AnimatePresence,{initial:!1,children:e.isOpen&&d.jsx($t.Provider,{value:e,children:d.jsx(cs,{...e,components:{Overlay:ps},children:d.jsx(Uo,{children:e.children})})})})}const fs=k(f.motion(Mo))`
277
- ${Ho}
278
- `;function ps(e){return d.jsx(fs,{...e,initial:{backgroundColor:"rgba(0,0,0,0)"},animate:{backgroundColor:"rgba(0,0,0,0.1)"},exit:{backgroundColor:"rgba(0,0,0,0)"}})}function hs(e){const[t,n]=T.useState(null),{explain:o,applySolution:i}=_.useExplain(),r=T.useRef(null),l=T.useCallback(async(u,b,w,m)=>{const y=Oi.guid();r.current=y,n(null);try{const C=await u(),P=C,S=C,R=(P==null?void 0:P.decisionExplanations)??[],I=(S==null?void 0:S.constraintExplanations)??[];y==r.current&&n({controlId:m,displayMode:R.length===0&&I.length>0?"dialog":w,explainQuestion:b,hasError:!1,decisionExplanations:ms(R),constraintExplanations:I})}catch{y==r.current&&n({controlId:m,displayMode:w,explainQuestion:b,hasError:!0,decisionExplanations:null,constraintExplanations:null})}},[]),s=T.useCallback((u,b,w)=>{const m=typeof u=="function"?u(p.explainQuestionBuilder):u;return l(()=>e.explainConstraints?o(m,"full"):o(m,"decisions"),m,b,w)},[e.explainConstraints,o,l]),a=T.useCallback((u,b,w)=>l(()=>Promise.resolve(u),null,b,w),[l]),c=T.useCallback(()=>{n(null)},[]),x=T.useCallback(u=>(c(),i(u)),[i,c]),h=T.useCallback(u=>{n(b=>b!=null?{...b,displayMode:u}:b)},[]),g=T.useMemo(()=>({process:t,applySolution:x,explain:s,handleExplainAnswer:a,dismiss:c,switchMode:h}),[t,x,s,a,c,h]);return d.jsx(Ke.Provider,{value:g,children:e.children})}function ms(e){const t=v.pipe(v.Bool.Ord,v.Ord.contramap(o=>o.solution==null)),n=v.pipe(v.Num.Ord,v.Ord.contramap(o=>o.causedByDecisions.length));return v.pipe(e,v.RA.sortBy([t,n]))}const je=new Map;function at(e){const{singletonId:t,children:n}=e,[o,i]=T.useState(!1),r=T.useRef({chose:()=>i(!0)});return T.useEffect(()=>(ys(t,r.current),()=>gs(t,r.current)),[]),o?d.jsx(d.Fragment,{children:n}):null}function ys(e,t){xs(e).candidates.add(t),Qo(e)}function gs(e,t){let n=je.get(e);n!=null&&(n.candidates.delete(t),n.chosen===t&&(n.chosen=null),bs(e),Qo(e))}function Qo(e){let t=je.get(e);if(t==null||t.chosen!=null)return;const n=t.candidates.values().next().value;n!=null&&(t.chosen=n,n.chose())}function bs(e){let t=je.get(e);t==null||t.candidates.size>0||je.delete(e)}function xs(e){let t=je.get(e);return t==null&&(t={chosen:null,candidates:new Set},je.set(e,t)),t}const re={attributeId:{title:"Attribute Id",type:f.ControlType.String},componentPath:{title:"Component Path",type:f.ControlType.String},sharedConfigurationModel:{title:"Shared Configuration Model",type:f.ControlType.String}},On={description:{title:"Description",type:f.ControlType.String},regex:{title:"Regex",type:f.ControlType.String},direction:{title:"Direction",type:f.ControlType.Enum,defaultValue:"asc",options:["asc","desc"],displaySegmentedControl:!0},mode:{title:"Mode",type:f.ControlType.Enum,defaultValue:"isMatch",options:["isMatch","string","numeric"]}},Cs={choiceValueSorting:{title:"Choice Value Sorting",type:f.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{defaultRules:{title:"Default Rules",type:f.ControlType.Array,control:{type:f.ControlType.Object,controls:On}},attributes:{title:"Attribute",type:f.ControlType.Array,control:{type:f.ControlType.Object,controls:{...re,choiceValues:{title:"Choice Values",type:f.ControlType.Array,control:{type:f.ControlType.String}},rules:{title:"Rules",type:f.ControlType.Array,control:{type:f.ControlType.Object,controls:On}}}}},jsonDefinition:{title:"Definition – JSON",type:f.ControlType.String,displayTextArea:!0}}}};function vs(e,t){const n=[],o=(r,l)=>{const s=n.find(c=>e.equals(c.first,r)&&e.equals(c.second,l));if(s)return s.ordering;const a=t.compare(r,l);return n.push({first:r,second:l,ordering:a}),a},i=v.Ord.fromCompare(o);return{cachedOrderings:n,...i}}function ws(){const e=[];return{getCache:(t,n)=>{const o=e.find(r=>r.eq===t&&r.ord===n);if(o)return o.ordCache;const i=vs(t,n);return e.push({eq:t,ord:n,ordCache:i}),i}}}const Yo=v.Ord.getMonoid(),Ss=new Intl.Collator("en",{sensitivity:"base"}),Ts=new Intl.Collator("en",{sensitivity:"variant"}),Es={regex:".*",direction:"asc",mode:"string"},As=v.pipe([Ss,Ts],v.RA.map(js),v.MO.concatAll(v.Ord.getMonoid())),Rs=v.pipe(v.Bool.Ord,v.Ord.contramap(e=>v.O.isSome(e))),Is=v.Num.Ord;function Ps(e,t){return v.pipe((t==null?void 0:t.attributes)??[],v.RA.findFirst(n=>p.globalAttributeIdEq.equals(J(n),e)),v.O.map(n=>[Ds(n.choiceValues??[]),kn(n.rules??[])]),v.O.getOrElse(()=>[kn((t==null?void 0:t.defaultRules)??[])]),v.RA.append(Xo(Es)),v.MO.concatAll(Yo))}function Ds(e){return v.pipe(v.Num.Ord,v.Ord.reverse,v.O.getOrd,v.Ord.reverse,v.Ord.contramap(t=>v.pipe(e,v.RA.findIndex(n=>v.Str.Eq.equals(t,n)))))}function kn(e){return v.pipe(e,v.RA.map(Xo),v.MO.concatAll(Yo))}function Xo(e){const t=v.O.tryCatch(()=>new RegExp(e.regex)),n=M.match(e.mode).returnType().with("string",()=>Vs(e.direction)).with("numeric",()=>Os(e.direction)).with("isMatch",()=>ks(e.direction)).exhaustive();return v.pipe(n,v.Ord.contramap(o=>v.pipe(t,v.O.chainNullableK(i=>(i.lastIndex=0,i[Symbol.match](o))),v.O.chain(i=>v.pipe(i,v.RA.lookup(1),v.O.alt(()=>v.pipe(i,v.RA.lookup(0))))))))}function Vs(e){return v.pipe(As,Zt(e),Go)}function Os(e){return v.pipe(Is,Zt(e),Go,v.Ord.contramap(v.O.chain(v.Num.parseFloatO)))}function ks(e){return v.pipe(Rs,Zt(e))}function Go(e){return v.pipe(e,v.Ord.reverse,v.O.getOrd,v.Ord.reverse)}function Zt(e){return t=>M.match(e).returnType().with("asc",()=>t).with("desc",()=>v.Ord.reverse(t)).exhaustive()}function js(e){return v.Ord.fromCompare((t,n)=>M.match(e.compare(t,n)).returnType().with(M.P.number.gt(0),()=>1).with(M.P.number.lt(0),()=>-1).otherwise(()=>0))}const Fs=ws(),Jo=T.createContext(null);function ct(e,t,n){const o=T.useContext(Jo),i=T.useMemo(()=>v.pipe(Ps(e,o),l=>Fs.getCache(v.Str.Eq,l),v.Ord.contramap(l=>t.get(l.id)??l.id)),[t]),{attribute:r}=_.useChoiceAttribute(e);return v.pipe(n??(r==null?void 0:r.values)??[],v.RA.sort(i))}const Ns={localization:{title:"Localization",type:f.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{jsonDefinition:{title:"Definition – JSON",type:f.ControlType.String,displayTextArea:!0}}}},Zo=se(e=>{const{hcaBaseUrl:t,sessionCreation:n,accessToken:o,sessionCreateUrl:i,sessionDeleteUrl:r,deploymentName:l,channel:s,children:a,explainDialogProps:c,explainPopoverProps:x,explainConstraints:h}=e,{activeLocale:g}=f.useLocaleInfo(),u=g.code;if(T.useEffect(()=>{console.info("Current locale code:",u)},[u]),G())return d.jsxs(d.Fragment,{children:[a,d.jsx(at,{singletonId:"Configuration",children:d.jsx(rn,{})})]});const w=T.useMemo(()=>{var P;return v.pipe(v.O.fromNullable((P=e.attributeRelations)==null?void 0:P.jsonDefinition),v.O.filter(S=>S.length>0),v.O.map(S=>JSON.parse(S)),v.O.toNullable)},[e.attributeRelations]),m=T.useMemo(()=>{var P;return v.pipe(v.O.fromNullable((P=e.choiceValueSorting)==null?void 0:P.jsonDefinition),v.O.filter(S=>S.length>0),v.O.map(S=>JSON.parse(S)),v.O.orElse(()=>v.O.fromNullable(e.choiceValueSorting)),v.O.getOrElse(()=>({attributes:[],defaultRules:[]})))},[e.choiceValueSorting]),y=T.useMemo(()=>{var P;return v.pipe(v.O.fromNullable((P=e.localization)==null?void 0:P.jsonDefinition),v.O.filter(S=>S.length>0),v.O.map(S=>JSON.parse(S)),v.O.getOrElse(()=>({attributes:[],choiceValues:[]})))},[e.localization]),C=T.useMemo(()=>({apiBaseUrl:Pi(t,"api","engine"),sessionInitialisationOptions:M.match(n).with("client-side",()=>({accessToken:o})).with("server-side",()=>({sessionCreateUrl:i})).exhaustive(),configurationModelSource:{type:p.ConfigurationModelSourceType.Channel,channel:s,deploymentName:l},attributeRelations:w,allowedInExplain:{rules:{type:p.AllowedRulesInExplainType.all}}}),[t,n,o,i,r,s,l,w]);return d.jsxs(d.Fragment,{children:[d.jsxs(_.Configuration,{sessionContext:C,children:[d.jsx(Ki,{...e}),d.jsx(T.Suspense,{children:d.jsx(ut.Provider,{value:y,children:d.jsxs(hs,{explainConstraints:h,children:[d.jsx(Mt.Provider,{value:x,children:d.jsx(Jo.Provider,{value:m,children:a})}),d.jsx(us,{...c})]})})})]}),d.jsx(at,{singletonId:"Configuration",children:d.jsx(rn,{})})]})}),Ls=Zo;f.addPropertyControls(Zo,{children:{title:"Content",type:f.ControlType.ComponentInstance},channel:{type:f.ControlType.String,title:"Channel",defaultValue:"release"},deploymentName:{type:f.ControlType.String,title:"Deployment Name"},hcaBaseUrl:{title:"HCA Base URL",type:f.ControlType.String,defaultValue:"https://spc.cloud.ceventis.de/hca"},sessionCreation:{title:"Session Creation",type:f.ControlType.Enum,displaySegmentedControl:!0,segmentedControlDirection:"horizontal",defaultValue:"client-side",options:["client-side","server-side"]},accessToken:{title:"HCA Access Token",type:f.ControlType.String,obscured:!0,hidden:e=>e.sessionCreation!=="client-side"},sessionCreateUrl:{title:"Create Session URl",type:f.ControlType.String,hidden:e=>e.sessionCreation!=="server-side"},sessionDeleteUrl:{title:"Close Session URl",type:f.ControlType.String,hidden:e=>e.sessionCreation!=="server-side"},configurationModelNotFoundContent:{title:"Content – Configuration Model not found",type:f.ControlType.ComponentInstance},errorContent:{title:"Content – Error",type:f.ControlType.ComponentInstance},accessTokenInvalidContent:{title:"Content – HCA Access Token invalid",type:f.ControlType.ComponentInstance},accessTokenRestrictionContent:{title:"Content – HCA Access Token restriction",type:f.ControlType.ComponentInstance},explainDialogProps:{title:"Explain Dialog",type:f.ControlType.Object,optional:!1,controls:Gi,buttonTitle:"Props…"},explainPopoverProps:{title:"Explain Popover",type:f.ControlType.Object,optional:!1,controls:Xi,buttonTitle:"Props…"},explainConstraints:{title:"Explain Constraints",type:f.ControlType.Boolean,defaultValue:!1},attributeRelations:{title:"Attribute Relations",type:f.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{jsonDefinition:{title:"Definition – JSON",type:f.ControlType.String,displayTextArea:!0}}},...Cs,...Ns});const ei={padding:{type:f.ControlType.FusedNumber,title:"Padding",toggleKey:"isMixedPadding",toggleTitles:["Padding","Padding per Side"],valueKeys:["paddingTop","paddingRight","paddingBottom","paddingLeft"],valueLabels:["Top","Right","Bottom","Left"],min:0,defaultValue:0}},Ms=e=>({paddingTop:e.isMixedPadding?e.paddingTop:e.padding,paddingRight:e.isMixedPadding?e.paddingRight:e.padding,paddingBottom:e.isMixedPadding?e.paddingBottom:e.padding,paddingLeft:e.isMixedPadding?e.paddingLeft:e.padding}),Bs={radius:{title:"Radius",type:f.ControlType.Number,defaultValue:6},...ei,border:{title:"Border",type:f.ControlType.Object,controls:{color:{type:f.ControlType.Color,title:"Color"},width:{type:f.ControlType.FusedNumber,title:"Width",toggleKey:"isMixedWidth",toggleTitles:["Width","Width per Side"],valueKeys:["widthTop","widthRight","widthBottom","widthLeft"],valueLabels:["Top","Right","Bottom","Left"],min:0,defaultValue:0}}}},$s=e=>{var t,n,o,i,r,l,s,a,c,x,h,g,u;return{borderRadius:e.radius,borderColor:(t=e.border)==null?void 0:t.color,borderTopWidth:(n=e.border)!=null&&n.isMixedWidth?(o=e.border)==null?void 0:o.widthTop:(i=e.border)==null?void 0:i.width,borderRightWidth:(r=e.border)!=null&&r.isMixedWidth?(l=e.border)==null?void 0:l.widthRight:(s=e.border)==null?void 0:s.width,borderBottomWidth:(a=e.border)!=null&&a.isMixedWidth?(c=e.border)==null?void 0:c.widthBottom:(x=e.border)==null?void 0:x.width,borderLeftWidth:(h=e.border)!=null&&h.isMixedWidth?(g=e.border)==null?void 0:g.widthLeft:(u=e.border)==null?void 0:u.width}},Ks={fill:{title:"Fill",type:f.ControlType.Color,defaultValue:"#EBEBEB"},...ei,...Bs},Ws=e=>({...Ms(e),...$s(e),backgroundColor:e.fill}),qs={color:{title:"Color",type:f.ControlType.Color,defaultValue:"black"},text:{title:"Text",type:f.ControlType.Font,controls:"basic",displayTextAlignment:!0,displayFontSize:!0}},zs=e=>({...e.text,color:e.color}),Ne={explain:{title:"Explain",type:f.ControlType.Enum,defaultValue:"popover",options:["popover","dialog","disabled"]}},Nt={type:f.ControlType.Object,optional:!0,controls:{fill:{title:"Fill",type:f.ControlType.Color,optional:!0},color:{title:"Color",type:f.ControlType.Color,optional:!0},borderColor:{title:"Border Color",type:f.ControlType.Color,optional:!0}}},ti={...re,...qs,...Ks,implicitLabelPrefix:{title:"Implicit Label Prefix",type:f.ControlType.String,defaultValue:"Implicit: "},unsatisfiedColors:{...Nt,title:"Unsatisfied Colors"},implicitSelectedColors:{...Nt,title:"Implicit Selected Colors"},...Ne},Lt=(e,t,n)=>{var r,l,s,a,c,x;const o=Ws(e),i=zs(e);return{...o,...i,backgroundColor:M.match({isSatisfied:t,isImplicitSelected:n,unsatisfiedFill:(r=e.unsatisfiedColors)==null?void 0:r.fill,implicitSelectedFill:(l=e.implicitSelectedColors)==null?void 0:l.fill}).with({isSatisfied:!1,unsatisfiedFill:M.P.string.minLength(1)},h=>h.unsatisfiedFill).with({isImplicitSelected:!0,implicitSelectedFill:M.P.string.minLength(1)},h=>h.implicitSelectedFill).otherwise(()=>o.backgroundColor),borderColor:M.match({isSatisfied:t,isImplicitSelected:n,unsatisfiedBorderColor:(s=e.unsatisfiedColors)==null?void 0:s.borderColor,implicitSelectedBorderColor:(a=e.implicitSelectedColors)==null?void 0:a.borderColor}).with({isSatisfied:!1,unsatisfiedBorderColor:M.P.string.minLength(1)},h=>h.unsatisfiedBorderColor).with({isImplicitSelected:!0,implicitSelectedBorderColor:M.P.string.minLength(1)},h=>h.implicitSelectedBorderColor).otherwise(()=>o.borderColor),color:M.match({isSatisfied:t,isImplicitSelected:n,unsatisfiedColor:(c=e.unsatisfiedColors)==null?void 0:c.color,implicitSelectedColor:(x=e.implicitSelectedColors)==null?void 0:x.color}).with({isSatisfied:!1,unsatisfiedColor:M.P.string.minLength(1)},h=>h.unsatisfiedColor).with({isImplicitSelected:!0,implicitSelectedColor:M.P.string.minLength(1)},h=>h.implicitSelectedColor).otherwise(()=>i.color),...e.style}},en={...ti,resetLabel:{title:"Reset Label",type:f.ControlType.String,defaultValue:"Reset"},blockedLabel:{title:"Blocked Label",type:f.ControlType.String,defaultValue:"Blocked"},appearance:{title:"Appearance",type:f.ControlType.Enum,defaultValue:"auto",displaySegmentedControl:!0,segmentedControlDirection:"horizontal",options:["auto","none"]}},Fe=(e,t,n)=>({...Lt(e,t,n),appearance:e.appearance});function de(){const{explain:e,handleExplainAnswer:t}=T.useContext(Ke);return{explain:e,handleExplainAnswer:t}}function Hs(e={}){const{initialOpen:t=!1,placement:n="top",modal:o=!1,open:i,onOpenChange:r,arrow:l}=e,[s,a]=T.useState(t),c=i??s,x=r??a,h=Ko({placement:n,open:c,onOpenChange:x,whileElementsMounted:tl,middleware:[Mr(((l==null?void 0:l.height)??0)+5),ol({crossAxis:n.includes("-"),fallbackAxisSideDirection:"end",padding:5}),nl({padding:5}),...l?[rl(l)]:[]]}),g=h.context,u=Bo(g,{enabled:i==null}),b=$o(g),w=Wo([u,b]);return T.useMemo(()=>({open:c,setOpen:x,...w,...h,modal:o,arrow:l}),[c,x,w,h,o,l])}const ni=T.createContext(null),Qe=()=>{const e=T.useContext(ni);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e};function Us({children:e,...t}){const n=Hs(t);return d.jsx(ni.Provider,{value:n,children:e})}const _s=T.forwardRef(function(t,n){const o=T.Children.toArray(t.children)[0],i=Qe(),r=t.children.ref,l=Yt([i.refs.setReference,n,r]);return T.isValidElement(o)?T.cloneElement(o,i.getReferenceProps({ref:l,...t,...o.props,"data-state":i.open?"open":"closed"})):d.jsx("span",{children:"Not valid children for PopoverTrigger"})}),Qs=_s,Ys=k.div`
292
+ `;function YT(e){const t=Zt(),n=(t==null?void 0:t.displayMode)==="dialog";return b.jsx(FT,{open:n,onOpenChange:r=>!r&&n&&(t==null?void 0:t.dismiss()),children:b.jsx(eA,{...e,isOpen:n,children:I.Children.toArray(e.content)[0]??b.jsx(XT,{children:b.jsx(aS,{})})})})}function eA(e){return b.jsx(x.AnimatePresence,{initial:!1,children:e.isOpen&&b.jsx(td.Provider,{value:e,children:b.jsx(ZT,{...e,components:{Overlay:nA},children:b.jsx(Av,{children:e.children})})})})}const tA=G(x.motion(bv))`
293
+ ${Tv}
294
+ `;function nA(e){return b.jsx(tA,{...e,initial:{backgroundColor:"rgba(0,0,0,0)"},animate:{backgroundColor:"rgba(0,0,0,0.1)"},exit:{backgroundColor:"rgba(0,0,0,0)"}})}function rA(e){const[t,n]=I.useState(null),{explain:r,applySolution:o}=ce.useExplain(),i=I.useRef(null),a=I.useCallback(async(p,y,h,m)=>{const g=aC.guid();i.current=g,n(null);try{const w=await p(),N=w,T=w,A=(N==null?void 0:N.decisionExplanations)??[],O=(T==null?void 0:T.constraintExplanations)??[];g==i.current&&n({controlId:m,displayMode:A.length===0&&O.length>0?"dialog":h,explainQuestion:y,hasError:!1,decisionExplanations:oA(A),constraintExplanations:O})}catch{g==i.current&&n({controlId:m,displayMode:h,explainQuestion:y,hasError:!0,decisionExplanations:null,constraintExplanations:null})}},[]),u=I.useCallback((p,y,h)=>{const m=typeof p=="function"?p(_.explainQuestionBuilder):p;return a(()=>e.explainConstraints?r(m,"full"):r(m,"decisions"),m,y,h)},[e.explainConstraints,r,a]),s=I.useCallback((p,y,h)=>a(()=>Promise.resolve(p),null,y,h),[a]),c=I.useCallback(()=>{n(null)},[]),f=I.useCallback(p=>(c(),o(p)),[o,c]),l=I.useCallback(p=>{n(y=>y!=null?{...y,displayMode:p}:y)},[]),d=I.useMemo(()=>({process:t,applySolution:f,explain:u,handleExplainAnswer:s,dismiss:c,switchMode:l}),[t,f,u,s,c,l]);return b.jsx(vi.Provider,{value:d,children:e.children})}function oA(e){const t=v.pipe(v.Bool.Ord,v.Ord.contramap(r=>r.solution==null)),n=v.pipe(v.Num.Ord,v.Ord.contramap(r=>r.causedByDecisions.length));return v.pipe(e,v.RA.sortBy([t,n]))}const _r=new Map;function Gu(e){const{singletonId:t,children:n}=e,[r,o]=I.useState(!1),i=I.useRef({chose:()=>o(!0)});return I.useEffect(()=>(iA(t,i.current),()=>aA(t,i.current)),[]),r?b.jsx(b.Fragment,{children:n}):null}function iA(e,t){sA(e).candidates.add(t),Ov(e)}function aA(e,t){let n=_r.get(e);n!=null&&(n.candidates.delete(t),n.chosen===t&&(n.chosen=null),uA(e),Ov(e))}function Ov(e){let t=_r.get(e);if(t==null||t.chosen!=null)return;const n=t.candidates.values().next().value;n!=null&&(t.chosen=n,n.chose())}function uA(e){let t=_r.get(e);t==null||t.candidates.size>0||_r.delete(e)}function sA(e){let t=_r.get(e);return t==null&&(t={chosen:null,candidates:new Set},_r.set(e,t)),t}const Xe={attributeId:{title:"Attribute Id",type:x.ControlType.String},componentPath:{title:"Component Path",type:x.ControlType.String},sharedConfigurationModel:{title:"Shared Configuration Model",type:x.ControlType.String}},Xp={description:{title:"Description",type:x.ControlType.String},regex:{title:"Regex",type:x.ControlType.String},direction:{title:"Direction",type:x.ControlType.Enum,defaultValue:"asc",options:["asc","desc"],displaySegmentedControl:!0},mode:{title:"Mode",type:x.ControlType.Enum,defaultValue:"isMatch",options:["isMatch","string","numeric"]}},cA={choiceValueSorting:{title:"Choice Value Sorting",type:x.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{defaultRules:{title:"Default Rules",type:x.ControlType.Array,control:{type:x.ControlType.Object,controls:Xp}},attributes:{title:"Attribute",type:x.ControlType.Array,control:{type:x.ControlType.Object,controls:{...Xe,choiceValues:{title:"Choice Values",type:x.ControlType.Array,control:{type:x.ControlType.String}},rules:{title:"Rules",type:x.ControlType.Array,control:{type:x.ControlType.Object,controls:Xp}}}}},jsonDefinition:{title:"Definition – JSON",type:x.ControlType.String,displayTextArea:!0}}}};function lA(e,t){const n=[],r=(i,a)=>{const u=n.find(c=>e.equals(c.first,i)&&e.equals(c.second,a));if(u)return u.ordering;const s=t.compare(i,a);return n.push({first:i,second:a,ordering:s}),s},o=v.Ord.fromCompare(r);return{cachedOrderings:n,...o}}function fA(){const e=[];return{getCache:(t,n)=>{const r=e.find(i=>i.eq===t&&i.ord===n);if(r)return r.ordCache;const o=lA(t,n);return e.push({eq:t,ord:n,ordCache:o}),o}}}const Pv=v.Ord.getMonoid(),dA=new Intl.Collator("en",{sensitivity:"base"}),pA=new Intl.Collator("en",{sensitivity:"variant"}),hA={regex:".*",direction:"asc",mode:"string"},yA=v.pipe([dA,pA],v.RA.map(CA),v.MO.concatAll(v.Ord.getMonoid())),mA=v.pipe(v.Bool.Ord,v.Ord.contramap(e=>v.O.isSome(e))),gA=v.Num.Ord;function bA(e,t){return v.pipe((t==null?void 0:t.attributes)??[],v.RA.findFirst(n=>_.globalAttributeIdEq.equals(Te(n),e)),v.O.map(n=>[vA(n.choiceValues??[]),Zp(n.rules??[])]),v.O.getOrElse(()=>[Zp((t==null?void 0:t.defaultRules)??[])]),v.RA.append(Nv(hA)),v.MO.concatAll(Pv))}function vA(e){return v.pipe(v.Num.Ord,v.Ord.reverse,v.O.getOrd,v.Ord.reverse,v.Ord.contramap(t=>v.pipe(e,v.RA.findIndex(n=>v.Str.Eq.equals(t,n)))))}function Zp(e){return v.pipe(e,v.RA.map(Nv),v.MO.concatAll(Pv))}function Nv(e){const t=v.O.tryCatch(()=>new RegExp(e.regex)),n=H.match(e.mode).returnType().with("string",()=>xA(e.direction)).with("numeric",()=>_A(e.direction)).with("isMatch",()=>wA(e.direction)).exhaustive();return v.pipe(n,v.Ord.contramap(r=>v.pipe(t,v.O.chainNullableK(o=>(o.lastIndex=0,o[Symbol.match](r))),v.O.chain(o=>v.pipe(o,v.RA.lookup(1),v.O.alt(()=>v.pipe(o,v.RA.lookup(0))))))))}function xA(e){return v.pipe(yA,hd(e),jv)}function _A(e){return v.pipe(gA,hd(e),jv,v.Ord.contramap(v.O.chain(v.Num.parseFloatO)))}function wA(e){return v.pipe(mA,hd(e))}function jv(e){return v.pipe(e,v.Ord.reverse,v.O.getOrd,v.Ord.reverse)}function hd(e){return t=>H.match(e).returnType().with("asc",()=>t).with("desc",()=>v.Ord.reverse(t)).exhaustive()}function CA(e){return v.Ord.fromCompare((t,n)=>H.match(e.compare(t,n)).returnType().with(H.P.number.gt(0),()=>1).with(H.P.number.lt(0),()=>-1).otherwise(()=>0))}const SA=fA(),$v=I.createContext(null);function Ku(e,t,n){const r=I.useContext($v),o=I.useMemo(()=>v.pipe(bA(e,r),a=>SA.getCache(v.Str.Eq,a),v.Ord.contramap(a=>t.get(a.id)??a.id)),[t]),{attribute:i}=ce.useChoiceAttribute(e);return v.pipe(n??(i==null?void 0:i.values)??[],v.RA.sort(o))}const TA={localization:{title:"Localization",type:x.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{jsonDefinition:{title:"Definition – JSON",type:x.ControlType.String,displayTextArea:!0}}}};var K=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vs(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var kn={},xs={};Object.defineProperty(xs,"__esModule",{value:!0});xs.cacheUnaryFunction=void 0;function AA(e){var t=new Map,n=function(r){var o=t.get(r);if(o!==void 0)return o;var i=e(r);return t.set(r,i),i};return n}xs.cacheUnaryFunction=AA;var Ev={},kf=function(e,t){return kf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},kf(e,t)};function Mv(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");kf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Hu=function(){return Hu=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Hu.apply(this,arguments)};function kv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Fv(e,t,n,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(a=e[u])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function Rv(e,t){return function(n,r){t(n,r,e)}}function Vv(e,t,n,r,o,i){function a(g){if(g!==void 0&&typeof g!="function")throw new TypeError("Function expected");return g}for(var u=r.kind,s=u==="getter"?"get":u==="setter"?"set":"value",c=!t&&e?r.static?e:e.prototype:null,f=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),l,d=!1,p=n.length-1;p>=0;p--){var y={};for(var h in r)y[h]=h==="access"?{}:r[h];for(var h in r.access)y.access[h]=r.access[h];y.addInitializer=function(g){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(g||null))};var m=(0,n[p])(u==="accessor"?{get:f.get,set:f.set}:f[s],y);if(u==="accessor"){if(m===void 0)continue;if(m===null||typeof m!="object")throw new TypeError("Object expected");(l=a(m.get))&&(f.get=l),(l=a(m.set))&&(f.set=l),(l=a(m.init))&&o.unshift(l)}else(l=a(m))&&(u==="field"?o.unshift(l):f[s]=l)}c&&Object.defineProperty(c,r.name,f),d=!0}function Uv(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function Dv(e){return typeof e=="symbol"?e:"".concat(e)}function qv(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function Lv(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Bv(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function u(f){try{c(r.next(f))}catch(l){a(l)}}function s(f){try{c(r.throw(f))}catch(l){a(l)}}function c(f){f.done?i(f.value):o(f.value).then(u,s)}c((r=r.apply(e,t||[])).next())})}function zv(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(f){return s([c,f])}}function s(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(f){c=[6,f],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var _s=Object.create?function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]};function Wv(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&_s(t,e,n)}function Ju(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function yd(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function Gv(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(yd(arguments[t]));return e}function Kv(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function Hv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function wr(e){return this instanceof wr?(this.v=e,this):new wr(e)}function Jv(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",a),o[Symbol.asyncIterator]=function(){return this},o;function a(p){return function(y){return Promise.resolve(y).then(p,l)}}function u(p,y){r[p]&&(o[p]=function(h){return new Promise(function(m,g){i.push([p,h,m,g])>1||s(p,h)})},y&&(o[p]=y(o[p])))}function s(p,y){try{c(r[p](y))}catch(h){d(i[0][3],h)}}function c(p){p.value instanceof wr?Promise.resolve(p.value.v).then(f,l):d(i[0][2],p)}function f(p){s("next",p)}function l(p){s("throw",p)}function d(p,y){p(y),i.shift(),i.length&&s(i[0][0],i[0][1])}}function Qv(e){var t,n;return t={},r("next"),r("throw",function(o){throw o}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(o,i){t[o]=e[o]?function(a){return(n=!n)?{value:wr(e[o](a)),done:!1}:i?i(a):a}:i}}function Xv(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Ju=="function"?Ju(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(a){return new Promise(function(u,s){a=e[i](a),o(u,s,a.done,a.value)})}}function o(i,a,u,s){Promise.resolve(s).then(function(c){i({value:c,done:u})},a)}}function Zv(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var IA=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function Yv(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&_s(t,e,n);return IA(t,e),t}function e0(e){return e&&e.__esModule?e:{default:e}}function t0(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function n0(e,t,n,r,o){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?o.call(e,n):o?o.value=n:t.set(e,n),n}function r0(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function o0(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(i){return Promise.reject(i)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var OA=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function i0(e){function t(i){e.error=e.hasError?new OA(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}var n,r=0;function o(){for(;n=e.stack.pop();)try{if(!n.async&&r===1)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,function(a){return t(a),o()})}else r|=1}catch(a){t(a)}if(r===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return o()}function a0(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,o,i,a){return r?t?".jsx":".js":o&&(!i||!a)?n:o+i+"."+a.toLowerCase()+"js"}):e}const PA={__extends:Mv,__assign:Hu,__rest:kv,__decorate:Fv,__param:Rv,__esDecorate:Vv,__runInitializers:Uv,__propKey:Dv,__setFunctionName:qv,__metadata:Lv,__awaiter:Bv,__generator:zv,__createBinding:_s,__exportStar:Wv,__values:Ju,__read:yd,__spread:Gv,__spreadArrays:Kv,__spreadArray:Hv,__await:wr,__asyncGenerator:Jv,__asyncDelegator:Qv,__asyncValues:Xv,__makeTemplateObject:Zv,__importStar:Yv,__importDefault:e0,__classPrivateFieldGet:t0,__classPrivateFieldSet:n0,__classPrivateFieldIn:r0,__addDisposableResource:o0,__disposeResources:i0,__rewriteRelativeImportExtension:a0},NA=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:o0,get __assign(){return Hu},__asyncDelegator:Qv,__asyncGenerator:Jv,__asyncValues:Xv,__await:wr,__awaiter:Bv,__classPrivateFieldGet:t0,__classPrivateFieldIn:r0,__classPrivateFieldSet:n0,__createBinding:_s,__decorate:Fv,__disposeResources:i0,__esDecorate:Vv,__exportStar:Wv,__extends:Mv,__generator:zv,__importDefault:e0,__importStar:Yv,__makeTemplateObject:Zv,__metadata:Lv,__param:Rv,__propKey:Dv,__read:yd,__rest:kv,__rewriteRelativeImportExtension:a0,__runInitializers:Uv,__setFunctionName:qv,__spread:Gv,__spreadArray:Hv,__spreadArrays:Kv,__values:Ju,default:PA},Symbol.toStringTag,{value:"Module"})),Ae=vs(NA);var q={};Object.defineProperty(q,"__esModule",{value:!0});q.getGuardId=q.memo=q.collect=q.merge=q.projectFieldWithEnv=q.projectField=q.mapRecord=void 0;var jA=Ae,ws=Qt,$A=function(e,t){return ws.record.map(e,t)};q.mapRecord=$A;var EA=function(e){return function(t){return ws.record.map(e,function(n){return n[t]})}};q.projectField=EA;var MA=function(e,t){return function(n){return ws.record.map(e,function(r){return r(t)[n]})}};q.projectFieldWithEnv=MA;var kA=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Object.assign.apply(Object,jA.__spreadArrays([{}],e))};q.merge=kA;var FA=function(e,t){return ws.collect(t)(e)};q.collect=FA;var RA=function(e){var t=void 0;return function(){return t===void 0&&(t=e()),t}};q.memo=RA;var VA=function(e,t){var n=e.length;return function(r){var o=typeof r=="object"&&r!==null;if(o){var i=r[t];if(i!==void 0)return i}for(var a=0;a<n;a++)if(e[a](r)._tag==="Right")return o&&(r[t]=a),a;return-1}};q.getGuardId=VA;var So={},Oe={};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.EqType=Oe.EqURI=void 0;Oe.EqURI="EqURI";var UA=function(){function e(t){this.eq=t}return e}();Oe.EqType=UA;var Fl={},zn={};Object.defineProperty(zn,"__esModule",{value:!0});zn.getApplyConfig=void 0;var DA=function(e){return function(t){return function(n,r,o){return(t&&t[e]?t[e]:function(i){return i})(n,r[e],o)}}};zn.getApplyConfig=DA;var Rl={},To={},Yp;function u0(){if(Yp)return To;Yp=1,Object.defineProperty(To,"__esModule",{value:!0}),To.eqPrimitiveInterpreter=void 0;var e=q,t=Ni,n=ji,r=fs,o=sC,i=Ob,a=Pb,u=St(),s=Oe,c=function(f){return{equals:function(l,d){return l===void 0?d===void 0:d!==void 0&&f.equals(l,d)}}};return To.eqPrimitiveInterpreter=e.memo(function(){return{_F:s.EqURI,date:function(f){return function(l){return new s.EqType(u.eqApplyConfig(f)(n.eq.contramap(n.eqNumber,function(d){return d.getTime()}),l,{}))}},boolean:function(f){return function(l){return new s.EqType(u.eqApplyConfig(f)(n.eqBoolean,l,{}))}},string:function(f){return function(l){return new s.EqType(u.eqApplyConfig(f)(n.eqString,l,{}))}},number:function(f){return function(l){return new s.EqType(u.eqApplyConfig(f)(n.eqNumber,l,{}))}},bigint:function(f){return function(l){return new s.EqType(u.eqApplyConfig(f)(n.eqStrict,l,{}))}},stringLiteral:function(f,l){return function(d){return new s.EqType(u.eqApplyConfig(l)(n.eqString,d,{}))}},numberLiteral:function(f,l){return function(d){return new s.EqType(u.eqApplyConfig(l)(n.eqNumber,d,{}))}},oneOfLiterals:function(f,l){return function(d){return new s.EqType(u.eqApplyConfig(l)(n.eqStrict,d,{}))}},tag:function(f,l){return function(d){return new s.EqType(u.eqApplyConfig(l)(n.eqString,d,{}))}},keysOf:function(f,l){return function(d){return new s.EqType(u.eqApplyConfig(l)(n.eqStrict,d,{}))}},nullable:function(f,l){return function(d){return o.pipe(f(d).eq,function(p){return new s.EqType(u.eqApplyConfig(l)(r.getEq(p),d,{eq:p}))})}},optional:function(f,l){return function(d){return o.pipe(f(d).eq,function(p){return new s.EqType(u.eqApplyConfig(l)(c(p),d,{eq:p}))})}},mutable:function(f,l){return function(d){return o.pipe(f(d).eq,function(p){return new s.EqType(u.eqApplyConfig(l)(p,d,{eq:p}))})}},array:function(f,l){return function(d){return o.pipe(f(d).eq,function(p){return new s.EqType(u.eqApplyConfig(l)(i.getEq(p),d,{eq:p}))})}},nonEmptyArray:function(f,l){return function(d){return o.pipe(f(d).eq,function(p){return new s.EqType(u.eqApplyConfig(l)(a.getEq(p),d,{eq:p}))})}},uuid:function(f){return function(l){return new s.EqType(u.eqApplyConfig(f)(n.eqString,l,{}))}},either:function(f,l,d){return function(p){return function(y,h){return new s.EqType(u.eqApplyConfig(d)(t.getEq(y,h),p,{left:y,right:h}))}(f(p).eq,l(p).eq)}},option:function(f,l){return function(d){return o.pipe(f(d).eq,function(p){return new s.EqType(u.eqApplyConfig(l)(r.getEq(p),d,{eq:p}))})}},unknownE:function(f,l){return function(d){return new s.EqType(u.eqApplyConfig(l)(f(d).eq,d,{}))}}}}),To}var Vl={},eh;function s0(){return eh||(eh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.eqObjectInterpreter=e.eqOrUndefined=void 0;var t=Ae,n=q,r=ji,o=St(),i=Oe,a=function(s){return s},u=function(s){return{equals:function(c,f){return c===void 0?f===void 0:f!==void 0&&s.equals(c,f)}}};e.eqOrUndefined=u,e.eqObjectInterpreter=n.memo(function(){return{_F:i.EqURI,interface:function(s,c,f){return function(l){var d=n.projectFieldWithEnv(s,l)("eq");return new i.EqType(o.eqApplyConfig(f)(r.getStructEq(d),l,{equals:d}))}},partial:function(s,c,f){return function(l){var d=n.mapRecord(n.projectFieldWithEnv(s,l)("eq"),e.eqOrUndefined);return new i.EqType(o.eqApplyConfig(f)(a(r.getStructEq(d)),l,{equals:d}))}},both:function(s,c,f,l){return function(d){var p=n.mapRecord(n.projectFieldWithEnv(c,d)("eq"),e.eqOrUndefined),y=n.projectFieldWithEnv(s,d)("eq");return new i.EqType(o.eqApplyConfig(l)(r.getStructEq(t.__assign(t.__assign({},p),y)),d,{equalsPartial:p,equals:y}))}}}})}(Vl)),Vl}var Ao={},th;function c0(){if(th)return Ao;th=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.eqTaggedUnionInterpreter=void 0;var e=q,t=St(),n=Oe;return Ao.eqTaggedUnionInterpreter=e.memo(function(){return{_F:n.EqURI,taggedUnion:function(r,o,i,a){return function(u){var s=e.mapRecord(o,function(c){return c(u).eq.equals});return new n.EqType(t.eqApplyConfig(a)({equals:function(c,f){if(c===f)return!0;var l=c[r];return l===f[r]?s[l](c,f):!1}},u,{}))}}}}),Ao}var Io={},nh;function l0(){if(nh)return Io;nh=1,Object.defineProperty(Io,"__esModule",{value:!0}),Io.eqRecursiveInterpreter=void 0;var e=q,t=St(),n=Oe;return Io.eqRecursiveInterpreter=e.memo(function(){return{_F:n.EqURI,recursive:function(r,o,i){var a=e.memo(function(){return r(u)}),u=function(s){return new n.EqType(t.eqApplyConfig(i)({equals:function(c,f){return a()(s).eq.equals(c,f)}},s,{}))};return u}}}),Io}var Oo={},rh;function f0(){if(rh)return Oo;rh=1,Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.eqStrMapInterpreter=void 0;var e=q,t=$e,n=Qt,r=St(),o=Oe;return Oo.eqStrMapInterpreter=e.memo(function(){return{_F:o.EqURI,strMap:function(i,a){return function(u){return t.pipe(i(u).eq,function(s){return new o.EqType(r.eqApplyConfig(a)(n.getEq(s),u,{eq:s}))})}},record:function(i,a,u){return function(s){return function(c,f){return new o.EqType(r.eqApplyConfig(u)(n.getEq(f),s,{domainEq:c,codomainEq:f}))}(i(s).eq,a(s).eq)}}}}),Oo}var Po={},oh;function d0(){if(oh)return Po;oh=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.eqSetInterpreter=void 0;var e=q,t=$e,n=Nb,r=St(),o=Oe;return Po.eqSetInterpreter=e.memo(function(){return{_F:o.EqURI,set:function(i,a,u){return function(s){return t.pipe(i(s).eq,function(c){return new o.EqType(r.eqApplyConfig(u)(n.getEq(c),s,{eq:c}))})}}}}),Po}var No={},Ff={exports:{}};(function(e,t){(function(n,r){r(t)})(K,function(n){var r=typeof WeakSet=="function",o=Object.keys;function i(S,$){return S===$||S!==S&&$!==$}function a(S){return S.constructor===Object||S.constructor==null}function u(S){return!!S&&typeof S.then=="function"}function s(S){return!!(S&&S.$$typeof)}function c(){var S=[];return{add:function($){S.push($)},has:function($){return S.indexOf($)!==-1}}}var f=function(S){return S?function(){return new WeakSet}:c}(r);function l(S){return function(z){var R=S||z;return function(F,V,j){j===void 0&&(j=f());var L=!!F&&typeof F=="object",ae=!!V&&typeof V=="object";if(L||ae){var Q=L&&j.has(F),J=ae&&j.has(V);if(Q||J)return Q&&J;L&&j.add(F),ae&&j.add(V)}return R(F,V,j)}}}function d(S,$,z,R){var k=S.length;if($.length!==k)return!1;for(;k-- >0;)if(!z(S[k],$[k],R))return!1;return!0}function p(S,$,z,R){var k=S.size===$.size;if(k&&S.size){var F={};S.forEach(function(V,j){if(k){var L=!1,ae=0;$.forEach(function(Q,J){!L&&!F[ae]&&(L=z(j,J,R)&&z(V,Q,R),L&&(F[ae]=!0)),ae++}),k=L}})}return k}var y="_owner",h=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function m(S,$,z,R){var k=o(S),F=k.length;if(o($).length!==F)return!1;if(F)for(var V=void 0;F-- >0;){if(V=k[F],V===y){var j=s(S),L=s($);if((j||L)&&j!==L)return!1}if(!h($,V)||!z(S[V],$[V],R))return!1}return!0}function g(S,$){return S.source===$.source&&S.global===$.global&&S.ignoreCase===$.ignoreCase&&S.multiline===$.multiline&&S.unicode===$.unicode&&S.sticky===$.sticky&&S.lastIndex===$.lastIndex}function w(S,$,z,R){var k=S.size===$.size;if(k&&S.size){var F={};S.forEach(function(V){if(k){var j=!1,L=0;$.forEach(function(ae){!j&&!F[L]&&(j=z(V,ae,R),j&&(F[L]=!0)),L++}),k=j}})}return k}var N=typeof Map=="function",T=typeof Set=="function";function A(S){var $=typeof S=="function"?S(z):z;function z(R,k,F){if(R===k)return!0;if(R&&k&&typeof R=="object"&&typeof k=="object"){if(a(R)&&a(k))return m(R,k,$,F);var V=Array.isArray(R),j=Array.isArray(k);return V||j?V===j&&d(R,k,$,F):(V=R instanceof Date,j=k instanceof Date,V||j?V===j&&i(R.getTime(),k.getTime()):(V=R instanceof RegExp,j=k instanceof RegExp,V||j?V===j&&g(R,k):u(R)||u(k)?R===k:N&&(V=R instanceof Map,j=k instanceof Map,V||j)?V===j&&p(R,k,$,F):T&&(V=R instanceof Set,j=k instanceof Set,V||j)?V===j&&w(R,k,$,F):m(R,k,$,F)))}return R!==R&&k!==k}return z}var O=A(),U=A(function(){return i}),E=A(l()),W=A(l(i));n.circularDeepEqual=E,n.circularShallowEqual=W,n.createCustomEqual=A,n.deepEqual=O,n.sameValueZeroEqual=i,n.shallowEqual=U,Object.defineProperty(n,"__esModule",{value:!0})})})(Ff,Ff.exports);var qA=Ff.exports,ih;function p0(){if(ih)return No;ih=1,Object.defineProperty(No,"__esModule",{value:!0}),No.eqUnknownInterpreter=void 0;var e=q,t=qA,n=$e,r=St(),o=Oe;return No.eqUnknownInterpreter=e.memo(function(){return{_F:o.EqURI,unknown:function(i){return function(a){var u=r.eqApplyConfig(i);return n.pipe({equals:t.circularDeepEqual},function(s){return new o.EqType(u===void 0?{equals:t.circularDeepEqual}:u(s,a,{eq:s}))})}}}}),No}var jo={},ah;function h0(){if(ah)return jo;ah=1,Object.defineProperty(jo,"__esModule",{value:!0}),jo.eqNewtypeInterpreter=void 0;var e=q,t=Xt,n=St(),r=Oe,o=function(i){return i};return jo.eqNewtypeInterpreter=e.memo(function(){return{_F:r.EqURI,newtype:function(){return function(i,a){return function(u){return t.pipe(o(i(u).eq),function(s){return new r.EqType(n.eqApplyConfig(a)(s,u,{eq:s}))})}}},newtypeIso:function(i,a,u,s){return function(c){return t.pipe(a(c).eq,function(f){return new r.EqType(n.eqApplyConfig(s)({equals:function(l,d){return f.equals(i.reverseGet(l),i.reverseGet(d))}},c,{eq:f}))})}},newtypePrism:function(i,a,u,s){return function(c){return t.pipe(a(c).eq,function(f){return new r.EqType(n.eqApplyConfig(s)({equals:function(l,d){return f.equals(i.reverseGet(l),i.reverseGet(d))}},c,{eq:f}))})}}}}),jo}var $o={},uh;function y0(){if(uh)return $o;uh=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.eqRefinedInterpreter=void 0;var e=q,t=Xt,n=St(),r=Oe;return $o.eqRefinedInterpreter=e.memo(function(){return{_F:r.EqURI,refined:function(o,i,a,u){return function(s){return t.pipe(o(s).eq,function(c){return new r.EqType(n.eqApplyConfig(u)(c,s,{eq:c}))})}},constrained:function(o,i,a,u){return function(s){return t.pipe(o(s).eq,function(c){return new r.EqType(n.eqApplyConfig(u)(c,s,{eq:c}))})}}}}),$o}var sh;function LA(){return sh||(sh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Ae;t.__exportStar(u0(),e),t.__exportStar(m0(),e),t.__exportStar(s0(),e),t.__exportStar(c0(),e),t.__exportStar(l0(),e),t.__exportStar(f0(),e),t.__exportStar(d0(),e),t.__exportStar(p0(),e),t.__exportStar(h0(),e),t.__exportStar(y0(),e)}(Rl)),Rl}var ch;function St(){return ch||(ch=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.eqApplyConfig=e.EqURI=void 0;var t=Ae,n=zn,r=Oe;Object.defineProperty(e,"EqURI",{enumerable:!0,get:function(){return r.EqURI}}),t.__exportStar(LA(),e),e.eqApplyConfig=n.getApplyConfig(r.EqURI)}(Fl)),Fl}var lh;function m0(){if(lh)return So;lh=1,Object.defineProperty(So,"__esModule",{value:!0}),So.eqIntersectionInterpreter=void 0;var e=q,t=uC,n=Oe,r=St();return So.eqIntersectionInterpreter=e.memo(function(){return{_F:n.EqURI,intersection:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return function(a,u){return function(s){var c=o.map(function(f){return f(s).eq});return new n.EqType(r.eqApplyConfig(u)({equals:function(f,l){return t.fold(t.monoidAll)(c.map(function(d){return d.equals(f,l)}))}},s,{equals:c}))}}}}}),So}var Cs={};Object.defineProperty(Cs,"__esModule",{value:!0});Cs.eqUnionInterpreter=void 0;var fh=q,dh=Oe;Cs.eqUnionInterpreter=fh.memo(function(){return{_F:dh.EqURI,union:function(e){return function(t,n){return function(r){var o=e.map(function(a){return a(r).eq.equals}),i=fh.getGuardId(t,Symbol());return new dh.EqType({equals:function(a,u){if(a===u)return!0;var s=i(a);return s===i(u)&&o[s](a,u)}})}}}}});(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.modelEqInterpreter=void 0;var t=Ae,n=q,r=m0(),o=h0(),i=s0(),a=u0(),u=l0(),s=y0(),c=d0(),f=f0(),l=c0(),d=Cs,p=p0();t.__exportStar(Oe,e);var y=function(){return n.merge(d.eqUnionInterpreter(),s.eqRefinedInterpreter(),o.eqNewtypeInterpreter(),p.eqUnknownInterpreter(),a.eqPrimitiveInterpreter(),r.eqIntersectionInterpreter(),i.eqObjectInterpreter(),l.eqTaggedUnionInterpreter(),u.eqRecursiveInterpreter(),f.eqStrMapInterpreter(),c.eqSetInterpreter())};e.modelEqInterpreter=n.memo(y)})(Ev);var g0={},Eo={},Tt={},Rf={},Ss={},en={};Object.defineProperty(en,"__esModule",{value:!0});en.PreconditionFailure=void 0;class wi extends Error{constructor(t=!1){super(),this.interruptExecution=t,this.footprint=wi.SharedFootPrint}static isFailure(t){return t!=null&&t.footprint===wi.SharedFootPrint}}en.PreconditionFailure=wi;wi.SharedFootPrint=Symbol("fast-check/PreconditionFailure");Object.defineProperty(Ss,"__esModule",{value:!0});Ss.pre=void 0;const BA=en;function zA(e){if(!e)throw new BA.PreconditionFailure}Ss.pre=zA;var b0={},Ts={},Hr={},M={},Gt={},tn={},re={},ke={};Object.defineProperty(ke,"__esModule",{value:!0});ke.joinHelper=ke.takeWhileHelper=ke.takeNHelper=ke.filterHelper=ke.flatMapHelper=ke.mapHelper=ke.nilHelper=void 0;class Vf{[Symbol.iterator](){return this}next(t){return{value:t,done:!0}}}Vf.nil=new Vf;function WA(){return Vf.nil}ke.nilHelper=WA;function*GA(e,t){for(const n of e)yield t(n)}ke.mapHelper=GA;function*KA(e,t){for(const n of e)yield*t(n)}ke.flatMapHelper=KA;function*HA(e,t){for(const n of e)t(n)&&(yield n)}ke.filterHelper=HA;function*JA(e,t){for(let n=0;n<t;++n){const r=e.next();if(r.done)break;yield r.value}}ke.takeNHelper=JA;function*QA(e,t){let n=e.next();for(;!n.done&&t(n.value);)yield n.value,n=e.next()}ke.takeWhileHelper=QA;function*XA(e,t){for(let n=e.next();!n.done;n=e.next())yield n.value;for(const n of t)for(let r=n.next();!r.done;r=n.next())yield r.value}ke.joinHelper=XA;Object.defineProperty(re,"__esModule",{value:!0});re.stream=re.Stream=void 0;const Tn=ke;class ct{constructor(t){this.g=t}static nil(){return new ct((0,Tn.nilHelper)())}static of(...t){return new ct(t[Symbol.iterator]())}next(){return this.g.next()}[Symbol.iterator](){return this.g}map(t){return new ct((0,Tn.mapHelper)(this.g,t))}flatMap(t){return new ct((0,Tn.flatMapHelper)(this.g,t))}dropWhile(t){let n=!1;function*r(o){(n||!t(o))&&(n=!0,yield o)}return this.flatMap(r)}drop(t){let n=0;function r(){return n++<t}return this.dropWhile(r)}takeWhile(t){return new ct((0,Tn.takeWhileHelper)(this.g,t))}take(t){return new ct((0,Tn.takeNHelper)(this.g,t))}filter(t){return new ct((0,Tn.filterHelper)(this.g,t))}every(t){for(const n of this.g)if(!t(n))return!1;return!0}has(t){for(const n of this.g)if(t(n))return[!0,n];return[!1,null]}join(...t){return new ct((0,Tn.joinHelper)(this.g,t))}getNthOrLast(t){let n=t,r=null;for(const o of this.g){if(n--===0)return o;r=o}return r}}re.Stream=ct;function ZA(e){return new ct(e)}re.stream=ZA;var Fe={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.cloneIfNeeded=e.hasCloneMethod=e.cloneMethod=void 0,e.cloneMethod=Symbol("fast-check/cloneMethod");function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")&&e.cloneMethod in r&&typeof r[e.cloneMethod]=="function"}e.hasCloneMethod=t;function n(r){return t(r)?r[e.cloneMethod]():r}e.cloneIfNeeded=n})(Fe);Object.defineProperty(tn,"__esModule",{value:!0});tn.Shrinkable=void 0;const YA=re,Ul=Fe;class Qu{constructor(t,n=()=>YA.Stream.nil(),r=void 0){this.value_=t,this.shrink=n,this.hasToBeCloned=r!==void 0||(0,Ul.hasCloneMethod)(t),this.readOnce=!1,this.hasToBeCloned?Object.defineProperty(this,"value",{get:r!==void 0?r:this.getValue}):this.value=t}getValue(){return this.readOnce?this.value_[Ul.cloneMethod]():(this.readOnce=!0,this.value_)}applyMapper(t){if(this.hasToBeCloned){const n=t(this.value);return n instanceof Object&&(n[Ul.cloneMethod]=()=>this.applyMapper(t)),n}return t(this.value)}map(t){return new Qu(this.applyMapper(t),()=>this.shrink().map(n=>n.map(t)))}filter(t){const n=r=>t(r.value_);return new Qu(this.value,()=>this.shrink().filter(n).map(r=>r.filter(t)))}}tn.Shrinkable=Qu;Object.defineProperty(Gt,"__esModule",{value:!0});Gt.assertIsArbitrary=Gt.Arbitrary=void 0;const v0=tn;class Jr{filter(t){return new nI(this,t)}map(t){return new tI(this,t)}chain(t){return new eI(this,t)}noShrink(){return new rI(this)}withBias(t){return this}noBias(){return new oI(this)}}Gt.Arbitrary=Jr;let eI=class Uf extends Jr{constructor(t,n){super(),this.arb=t,this.fmapper=n}generate(t){const n=t.clone(),r=this.arb.generate(t),o=this.fmapper(r.value).generate(t);return Uf.shrinkChain(n,r,o,this.fmapper)}withBias(t){return this.arb.withBias(t).chain(n=>this.fmapper(n).withBias(t))}static shrinkChain(t,n,r,o){return new v0.Shrinkable(r.value,()=>n.shrink().map(i=>Uf.shrinkChain(t.clone(),i,o(i.value).generate(t.clone()),o)).join(r.shrink()))}},tI=class extends Jr{constructor(t,n){super(),this.arb=t,this.mapper=n}generate(t){return this.arb.generate(t).map(this.mapper)}withBias(t){return this.arb.withBias(t).map(this.mapper)}},nI=class extends Jr{constructor(t,n){super(),this.arb=t,this.refinement=n}generate(t){let n=this.arb.generate(t);for(;!this.refinementOnShrinkable(n);)n=this.arb.generate(t);return n.filter(this.refinement)}withBias(t){return this.arb.withBias(t).filter(this.refinement)}refinementOnShrinkable(t){return this.refinement(t.value)}},rI=class extends Jr{constructor(t){super(),this.arb=t}generate(t){return new v0.Shrinkable(this.arb.generate(t).value)}withBias(t){return this.arb.withBias(t).noShrink()}},oI=class extends Jr{constructor(t){super(),this.arb=t}generate(t){return this.arb.generate(t)}};function iI(e){if(typeof e!="object"||e===null||!("generate"in e))throw new Error("Unexpected value received: not an instance of Arbitrary")}Gt.assertIsArbitrary=iI;var Mo={},Ri={};Object.defineProperty(Ri,"__esModule",{value:!0});Ri.ArbitraryWithContextualShrink=void 0;const aI=Gt,ph=tn;function uI(e){return e[0]}class sI extends aI.Arbitrary{contextualShrinkableFor(t,n){return new ph.Shrinkable(t,()=>this.contextualShrink(t,n).map(r=>this.contextualShrinkableFor(r[0],r[1])))}shrink(t,n){const r=n===!0?this.shrunkOnceContext():void 0;return this.contextualShrink(t,r).map(uI)}shrinkableFor(t,n){return new ph.Shrinkable(t,()=>this.shrink(t,n).map(r=>this.shrinkableFor(r,!0)))}}Ri.ArbitraryWithContextualShrink=sI;var An={},de={},he={};Object.defineProperty(he,"__esModule",{value:!0});he.NextValue=void 0;const hh=Fe;class cI{constructor(t,n,r=void 0){this.value_=t,this.context=n,this.hasToBeCloned=r!==void 0||(0,hh.hasCloneMethod)(t),this.readOnce=!1,this.hasToBeCloned?Object.defineProperty(this,"value",{get:r!==void 0?r:this.getValue}):this.value=t}getValue(){return this.hasToBeCloned?this.readOnce?this.value_[hh.cloneMethod]():(this.readOnce=!0,this.value_):this.value_}}he.NextValue=cI;Object.defineProperty(de,"__esModule",{value:!0});de.assertIsNextArbitrary=de.NextArbitrary=void 0;const Xu=re,yh=Fe,Df=he;class Qr{filter(t){return new dI(this,t)}map(t,n){return new fI(this,t,n)}chain(t){return new lI(this,t)}noShrink(){return new pI(this)}noBias(){return new hI(this)}}de.NextArbitrary=Qr;class lI extends Qr{constructor(t,n){super(),this.arb=t,this.chainer=n}generate(t,n){const r=t.clone(),o=this.arb.generate(t,n);return this.valueChainer(o,t,r,n)}canShrinkWithoutContext(t){return!1}shrink(t,n){return this.isSafeContext(n)?(n.stoppedForOriginal?Xu.Stream.nil():this.arb.shrink(n.originalValue,n.originalContext).map(r=>this.valueChainer(r,n.clonedMrng.clone(),n.clonedMrng,n.originalBias))).join(n.chainedArbitrary.shrink(t,n.chainedContext).map(r=>{const o=Object.assign(Object.assign({},n),{chainedContext:r.context,stoppedForOriginal:!0});return new Df.NextValue(r.value_,o)})):Xu.Stream.nil()}valueChainer(t,n,r,o){const i=this.chainer(t.value_),a=i.generate(n,o),u={originalBias:o,originalValue:t.value_,originalContext:t.context,stoppedForOriginal:!1,chainedArbitrary:i,chainedContext:a.context,clonedMrng:r};return new Df.NextValue(a.value_,u)}isSafeContext(t){return t!=null&&typeof t=="object"&&"originalBias"in t&&"originalValue"in t&&"originalContext"in t&&"stoppedForOriginal"in t&&"chainedArbitrary"in t&&"chainedContext"in t&&"clonedMrng"in t}}class fI extends Qr{constructor(t,n,r){super(),this.arb=t,this.mapper=n,this.unmapper=r,this.bindValueMapper=this.valueMapper.bind(this)}generate(t,n){const r=this.arb.generate(t,n);return this.valueMapper(r)}canShrinkWithoutContext(t){if(this.unmapper!==void 0)try{const n=this.unmapper(t);return this.arb.canShrinkWithoutContext(n)}catch{return!1}return!1}shrink(t,n){if(this.isSafeContext(n))return this.arb.shrink(n.originalValue,n.originalContext).map(this.bindValueMapper);if(this.unmapper!==void 0){const r=this.unmapper(t);return this.arb.shrink(r,void 0).map(this.bindValueMapper)}return Xu.Stream.nil()}mapperWithCloneIfNeeded(t){const n=t.value,r=this.mapper(n);return t.hasToBeCloned&&(typeof r=="object"&&r!==null||typeof r=="function")&&Object.isExtensible(r)&&!(0,yh.hasCloneMethod)(r)&&Object.defineProperty(r,yh.cloneMethod,{get:()=>()=>this.mapperWithCloneIfNeeded(t)[0]}),[r,n]}valueMapper(t){const[n,r]=this.mapperWithCloneIfNeeded(t),o={originalValue:r,originalContext:t.context};return new Df.NextValue(n,o)}isSafeContext(t){return t!=null&&typeof t=="object"&&"originalValue"in t&&"originalContext"in t}}class dI extends Qr{constructor(t,n){super(),this.arb=t,this.refinement=n,this.bindRefinementOnValue=this.refinementOnValue.bind(this)}generate(t,n){for(;;){const r=this.arb.generate(t,n);if(this.refinementOnValue(r))return r}}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)&&this.refinement(t)}shrink(t,n){return this.arb.shrink(t,n).filter(this.bindRefinementOnValue)}refinementOnValue(t){return this.refinement(t.value)}}class pI extends Qr{constructor(t){super(),this.arb=t}generate(t,n){return this.arb.generate(t,n)}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)}shrink(t,n){return Xu.Stream.nil()}noShrink(){return this}}class hI extends Qr{constructor(t){super(),this.arb=t}generate(t,n){return this.arb.generate(t,void 0)}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)}shrink(t,n){return this.arb.shrink(t,n)}noBias(){return this}}function yI(e){if(typeof e!="object"||e===null||!("generate"in e)||!("shrink"in e)||"shrinkableFor"in e)throw new Error("Unexpected value received: not an instance of NextArbitrary")}de.assertIsNextArbitrary=yI;var mh;function md(){if(mh)return An;mh=1;var e;Object.defineProperty(An,"__esModule",{value:!0}),An.ConverterToNext=An.fromShrinkableToNextValue=void 0;const t=re,n=x0(),r=de,o=he,i="__ConverterToNext__";function a(s){return s.hasToBeCloned?new o.NextValue(s.value_,s,()=>s.value):new o.NextValue(s.value_,s)}An.fromShrinkableToNextValue=a;let u=class sn extends r.NextArbitrary{constructor(c){super(),this.arb=c,this[e]=!0}static isConverterToNext(c){return i in c}static convertIfNeeded(c){return n.ConverterFromNext.isConverterFromNext(c)?c.arb:new sn(c)}generate(c,f){const l=f!==void 0?this.arb.withBias(f).generate(c):this.arb.generate(c);return a(l)}canShrinkWithoutContext(c){return!1}shrink(c,f){return this.isSafeContext(f)?f.shrink().map(a):t.Stream.nil()}isSafeContext(c){return c!=null&&typeof c=="object"&&"value"in c&&"shrink"in c}filter(c){return sn.convertIfNeeded(this.arb.filter(c))}map(c){return sn.convertIfNeeded(this.arb.map(c))}chain(c){return sn.convertIfNeeded(this.arb.chain(f=>{const l=c(f);return sn.isConverterToNext(l)?l.arb:new n.ConverterFromNext(l)}))}noShrink(){return sn.convertIfNeeded(this.arb.noShrink())}noBias(){return sn.convertIfNeeded(this.arb.noBias())}};return An.ConverterToNext=u,e=i,An}var gh;function x0(){if(gh)return Mo;gh=1;var e;Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.ConverterFromNext=void 0;const t=Ri,n=md(),r=tn,o="__ConverterFromNext__";function i(u){return function s(c){const f=c.value_,l=()=>u.shrink(f,c.context).map(s);return c.hasToBeCloned?new r.Shrinkable(f,l,()=>c.value):new r.Shrinkable(f,l)}}let a=class Dt extends t.ArbitraryWithContextualShrink{constructor(s,c,f=void 0){super(),this.arb=s,this.legacyShrunkOnceContext=c,this.biasFactor=f,this[e]=!0,this.toShrinkable=i(s)}static isConverterFromNext(s){return o in s}static convertIfNeeded(s){return n.ConverterToNext.isConverterToNext(s)?s.arb:new Dt(s)}generate(s){const c=this.arb.generate(s,this.biasFactor);return this.toShrinkable(c)}contextualShrink(s,c){return this.arb.shrink(s,c).map(f=>[f.value_,f.context])}shrunkOnceContext(){return this.legacyShrunkOnceContext}filter(s){return Dt.convertIfNeeded(this.arb.filter(s))}map(s){return Dt.convertIfNeeded(this.arb.map(s))}chain(s){return Dt.convertIfNeeded(this.arb.chain(c=>{const f=s(c);return Dt.isConverterFromNext(f)?f.arb:new n.ConverterToNext(f)}))}noShrink(){return Dt.convertIfNeeded(this.arb.noShrink())}withBias(s){return new Dt(this.arb,this.legacyShrunkOnceContext,s)}noBias(){return Dt.convertIfNeeded(this.arb.noBias())}};return Mo.ConverterFromNext=a,e=o,Mo}Object.defineProperty(M,"__esModule",{value:!0});M.convertToNext=M.convertFromNextWithShrunkOnce=M.convertFromNext=void 0;const mI=Gt,gd=x0(),bd=md(),_0=de;function gI(e){return bd.ConverterToNext.isConverterToNext(e)?e.arb:((0,_0.assertIsNextArbitrary)(e),new gd.ConverterFromNext(e))}M.convertFromNext=gI;function bI(e,t){if(bd.ConverterToNext.isConverterToNext(e)){if(!("contextualShrink"in e.arb)||!("contextualShrinkableFor"in e.arb)||!("shrunkOnceContext"in e.arb)||!("shrink"in e.arb)||!("shrinkableFor"in e.arb))throw new Error("Conversion rejected: Underlying arbitrary is not compatible with ArbitraryWithContextualShrink");return e.arb}return(0,_0.assertIsNextArbitrary)(e),new gd.ConverterFromNext(e,t)}M.convertFromNextWithShrunkOnce=bI;function vI(e){return gd.ConverterFromNext.isConverterFromNext(e)?e.arb:((0,mI.assertIsArbitrary)(e),new bd.ConverterToNext(e))}M.convertToNext=vI;var Vi={};Object.defineProperty(Vi,"__esModule",{value:!0});Vi.TupleArbitrary=void 0;const xI=re,bh=Fe,_I=de,vh=he;class hr extends _I.NextArbitrary{constructor(t){super(),this.arbs=t;for(let n=0;n!==t.length;++n){const r=t[n];if(r==null||r.generate==null)throw new Error(`Invalid parameter encountered at index ${n}: expecting an Arbitrary`)}}static makeItCloneable(t,n){return Object.defineProperty(t,bh.cloneMethod,{value:()=>{const r=[];for(let o=0;o!==n.length;++o)r.push(n[o].value);return hr.makeItCloneable(r,n),r}})}static wrapper(t){let n=!1;const r=[],o=[];for(let i=0;i!==t.length;++i){const a=t[i];n=n||a.hasToBeCloned,r.push(a.value),o.push(a.context)}return n&&hr.makeItCloneable(r,t),new vh.NextValue(r,o)}generate(t,n){return hr.wrapper(this.arbs.map(r=>r.generate(t,n)))}canShrinkWithoutContext(t){if(!Array.isArray(t)||t.length!==this.arbs.length)return!1;for(let n=0;n!==this.arbs.length;++n)if(!this.arbs[n].canShrinkWithoutContext(t[n]))return!1;return!0}shrink(t,n){let r=xI.Stream.nil();const o=Array.isArray(n)?n:[];for(let i=0;i!==this.arbs.length;++i){const a=this.arbs[i].shrink(t[i],o[i]).map(u=>{const s=t.map((c,f)=>new vh.NextValue((0,bh.cloneIfNeeded)(c),o[f]));return s.slice(0,i).concat([u]).concat(s.slice(i+1))}).map(u=>hr.wrapper(u));r=r.join(a)}return r}}Vi.TupleArbitrary=hr;Object.defineProperty(Hr,"__esModule",{value:!0});Hr.genericTuple=void 0;const xh=M,wI=Vi;function CI(e){const t=e.map(n=>(0,xh.convertToNext)(n));return(0,xh.convertFromNext)(new wI.TupleArbitrary(t))}Hr.genericTuple=CI;var Ge={},As={},w0;Object.defineProperty(As,"__esModule",{value:!0});As.ConverterFromNextProperty=void 0;const _h=tn,C0="__ConverterFromNextProperty__";function SI(e){return function t(n){const r=()=>e.shrink(n).map(t);return n.hasToBeCloned?new _h.Shrinkable(n.value_,r,()=>n.value):new _h.Shrinkable(n.value_,r)}}class TI{constructor(t){this.property=t,this[w0]=!0,this.toShrinkable=SI(t)}static isConverterFromNext(t){return C0 in t}isAsync(){return this.property.isAsync()}generate(t,n){const r=this.property.generate(t,n);return this.toShrinkable(r)}run(t){return this.property.run(t)}}As.ConverterFromNextProperty=TI;w0=C0;var Is={},S0;Object.defineProperty(Is,"__esModule",{value:!0});Is.ConverterToNextProperty=void 0;const AI=re,wh=md(),T0="__ConverterToNextProperty__";class II{constructor(t){this.property=t,this[S0]=!0}static isConverterToNext(t){return T0 in t}isAsync(){return this.property.isAsync()}generate(t,n){const r=this.property.generate(t,n);return(0,wh.fromShrinkableToNextValue)(r)}shrink(t){return this.isSafeContext(t.context)?t.context.shrink().map(wh.fromShrinkableToNextValue):AI.Stream.nil()}isSafeContext(t){return t!=null&&typeof t=="object"&&"value"in t&&"shrink"in t}run(t){return this.property.run(t)}}Is.ConverterToNextProperty=II;S0=T0;Object.defineProperty(Ge,"__esModule",{value:!0});Ge.convertFromNextAsyncPropertyWithHooks=Ge.convertFromNextPropertyWithHooks=Ge.convertToNextProperty=Ge.convertFromNextProperty=void 0;const A0=As,I0=Is;function vd(e){return I0.ConverterToNextProperty.isConverterToNext(e)?e.property:new A0.ConverterFromNextProperty(e)}Ge.convertFromNextProperty=vd;function OI(e){return A0.ConverterFromNextProperty.isConverterFromNext(e)?e.property:new I0.ConverterToNextProperty(e)}Ge.convertToNextProperty=OI;function PI(e){const t=vd(e);return Object.assign(t,{beforeEach(r){return e.beforeEach(r),t},afterEach(r){return e.afterEach(r),t}})}Ge.convertFromNextPropertyWithHooks=PI;function NI(e){const t=vd(e);return Object.assign(t,{beforeEach(r){return e.beforeEach(r),t},afterEach(r){return e.afterEach(r),t}})}Ge.convertFromNextAsyncPropertyWithHooks=NI;var Os={},Ui={};Object.defineProperty(Ui,"__esModule",{value:!0});Ui.runIdToFrequency=void 0;const jI=e=>2+Math.floor(Math.log(e+1)/Math.log(10));Ui.runIdToFrequency=jI;var Je={};Object.defineProperty(Je,"__esModule",{value:!0});Je.resetConfigureGlobal=Je.readConfigureGlobal=Je.configureGlobal=void 0;let xd={};function $I(e){xd=e}Je.configureGlobal=$I;function EI(){return xd}Je.readConfigureGlobal=EI;function MI(){xd={}}Je.resetConfigureGlobal=MI;var Ps={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.noUndefinedAsContext=e.UndefinedContextPlaceholder=void 0;const t=he;e.UndefinedContextPlaceholder=Symbol("UndefinedContextPlaceholder");function n(r){return r.context!==void 0?r:r.hasToBeCloned?new t.NextValue(r.value_,e.UndefinedContextPlaceholder,()=>r.value):new t.NextValue(r.value_,e.UndefinedContextPlaceholder)}e.noUndefinedAsContext=n})(Ps);Object.defineProperty(Os,"__esModule",{value:!0});Os.AsyncProperty=void 0;const kI=en,FI=Ui,RI=Je,VI=re,UI=M,Dl=Ps;class Ci{constructor(t,n){this.predicate=n;const{asyncBeforeEach:r,asyncAfterEach:o,beforeEach:i,afterEach:a}=(0,RI.readConfigureGlobal)()||{};if(r!==void 0&&i!==void 0)throw Error(`Global "asyncBeforeEach" and "beforeEach" parameters can't be set at the same time when running async properties`);if(o!==void 0&&a!==void 0)throw Error(`Global "asyncAfterEach" and "afterEach" parameters can't be set at the same time when running async properties`);this.beforeEachHook=r||i||Ci.dummyHook,this.afterEachHook=o||a||Ci.dummyHook,this.arb=(0,UI.convertToNext)(t)}isAsync(){return!0}generate(t,n){const r=this.arb.generate(t,n!=null?(0,FI.runIdToFrequency)(n):void 0);return(0,Dl.noUndefinedAsContext)(r)}shrink(t){if(t.context===void 0&&!this.arb.canShrinkWithoutContext(t.value_))return VI.Stream.nil();const n=t.context!==Dl.UndefinedContextPlaceholder?t.context:void 0;return this.arb.shrink(t.value_,n).map(Dl.noUndefinedAsContext)}async run(t){await this.beforeEachHook();try{const n=await this.predicate(t);return n==null||n===!0?null:"Property failed by returning false"}catch(n){return kI.PreconditionFailure.isFailure(n)?n:n instanceof Error&&n.stack?`${n}
295
+
296
+ Stack trace: ${n.stack}`:`${n}`}finally{await this.afterEachHook()}}beforeEach(t){const n=this.beforeEachHook;return this.beforeEachHook=()=>t(n),this}afterEach(t){const n=this.afterEachHook;return this.afterEachHook=()=>t(n),this}}Os.AsyncProperty=Ci;Ci.dummyHook=()=>{};var Di={};Object.defineProperty(Di,"__esModule",{value:!0});Di.AlwaysShrinkableArbitrary=void 0;const DI=de,qI=re,ql=Ps;class LI extends DI.NextArbitrary{constructor(t){super(),this.arb=t}generate(t,n){const r=this.arb.generate(t,n);return(0,ql.noUndefinedAsContext)(r)}canShrinkWithoutContext(t){return!0}shrink(t,n){if(n===void 0&&!this.arb.canShrinkWithoutContext(t))return qI.Stream.nil();const r=n!==ql.UndefinedContextPlaceholder?n:void 0;return this.arb.shrink(t,r).map(ql.noUndefinedAsContext)}}Di.AlwaysShrinkableArbitrary=LI;Object.defineProperty(Ts,"__esModule",{value:!0});Ts.asyncProperty=void 0;const BI=Hr,zI=Ge,WI=Os,GI=Di,Ch=M;function KI(...e){if(e.length<2)throw new Error("asyncProperty expects at least two parameters");const t=e.slice(0,e.length-1),n=e[e.length-1];return(0,zI.convertFromNextAsyncPropertyWithHooks)(new WI.AsyncProperty((0,BI.genericTuple)(t.map(r=>(0,Ch.convertFromNext)(new GI.AlwaysShrinkableArbitrary((0,Ch.convertToNext)(r))))),r=>n(...r)))}Ts.asyncProperty=KI;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.asyncProperty=void 0;const t=Ts;Object.defineProperty(e,"asyncProperty",{enumerable:!0,get:function(){return t.asyncProperty}})})(b0);var O0={},Ns={},qi={};Object.defineProperty(qi,"__esModule",{value:!0});qi.Property=void 0;const HI=en,JI=Ui,QI=Je,XI=M,ZI=re,Ll=Ps;class Si{constructor(t,n){this.predicate=n;const{beforeEach:r=Si.dummyHook,afterEach:o=Si.dummyHook,asyncBeforeEach:i,asyncAfterEach:a}=(0,QI.readConfigureGlobal)()||{};if(i!==void 0)throw Error(`"asyncBeforeEach" can't be set when running synchronous properties`);if(a!==void 0)throw Error(`"asyncAfterEach" can't be set when running synchronous properties`);this.beforeEachHook=r,this.afterEachHook=o,this.arb=(0,XI.convertToNext)(t)}isAsync(){return!1}generate(t,n){const r=this.arb.generate(t,n!=null?(0,JI.runIdToFrequency)(n):void 0);return(0,Ll.noUndefinedAsContext)(r)}shrink(t){if(t.context===void 0&&!this.arb.canShrinkWithoutContext(t.value_))return ZI.Stream.nil();const n=t.context!==Ll.UndefinedContextPlaceholder?t.context:void 0;return this.arb.shrink(t.value_,n).map(Ll.noUndefinedAsContext)}run(t){this.beforeEachHook();try{const n=this.predicate(t);return n==null||n===!0?null:"Property failed by returning false"}catch(n){return HI.PreconditionFailure.isFailure(n)?n:n instanceof Error&&n.stack?`${n}
297
+
298
+ Stack trace: ${n.stack}`:`${n}`}finally{this.afterEachHook()}}beforeEach(t){const n=this.beforeEachHook;return this.beforeEachHook=()=>t(n),this}afterEach(t){const n=this.afterEachHook;return this.afterEachHook=()=>t(n),this}}qi.Property=Si;Si.dummyHook=()=>{};Object.defineProperty(Ns,"__esModule",{value:!0});Ns.property=void 0;const YI=Hr,eO=Ge,tO=qi,nO=Di,Sh=M;function rO(...e){if(e.length<2)throw new Error("property expects at least two parameters");const t=e.slice(0,e.length-1),n=e[e.length-1];return(0,eO.convertFromNextPropertyWithHooks)(new tO.Property((0,YI.genericTuple)(t.map(r=>(0,Sh.convertFromNext)(new nO.AlwaysShrinkableArbitrary((0,Sh.convertToNext)(r))))),r=>n(...r)))}Ns.property=rO;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.property=void 0;const t=Ns;Object.defineProperty(e,"property",{enumerable:!0,get:function(){return t.property}})})(O0);var Cr={},Li={},js={},X={},xt={};xt.__esModule=!0;xt.skipN=xt.unsafeSkipN=xt.generateN=xt.unsafeGenerateN=void 0;function P0(e,t){for(var n=[],r=0;r!=t;++r)n.push(e.unsafeNext());return n}xt.unsafeGenerateN=P0;function oO(e,t){var n=e.clone(),r=P0(n,t);return[r,n]}xt.generateN=oO;function N0(e,t){for(var n=0;n!=t;++n)e.unsafeNext()}xt.unsafeSkipN=N0;function iO(e,t){var n=e.clone();return N0(n,t),n}xt.skipN=iO;var Sr={};Sr.__esModule=!0;Sr.congruential32=Sr.congruential=void 0;var aO=214013,uO=2531011,sO=4294967295,cO=(1<<31)-1,Eu=function(e){return e*aO+uO&sO},Mu=function(e){return(e&cO)>>16},lO=function(){function e(t){this.seed=t}return e.prototype.min=function(){return e.min},e.prototype.max=function(){return e.max},e.prototype.clone=function(){return new e(this.seed)},e.prototype.next=function(){var t=new e(this.seed),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){return this.seed=Eu(this.seed),Mu(this.seed)},e.min=0,e.max=Math.pow(2,15)-1,e}(),fO=function(){function e(t){this.seed=t}return e.prototype.min=function(){return e.min},e.prototype.max=function(){return e.max},e.prototype.clone=function(){return new e(this.seed)},e.prototype.next=function(){var t=new e(this.seed),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){var t=Eu(this.seed),n=Mu(t),r=Eu(t),o=Mu(r);this.seed=Eu(r);var i=Mu(this.seed),a=i+(o+(n<<15)<<15);return(a+2147483648|0)+2147483648},e.min=0,e.max=4294967295,e}(),dO=function(e){return new lO(e)};Sr.congruential=dO;var pO=function(e){return new fO(e)};Sr.congruential32=pO;var j0={};(function(e){e.__esModule=!0;var t=function(){function r(o,i){this.states=o,this.index=i}return r.twist=function(o){for(var i=o.slice(),a=0;a!==r.N-r.M;++a){var u=(i[a]&r.MASK_UPPER)+(i[a+1]&r.MASK_LOWER);i[a]=i[a+r.M]^u>>>1^-(u&1)&r.A}for(var a=r.N-r.M;a!==r.N-1;++a){var s=(i[a]&r.MASK_UPPER)+(i[a+1]&r.MASK_LOWER);i[a]=i[a+r.M-r.N]^s>>>1^-(s&1)&r.A}var c=(i[r.N-1]&r.MASK_UPPER)+(i[0]&r.MASK_LOWER);return i[r.N-1]=i[r.M-1]^c>>>1^-(c&1)&r.A,i},r.seeded=function(o){var i=Array(r.N);i[0]=o;for(var a=1;a!==r.N;++a){var u=i[a-1]^i[a-1]>>>30;i[a]=Math.imul(r.F,u)+a|0}return i},r.from=function(o){return new r(r.twist(r.seeded(o)),0)},r.prototype.min=function(){return r.min},r.prototype.max=function(){return r.max},r.prototype.clone=function(){return new r(this.states,this.index)},r.prototype.next=function(){var o=new r(this.states,this.index),i=o.unsafeNext();return[i,o]},r.prototype.unsafeNext=function(){var o=this.states[this.index];return o^=this.states[this.index]>>>r.U,o^=o<<r.S&r.B,o^=o<<r.T&r.C,o^=o>>>r.L,++this.index>=r.N&&(this.states=r.twist(this.states),this.index=0),o>>>0},r.min=0,r.max=4294967295,r.N=624,r.M=397,r.R=31,r.A=2567483615,r.F=1812433253,r.U=11,r.S=7,r.B=2636928640,r.T=15,r.C=4022730752,r.L=18,r.MASK_LOWER=Math.pow(2,r.R)-1,r.MASK_UPPER=Math.pow(2,r.R),r}();function n(r){return t.from(r)}e.default=n})(j0);var $s={};$s.__esModule=!0;$s.xorshift128plus=void 0;var hO=function(){function e(t,n,r,o){this.s01=t,this.s00=n,this.s11=r,this.s10=o}return e.prototype.min=function(){return-2147483648},e.prototype.max=function(){return 2147483647},e.prototype.clone=function(){return new e(this.s01,this.s00,this.s11,this.s10)},e.prototype.next=function(){var t=new e(this.s01,this.s00,this.s11,this.s10),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){var t=this.s00^this.s00<<23,n=this.s01^(this.s01<<23|this.s00>>>9),r=t^this.s10^(t>>>18|n<<14)^(this.s10>>>5|this.s11<<27),o=n^this.s11^n>>>18^this.s11>>>5,i=this.s00+this.s10|0;return this.s01=this.s11,this.s00=this.s10,this.s11=o,this.s10=r,i},e.prototype.jump=function(){var t=new e(this.s01,this.s00,this.s11,this.s10);return t.unsafeJump(),t},e.prototype.unsafeJump=function(){for(var t=0,n=0,r=0,o=0,i=[1667051007,2321340297,1548169110,304075285],a=0;a!==4;++a)for(var u=1;u;u<<=1)i[a]&u&&(t^=this.s01,n^=this.s00,r^=this.s11,o^=this.s10),this.unsafeNext();this.s01=t,this.s00=n,this.s11=r,this.s10=o},e}(),yO=function(e){return new hO(-1,~e,e|0,0)};$s.xorshift128plus=yO;var Es={};Es.__esModule=!0;Es.xoroshiro128plus=void 0;var mO=function(){function e(t,n,r,o){this.s01=t,this.s00=n,this.s11=r,this.s10=o}return e.prototype.min=function(){return-2147483648},e.prototype.max=function(){return 2147483647},e.prototype.clone=function(){return new e(this.s01,this.s00,this.s11,this.s10)},e.prototype.next=function(){var t=new e(this.s01,this.s00,this.s11,this.s10),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){var t=this.s00+this.s10|0,n=this.s10^this.s00,r=this.s11^this.s01,o=this.s00,i=this.s01;return this.s00=o<<24^i>>>8^n^n<<16,this.s01=i<<24^o>>>8^r^(r<<16|n>>>16),this.s10=r<<5^n>>>27,this.s11=n<<5^r>>>27,t},e.prototype.jump=function(){var t=new e(this.s01,this.s00,this.s11,this.s10);return t.unsafeJump(),t},e.prototype.unsafeJump=function(){for(var t=0,n=0,r=0,o=0,i=[3639956645,3750757012,1261568508,386426335],a=0;a!==4;++a)for(var u=1;u;u<<=1)i[a]&u&&(t^=this.s01,n^=this.s00,r^=this.s11,o^=this.s10),this.unsafeNext();this.s01=t,this.s00=n,this.s11=r,this.s10=o},e}(),gO=function(e){return new mO(-1,~e,e|0,0)};Es.xoroshiro128plus=gO;var Ms={},Bi={},Re={};Re.__esModule=!0;Re.substractArrayInt64=Re.fromNumberToArrayInt64=Re.trimArrayIntInplace=Re.substractArrayIntToNew=Re.addOneToPositiveArrayInt=Re.addArrayIntToNew=void 0;function $0(e,t){if(e.sign!==t.sign)return _d(e,{sign:-t.sign,data:t.data});for(var n=[],r=0,o=e.data,i=t.data,a=o.length-1,u=i.length-1;a>=0||u>=0;--a,--u){var s=a>=0?o[a]:0,c=u>=0?i[u]:0,f=s+c+r;n.push(f>>>0),r=~~(f/4294967296)}return r!==0&&n.push(r),{sign:e.sign,data:n.reverse()}}Re.addArrayIntToNew=$0;function bO(e){e.sign=1;for(var t=e.data,n=t.length-1;n>=0;--n)if(t[n]===4294967295)t[n]=0;else return t[n]+=1,e;return t.unshift(1),e}Re.addOneToPositiveArrayInt=bO;function vO(e,t){for(var n=Math.max(e.length,t.length),r=0;r<n;++r){var o=r+e.length-n,i=r+t.length-n,a=o>=0?e[o]:0,u=i>=0?t[i]:0;if(a<u)return!0;if(a>u)return!1}return!1}function _d(e,t){if(e.sign!==t.sign)return $0(e,{sign:-t.sign,data:t.data});var n=e.data,r=t.data;if(vO(n,r)){var o=_d(t,e);return o.sign=-o.sign,o}for(var i=[],a=0,u=n.length-1,s=r.length-1;u>=0||s>=0;--u,--s){var c=u>=0?n[u]:0,f=s>=0?r[s]:0,l=c-f-a;i.push(l>>>0),a=l<0?1:0}return{sign:e.sign,data:i.reverse()}}Re.substractArrayIntToNew=_d;function xO(e){for(var t=e.data,n=0;n!==t.length&&t[n]===0;++n);return n===t.length?(e.sign=1,e.data=[0],e):(t.splice(0,n),e)}Re.trimArrayIntInplace=xO;function _O(e,t){if(t<0){var n=-t;e.sign=-1,e.data[0]=~~(n/4294967296),e.data[1]=n>>>0}else e.sign=1,e.data[0]=~~(t/4294967296),e.data[1]=t>>>0;return e}Re.fromNumberToArrayInt64=_O;function wO(e,t,n){var r=t.data[1],o=t.data[0],i=t.sign,a=n.data[1],u=n.data[0],s=n.sign;if(e.sign=1,i===1&&s===-1){var c=r+a,f=o+u+(c>4294967295?1:0);return e.data[0]=f>>>0,e.data[1]=c>>>0,e}var l=r,d=o,p=a,y=u;i===-1&&(l=a,d=u,p=r,y=o);var h=0,m=l-p;return m<0&&(h=1,m=m>>>0),e.data[0]=d-y-h,e.data[1]=m,e}Re.substractArrayInt64=wO;var zi={},Wi={};Wi.__esModule=!0;Wi.unsafeUniformIntDistributionInternal=void 0;function CO(e,t){var n=t.min(),r=t.max()-t.min()+1;if(e<=r)for(var o=t,i=r-r%e;;){var a=o.unsafeNext(),u=a-n;if(u<i)return u%e}for(var s=r*r,c=2;s<e;)s*=r,++c;for(var f=e*Math.floor(1*s/e),l=t;;){for(var d=0,p=0;p!==c;++p){var a=l.unsafeNext();d=r*d+(a-n)}if(d<f){var y=d-e*Math.floor(1*d/e);return y}}}Wi.unsafeUniformIntDistributionInternal=CO;zi.__esModule=!0;zi.unsafeUniformArrayIntDistributionInternal=void 0;var SO=Wi;function TO(e,t,n){for(var r=t.length;;){for(var o=0;o!==r;++o){var i=o===0?t[0]+1:4294967296,a=(0,SO.unsafeUniformIntDistributionInternal)(i,n);e[o]=a}for(var o=0;o!==r;++o){var u=e[o],s=t[o];if(u<s)return e;if(u>s)break}}}zi.unsafeUniformArrayIntDistributionInternal=TO;Bi.__esModule=!0;Bi.unsafeUniformArrayIntDistribution=void 0;var ko=Re,AO=zi;function IO(e,t,n){var r=(0,ko.trimArrayIntInplace)((0,ko.addOneToPositiveArrayInt)((0,ko.substractArrayIntToNew)(t,e))),o=r.data.slice(0),i=(0,AO.unsafeUniformArrayIntDistributionInternal)(o,r.data,n);return(0,ko.trimArrayIntInplace)((0,ko.addArrayIntToNew)({sign:1,data:i},e))}Bi.unsafeUniformArrayIntDistribution=IO;Ms.__esModule=!0;Ms.uniformArrayIntDistribution=void 0;var Th=Bi;function OO(e,t,n){if(n!=null){var r=n.clone();return[(0,Th.unsafeUniformArrayIntDistribution)(e,t,r),r]}return function(o){var i=o.clone();return[(0,Th.unsafeUniformArrayIntDistribution)(e,t,i),i]}}Ms.uniformArrayIntDistribution=OO;var ks={},Gi={};Gi.__esModule=!0;Gi.unsafeUniformBigIntDistribution=void 0;var In=typeof BigInt<"u"?BigInt:void 0;function PO(e,t,n){for(var r=t-e+In(1),o=In(n.min()),i=In(n.max()-n.min()+1),a=i,u=In(1);a<r;)a*=i,++u;for(var s=a-a%r;;){for(var c=In(0),f=In(0);f!==u;++f){var l=n.unsafeNext();c=i*c+(In(l)-o)}if(c<s){var d=c%r;return d+e}}}Gi.unsafeUniformBigIntDistribution=PO;ks.__esModule=!0;ks.uniformBigIntDistribution=void 0;var Ah=Gi;function NO(e,t,n){if(n!=null){var r=n.clone();return[(0,Ah.unsafeUniformBigIntDistribution)(e,t,r),r]}return function(o){var i=o.clone();return[(0,Ah.unsafeUniformBigIntDistribution)(e,t,i),i]}}ks.uniformBigIntDistribution=NO;var Fs={},Ki={};Ki.__esModule=!0;Ki.unsafeUniformIntDistribution=void 0;var jO=Wi,du=Re,$O=zi,EO=Number.MAX_SAFE_INTEGER,MO={sign:1,data:[0,0]},kO={sign:1,data:[0,0]},Ih={sign:1,data:[0,0]},Bl=[0,0];function FO(e,t,n,r){var o=n<=EO?(0,du.fromNumberToArrayInt64)(Ih,n):(0,du.substractArrayInt64)(Ih,(0,du.fromNumberToArrayInt64)(MO,t),(0,du.fromNumberToArrayInt64)(kO,e));return o.data[1]===4294967295?(o.data[0]+=1,o.data[1]=0):o.data[1]+=1,(0,$O.unsafeUniformArrayIntDistributionInternal)(Bl,o.data,r),Bl[0]*4294967296+Bl[1]+e}function RO(e,t,n){var r=t-e;if(r<=4294967295){var o=(0,jO.unsafeUniformIntDistributionInternal)(r+1,n);return o+e}return FO(e,t,r,n)}Ki.unsafeUniformIntDistribution=RO;Fs.__esModule=!0;Fs.uniformIntDistribution=void 0;var Oh=Ki;function VO(e,t,n){if(n!=null){var r=n.clone();return[(0,Oh.unsafeUniformIntDistribution)(e,t,r),r]}return function(o){var i=o.clone();return[(0,Oh.unsafeUniformIntDistribution)(e,t,i),i]}}Fs.uniformIntDistribution=VO;X.__esModule=!0;X.unsafeUniformIntDistribution=X.unsafeUniformBigIntDistribution=X.unsafeUniformArrayIntDistribution=X.uniformIntDistribution=X.uniformBigIntDistribution=X.uniformArrayIntDistribution=X.xoroshiro128plus=X.xorshift128plus=X.mersenne=X.congruential32=X.congruential=X.unsafeSkipN=X.unsafeGenerateN=X.skipN=X.generateN=X.__commitHash=X.__version=X.__type=void 0;var Rs=xt;X.generateN=Rs.generateN;X.skipN=Rs.skipN;X.unsafeGenerateN=Rs.unsafeGenerateN;X.unsafeSkipN=Rs.unsafeSkipN;var E0=Sr;X.congruential=E0.congruential;X.congruential32=E0.congruential32;var UO=j0;X.mersenne=UO.default;var DO=$s;X.xorshift128plus=DO.xorshift128plus;var qO=Es;X.xoroshiro128plus=qO.xoroshiro128plus;var LO=Ms;X.uniformArrayIntDistribution=LO.uniformArrayIntDistribution;var BO=ks;X.uniformBigIntDistribution=BO.uniformBigIntDistribution;var zO=Fs;X.uniformIntDistribution=zO.uniformIntDistribution;var WO=Bi;X.unsafeUniformArrayIntDistribution=WO.unsafeUniformArrayIntDistribution;var GO=Gi;X.unsafeUniformBigIntDistribution=GO.unsafeUniformBigIntDistribution;var KO=Ki;X.unsafeUniformIntDistribution=KO.unsafeUniformIntDistribution;var HO="commonjs";X.__type=HO;var JO="5.0.5";X.__version=JO;var QO="8b812d9651b4a18e9115aa13d84fe1b5eb9b068d";X.__commitHash=QO;(function(e){var t=K&&K.__createBinding||(Object.create?function(o,i,a,u){u===void 0&&(u=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(o,u,s)}:function(o,i,a,u){u===void 0&&(u=a),o[u]=i[a]}),n=K&&K.__exportStar||function(o,i){for(var a in o)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,o,a)};e.__esModule=!0;var r=X;e.default=r,n(X,e)})(js);var Hi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.VerbosityLevel=void 0,function(t){t[t.None=0]="None",t[t.Verbose=1]="Verbose",t[t.VeryVerbose=2]="VeryVerbose"}(e.VerbosityLevel||(e.VerbosityLevel={}))})(Hi);Object.defineProperty(Li,"__esModule",{value:!0});Li.QualifiedParameters=void 0;const ar=js,On=Hi;class se{constructor(t){const n=t||{};this.seed=se.readSeed(n),this.randomType=se.readRandomType(n),this.numRuns=se.readNumRuns(n),this.verbose=se.readVerbose(n),this.maxSkipsPerRun=se.readOrDefault(n,"maxSkipsPerRun",100),this.timeout=se.readOrDefault(n,"timeout",null),this.skipAllAfterTimeLimit=se.readOrDefault(n,"skipAllAfterTimeLimit",null),this.interruptAfterTimeLimit=se.readOrDefault(n,"interruptAfterTimeLimit",null),this.markInterruptAsFailure=se.readBoolean(n,"markInterruptAsFailure"),this.skipEqualValues=se.readBoolean(n,"skipEqualValues"),this.ignoreEqualValues=se.readBoolean(n,"ignoreEqualValues"),this.logger=se.readOrDefault(n,"logger",r=>{console.log(r)}),this.path=se.readOrDefault(n,"path",""),this.unbiased=se.readBoolean(n,"unbiased"),this.examples=se.readOrDefault(n,"examples",[]),this.endOnFailure=se.readBoolean(n,"endOnFailure"),this.reporter=se.readOrDefault(n,"reporter",null),this.asyncReporter=se.readOrDefault(n,"asyncReporter",null)}toParameters(){const t=n=>n!==null?n:void 0;return{seed:this.seed,randomType:this.randomType,numRuns:this.numRuns,maxSkipsPerRun:this.maxSkipsPerRun,timeout:t(this.timeout),skipAllAfterTimeLimit:t(this.skipAllAfterTimeLimit),interruptAfterTimeLimit:t(this.interruptAfterTimeLimit),markInterruptAsFailure:this.markInterruptAsFailure,skipEqualValues:this.skipEqualValues,ignoreEqualValues:this.ignoreEqualValues,path:this.path,logger:this.logger,unbiased:this.unbiased,verbose:this.verbose,examples:this.examples,endOnFailure:this.endOnFailure,reporter:t(this.reporter),asyncReporter:t(this.asyncReporter)}}static read(t){return new se(t)}}Li.QualifiedParameters=se;se.readSeed=e=>{if(e.seed==null)return Date.now()^Math.random()*4294967296;const t=e.seed|0;if(e.seed===t)return t;const n=e.seed-t;return t^n*4294967296};se.readRandomType=e=>{if(e.randomType==null)return ar.default.xorshift128plus;if(typeof e.randomType=="string")switch(e.randomType){case"mersenne":return ar.default.mersenne;case"congruential":return ar.default.congruential;case"congruential32":return ar.default.congruential32;case"xorshift128plus":return ar.default.xorshift128plus;case"xoroshiro128plus":return ar.default.xoroshiro128plus;default:throw new Error(`Invalid random specified: '${e.randomType}'`)}return e.randomType};se.readNumRuns=e=>e.numRuns!=null?e.numRuns:e.num_runs!=null?e.num_runs:100;se.readVerbose=e=>e.verbose==null?On.VerbosityLevel.None:typeof e.verbose=="boolean"?e.verbose===!0?On.VerbosityLevel.Verbose:On.VerbosityLevel.None:e.verbose<=On.VerbosityLevel.None?On.VerbosityLevel.None:e.verbose>=On.VerbosityLevel.VeryVerbose?On.VerbosityLevel.VeryVerbose:e.verbose|0;se.readBoolean=(e,t)=>e[t]===!0;se.readOrDefault=(e,t,n)=>{const r=e[t];return r??n};var Vs={},Us={};Object.defineProperty(Us,"__esModule",{value:!0});Us.SkipAfterProperty=void 0;const XO=en;class ZO{constructor(t,n,r,o){this.property=t,this.getTime=n,this.interruptExecution=o,this.skipAfterTime=this.getTime()+r}isAsync(){return this.property.isAsync()}generate(t,n){return this.property.generate(t,n)}shrink(t){return this.property.shrink(t)}run(t){if(this.getTime()>=this.skipAfterTime){const n=new XO.PreconditionFailure(this.interruptExecution);return this.isAsync()?Promise.resolve(n):n}return this.property.run(t)}}Us.SkipAfterProperty=ZO;var Ds={};Object.defineProperty(Ds,"__esModule",{value:!0});Ds.TimeoutProperty=void 0;const YO=e=>{let t=null;const n=new Promise(r=>{t=setTimeout(()=>{r(`Property timeout: exceeded limit of ${e} milliseconds`)},e)});return{clear:()=>clearTimeout(t),promise:n}};class eP{constructor(t,n){this.property=t,this.timeMs=n}isAsync(){return!0}generate(t,n){return this.property.generate(t,n)}shrink(t){return this.property.shrink(t)}async run(t){const n=YO(this.timeMs),r=Promise.race([this.property.run(t),n.promise]);return r.then(n.clear,n.clear),r}}Ds.TimeoutProperty=eP;var Ji={};Object.defineProperty(Ji,"__esModule",{value:!0});Ji.UnbiasedProperty=void 0;class tP{constructor(t){this.property=t}isAsync(){return this.property.isAsync()}generate(t,n){return this.property.generate(t,void 0)}shrink(t){return this.property.shrink(t)}run(t){return this.property.run(t)}}Ji.UnbiasedProperty=tP;var qs={},At={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.asyncStringify=e.possiblyAsyncStringify=e.stringify=e.stringifyInternal=e.hasAsyncToStringMethod=e.asyncToStringMethod=e.hasToStringMethod=e.toStringMethod=void 0,e.toStringMethod=Symbol("fast-check/toStringMethod");function t(l){return l!==null&&(typeof l=="object"||typeof l=="function")&&e.toStringMethod in l&&typeof l[e.toStringMethod]=="function"}e.hasToStringMethod=t,e.asyncToStringMethod=Symbol("fast-check/asyncToStringMethod");function n(l){return l!==null&&(typeof l=="object"||typeof l=="function")&&e.asyncToStringMethod in l&&typeof l[e.asyncToStringMethod]=="function"}e.hasAsyncToStringMethod=n;const r=/^Symbol\((.*)\)$/;function o(l){if(l.description!==void 0)return l.description;const d=r.exec(String(l));return d&&d[1].length?d[1]:null}function i(l){switch(l){case 0:return 1/l===Number.NEGATIVE_INFINITY?"-0":"0";case Number.NEGATIVE_INFINITY:return"Number.NEGATIVE_INFINITY";case Number.POSITIVE_INFINITY:return"Number.POSITIVE_INFINITY";default:return l===l?String(l):"Number.NaN"}}function a(l){let d=-1;for(const p in l){const y=Number(p);if(y!==d+1)return!0;d=y}return d+1!==l.length}function u(l,d,p){const y=d.concat([l]);if(typeof l=="object"&&d.indexOf(l)!==-1)return"[cyclic]";if(n(l)){const h=p(l);if(h.state==="fulfilled")return h.value}if(t(l))try{return l[e.toStringMethod]()}catch{}switch(Object.prototype.toString.call(l)){case"[object Array]":{const h=l;if(h.length>=50&&a(h)){const g=[];for(const w in h)Number.isNaN(Number(w))||g.push(`${w}:${u(h[w],y,p)}`);return g.length!==0?`Object.assign(Array(${h.length}),{${g.join(",")}})`:`Array(${h.length})`}const m=h.map(g=>u(g,y,p)).join(",");return h.length===0||h.length-1 in h?`[${m}]`:`[${m},]`}case"[object BigInt]":return`${l}n`;case"[object Boolean]":return typeof l=="boolean"?JSON.stringify(l):`new Boolean(${JSON.stringify(l)})`;case"[object Date]":{const h=l;return Number.isNaN(h.getTime())?"new Date(NaN)":`new Date(${JSON.stringify(h.toISOString())})`}case"[object Map]":return`new Map(${u(Array.from(l),y,p)})`;case"[object Null]":return"null";case"[object Number]":return typeof l=="number"?i(l):`new Number(${i(Number(l))})`;case"[object Object]":{try{const w=l.toString;if(typeof w=="function"&&w!==Object.prototype.toString)return l.toString()}catch{return"[object Object]"}const h=w=>`${w==="__proto__"?'["__proto__"]':typeof w=="symbol"?`[${u(w,y,p)}]`:JSON.stringify(w)}:${u(l[w],y,p)}`,g="{"+[...Object.keys(l).map(h),...Object.getOwnPropertySymbols(l).filter(w=>{const N=Object.getOwnPropertyDescriptor(l,w);return N&&N.enumerable}).map(h)].join(",")+"}";return Object.getPrototypeOf(l)===null?g==="{}"?"Object.create(null)":`Object.assign(Object.create(null),${g})`:g}case"[object Set]":return`new Set(${u(Array.from(l),y,p)})`;case"[object String]":return typeof l=="string"?JSON.stringify(l):`new String(${JSON.stringify(l)})`;case"[object Symbol]":{const h=l;if(Symbol.keyFor(h)!==void 0)return`Symbol.for(${JSON.stringify(Symbol.keyFor(h))})`;const m=o(h);if(m===null)return"Symbol()";const g=m.startsWith("Symbol.")&&Symbol[m.substring(7)];return h===g?m:`Symbol(${JSON.stringify(m)})`}case"[object Promise]":{const h=p(l);switch(h.state){case"fulfilled":return`Promise.resolve(${u(h.value,y,p)})`;case"rejected":return`Promise.reject(${u(h.value,y,p)})`;case"pending":return"new Promise(() => {/*pending*/})";case"unknown":default:return"new Promise(() => {/*unknown*/})"}}case"[object Error]":if(l instanceof Error)return`new Error(${u(l.message,y,p)})`;break;case"[object Undefined]":return"undefined";case"[object Int8Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Int16Array]":case"[object Uint16Array]":case"[object Int32Array]":case"[object Uint32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object BigInt64Array]":case"[object BigUint64Array]":{if(typeof Buffer<"u"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(l))return`Buffer.from(${u(Array.from(l.values()),y,p)})`;const h=Object.getPrototypeOf(l),m=h&&h.constructor&&h.constructor.name;if(typeof m=="string"){const w=l.values();return`${m}.from(${u(Array.from(w),y,p)})`}break}}try{return l.toString()}catch{return Object.prototype.toString.call(l)}}e.stringifyInternal=u;function s(l){return u(l,[],()=>({state:"unknown",value:void 0}))}e.stringify=s;function c(l){const d=Symbol(),p=[],y=new Map;function h(){let N=null;const T=()=>{N!==null&&clearTimeout(N)};return{delay:new Promise(O=>{N=setTimeout(()=>{N=null,O(d)},0)}),cancel:T}}const m={state:"unknown",value:void 0},g=function(T){const A=T;if(y.has(A))return y.get(A);const O=h(),U=e.asyncToStringMethod in T?Promise.resolve().then(()=>T[e.asyncToStringMethod]()):T;return U.catch(()=>{}),p.push(Promise.race([U,O.delay]).then(E=>{E===d?y.set(A,{state:"pending",value:void 0}):y.set(A,{state:"fulfilled",value:E}),O.cancel()},E=>{y.set(A,{state:"rejected",value:E}),O.cancel()})),y.set(A,m),m};function w(){const N=u(l,[],g);return p.length===0?N:Promise.all(p.splice(0)).then(w)}return w()}e.possiblyAsyncStringify=c;async function f(l){return Promise.resolve(c(l))}e.asyncStringify=f})(At);Object.defineProperty(qs,"__esModule",{value:!0});qs.IgnoreEqualValuesProperty=void 0;const nP=At,rP=en;function Ph(e){return e===null?new rP.PreconditionFailure:e}function oP(...e){return e[1]?e[0].then(Ph):Ph(e[0])}function iP(e,t){return oP(e,t)}class aP{constructor(t,n){this.property=t,this.skipRuns=n,this.coveredCases=new Map}isAsync(){return this.property.isAsync()}generate(t,n){return this.property.generate(t,n)}shrink(t){return this.property.shrink(t)}run(t){const n=(0,nP.stringify)(t);if(this.coveredCases.has(n)){const o=this.coveredCases.get(n);return this.skipRuns?iP(o,this.property.isAsync()):o}const r=this.property.run(t);return this.coveredCases.set(n,r),r}}qs.IgnoreEqualValuesProperty=aP;Object.defineProperty(Vs,"__esModule",{value:!0});Vs.decorateProperty=void 0;const Nh=Us,uP=Ds,sP=Ji,jh=qs,cP=Ge;function lP(e,t){let n=(0,cP.convertToNextProperty)(e);return e.isAsync()&&t.timeout!=null&&(n=new uP.TimeoutProperty(n,t.timeout)),t.unbiased&&(n=new sP.UnbiasedProperty(n)),t.skipAllAfterTimeLimit!=null&&(n=new Nh.SkipAfterProperty(n,Date.now,t.skipAllAfterTimeLimit,!1)),t.interruptAfterTimeLimit!=null&&(n=new Nh.SkipAfterProperty(n,Date.now,t.interruptAfterTimeLimit,!0)),t.skipEqualValues&&(n=new jh.IgnoreEqualValuesProperty(n,!0)),t.ignoreEqualValues&&(n=new jh.IgnoreEqualValuesProperty(n,!1)),n}Vs.decorateProperty=lP;var Ls={},Bs={},zs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionStatus=void 0,function(t){t[t.Success=0]="Success",t[t.Skipped=-1]="Skipped",t[t.Failure=1]="Failure"}(e.ExecutionStatus||(e.ExecutionStatus={}))})(zs);Object.defineProperty(Bs,"__esModule",{value:!0});Bs.RunExecution=void 0;const zl=Hi,pu=zs;class Ws{constructor(t,n){this.verbosity=t,this.interruptedAsFailure=n,this.isSuccess=()=>this.pathToFailure==null,this.firstFailure=()=>this.pathToFailure?+this.pathToFailure.split(":")[0]:-1,this.numShrinks=()=>this.pathToFailure?this.pathToFailure.split(":").length-1:0,this.rootExecutionTrees=[],this.currentLevelExecutionTrees=this.rootExecutionTrees,this.failure=null,this.numSkips=0,this.numSuccesses=0,this.interrupted=!1}appendExecutionTree(t,n){const r={status:t,value:n,children:[]};return this.currentLevelExecutionTrees.push(r),r}fail(t,n,r){if(this.verbosity>=zl.VerbosityLevel.Verbose){const o=this.appendExecutionTree(pu.ExecutionStatus.Failure,t);this.currentLevelExecutionTrees=o.children}this.pathToFailure==null?this.pathToFailure=`${n}`:this.pathToFailure+=`:${n}`,this.value=t,this.failure=r}skip(t){this.verbosity>=zl.VerbosityLevel.VeryVerbose&&this.appendExecutionTree(pu.ExecutionStatus.Skipped,t),this.pathToFailure==null&&++this.numSkips}success(t){this.verbosity>=zl.VerbosityLevel.VeryVerbose&&this.appendExecutionTree(pu.ExecutionStatus.Success,t),this.pathToFailure==null&&++this.numSuccesses}interrupt(){this.interrupted=!0}extractFailures(){if(this.isSuccess())return[];const t=[];let n=this.rootExecutionTrees;for(;n.length>0&&n[n.length-1].status===pu.ExecutionStatus.Failure;){const r=n[n.length-1];t.push(r.value),n=r.children}return t}toRunDetails(t,n,r,o){return this.isSuccess()?{failed:this.numSkips>r||this.interrupted&&this.interruptedAsFailure,interrupted:this.interrupted,numRuns:this.numSuccesses,numSkips:this.numSkips,numShrinks:0,seed:t,counterexample:null,counterexamplePath:null,error:null,failures:[],executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:o.toParameters()}:{failed:!0,interrupted:this.interrupted,numRuns:this.firstFailure()+1-this.numSkips,numSkips:this.numSkips,numShrinks:this.numShrinks(),seed:t,counterexample:this.value,counterexamplePath:Ws.mergePaths(n,this.pathToFailure),error:this.failure,failures:this.extractFailures(),executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:o.toParameters()}}}Bs.RunExecution=Ws;Ws.mergePaths=(e,t)=>{if(e.length===0)return t;const n=e.split(":"),r=t.split(":"),o=+n[n.length-1]+ +r[0];return[...n.slice(0,n.length-1),`${o}`,...r.slice(1)].join(":")};Object.defineProperty(Ls,"__esModule",{value:!0});Ls.RunnerIterator=void 0;const fP=Bs;class dP{constructor(t,n,r,o){this.sourceValues=t,this.shrink=n,this.runExecution=new fP.RunExecution(r,o),this.currentIdx=-1,this.nextValues=t}[Symbol.iterator](){return this}next(){const t=this.nextValues.next();return t.done||this.runExecution.interrupted?{done:!0,value:void 0}:(this.currentValue=t.value,++this.currentIdx,{done:!1,value:t.value.value_})}handleResult(t){t!=null&&typeof t=="string"?(this.runExecution.fail(this.currentValue.value_,this.currentIdx,t),this.currentIdx=-1,this.nextValues=this.shrink(this.currentValue)):t!=null?t.interruptExecution?this.runExecution.interrupt():(this.runExecution.skip(this.currentValue.value_),this.sourceValues.skippedOne()):this.runExecution.success(this.currentValue.value_)}}Ls.RunnerIterator=dP;var Gs={};Object.defineProperty(Gs,"__esModule",{value:!0});Gs.SourceValuesIterator=void 0;class pP{constructor(t,n,r){this.initialValues=t,this.maxInitialIterations=n,this.remainingSkips=r}[Symbol.iterator](){return this}next(){if(--this.maxInitialIterations!==-1&&this.remainingSkips>=0){const t=this.initialValues.next();if(!t.done)return{value:t.value(),done:!1}}return{value:void 0,done:!0}}skippedOne(){--this.remainingSkips,++this.maxInitialIterations}}Gs.SourceValuesIterator=pP;var Qi={},Xi={},Zi={};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.convertToRandomGenerator=void 0;class yi{constructor(t){this.rng=t,typeof this.rng.jump=="function"&&(this.jump=function(){const r=this.jump();return new yi(r)},this.unsafeJump=function(){const r=this.jump();this.rng=r})}min(){return this.rng.min()}max(){return this.rng.max()}clone(){return new yi(this.rng)}next(){const t=this.rng.next();return[t[0],new yi(t[1])]}unsafeNext(){const t=this.rng.next();return this.rng=t[1],t[0]}}function hP(e){return"clone"in e&&"unsafeNext"in e?e:new yi(e)}Zi.convertToRandomGenerator=hP;Object.defineProperty(Xi,"__esModule",{value:!0});Xi.Random=void 0;const Fo=js,yP=Zi;class lt{constructor(t){this.internalRng=(0,yP.convertToRandomGenerator)(t).clone()}clone(){return new lt(this.internalRng)}next(t){return(0,Fo.unsafeUniformIntDistribution)(0,(1<<t)-1,this.internalRng)}nextBoolean(){return(0,Fo.unsafeUniformIntDistribution)(0,1,this.internalRng)==1}nextInt(t,n){return(0,Fo.unsafeUniformIntDistribution)(t??lt.MIN_INT,n??lt.MAX_INT,this.internalRng)}nextBigInt(t,n){return(0,Fo.unsafeUniformBigIntDistribution)(t,n,this.internalRng)}nextArrayInt(t,n){return(0,Fo.unsafeUniformArrayIntDistribution)(t,n,this.internalRng)}nextDouble(){const t=this.next(26),n=this.next(27);return(t*lt.DBL_FACTOR+n)*lt.DBL_DIVISOR}}Xi.Random=lt;lt.MIN_INT=-2147483648;lt.MAX_INT=2147483647;lt.DBL_FACTOR=Math.pow(2,27);lt.DBL_DIVISOR=Math.pow(2,-53);Object.defineProperty(Qi,"__esModule",{value:!0});Qi.toss=void 0;const mP=js,gP=Xi,bP=Zi,vP=he;function xP(e,t,n){return()=>e.generate(new gP.Random(t),n)}function*_P(e,t,n,r){yield*r.map(a=>()=>new vP.NextValue(a,void 0));let o=0,i=(0,bP.convertToRandomGenerator)(n(t));for(;;)i=i.jump?i.jump():(0,mP.skipN)(i,42),yield xP(e,i,o++)}Qi.toss=_P;var Yi={};Object.defineProperty(Yi,"__esModule",{value:!0});Yi.pathWalk=void 0;const wP=re;function CP(e,t,n){let r=(0,wP.stream)(t);const o=e.split(":").map(i=>+i);if(o.length===0)return r;if(!o.every(i=>!Number.isNaN(i)))throw new Error(`Unable to replay, got invalid path=${e}`);r=r.drop(o[0]);for(const i of o.slice(1)){const a=r.getNthOrLast(0);if(a==null)throw new Error(`Unable to replay, got wrong path=${e}`);r=n(a).drop(i)}return r}Yi.pathWalk=CP;var ft={};Object.defineProperty(ft,"__esModule",{value:!0});ft.asyncDefaultReportMessage=ft.defaultReportMessage=ft.asyncReportRunDetails=ft.reportRunDetails=void 0;const qf=At,Zu=Hi,$h=zs;function SP(e){return e.length===1?`Hint: ${e[0]}`:e.map((t,n)=>`Hint (${n+1}): ${t}`).join(`
299
+ `)}function TP(e,t){return`Encountered failures were:
300
+ - ${e.map(t).join(`
301
+ - `)}`}function wd(e,t){const n=[],r=[];for(const o of e.slice().reverse())r.push({depth:1,tree:o});for(;r.length!==0;){const o=r.pop(),i=o.tree,a=o.depth,u=i.status===$h.ExecutionStatus.Success?"\x1B[32m√\x1B[0m":i.status===$h.ExecutionStatus.Failure?"\x1B[31m×\x1B[0m":"\x1B[33m!\x1B[0m",s=Array(a).join(". ");n.push(`${s}${u} ${t(i.value)}`);for(const c of i.children.slice().reverse())r.push({depth:a+1,tree:c})}return`Execution summary:
302
+ ${n.join(`
303
+ `)}`}function AP(e,t){const n=`Failed to run property, too many pre-condition failures encountered
304
+ { seed: ${e.seed} }
305
+
306
+ Ran ${e.numRuns} time(s)
307
+ Skipped ${e.numSkips} time(s)`;let r=null;const o=["Try to reduce the number of rejected values by combining map, flatMap and built-in arbitraries","Increase failure tolerance by setting maxSkipsPerRun to an higher value"];return e.verbose>=Zu.VerbosityLevel.VeryVerbose?r=wd(e.executionSummary,t):o.push("Enable verbose mode at level VeryVerbose in order to check all generated values and their associated status"),{message:n,details:r,hints:o}}function IP(e,t){const n=`Property failed after ${e.numRuns} tests
308
+ { seed: ${e.seed}, path: "${e.counterexamplePath}", endOnFailure: true }
309
+ Counterexample: ${t(e.counterexample)}
310
+ Shrunk ${e.numShrinks} time(s)
311
+ Got error: ${e.error}`;let r=null;const o=[];return e.verbose>=Zu.VerbosityLevel.VeryVerbose?r=wd(e.executionSummary,t):e.verbose===Zu.VerbosityLevel.Verbose?r=TP(e.failures,t):o.push("Enable verbose mode in order to have the list of all failing values encountered during the run"),{message:n,details:r,hints:o}}function OP(e,t){const n=`Property interrupted after ${e.numRuns} tests
312
+ { seed: ${e.seed} }`;let r=null;const o=[];return e.verbose>=Zu.VerbosityLevel.VeryVerbose?r=wd(e.executionSummary,t):o.push("Enable verbose mode at level VeryVerbose in order to check all generated values and their associated status"),{message:n,details:r,hints:o}}function Lf(e,t){if(!e.failed)return;const{message:n,details:r,hints:o}=e.counterexamplePath===null?e.interrupted?OP(e,t):AP(e,t):IP(e,t);let i=n;return r!=null&&(i+=`
313
+
314
+ ${r}`),o.length>0&&(i+=`
315
+
316
+ ${SP(o)}`),i}function M0(e){return Lf(e,qf.stringify)}ft.defaultReportMessage=M0;async function k0(e){const t=[];function n(a){const u=(0,qf.possiblyAsyncStringify)(a);return typeof u=="string"?u:(t.push(Promise.all([a,u])),"…")}const r=Lf(e,n);if(t.length===0)return r;const o=new Map(await Promise.all(t));function i(a){const u=o.get(a);return u!==void 0?u:(0,qf.stringify)(a)}return Lf(e,i)}ft.asyncDefaultReportMessage=k0;function PP(e){if(e.failed)throw new Error(M0(e))}async function NP(e){if(e.failed)throw new Error(await k0(e))}function jP(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):PP(e)}ft.reportRunDetails=jP;async function $P(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):NP(e)}ft.asyncReportRunDetails=$P;Object.defineProperty(Cr,"__esModule",{value:!0});Cr.assert=Cr.check=void 0;const Yu=re,EP=Je,MP=Li,kP=Vs,F0=Ls,FP=Gs,RP=Qi,VP=Yi,Eh=ft;function UP(e,t,n,r,o){const i=new F0.RunnerIterator(n,t,r,o);for(const a of i){const u=e.run(a);i.handleResult(u)}return i.runExecution}async function DP(e,t,n,r,o){const i=new F0.RunnerIterator(n,t,r,o);for(const a of i){const u=await e.run(a);i.handleResult(u)}return i.runExecution}function qP(e,t,n){const r=n.split(":"),o=(0,Yu.stream)(e).drop(r.length>0?+r[0]:0).map(a=>a()),i=["0",...r.slice(1)].join(":");return(0,Yu.stream)((0,VP.pathWalk)(i,o,t)).map(a=>()=>a)}function LP(e,t,n){return n.path.length===0?(0,Yu.stream)(e):qP(e,t,n.path)}function R0(e,t){if(e==null||e.generate==null)throw new Error("Invalid property encountered, please use a valid property");if(e.run==null)throw new Error("Invalid property encountered, please use a valid property not an arbitrary");const n=MP.QualifiedParameters.read(Object.assign(Object.assign({},(0,EP.readConfigureGlobal)()),t));if(n.reporter!==null&&n.asyncReporter!==null)throw new Error("Invalid parameters encountered, reporter and asyncReporter cannot be specified together");if(n.asyncReporter!==null&&!e.isAsync())throw new Error("Invalid parameters encountered, only asyncProperty can be used when asyncReporter specified");const r=(0,kP.decorateProperty)(e,n),o=(0,RP.toss)(r,n.seed,n.randomType,n.examples),i=n.path.indexOf(":")===-1?n.numRuns:-1,a=n.numRuns*n.maxSkipsPerRun,u=r.shrink.bind(r),s=LP(o,u,n),c=new FP.SourceValuesIterator(s,i,a),f=n.endOnFailure?Yu.Stream.nil:u;return r.isAsync()?DP(r,f,c,n.verbose,n.markInterruptAsFailure).then(l=>l.toRunDetails(n.seed,n.path,a,n)):UP(r,f,c,n.verbose,n.markInterruptAsFailure).toRunDetails(n.seed,n.path,a,n)}Cr.check=R0;function BP(e,t){const n=R0(e,t);if(e.isAsync())return n.then(Eh.asyncReportRunDetails);(0,Eh.reportRunDetails)(n)}Cr.assert=BP;var Tr={};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.statistics=Tr.sample=void 0;const Mh=re,zP=Ge,WP=qi,GP=Ji,es=Je,V0=Li,KP=Qi,HP=Yi;function JP(e,t){const n=Object.prototype.hasOwnProperty.call(e,"isAsync")?(0,zP.convertToNextProperty)(e):new WP.Property(e,()=>!0);return t.unbiased===!0?new GP.UnbiasedProperty(n):n}function U0(e,t){const n=typeof t=="number"?Object.assign(Object.assign({},(0,es.readConfigureGlobal)()),{numRuns:t}):Object.assign(Object.assign({},(0,es.readConfigureGlobal)()),t),r=V0.QualifiedParameters.read(n),o=JP(e,r),i=o.shrink.bind(o),a=(0,Mh.stream)((0,KP.toss)(o,r.seed,r.randomType,r.examples));return r.path.length===0?a.take(r.numRuns).map(u=>u().value_):(0,Mh.stream)((0,HP.pathWalk)(r.path,a.map(u=>u()),i)).take(r.numRuns).map(u=>u.value_)}function QP(e,t){return[...U0(e,t)]}Tr.sample=QP;function XP(e,t,n){const r=typeof n=="number"?Object.assign(Object.assign({},(0,es.readConfigureGlobal)()),{numRuns:n}):Object.assign(Object.assign({},(0,es.readConfigureGlobal)()),n),o=V0.QualifiedParameters.read(r),i={};for(const c of U0(e,n)){const f=t(c),l=Array.isArray(f)?f:[f];for(const d of l)i[d]=(i[d]||0)+1}const a=Object.entries(i).sort((c,f)=>f[1]-c[1]).map(c=>[c[0],`${(c[1]*100/o.numRuns).toFixed(2)}%`]),u=a.map(c=>c[0].length).reduce((c,f)=>Math.max(c,f),0),s=a.map(c=>c[1].length).reduce((c,f)=>Math.max(c,f),0);for(const c of a)o.logger(`${c[0].padEnd(u,".")}..${c[1].padStart(s,".")}`)}Tr.statistics=XP;var ge={},Xr={},be={},bn={},Bt={};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.biasNumericRange=Bt.bigIntLogLike=Bt.integerLogLike=void 0;function ZP(e){return Math.floor(Math.log(e)/Math.log(2))}Bt.integerLogLike=ZP;function YP(e){return e===BigInt(0)?BigInt(0):BigInt(e.toString().length)}Bt.bigIntLogLike=YP;function eN(e,t,n){if(e===t)return[{min:e,max:t}];if(e<0&&t>0){const a=n(-e),u=n(t);return[{min:-a,max:u},{min:t-u,max:t},{min:e,max:e+a}]}const r=n(t-e),o={min:e,max:e+r},i={min:t-r,max:t};return e<0?[i,o]:[o,i]}Bt.biasNumericRange=eN;var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0});Ks.shrinkInteger=void 0;const kh=he,Fh=re;function Rh(e){return Math.floor(e/2)}function Vh(e){return Math.ceil(e/2)}function tN(e,t,n){const r=e-t;function*o(){let a=n?void 0:t;const u=n?r:Rh(r);for(let s=u;s>0;s=Rh(s)){const c=s===r?t:e-s;yield new kh.NextValue(c,a),a=c}}function*i(){let a=n?void 0:t;const u=n?r:Vh(r);for(let s=u;s<0;s=Vh(s)){const c=s===r?t:e-s;yield new kh.NextValue(c,a),a=c}}return r>0?(0,Fh.stream)(o()):(0,Fh.stream)(i())}Ks.shrinkInteger=tN;Object.defineProperty(bn,"__esModule",{value:!0});bn.IntegerArbitrary=void 0;const nN=de,Uh=he,rN=re,Dh=Bt,qh=Ks;class Cd extends nN.NextArbitrary{constructor(t,n){super(),this.min=t,this.max=n}generate(t,n){const r=this.computeGenerateRange(t,n);return new Uh.NextValue(t.nextInt(r.min,r.max),void 0)}canShrinkWithoutContext(t){return typeof t=="number"&&Number.isInteger(t)&&!Object.is(t,-0)&&this.min<=t&&t<=this.max}shrink(t,n){if(!Cd.isValidContext(t,n)){const r=this.defaultTarget();return(0,qh.shrinkInteger)(t,r,!0)}return this.isLastChanceTry(t,n)?rN.Stream.of(new Uh.NextValue(n,void 0)):(0,qh.shrinkInteger)(t,n,!1)}defaultTarget(){return this.min<=0&&this.max>=0?0:this.min<0?this.max:this.min}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=(0,Dh.biasNumericRange)(this.min,this.max,Dh.integerLogLike);if(r.length===1)return r[0];const o=t.nextInt(-2*(r.length-1),r.length-2);return o<0?r[0]:r[o+1]}isLastChanceTry(t,n){return t>0?t===n+1&&t>this.min:t<0?t===n-1&&t<this.max:!1}static isValidContext(t,n){if(n===void 0)return!1;if(typeof n!="number")throw new Error("Invalid context type passed to IntegerArbitrary (#1)");if(n!==0&&Math.sign(t)!==Math.sign(n))throw new Error("Invalid context value passed to IntegerArbitrary (#2)");return!0}}bn.IntegerArbitrary=Cd;Object.defineProperty(be,"__esModule",{value:!0});be.integer=void 0;const oN=M,iN=bn;function aN(e){const t=e.min!==void 0?e.min:-2147483648,n=e.max!==void 0?e.max:2147483647;return{min:t,max:n}}function uN(e){if(e[0]===void 0)return{};if(e[1]===void 0){const n=e;return typeof n[0]=="number"?{max:n[0]}:n[0]}const t=e;return{min:t[0],max:t[1]}}function sN(...e){const t=aN(uN(e));if(t.min>t.max)throw new Error("fc.integer maximum value should be equal or greater than the minimum one");if(!Number.isInteger(t.min))throw new Error("fc.integer minimum value should be an integer");if(!Number.isInteger(t.max))throw new Error("fc.integer maximum value should be an integer");const n=new iN.IntegerArbitrary(t.min,t.max);return(0,oN.convertFromNextWithShrunkOnce)(n,n.defaultTarget())}be.integer=sN;var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.makeLazy=void 0;class cN{constructor(t){this.producer=t}[Symbol.iterator](){return this.it===void 0&&(this.it=this.producer()),this.it}next(){return this.it===void 0&&(this.it=this.producer()),this.it.next()}}function lN(e){return new cN(e)}Wn.makeLazy=lN;var Kt={};Object.defineProperty(Kt,"__esModule",{value:!0});Kt.createDepthIdentifier=Kt.getDepthContextFor=void 0;const Lh=new Map;function fN(e){if(e===void 0)return{depth:0};if(typeof e!="string")return e;const t=Lh.get(e);if(t!==void 0)return t;const n={depth:0};return Lh.set(e,n),n}Kt.getDepthContextFor=fN;function dN(){return{depth:0}}Kt.createDepthIdentifier=dN;Object.defineProperty(Xr,"__esModule",{value:!0});Xr.ArrayArbitrary=void 0;const Wl=re,Ro=Fe,Bh=be,Gl=Wn,pN=de,zh=M,ur=he,hN=Kt;function Kl(e,t){return e===t?e:e+Math.floor(Math.log(t-e)/Math.log(2))}class Sd extends pN.NextArbitrary{constructor(t,n,r,o,i,a){super(),this.arb=t,this.minLength=n,this.maxGeneratedLength=r,this.maxLength=o,this.setBuilder=a,this.lengthArb=(0,zh.convertToNext)((0,Bh.integer)(n,r)),this.depthContext=(0,hN.getDepthContextFor)(i)}preFilter(t){if(this.setBuilder===void 0)return t;const n=this.setBuilder();for(let r=0;r!==t.length;++r)n.tryAdd(t[r]);return n.getData()}static makeItCloneable(t,n){return t[Ro.cloneMethod]=()=>{const r=[];for(let o=0;o!==n.length;++o)r.push(n[o].value);return this.makeItCloneable(r,n),r},t}generateNItemsNoDuplicates(t,n,r,o){let i=0;const a=t();for(;a.size()<n&&i<this.maxGeneratedLength;){const u=this.arb.generate(r,o);a.tryAdd(u)?i=0:i+=1}return a.getData()}safeGenerateNItemsNoDuplicates(t,n,r,o){const i=Math.max(0,n-Kl(this.minLength,this.maxGeneratedLength));this.depthContext.depth+=i;try{return this.generateNItemsNoDuplicates(t,n,r,o)}finally{this.depthContext.depth-=i}}generateNItems(t,n,r){const o=[];for(let i=0;i!==t;++i){const a=this.arb.generate(n,r);o.push(a)}return o}safeGenerateNItems(t,n,r){const o=Math.max(0,t-Kl(this.minLength,this.maxGeneratedLength));this.depthContext.depth+=o;try{return this.generateNItems(t,n,r)}finally{this.depthContext.depth-=o}}wrapper(t,n,r,o){const i=n?this.preFilter(t):t;let a=!1;const u=[],s=[];for(let f=0;f!==i.length;++f){const l=i[f];a=a||l.hasToBeCloned,u.push(l.value),s.push(l.context)}a&&Sd.makeItCloneable(u,i);const c={shrunkOnce:n,lengthContext:t.length===i.length&&r!==void 0?r:void 0,itemsContexts:s,startIndex:o};return new ur.NextValue(u,c)}generate(t,n){const r=this.applyBias(t,n),o=r.size,i=this.setBuilder!==void 0?this.safeGenerateNItemsNoDuplicates(this.setBuilder,o,t,r.biasFactorItems):this.safeGenerateNItems(o,t,r.biasFactorItems);return this.wrapper(i,!1,void 0,0)}applyBias(t,n){if(n===void 0)return{size:this.lengthArb.generate(t,void 0).value};if(this.minLength===this.maxGeneratedLength)return{size:this.lengthArb.generate(t,void 0).value,biasFactorItems:n};if(t.nextInt(1,n)!==1)return{size:this.lengthArb.generate(t,void 0).value};if(t.nextInt(1,n)!==1||this.minLength===this.maxGeneratedLength)return{size:this.lengthArb.generate(t,void 0).value,biasFactorItems:n};const r=Kl(this.minLength,this.maxGeneratedLength);return{size:(0,zh.convertToNext)((0,Bh.integer)(this.minLength,r)).generate(t,void 0).value,biasFactorItems:n}}canShrinkWithoutContext(t){if(!Array.isArray(t)||this.minLength>t.length||t.length>this.maxLength)return!1;for(let r=0;r!==t.length;++r)if(!(r in t)||!this.arb.canShrinkWithoutContext(t[r]))return!1;return this.preFilter(t.map(r=>new ur.NextValue(r,void 0))).length===t.length}shrinkItemByItem(t,n,r){let o=Wl.Stream.nil();for(let i=n.startIndex;i<r;++i)o=o.join((0,Gl.makeLazy)(()=>this.arb.shrink(t[i],n.itemsContexts[i]).map(a=>{const u=t.slice(0,i).map((c,f)=>new ur.NextValue((0,Ro.cloneIfNeeded)(c),n.itemsContexts[f])),s=t.slice(i+1).map((c,f)=>new ur.NextValue((0,Ro.cloneIfNeeded)(c),n.itemsContexts[f+i+1]));return[u.concat(a).concat(s),void 0,i]})));return o}shrinkImpl(t,n){if(t.length===0)return Wl.Stream.nil();const r=n!==void 0?n:{shrunkOnce:!1,lengthContext:void 0,itemsContexts:[],startIndex:0};return this.lengthArb.shrink(t.length,r.lengthContext).drop(r.shrunkOnce&&r.lengthContext===void 0&&t.length>this.minLength+1?1:0).map(o=>{const i=t.length-o.value;return[t.slice(i).map((a,u)=>new ur.NextValue((0,Ro.cloneIfNeeded)(a),r.itemsContexts[u+i])),o.context,0]}).join((0,Gl.makeLazy)(()=>t.length>this.minLength?this.shrinkItemByItem(t,r,1):this.shrinkItemByItem(t,r,t.length))).join(t.length>this.minLength?(0,Gl.makeLazy)(()=>{const o={shrunkOnce:!1,lengthContext:void 0,itemsContexts:r.itemsContexts.slice(1),startIndex:0};return this.shrinkImpl(t.slice(1),o).filter(i=>this.minLength<=i[0].length+1).map(i=>[[new ur.NextValue((0,Ro.cloneIfNeeded)(t[0]),r.itemsContexts[0])].concat(i[0]),void 0,0])}):Wl.Stream.nil())}shrink(t,n){return this.shrinkImpl(t,n).map(r=>this.wrapper(r[0],!0,r[1],r[2]))}}Xr.ArrayArbitrary=Sd;var ht={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSize=e.depthFactorFromSizeForArbitrary=e.maxGeneratedLengthFromSizeForArbitrary=e.relativeSizeToSize=e.maxLengthFromMinLength=e.DefaultSize=e.MaxLengthUpperBound=void 0;const t=Je;e.MaxLengthUpperBound=2147483647;const n=["xsmall","small","medium","large","xlarge"],r=["-4","-3","-2","-1","=","+1","+2","+3","+4"];e.DefaultSize="small";function o(c,f){switch(f){case"xsmall":return Math.floor(1.1*c)+1;case"small":return 2*c+10;case"medium":return 11*c+100;case"large":return 101*c+1e3;case"xlarge":return 1001*c+1e4;default:throw new Error(`Unable to compute lengths based on received size: ${f}`)}}e.maxLengthFromMinLength=o;function i(c,f){const l=r.indexOf(c);if(l===-1)return c;const d=n.indexOf(f);if(d===-1)throw new Error(`Unable to offset size based on the unknown defaulted one: ${f}`);const p=d+l-4;return p<0?n[0]:p>=n.length?n[n.length-1]:n[p]}e.relativeSizeToSize=i;function a(c,f,l,d){const{baseSize:p=e.DefaultSize,defaultSizeToMaxWhenMaxSpecified:y=!0}=(0,t.readConfigureGlobal)()||{},h=c!==void 0?c:d&&y?"max":p;if(h==="max")return l;const m=i(h,p);return Math.min(o(f,m),l)}e.maxGeneratedLengthFromSizeForArbitrary=a;function u(c){if(typeof c=="number")return c;const{baseSize:f}=(0,t.readConfigureGlobal)()||{};if(c===void 0&&f===void 0)return 0;const l=f!==void 0?f:e.DefaultSize;switch(i(c!==void 0?c:l,l)){case"xsmall":return 1;case"small":return .5;case"medium":return .25;case"large":return .125;case"xlarge":return .0625}}e.depthFactorFromSizeForArbitrary=u;function s(c){const{baseSize:f=e.DefaultSize}=(0,t.readConfigureGlobal)()||{};return c===void 0?f:i(c,f)}e.resolveSize=s})(ht);Object.defineProperty(ge,"__esModule",{value:!0});ge.array=void 0;const D0=M,yN=Xr,Wh=ht;function hu(e,t,n,r,o){const i=r!==void 0?r:Wh.MaxLengthUpperBound,a=r!==void 0,u=(0,Wh.maxGeneratedLengthFromSizeForArbitrary)(t,n,i,a);return(0,D0.convertFromNext)(new yN.ArrayArbitrary(e,n,u,i,o))}function mN(e,...t){const n=(0,D0.convertToNext)(e);return t[0]===void 0?hu(n,void 0,0,void 0,void 0):typeof t[0]=="object"?hu(n,t[0].size,t[0].minLength||0,t[0].maxLength,t[0].depthIdentifier):t[1]!==void 0?hu(n,void 0,t[0],t[1],void 0):hu(n,void 0,0,t[0],void 0)}ge.array=mN;var ea={},Gn={},Hs={};Object.defineProperty(Hs,"__esModule",{value:!0});Hs.shrinkBigInt=void 0;const Gh=re,Kh=he;function yu(e){return e/BigInt(2)}function gN(e,t,n){const r=e-t;function*o(){let a=n?void 0:t;const u=n?r:yu(r);for(let s=u;s>0;s=yu(s)){const c=e-s;yield new Kh.NextValue(c,a),a=c}}function*i(){let a=n?void 0:t;const u=n?r:yu(r);for(let s=u;s<0;s=yu(s)){const c=e-s;yield new Kh.NextValue(c,a),a=c}}return r>0?(0,Gh.stream)(o()):(0,Gh.stream)(i())}Hs.shrinkBigInt=gN;Object.defineProperty(Gn,"__esModule",{value:!0});Gn.BigIntArbitrary=void 0;const bN=re,vN=de,Hh=he,Jh=Bt,Qh=Hs;class Td extends vN.NextArbitrary{constructor(t,n){super(),this.min=t,this.max=n}generate(t,n){const r=this.computeGenerateRange(t,n);return new Hh.NextValue(t.nextBigInt(r.min,r.max),void 0)}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=(0,Jh.biasNumericRange)(this.min,this.max,Jh.bigIntLogLike);if(r.length===1)return r[0];const o=t.nextInt(-2*(r.length-1),r.length-2);return o<0?r[0]:r[o+1]}canShrinkWithoutContext(t){return typeof t=="bigint"&&this.min<=t&&t<=this.max}shrink(t,n){if(!Td.isValidContext(t,n)){const r=this.defaultTarget();return(0,Qh.shrinkBigInt)(t,r,!0)}return this.isLastChanceTry(t,n)?bN.Stream.of(new Hh.NextValue(n,void 0)):(0,Qh.shrinkBigInt)(t,n,!1)}defaultTarget(){return this.min<=0&&this.max>=0?BigInt(0):this.min<0?this.max:this.min}isLastChanceTry(t,n){return t>0?t===n+BigInt(1)&&t>this.min:t<0?t===n-BigInt(1)&&t<this.max:!1}static isValidContext(t,n){if(n===void 0)return!1;if(typeof n!="bigint")throw new Error("Invalid context type passed to BigIntArbitrary (#1)");const r=t>0&&n<0||t<0&&n>0;if(n!==BigInt(0)&&r)throw new Error("Invalid context value passed to BigIntArbitrary (#2)");return!0}}Gn.BigIntArbitrary=Td;Object.defineProperty(ea,"__esModule",{value:!0});ea.bigInt=void 0;const xN=M,_N=Gn;function wN(e){const n=BigInt(-1)<<BigInt(255),r=(BigInt(1)<<BigInt(256-1))-BigInt(1),o=e.min,i=e.max;return{min:o!==void 0?o:n-(i!==void 0&&i<BigInt(0)?i*i:BigInt(0)),max:i!==void 0?i:r+(o!==void 0&&o>BigInt(0)?o*o:BigInt(0))}}function CN(e){return e[0]===void 0?{}:e[1]===void 0?e[0]:{min:e[0],max:e[1]}}function SN(...e){const t=wN(CN(e));if(t.min>t.max)throw new Error("fc.bigInt expects max to be greater than or equal to min");const n=new _N.BigIntArbitrary(t.min,t.max);return(0,xN.convertFromNextWithShrunkOnce)(n,n.defaultTarget())}ea.bigInt=SN;var Js={};Object.defineProperty(Js,"__esModule",{value:!0});Js.bigIntN=void 0;const TN=M,AN=Gn;function IN(e){if(e<1)throw new Error("fc.bigIntN expects requested number of bits to be superior or equal to 1");const t=BigInt(-1)<<BigInt(e-1),n=(BigInt(1)<<BigInt(e-1))-BigInt(1),r=new AN.BigIntArbitrary(t,n);return(0,TN.convertFromNextWithShrunkOnce)(r,r.defaultTarget())}Js.bigIntN=IN;var Qs={};Object.defineProperty(Qs,"__esModule",{value:!0});Qs.bigUint=void 0;const ON=M,PN=Gn;function NN(){return(BigInt(1)<<BigInt(256))-BigInt(1)}function jN(e){const t=typeof e=="object"?e.max:e,n=t!==void 0?t:NN();if(n<0)throw new Error("fc.bigUint expects max to be greater than or equal to zero");const r=new PN.BigIntArbitrary(BigInt(0),n);return(0,ON.convertFromNextWithShrunkOnce)(r,r.defaultTarget())}Qs.bigUint=jN;var ta={};Object.defineProperty(ta,"__esModule",{value:!0});ta.bigUintN=void 0;const $N=M,EN=Gn;function MN(e){if(e<0)throw new Error("fc.bigUintN expects requested number of bits to be superior or equal to 0");const t=BigInt(0),n=(BigInt(1)<<BigInt(e))-BigInt(1),r=new EN.BigIntArbitrary(t,n);return(0,$N.convertFromNextWithShrunkOnce)(r,r.defaultTarget())}ta.bigUintN=MN;var Zr={};Object.defineProperty(Zr,"__esModule",{value:!0});Zr.boolean=void 0;const Xh=M,kN=be;function FN(e){return e===1}function RN(e){if(typeof e!="boolean")throw new Error("Unsupported input type");return e===!0?1:0}function VN(){return(0,Xh.convertFromNext)((0,Xh.convertToNext)((0,kN.integer)({min:0,max:1})).map(FN,RN).noBias())}Zr.boolean=VN;var Xs={},Kn={},na={};Object.defineProperty(na,"__esModule",{value:!0});na.ConstantArbitrary=void 0;const Zh=re,UN=de,Hl=he,Yh=Fe;class DN extends UN.NextArbitrary{constructor(t){super(),this.values=t}generate(t,n){const r=this.values.length===1?0:t.nextInt(0,this.values.length-1),o=this.values[r];return(0,Yh.hasCloneMethod)(o)?new Hl.NextValue(o,r,()=>o[Yh.cloneMethod]()):new Hl.NextValue(o,r)}canShrinkWithoutContext(t){for(let n=0;n!==this.values.length;++n)if(Object.is(this.values[n],t))return!0;return!1}shrink(t,n){return n===0||Object.is(t,this.values[0])?Zh.Stream.nil():Zh.Stream.of(new Hl.NextValue(this.values[0],0))}}na.ConstantArbitrary=DN;Object.defineProperty(Kn,"__esModule",{value:!0});Kn.constantFrom=void 0;const qN=M,LN=na;function BN(...e){if(e.length===0)throw new Error("fc.constantFrom expects at least one parameter");return(0,qN.convertFromNext)(new LN.ConstantArbitrary(e))}Kn.constantFrom=BN;Object.defineProperty(Xs,"__esModule",{value:!0});Xs.falsy=void 0;const ey=Kn;function zN(e){return!e||!e.withBigInt?(0,ey.constantFrom)(!1,null,void 0,0,"",NaN):(0,ey.constantFrom)(!1,null,void 0,0,"",NaN,BigInt(0))}Xs.falsy=zN;var ra={},It={},Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.indexToCharStringUnmapper=Ar.indexToCharStringMapper=void 0;Ar.indexToCharStringMapper=String.fromCodePoint;function WN(e){if(typeof e!="string")throw new Error("Cannot unmap non-string");if(e.length===0||e.length>2)throw new Error("Cannot unmap string with more or less than one character");const t=e.charCodeAt(0);if(e.length===1)return t;const n=e.charCodeAt(1);if(t<55296||t>56319||n<56320||n>57343)throw new Error("Cannot unmap invalid surrogate pairs");return e.codePointAt(0)}Ar.indexToCharStringUnmapper=WN;Object.defineProperty(It,"__esModule",{value:!0});It.buildCharacterArbitrary=void 0;const ty=M,GN=be,ny=Ar;function KN(e,t,n,r){return(0,ty.convertFromNext)((0,ty.convertToNext)((0,GN.integer)(e,t)).map(o=>(0,ny.indexToCharStringMapper)(n(o)),o=>r((0,ny.indexToCharStringUnmapper)(o))))}It.buildCharacterArbitrary=KN;var Ht={};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.indexToPrintableIndexUnmapper=Ht.indexToPrintableIndexMapper=void 0;function HN(e){return e<95?e+32:e<=126?e-95:e}Ht.indexToPrintableIndexMapper=HN;function JN(e){return e>=32&&e<=126?e-32:e>=0&&e<=31?e+95:e}Ht.indexToPrintableIndexUnmapper=JN;Object.defineProperty(ra,"__esModule",{value:!0});ra.ascii=void 0;const QN=It,ry=Ht;function XN(){return(0,QN.buildCharacterArbitrary)(0,127,ry.indexToPrintableIndexMapper,ry.indexToPrintableIndexUnmapper)}ra.ascii=XN;var oa={};Object.defineProperty(oa,"__esModule",{value:!0});oa.base64=void 0;const ZN=It;function YN(e){return e<26?e+65:e<52?e+97-26:e<62?e+48-52:e===62?43:47}function ej(e){return e>=65&&e<=90?e-65:e>=97&&e<=122?e-97+26:e>=48&&e<=57?e-48+52:e===43?62:e===47?63:-1}function tj(){return(0,ZN.buildCharacterArbitrary)(0,63,YN,ej)}oa.base64=tj;var ia={};Object.defineProperty(ia,"__esModule",{value:!0});ia.char=void 0;const nj=It;function oy(e){return e}function rj(){return(0,nj.buildCharacterArbitrary)(32,126,oy,oy)}ia.char=rj;var aa={};Object.defineProperty(aa,"__esModule",{value:!0});aa.char16bits=void 0;const oj=It,iy=Ht;function ij(){return(0,oj.buildCharacterArbitrary)(0,65535,iy.indexToPrintableIndexMapper,iy.indexToPrintableIndexUnmapper)}aa.char16bits=ij;var Yr={};Object.defineProperty(Yr,"__esModule",{value:!0});Yr.fullUnicode=void 0;const aj=It,q0=Ht,Ad=57343+1-55296;function uj(e){return e<55296?(0,q0.indexToPrintableIndexMapper)(e):e+Ad}function sj(e){return e<55296?(0,q0.indexToPrintableIndexUnmapper)(e):e<=57343?-1:e-Ad}function cj(){return(0,aj.buildCharacterArbitrary)(0,1114111-Ad,uj,sj)}Yr.fullUnicode=cj;var ua={};Object.defineProperty(ua,"__esModule",{value:!0});ua.hexa=void 0;const lj=It;function fj(e){return e<10?e+48:e+97-10}function dj(e){return e<58?e-48:e>=97&&e<103?e-97+10:-1}function pj(){return(0,lj.buildCharacterArbitrary)(0,15,fj,dj)}ua.hexa=pj;var sa={};Object.defineProperty(sa,"__esModule",{value:!0});sa.unicode=void 0;const hj=It,L0=Ht,Id=57343+1-55296;function yj(e){return e<55296?(0,L0.indexToPrintableIndexMapper)(e):e+Id}function mj(e){return e<55296?(0,L0.indexToPrintableIndexUnmapper)(e):e<=57343?-1:e-Id}function gj(){return(0,hj.buildCharacterArbitrary)(0,65535-Id,yj,mj)}sa.unicode=gj;var Zs={},at={};Object.defineProperty(at,"__esModule",{value:!0});at.constant=void 0;const bj=M,vj=na;function xj(e){return(0,bj.convertFromNext)(new vj.ConstantArbitrary([e]))}at.constant=xj;Object.defineProperty(Zs,"__esModule",{value:!0});Zs.clonedConstant=void 0;const _j=at;Zs.clonedConstant=_j.constant;var Ys={};Object.defineProperty(Ys,"__esModule",{value:!0});Ys.context=void 0;const wj=Fe,Cj=at;class Od{constructor(){this.receivedLogs=[]}log(t){this.receivedLogs.push(t)}size(){return this.receivedLogs.length}toString(){return JSON.stringify({logs:this.receivedLogs})}[wj.cloneMethod](){return new Od}}function Sj(){return(0,Cj.constant)(new Od)}Ys.context=Sj;var ca={},Ir={};Object.defineProperty(Ir,"__esModule",{value:!0});Ir.timeToDateUnmapper=Ir.timeToDateMapper=void 0;function Tj(e){return new Date(e)}Ir.timeToDateMapper=Tj;function Aj(e){if(!(e instanceof Date)||e.constructor!==Date)throw new Error("Not a valid value for date unmapper");return e.getTime()}Ir.timeToDateUnmapper=Aj;Object.defineProperty(ca,"__esModule",{value:!0});ca.date=void 0;const ay=M,Ij=be,uy=Ir;function Oj(e){const t=e&&e.min!==void 0?e.min.getTime():-864e13,n=e&&e.max!==void 0?e.max.getTime():864e13;if(Number.isNaN(t))throw new Error("fc.date min must be valid instance of Date");if(Number.isNaN(n))throw new Error("fc.date max must be valid instance of Date");if(t>n)throw new Error("fc.date max must be greater or equal to min");return(0,ay.convertFromNext)((0,ay.convertToNext)((0,Ij.integer)(t,n)).map(uy.timeToDateMapper,uy.timeToDateUnmapper))}ca.date=Oj;var la={},ec={};Object.defineProperty(ec,"__esModule",{value:!0});ec.CloneArbitrary=void 0;const Pj=de,Nj=he,jj=Fe,sy=re;class Pd extends Pj.NextArbitrary{constructor(t,n){super(),this.arb=t,this.numValues=n}generate(t,n){const r=[];if(this.numValues<=0)return this.wrapper(r);for(let o=0;o!==this.numValues-1;++o)r.push(this.arb.generate(t.clone(),n));return r.push(this.arb.generate(t,n)),this.wrapper(r)}canShrinkWithoutContext(t){if(!Array.isArray(t)||t.length!==this.numValues)return!1;if(t.length===0)return!0;for(let n=1;n<t.length;++n)if(!Object.is(t[0],t[n]))return!1;return this.arb.canShrinkWithoutContext(t[0])}shrink(t,n){return t.length===0?sy.Stream.nil():new sy.Stream(this.shrinkImpl(t,n!==void 0?n:[])).map(r=>this.wrapper(r))}*shrinkImpl(t,n){const r=t.map((i,a)=>this.arb.shrink(i,n[a])[Symbol.iterator]());let o=r.map(i=>i.next());for(;!o[0].done;)yield o.map(i=>i.value),o=r.map(i=>i.next())}static makeItCloneable(t,n){return t[jj.cloneMethod]=()=>{const r=[];for(let o=0;o!==n.length;++o)r.push(n[o].value);return this.makeItCloneable(r,n),r},t}wrapper(t){let n=!1;const r=[],o=[];for(let i=0;i!==t.length;++i){const a=t[i];n=n||a.hasToBeCloned,r.push(a.value),o.push(a.context)}return n&&Pd.makeItCloneable(r,t),new Nj.NextValue(r,o)}}ec.CloneArbitrary=Pd;Object.defineProperty(la,"__esModule",{value:!0});la.clone=void 0;const cy=M,$j=ec;function Ej(e,t){return(0,cy.convertFromNext)(new $j.CloneArbitrary((0,cy.convertToNext)(e),t))}la.clone=Ej;var tc={};Object.defineProperty(tc,"__esModule",{value:!0});tc.dedup=void 0;const Mj=la;tc.dedup=Mj.clone;var fa={},we={};Object.defineProperty(we,"__esModule",{value:!0});we.tuple=void 0;const ly=M,kj=Vi;function Fj(...e){const t=e.map(n=>(0,ly.convertToNext)(n));return(0,ly.convertFromNext)(new kj.TupleArbitrary(t))}we.tuple=Fj;var Hn={},da={};Object.defineProperty(da,"__esModule",{value:!0});da.CustomEqualSet=void 0;class Rj{constructor(t){this.isEqual=t,this.data=[]}tryAdd(t){for(let n=0;n!==this.data.length;++n)if(this.isEqual(this.data[n],t))return!1;return this.data.push(t),!0}size(){return this.data.length}getData(){return this.data.slice()}}da.CustomEqualSet=Rj;var pa={};Object.defineProperty(pa,"__esModule",{value:!0});pa.StrictlyEqualSet=void 0;class Vj{constructor(t){this.selector=t,this.selectedItemsExceptNaN=new Set,this.data=[]}tryAdd(t){const n=this.selector(t);if(Number.isNaN(n))return this.data.push(t),!0;const r=this.selectedItemsExceptNaN.size;return this.selectedItemsExceptNaN.add(n),r!==this.selectedItemsExceptNaN.size?(this.data.push(t),!0):!1}size(){return this.data.length}getData(){return this.data}}pa.StrictlyEqualSet=Vj;var ha={};Object.defineProperty(ha,"__esModule",{value:!0});ha.SameValueSet=void 0;class Uj{constructor(t){this.selector=t,this.selectedItemsExceptMinusZero=new Set,this.data=[],this.hasMinusZero=!1}tryAdd(t){const n=this.selector(t);if(Object.is(n,-0))return this.hasMinusZero?!1:(this.data.push(t),this.hasMinusZero=!0,!0);const r=this.selectedItemsExceptMinusZero.size;return this.selectedItemsExceptMinusZero.add(n),r!==this.selectedItemsExceptMinusZero.size?(this.data.push(t),!0):!1}size(){return this.data.length}getData(){return this.data}}ha.SameValueSet=Uj;var ya={};Object.defineProperty(ya,"__esModule",{value:!0});ya.SameValueZeroSet=void 0;class Dj{constructor(t){this.selector=t,this.selectedItems=new Set,this.data=[]}tryAdd(t){const n=this.selector(t),r=this.selectedItems.size;return this.selectedItems.add(n),r!==this.selectedItems.size?(this.data.push(t),!0):!1}size(){return this.data.length}getData(){return this.data}}ya.SameValueZeroSet=Dj;Object.defineProperty(Hn,"__esModule",{value:!0});Hn.uniqueArray=void 0;const qj=Xr,fy=M,dy=ht,py=da,Lj=pa,Bj=ha,zj=ya;function Wj(e){if(typeof e.comparator=="function"){if(e.selector===void 0){const u=e.comparator,s=(c,f)=>u(c.value_,f.value_);return()=>new py.CustomEqualSet(s)}const r=e.comparator,o=e.selector,i=u=>o(u.value_),a=(u,s)=>r(i(u),i(s));return()=>new py.CustomEqualSet(a)}const t=e.selector||(r=>r),n=r=>t(r.value_);switch(e.comparator){case"IsStrictlyEqual":return()=>new Lj.StrictlyEqualSet(n);case"SameValueZero":return()=>new zj.SameValueZeroSet(n);case"SameValue":case void 0:return()=>new Bj.SameValueSet(n)}}function Gj(e,t={}){const n=t.minLength!==void 0?t.minLength:0,r=t.maxLength!==void 0?t.maxLength:dy.MaxLengthUpperBound,o=(0,dy.maxGeneratedLengthFromSizeForArbitrary)(t.size,n,r,t.maxLength!==void 0),i=t.depthIdentifier,a=Wj(t),u=(0,fy.convertToNext)(e),s=(0,fy.convertFromNext)(new qj.ArrayArbitrary(u,n,o,r,i,a));return n===0?s:s.filter(c=>c.length>=n)}Hn.uniqueArray=Gj;var Un={};Object.defineProperty(Un,"__esModule",{value:!0});Un.keyValuePairsToObjectUnmapper=Un.keyValuePairsToObjectMapper=void 0;function Kj(e){const t={};for(const n of e)t[n[0]]=n[1];return t}Un.keyValuePairsToObjectMapper=Kj;function Hj(e){return function(n){const r=Object.getOwnPropertyDescriptor(e,n);return r===void 0||!r.configurable||!r.enumerable||!r.writable||r.get!==void 0||r.set!==void 0}}function Jj(e){if(typeof e!="object"||e===null)throw new Error("Incompatible instance received: should be a non-null object");if(!("constructor"in e)||e.constructor!==Object)throw new Error("Incompatible instance received: should be of exact type Object");if(Object.getOwnPropertySymbols(e).length>0)throw new Error("Incompatible instance received: should contain symbols");if(Object.getOwnPropertyNames(e).find(Hj(e))!==void 0)throw new Error("Incompatible instance received: should contain only c/e/w properties without get/set");return Object.entries(e)}Un.keyValuePairsToObjectUnmapper=Jj;Object.defineProperty(fa,"__esModule",{value:!0});fa.dictionary=void 0;const hy=M,Qj=we,Xj=Hn,yy=Un;function Zj(e){return e[0]}function Yj(e,t,n={}){return(0,hy.convertFromNext)((0,hy.convertToNext)((0,Xj.uniqueArray)((0,Qj.tuple)(e,t),{minLength:n.minKeys,maxLength:n.maxKeys,size:n.size,selector:Zj})).map(yy.keyValuePairsToObjectMapper,yy.keyValuePairsToObjectUnmapper))}fa.dictionary=Yj;var nc={},eo={},Jn={},to={};Object.defineProperty(to,"__esModule",{value:!0});to.FrequencyArbitrary=void 0;const mu=re,my=M,e$=de,gy=he,t$=Kt,n$=ht;class ts extends e$.NextArbitrary{constructor(t,n,r){super(),this.warbs=t,this.constraints=n,this.context=r;let o=0;this.cumulatedWeights=[];for(let i=0;i!==t.length;++i)o+=t[i].weight,this.cumulatedWeights.push(o);this.totalWeight=o}static fromOld(t,n,r){return(0,my.convertFromNext)(ts.from(t.map(o=>Object.assign(Object.assign({},o),{arbitrary:(0,my.convertToNext)(o.arbitrary)})),n,r))}static from(t,n,r){if(t.length===0)throw new Error(`${r} expects at least one weighted arbitrary`);let o=0;for(let a=0;a!==t.length;++a){if(t[a].arbitrary===void 0)throw new Error(`${r} expects arbitraries to be specified`);const s=t[a].weight;if(o+=s,!Number.isInteger(s))throw new Error(`${r} expects weights to be integer values`);if(s<0)throw new Error(`${r} expects weights to be superior or equal to 0`)}if(o<=0)throw new Error(`${r} expects the sum of weights to be strictly superior to 0`);const i={depthFactor:(0,n$.depthFactorFromSizeForArbitrary)(n.depthFactor),depthIdentifier:n.depthIdentifier,maxDepth:n.maxDepth,withCrossShrink:n.withCrossShrink};return new ts(t,i,(0,t$.getDepthContextFor)(n.depthIdentifier))}generate(t,n){if(this.mustGenerateFirst())return this.safeGenerateForIndex(t,0,n);const r=t.nextInt(this.computeNegDepthBenefit(),this.totalWeight-1);for(let o=0;o!==this.cumulatedWeights.length;++o)if(r<this.cumulatedWeights[o])return this.safeGenerateForIndex(t,o,n);throw new Error("Unable to generate from fc.frequency")}canShrinkWithoutContext(t){return this.canShrinkWithoutContextIndex(t)!==-1}shrink(t,n){if(n!==void 0){const o=n,i=o.selectedIndex,a=o.originalBias,s=this.warbs[i].arbitrary.shrink(t,o.originalContext).map(c=>this.mapIntoNextValue(i,c,null,a));if(o.clonedMrngForFallbackFirst!==null){o.cachedGeneratedForFirst===void 0&&(o.cachedGeneratedForFirst=this.safeGenerateForIndex(o.clonedMrngForFallbackFirst,0,a));const c=o.cachedGeneratedForFirst;return mu.Stream.of(c).join(s)}return s}const r=this.canShrinkWithoutContextIndex(t);return r===-1?mu.Stream.nil():this.defaultShrinkForFirst(r).join(this.warbs[r].arbitrary.shrink(t,void 0).map(o=>this.mapIntoNextValue(r,o,null,void 0)))}defaultShrinkForFirst(t){++this.context.depth;try{if(!this.mustFallbackToFirstInShrink(t)||this.warbs[0].fallbackValue===void 0)return mu.Stream.nil()}finally{--this.context.depth}const n=new gy.NextValue(this.warbs[0].fallbackValue.default,void 0);return mu.Stream.of(this.mapIntoNextValue(0,n,null,void 0))}canShrinkWithoutContextIndex(t){if(this.mustGenerateFirst())return this.warbs[0].arbitrary.canShrinkWithoutContext(t)?0:-1;try{++this.context.depth;for(let n=0;n!==this.warbs.length;++n){const r=this.warbs[n];if(r.weight!==0&&r.arbitrary.canShrinkWithoutContext(t))return n}return-1}finally{--this.context.depth}}mapIntoNextValue(t,n,r,o){const i={selectedIndex:t,originalBias:o,originalContext:n.context,clonedMrngForFallbackFirst:r};return new gy.NextValue(n.value,i)}safeGenerateForIndex(t,n,r){++this.context.depth;try{const o=this.warbs[n].arbitrary.generate(t,r),i=this.mustFallbackToFirstInShrink(n)?t.clone():null;return this.mapIntoNextValue(n,o,i,r)}finally{--this.context.depth}}mustGenerateFirst(){return this.constraints.maxDepth!==void 0&&this.constraints.maxDepth<=this.context.depth}mustFallbackToFirstInShrink(t){return t!==0&&!!this.constraints.withCrossShrink&&this.warbs[0].weight!==0}computeNegDepthBenefit(){const t=this.constraints.depthFactor;if(t===void 0||t<=0||this.warbs[0].weight===0)return 0;const n=Math.floor(Math.pow(1+t,this.context.depth))-1;return-Math.min(this.totalWeight*n,Number.MAX_SAFE_INTEGER)||0}}to.FrequencyArbitrary=ts;Object.defineProperty(Jn,"__esModule",{value:!0});Jn.frequency=void 0;const by=to;function r$(e){return e!=null&&typeof e=="object"&&!("arbitrary"in e)}function o$(...e){const t="fc.frequency",n=e[0];return r$(n)?by.FrequencyArbitrary.fromOld(e.slice(1),n,t):by.FrequencyArbitrary.fromOld(e,{},t)}Jn.frequency=o$;var ma={},vn={};Object.defineProperty(vn,"__esModule",{value:!0});vn.nat=void 0;const i$=M,a$=bn;function u$(e){const t=typeof e=="number"?e:e&&e.max!==void 0?e.max:2147483647;if(t<0)throw new Error("fc.nat value should be greater than or equal to 0");if(!Number.isInteger(t))throw new Error("fc.nat maximum value should be an integer");const n=new a$.IntegerArbitrary(0,t);return(0,i$.convertFromNextWithShrunkOnce)(n,n.defaultTarget())}vn.nat=u$;var Or={};Object.defineProperty(Or,"__esModule",{value:!0});Or.indexToMappedConstantUnmapperFor=Or.indexToMappedConstantMapperFor=void 0;function s$(e){return function(n){let r=-1,o=0;for(;n>=o;)o+=e[++r].num;return e[r].build(n-o+e[r].num)}}Or.indexToMappedConstantMapperFor=s$;function c$(e){const t={mapping:new Map,negativeZeroIndex:void 0};let n=0;for(let r=0;r!==e.length;++r){const o=e[r];for(let i=0;i!==o.num;++i){const a=o.build(i);a===0&&1/a===Number.NEGATIVE_INFINITY?t.negativeZeroIndex=n:t.mapping.set(a,n),++n}}return t}function l$(e){let t=null;return function(r){t===null&&(t=c$(e));const o=Object.is(r,-0)?t.negativeZeroIndex:t.mapping.get(r);if(o===void 0)throw new Error("Unknown value encountered cannot be built using this mapToConstant");return o}}Or.indexToMappedConstantUnmapperFor=l$;Object.defineProperty(ma,"__esModule",{value:!0});ma.mapToConstant=void 0;const vy=M,f$=vn,xy=Or;function d$(e){if(e.length===0)throw new Error("fc.mapToConstant expects at least one option");let t=0;for(let n=0;n!==e.length;++n){if(e[n].num<0)throw new Error("fc.mapToConstant expects all options to have a number of entries greater or equal to zero");t+=e[n].num}if(t===0)throw new Error("fc.mapToConstant expects at least one choice among options");return t}function p$(...e){const t=d$(e);return(0,vy.convertFromNext)((0,vy.convertToNext)((0,f$.nat)({max:t-1})).map((0,xy.indexToMappedConstantMapperFor)(e),(0,xy.indexToMappedConstantUnmapperFor)(e)))}ma.mapToConstant=p$;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.buildAlphaNumericPercentArbitrary=e.buildAlphaNumericArbitrary=e.buildLowerAlphaNumericArbitrary=e.buildLowerAlphaArbitrary=void 0;const t=Yr,n=Jn,r=ma,o=M,i={num:26,build:h=>String.fromCharCode(h+97)},a={num:26,build:h=>String.fromCharCode(h+65)},u={num:10,build:h=>String.fromCharCode(h+48)};function s(h){const m=encodeURIComponent(h);return h!==m?m:`%${h.charCodeAt(0).toString(16)}`}function c(h){if(typeof h!="string")throw new Error("Unsupported");return decodeURIComponent(h)}const f=(0,o.convertFromNext)((0,o.convertToNext)((0,t.fullUnicode)()).map(s,c)),l=h=>(0,r.mapToConstant)(i,{num:h.length,build:m=>h[m]});e.buildLowerAlphaArbitrary=l;const d=h=>(0,r.mapToConstant)(i,u,{num:h.length,build:m=>h[m]});e.buildLowerAlphaNumericArbitrary=d;const p=h=>(0,r.mapToConstant)(i,a,u,{num:h.length,build:m=>h[m]});e.buildAlphaNumericArbitrary=p;const y=h=>(0,n.frequency)({weight:10,arbitrary:(0,e.buildAlphaNumericArbitrary)(h)},{weight:1,arbitrary:f});e.buildAlphaNumericPercentArbitrary=y})(eo);var no={},xn={};Object.defineProperty(xn,"__esModule",{value:!0});xn.option=void 0;const h$=at,y$=to;function m$(e){return typeof e=="number"?{freq:e}:e||{}}function g$(e,t){const n=m$(t),r=n.freq==null?5:n.freq,o=Object.prototype.hasOwnProperty.call(n,"nil")?n.nil:null,a=[{arbitrary:(0,h$.constant)(o),weight:1,fallbackValue:{default:o}},{arbitrary:e,weight:r}],u={withCrossShrink:!0,depthFactor:n.depthFactor,maxDepth:n.maxDepth,depthIdentifier:n.depthIdentifier};return y$.FrequencyArbitrary.fromOld(a,u,"fc.option")}xn.option=g$;var nn={},yt={};Object.defineProperty(yt,"__esModule",{value:!0});yt.extractStringConstraints=void 0;function b$(e){return e[0]!==void 0?typeof e[0]=="number"?typeof e[1]=="number"?{minLength:e[0],maxLength:e[1]}:{maxLength:e[0]}:e[0]:{}}yt.extractStringConstraints=b$;var Pr={};Object.defineProperty(Pr,"__esModule",{value:!0});Pr.patternsToStringUnmapperFor=Pr.patternsToStringMapper=void 0;const v$=ht;function x$(e){return e.join("")}Pr.patternsToStringMapper=x$;function _$(e,t){return function(r){if(typeof r!="string")throw new Error("Unsupported value");const o=t.minLength!==void 0?t.minLength:0,i=t.maxLength!==void 0?t.maxLength:v$.MaxLengthUpperBound;if(r.length===0){if(o>0)throw new Error("Unable to unmap received string");return[]}const a=[{endIndexChunks:0,nextStartIndex:1,chunks:[]}];for(;a.length>0;){const u=a.pop();for(let s=u.nextStartIndex;s<=r.length;++s){const c=r.substring(u.endIndexChunks,s);if(e.canShrinkWithoutContext(c)){const f=u.chunks.concat([c]);if(s===r.length){if(f.length<o||f.length>i)break;return f}a.push({endIndexChunks:u.endIndexChunks,nextStartIndex:s+1,chunks:u.chunks}),a.push({endIndexChunks:s,nextStartIndex:s+1,chunks:f});break}}}throw new Error("Unable to unmap received string")}}Pr.patternsToStringUnmapperFor=_$;Object.defineProperty(nn,"__esModule",{value:!0});nn.stringOf=void 0;const Jl=M,w$=ge,C$=yt,_y=Pr;function S$(e,...t){const n=(0,C$.extractStringConstraints)(t);return(0,Jl.convertFromNext)((0,Jl.convertToNext)((0,w$.array)(e,n)).map(_y.patternsToStringMapper,(0,_y.patternsToStringUnmapperFor)((0,Jl.convertToNext)(e),n)))}nn.stringOf=S$;var rc={};Object.defineProperty(rc,"__esModule",{value:!0});rc.filterInvalidSubdomainLabel=void 0;function T$(e){return e.length>63?!1:e.length<4||e[0]!=="x"||e[1]!=="n"||e[2]!=="-"||e[3]!=="-"}rc.filterInvalidSubdomainLabel=T$;var ga={};Object.defineProperty(ga,"__esModule",{value:!0});ga.adapter=void 0;const A$=de,I$=he,O$=re,B0=Symbol("adapted-value");function P$(e,t){const n=t(e.value_);return n.adapted?new I$.NextValue(n.value,B0):e}class N$ extends A$.NextArbitrary{constructor(t,n){super(),this.sourceArb=t,this.adapter=n,this.adaptNextValue=r=>P$(r,n)}generate(t,n){const r=this.sourceArb.generate(t,n);return this.adaptNextValue(r)}canShrinkWithoutContext(t){return this.sourceArb.canShrinkWithoutContext(t)&&!this.adapter(t).adapted}shrink(t,n){return n===B0?this.sourceArb.canShrinkWithoutContext(t)?this.sourceArb.shrink(t,void 0).map(this.adaptNextValue):O$.Stream.nil():this.sourceArb.shrink(t,n).map(this.adaptNextValue)}}function j$(e,t){return new N$(e,t)}ga.adapter=j$;Object.defineProperty(no,"__esModule",{value:!0});no.domain=void 0;const $$=ge,Bf=eo,E$=xn,z0=nn,zf=we,M$=rc,ns=M,wy=ht,k$=ga;function F$([e,t]){return t===null?e:`${e}${t[0]}${t[1]}`}function R$(e){if(typeof e!="string"||e.length===0)throw new Error("Unsupported");return e.length===1?[e[0],null]:[e[0],[e.substring(1,e.length-1),e[e.length-1]]]}function V$(e){const t=(0,Bf.buildLowerAlphaNumericArbitrary)([]),n=(0,Bf.buildLowerAlphaNumericArbitrary)(["-"]);return(0,ns.convertFromNext)((0,ns.convertToNext)((0,zf.tuple)(t,(0,E$.option)((0,zf.tuple)((0,z0.stringOf)(n,{size:e,maxLength:61}),t)))).map(F$,R$).filter(M$.filterInvalidSubdomainLabel))}function U$(e){return`${e[0].join(".")}.${e[1]}`}function D$(e){if(typeof e!="string")throw new Error("Unsupported type");const t=e.lastIndexOf(".");return[e.substring(0,t).split("."),e.substring(t+1)]}function q$(e){const[t,n]=e;let r=n.length;for(let o=0;o!==t.length;++o)if(r+=1+t[o].length,r>255)return{adapted:!0,value:[t.slice(0,o),n]};return{adapted:!1,value:e}}function L$(e={}){const t=(0,wy.resolveSize)(e.size),n=(0,wy.relativeSizeToSize)("-1",t),r=(0,Bf.buildLowerAlphaArbitrary)([]),o=(0,z0.stringOf)(r,{minLength:2,maxLength:63,size:n});return(0,ns.convertFromNext)((0,k$.adapter)((0,ns.convertToNext)((0,zf.tuple)((0,$$.array)(V$(t),{size:n,minLength:1,maxLength:127}),o)),q$).map(U$,D$))}no.domain=L$;Object.defineProperty(nc,"__esModule",{value:!0});nc.emailAddress=void 0;const B$=ge,z$=eo,W$=no,G$=nn,K$=we,gu=M,H$=ga;function J$(e){let t=e[0].length;for(let n=1;n!==e.length;++n)if(t+=1+e[n].length,t>64)return{adapted:!0,value:e.slice(0,n)};return{adapted:!1,value:e}}function Q$(e){return e.join(".")}function X$(e){if(typeof e!="string")throw new Error("Unsupported");return e.split(".")}function Z$(e){return`${e[0]}@${e[1]}`}function Y$(e){if(typeof e!="string")throw new Error("Unsupported");return e.split("@",2)}function eE(e={}){const t=["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"],n=(0,z$.buildLowerAlphaNumericArbitrary)(t),r=(0,gu.convertFromNext)((0,H$.adapter)((0,gu.convertToNext)((0,B$.array)((0,G$.stringOf)(n,{minLength:1,maxLength:64,size:e.size}),{minLength:1,maxLength:32,size:e.size})),J$).map(Q$,X$));return(0,gu.convertFromNext)((0,gu.convertToNext)((0,K$.tuple)(r,(0,W$.domain)({size:e.size}))).map(Z$,Y$))}nc.emailAddress=eE;var Qn={},oc={},ic={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.logLike64=e.halve64=e.add64=e.negative64=e.substract64=e.clone64=e.isStrictlySmaller64=e.isEqual64=e.isStrictlyPositive64=e.isStrictlyNegative64=e.isZero64=e.Unit64=e.Zero64=void 0,e.Zero64={sign:1,data:[0,0]},e.Unit64={sign:1,data:[0,1]};function t(h){return h.data[0]===0&&h.data[1]===0}e.isZero64=t;function n(h){return h.sign===-1&&!t(h)}e.isStrictlyNegative64=n;function r(h){return h.sign===1&&!t(h)}e.isStrictlyPositive64=r;function o(h,m){return h.data[0]===m.data[0]&&h.data[1]===m.data[1]?h.sign===m.sign||h.data[0]===0&&h.data[1]===0:!1}e.isEqual64=o;function i(h,m){return h[0]<m[0]||h[0]===m[0]&&h[1]<m[1]}function a(h,m){return h.sign===m.sign?h.sign===1?i(h.data,m.data):i(m.data,h.data):h.sign===-1&&(!t(h)||!t(m))}e.isStrictlySmaller64=a;function u(h){return{sign:h.sign,data:[h.data[0],h.data[1]]}}e.clone64=u;function s(h,m){let g=0,w=h[1]-m[1];return w<0&&(g=1,w=w>>>0),[h[0]-m[0]-g,w]}function c(h,m){if(h.sign===1&&m.sign===-1){const g=h.data[1]+m.data[1];return{sign:1,data:[h.data[0]+m.data[0]+(g>4294967295?1:0)>>>0,g>>>0]}}return{sign:1,data:h.sign===1?s(h.data,m.data):s(m.data,h.data)}}function f(h,m){if(a(h,m)){const g=c(m,h);return g.sign=-1,g}return c(h,m)}e.substract64=f;function l(h){return{sign:-h.sign,data:[h.data[0],h.data[1]]}}e.negative64=l;function d(h,m){return t(m)?t(h)?u(e.Zero64):u(h):f(h,l(m))}e.add64=d;function p(h){return{sign:h.sign,data:[Math.floor(h.data[0]/2),(h.data[0]%2===1?2147483648:0)+Math.floor(h.data[1]/2)]}}e.halve64=p;function y(h){return{sign:h.sign,data:[0,Math.floor(Math.log(h.data[0]*4294967296+h.data[1])/Math.log(2))]}}e.logLike64=y})(ic);var ac={};Object.defineProperty(ac,"__esModule",{value:!0});ac.arrayInt64=void 0;const Cy=re,tE=M,nE=de,Ql=he,Y=ic;class Nd extends nE.NextArbitrary{constructor(t,n){super(),this.min=t,this.max=n,this.biasedRanges=null}generate(t,n){const r=this.computeGenerateRange(t,n),o=t.nextArrayInt(r.min,r.max);return o.data.length===1&&o.data.unshift(0),new Ql.NextValue(o,void 0)}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=this.retrieveBiasedRanges();if(r.length===1)return r[0];const o=t.nextInt(-2*(r.length-1),r.length-2);return o<0?r[0]:r[o+1]}canShrinkWithoutContext(t){const n=t;return typeof t=="object"&&t!==null&&(n.sign===-1||n.sign===1)&&Array.isArray(n.data)&&n.data.length===2&&((0,Y.isStrictlySmaller64)(this.min,n)&&(0,Y.isStrictlySmaller64)(n,this.max)||(0,Y.isEqual64)(this.min,n)||(0,Y.isEqual64)(this.max,n))}shrinkArrayInt64(t,n,r){const o=(0,Y.substract64)(t,n);function*i(){let a=r?void 0:n;const u=r?o:(0,Y.halve64)(o);for(let s=u;!(0,Y.isZero64)(s);s=(0,Y.halve64)(s)){const c=(0,Y.substract64)(t,s);yield new Ql.NextValue(c,a),a=c}}return(0,Cy.stream)(i())}shrink(t,n){if(!Nd.isValidContext(t,n)){const r=this.defaultTarget();return this.shrinkArrayInt64(t,r,!0)}return this.isLastChanceTry(t,n)?Cy.Stream.of(new Ql.NextValue(n,void 0)):this.shrinkArrayInt64(t,n,!1)}defaultTarget(){return!(0,Y.isStrictlyPositive64)(this.min)&&!(0,Y.isStrictlyNegative64)(this.max)?Y.Zero64:(0,Y.isStrictlyNegative64)(this.min)?this.max:this.min}isLastChanceTry(t,n){return(0,Y.isZero64)(t)?!1:t.sign===1?(0,Y.isEqual64)(t,(0,Y.add64)(n,Y.Unit64))&&(0,Y.isStrictlyPositive64)((0,Y.substract64)(t,this.min)):(0,Y.isEqual64)(t,(0,Y.substract64)(n,Y.Unit64))&&(0,Y.isStrictlyNegative64)((0,Y.substract64)(t,this.max))}static isValidContext(t,n){if(n===void 0)return!1;if(typeof n!="object"||n===null||!("sign"in n)||!("data"in n))throw new Error("Invalid context type passed to ArrayInt64Arbitrary (#1)");return!0}retrieveBiasedRanges(){if(this.biasedRanges!=null)return this.biasedRanges;if((0,Y.isEqual64)(this.min,this.max))return this.biasedRanges=[{min:this.min,max:this.max}],this.biasedRanges;const t=(0,Y.isStrictlyNegative64)(this.min),n=(0,Y.isStrictlyPositive64)(this.max);if(t&&n){const r=(0,Y.logLike64)(this.min),o=(0,Y.logLike64)(this.max);this.biasedRanges=[{min:r,max:o},{min:(0,Y.substract64)(this.max,o),max:this.max},{min:this.min,max:(0,Y.substract64)(this.min,r)}]}else{const r=(0,Y.logLike64)((0,Y.substract64)(this.max,this.min)),o={min:this.min,max:(0,Y.add64)(this.min,r)},i={min:(0,Y.substract64)(this.max,r),max:this.max};this.biasedRanges=t?[i,o]:[o,i]}return this.biasedRanges}}function rE(e,t){const n=new Nd(e,t);return(0,tE.convertFromNextWithShrunkOnce)(n,n.defaultTarget())}ac.arrayInt64=rE;var fn={};Object.defineProperty(fn,"__esModule",{value:!0});fn.indexToDouble=fn.doubleToIndex=fn.decomposeDouble=void 0;const Wf=ic,W0={sign:1,data:[2146435072,0]},oE={sign:-1,data:[2146435072,1]};function G0(e){const t=2-Number.EPSILON;for(let n=-1022;n!==1024;++n){const r=2**n,o=t*r;if(Math.abs(e)<=o)return{exponent:n,significand:e/r}}return{exponent:Number.NaN,significand:Number.NaN}}fn.decomposeDouble=G0;function Sy(e){return[~~(e/4294967296),e>>>0]}function Ty(e,t){if(e===-1022){const i=t*4503599627370496;return Sy(i)}const n=(t-1)*2**52,r=(e+1023)*2**20,o=Sy(n);return o[0]+=r,o}function iE(e){if(e===Number.POSITIVE_INFINITY)return(0,Wf.clone64)(W0);if(e===Number.NEGATIVE_INFINITY)return(0,Wf.clone64)(oE);const t=G0(e),n=t.exponent,r=t.significand;if(e>0||e===0&&1/e===Number.POSITIVE_INFINITY)return{sign:1,data:Ty(n,r)};{const o=Ty(n,-r);return o[1]===4294967295?(o[0]+=1,o[1]=0):o[1]+=1,{sign:-1,data:o}}}fn.doubleToIndex=iE;function K0(e){if(e.sign===-1){const o={sign:1,data:[e.data[0],e.data[1]]};return o.data[1]===0?(o.data[0]-=1,o.data[1]=4294967295):o.data[1]-=1,-K0(o)}if((0,Wf.isEqual64)(e,W0))return Number.POSITIVE_INFINITY;if(e.data[0]<2097152)return(e.data[0]*4294967296+e.data[1])*2**-1074;const t=e.data[0]-2097152,n=-1021+(t>>20);return(1+((t&1048575)*2**32+e.data[1])*Number.EPSILON)*2**n}fn.indexToDouble=K0;Object.defineProperty(oc,"__esModule",{value:!0});oc.doubleNext=void 0;const Vt=ic,Ay=ac,mi=fn,bu=M;function Iy(e,t){if(Number.isNaN(e))throw new Error("fc.doubleNext constraints."+t+" must be a 32-bit float");return(0,mi.doubleToIndex)(e)}function aE(e){if(typeof e!="number")throw new Error("Unsupported type");return(0,mi.doubleToIndex)(e)}function uE(e={}){const{noDefaultInfinity:t=!1,noNaN:n=!1,min:r=t?-Number.MAX_VALUE:Number.NEGATIVE_INFINITY,max:o=t?Number.MAX_VALUE:Number.POSITIVE_INFINITY}=e,i=Iy(r,"min"),a=Iy(o,"max");if((0,Vt.isStrictlySmaller64)(a,i))throw new Error("fc.doubleNext constraints.min must be smaller or equal to constraints.max");if(n)return(0,bu.convertFromNext)((0,bu.convertToNext)((0,Ay.arrayInt64)(i,a)).map(mi.indexToDouble,aE));const u=(0,Vt.isStrictlyPositive64)(a),s=u?i:(0,Vt.substract64)(i,Vt.Unit64),c=u?(0,Vt.add64)(a,Vt.Unit64):a;return(0,bu.convertFromNext)((0,bu.convertToNext)((0,Ay.arrayInt64)(s,c)).map(f=>(0,Vt.isStrictlySmaller64)(a,f)||(0,Vt.isStrictlySmaller64)(f,i)?Number.NaN:(0,mi.indexToDouble)(f),f=>{if(typeof f!="number")throw new Error("Unsupported type");return Number.isNaN(f)?(0,Vt.isEqual64)(a,c)?s:c:(0,mi.doubleToIndex)(f)}))}oc.doubleNext=uE;Object.defineProperty(Qn,"__esModule",{value:!0});Qn.double=void 0;const sE=be,cE=we,lE=oc;function Oy(e){return(0,sE.integer)(0,(1<<e)-1)}const fE=Math.pow(2,27),dE=Math.pow(2,-53),vu=()=>(0,cE.tuple)(Oy(26),Oy(27)).map(e=>(e[0]*fE+e[1])*dE);function pE(...e){if(typeof e[0]=="object"){if(e[0].next)return(0,lE.doubleNext)(e[0]);const t=e[0].min!==void 0?e[0].min:0,n=e[0].max!==void 0?e[0].max:1;return vu().map(r=>t+r*(n-t)).filter(r=>r!==n||r===t)}else{const t=e[0],n=e[1];return t===void 0?vu():n===void 0?vu().map(r=>r*t).filter(r=>r!==t||r===0):vu().map(r=>t+r*(n-t)).filter(r=>r!==n||r===t)}}Qn.double=pE;var ba={},uc={},Ue={};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.indexToFloat=Ue.floatToIndex=Ue.decomposeFloat=Ue.EPSILON_32=Ue.MAX_VALUE_32=Ue.MIN_VALUE_32=void 0;Ue.MIN_VALUE_32=2**-126*2**-23;Ue.MAX_VALUE_32=2**127*(1+(2**23-1)/2**23);Ue.EPSILON_32=2**-23;const H0=2139095040,hE=-2139095041;function J0(e){const t=1.9999998807907104;for(let n=-126;n!==128;++n){const r=2**n,o=t*r;if(Math.abs(e)<=o)return{exponent:n,significand:e/r}}return{exponent:Number.NaN,significand:Number.NaN}}Ue.decomposeFloat=J0;function Py(e,t){return e===-126?t*8388608:(e+127)*8388608+(t-1)*8388608}function yE(e){if(e===Number.POSITIVE_INFINITY)return H0;if(e===Number.NEGATIVE_INFINITY)return hE;const t=J0(e),n=t.exponent,r=t.significand;return Number.isNaN(n)||Number.isNaN(r)||!Number.isInteger(r*8388608)?Number.NaN:e>0||e===0&&1/e===Number.POSITIVE_INFINITY?Py(n,r):-Py(n,-r)-1}Ue.floatToIndex=yE;function Q0(e){if(e<0)return-Q0(-e-1);if(e===H0)return Number.POSITIVE_INFINITY;if(e<16777216)return e*2**-149;const t=e-16777216,n=-125+(t>>23);return(1+(t&8388607)/8388608)*2**n}Ue.indexToFloat=Q0;Object.defineProperty(uc,"__esModule",{value:!0});uc.floatNext=void 0;const Ny=be,Lt=Ue,xu=M;function jy(e,t){const n="you can convert any double to a 32-bit float by using `new Float32Array([myDouble])[0]`",r="fc.floatNext constraints."+t+" must be a 32-bit float - "+n;if(Number.isNaN(e)||Number.isFinite(e)&&(e<-Lt.MAX_VALUE_32||e>Lt.MAX_VALUE_32))throw new Error(r);const o=(0,Lt.floatToIndex)(e);if(!Number.isInteger(o))throw new Error(r);return o}function mE(e){if(typeof e!="number")throw new Error("Unsupported type");return(0,Lt.floatToIndex)(e)}function gE(e={}){const{noDefaultInfinity:t=!1,noNaN:n=!1,min:r=t?-Lt.MAX_VALUE_32:Number.NEGATIVE_INFINITY,max:o=t?Lt.MAX_VALUE_32:Number.POSITIVE_INFINITY}=e,i=jy(r,"min"),a=jy(o,"max");if(i>a)throw new Error("fc.floatNext constraints.min must be smaller or equal to constraints.max");if(n)return(0,xu.convertFromNext)((0,xu.convertToNext)((0,Ny.integer)({min:i,max:a})).map(Lt.indexToFloat,mE));const u=a>0?i:i-1,s=a>0?a+1:a;return(0,xu.convertFromNext)((0,xu.convertToNext)((0,Ny.integer)({min:u,max:s})).map(c=>c>a||c<i?Number.NaN:(0,Lt.indexToFloat)(c),c=>{if(typeof c!="number")throw new Error("Unsupported type");return Number.isNaN(c)?a!==s?s:u:(0,Lt.floatToIndex)(c)}))}uc.floatNext=gE;Object.defineProperty(ba,"__esModule",{value:!0});ba.float=void 0;const bE=uc,vE=be;function xE(e){return(0,vE.integer)(0,(1<<e)-1)}const _u=()=>xE(24).map(e=>e/(1<<24));function _E(...e){if(typeof e[0]=="object"){if(e[0].next)return(0,bE.floatNext)(e[0]);const t=e[0].min!==void 0?e[0].min:0,n=e[0].max!==void 0?e[0].max:1;return _u().map(r=>t+r*(n-t)).filter(r=>r!==n||r===t)}else{const t=e[0],n=e[1];return t===void 0?_u():n===void 0?_u().map(r=>r*t).filter(r=>r!==t||r===0):_u().map(r=>t+r*(n-t)).filter(r=>r!==n||r===t)}}ba.float=_E;var sc={},va={},hn={};Object.defineProperty(hn,"__esModule",{value:!0});hn.escapeForMultilineComments=hn.escapeForTemplateString=void 0;function wE(e){return e.replace(/([$`\\])/g,"\\$1").replace(/\r/g,"\\r")}hn.escapeForTemplateString=wE;function CE(e){return e.replace(/\*\//g,"*\\/")}hn.escapeForMultilineComments=CE;var ro={};Object.defineProperty(ro,"__esModule",{value:!0});ro.hash=void 0;const ze=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function SE(e){let t=4294967295;for(let n=0;n<e.length;++n){const r=e.charCodeAt(n);if(r<128)t=ze[t&255^r]^t>>8;else if(r<2048)t=ze[t&255^(192|r>>6&31)]^t>>8,t=ze[t&255^(128|r&63)]^t>>8;else if(r>=55296&&r<57344){const o=e.charCodeAt(++n);if(r>=56320||o<56320||o>57343||Number.isNaN(o))n-=1,t=ze[t&255^239]^t>>8,t=ze[t&255^191]^t>>8,t=ze[t&255^189]^t>>8;else{const i=(r&1023)+64,a=o&1023;t=ze[t&255^(240|i>>8&7)]^t>>8,t=ze[t&255^(128|i>>2&63)]^t>>8,t=ze[t&255^(128|a>>6&15|(i&3)<<4)]^t>>8,t=ze[t&255^(128|a&63)]^t>>8}}else t=ze[t&255^(224|r>>12&15)]^t>>8,t=ze[t&255^(128|r>>6&63)]^t>>8,t=ze[t&255^(128|r&63)]^t>>8}return(t|0)+2147483648}ro.hash=SE;Object.defineProperty(va,"__esModule",{value:!0});va.buildCompareFunctionArbitrary=void 0;const TE=hn,AE=Fe,$y=ro,Xl=At,Ey=be,IE=we;function OE(e){return(0,IE.tuple)((0,Ey.integer)().noShrink(),(0,Ey.integer)(1,4294967295).noShrink()).map(([t,n])=>{const r=()=>{const o={};return Object.assign((a,u)=>{const s=(0,Xl.stringify)(a),c=(0,Xl.stringify)(u),f=(0,$y.hash)(`${t}${s}`)%n,l=(0,$y.hash)(`${t}${c}`)%n,d=e(f,l);return o[`[${s},${c}]`]=d,d},{toString:()=>{const a=Object.keys(o).sort().map(u=>`${u} => ${(0,Xl.stringify)(o[u])}`).map(u=>`/* ${(0,TE.escapeForMultilineComments)(u)} */`);return`function(a, b) {
317
+ // With hash and stringify coming from fast-check${a.length!==0?`
318
+ ${a.join(`
319
+ `)}`:""}
320
+ const cmp = ${e};
321
+ const hA = hash('${t}' + stringify(a)) % ${n};
322
+ const hB = hash('${t}' + stringify(b)) % ${n};
323
+ return cmp(hA, hB);
324
+ }`},[AE.cloneMethod]:r})};return r()})}va.buildCompareFunctionArbitrary=OE;Object.defineProperty(sc,"__esModule",{value:!0});sc.compareBooleanFunc=void 0;const PE=va;function NE(){return(0,PE.buildCompareFunctionArbitrary)(Object.assign((e,t)=>e<t,{toString(){return"(hA, hB) => hA < hB"}}))}sc.compareBooleanFunc=NE;var cc={};Object.defineProperty(cc,"__esModule",{value:!0});cc.compareFunc=void 0;const jE=va;function $E(){return(0,jE.buildCompareFunctionArbitrary)(Object.assign((e,t)=>e-t,{toString(){return"(hA, hB) => hA - hB"}}))}cc.compareFunc=$E;var lc={};Object.defineProperty(lc,"__esModule",{value:!0});lc.func=void 0;const EE=ro,Pn=At,Zl=Fe,ME=ge,kE=be,FE=we,RE=hn;function VE(e){return(0,FE.tuple)((0,ME.array)(e,{minLength:1}),(0,kE.integer)().noShrink()).map(([t,n])=>{const r=()=>{const o={},i=(...u)=>{const s=(0,Pn.stringify)(u),c=t[(0,EE.hash)(`${n}${s}`)%t.length];return o[s]=c,(0,Zl.hasCloneMethod)(c)?c[Zl.cloneMethod]():c};function a(u){const s=Object.keys(o).sort().map(c=>`${c} => ${(0,Pn.stringify)(o[c])}`).map(c=>`/* ${(0,RE.escapeForMultilineComments)(c)} */`);return`function(...args) {
325
+ // With hash and stringify coming from fast-check${s.length!==0?`
326
+ ${s.join(`
327
+ `)}`:""}
328
+ const outs = ${u};
329
+ return outs[hash('${n}' + stringify(args)) % outs.length];
330
+ }`}return Object.defineProperties(i,{toString:{value:()=>a((0,Pn.stringify)(t))},[Pn.toStringMethod]:{value:()=>a((0,Pn.stringify)(t))},[Pn.asyncToStringMethod]:{value:async()=>a(await(0,Pn.asyncStringify)(t))},[Zl.cloneMethod]:{value:r,configurable:!0}})};return r()})}lc.func=VE;var xa={};Object.defineProperty(xa,"__esModule",{value:!0});xa.maxSafeInteger=void 0;const UE=M,DE=bn;function qE(){const e=new DE.IntegerArbitrary(Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);return(0,UE.convertFromNextWithShrunkOnce)(e,e.defaultTarget())}xa.maxSafeInteger=qE;var fc={};Object.defineProperty(fc,"__esModule",{value:!0});fc.maxSafeNat=void 0;const LE=M,BE=bn;function zE(){const e=new BE.IntegerArbitrary(0,Number.MAX_SAFE_INTEGER);return(0,LE.convertFromNextWithShrunkOnce)(e,e.defaultTarget())}fc.maxSafeNat=zE;var oo={},zt={};Object.defineProperty(zt,"__esModule",{value:!0});zt.natToStringifiedNatUnmapper=zt.tryParseStringifiedNat=zt.natToStringifiedNatMapper=void 0;function WE(e){const[t,n]=e;switch(t){case"oct":return`0${Number(n).toString(8)}`;case"hex":return`0x${Number(n).toString(16)}`;case"dec":default:return`${n}`}}zt.natToStringifiedNatMapper=WE;function ku(e,t){const n=Number.parseInt(e,t);if(n.toString(t)!==e)throw new Error("Invalid value");return n}zt.tryParseStringifiedNat=ku;function GE(e){if(typeof e!="string")throw new Error("Invalid type");return e.length>=2&&e[0]==="0"?e[1]==="x"?["hex",ku(e.substr(2),16)]:["oct",ku(e.substr(1),8)]:["dec",ku(e,10)]}zt.natToStringifiedNatUnmapper=GE;Object.defineProperty(oo,"__esModule",{value:!0});oo.ipV4=void 0;const My=M,wu=vn,KE=we,HE=zt;function JE(e){return e.join(".")}function QE(e){if(typeof e!="string")throw new Error("Invalid type");return e.split(".").map(t=>(0,HE.tryParseStringifiedNat)(t,10))}function XE(){return(0,My.convertFromNext)((0,My.convertToNext)((0,KE.tuple)((0,wu.nat)(255),(0,wu.nat)(255),(0,wu.nat)(255),(0,wu.nat)(255))).map(JE,QE))}oo.ipV4=XE;var _a={},Ot={};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.oneof=void 0;const ky=to;function ZE(e){return e!=null&&typeof e=="object"&&!("generate"in e)}function YE(...e){const t=e[0];if(ZE(t)){const r=e.slice(1).map(o=>({arbitrary:o,weight:1}));return ky.FrequencyArbitrary.fromOld(r,t,"fc.oneof")}const n=e.map(r=>({arbitrary:r,weight:1}));return ky.FrequencyArbitrary.fromOld(n,{},"fc.oneof")}Ot.oneof=YE;var dc={};Object.defineProperty(dc,"__esModule",{value:!0});dc.buildStringifiedNatArbitrary=void 0;const Fy=M,eM=Kn,tM=vn,nM=we,Ry=zt;function rM(e){return(0,Fy.convertFromNext)((0,Fy.convertToNext)((0,nM.tuple)((0,eM.constantFrom)("dec","oct","hex"),(0,tM.nat)(e))).map(Ry.natToStringifiedNatMapper,Ry.natToStringifiedNatUnmapper))}dc.buildStringifiedNatArbitrary=rM;Object.defineProperty(_a,"__esModule",{value:!0});_a.ipV4Extended=void 0;const oM=Ot,Yl=we,bt=dc,sr=M;function ef(e){return e.join(".")}function tf(e){if(typeof e!="string")throw new Error("Invalid type");return e.split(".")}function iM(){return(0,oM.oneof)((0,sr.convertFromNext)((0,sr.convertToNext)((0,Yl.tuple)((0,bt.buildStringifiedNatArbitrary)(255),(0,bt.buildStringifiedNatArbitrary)(255),(0,bt.buildStringifiedNatArbitrary)(255),(0,bt.buildStringifiedNatArbitrary)(255))).map(ef,tf)),(0,sr.convertFromNext)((0,sr.convertToNext)((0,Yl.tuple)((0,bt.buildStringifiedNatArbitrary)(255),(0,bt.buildStringifiedNatArbitrary)(255),(0,bt.buildStringifiedNatArbitrary)(65535))).map(ef,tf)),(0,sr.convertFromNext)((0,sr.convertToNext)((0,Yl.tuple)((0,bt.buildStringifiedNatArbitrary)(255),(0,bt.buildStringifiedNatArbitrary)(16777215))).map(ef,tf)),(0,bt.buildStringifiedNatArbitrary)(4294967295))}_a.ipV4Extended=iM;var wa={},Ca={},pt={};Object.defineProperty(pt,"__esModule",{value:!0});pt.codePointsToStringUnmapper=pt.codePointsToStringMapper=void 0;function aM(e){return e.join("")}pt.codePointsToStringMapper=aM;function uM(e){if(typeof e!="string")throw new Error("Cannot unmap the passed value");return[...e]}pt.codePointsToStringUnmapper=uM;Object.defineProperty(Ca,"__esModule",{value:!0});Ca.hexaString=void 0;const Vy=M,sM=ge,cM=ua,lM=yt,Uy=pt;function fM(...e){const t=(0,lM.extractStringConstraints)(e);return(0,Vy.convertFromNext)((0,Vy.convertToNext)((0,sM.array)((0,cM.hexa)(),t)).map(Uy.codePointsToStringMapper,Uy.codePointsToStringUnmapper))}Ca.hexaString=fM;var le={};Object.defineProperty(le,"__esModule",{value:!0});le.noTrailingUnmapper=le.noTrailingMapper=le.singleTrailingUnmapper=le.singleTrailingMapper=le.multiTrailingUnmapperOne=le.multiTrailingMapperOne=le.multiTrailingUnmapper=le.multiTrailingMapper=le.onlyTrailingUnmapper=le.onlyTrailingMapper=le.fullySpecifiedUnmapper=le.fullySpecifiedMapper=void 0;function jd(e){return e.length===0?[]:e.split(":")}function $d(e){const t=e.split(":");return t.length>=2&&t[t.length-1].length<=4?[t.slice(0,t.length-2),`${t[t.length-2]}:${t[t.length-1]}`]:[t.slice(0,t.length-1),t[t.length-1]]}function dM(e){return`${e[0].join(":")}:${e[1]}`}le.fullySpecifiedMapper=dM;function pM(e){if(typeof e!="string")throw new Error("Invalid type");return $d(e)}le.fullySpecifiedUnmapper=pM;function hM(e){return`::${e[0].join(":")}:${e[1]}`}le.onlyTrailingMapper=hM;function yM(e){if(typeof e!="string")throw new Error("Invalid type");if(!e.startsWith("::"))throw new Error("Invalid value");return $d(e.substring(2))}le.onlyTrailingUnmapper=yM;function X0(e){return`${e[0].join(":")}::${e[1].join(":")}:${e[2]}`}le.multiTrailingMapper=X0;function Z0(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=e.split("::",2),[r,o]=$d(n);return[jd(t),r,o]}le.multiTrailingUnmapper=Z0;function mM(e){return X0([e[0],[e[1]],e[2]])}le.multiTrailingMapperOne=mM;function gM(e){const t=Z0(e);return[t[0],t[1].join(":"),t[2]]}le.multiTrailingUnmapperOne=gM;function bM(e){return`${e[0].join(":")}::${e[1]}`}le.singleTrailingMapper=bM;function vM(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=e.split("::",2);return[jd(t),n]}le.singleTrailingUnmapper=vM;function xM(e){return`${e[0].join(":")}::`}le.noTrailingMapper=xM;function _M(e){if(typeof e!="string")throw new Error("Invalid type");if(!e.endsWith("::"))throw new Error("Invalid value");return[jd(e.substring(0,e.length-2))]}le.noTrailingUnmapper=_M;Object.defineProperty(wa,"__esModule",{value:!0});wa.ipV6=void 0;const et=ge,Se=M,Dy=Ot,wM=Ca,vt=we,CM=oo,Ie=le;function SM([e,t]){return`${e}:${t}`}function TM(e){if(typeof e!="string")throw new Error("Invalid type");if(!e.includes(":"))throw new Error("Invalid value");return e.split(":",2)}function AM(){const e=(0,wM.hexaString)({minLength:1,maxLength:4,size:"max"}),t=(0,Dy.oneof)((0,Se.convertFromNext)((0,Se.convertToNext)((0,vt.tuple)(e,e)).map(SM,TM)),(0,CM.ipV4)());return(0,Dy.oneof)((0,Se.convertFromNext)((0,Se.convertToNext)((0,vt.tuple)((0,et.array)(e,{minLength:6,maxLength:6,size:"max"}),t)).map(Ie.fullySpecifiedMapper,Ie.fullySpecifiedUnmapper)),(0,Se.convertFromNext)((0,Se.convertToNext)((0,vt.tuple)((0,et.array)(e,{minLength:5,maxLength:5,size:"max"}),t)).map(Ie.onlyTrailingMapper,Ie.onlyTrailingUnmapper)),(0,Se.convertFromNext)((0,Se.convertToNext)((0,vt.tuple)((0,et.array)(e,{minLength:0,maxLength:1,size:"max"}),(0,et.array)(e,{minLength:4,maxLength:4,size:"max"}),t)).map(Ie.multiTrailingMapper,Ie.multiTrailingUnmapper)),(0,Se.convertFromNext)((0,Se.convertToNext)((0,vt.tuple)((0,et.array)(e,{minLength:0,maxLength:2,size:"max"}),(0,et.array)(e,{minLength:3,maxLength:3,size:"max"}),t)).map(Ie.multiTrailingMapper,Ie.multiTrailingUnmapper)),(0,Se.convertFromNext)((0,Se.convertToNext)((0,vt.tuple)((0,et.array)(e,{minLength:0,maxLength:3,size:"max"}),(0,et.array)(e,{minLength:2,maxLength:2,size:"max"}),t)).map(Ie.multiTrailingMapper,Ie.multiTrailingUnmapper)),(0,Se.convertFromNext)((0,Se.convertToNext)((0,vt.tuple)((0,et.array)(e,{minLength:0,maxLength:4,size:"max"}),e,t)).map(Ie.multiTrailingMapperOne,Ie.multiTrailingUnmapperOne)),(0,Se.convertFromNext)((0,Se.convertToNext)((0,vt.tuple)((0,et.array)(e,{minLength:0,maxLength:5,size:"max"}),t)).map(Ie.singleTrailingMapper,Ie.singleTrailingUnmapper)),(0,Se.convertFromNext)((0,Se.convertToNext)((0,vt.tuple)((0,et.array)(e,{minLength:0,maxLength:6,size:"max"}),e)).map(Ie.singleTrailingMapper,Ie.singleTrailingUnmapper)),(0,Se.convertFromNext)((0,Se.convertToNext)((0,vt.tuple)((0,et.array)(e,{minLength:0,maxLength:7,size:"max"}))).map(Ie.noTrailingMapper,Ie.noTrailingUnmapper)))}wa.ipV6=AM;var Sa={},pc={};Object.defineProperty(pc,"__esModule",{value:!0});pc.LazyArbitrary=void 0;const IM=de;class OM extends IM.NextArbitrary{constructor(t){super(),this.name=t,this.underlying=null}generate(t,n){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.generate(t,n)}canShrinkWithoutContext(t){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.canShrinkWithoutContext(t)}shrink(t,n){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.shrink(t,n)}}pc.LazyArbitrary=OM;Object.defineProperty(Sa,"__esModule",{value:!0});Sa.letrec=void 0;const qy=pc,Ly=M;function PM(e){const t=Object.create(null),r=e(o=>(Object.prototype.hasOwnProperty.call(t,o)||(t[o]=new qy.LazyArbitrary(String(o))),(0,Ly.convertFromNext)(t[o])));for(const o in r){if(!Object.prototype.hasOwnProperty.call(r,o))continue;const i=t[o],a=i!==void 0?i:new qy.LazyArbitrary(o);a.underlying=(0,Ly.convertToNext)(r[o]),t[o]=a}return r}Sa.letrec=PM;var hc={},De={};Object.defineProperty(De,"__esModule",{value:!0});De.sentencesToParagraphUnmapper=De.sentencesToParagraphMapper=De.wordsToSentenceUnmapperFor=De.wordsToSentenceMapper=De.wordsToJoinedStringUnmapperFor=De.wordsToJoinedStringMapper=void 0;function NM(e){return e.map(t=>t[t.length-1]===","?t.substr(0,t.length-1):t).join(" ")}De.wordsToJoinedStringMapper=NM;function jM(e){return function(n){if(typeof n!="string")throw new Error("Unsupported type");const r=[];for(const o of n.split(" "))if(e.canShrinkWithoutContext(o))r.push(o);else if(e.canShrinkWithoutContext(o+","))r.push(o+",");else throw new Error("Unsupported word");return r}}De.wordsToJoinedStringUnmapperFor=jM;function $M(e){let t=e.join(" ");return t[t.length-1]===","&&(t=t.substr(0,t.length-1)),t[0].toUpperCase()+t.substring(1)+"."}De.wordsToSentenceMapper=$M;function EM(e){return function(n){if(typeof n!="string")throw new Error("Unsupported type");if(n.length<2||n[n.length-1]!=="."||n[n.length-2]===","||n[0].toLowerCase().toUpperCase()!==n[0])throw new Error("Unsupported value");const r=n[0].toLowerCase()+n.substring(1,n.length-1),o=[],i=r.split(" ");for(let a=0;a!==i.length;++a){const u=i[a];if(e.canShrinkWithoutContext(u))o.push(u);else if(a===i.length-1&&e.canShrinkWithoutContext(u+","))o.push(u+",");else throw new Error("Unsupported word")}return o}}De.wordsToSentenceUnmapperFor=EM;function MM(e){return e.join(" ")}De.sentencesToParagraphMapper=MM;function kM(e){if(typeof e!="string")throw new Error("Unsupported type");const t=e.split(". ");for(let n=0;n<t.length-1;++n)t[n]+=".";return t}De.sentencesToParagraphUnmapper=kM;Object.defineProperty(hc,"__esModule",{value:!0});hc.lorem=void 0;const nf=ge,FM=at,RM=Jn,cr=De,Nn=M,C=(e,t)=>({arbitrary:(0,FM.constant)(e),weight:t});function VM(){return(0,RM.frequency)(C("non",6),C("adipiscing",5),C("ligula",5),C("enim",5),C("pellentesque",5),C("in",5),C("augue",5),C("et",5),C("nulla",5),C("lorem",4),C("sit",4),C("sed",4),C("diam",4),C("fermentum",4),C("ut",4),C("eu",4),C("aliquam",4),C("mauris",4),C("vitae",4),C("felis",4),C("ipsum",3),C("dolor",3),C("amet,",3),C("elit",3),C("euismod",3),C("mi",3),C("orci",3),C("erat",3),C("praesent",3),C("egestas",3),C("leo",3),C("vel",3),C("sapien",3),C("integer",3),C("curabitur",3),C("convallis",3),C("purus",3),C("risus",2),C("suspendisse",2),C("lectus",2),C("nec,",2),C("ultricies",2),C("sed,",2),C("cras",2),C("elementum",2),C("ultrices",2),C("maecenas",2),C("massa,",2),C("varius",2),C("a,",2),C("semper",2),C("proin",2),C("nec",2),C("nisl",2),C("amet",2),C("duis",2),C("congue",2),C("libero",2),C("vestibulum",2),C("pede",2),C("blandit",2),C("sodales",2),C("ante",2),C("nibh",2),C("ac",2),C("aenean",2),C("massa",2),C("suscipit",2),C("sollicitudin",2),C("fusce",2),C("tempus",2),C("aliquam,",2),C("nunc",2),C("ullamcorper",2),C("rhoncus",2),C("metus",2),C("faucibus,",2),C("justo",2),C("magna",2),C("at",2),C("tincidunt",2),C("consectetur",1),C("tortor,",1),C("dignissim",1),C("congue,",1),C("non,",1),C("porttitor,",1),C("nonummy",1),C("molestie,",1),C("est",1),C("eleifend",1),C("mi,",1),C("arcu",1),C("scelerisque",1),C("vitae,",1),C("consequat",1),C("in,",1),C("pretium",1),C("volutpat",1),C("pharetra",1),C("tempor",1),C("bibendum",1),C("odio",1),C("dui",1),C("primis",1),C("faucibus",1),C("luctus",1),C("posuere",1),C("cubilia",1),C("curae,",1),C("hendrerit",1),C("velit",1),C("mauris,",1),C("gravida",1),C("ornare",1),C("ut,",1),C("pulvinar",1),C("varius,",1),C("turpis",1),C("nibh,",1),C("eros",1),C("id",1),C("aliquet",1),C("quis",1),C("lobortis",1),C("consectetuer",1),C("morbi",1),C("vehicula",1),C("tortor",1),C("tellus,",1),C("id,",1),C("eu,",1),C("quam",1),C("feugiat,",1),C("posuere,",1),C("iaculis",1),C("lectus,",1),C("tristique",1),C("mollis,",1),C("nisl,",1),C("vulputate",1),C("sem",1),C("vivamus",1),C("placerat",1),C("imperdiet",1),C("cursus",1),C("rutrum",1),C("iaculis,",1),C("augue,",1),C("lacus",1))}function UM(...e){const t=typeof e[0]=="object"?e[0].maxCount:e[0],n=typeof e[0]=="object"?e[0].mode==="sentences":e[1],r=typeof e[0]=="object"?e[0].size:void 0,o=t!==void 0?t:5;if(o<1)throw new Error("lorem has to produce at least one word/sentence");const i=VM(),a=(0,Nn.convertToNext)(i);if(n){const u=(0,Nn.convertToNext)((0,nf.array)(i,{minLength:1,size:"small"})).map(cr.wordsToSentenceMapper,(0,cr.wordsToSentenceUnmapperFor)(a));return(0,Nn.convertFromNext)((0,Nn.convertToNext)((0,nf.array)((0,Nn.convertFromNext)(u),{minLength:1,maxLength:o,size:r})).map(cr.sentencesToParagraphMapper,cr.sentencesToParagraphUnmapper))}else return(0,Nn.convertFromNext)((0,Nn.convertToNext)((0,nf.array)(i,{minLength:1,maxLength:o,size:r})).map(cr.wordsToJoinedStringMapper,(0,cr.wordsToJoinedStringUnmapperFor)(a)))}hc.lorem=UM;var yc={};Object.defineProperty(yc,"__esModule",{value:!0});yc.memo=void 0;let Cu=10;function DM(e){const t={};return n=>{const r=n!==void 0?n:Cu;if(!Object.prototype.hasOwnProperty.call(t,r)){const o=Cu;Cu=r-1,t[r]=e(r),Cu=o}return t[r]}}yc.memo=DM;var mc={},gc={},tt={};Object.defineProperty(tt,"__esModule",{value:!0});tt.applyFlagsOnChars=tt.computeFlagsFromChars=tt.computeTogglePositions=tt.computeNextFlags=tt.countToggledBits=void 0;function Y0(e){let t=0;for(;e>BigInt(0);)e&BigInt(1)&&++t,e>>=BigInt(1);return t}tt.countToggledBits=Y0;function qM(e,t){const n=(BigInt(1)<<BigInt(t))-BigInt(1),r=e&n;let o=Y0(e-r),i=r;for(let a=BigInt(1);a<=n&&o!==0;a<<=BigInt(1))i&a||(i|=a,--o);return i}tt.computeNextFlags=qM;function LM(e,t){const n=[];for(let r=e.length-1;r!==-1;--r)t(e[r])!==e[r]&&n.push(r);return n}tt.computeTogglePositions=LM;function BM(e,t,n){let r=BigInt(0);for(let o=0,i=BigInt(1);o!==n.length;++o,i<<=BigInt(1))e[n[o]]!==t[n[o]]&&(r|=i);return r}tt.computeFlagsFromChars=BM;function zM(e,t,n,r){for(let o=0,i=BigInt(1);o!==n.length;++o,i<<=BigInt(1))t&i&&(e[n[o]]=r(e[n[o]]))}tt.applyFlagsOnChars=zM;Object.defineProperty(gc,"__esModule",{value:!0});gc.MixedCaseArbitrary=void 0;const By=ta,WM=de,zy=M,Vo=he,GM=Wn,Ut=tt;class KM extends WM.NextArbitrary{constructor(t,n,r){super(),this.stringArb=t,this.toggleCase=n,this.untoggleAll=r}buildContextFor(t,n){return{rawString:t.value,rawStringContext:t.context,flags:n.value,flagsContext:n.context}}generate(t,n){const r=this.stringArb.generate(t,n),o=[...r.value],i=(0,Ut.computeTogglePositions)(o,this.toggleCase),u=(0,zy.convertToNext)((0,By.bigUintN)(i.length)).generate(t,void 0);return(0,Ut.applyFlagsOnChars)(o,u.value,i,this.toggleCase),new Vo.NextValue(o.join(""),this.buildContextFor(r,u))}canShrinkWithoutContext(t){return typeof t!="string"?!1:this.untoggleAll!==void 0?this.stringArb.canShrinkWithoutContext(this.untoggleAll(t)):this.stringArb.canShrinkWithoutContext(t)}shrink(t,n){let r;if(n!==void 0)r=n;else if(this.untoggleAll!==void 0){const a=this.untoggleAll(t),u=[...t],s=[...a],c=(0,Ut.computeTogglePositions)(s,this.toggleCase);r={rawString:a,rawStringContext:void 0,flags:(0,Ut.computeFlagsFromChars)(s,u,c),flagsContext:void 0}}else r={rawString:t,rawStringContext:void 0,flags:BigInt(0),flagsContext:void 0};const o=r.rawString,i=r.flags;return this.stringArb.shrink(o,r.rawStringContext).map(a=>{const u=[...a.value],s=(0,Ut.computeTogglePositions)(u,this.toggleCase),c=(0,Ut.computeNextFlags)(i,s.length);return(0,Ut.applyFlagsOnChars)(u,c,s,this.toggleCase),new Vo.NextValue(u.join(""),this.buildContextFor(a,new Vo.NextValue(c,void 0)))}).join((0,GM.makeLazy)(()=>{const a=[...o],u=(0,Ut.computeTogglePositions)(a,this.toggleCase);return(0,zy.convertToNext)((0,By.bigUintN)(u.length)).shrink(i,r.flagsContext).map(s=>{const c=a.slice();return(0,Ut.applyFlagsOnChars)(c,s.value,u,this.toggleCase),new Vo.NextValue(c.join(""),this.buildContextFor(new Vo.NextValue(o,r.rawStringContext),s))})}))}}gc.MixedCaseArbitrary=KM;Object.defineProperty(mc,"__esModule",{value:!0});mc.mixedCase=void 0;const Wy=M,HM=gc;function JM(e){const t=e.toUpperCase();return t!==e?t:e.toLowerCase()}function QM(e,t){if(typeof BigInt>"u")throw new Error("mixedCase requires BigInt support");const n=t&&t.toggleCase||JM,r=t&&t.untoggleAll;return(0,Wy.convertFromNext)(new HM.MixedCaseArbitrary((0,Wy.convertToNext)(e),n,r))}mc.mixedCase=QM;var bc={},Ta={},Aa={};Object.defineProperty(Aa,"__esModule",{value:!0});Aa.float32Array=void 0;const XM=ba,ZM=ge,Gy=M;function YM(e){return Float32Array.from(e)}function ek(e){if(!(e instanceof Float32Array))throw new Error("Unexpected type");return[...e]}function tk(e={}){return(0,Gy.convertFromNext)((0,Gy.convertToNext)((0,ZM.array)((0,XM.float)(Object.assign(Object.assign({},e),{next:!0})),e)).map(YM,ek))}Aa.float32Array=tk;var Ia={};Object.defineProperty(Ia,"__esModule",{value:!0});Ia.float64Array=void 0;const nk=Qn,rk=ge,Ky=M;function ok(e){return Float64Array.from(e)}function ik(e){if(!(e instanceof Float64Array))throw new Error("Unexpected type");return[...e]}function ak(e={}){return(0,Ky.convertFromNext)((0,Ky.convertToNext)((0,rk.array)((0,nk.double)(Object.assign(Object.assign({},e),{next:!0})),e)).map(ok,ik))}Ia.float64Array=ak;var Oa={},Pt={},uk=K&&K.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.typedIntArrayArbitraryArbitraryBuilder=void 0;const Hy=M,sk=ge;function ck(e,t,n,r,o){const i=r.name,{min:a=t,max:u=n}=e,s=uk(e,["min","max"]);if(a>u)throw new Error(`Invalid range passed to ${i}: min must be lower than or equal to max`);if(a<t)throw new Error(`Invalid min value passed to ${i}: min must be greater than or equal to ${t}`);if(u>n)throw new Error(`Invalid max value passed to ${i}: max must be lower than or equal to ${n}`);return(0,Hy.convertFromNext)((0,Hy.convertToNext)((0,sk.array)(o({min:a,max:u}),s)).map(c=>r.from(c),c=>{if(!(c instanceof r))throw new Error("Invalid type");return[...c]}))}Pt.typedIntArrayArbitraryArbitraryBuilder=ck;Object.defineProperty(Oa,"__esModule",{value:!0});Oa.int16Array=void 0;const lk=be,fk=Pt;function dk(e={}){return(0,fk.typedIntArrayArbitraryArbitraryBuilder)(e,-32768,32767,Int16Array,lk.integer)}Oa.int16Array=dk;var Pa={};Object.defineProperty(Pa,"__esModule",{value:!0});Pa.int32Array=void 0;const pk=be,hk=Pt;function yk(e={}){return(0,hk.typedIntArrayArbitraryArbitraryBuilder)(e,-2147483648,2147483647,Int32Array,pk.integer)}Pa.int32Array=yk;var Na={};Object.defineProperty(Na,"__esModule",{value:!0});Na.int8Array=void 0;const mk=be,gk=Pt;function bk(e={}){return(0,gk.typedIntArrayArbitraryArbitraryBuilder)(e,-128,127,Int8Array,mk.integer)}Na.int8Array=bk;var ja={};Object.defineProperty(ja,"__esModule",{value:!0});ja.uint16Array=void 0;const vk=be,xk=Pt;function _k(e={}){return(0,xk.typedIntArrayArbitraryArbitraryBuilder)(e,0,65535,Uint16Array,vk.integer)}ja.uint16Array=_k;var $a={};Object.defineProperty($a,"__esModule",{value:!0});$a.uint32Array=void 0;const wk=be,Ck=Pt;function Sk(e={}){return(0,Ck.typedIntArrayArbitraryArbitraryBuilder)(e,0,4294967295,Uint32Array,wk.integer)}$a.uint32Array=Sk;var Ea={};Object.defineProperty(Ea,"__esModule",{value:!0});Ea.uint8Array=void 0;const Tk=be,Ak=Pt;function Ik(e={}){return(0,Ak.typedIntArrayArbitraryArbitraryBuilder)(e,0,255,Uint8Array,Tk.integer)}Ea.uint8Array=Ik;var Ma={};Object.defineProperty(Ma,"__esModule",{value:!0});Ma.uint8ClampedArray=void 0;const Ok=be,Pk=Pt;function Nk(e={}){return(0,Pk.typedIntArrayArbitraryArbitraryBuilder)(e,0,255,Uint8ClampedArray,Ok.integer)}Ma.uint8ClampedArray=Nk;var ka={},Fa={},vc={};Object.defineProperty(vc,"__esModule",{value:!0});vc.WithShrinkFromOtherArbitrary=void 0;const jk=de,rs=he;function $k(e){return e!==void 0}function Jy(e){return e.hasToBeCloned?new rs.NextValue(e.value_,{generatorContext:e.context},()=>e.value):new rs.NextValue(e.value_,{generatorContext:e.context})}function Qy(e){return e.hasToBeCloned?new rs.NextValue(e.value_,{shrinkerContext:e.context},()=>e.value):new rs.NextValue(e.value_,{shrinkerContext:e.context})}class Ek extends jk.NextArbitrary{constructor(t,n){super(),this.generatorArbitrary=t,this.shrinkerArbitrary=n}generate(t,n){return Jy(this.generatorArbitrary.generate(t,n))}canShrinkWithoutContext(t){return this.shrinkerArbitrary.canShrinkWithoutContext(t)}shrink(t,n){return $k(n)?"generatorContext"in n?this.generatorArbitrary.shrink(t,n.generatorContext).map(Jy):this.shrinkerArbitrary.shrink(t,n.shrinkerContext).map(Qy):this.shrinkerArbitrary.shrink(t,void 0).map(Qy)}}vc.WithShrinkFromOtherArbitrary=Ek;Object.defineProperty(Fa,"__esModule",{value:!0});Fa.restrictedIntegerArbitraryBuilder=void 0;const Su=M,Xy=be,Mk=vc;function kk(e,t,n){const r=(0,Su.convertToNext)((0,Xy.integer)({min:e,max:t}));if(t===n)return(0,Su.convertFromNext)(r);const o=(0,Su.convertToNext)((0,Xy.integer)({min:e,max:n}));return(0,Su.convertFromNext)(new Mk.WithShrinkFromOtherArbitrary(r,o))}Fa.restrictedIntegerArbitraryBuilder=kk;Object.defineProperty(ka,"__esModule",{value:!0});ka.sparseArray=void 0;const Tu=M,Zy=we,Fk=Hn,Yy=Fa,rf=ht;function Rk(e){let t=-1;for(let n=0;n!==e.length;++n)t=Math.max(t,e[n][0]);return t}function Vk(e,t){const n=Array(e);for(let r=0;r!==t.length;++r){const o=t[r];o[0]<e&&(n[o[0]]=o[1])}return n}function Uk(e,t={}){const{size:n,minNumElements:r=0,maxLength:o=rf.MaxLengthUpperBound,maxNumElements:i=o,noTrailingHole:a,depthIdentifier:u}=t,s=(0,rf.maxGeneratedLengthFromSizeForArbitrary)(n,r,i,t.maxNumElements!==void 0),c=(0,rf.maxGeneratedLengthFromSizeForArbitrary)(n,s,o,t.maxLength!==void 0);if(r>o)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal length of the array");if(r>i)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal number of non-holes");const f=Math.min(i,o),l=t.maxNumElements!==void 0||n!==void 0?n:"=",d=Math.max(c-1,0),p=Math.max(o-1,0),y=(0,Tu.convertFromNext)((0,Tu.convertToNext)((0,Fk.uniqueArray)((0,Zy.tuple)((0,Yy.restrictedIntegerArbitraryBuilder)(0,d,p),e),{size:l,minLength:r,maxLength:f,selector:h=>h[0],depthIdentifier:u})).map(h=>{const m=Rk(h);return Vk(m+1,h)},h=>{if(!Array.isArray(h))throw new Error("Not supported entry type");if(a&&h.length!==0&&!(h.length-1 in h))throw new Error("No trailing hole");return Object.entries(h).map(m=>[Number(m[0]),m[1]])}));return a||o===r?y:(0,Tu.convertFromNext)((0,Tu.convertToNext)((0,Zy.tuple)(y,(0,Yy.restrictedIntegerArbitraryBuilder)(r,c,o))).map(h=>{const m=h[0],g=h[1];if(m.length>=g)return m;const w=m.slice();return w.length=g,w},h=>{if(!Array.isArray(h))throw new Error("Not supported entry type");return[h,h.length]}))}ka.sparseArray=Uk;var Nr={};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.arrayToMapUnmapper=Nr.arrayToMapMapper=void 0;function Dk(e){return new Map(e)}Nr.arrayToMapMapper=Dk;function qk(e){if(typeof e!="object"||e===null)throw new Error("Incompatible instance received: should be a non-null object");if(!("constructor"in e)||e.constructor!==Map)throw new Error("Incompatible instance received: should be of exact type Map");return Array.from(e)}Nr.arrayToMapUnmapper=qk;var jr={};Object.defineProperty(jr,"__esModule",{value:!0});jr.arrayToSetUnmapper=jr.arrayToSetMapper=void 0;function Lk(e){return new Set(e)}jr.arrayToSetMapper=Lk;function Bk(e){if(typeof e!="object"||e===null)throw new Error("Incompatible instance received: should be a non-null object");if(!("constructor"in e)||e.constructor!==Set)throw new Error("Incompatible instance received: should be of exact type Set");return Array.from(e)}jr.arrayToSetUnmapper=Bk;var $r={};Object.defineProperty($r,"__esModule",{value:!0});$r.objectToPrototypeLessUnmapper=$r.objectToPrototypeLessMapper=void 0;function zk(e){return Object.assign(Object.create(null),e)}$r.objectToPrototypeLessMapper=zk;function Wk(e){if(typeof e!="object"||e===null)throw new Error("Incompatible instance received: should be a non-null object");if("__proto__"in e)throw new Error("Incompatible instance received: should not have any __proto__");return Object.assign({},e)}$r.objectToPrototypeLessUnmapper=Wk;Object.defineProperty(Ta,"__esModule",{value:!0});Ta.anyArbitraryBuilder=void 0;const em=At,Gk=ge,Kk=Jn,Fu=Ot,Hk=we,Jk=ea,Qk=ca,Xk=Aa,Zk=Ia,Yk=Oa,eF=Pa,tF=Na,nF=ja,rF=$a,oF=Ea,iF=Ma,aF=ka,tm=Un,Dn=M,nm=Nr,rm=jr,om=$r,uF=Sa,ex=Hn,sF=Kt;function tx(e,t,n,r,o){return(0,Dn.convertToNext)((0,ex.uniqueArray)((0,Hk.tuple)(e,t),{maxLength:n,size:r,comparator:"SameValueZero",selector:i=>i[0],depthIdentifier:o}))}function im(e,t,n,r,o){return(0,Dn.convertFromNext)(tx(e,t,n,r,o).map(nm.arrayToMapMapper,nm.arrayToMapUnmapper))}function cF(e,t,n,r,o){return(0,Dn.convertFromNext)(tx(e,t,n,r,o).map(tm.keyValuePairsToObjectMapper,tm.keyValuePairsToObjectUnmapper))}function lF(e,t,n,r){return(0,Dn.convertFromNext)((0,Dn.convertToNext)((0,ex.uniqueArray)(e,{maxLength:t,size:n,comparator:"SameValueZero",depthIdentifier:r})).map(rm.arrayToSetMapper,rm.arrayToSetUnmapper))}function fF(e){return(0,Dn.convertFromNext)((0,Dn.convertToNext)(e).map(om.objectToPrototypeLessMapper,om.objectToPrototypeLessUnmapper))}function dF(e){return(0,Fu.oneof)((0,tF.int8Array)(e),(0,oF.uint8Array)(e),(0,iF.uint8ClampedArray)(e),(0,Yk.int16Array)(e),(0,nF.uint16Array)(e),(0,eF.int32Array)(e),(0,rF.uint32Array)(e),(0,Xk.float32Array)(e),(0,Zk.float64Array)(e))}function pF(e){const t=e.values,n=e.depthFactor,r=(0,sF.createDepthIdentifier)(),o=e.maxDepth,i=e.maxKeys,a=e.size,u=(0,Fu.oneof)(...t,...e.withBigInt?[(0,Jk.bigInt)()]:[],...e.withDate?[(0,Qk.date)()]:[]);return(0,uF.letrec)(s=>({anything:(0,Fu.oneof)({maxDepth:o,depthFactor:n,depthIdentifier:r},u,s("array"),s("object"),...e.withMap?[s("map")]:[],...e.withSet?[s("set")]:[],...e.withObjectString?[s("anything").map(c=>(0,em.stringify)(c))]:[],...e.withNullPrototype?[fF(s("object"))]:[],...e.withTypedArray?[dF({maxLength:i,size:a})]:[],...e.withSparseArray?[(0,aF.sparseArray)(s("anything"),{maxNumElements:i,size:a,depthIdentifier:r})]:[]),keys:e.withObjectString?(0,Kk.frequency)({arbitrary:e.key,weight:10},{arbitrary:s("anything").map(c=>(0,em.stringify)(c)),weight:1}):e.key,array:(0,Gk.array)(s("anything"),{maxLength:i,size:a,depthIdentifier:r}),set:lF(s("anything"),i,a,r),map:(0,Fu.oneof)(im(s("keys"),s("anything"),i,a,r),im(s("anything"),s("anything"),i,a,r)),object:cF(s("keys"),s("anything"),i,a,r)})).anything}Ta.anyArbitraryBuilder=pF;var Ra={},io={};Object.defineProperty(io,"__esModule",{value:!0});io.string=void 0;const am=M,hF=ge,yF=ia,mF=yt,um=pt;function gF(...e){const t=(0,mF.extractStringConstraints)(e);return(0,am.convertFromNext)((0,am.convertToNext)((0,hF.array)((0,yF.char)(),t)).map(um.codePointsToStringMapper,um.codePointsToStringUnmapper))}io.string=gF;var xc={},Er={};Object.defineProperty(Er,"__esModule",{value:!0});Er.unboxedToBoxedUnmapper=Er.unboxedToBoxedMapper=void 0;function bF(e){switch(typeof e){case"boolean":return new Boolean(e);case"number":return new Number(e);case"string":return new String(e);default:return e}}Er.unboxedToBoxedMapper=bF;function vF(e){return typeof e!="object"||e===null||!("constructor"in e)?e:e.constructor===Boolean||e.constructor===Number||e.constructor===String?e.valueOf():e}Er.unboxedToBoxedUnmapper=vF;Object.defineProperty(xc,"__esModule",{value:!0});xc.boxedArbitraryBuilder=void 0;const sm=M,cm=Er;function xF(e){return(0,sm.convertFromNext)((0,sm.convertToNext)(e).map(cm.unboxedToBoxedMapper,cm.unboxedToBoxedUnmapper))}xc.boxedArbitraryBuilder=xF;Object.defineProperty(Ra,"__esModule",{value:!0});Ra.toQualifiedObjectConstraints=void 0;const _F=Zr,lm=at,wF=Qn,CF=xa,SF=Ot,Gf=io,TF=xc;function AF(e){return[(0,_F.boolean)(),(0,CF.maxSafeInteger)(),(0,wF.double)({next:!0}),(0,Gf.string)(e),(0,SF.oneof)((0,Gf.string)(e),(0,lm.constant)(null),(0,lm.constant)(void 0))]}function IF(e){return e.map(t=>(0,TF.boxedArbitraryBuilder)(t))}function OF(e,t){return t?IF(e).concat(e):e}function PF(e={}){function t(r,o){return r!==void 0?r:o}const n={size:e.size};return{key:t(e.key,(0,Gf.string)(n)),values:OF(t(e.values,AF(n)),t(e.withBoxedValues,!1)),depthFactor:t(e.depthFactor,"="),maxDepth:t(e.maxDepth,2),maxKeys:t(e.maxKeys,5),size:e.size,withSet:t(e.withSet,!1),withMap:t(e.withMap,!1),withObjectString:t(e.withObjectString,!1),withNullPrototype:t(e.withNullPrototype,!1),withBigInt:t(e.withBigInt,!1),withDate:t(e.withDate,!1),withTypedArray:t(e.withTypedArray,!1),withSparseArray:t(e.withSparseArray,!1)}}Ra.toQualifiedObjectConstraints=PF;Object.defineProperty(bc,"__esModule",{value:!0});bc.object=void 0;const NF=fa,jF=Ta,$F=Ra;function EF(e){return(0,NF.dictionary)(e.key,(0,jF.anyArbitraryBuilder)(e),{maxKeys:e.maxKeys,size:e.size})}function MF(e){return EF((0,$F.toQualifiedObjectConstraints)(e))}bc.object=MF;var _c={},ao={},Va={};Object.defineProperty(Va,"__esModule",{value:!0});Va.jsonConstraintsBuilder=void 0;const kF=Zr,FF=at,RF=Qn;function VF(e,t){const{depthFactor:n,maxDepth:r}=t,o=e,i=[(0,kF.boolean)(),(0,RF.double)({next:!0,noDefaultInfinity:!0,noNaN:!0}),e,(0,FF.constant)(null)];return{key:o,values:i,depthFactor:n,maxDepth:r}}Va.jsonConstraintsBuilder=VF;var uo={};Object.defineProperty(uo,"__esModule",{value:!0});uo.anything=void 0;const UF=Ta,DF=Ra;function qF(e){return(0,UF.anyArbitraryBuilder)((0,DF.toQualifiedObjectConstraints)(e))}uo.anything=qF;Object.defineProperty(ao,"__esModule",{value:!0});ao.jsonValue=void 0;const LF=io,BF=Va,zF=uo;function WF(e={}){return(0,zF.anything)((0,BF.jsonConstraintsBuilder)((0,LF.string)(),e))}ao.jsonValue=WF;Object.defineProperty(_c,"__esModule",{value:!0});_c.json=void 0;const fm=ao;function GF(e){return(e!=null?(0,fm.jsonValue)(e):(0,fm.jsonValue)()).map(JSON.stringify)}_c.json=GF;var wc={},so={},Ua={};Object.defineProperty(Ua,"__esModule",{value:!0});Ua.unicodeString=void 0;const dm=M,KF=ge,HF=sa,JF=yt,pm=pt;function QF(...e){const t=(0,JF.extractStringConstraints)(e);return(0,dm.convertFromNext)((0,dm.convertToNext)((0,KF.array)((0,HF.unicode)(),t)).map(pm.codePointsToStringMapper,pm.codePointsToStringUnmapper))}Ua.unicodeString=QF;Object.defineProperty(so,"__esModule",{value:!0});so.unicodeJsonValue=void 0;const XF=Ua,ZF=Va,YF=uo;function eR(e={}){return(0,YF.anything)((0,ZF.jsonConstraintsBuilder)((0,XF.unicodeString)(),e))}so.unicodeJsonValue=eR;Object.defineProperty(wc,"__esModule",{value:!0});wc.unicodeJsonObject=void 0;const hm=so;function tR(e){return typeof e=="number"?(0,hm.unicodeJsonValue)({maxDepth:e}):(0,hm.unicodeJsonValue)(e)}wc.unicodeJsonObject=tR;var Cc={};Object.defineProperty(Cc,"__esModule",{value:!0});Cc.jsonObject=void 0;const ym=ao;function nR(e){return typeof e=="number"?(0,ym.jsonValue)({maxDepth:e}):(0,ym.jsonValue)(e)}Cc.jsonObject=nR;var Sc={};Object.defineProperty(Sc,"__esModule",{value:!0});Sc.unicodeJson=void 0;const mm=so;function rR(e){return(e!=null?(0,mm.unicodeJsonValue)(e):(0,mm.unicodeJsonValue)()).map(JSON.stringify)}Sc.unicodeJson=rR;var Tc={},Ac={},Ic={};Object.defineProperty(Ic,"__esModule",{value:!0});Ic.extractEnumerableKeys=void 0;function oR(e){const t=Object.keys(e),n=Object.getOwnPropertySymbols(e);for(let r=0;r!==n.length;++r){const o=n[r],i=Object.getOwnPropertyDescriptor(e,o);i&&i.enumerable&&t.push(o)}return t}Ic.extractEnumerableKeys=oR;var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.buildValuesAndSeparateKeysToObjectUnmapper=Mr.buildValuesAndSeparateKeysToObjectMapper=void 0;function iR(e,t){return function(r){const o={};for(let i=0;i!==e.length;++i){const a=r[i];a!==t&&(o[e[i]]=a)}return o}}Mr.buildValuesAndSeparateKeysToObjectMapper=iR;function aR(e,t){return function(r){if(typeof r!="object"||r===null)throw new Error("Incompatible instance received: should be a non-null object");if(!("constructor"in r)||r.constructor!==Object)throw new Error("Incompatible instance received: should be of exact type Object");let o=0;const i=[];for(let s=0;s!==e.length;++s){const c=Object.getOwnPropertyDescriptor(r,e[s]);if(c!==void 0){if(!c.configurable||!c.enumerable||!c.writable)throw new Error("Incompatible instance received: should contain only c/e/w properties");if(c.get!==void 0||c.set!==void 0)throw new Error("Incompatible instance received: should contain only no get/set properties");++o,i.push(c.value)}else i.push(t)}const a=Object.getOwnPropertyNames(r).length,u=Object.getOwnPropertySymbols(r).length;if(o!==a+u)throw new Error("Incompatible instance received: should not contain extra properties");return i}}Mr.buildValuesAndSeparateKeysToObjectUnmapper=aR;Object.defineProperty(Ac,"__esModule",{value:!0});Ac.buildPartialRecordArbitrary=void 0;const gm=M,uR=xn,sR=we,cR=Ic,bm=Mr,of=Symbol("no-key");function lR(e,t){const n=(0,cR.extractEnumerableKeys)(e),r=[];for(let o=0;o!==n.length;++o){const i=n[o],a=e[i];t===void 0||t.indexOf(i)!==-1?r.push(a):r.push((0,uR.option)(a,{nil:of}))}return(0,gm.convertFromNext)((0,gm.convertToNext)((0,sR.tuple)(...r)).map((0,bm.buildValuesAndSeparateKeysToObjectMapper)(n,of),(0,bm.buildValuesAndSeparateKeysToObjectUnmapper)(n,of)))}Ac.buildPartialRecordArbitrary=lR;Object.defineProperty(Tc,"__esModule",{value:!0});Tc.record=void 0;const af=Ac;function fR(e,t){if(t==null)return(0,af.buildPartialRecordArbitrary)(e,void 0);if("withDeletedKeys"in t&&"requiredKeys"in t)throw new Error("requiredKeys and withDeletedKeys cannot be used together in fc.record");if(!("requiredKeys"in t&&t.requiredKeys!==void 0||"withDeletedKeys"in t&&!!t.withDeletedKeys))return(0,af.buildPartialRecordArbitrary)(e,void 0);const r=("requiredKeys"in t?t.requiredKeys:void 0)||[];for(let o=0;o!==r.length;++o){const i=Object.getOwnPropertyDescriptor(e,r[o]);if(i===void 0)throw new Error("requiredKeys cannot reference keys that have not been defined in recordModel");if(!i.enumerable)throw new Error("requiredKeys cannot reference keys that have are enumerable in recordModel")}return(0,af.buildPartialRecordArbitrary)(e,r)}Tc.record=fR;var Oc={};Object.defineProperty(Oc,"__esModule",{value:!0});Oc.set=void 0;const dR=Xr,vm=M,xm=ht,pR=da,hR=pa,yR=ha,mR=ya;function gR(e){const t=e.compare||{};if(typeof t=="function"){const o=(i,a)=>t(i.value_,a.value_);return()=>new pR.CustomEqualSet(o)}const n=t.selector||(o=>o),r=o=>n(o.value_);switch(t.type){case"SameValue":return()=>new yR.SameValueSet(r);case"SameValueZero":return()=>new mR.SameValueZeroSet(r);case"IsStrictlyEqual":case void 0:return()=>new hR.StrictlyEqualSet(r)}}function bR(e){const t=e.minLength!==void 0?e.minLength:0,n=e.maxLength!==void 0?e.maxLength:xm.MaxLengthUpperBound,r=(0,xm.maxGeneratedLengthFromSizeForArbitrary)(e.size,t,n,e.maxLength!==void 0),o=e.depthIdentifier,i=gR(e);return{minLength:t,maxGeneratedLength:r,maxLength:n,depthIdentifier:o,setBuilder:i}}function vR(e){if(e[0]===void 0)return{};if(e[1]===void 0){const n=e;return typeof n[0]=="number"?{maxLength:n[0]}:typeof n[0]=="function"?{compare:n[0]}:n[0]}if(e[2]===void 0){const n=e;return typeof n[1]=="number"?{minLength:n[0],maxLength:n[1]}:{maxLength:n[0],compare:n[1]}}const t=e;return{minLength:t[0],maxLength:t[1],compare:t[2]}}function xR(e,...t){const n=bR(vR(t)),r=n.minLength,o=n.maxLength,i=n.maxGeneratedLength,a=n.depthIdentifier,u=n.setBuilder,s=(0,vm.convertToNext)(e),c=(0,vm.convertFromNext)(new dR.ArrayArbitrary(s,r,i,o,a,u));return r===0?c:c.filter(f=>f.length>=r)}Oc.set=xR;var Pc={},Nc={};Object.defineProperty(Nc,"__esModule",{value:!0});Nc.StreamArbitrary=void 0;const _R=de,wR=he,CR=Fe,_m=re,Uo=At;function uf(e){return`Stream(${e.join(",")}…)`}class SR extends _R.NextArbitrary{constructor(t){super(),this.arb=t}generate(t,n){const r=n!==void 0&&t.nextInt(1,n)===1?n:void 0,o=()=>{const i=[],a=function*(s,c){for(;;){const f=s.generate(c,r).value;i.push(f),yield f}},u=new _m.Stream(a(this.arb,t.clone()));return Object.defineProperties(u,{toString:{value:()=>uf(i.map(Uo.stringify))},[Uo.toStringMethod]:{value:()=>uf(i.map(Uo.stringify))},[Uo.asyncToStringMethod]:{value:async()=>uf(await Promise.all(i.map(Uo.asyncStringify)))},[CR.cloneMethod]:{value:o,enumerable:!0}})};return new wR.NextValue(o(),void 0)}canShrinkWithoutContext(t){return!1}shrink(t,n){return _m.Stream.nil()}}Nc.StreamArbitrary=SR;Object.defineProperty(Pc,"__esModule",{value:!0});Pc.infiniteStream=void 0;const wm=M,TR=Nc;function AR(e){return(0,wm.convertFromNext)(new TR.StreamArbitrary((0,wm.convertToNext)(e)))}Pc.infiniteStream=AR;var jc={};Object.defineProperty(jc,"__esModule",{value:!0});jc.asciiString=void 0;const Cm=M,IR=ge,OR=ra,PR=yt,Sm=pt;function NR(...e){const t=(0,PR.extractStringConstraints)(e);return(0,Cm.convertFromNext)((0,Cm.convertToNext)((0,IR.array)((0,OR.ascii)(),t)).map(Sm.codePointsToStringMapper,Sm.codePointsToStringUnmapper))}jc.asciiString=NR;var $c={},kr={};Object.defineProperty(kr,"__esModule",{value:!0});kr.stringToBase64Unmapper=kr.stringToBase64Mapper=void 0;function jR(e){switch(e.length%4){case 0:return e;case 3:return`${e}=`;case 2:return`${e}==`;default:return e.slice(1)}}kr.stringToBase64Mapper=jR;function $R(e){if(typeof e!="string"||e.length%4!==0)throw new Error("Invalid string received");const t=e.indexOf("=");if(t===-1)return e;if(e.length-t>2)throw new Error("Cannot unmap the passed value");return e.substring(0,t)}kr.stringToBase64Unmapper=$R;Object.defineProperty($c,"__esModule",{value:!0});$c.base64String=void 0;const Tm=M,ER=ge,MR=oa,kR=ht,FR=yt,Am=pt,Im=kr;function RR(...e){const t=(0,FR.extractStringConstraints)(e),{minLength:n=0,maxLength:r=kR.MaxLengthUpperBound,size:o}=t,i=n+3-(n+3)%4,a=r-r%4,u=t.maxLength===void 0&&o===void 0?"=":o;if(i>a)throw new Error("Minimal length should be inferior or equal to maximal length");if(i%4!==0)throw new Error("Minimal length of base64 strings must be a multiple of 4");if(a%4!==0)throw new Error("Maximal length of base64 strings must be a multiple of 4");return(0,Tm.convertFromNext)((0,Tm.convertToNext)((0,ER.array)((0,MR.base64)(),{minLength:i,maxLength:a,size:u})).map(Am.codePointsToStringMapper,Am.codePointsToStringUnmapper).map(Im.stringToBase64Mapper,Im.stringToBase64Unmapper))}$c.base64String=RR;var Ec={};Object.defineProperty(Ec,"__esModule",{value:!0});Ec.fullUnicodeString=void 0;const Om=M,VR=ge,UR=Yr,DR=yt,Pm=pt;function qR(...e){const t=(0,DR.extractStringConstraints)(e);return(0,Om.convertFromNext)((0,Om.convertToNext)((0,VR.array)((0,UR.fullUnicode)(),t)).map(Pm.codePointsToStringMapper,Pm.codePointsToStringUnmapper))}Ec.fullUnicodeString=qR;var Mc={},Fr={};Object.defineProperty(Fr,"__esModule",{value:!0});Fr.charsToStringUnmapper=Fr.charsToStringMapper=void 0;function LR(e){return e.join("")}Fr.charsToStringMapper=LR;function BR(e){if(typeof e!="string")throw new Error("Cannot unmap the passed value");return e.split("")}Fr.charsToStringUnmapper=BR;Object.defineProperty(Mc,"__esModule",{value:!0});Mc.string16bits=void 0;const Nm=M,zR=ge,WR=aa,GR=yt,jm=Fr;function KR(...e){const t=(0,GR.extractStringConstraints)(e);return(0,Nm.convertFromNext)((0,Nm.convertToNext)((0,zR.array)((0,WR.char16bits)(),t)).map(jm.charsToStringMapper,jm.charsToStringUnmapper))}Mc.string16bits=KR;var kc={},Da={},Fc={};Object.defineProperty(Fc,"__esModule",{value:!0});Fc.isSubarrayOf=void 0;function HR(e,t){const n=new Map;let r=0;for(const o of e)if(Object.is(o,-0))++r;else{const i=n.get(o)||0;n.set(o,i+1)}for(let o=0;o!==t.length;++o){if(!(o in t))return!1;const i=t[o];if(Object.is(i,-0)){if(r===0)return!1;--r}else{const a=n.get(i)||0;if(a===0)return!1;n.set(i,a-1)}}return!0}Fc.isSubarrayOf=HR;Object.defineProperty(Da,"__esModule",{value:!0});Da.SubarrayArbitrary=void 0;const JR=de,sf=he,QR=Wn,$m=re,XR=Fc,Em=bn;class ZR extends JR.NextArbitrary{constructor(t,n,r,o){if(super(),this.originalArray=t,this.isOrdered=n,this.minLength=r,this.maxLength=o,r<0||r>t.length)throw new Error("fc.*{s|S}ubarrayOf expects the minimal length to be between 0 and the size of the original array");if(o<0||o>t.length)throw new Error("fc.*{s|S}ubarrayOf expects the maximal length to be between 0 and the size of the original array");if(r>o)throw new Error("fc.*{s|S}ubarrayOf expects the minimal length to be inferior or equal to the maximal length");this.lengthArb=new Em.IntegerArbitrary(r,o),this.biasedLengthArb=r!==o?new Em.IntegerArbitrary(r,r+Math.floor(Math.log(o-r)/Math.log(2))):this.lengthArb}generate(t,n){const o=(n!==void 0&&t.nextInt(1,n)===1?this.biasedLengthArb:this.lengthArb).generate(t,void 0),i=o.value,a=this.originalArray.map((s,c)=>c),u=[];for(let s=0;s!==i;++s){const c=t.nextInt(0,a.length-1);u.push(a[c]),a.splice(c,1)}return this.isOrdered&&u.sort((s,c)=>s-c),new sf.NextValue(u.map(s=>this.originalArray[s]),o.context)}canShrinkWithoutContext(t){return!Array.isArray(t)||!this.lengthArb.canShrinkWithoutContext(t.length)?!1:(0,XR.isSubarrayOf)(this.originalArray,t)}shrink(t,n){return t.length===0?$m.Stream.nil():this.lengthArb.shrink(t.length,n).map(r=>new sf.NextValue(t.slice(t.length-r.value),r.context)).join(t.length>this.minLength?(0,QR.makeLazy)(()=>this.shrink(t.slice(1),void 0).filter(r=>this.minLength<=r.value.length+1).map(r=>new sf.NextValue([t[0]].concat(r.value),void 0))):$m.Stream.nil())}}Da.SubarrayArbitrary=ZR;Object.defineProperty(kc,"__esModule",{value:!0});kc.subarray=void 0;const Mm=M,km=Da;function YR(e,...t){if(typeof t[0]=="number"&&typeof t[1]=="number")return(0,Mm.convertFromNext)(new km.SubarrayArbitrary(e,!0,t[0],t[1]));const n=t[0],r=n!==void 0&&n.minLength!==void 0?n.minLength:0,o=n!==void 0&&n.maxLength!==void 0?n.maxLength:e.length;return(0,Mm.convertFromNext)(new km.SubarrayArbitrary(e,!0,r,o))}kc.subarray=YR;var Rc={};Object.defineProperty(Rc,"__esModule",{value:!0});Rc.shuffledSubarray=void 0;const Fm=M,Rm=Da;function eV(e,...t){if(typeof t[0]=="number"&&typeof t[1]=="number")return(0,Fm.convertFromNext)(new Rm.SubarrayArbitrary(e,!1,t[0],t[1]));const n=t[0],r=n!==void 0&&n.minLength!==void 0?n.minLength:0,o=n!==void 0&&n.maxLength!==void 0?n.maxLength:e.length;return(0,Fm.convertFromNext)(new Rm.SubarrayArbitrary(e,!1,r,o))}Rc.shuffledSubarray=eV;var Vc={},qa={},Rr={};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.numberToPaddedEightUnmapper=Rr.numberToPaddedEightMapper=void 0;function nx(e){return e.toString(16).padStart(8,"0")}Rr.numberToPaddedEightMapper=nx;function tV(e){if(typeof e!="string")throw new Error("Unsupported type");if(e.length!==8)throw new Error("Unsupported value: invalid length");const t=parseInt(e,16);if(e!==nx(t))throw new Error("Unsupported value: invalid content");return t}Rr.numberToPaddedEightUnmapper=tV;Object.defineProperty(qa,"__esModule",{value:!0});qa.buildPaddedNumberArbitrary=void 0;const Vm=M,nV=be,Um=Rr;function rV(e,t){return(0,Vm.convertFromNext)((0,Vm.convertToNext)((0,nV.integer)({min:e,max:t})).map(Um.numberToPaddedEightMapper,Um.numberToPaddedEightUnmapper))}qa.buildPaddedNumberArbitrary=rV;var qn={};Object.defineProperty(qn,"__esModule",{value:!0});qn.paddedEightsToUuidUnmapper=qn.paddedEightsToUuidMapper=void 0;function oV(e){return`${e[0]}-${e[1].substring(4)}-${e[1].substring(0,4)}-${e[2].substring(0,4)}-${e[2].substring(4)}${e[3]}`}qn.paddedEightsToUuidMapper=oV;const iV=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/;function aV(e){if(typeof e!="string")throw new Error("Unsupported type");const t=iV.exec(e);if(t===null)throw new Error("Unsupported type");return[t[1],t[3]+t[2],t[4]+t[5].substring(0,4),t[5].substring(4)]}qn.paddedEightsToUuidUnmapper=aV;Object.defineProperty(Vc,"__esModule",{value:!0});Vc.uuid=void 0;const Dm=M,uV=we,cf=qa,qm=qn;function sV(){const e=(0,cf.buildPaddedNumberArbitrary)(0,4294967295),t=(0,cf.buildPaddedNumberArbitrary)(268435456,1610612735),n=(0,cf.buildPaddedNumberArbitrary)(2147483648,3221225471);return(0,Dm.convertFromNext)((0,Dm.convertToNext)((0,uV.tuple)(e,t,n,e)).map(qm.paddedEightsToUuidMapper,qm.paddedEightsToUuidUnmapper))}Vc.uuid=sV;var Uc={};Object.defineProperty(Uc,"__esModule",{value:!0});Uc.uuidV=void 0;const Lm=M,cV=we,lf=qa,Bm=qn;function lV(e){const t=(0,lf.buildPaddedNumberArbitrary)(0,4294967295),n=e*268435456,r=(0,lf.buildPaddedNumberArbitrary)(n,n+268435455),o=(0,lf.buildPaddedNumberArbitrary)(2147483648,3221225471);return(0,Lm.convertFromNext)((0,Lm.convertToNext)((0,cV.tuple)(t,r,o,t)).map(Bm.paddedEightsToUuidMapper,Bm.paddedEightsToUuidUnmapper))}Uc.uuidV=lV;var La={};Object.defineProperty(La,"__esModule",{value:!0});La.webAuthority=void 0;const fV=eo,zm=at,dV=no,pV=oo,hV=_a,yV=wa,mV=vn,gV=Ot,Wm=xn,bV=nn,vV=we,Au=M;function xV(e){const t=["-",".","_","~","!","$","&","'","(",")","*","+",",",";","=",":"];return(0,bV.stringOf)((0,fV.buildAlphaNumericPercentArbitrary)(t),{size:e})}function _V([e,t,n]){return(e===null?"":`${e}@`)+t+(n===null?"":`:${n}`)}function wV(e){if(typeof e!="string")throw new Error("Unsupported");const t=e.indexOf("@"),n=t!==-1?e.substring(0,t):null,o=/:(\d+)$/.exec(e),i=o!==null?Number(o[1]):null,a=o!==null?e.substring(t+1,e.length-o[1].length-1):e.substring(t+1);return[n,a,i]}function CV(e){return`[${e}]`}function SV(e){if(typeof e!="string"||e[0]!=="["||e[e.length-1]!=="]")throw new Error("Unsupported");return e.substring(1,e.length-1)}function TV(e){const t=e||{},n=t.size,r=[(0,dV.domain)({size:n})].concat(t.withIPv4===!0?[(0,pV.ipV4)()]:[]).concat(t.withIPv6===!0?[(0,Au.convertFromNext)((0,Au.convertToNext)((0,yV.ipV6)()).map(CV,SV))]:[]).concat(t.withIPv4Extended===!0?[(0,hV.ipV4Extended)()]:[]);return(0,Au.convertFromNext)((0,Au.convertToNext)((0,vV.tuple)(t.withUserInfo===!0?(0,Wm.option)(xV(n)):(0,zm.constant)(null),(0,gV.oneof)(...r),t.withPort===!0?(0,Wm.option)((0,mV.nat)(65535)):(0,zm.constant)(null))).map(_V,wV))}La.webAuthority=TV;var Ba={},za={};Object.defineProperty(za,"__esModule",{value:!0});za.buildUriQueryOrFragmentArbitrary=void 0;const AV=eo,IV=nn;function OV(e){const t=["-",".","_","~","!","$","&","'","(",")","*","+",",",";","=",":","@","/","?"];return(0,IV.stringOf)((0,AV.buildAlphaNumericPercentArbitrary)(t),{size:e})}za.buildUriQueryOrFragmentArbitrary=OV;Object.defineProperty(Ba,"__esModule",{value:!0});Ba.webFragments=void 0;const PV=za;function NV(e={}){return(0,PV.buildUriQueryOrFragmentArbitrary)(e.size)}Ba.webFragments=NV;var Wa={};Object.defineProperty(Wa,"__esModule",{value:!0});Wa.webQueryParameters=void 0;const jV=za;function $V(e={}){return(0,jV.buildUriQueryOrFragmentArbitrary)(e.size)}Wa.webQueryParameters=$V;var Ga={};Object.defineProperty(Ga,"__esModule",{value:!0});Ga.webSegment=void 0;const EV=eo,MV=nn;function kV(e={}){const t=["-",".","_","~","!","$","&","'","(",")","*","+",",",";","=",":","@"];return(0,MV.stringOf)((0,EV.buildAlphaNumericPercentArbitrary)(t),{size:e.size})}Ga.webSegment=kV;var Dc={},Vr={};Object.defineProperty(Vr,"__esModule",{value:!0});Vr.partsToUrlUnmapper=Vr.partsToUrlMapper=void 0;function FV(e){const[t,n,r]=e,o=e[3]===null?"":`?${e[3]}`,i=e[4]===null?"":`#${e[4]}`;return`${t}://${n}${r}${o}${i}`}Vr.partsToUrlMapper=FV;const RV=/^([[A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)([^?#]*)(\?[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?(#[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?$/;function VV(e){if(typeof e!="string")throw new Error("Incompatible value received: type");const t=RV.exec(e);if(t===null)throw new Error("Incompatible value received");const n=t[1],r=t[2],o=t[3],i=t[4],a=t[5];return[n,r,o,i!==void 0?i.substring(1):null,a!==void 0?a.substring(1):null]}Vr.partsToUrlUnmapper=VV;var qc={},Ur={};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.segmentsToPathUnmapper=Ur.segmentsToPathMapper=void 0;function UV(e){return e.map(t=>`/${t}`).join("")}Ur.segmentsToPathMapper=UV;function DV(e){if(typeof e!="string")throw new Error("Incompatible value received: type");if(e.length!==0&&e[0]!=="/")throw new Error("Incompatible value received: start");return e.split("/").splice(1)}Ur.segmentsToPathUnmapper=DV;Object.defineProperty(qc,"__esModule",{value:!0});qc.buildUriPathArbitrary=void 0;const Gm=M,qV=Ga,LV=ge,Km=Ur;function BV(e){switch(e){case"xsmall":return["xsmall","xsmall"];case"small":return["small","xsmall"];case"medium":return["small","small"];case"large":return["medium","small"];case"xlarge":return["medium","medium"]}}function zV(e){const[t,n]=BV(e);return(0,Gm.convertFromNext)((0,Gm.convertToNext)((0,LV.array)((0,qV.webSegment)({size:t}),{size:n})).map(Km.segmentsToPathMapper,Km.segmentsToPathUnmapper))}qc.buildUriPathArbitrary=zV;Object.defineProperty(Dc,"__esModule",{value:!0});Dc.webUrl=void 0;const WV=Kn,Hm=at,Jm=xn,GV=we,KV=Wa,HV=Ba,JV=La,Qm=M,Xm=Vr,Zm=ht,QV=qc;function XV(e){const t=e||{},n=(0,Zm.resolveSize)(t.size),r=t.authoritySettings!==void 0&&t.authoritySettings.size!==void 0?(0,Zm.relativeSizeToSize)(t.authoritySettings.size,n):n,o=Object.assign(Object.assign({},t.authoritySettings),{size:r}),i=t.validSchemes||["http","https"],a=(0,WV.constantFrom)(...i),u=(0,JV.webAuthority)(o),s=(0,QV.buildUriPathArbitrary)(n);return(0,Qm.convertFromNext)((0,Qm.convertToNext)((0,GV.tuple)(a,u,s,t.withQueryParameters===!0?(0,Jm.option)((0,KV.webQueryParameters)({size:n})):(0,Hm.constant)(null),t.withFragments===!0?(0,Jm.option)((0,HV.webFragments)({size:n})):(0,Hm.constant)(null))).map(Xm.partsToUrlMapper,Xm.partsToUrlUnmapper))}Dc.webUrl=XV;var Lc={},Bc={},zc={};Object.defineProperty(zc,"__esModule",{value:!0});zc.CommandsIterable=void 0;const ZV=Fe;class Ed{constructor(t,n){this.commands=t,this.metadataForReplay=n}[Symbol.iterator](){return this.commands[Symbol.iterator]()}[ZV.cloneMethod](){return new Ed(this.commands.map(t=>t.clone()),this.metadataForReplay)}toString(){const t=this.commands.filter(r=>r.hasRan).map(r=>r.toString()).join(","),n=this.metadataForReplay();return n.length!==0?`${t} /*${n}*/`:t}}zc.CommandsIterable=Ed;var Wc={};Object.defineProperty(Wc,"__esModule",{value:!0});Wc.CommandWrapper=void 0;const lr=At,Ym=Fe;class os{constructor(t){if(this.cmd=t,this.hasRan=!1,(0,lr.hasToStringMethod)(t)){const n=t[lr.toStringMethod];this[lr.toStringMethod]=function(){return n.call(t)}}if((0,lr.hasAsyncToStringMethod)(t)){const n=t[lr.asyncToStringMethod];this[lr.asyncToStringMethod]=function(){return n.call(t)}}}check(t){return this.cmd.check(t)}run(t,n){return this.hasRan=!0,this.cmd.run(t,n)}clone(){return(0,Ym.hasCloneMethod)(this.cmd)?new os(this.cmd[Ym.cloneMethod]()):new os(this.cmd)}toString(){return this.cmd.toString()}}Wc.CommandWrapper=os;var Gc={};Object.defineProperty(Gc,"__esModule",{value:!0});Gc.ReplayPath=void 0;class YV{static parse(t){const[n,r]=t.split(":"),o=this.parseCounts(n),i=this.parseChanges(r);return this.parseOccurences(o,i)}static stringify(t){const n=this.countOccurences(t),r=this.stringifyCounts(n),o=this.stringifyChanges(n);return`${r}:${o}`}static intToB64(t){return t<26?String.fromCharCode(t+65):t<52?String.fromCharCode(t+97-26):t<62?String.fromCharCode(t+48-52):String.fromCharCode(t===62?43:47)}static b64ToInt(t){return t>="a"?t.charCodeAt(0)-97+26:t>="A"?t.charCodeAt(0)-65:t>="0"?t.charCodeAt(0)-48+52:t==="+"?62:63}static countOccurences(t){return t.reduce((n,r)=>(n.length===0||n[n.length-1].count===64||n[n.length-1].value!==r?n.push({value:r,count:1}):n[n.length-1].count+=1,n),[])}static parseOccurences(t,n){const r=[];for(let o=0;o!==t.length;++o){const i=t[o],a=n[o];for(let u=0;u!==i;++u)r.push(a)}return r}static stringifyChanges(t){let n="";for(let r=0;r<t.length;r+=6){const o=t.slice(r,r+6).reduceRight((i,a)=>i*2+(a.value?1:0),0);n+=this.intToB64(o)}return n}static parseChanges(t){const n=t.split("").map(o=>this.b64ToInt(o)),r=[];for(let o=0;o!==n.length;++o){let i=n[o];for(let a=0;a!==6;++a,i>>=1)r.push(i%2===1)}return r}static stringifyCounts(t){return t.map(({count:n})=>this.intToB64(n-1)).join("")}static parseCounts(t){return t.split("").map(n=>this.b64ToInt(n)+1)}}Gc.ReplayPath=YV;Object.defineProperty(Bc,"__esModule",{value:!0});Bc.CommandsArbitrary=void 0;const eg=M,e2=de,tg=he,t2=zc,n2=Wc,ng=Gc,rg=Wn,Iu=re,r2=Ot,o2=Fa;class i2 extends e2.NextArbitrary{constructor(t,n,r,o,i){super(),this.sourceReplayPath=o,this.disableReplayLog=i,this.oneCommandArb=(0,eg.convertToNext)((0,r2.oneof)(...t).map(a=>new n2.CommandWrapper(a))),this.lengthArb=(0,eg.convertToNext)((0,o2.restrictedIntegerArbitraryBuilder)(0,n,r)),this.replayPath=[],this.replayPathPosition=0}metadataForReplay(){return this.disableReplayLog?"":`replayPath=${JSON.stringify(ng.ReplayPath.stringify(this.replayPath))}`}buildNextValueFor(t,n){const r=t.map(i=>i.value_),o={shrunkOnce:n,items:t};return new tg.NextValue(new t2.CommandsIterable(r,()=>this.metadataForReplay()),o)}generate(t){const r=this.lengthArb.generate(t,void 0).value,o=Array(r);for(let i=0;i!==r;++i){const a=this.oneCommandArb.generate(t,void 0);o[i]=a}return this.replayPathPosition=0,this.buildNextValueFor(o,!1)}canShrinkWithoutContext(t){return!1}filterOnExecution(t){const n=[];for(const r of t)r.value_.hasRan?(this.replayPath.push(!0),n.push(r)):this.replayPath.push(!1);return n}filterOnReplay(t){return t.filter((n,r)=>{const o=this.replayPath[this.replayPathPosition+r];if(o===void 0)throw new Error("Too short replayPath");if(!o&&n.value_.hasRan)throw new Error("Mismatch between replayPath and real execution");return o})}filterForShrinkImpl(t){this.replayPathPosition===0&&(this.replayPath=this.sourceReplayPath!==null?ng.ReplayPath.parse(this.sourceReplayPath):[]);const n=this.replayPathPosition<this.replayPath.length?this.filterOnReplay(t):this.filterOnExecution(t);return this.replayPathPosition+=t.length,n}shrink(t,n){if(n===void 0)return Iu.Stream.nil();const r=n,o=r.shrunkOnce,i=r.items,a=this.filterForShrinkImpl(i);if(a.length===0)return Iu.Stream.nil();const u=o?Iu.Stream.nil():new Iu.Stream([[]][Symbol.iterator]()),s=[];for(let c=0;c!==a.length;++c)s.push((0,rg.makeLazy)(()=>{const f=a.slice(0,c);return this.lengthArb.shrink(a.length-1-c,void 0).map(l=>f.concat(a.slice(a.length-(l.value+1))))}));for(let c=0;c!==a.length;++c)s.push((0,rg.makeLazy)(()=>this.oneCommandArb.shrink(a[c].value_,a[c].context).map(f=>a.slice(0,c).concat([f],a.slice(c+1)))));return u.join(...s).map(c=>this.buildNextValueFor(c.map(f=>new tg.NextValue(f.value_.clone(),f.context)),!0))}}Bc.CommandsArbitrary=i2;Object.defineProperty(Lc,"__esModule",{value:!0});Lc.commands=void 0;const a2=M,u2=Bc,og=ht;function s2(e,t){const n=t==null?{}:typeof t=="number"?{maxCommands:t}:t,r=n.size,o=n.maxCommands!==void 0?n.maxCommands:og.MaxLengthUpperBound,i=n.maxCommands!==void 0,a=(0,og.maxGeneratedLengthFromSizeForArbitrary)(r,0,o,i);return(0,a2.convertFromNext)(new u2.CommandsArbitrary(e,a,o,n.replayPath!=null?n.replayPath:null,!!n.disableReplayLog))}Lc.commands=s2;var dn={},Dr={};Object.defineProperty(Dr,"__esModule",{value:!0});Dr.scheduleCommands=Dr.ScheduledCommand=void 0;class rx{constructor(t,n){this.s=t,this.cmd=n}async check(t){let n=null,r=!1;if((await this.s.scheduleSequence([{label:`check@${this.cmd.toString()}`,builder:async()=>{try{r=await Promise.resolve(this.cmd.check(t))}catch(i){throw n=i,i}}}]).task).faulty)throw n;return r}async run(t,n){let r=null;if((await this.s.scheduleSequence([{label:`run@${this.cmd.toString()}`,builder:async()=>{try{await this.cmd.run(t,n)}catch(i){throw r=i,i}}}]).task).faulty)throw r}}Dr.ScheduledCommand=rx;const c2=function*(e,t){for(const n of t)yield new rx(e,n)};Dr.scheduleCommands=c2;Object.defineProperty(dn,"__esModule",{value:!0});dn.scheduledModelRun=dn.asyncModelRun=dn.modelRun=void 0;const l2=Dr,ox=(e,t,n,r,o)=>e.then(i=>{const{model:a,real:u}=i;let s=n;for(const c of t)s=o(s,()=>r(c,a,u));return s}),f2=(e,t)=>ox({then:i=>{i(e())}},t,void 0,(i,a,u)=>{i.check(a)&&i.run(a,u)},(i,a)=>a()),d2=e=>typeof e.then=="function",ix=async(e,t,n=Promise.resolve())=>await ox({then:a=>{const u=e();return d2(u)?u.then(a):a(u)}},t,n,async(a,u,s)=>{await a.check(u)&&await a.run(u,s)},(a,u)=>a.then(u));function p2(e,t){f2(e,t)}dn.modelRun=p2;async function h2(e,t){await ix(e,t)}dn.asyncModelRun=h2;async function y2(e,t,n){const r=(0,l2.scheduleCommands)(e,n),o=ix(t,r,e.schedule(Promise.resolve(),"startModel"));await e.waitAll(),await o}dn.scheduledModelRun=y2;var qr={},Kc={},Ka={};Object.defineProperty(Ka,"__esModule",{value:!0});Ka.SchedulerImplem=void 0;const m2=hn,g2=Fe,ig=At;class is{constructor(t,n){this.act=t,this.taskSelector=n,this.lastTaskId=0,this.sourceTaskSelector=n.clone(),this.scheduledTasks=[],this.triggeredTasks=[],this.scheduledWatchers=[]}static buildLog(t){return`[task\${${t.taskId}}] ${t.label.length!==0?`${t.schedulingType}::${t.label}`:t.schedulingType} ${t.status}${t.outputValue!==void 0?` with value ${(0,m2.escapeForTemplateString)(t.outputValue)}`:""}`}log(t,n,r,o,i,a){this.triggeredTasks.push({status:i,schedulingType:t,taskId:n,label:r,metadata:o,outputValue:a!==void 0?(0,ig.stringify)(a):void 0})}scheduleInternal(t,n,r,o,i){let a=null;const u=++this.lastTaskId,s=new Promise((c,f)=>{a=()=>{(i?r.then(()=>i()):r).then(l=>(this.log(t,u,n,o,"resolved",l),c(l)),l=>(this.log(t,u,n,o,"rejected",l),f(l)))}});return this.scheduledTasks.push({original:r,scheduled:s,trigger:a,schedulingType:t,taskId:u,label:n,metadata:o}),this.scheduledWatchers.length!==0&&this.scheduledWatchers[0](),s}schedule(t,n,r){return this.scheduleInternal("promise",n||"",t,r)}scheduleFunction(t){return(...n)=>this.scheduleInternal("function",`${t.name}(${n.map(ig.stringify).join(",")})`,t(...n),void 0)}scheduleSequence(t){const n={done:!1,faulty:!1},r={then:a=>a()};let o=()=>{};const i=new Promise(a=>o=a);return t.reduce((a,u)=>{const[s,c,f]=typeof u=="function"?[u,u.name,void 0]:[u.builder,u.label,u.metadata];return a.then(()=>{const l=this.scheduleInternal("sequence",c,r,f,()=>s());return l.catch(()=>{n.faulty=!0,o()}),l})},r).then(()=>{n.done=!0,o()},()=>{}),Object.assign(n,{task:Promise.resolve(i).then(()=>({done:n.done,faulty:n.faulty}))})}count(){return this.scheduledTasks.length}async internalWaitOne(){if(this.scheduledTasks.length===0)throw new Error("No task scheduled");const t=this.taskSelector.nextTaskIndex(this.scheduledTasks),[n]=this.scheduledTasks.splice(t,1);n.trigger();try{await n.scheduled}catch{}}async waitOne(){await this.act(async()=>await this.internalWaitOne())}async waitAll(){for(;this.scheduledTasks.length>0;)await this.waitOne()}async waitFor(t){let n=!1,r=null;const o=async()=>{for(;!n&&this.scheduledTasks.length>0;)await this.waitOne();r=null},i=()=>{r===null&&(r=Promise.resolve().then(o))},a=()=>{const s=this.scheduledWatchers.indexOf(i);s!==-1&&this.scheduledWatchers.splice(s,1),s===0&&this.scheduledWatchers.length!==0&&this.scheduledWatchers[0]()},u=t.then(s=>(n=!0,r===null?(a(),s):r.then(()=>(a(),s))),s=>{if(n=!0,r===null)throw a(),s;return r.then(()=>{throw a(),s})});return this.scheduledTasks.length>0&&this.scheduledWatchers.length===0&&i(),this.scheduledWatchers.push(i),u}report(){return[...this.triggeredTasks,...this.scheduledTasks.map(t=>({status:"pending",schedulingType:t.schedulingType,taskId:t.taskId,label:t.label,metadata:t.metadata}))]}toString(){return"schedulerFor()`\n"+this.report().map(is.buildLog).map(t=>`-> ${t}`).join(`
331
+ `)+"`"}[g2.cloneMethod](){return new is(this.act,this.sourceTaskSelector)}}Ka.SchedulerImplem=is;Object.defineProperty(Kc,"__esModule",{value:!0});Kc.buildSchedulerFor=void 0;const b2=Ka;function ax(e){let t=0;return{clone:()=>ax(e),nextTaskIndex:n=>{if(e.length<=t)throw new Error("Invalid schedulerFor defined: too many tasks have been scheduled");const r=n.findIndex(o=>o.taskId===e[t]);if(r===-1)throw new Error("Invalid schedulerFor defined: unable to find next task");return++t,r}}}function v2(e,t){return new b2.SchedulerImplem(e,ax(t))}Kc.buildSchedulerFor=v2;var Hc={};Object.defineProperty(Hc,"__esModule",{value:!0});Hc.SchedulerArbitrary=void 0;const x2=de,_2=he,w2=re,C2=Ka;function ux(e){const t=e.clone();return{clone:()=>ux(t),nextTaskIndex:n=>e.nextInt(0,n.length-1)}}class S2 extends x2.NextArbitrary{constructor(t){super(),this.act=t}generate(t,n){return new _2.NextValue(new C2.SchedulerImplem(this.act,ux(t.clone())),void 0)}canShrinkWithoutContext(t){return!1}shrink(t,n){return w2.Stream.nil()}}Hc.SchedulerArbitrary=S2;Object.defineProperty(qr,"__esModule",{value:!0});qr.schedulerFor=qr.scheduler=void 0;const T2=M,ag=Kc,A2=Hc;function I2(e){const{act:t=n=>n()}=e||{};return(0,T2.convertFromNext)(new A2.SchedulerArbitrary(t))}qr.scheduler=I2;function O2(e,t){const{act:n=r=>r()}=Array.isArray(e)?t||{}:e||{};return Array.isArray(e)?(0,ag.buildSchedulerFor)(n,e):function(r,...o){return(0,ag.buildSchedulerFor)(n,o)}}qr.schedulerFor=O2;var Jc={};Object.defineProperty(Jc,"__esModule",{value:!0});Jc.ArbitraryWithShrink=void 0;const P2=Gt,N2=tn;class j2 extends P2.Arbitrary{shrinkableFor(t,n){return new N2.Shrinkable(t,()=>this.shrink(t,n===!0).map(r=>this.shrinkableFor(r,!0)))}}Jc.ArbitraryWithShrink=j2;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.shuffledSubarray=e.dedup=e.clone=e.frequency=e.oneof=e.option=e.mapToConstant=e.clonedConstant=e.constantFrom=e.constant=e.lorem=e.base64String=e.hexaString=e.fullUnicodeString=e.unicodeString=e.stringOf=e.string16bits=e.asciiString=e.string=e.mixedCase=e.base64=e.hexa=e.fullUnicode=e.unicode=e.char16bits=e.ascii=e.char=e.bigUint=e.bigInt=e.bigUintN=e.bigIntN=e.maxSafeNat=e.maxSafeInteger=e.nat=e.integer=e.double=e.float=e.falsy=e.boolean=e.asyncProperty=e.property=e.PreconditionFailure=e.pre=e.assert=e.check=e.statistics=e.sample=e.__commitHash=e.__version=e.__type=void 0,e.commands=e.scheduledModelRun=e.modelRun=e.asyncModelRun=e.float64Array=e.float32Array=e.uint32Array=e.int32Array=e.uint16Array=e.int16Array=e.uint8ClampedArray=e.uint8Array=e.int8Array=e.uuidV=e.uuid=e.emailAddress=e.webUrl=e.webQueryParameters=e.webFragments=e.webSegment=e.webAuthority=e.domain=e.ipV6=e.ipV4Extended=e.ipV4=e.date=e.context=e.func=e.compareFunc=e.compareBooleanFunc=e.memo=e.letrec=e.unicodeJsonValue=e.unicodeJsonObject=e.unicodeJson=e.jsonValue=e.jsonObject=e.json=e.object=e.anything=e.dictionary=e.record=e.genericTuple=e.tuple=e.uniqueArray=e.set=e.infiniteStream=e.sparseArray=e.array=e.subarray=void 0,e.createDepthIdentifier=e.stream=e.Stream=e.Random=e.ExecutionStatus=e.resetConfigureGlobal=e.readConfigureGlobal=e.configureGlobal=e.VerbosityLevel=e.hash=e.asyncDefaultReportMessage=e.defaultReportMessage=e.asyncStringify=e.stringify=e.getDepthContextFor=e.hasAsyncToStringMethod=e.asyncToStringMethod=e.hasToStringMethod=e.toStringMethod=e.convertToNext=e.convertFromNextWithShrunkOnce=e.convertFromNext=e.hasCloneMethod=e.cloneIfNeeded=e.cloneMethod=e.NextValue=e.Shrinkable=e.ArbitraryWithContextualShrink=e.ArbitraryWithShrink=e.NextArbitrary=e.Arbitrary=e.schedulerFor=e.scheduler=void 0;const t=Ss;Object.defineProperty(e,"pre",{enumerable:!0,get:function(){return t.pre}});const n=b0;Object.defineProperty(e,"asyncProperty",{enumerable:!0,get:function(){return n.asyncProperty}});const r=O0;Object.defineProperty(e,"property",{enumerable:!0,get:function(){return r.property}});const o=Cr;Object.defineProperty(e,"assert",{enumerable:!0,get:function(){return o.assert}}),Object.defineProperty(e,"check",{enumerable:!0,get:function(){return o.check}});const i=Tr;Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return i.sample}}),Object.defineProperty(e,"statistics",{enumerable:!0,get:function(){return i.statistics}});const a=ge;Object.defineProperty(e,"array",{enumerable:!0,get:function(){return a.array}});const u=ea;Object.defineProperty(e,"bigInt",{enumerable:!0,get:function(){return u.bigInt}});const s=Js;Object.defineProperty(e,"bigIntN",{enumerable:!0,get:function(){return s.bigIntN}});const c=Qs;Object.defineProperty(e,"bigUint",{enumerable:!0,get:function(){return c.bigUint}});const f=ta;Object.defineProperty(e,"bigUintN",{enumerable:!0,get:function(){return f.bigUintN}});const l=Zr;Object.defineProperty(e,"boolean",{enumerable:!0,get:function(){return l.boolean}});const d=Xs;Object.defineProperty(e,"falsy",{enumerable:!0,get:function(){return d.falsy}});const p=ra;Object.defineProperty(e,"ascii",{enumerable:!0,get:function(){return p.ascii}});const y=oa;Object.defineProperty(e,"base64",{enumerable:!0,get:function(){return y.base64}});const h=ia;Object.defineProperty(e,"char",{enumerable:!0,get:function(){return h.char}});const m=aa;Object.defineProperty(e,"char16bits",{enumerable:!0,get:function(){return m.char16bits}});const g=Yr;Object.defineProperty(e,"fullUnicode",{enumerable:!0,get:function(){return g.fullUnicode}});const w=ua;Object.defineProperty(e,"hexa",{enumerable:!0,get:function(){return w.hexa}});const N=sa;Object.defineProperty(e,"unicode",{enumerable:!0,get:function(){return N.unicode}});const T=Zs;Object.defineProperty(e,"clonedConstant",{enumerable:!0,get:function(){return T.clonedConstant}});const A=at;Object.defineProperty(e,"constant",{enumerable:!0,get:function(){return A.constant}});const O=Kn;Object.defineProperty(e,"constantFrom",{enumerable:!0,get:function(){return O.constantFrom}});const U=Ys;Object.defineProperty(e,"context",{enumerable:!0,get:function(){return U.context}});const E=ca;Object.defineProperty(e,"date",{enumerable:!0,get:function(){return E.date}});const W=la;Object.defineProperty(e,"clone",{enumerable:!0,get:function(){return W.clone}});const S=tc;Object.defineProperty(e,"dedup",{enumerable:!0,get:function(){return S.dedup}});const $=Gt;Object.defineProperty(e,"Arbitrary",{enumerable:!0,get:function(){return $.Arbitrary}});const z=tn;Object.defineProperty(e,"Shrinkable",{enumerable:!0,get:function(){return z.Shrinkable}});const R=fa;Object.defineProperty(e,"dictionary",{enumerable:!0,get:function(){return R.dictionary}});const k=nc;Object.defineProperty(e,"emailAddress",{enumerable:!0,get:function(){return k.emailAddress}});const F=Qn;Object.defineProperty(e,"double",{enumerable:!0,get:function(){return F.double}});const V=ba;Object.defineProperty(e,"float",{enumerable:!0,get:function(){return V.float}});const j=Jn;Object.defineProperty(e,"frequency",{enumerable:!0,get:function(){return j.frequency}});const L=sc;Object.defineProperty(e,"compareBooleanFunc",{enumerable:!0,get:function(){return L.compareBooleanFunc}});const ae=cc;Object.defineProperty(e,"compareFunc",{enumerable:!0,get:function(){return ae.compareFunc}});const Q=lc;Object.defineProperty(e,"func",{enumerable:!0,get:function(){return Q.func}});const J=no;Object.defineProperty(e,"domain",{enumerable:!0,get:function(){return J.domain}});const Z=be;Object.defineProperty(e,"integer",{enumerable:!0,get:function(){return Z.integer}});const ee=xa;Object.defineProperty(e,"maxSafeInteger",{enumerable:!0,get:function(){return ee.maxSafeInteger}});const ue=fc;Object.defineProperty(e,"maxSafeNat",{enumerable:!0,get:function(){return ue.maxSafeNat}});const fe=vn;Object.defineProperty(e,"nat",{enumerable:!0,get:function(){return fe.nat}});const Ce=oo;Object.defineProperty(e,"ipV4",{enumerable:!0,get:function(){return Ce.ipV4}});const Be=_a;Object.defineProperty(e,"ipV4Extended",{enumerable:!0,get:function(){return Be.ipV4Extended}});const Cn=wa;Object.defineProperty(e,"ipV6",{enumerable:!0,get:function(){return Cn.ipV6}});const wl=Sa;Object.defineProperty(e,"letrec",{enumerable:!0,get:function(){return wl.letrec}});const su=hc;Object.defineProperty(e,"lorem",{enumerable:!0,get:function(){return su.lorem}});const Z_=ma;Object.defineProperty(e,"mapToConstant",{enumerable:!0,get:function(){return Z_.mapToConstant}});const Y_=yc;Object.defineProperty(e,"memo",{enumerable:!0,get:function(){return Y_.memo}});const ew=mc;Object.defineProperty(e,"mixedCase",{enumerable:!0,get:function(){return ew.mixedCase}});const tw=bc;Object.defineProperty(e,"object",{enumerable:!0,get:function(){return tw.object}});const nw=_c;Object.defineProperty(e,"json",{enumerable:!0,get:function(){return nw.json}});const rw=uo;Object.defineProperty(e,"anything",{enumerable:!0,get:function(){return rw.anything}});const ow=wc;Object.defineProperty(e,"unicodeJsonObject",{enumerable:!0,get:function(){return ow.unicodeJsonObject}});const iw=so;Object.defineProperty(e,"unicodeJsonValue",{enumerable:!0,get:function(){return iw.unicodeJsonValue}});const aw=Cc;Object.defineProperty(e,"jsonObject",{enumerable:!0,get:function(){return aw.jsonObject}});const uw=ao;Object.defineProperty(e,"jsonValue",{enumerable:!0,get:function(){return uw.jsonValue}});const sw=Sc;Object.defineProperty(e,"unicodeJson",{enumerable:!0,get:function(){return sw.unicodeJson}});const cw=Ot;Object.defineProperty(e,"oneof",{enumerable:!0,get:function(){return cw.oneof}});const lw=xn;Object.defineProperty(e,"option",{enumerable:!0,get:function(){return lw.option}});const fw=Tc;Object.defineProperty(e,"record",{enumerable:!0,get:function(){return fw.record}});const dw=Oc;Object.defineProperty(e,"set",{enumerable:!0,get:function(){return dw.set}});const pw=Hn;Object.defineProperty(e,"uniqueArray",{enumerable:!0,get:function(){return pw.uniqueArray}});const hw=Pc;Object.defineProperty(e,"infiniteStream",{enumerable:!0,get:function(){return hw.infiniteStream}});const yw=jc;Object.defineProperty(e,"asciiString",{enumerable:!0,get:function(){return yw.asciiString}});const mw=$c;Object.defineProperty(e,"base64String",{enumerable:!0,get:function(){return mw.base64String}});const gw=Ec;Object.defineProperty(e,"fullUnicodeString",{enumerable:!0,get:function(){return gw.fullUnicodeString}});const bw=Ca;Object.defineProperty(e,"hexaString",{enumerable:!0,get:function(){return bw.hexaString}});const vw=io;Object.defineProperty(e,"string",{enumerable:!0,get:function(){return vw.string}});const xw=Mc;Object.defineProperty(e,"string16bits",{enumerable:!0,get:function(){return xw.string16bits}});const _w=nn;Object.defineProperty(e,"stringOf",{enumerable:!0,get:function(){return _w.stringOf}});const ww=Ua;Object.defineProperty(e,"unicodeString",{enumerable:!0,get:function(){return ww.unicodeString}});const Cw=kc;Object.defineProperty(e,"subarray",{enumerable:!0,get:function(){return Cw.subarray}});const Sw=Rc;Object.defineProperty(e,"shuffledSubarray",{enumerable:!0,get:function(){return Sw.shuffledSubarray}});const Tw=Hr;Object.defineProperty(e,"genericTuple",{enumerable:!0,get:function(){return Tw.genericTuple}});const Aw=we;Object.defineProperty(e,"tuple",{enumerable:!0,get:function(){return Aw.tuple}});const Iw=Vc;Object.defineProperty(e,"uuid",{enumerable:!0,get:function(){return Iw.uuid}});const Ow=Uc;Object.defineProperty(e,"uuidV",{enumerable:!0,get:function(){return Ow.uuidV}});const Pw=La;Object.defineProperty(e,"webAuthority",{enumerable:!0,get:function(){return Pw.webAuthority}});const Nw=Ba;Object.defineProperty(e,"webFragments",{enumerable:!0,get:function(){return Nw.webFragments}});const jw=Wa;Object.defineProperty(e,"webQueryParameters",{enumerable:!0,get:function(){return jw.webQueryParameters}});const $w=Ga;Object.defineProperty(e,"webSegment",{enumerable:!0,get:function(){return $w.webSegment}});const Ew=Dc;Object.defineProperty(e,"webUrl",{enumerable:!0,get:function(){return Ew.webUrl}});const Mw=Lc;Object.defineProperty(e,"commands",{enumerable:!0,get:function(){return Mw.commands}});const Cl=dn;Object.defineProperty(e,"asyncModelRun",{enumerable:!0,get:function(){return Cl.asyncModelRun}}),Object.defineProperty(e,"modelRun",{enumerable:!0,get:function(){return Cl.modelRun}}),Object.defineProperty(e,"scheduledModelRun",{enumerable:!0,get:function(){return Cl.scheduledModelRun}});const kw=Xi;Object.defineProperty(e,"Random",{enumerable:!0,get:function(){return kw.Random}});const Sl=Je;Object.defineProperty(e,"configureGlobal",{enumerable:!0,get:function(){return Sl.configureGlobal}}),Object.defineProperty(e,"readConfigureGlobal",{enumerable:!0,get:function(){return Sl.readConfigureGlobal}}),Object.defineProperty(e,"resetConfigureGlobal",{enumerable:!0,get:function(){return Sl.resetConfigureGlobal}});const Fw=Hi;Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return Fw.VerbosityLevel}});const Rw=zs;Object.defineProperty(e,"ExecutionStatus",{enumerable:!0,get:function(){return Rw.ExecutionStatus}});const Tl=Fe;Object.defineProperty(e,"cloneMethod",{enumerable:!0,get:function(){return Tl.cloneMethod}}),Object.defineProperty(e,"cloneIfNeeded",{enumerable:!0,get:function(){return Tl.cloneIfNeeded}}),Object.defineProperty(e,"hasCloneMethod",{enumerable:!0,get:function(){return Tl.hasCloneMethod}});const gp=re;Object.defineProperty(e,"Stream",{enumerable:!0,get:function(){return gp.Stream}}),Object.defineProperty(e,"stream",{enumerable:!0,get:function(){return gp.stream}});const Vw=ro;Object.defineProperty(e,"hash",{enumerable:!0,get:function(){return Vw.hash}});const or=At;Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return or.stringify}}),Object.defineProperty(e,"asyncStringify",{enumerable:!0,get:function(){return or.asyncStringify}}),Object.defineProperty(e,"toStringMethod",{enumerable:!0,get:function(){return or.toStringMethod}}),Object.defineProperty(e,"hasToStringMethod",{enumerable:!0,get:function(){return or.hasToStringMethod}}),Object.defineProperty(e,"asyncToStringMethod",{enumerable:!0,get:function(){return or.asyncToStringMethod}}),Object.defineProperty(e,"hasAsyncToStringMethod",{enumerable:!0,get:function(){return or.hasAsyncToStringMethod}});const bp=qr;Object.defineProperty(e,"scheduler",{enumerable:!0,get:function(){return bp.scheduler}}),Object.defineProperty(e,"schedulerFor",{enumerable:!0,get:function(){return bp.schedulerFor}});const vp=ft;Object.defineProperty(e,"defaultReportMessage",{enumerable:!0,get:function(){return vp.defaultReportMessage}}),Object.defineProperty(e,"asyncDefaultReportMessage",{enumerable:!0,get:function(){return vp.asyncDefaultReportMessage}});const Uw=Jc;Object.defineProperty(e,"ArbitraryWithShrink",{enumerable:!0,get:function(){return Uw.ArbitraryWithShrink}});const Dw=Ri;Object.defineProperty(e,"ArbitraryWithContextualShrink",{enumerable:!0,get:function(){return Dw.ArbitraryWithContextualShrink}});const qw=en;Object.defineProperty(e,"PreconditionFailure",{enumerable:!0,get:function(){return qw.PreconditionFailure}});const Lw=Na;Object.defineProperty(e,"int8Array",{enumerable:!0,get:function(){return Lw.int8Array}});const Bw=Oa;Object.defineProperty(e,"int16Array",{enumerable:!0,get:function(){return Bw.int16Array}});const zw=Pa;Object.defineProperty(e,"int32Array",{enumerable:!0,get:function(){return zw.int32Array}});const Ww=Ea;Object.defineProperty(e,"uint8Array",{enumerable:!0,get:function(){return Ww.uint8Array}});const Gw=Ma;Object.defineProperty(e,"uint8ClampedArray",{enumerable:!0,get:function(){return Gw.uint8ClampedArray}});const Kw=ja;Object.defineProperty(e,"uint16Array",{enumerable:!0,get:function(){return Kw.uint16Array}});const Hw=$a;Object.defineProperty(e,"uint32Array",{enumerable:!0,get:function(){return Hw.uint32Array}});const Jw=Aa;Object.defineProperty(e,"float32Array",{enumerable:!0,get:function(){return Jw.float32Array}});const Qw=Ia;Object.defineProperty(e,"float64Array",{enumerable:!0,get:function(){return Qw.float64Array}});const Xw=ka;Object.defineProperty(e,"sparseArray",{enumerable:!0,get:function(){return Xw.sparseArray}});const Zw=de;Object.defineProperty(e,"NextArbitrary",{enumerable:!0,get:function(){return Zw.NextArbitrary}});const Yw=he;Object.defineProperty(e,"NextValue",{enumerable:!0,get:function(){return Yw.NextValue}});const Al=M;Object.defineProperty(e,"convertFromNext",{enumerable:!0,get:function(){return Al.convertFromNext}}),Object.defineProperty(e,"convertFromNextWithShrunkOnce",{enumerable:!0,get:function(){return Al.convertFromNextWithShrunkOnce}}),Object.defineProperty(e,"convertToNext",{enumerable:!0,get:function(){return Al.convertToNext}});const xp=Kt;Object.defineProperty(e,"createDepthIdentifier",{enumerable:!0,get:function(){return xp.createDepthIdentifier}}),Object.defineProperty(e,"getDepthContextFor",{enumerable:!0,get:function(){return xp.getDepthContextFor}});const eC="commonjs";e.__type=eC;const tC="2.25.0";e.__version=tC;const nC="4c36a82eca7402fb502db7d227b192eb458b2f15";e.__commitHash=nC})(Rf);(function(e){var t=K&&K.__createBinding||(Object.create?function(o,i,a,u){u===void 0&&(u=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(o,u,s)}:function(o,i,a,u){u===void 0&&(u=a),o[u]=i[a]}),n=K&&K.__exportStar||function(o,i){for(var a in o)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,o,a)};Object.defineProperty(e,"__esModule",{value:!0});const r=Rf;e.default=r,n(Rf,e)})(Tt);var Pe={};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.FastCheckType=Pe.FastCheckURI=void 0;Pe.FastCheckURI="FastCheckURI";var $2=function(){function e(t){this.arb=t}return e}();Pe.FastCheckType=$2;var ff={},df={},Do={},ug;function sx(){if(ug)return Do;ug=1,Object.defineProperty(Do,"__esModule",{value:!0}),Do.fastCheckPrimitiveInterpreter=void 0;var e=q,t=Tt,n=Ni,r=Xt,o=cC,i=fs,a=Nt(),u=Pe;return Do.fastCheckPrimitiveInterpreter=e.memo(function(){return{_F:u.FastCheckURI,date:function(s){return function(c){return new u.FastCheckType(a.fastCheckApplyConfig(s)(t.integer().map(function(f){return new Date(f)}),c,{}))}},boolean:function(s){return function(c){return new u.FastCheckType(a.fastCheckApplyConfig(s)(t.boolean(),c,{}))}},string:function(s){return function(c){return new u.FastCheckType(a.fastCheckApplyConfig(s)(t.string(),c,{}))}},number:function(s){return function(c){return new u.FastCheckType(a.fastCheckApplyConfig(s)(t.float(),c,{}))}},bigint:function(s){return function(c){return new u.FastCheckType(a.fastCheckApplyConfig(s)(t.bigInt(),c,{}))}},stringLiteral:function(s,c){return function(f){return new u.FastCheckType(a.fastCheckApplyConfig(c)(t.constant(s),f,{}))}},numberLiteral:function(s,c){return function(f){return new u.FastCheckType(a.fastCheckApplyConfig(c)(t.constant(s),f,{}))}},oneOfLiterals:function(s,c){return function(f){return new u.FastCheckType(a.fastCheckApplyConfig(c)(t.oneof.apply(void 0,s.map(t.constant)),f,{}))}},tag:function(s,c){return function(f){return new u.FastCheckType(a.fastCheckApplyConfig(c)(t.constant(s),f,{}))}},keysOf:function(s,c){return function(f){return new u.FastCheckType(a.fastCheckApplyConfig(c)(t.oneof.apply(void 0,Object.keys(s).map(t.constant)),f,{}))}},nullable:function(s,c){return function(f){return r.pipe(s(f).arb,function(l){return new u.FastCheckType(a.fastCheckApplyConfig(c)(t.option(l).map(i.fromNullable),f,{arb:l}))})}},optional:function(s,c){return function(f){return r.pipe(s(f).arb,function(l){return new u.FastCheckType(a.fastCheckApplyConfig(c)(t.option(l).map(function(d){return d===null?void 0:d}),f,{arb:l}))})}},mutable:function(s,c){return function(f){return r.pipe(s(f).arb,function(l){return new u.FastCheckType(a.fastCheckApplyConfig(c)(l,f,{arb:l}))})}},array:function(s,c){return function(f){return r.pipe(s(f).arb,function(l){return new u.FastCheckType(a.fastCheckApplyConfig(c)(t.array(l),f,{arb:l}))})}},nonEmptyArray:function(s,c){return function(f){return r.pipe(s(f).arb,function(l){return new u.FastCheckType(a.fastCheckApplyConfig(c)(t.array(l).chain(function(d){return l.map(function(p){return o.cons(p,d)})}),f,{arb:l}))})}},uuid:function(s){return function(c){return r.pipe(t.uuid(),function(f){return new u.FastCheckType(a.fastCheckApplyConfig(s)(f,c,{arb:f}))})}},either:function(s,c,f){return function(l){return function(d,p){return new u.FastCheckType(a.fastCheckApplyConfig(f)(t.oneof(d.map(n.left),p.map(n.right)),l,{left:d,right:p}))}(s(l).arb,c(l).arb)}},option:function(s,c){return function(f){return r.pipe(s(f).arb,function(l){return new u.FastCheckType(a.fastCheckApplyConfig(c)(t.oneof(l.map(i.some),t.constant(i.none)),f,{arb:l}))})}},unknownE:function(s,c){return function(f){return new u.FastCheckType(a.fastCheckApplyConfig(c)(s(f).arb,f,{}))}}}}),Do}var qo={},sg;function cx(){if(sg)return qo;sg=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.fastCheckObjectInterpreter=void 0;var e=Ae,t=q,n=Tt,r=Nt(),o=Pe;return qo.fastCheckObjectInterpreter=t.memo(function(){return{_F:o.FastCheckURI,partial:function(i,a,u){return function(s){var c=t.projectFieldWithEnv(i,s)("arb");return new o.FastCheckType(r.fastCheckApplyConfig(u)(n.record(c,{withDeletedKeys:!0}),s,{arbs:c}))}},interface:function(i,a,u){return function(s){var c=t.projectFieldWithEnv(i,s)("arb");return new o.FastCheckType(r.fastCheckApplyConfig(u)(n.record(c),s,{arbs:c}))}},both:function(i,a,u,s){return function(c){var f=t.projectFieldWithEnv(i,c)("arb"),l=t.projectFieldWithEnv(a,c)("arb");return new o.FastCheckType(r.fastCheckApplyConfig(s)(n.record(f).chain(function(d){return n.record(l,{withDeletedKeys:!0}).map(function(p){return e.__assign(e.__assign({},d),p)})}),c,{arbs:f,partialArbs:l}))}}}}),qo}var Lo={},cg;function lx(){if(cg)return Lo;cg=1,Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.fastCheckTaggedUnionInterpreter=void 0;var e=q,t=Tt,n=Nt(),r=Pe;return Lo.fastCheckTaggedUnionInterpreter=e.memo(function(){return{_F:r.FastCheckURI,taggedUnion:function(o,i,a,u){return function(s){return new r.FastCheckType(n.fastCheckApplyConfig(u)(t.oneof.apply(void 0,e.collect(i,function(c,f){return f(s).arb})),s,{}))}}}}),Lo}var Ha={};Object.defineProperty(Ha,"__esModule",{value:!0});Ha.fastCheckUnionInterpreter=void 0;var E2=q,M2=Tt,lg=Pe;Ha.fastCheckUnionInterpreter=E2.memo(function(){return{_F:lg.FastCheckURI,union:function(e){return function(t,n){return function(r){return new lg.FastCheckType(M2.oneof.apply(void 0,e.map(function(o){return o(r).arb})))}}}}});var Bo={},fg;function fx(){if(fg)return Bo;fg=1,Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.fastCheckRecursiveInterpreter=void 0;var e=q,t=Tt,n=Nt(),r=Pe;return Bo.fastCheckRecursiveInterpreter=e.memo(function(){return{_F:r.FastCheckURI,recursive:function(o,i,a){var u=e.memo(function(){return o(s)}),s=function(c){return new r.FastCheckType(n.fastCheckApplyConfig(a)(t.constant(null).chain(function(f){return u()(c).arb}),c,{}))};return s}}}),Bo}var zo={},dg;function dx(){if(dg)return zo;dg=1,Object.defineProperty(zo,"__esModule",{value:!0}),zo.fastCheckStrMapInterpreter=void 0;var e=q,t=Tt,n=$i,r=$e,o=Qt,i=lC,a=Nt(),u=Pe,s=function(){return o.fromFoldable(i.getFirstSemigroup(),n.array)};return zo.fastCheckStrMapInterpreter=e.memo(function(){return{_F:u.FastCheckURI,strMap:function(c,f){return function(l){return r.pipe(c(l).arb,function(d){return new u.FastCheckType(a.fastCheckApplyConfig(f)(t.array(t.tuple(t.string(),d)).map(s()),l,{arb:d}))})}},record:function(c,f,l){return function(d){return function(p,y){return new u.FastCheckType(a.fastCheckApplyConfig(l)(t.array(t.tuple(p,y)).map(s()),d,{domainArb:p,codomainArb:y}))}(c(d).arb,f(d).arb)}}}}),zo}var Wo={},pg;function px(){if(pg)return Wo;pg=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.fastCheckSetInterpreter=void 0;var e=q,t=Tt,n=$e,r=fC,o=Nt(),i=Pe;return Wo.fastCheckSetInterpreter=e.memo(function(){return{_F:i.FastCheckURI,set:function(a,u,s){return function(c){return n.pipe(a(c).arb,function(f){return new i.FastCheckType(o.fastCheckApplyConfig(s)(t.set(f).map(r.fromArray(u)),c,{arb:f}))})}}}}),Wo}var Go={},hg;function hx(){if(hg)return Go;hg=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.fastCheckUnknownInterpreter=void 0;var e=q,t=Tt,n=$e,r=Nt(),o=Pe;return Go.fastCheckUnknownInterpreter=e.memo(function(){return{_F:o.FastCheckURI,unknown:function(i){return function(a){return n.pipe(t.anything(),function(u){return new o.FastCheckType(r.fastCheckApplyConfig(i)(u,a,{arb:u}))})}}}}),Go}var Ko={},yg;function yx(){if(yg)return Ko;yg=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.fastCheckNewtypeInterpreter=void 0;var e=q,t=Xt,n=Nt(),r=Pe;return Ko.fastCheckNewtypeInterpreter=e.memo(function(){return{_F:r.FastCheckURI,newtype:function(){return function(o,i){return function(a){return t.pipe(o(a).arb,function(u){return new r.FastCheckType(n.fastCheckApplyConfig(i)(u,a,{arb:u}))})}}},newtypeIso:function(o,i,a,u){return function(s){return t.pipe(i(s).arb,function(c){return new r.FastCheckType(n.fastCheckApplyConfig(u)(c.map(o.get),s,{arb:c}))})}},newtypePrism:function(o,i,a,u){return function(s){return t.pipe(i(s).arb,function(c){return new r.FastCheckType(n.fastCheckApplyConfig(u)(c.filter(function(f){return o.getOption(f)._tag==="Some"}).map(function(f){return o.getOption(f).value}),s,{arb:c}))})}}}}),Ko}var Ho={},mg;function mx(){if(mg)return Ho;mg=1,Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.fastCheckRefinedInterpreter=void 0;var e=q,t=Xt,n=Nt(),r=Pe;return Ho.fastCheckRefinedInterpreter=e.memo(function(){return{_F:r.FastCheckURI,refined:function(o,i,a,u){return function(s){return t.pipe(o(s).arb,function(c){return new r.FastCheckType(n.fastCheckApplyConfig(u)(c.filter(i),s,{arb:c}))})}},constrained:function(o,i,a,u){return function(s){return t.pipe(o(s).arb,function(c){return new r.FastCheckType(n.fastCheckApplyConfig(u)(o(s).arb.filter(i),s,{arb:c}))})}}}}),Ho}var gg;function k2(){return gg||(gg=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Ae;t.__exportStar(sx(),e),t.__exportStar(gx(),e),t.__exportStar(cx(),e),t.__exportStar(lx(),e),t.__exportStar(Ha,e),t.__exportStar(fx(),e),t.__exportStar(dx(),e),t.__exportStar(px(),e),t.__exportStar(hx(),e),t.__exportStar(yx(),e),t.__exportStar(mx(),e)}(df)),df}var bg;function Nt(){return bg||(bg=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fastCheckApplyConfig=e.FastCheckURI=void 0;var t=Ae,n=zn,r=Pe;Object.defineProperty(e,"FastCheckURI",{enumerable:!0,get:function(){return r.FastCheckURI}}),t.__exportStar(k2(),e),e.fastCheckApplyConfig=n.getApplyConfig(r.FastCheckURI)}(ff)),ff}var vg;function gx(){if(vg)return Eo;vg=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.fastCheckIntersectionInterpreter=void 0;var e=Ae,t=q,n=Tt,r=Pe,o=Nt();return Eo.fastCheckIntersectionInterpreter=t.memo(function(){return{_F:r.FastCheckURI,intersection:function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];return function(u,s){return function(c){var f=i.map(function(l){return l(c).arb});return new r.FastCheckType(o.fastCheckApplyConfig(s)(n.genericTuple(f).map(function(l){return Object.assign.apply(Object,e.__spreadArrays([{}],l))}),c,{arbs:f}))}}}}}),Eo}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.modelFastCheckInterpreter=void 0;var t=Ae,n=q,r=gx(),o=yx(),i=cx(),a=sx(),u=fx(),s=mx(),c=px(),f=dx(),l=lx(),d=Ha,p=hx();t.__exportStar(Pe,e);var y=function(){return n.merge(s.fastCheckRefinedInterpreter(),o.fastCheckNewtypeInterpreter(),p.fastCheckUnknownInterpreter(),a.fastCheckPrimitiveInterpreter(),r.fastCheckIntersectionInterpreter(),i.fastCheckObjectInterpreter(),d.fastCheckUnionInterpreter(),l.fastCheckTaggedUnionInterpreter(),u.fastCheckRecursiveInterpreter(),f.fastCheckStrMapInterpreter(),c.fastCheckSetInterpreter())};e.modelFastCheckInterpreter=y})(g0);var bx={},Jo={},oe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lr=globalThis&&globalThis.__assign||function(){return Lr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Lr.apply(this,arguments)},F2=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},rn=xe.left,Ee=function(e,t,n){return rn([{value:e,context:t,message:n}])},pe=xe.right,ie=function(){function e(t,n,r,o){this.name=t,this.is=n,this.validate=r,this.encode=o,this.decode=this.decode.bind(this)}return e.prototype.pipe=function(t,n){var r=this;return n===void 0&&(n="pipe(".concat(this.name,", ").concat(t.name,")")),new e(n,t.is,function(o,i){var a=r.validate(o,i);return xe.isLeft(a)?a:t.validate(a.right,i)},this.encode===te&&t.encode===te?te:function(o){return r.encode(t.encode(o))})},e.prototype.asDecoder=function(){return this},e.prototype.asEncoder=function(){return this},e.prototype.decode=function(t){return this.validate(t,[{key:"",type:this,actual:t}])},e}(),te=function(e){return e};function vx(e){return e.displayName||e.name||"<function".concat(e.length,">")}function R2(e,t){return{key:e,type:t}}function _t(e,t,n,r){for(var o=e.length,i=Array(o+1),a=0;a<o;a++)i[a]=e[a];return i[o]={key:t,type:n,actual:r},i}function Xn(e,t){for(var n=t.length,r=0;r<n;r++)e.push(t[r])}var Ln=Object.prototype.hasOwnProperty;function Kf(e){return Object.keys(e).map(function(t){return"".concat(t,": ").concat(e[t].name)}).join(", ")}function Ti(e){for(var t=0;t<e.length;t++)if(e[t].encode!==te)return!1;return!0}function xx(e){return"{ ".concat(Kf(e)," }")}function _x(e){return"Partial<".concat(e,">")}function V2(e,t,n,r){r===void 0&&(r="{ [K in ".concat(t.name,"]: ").concat(n.name," }"));for(var o=e.length,i={},a=0;a<o;a++)i[e[a]]=n;var u=Zx(i,r);return new Vd(r,function(s){return u.is(s)},u.validate,u.encode,t,n)}function Md(e){var t;if(Sx(e)){var n=e.value;if(kd.is(n))return t={},t[n]=null,t}else{if(z2(e))return e.keys;if(Ax(e)){var r=e.types.map(function(o){return Md(o)});return r.some(as.is)?void 0:Object.assign.apply(Object,F2([{}],r,!1))}}}function xg(e,t){for(var n=Object.keys(e),r=n.length,o=!1,i={},a=0;a<r;a++){var u=n[a];t.is(u)?i[u]=e[u]:o=!0}return o?i:e}function U2(e,t,n){return n===void 0&&(n="{ [K in ".concat(e.name,"]: ").concat(t.name," }")),new Vd(n,function(r){return Ze.is(r)?Object.keys(r).every(function(o){return!e.is(o)||t.is(r[o])}):wg(t)&&Array.isArray(r)},function(r,o){if(Ze.is(r)){for(var i={},a=[],u=Object.keys(r),s=u.length,c=!1,f=0;f<s;f++){var l=u[f],d=r[l],p=e.validate(l,_t(o,l,e,l));if(xe.isLeft(p))c=!0;else{var y=p.right;c=c||y!==l,l=y;var h=t.validate(d,_t(o,l,t,d));if(xe.isLeft(h))Xn(a,h.left);else{var m=h.right;c=c||m!==d,i[l]=m}}}return a.length>0?rn(a):pe(c?i:r)}return wg(t)&&Array.isArray(r)?pe(r):Ee(r,o)},e.encode===te&&t.encode===te?function(r){return xg(r,e)}:function(r){for(var o={},i=Object.keys(xg(r,e)),a=i.length,u=0;u<a;u++){var s=i[u];o[String(e.encode(s))]=t.encode(r[s])}return o},e,t)}function wx(e){return"("+e.map(function(t){return t.name}).join(" | ")+")"}function Hf(e,t){for(var n=!0,r=!0,o=!Ze.is(e),i=0,a=t;i<a.length;i++){var u=a[i];u!==e&&(n=!1),Ze.is(u)&&(r=!1)}if(n)return e;if(r)return t[t.length-1];for(var s={},c=0,f=t;c<f.length;c++){var u=f[c];for(var l in u)(!Ln.call(s,l)||o||u[l]!==e[l])&&(s[l]=u[l])}return s}function Jf(e){switch(e._tag){case"RefinementType":case"ReadonlyType":return Jf(e.type);case"InterfaceType":case"StrictType":case"PartialType":return e.props;case"IntersectionType":return e.types.reduce(function(t,n){return Object.assign(t,Jf(n))},{})}}function _g(e,t){for(var n=Object.getOwnPropertyNames(e),r=!1,o={},i=0;i<n.length;i++){var a=n[i];Ln.call(t,a)?o[a]=e[a]:r=!0}return r?o:e}function D2(e){return Tx(e)?"{| ".concat(Kf(e.props)," |}"):W2(e)?_x("{| ".concat(Kf(e.props)," |}")):"Exact<".concat(e.name,">")}function q2(e){return e.length>0}var qe={};function Cx(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];t.indexOf(i)!==-1&&n.push(i)}return n}function L2(e,t){if(e===qe)return t;if(t===qe)return e;var n=Object.assign({},e);for(var r in t)if(Ln.call(e,r)){var o=Cx(e[r],t[r]);if(q2(o))n[r]=o;else{n=qe;break}}else n[r]=t[r];return n}function B2(e,t){if(e===qe||t===qe)return qe;var n=qe;for(var r in e)if(Ln.call(t,r)){var o=Cx(e[r],t[r]);o.length===0&&(n===qe&&(n={}),n[r]=e[r].concat(t[r]))}return n}function wg(e){return e._tag==="AnyType"}function Sx(e){return e._tag==="LiteralType"}function z2(e){return e._tag==="KeyofType"}function Tx(e){return e._tag==="InterfaceType"}function W2(e){return e._tag==="PartialType"}function G2(e){return e._tag==="StrictType"}function K2(e){return e._tag==="ExactType"}function H2(e){return e._tag==="RefinementType"}function J2(e){return e._tag==="IntersectionType"}function Ax(e){return e._tag==="UnionType"}function Q2(e){return e._tag==="RecursiveType"}function X2(e){return e._tag==="ReadonlyType"}var pf=[];function cn(e){if(pf.indexOf(e)!==-1)return qe;if(Tx(e)||G2(e)){var t=qe;for(var n in e.props){var r=e.props[n];Sx(r)&&(t===qe&&(t={}),t[n]=[r.value])}return t}else{if(K2(e)||H2(e)||X2(e))return cn(e.type);if(J2(e))return e.types.reduce(function(i,a){return L2(i,cn(a))},qe);if(Ax(e))return e.types.slice(1).reduce(function(i,a){return B2(i,cn(a))},cn(e.types[0]));if(Q2(e)){pf.push(e);var o=cn(e.type);return pf.pop(),o}}return qe}function Ix(e){var t=cn(e[0]),n=Object.keys(t),r=e.length,o=function(c){for(var f=t[c].slice(),l=[t[c]],d=1;d<r;d++){var p=e[d],y=cn(p),h=y[c];if(h===void 0)return"continue-keys";if(h.some(function(m){return f.indexOf(m)!==-1}))return"continue-keys";f.push.apply(f,h),l.push(h)}return{value:[c,l]}};e:for(var i=0,a=n;i<a.length;i++){var u=a[i],s=o(u);if(typeof s=="object")return s.value;switch(s){case"continue-keys":continue e}}}var Ox=function(e){oe(t,e);function t(){var n=e.call(this,"null",function(r){return r===null},function(r,o){return n.is(r)?pe(r):Ee(r,o)},te)||this;return n._tag="NullType",n}return t}(ie),Cg=new Ox,Px=function(e){oe(t,e);function t(){var n=e.call(this,"undefined",function(r){return r===void 0},function(r,o){return n.is(r)?pe(r):Ee(r,o)},te)||this;return n._tag="UndefinedType",n}return t}(ie),as=new Px,Nx=function(e){oe(t,e);function t(){var n=e.call(this,"void",as.is,as.validate,te)||this;return n._tag="VoidType",n}return t}(ie),Sg=new Nx,jx=function(e){oe(t,e);function t(){var n=e.call(this,"unknown",function(r){return!0},pe,te)||this;return n._tag="UnknownType",n}return t}(ie),Z2=new jx,$x=function(e){oe(t,e);function t(){var n=e.call(this,"string",function(r){return typeof r=="string"},function(r,o){return n.is(r)?pe(r):Ee(r,o)},te)||this;return n._tag="StringType",n}return t}(ie),kd=new $x,Ex=function(e){oe(t,e);function t(){var n=e.call(this,"number",function(r){return typeof r=="number"},function(r,o){return n.is(r)?pe(r):Ee(r,o)},te)||this;return n._tag="NumberType",n}return t}(ie),Fd=new Ex,Mx=function(e){oe(t,e);function t(){var n=e.call(this,"bigint",function(r){return typeof r=="bigint"},function(r,o){return n.is(r)?pe(r):Ee(r,o)},te)||this;return n._tag="BigIntType",n}return t}(ie),Y2=new Mx,kx=function(e){oe(t,e);function t(){var n=e.call(this,"boolean",function(r){return typeof r=="boolean"},function(r,o){return n.is(r)?pe(r):Ee(r,o)},te)||this;return n._tag="BooleanType",n}return t}(ie),eU=new kx,Fx=function(e){oe(t,e);function t(){var n=e.call(this,"UnknownArray",Array.isArray,function(r,o){return n.is(r)?pe(r):Ee(r,o)},te)||this;return n._tag="AnyArrayType",n}return t}(ie),Br=new Fx,Rx=function(e){oe(t,e);function t(){var n=e.call(this,"UnknownRecord",function(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)},function(r,o){return n.is(r)?pe(r):Ee(r,o)},te)||this;return n._tag="AnyDictionaryType",n}return t}(ie),Ze=new Rx,Vx=function(e){oe(t,e);function t(n,r,o,i,a){var u=e.call(this,n,r,o,i)||this;return u.value=a,u._tag="LiteralType",u}return t}(ie);function tU(e,t){t===void 0&&(t=JSON.stringify(e));var n=function(r){return r===e};return new Vx(t,n,function(r,o){return n(r)?pe(e):Ee(r,o)},te,e)}var Ux=function(e){oe(t,e);function t(n,r,o,i,a){var u=e.call(this,n,r,o,i)||this;return u.keys=a,u._tag="KeyofType",u}return t}(ie);function nU(e,t){t===void 0&&(t=Object.keys(e).map(function(r){return JSON.stringify(r)}).join(" | "));var n=function(r){return kd.is(r)&&Ln.call(e,r)};return new Ux(t,n,function(r,o){return n(r)?pe(r):Ee(r,o)},te,e)}var Dx=function(e){oe(t,e);function t(n,r,o,i,a,u){var s=e.call(this,n,r,o,i)||this;return s.type=a,s.predicate=u,s._tag="RefinementType",s}return t}(ie);function qx(e,t,n){return Dd(e,t,n)}var rU=qx(Fd,function(e){return Number.isInteger(e)},"Int"),Rd=function(e){oe(t,e);function t(n,r,o,i,a){var u=e.call(this,n,r,o,i)||this;return u.runDefinition=a,u._tag="RecursiveType",u}return t}(ie);Object.defineProperty(Rd.prototype,"type",{get:function(){return this.runDefinition()},enumerable:!0,configurable:!0});function oU(e,t){var n,r=function(){return n||(n=t(o),n.name=e),n},o=new Rd(e,function(i){return r().is(i)},function(i,a){return r().validate(i,a)},function(i){return r().encode(i)},r);return o}var Lx=function(e){oe(t,e);function t(n,r,o,i,a){var u=e.call(this,n,r,o,i)||this;return u.type=a,u._tag="ArrayType",u}return t}(ie);function Bx(e,t){return t===void 0&&(t="Array<".concat(e.name,">")),new Lx(t,function(n){return Br.is(n)&&n.every(e.is)},function(n,r){var o=Br.validate(n,r);if(xe.isLeft(o))return o;for(var i=o.right,a=i.length,u=i,s=[],c=0;c<a;c++){var f=i[c],l=e.validate(f,_t(r,String(c),e,f));if(xe.isLeft(l))Xn(s,l.left);else{var d=l.right;d!==f&&(u===i&&(u=i.slice()),u[c]=d)}}return s.length>0?rn(s):pe(u)},e.encode===te?te:function(n){return n.map(e.encode)},e)}var zx=function(e){oe(t,e);function t(n,r,o,i,a){var u=e.call(this,n,r,o,i)||this;return u.props=a,u._tag="InterfaceType",u}return t}(ie);function Qf(e,t){t===void 0&&(t=xx(e));var n=Object.keys(e),r=n.map(function(i){return e[i]}),o=n.length;return new zx(t,function(i){if(Ze.is(i)){for(var a=0;a<o;a++){var u=n[a],s=i[u];if(s===void 0&&!Ln.call(i,u)||!r[a].is(s))return!1}return!0}return!1},function(i,a){var u=Ze.validate(i,a);if(xe.isLeft(u))return u;for(var s=u.right,c=s,f=[],l=0;l<o;l++){var d=n[l],p=c[d],y=r[l],h=y.validate(p,_t(a,d,y,p));if(xe.isLeft(h))Xn(f,h.left);else{var m=h.right;(m!==p||m===void 0&&!Ln.call(c,d))&&(c===s&&(c=Lr({},s)),c[d]=m)}}return f.length>0?rn(f):pe(c)},Ti(r)?te:function(i){for(var a=Lr({},i),u=0;u<o;u++){var s=n[u],c=r[u].encode;c!==te&&(a[s]=c(i[s]))}return a},e)}var Wx=function(e){oe(t,e);function t(n,r,o,i,a){var u=e.call(this,n,r,o,i)||this;return u.props=a,u._tag="PartialType",u}return t}(ie);function iU(e,t){t===void 0&&(t=_x(xx(e)));var n=Object.keys(e),r=n.map(function(i){return e[i]}),o=n.length;return new Wx(t,function(i){if(Ze.is(i)){for(var a=0;a<o;a++){var u=n[a],s=i[u];if(s!==void 0&&!e[u].is(s))return!1}return!0}return!1},function(i,a){var u=Ze.validate(i,a);if(xe.isLeft(u))return u;for(var s=u.right,c=s,f=[],l=0;l<o;l++){var d=n[l],p=c[d],y=e[d],h=y.validate(p,_t(a,d,y,p));if(xe.isLeft(h))p!==void 0&&Xn(f,h.left);else{var m=h.right;m!==p&&(c===s&&(c=Lr({},s)),c[d]=m)}}return f.length>0?rn(f):pe(c)},Ti(r)?te:function(i){for(var a=Lr({},i),u=0;u<o;u++){var s=n[u],c=i[s];c!==void 0&&(a[s]=r[u].encode(c))}return a},e)}var Vd=function(e){oe(t,e);function t(n,r,o,i,a,u){var s=e.call(this,n,r,o,i)||this;return s.domain=a,s.codomain=u,s._tag="DictionaryType",s}return t}(ie);function Gx(e,t,n){var r=Md(e);return r?V2(Object.keys(r),e,t,n):U2(e,t,n)}var Ud=function(e){oe(t,e);function t(n,r,o,i,a){var u=e.call(this,n,r,o,i)||this;return u.types=a,u._tag="UnionType",u}return t}(ie);function Kx(e,t){t===void 0&&(t=wx(e));var n=Ix(e);if(n!==void 0&&e.length>0){var r=n[0],o=n[1],i=o.length,a=function(u){for(var s=0;s<i;s++)if(o[s].indexOf(u)!==-1)return s};return new us(t,function(u){if(Ze.is(u)){var s=a(u[r]);return s!==void 0?e[s].is(u):!1}return!1},function(u,s){var c=Ze.validate(u,s);if(xe.isLeft(c))return c;var f=c.right,l=a(f[r]);if(l===void 0)return Ee(u,s);var d=e[l];return d.validate(f,_t(s,String(l),d,f))},Ti(e)?te:function(u){var s=a(u[r]);if(s===void 0)throw new Error("no codec found to encode value in union codec ".concat(t));return e[s].encode(u)},e,r)}else return new Ud(t,function(u){return e.some(function(s){return s.is(u)})},function(u,s){for(var c=[],f=0;f<e.length;f++){var l=e[f],d=l.validate(u,_t(s,String(f),l,u));if(xe.isLeft(d))Xn(c,d.left);else return pe(d.right)}return rn(c)},Ti(e)?te:function(u){for(var s=0,c=e;s<c.length;s++){var f=c[s];if(f.is(u))return f.encode(u)}throw new Error("no codec found to encode value in union type ".concat(t))},e)}var Hx=function(e){oe(t,e);function t(n,r,o,i,a){var u=e.call(this,n,r,o,i)||this;return u.types=a,u._tag="IntersectionType",u}return t}(ie);function aU(e,t){t===void 0&&(t="(".concat(e.map(function(r){return r.name}).join(" & "),")"));var n=e.length;return new Hx(t,function(r){return e.every(function(o){return o.is(r)})},e.length===0?pe:function(r,o){for(var i=[],a=[],u=0;u<n;u++){var s=e[u],c=s.validate(r,_t(o,String(u),s,r));xe.isLeft(c)?Xn(a,c.left):i.push(c.right)}return a.length>0?rn(a):pe(Hf(r,i))},e.length===0?te:function(r){return Hf(r,e.map(function(o){return o.encode(r)}))},e)}var Jx=function(e){oe(t,e);function t(n,r,o,i,a){var u=e.call(this,n,r,o,i)||this;return u.types=a,u._tag="TupleType",u}return t}(ie);function uU(e,t){t===void 0&&(t="[".concat(e.map(function(r){return r.name}).join(", "),"]"));var n=e.length;return new Jx(t,function(r){return Br.is(r)&&r.length===n&&e.every(function(o,i){return o.is(r[i])})},function(r,o){var i=Br.validate(r,o);if(xe.isLeft(i))return i;for(var a=i.right,u=a.length>n?a.slice(0,n):a,s=[],c=0;c<n;c++){var f=a[c],l=e[c],d=l.validate(f,_t(o,String(c),l,f));if(xe.isLeft(d))Xn(s,d.left);else{var p=d.right;p!==f&&(u===a&&(u=a.slice()),u[c]=p)}}return s.length>0?rn(s):pe(u)},Ti(e)?te:function(r){return e.map(function(o,i){return o.encode(r[i])})},e)}var Qx=function(e){oe(t,e);function t(n,r,o,i,a){var u=e.call(this,n,r,o,i)||this;return u.type=a,u._tag="ReadonlyType",u}return t}(ie);function sU(e,t){return t===void 0&&(t="Readonly<".concat(e.name,">")),new Qx(t,e.is,e.validate,e.encode,e)}var Xx=function(e){oe(t,e);function t(n,r,o,i,a){var u=e.call(this,n,r,o,i)||this;return u.type=a,u._tag="ReadonlyArrayType",u}return t}(ie);function cU(e,t){t===void 0&&(t="ReadonlyArray<".concat(e.name,">"));var n=Bx(e);return new Xx(t,n.is,n.validate,n.encode,e)}var Zx=function(e,t){return e1(Qf(e),t)},Yx=function(e){oe(t,e);function t(n,r,o,i,a){var u=e.call(this,n,r,o,i)||this;return u.type=a,u._tag="ExactType",u}return t}(ie);function e1(e,t){t===void 0&&(t=D2(e));var n=Jf(e);return new Yx(t,e.is,function(r,o){var i=Ze.validate(r,o);if(xe.isLeft(i))return i;var a=e.validate(r,o);return xe.isLeft(a)?a:xe.right(_g(a.right,n))},function(r){return e.encode(_g(r,n))},e)}var t1=function(e){oe(t,e);function t(){var n=e.call(this,"Function",function(r){return typeof r=="function"},function(r,o){return n.is(r)?pe(r):Ee(r,o)},te)||this;return n._tag="FunctionType",n}return t}(ie),lU=new t1,n1=function(e){oe(t,e);function t(){var n=e.call(this,"never",function(r){return!1},function(r,o){return Ee(r,o)},function(){throw new Error("cannot encode never")})||this;return n._tag="NeverType",n}return t}(ie),fU=new n1,r1=function(e){oe(t,e);function t(){var n=e.call(this,"any",function(r){return!0},pe,te)||this;return n._tag="AnyType",n}return t}(ie),dU=new r1;function Dd(e,t,n){return n===void 0&&(n="(".concat(e.name," | ").concat(vx(t),")")),new Dx(n,function(r){return e.is(r)&&t(r)},function(r,o){var i=e.validate(r,o);if(xe.isLeft(i))return i;var a=i.right;return t(a)?pe(a):Ee(a,o)},e.encode,e,t)}var pU=Dd(Fd,Number.isInteger,"Integer"),us=function(e){oe(t,e);function t(n,r,o,i,a,u){var s=e.call(this,n,r,o,i,a)||this;return s.tag=u,s}return t}(Ud),hU=function(e,t,n){n===void 0&&(n=wx(t));var r=Kx(t,n);return r instanceof us?r:(console.warn("[io-ts] Cannot build a tagged union for ".concat(n,", returning a de-optimized union")),new us(n,r.is,r.validate,r.encode,t,e))},yU=function(e,t){return{value:e,context:t}},mU=function(e){return[{key:"",type:e}]},gU=Ze,o1=function(e){oe(t,e);function t(){var n=e.call(this,"object",function(r){return r!==null&&typeof r=="object"},function(r,o){return n.is(r)?pe(r):Ee(r,o)},te)||this;return n._tag="ObjectType",n}return t}(ie),bU=new o1,vU=Gx,xU=function(e){oe(t,e);function t(n,r,o,i,a){var u=e.call(this,n,r,o,i)||this;return u.props=a,u._tag="StrictType",u}return t}(ie);function _U(e){return e}function wU(e){return function(){return e}}const CU=Object.freeze(Object.defineProperty({__proto__:null,AnyArrayType:Fx,AnyDictionaryType:Rx,AnyType:r1,Array:Br,ArrayType:Lx,BigIntType:Mx,BooleanType:kx,Dictionary:gU,DictionaryType:Vd,ExactType:Yx,Function:lU,FunctionType:t1,Int:rU,Integer:pU,InterfaceType:zx,IntersectionType:Hx,KeyofType:Ux,LiteralType:Vx,NeverType:n1,NullType:Ox,NumberType:Ex,ObjectType:o1,PartialType:Wx,ReadonlyArrayType:Xx,ReadonlyType:Qx,RecursiveType:Rd,RefinementType:Dx,StrictType:xU,StringType:$x,TaggedUnionType:us,TupleType:Jx,Type:ie,UndefinedType:Px,UnionType:Ud,UnknownArray:Br,UnknownRecord:Ze,UnknownType:jx,VoidType:Nx,alias:wU,any:dU,appendContext:_t,array:Bx,bigint:Y2,boolean:eU,brand:qx,clean:_U,dictionary:vU,emptyTags:qe,exact:e1,failure:Ee,failures:rn,getContextEntry:R2,getDefaultContext:mU,getDomainKeys:Md,getFunctionName:vx,getIndex:Ix,getTags:cn,getValidationError:yU,identity:te,interface:Qf,intersection:aU,keyof:nU,literal:tU,mergeAll:Hf,never:fU,null:Cg,nullType:Cg,number:Fd,object:bU,partial:iU,readonly:sU,readonlyArray:cU,record:Gx,recursion:oU,refinement:Dd,strict:Zx,string:kd,success:pe,taggedUnion:hU,tuple:uU,type:Qf,undefined:as,union:Kx,unknown:Z2,void:Sg,voidType:Sg},Symbol.toStringTag,{value:"Module"})),Me=vs(CU);var Ne={};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.IOTSType=Ne.IoTsURI=void 0;var SU=Ni;Ne.IoTsURI="IoTsURI";var TU=function(){function e(t){var n=this;this.type=t,this.create=function(r){return SU.map(function(o){return o})(n.type.decode(n.type.encode(r)))}}return e}();Ne.IOTSType=TU;var hf={},yf={},mf={},Qc={},AU=K&&K.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),IU=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),OU=K&&K.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&AU(t,e,n);return IU(t,e),t};Object.defineProperty(Qc,"__esModule",{value:!0});Qc.DateFromISOString=void 0;var Ou=OU(Me),PU=ds,NU=ps;Qc.DateFromISOString=new Ou.Type("DateFromISOString",function(e){return e instanceof Date},function(e,t){return PU.pipe(Ou.string.validate(e,t),NU.chain(function(n){var r=new Date(n);return isNaN(r.getTime())?Ou.failure(e,t):Ou.success(r)}))},function(e){return e.toISOString()});var Xc={},jU=K&&K.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),$U=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),EU=K&&K.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&jU(t,e,n);return $U(t,e),t};Object.defineProperty(Xc,"__esModule",{value:!0});Xc.either=void 0;var gi=EU(Me),MU=gi.literal("Left"),kU=gi.literal("Right");function FU(e,t,n){return n===void 0&&(n="Either<"+e.name+", "+t.name+">"),gi.union([gi.strict({_tag:MU,left:e},"Left<"+e.name+">"),gi.strict({_tag:kU,right:t},"Right<"+e.name+">")],n)}Xc.either=FU;var Ja={},RU=K&&K.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),VU=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),UU=K&&K.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&RU(t,e,n);return VU(t,e),t};Object.defineProperty(Ja,"__esModule",{value:!0});Ja.option=void 0;var Ai=UU(Me),DU=Ai.strict({_tag:Ai.literal("None")},"None"),qU=Ai.literal("Some");function LU(e,t){return t===void 0&&(t="Option<"+e.name+">"),Ai.union([DU,Ai.strict({_tag:qU,value:e},"Some<"+e.name+">")],t)}Ja.option=LU;var Zc={},BU=K&&K.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),zU=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i1=K&&K.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&BU(t,e,n);return zU(t,e),t};Object.defineProperty(Zc,"__esModule",{value:!0});Zc.optionFromNullable=void 0;var Tg=ds,WU=ps,Pu=i1(jb),Ag=i1(Me),GU=Ja;function KU(e,t){return t===void 0&&(t="Option<"+e.name+">"),new Ag.Type(t,GU.option(e).is,function(n,r){return n==null?Ag.success(Pu.none):Tg.pipe(e.validate(n,r),WU.map(Pu.some))},function(n){return Pu.toNullable(Tg.pipe(n,Pu.map(e.encode)))})}Zc.optionFromNullable=KU;var Yc={},el={},HU=K&&K.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),JU=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),QU=K&&K.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&HU(t,e,n);return JU(t,e),t};Object.defineProperty(el,"__esModule",{value:!0});el.nonEmptyArray=void 0;var Nu=QU(Me),Ig=dC,XU=pC,ZU=ds,YU=ps,eD=jb;function tD(e,t){t===void 0&&(t="NonEmptyArray<"+e.name+">");var n=Nu.array(e);return new Nu.Type(t,function(r){return n.is(r)&&XU.isNonEmpty(r)},function(r,o){return ZU.pipe(n.validate(r,o),YU.chain(function(i){var a=Ig.fromArray(i);return eD.isNone(a)?Nu.failure(r,o):Nu.success(a.value)}))},Ig.map(e.encode))}el.nonEmptyArray=tD;Object.defineProperty(Yc,"__esModule",{value:!0});Yc.readonlyNonEmptyArray=void 0;var nD=el;function rD(e,t){return t===void 0&&(t="ReadonlyNonEmptyArray<"+e.name+">"),nD.nonEmptyArray(e,t)}Yc.readonlyNonEmptyArray=rD;var tl={},oD=K&&K.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),iD=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),aD=K&&K.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&oD(t,e,n);return iD(t,e),t};Object.defineProperty(tl,"__esModule",{value:!0});tl.UUID=void 0;var Og=aD(Me),uD=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;tl.UUID=Og.brand(Og.string,function(e){return uD.test(e)},"UUID");var Pg;function a1(){return Pg||(Pg=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ioTsPrimitiveInterpreter=e.BigIntString=void 0;var t=q,n=Ni,r=Xt,o=Me,i=Qc,a=Xc,u=Ja,s=Zc,c=Yc,f=tl,l=jt(),d=Ne;e.BigIntString=new o.Type("BigIntString",function(y){return y!=null&&typeof y=="bigint"},function(y,h){return n.either.chain(o.string.validate(y,h),function(m){try{var g=BigInt(m);return o.success(g)}catch{return o.failure(y,h)}})},function(y){return y.toString(10)});var p=function(y){return new o.Type(y,function(h){return h===y},function(h,m){return o.success(y)},function(h){})};e.ioTsPrimitiveInterpreter=t.memo(function(){return{_F:d.IoTsURI,date:function(y){return function(h){return new d.IOTSType(l.iotsApplyConfig(y)(i.DateFromISOString,h,{}))}},boolean:function(y){return function(h){return new d.IOTSType(l.iotsApplyConfig(y)(o.boolean,h,{}))}},string:function(y){return function(h){return new d.IOTSType(l.iotsApplyConfig(y)(o.string,h,{}))}},number:function(y){return function(h){return new d.IOTSType(l.iotsApplyConfig(y)(o.number,h,{}))}},bigint:function(y){return function(h){return new d.IOTSType(l.iotsApplyConfig(y)(e.BigIntString,h,{}))}},stringLiteral:function(y,h){return function(m){return new d.IOTSType(l.iotsApplyConfig(h)(o.literal(y,y),m,{}))}},numberLiteral:function(y,h){return function(m){return new d.IOTSType(l.iotsApplyConfig(h)(o.literal(y,""+y),m,{}))}},oneOfLiterals:function(y,h){return function(m){return new d.IOTSType(l.iotsApplyConfig(h)(o.union(y.map(function(g){return o.literal(g)})),m,{}))}},tag:function(y,h){return function(m){return new d.IOTSType(l.iotsApplyConfig(h)(p(y),m,{}))}},keysOf:function(y,h){return function(m){return new d.IOTSType(l.iotsApplyConfig(h)(o.keyof(y),m,{}))}},nullable:function(y,h){return function(m){return r.pipe(y(m).type,function(g){return new d.IOTSType(l.iotsApplyConfig(h)(s.optionFromNullable(g),m,{type:g}))})}},optional:function(y,h){return function(m){return r.pipe(y(m).type,function(g){return new d.IOTSType(l.iotsApplyConfig(h)(o.union([g,o.undefined]),m,{type:g}))})}},mutable:function(y,h){return function(m){return r.pipe(y(m).type,function(g){return new d.IOTSType(l.iotsApplyConfig(h)(g,m,{type:g}))})}},array:function(y,h){return function(m){return r.pipe(y(m).type,function(g){return new d.IOTSType(l.iotsApplyConfig(h)(o.readonlyArray(g),m,{type:g}))})}},nonEmptyArray:function(y,h){return function(m){return r.pipe(y(m).type,function(g){return new d.IOTSType(l.iotsApplyConfig(h)(c.readonlyNonEmptyArray(g),m,{type:g}))})}},uuid:function(y){return function(h){return new d.IOTSType(l.iotsApplyConfig(y)(f.UUID,h,{}))}},either:function(y,h,m){return function(g){return function(w,N){return new d.IOTSType(l.iotsApplyConfig(m)(a.either(w,N),g,{left:w,right:N}))}(y(g).type,h(g).type)}},option:function(y,h){return function(m){return r.pipe(y(m).type,function(g){return new d.IOTSType(l.iotsApplyConfig(h)(u.option(g),m,{type:g}))})}},unknownE:function(y,h){return function(m){return new d.IOTSType(l.iotsApplyConfig(h)(y(m).type,m,{}))}}}})}(mf)),mf}var jn={},Ng;function u1(){if(Ng)return jn;Ng=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.ioTsStrictObjectInterpreter=jn.ioTsNonStrictObjectInterpreter=void 0;var e=q,t=Me,n=jt(),r=Ne;return jn.ioTsNonStrictObjectInterpreter=e.memo(function(){return{_F:r.IoTsURI,interface:function(o,i,a){return function(u){var s=e.projectFieldWithEnv(o,u)("type");return new r.IOTSType(n.iotsApplyConfig(a)(t.type(s,i),u,{types:s}))}},partial:function(o,i,a){return function(u){var s=e.projectFieldWithEnv(o,u)("type");return new r.IOTSType(n.iotsApplyConfig(a)(t.partial(s,i),u,{types:s}))}},both:function(o,i,a,u){return function(s){var c=e.projectFieldWithEnv(o,s)("type"),f=e.projectFieldWithEnv(i,s)("type");return new r.IOTSType(n.iotsApplyConfig(u)(t.intersection([t.interface(c),t.partial(f)],a),s,{types:c,partialTypes:f}))}}}}),jn.ioTsStrictObjectInterpreter=e.memo(function(){return{_F:r.IoTsURI,interface:function(o,i,a){return function(u){var s=e.projectFieldWithEnv(o,u)("type");return new r.IOTSType(n.iotsApplyConfig(a)(t.strict(s,i),u,{types:s}))}},partial:function(o,i,a){return function(u){var s=e.projectFieldWithEnv(o,u)("type");return new r.IOTSType(n.iotsApplyConfig(a)(t.exact(t.partial(s,i)),u,{types:s}))}},both:function(o,i,a,u){return function(s){var c=e.projectFieldWithEnv(o,s)("type"),f=e.projectFieldWithEnv(i,s)("type");return new r.IOTSType(n.iotsApplyConfig(u)(t.exact(t.intersection([t.interface(c),t.partial(f)],a)),s,{types:c,typesPartial:f}))}}}}),jn}var Qa={};Object.defineProperty(Qa,"__esModule",{value:!0});Qa.ioTsUnionInterpreter=void 0;var sD=q,cD=Me,jg=Ne;Qa.ioTsUnionInterpreter=sD.memo(function(){return{_F:jg.IoTsURI,union:function(e){return function(t,n){return function(r){return new jg.IOTSType(cD.union(e.map(function(o){return o(r).type}),n))}}}}});var Qo={},$g;function s1(){if($g)return Qo;$g=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.ioTsTaggedUnionInterpreter=void 0;var e=q,t=Me,n=jt(),r=Ne,o=function(i){return i};return Qo.ioTsTaggedUnionInterpreter=e.memo(function(){return{_F:r.IoTsURI,taggedUnion:function(i,a,u,s){return function(c){return new r.IOTSType(n.iotsApplyConfig(s)(t.union(o(e.collect(a,function(f,l){return l(c).type})),u),c,{}))}}}}),Qo}var Xo={},Eg;function c1(){if(Eg)return Xo;Eg=1,Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.ioTsStrMapInterpreter=void 0;var e=q,t=$e,n=Me,r=jt(),o=Ne;return Xo.ioTsStrMapInterpreter=e.memo(function(){return{_F:o.IoTsURI,strMap:function(i,a){return function(u){return t.pipe(i(u).type,function(s){return new o.IOTSType(r.iotsApplyConfig(a)(n.record(n.string,s),u,{type:s}))})}},record:function(i,a,u){return function(s){return function(c,f){return new o.IOTSType(r.iotsApplyConfig(u)(n.record(c,f),s,{domainType:c,codomainType:f}))}(i(s).type,a(s).type)}}}}),Xo}var Zo={},nl={},rl={},lD=K&&K.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),fD=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),dD=K&&K.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.hasOwnProperty.call(e,n)&&lD(t,e,n);return fD(t,e),t};Object.defineProperty(rl,"__esModule",{value:!0});rl.setFromArray=void 0;var gf=hC,ju=dD(Me),pD=ds,hD=ps;function yD(e,t,n){n===void 0&&(n="Set<"+e.name+">");var r=ju.array(e),o=gf.toArray(t),i=gf.fromArray(t);return new ju.Type(n,function(a){return a instanceof Set&&gf.every(e.is)(a)},function(a,u){return pD.pipe(r.validate(a,u),hD.chain(function(s){var c=i(s);return c.size!==s.length?ju.failure(a,u):ju.success(c)}))},function(a){return r.encode(o(a))})}rl.setFromArray=yD;Object.defineProperty(nl,"__esModule",{value:!0});nl.readonlySetFromArray=void 0;var mD=rl;function gD(e,t,n){return n===void 0&&(n="ReadonlySet<"+e.name+">"),mD.setFromArray(e,t,n)}nl.readonlySetFromArray=gD;var Mg;function l1(){if(Mg)return Zo;Mg=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.ioTsSetInterpreter=void 0;var e=q,t=$e,n=nl,r=Ne,o=jt();return Zo.ioTsSetInterpreter=e.memo(function(){return{_F:r.IoTsURI,set:function(i,a,u){return function(s){return t.pipe(i(s).type,function(c){return new r.IOTSType(o.iotsApplyConfig(u)(n.readonlySetFromArray(c,a),s,{type:c}))})}}}}),Zo}var Yo={},kg;function f1(){if(kg)return Yo;kg=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.ioTsRecursiveInterpreter=void 0;var e=q,t=Me,n=Ne,r=jt();return Yo.ioTsRecursiveInterpreter=e.memo(function(){return{_F:n.IoTsURI,recursive:function(o,i,a){return function(u){return new n.IOTSType(r.iotsApplyConfig(a)(t.recursion("recursive",function(s){return o(function(c){return new n.IOTSType(s)})(u).type}),u,{}))}}}}),Yo}var ei={},Fg;function d1(){if(Fg)return ei;Fg=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.ioTsUnknownInterpreter=void 0;var e=q,t=$e,n=Me,r=jt(),o=Ne;return ei.ioTsUnknownInterpreter=e.memo(function(){return{_F:o.IoTsURI,unknown:function(i){return function(a){return t.pipe(n.unknown,function(u){return new o.IOTSType(r.iotsApplyConfig(i)(u,a,{type:u}))})}}}}),ei}var ti={},Rg;function p1(){if(Rg)return ti;Rg=1,Object.defineProperty(ti,"__esModule",{value:!0}),ti.ioTsNewtypeInterpreter=void 0;var e=q,t=$b,n=Xt,r=Me,o=jt(),i=Ne,a=function(u){return u};return ti.ioTsNewtypeInterpreter=e.memo(function(){return{_F:i.IoTsURI,newtype:function(){return function(u,s){return function(c){return n.pipe(u(c).type,function(f){return new i.IOTSType(o.iotsApplyConfig(s)(a(f),c,{type:f}))})}}},newtypeIso:function(u,s,c,f){return function(l){return n.pipe(s(l).type,function(d){var p=function(y){return d.is(y)};return new i.IOTSType(o.iotsApplyConfig(f)(new r.Type(c,p,function(y,h){return n.pipe(d.validate(y,h),t.either.map(u.get))},function(y){return d.encode(u.reverseGet(y))}),l,{type:d}))})}},newtypePrism:function(u,s,c,f){return function(l){return n.pipe(s(l).type,function(d){var p=function(y){return d.is(y)};return new i.IOTSType(o.iotsApplyConfig(f)(new r.Type(c,p,function(y,h){return n.pipe(d.validate(y,h),t.either.chain(function(m){var g=u.getOption(m);return g._tag==="None"?r.failure(y,h,"newtype doesn't satisfy prism conditions"):r.success(g.value)}))},function(y){return d.encode(u.reverseGet(y))}),l,{type:d}))})}}}}),ti}var bf={},Vg;function h1(){return Vg||(Vg=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ioTsRefinedInterpreter=e.predicate=e.refinement=void 0;var t=q,n=$e,r=Me,o=jt(),i=Ne,a=function(s,c,f){return new r.Type(f,function(l){return s.is(l)&&c(l)},function(l,d){var p=s.decode(l);if(p._tag==="Left")return p;var y=p.right;return c(y)?r.success(y):r.failure(l,d)},s.encode)};e.refinement=a;var u=function(s,c,f){return new r.Type(f,function(l){return s.is(l)&&c(l)},function(l,d){var p=s.decode(l);if(p._tag==="Left")return p;var y=p.right;return c(y)?r.success(y):r.failure(l,d)},s.encode)};e.predicate=u,e.ioTsRefinedInterpreter=t.memo(function(){return{_F:i.IoTsURI,refined:function(s,c,f,l){return function(d){return n.pipe(s(d).type,function(p){return new i.IOTSType(o.iotsApplyConfig(l)(e.refinement(p,c,f),d,{type:p}))})}},constrained:function(s,c,f,l){return function(d){return n.pipe(s(d).type,function(p){return new i.IOTSType(o.iotsApplyConfig(l)(e.predicate(p,c,f),d,{type:p}))})}}}})}(bf)),bf}var Ug;function bD(){return Ug||(Ug=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Ae;t.__exportStar(a1(),e),t.__exportStar(u1(),e),t.__exportStar(y1(),e),t.__exportStar(Qa,e),t.__exportStar(s1(),e),t.__exportStar(c1(),e),t.__exportStar(l1(),e),t.__exportStar(f1(),e),t.__exportStar(d1(),e),t.__exportStar(p1(),e),t.__exportStar(h1(),e)}(yf)),yf}var Dg;function jt(){return Dg||(Dg=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.iotsApplyConfig=e.IoTsURI=void 0;var t=Ae,n=zn,r=Ne;Object.defineProperty(e,"IoTsURI",{enumerable:!0,get:function(){return r.IoTsURI}}),t.__exportStar(bD(),e),e.iotsApplyConfig=n.getApplyConfig(r.IoTsURI)}(hf)),hf}var qg;function y1(){if(qg)return Jo;qg=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.ioTsIntersectionInterpreter=void 0;var e=q,t=Me,n=Ne,r=jt();return Jo.ioTsIntersectionInterpreter=e.memo(function(){return{_F:n.IoTsURI,intersection:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return function(a,u){return function(s){var c=o.map(function(f){return f(s).type});return new n.IOTSType(r.iotsApplyConfig(u)(t.intersection(c,a),s,{codecs:c}))}}}}}),Jo}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.modelIoTsStrictInterpreter=e.modelIoTsNonStrictInterpreter=void 0;var t=Ae,n=q,r=y1(),o=p1(),i=u1(),a=a1(),u=f1(),s=h1(),c=l1(),f=c1(),l=s1(),d=Qa,p=d1();t.__exportStar(Ne,e);var y=function(){return n.merge(s.ioTsRefinedInterpreter(),o.ioTsNewtypeInterpreter(),p.ioTsUnknownInterpreter(),a.ioTsPrimitiveInterpreter(),r.ioTsIntersectionInterpreter(),d.ioTsUnionInterpreter(),l.ioTsTaggedUnionInterpreter(),f.ioTsStrMapInterpreter(),c.ioTsSetInterpreter(),u.ioTsRecursiveInterpreter())},h=function(){return n.merge(y(),i.ioTsNonStrictObjectInterpreter())};e.modelIoTsNonStrictInterpreter=h;var m=function(){return n.merge(y(),i.ioTsStrictObjectInterpreter())};e.modelIoTsStrictInterpreter=m})(bx);var m1={},ni={},je={};Object.defineProperty(je,"__esModule",{value:!0});je.ShowType=je.ShowURI=void 0;je.ShowURI="ShowURI";var vD=function(){function e(t){this.show=t}return e}();je.ShowType=vD;var vf={},xf={},ri={},Lg;function g1(){if(Lg)return ri;Lg=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.showPrimitiveInterpreter=void 0;var e=q,t=Ni,n=Xt,r=fs,o=Ob,i=Pb,a=Eb,u=$t(),s=je,c={show:function(l){return""+l}},f=function(l){return{show:function(d){return d===void 0?"<undefined>":l.show(d)}}};return ri.showPrimitiveInterpreter=e.memo(function(){return{_F:s.ShowURI,date:function(l){return function(d){return new s.ShowType(u.showApplyConfig(l)({show:function(p){return p.toISOString()}},d,{}))}},boolean:function(l){return function(d){return new s.ShowType(u.showApplyConfig(l)(a.showBoolean,d,{}))}},string:function(l){return function(d){return new s.ShowType(u.showApplyConfig(l)(a.showString,d,{}))}},number:function(l){return function(d){return new s.ShowType(u.showApplyConfig(l)(a.showNumber,d,{}))}},bigint:function(l){return function(d){return new s.ShowType(u.showApplyConfig(l)({show:function(p){return JSON.stringify(p)}},d,{}))}},stringLiteral:function(l,d){return function(p){return new s.ShowType(u.showApplyConfig(d)(a.showString,p,{}))}},numberLiteral:function(l,d){return function(p){return new s.ShowType(u.showApplyConfig(d)(a.showNumber,p,{}))}},oneOfLiterals:function(l,d){return function(p){return new s.ShowType(u.showApplyConfig(d)(c,p,{}))}},tag:function(l,d){return function(p){return new s.ShowType(u.showApplyConfig(d)(a.showString,p,{}))}},keysOf:function(l,d){return function(p){return new s.ShowType(u.showApplyConfig(d)(a.showString,p,{}))}},nullable:function(l,d){return function(p){return n.pipe(l(p).show,function(y){return new s.ShowType(u.showApplyConfig(d)(r.getShow(y),p,{show:y}))})}},optional:function(l,d){return function(p){return n.pipe(l(p).show,function(y){return new s.ShowType(u.showApplyConfig(d)(f(y),p,{show:y}))})}},mutable:function(l,d){return function(p){return n.pipe(l(p).show,function(y){return new s.ShowType(u.showApplyConfig(d)(y,p,{show:y}))})}},array:function(l,d){return function(p){return n.pipe(l(p).show,function(y){return new s.ShowType(u.showApplyConfig(d)(o.getShow(y),p,{show:y}))})}},nonEmptyArray:function(l,d){return function(p){return n.pipe(l(p).show,function(y){return new s.ShowType(u.showApplyConfig(d)(i.getShow(y),p,{show:y}))})}},uuid:function(l){return function(d){return new s.ShowType(u.showApplyConfig(l)(a.showString,d,{}))}},either:function(l,d,p){return function(y){return function(h,m){return new s.ShowType(u.showApplyConfig(p)(t.getShow(h,m),y,{left:h,right:m}))}(l(y).show,d(y).show)}},option:function(l,d){return function(p){return n.pipe(l(p).show,function(y){return new s.ShowType(u.showApplyConfig(d)(r.getShow(y),p,{show:y}))})}},unknownE:function(l,d){return function(p){return n.pipe(l(p).show,function(y){return new s.ShowType(u.showApplyConfig(d)(y,p,{show:y}))})}}}}),ri}var oi={},Bg;function b1(){if(Bg)return oi;Bg=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.showObjectInterpreter=void 0;var e=Ae,t=q,n=Eb,r=$t(),o=je,i=function(u){return u},a=function(u){return{show:function(s){return s===void 0?"undefined":u.show(s)}}};return oi.showObjectInterpreter=t.memo(function(){return{_F:o.ShowURI,interface:function(u,s,c){return function(f){var l=t.projectFieldWithEnv(u,f)("show");return new o.ShowType(r.showApplyConfig(c)(n.getStructShow(l),f,{shows:l}))}},partial:function(u,s,c){return function(f){var l=t.mapRecord(t.projectFieldWithEnv(u,f)("show"),a);return new o.ShowType(r.showApplyConfig(c)(i(n.getStructShow(l)),f,{shows:l}))}},both:function(u,s,c,f){return function(l){var d=t.projectFieldWithEnv(u,l)("show"),p=t.mapRecord(t.projectFieldWithEnv(s,l)("show"),a);return new o.ShowType(r.showApplyConfig(f)(n.getStructShow(e.__assign(e.__assign({},d),p)),l,{shows:d,showsPartial:p}))}}}}),oi}var ii={},zg;function v1(){if(zg)return ii;zg=1,Object.defineProperty(ii,"__esModule",{value:!0}),ii.showTaggedUnionInterpreter=void 0;var e=q,t=$t(),n=je;return ii.showTaggedUnionInterpreter=e.memo(function(){return{_F:n.ShowURI,taggedUnion:function(r,o,i,a){return function(u){var s=e.mapRecord(o,function(c){return c(u).show.show});return new n.ShowType(t.showApplyConfig(a)({show:function(c){return s[c[r]](c)}},u,{}))}}}}),ii}var ai={},Wg;function x1(){if(Wg)return ai;Wg=1,Object.defineProperty(ai,"__esModule",{value:!0}),ai.showRecursiveInterpreter=void 0;var e=q,t=je,n=$t();return ai.showRecursiveInterpreter=e.memo(function(){return{_F:t.ShowURI,recursive:function(r,o,i){var a=e.memo(function(){return r(u)}),u=function(s){return new t.ShowType(n.showApplyConfig(i)({show:function(c){return a()(s).show.show(c)}},s,{}))};return u}}}),ai}var ui={},Gg;function _1(){if(Gg)return ui;Gg=1,Object.defineProperty(ui,"__esModule",{value:!0}),ui.showSetInterpreter=void 0;var e=q,t=$e,n=Nb,r=je,o=$t();return ui.showSetInterpreter=e.memo(function(){return{_F:r.ShowURI,set:function(i,a,u){return function(s){return t.pipe(i(s).show,function(c){return new r.ShowType(o.showApplyConfig(u)(n.getShow(c),s,{show:c}))})}}}}),ui}var si={},Kg;function w1(){if(Kg)return si;Kg=1,Object.defineProperty(si,"__esModule",{value:!0}),si.showStrMapInterpreter=void 0;var e=q,t=$e,n=Qt,r=$t(),o=je;return si.showStrMapInterpreter=e.memo(function(){return{_F:o.ShowURI,strMap:function(i,a){return function(u){return t.pipe(i(u).show,function(s){return new o.ShowType(r.showApplyConfig(a)(n.getShow(s),u,{show:s}))})}},record:function(i,a,u){return function(s){return function(c,f){return new o.ShowType(r.showApplyConfig(u)(n.getShow(f),s,{domainShow:c,codomainShow:f}))}(i(s).show,a(s).show)}}}}),si}var ci={},Hg;function C1(){if(Hg)return ci;Hg=1,Object.defineProperty(ci,"__esModule",{value:!0}),ci.showUnknownInterpreter=void 0;var e=q,t=$e,n=$t(),r=je;return ci.showUnknownInterpreter=e.memo(function(){return{_F:r.ShowURI,unknown:function(o){return function(i){return t.pipe({show:function(a){return"<unknown>"}},function(a){return new r.ShowType(n.showApplyConfig(o)(a,i,{show:a}))})}}}}),ci}var li={},Jg;function S1(){if(Jg)return li;Jg=1,Object.defineProperty(li,"__esModule",{value:!0}),li.showNewtypeInterpreter=void 0;var e=q,t=Xt,n=$t(),r=je,o=function(i){return i};return li.showNewtypeInterpreter=e.memo(function(){return{_F:r.ShowURI,newtype:function(i){return function(a,u){return function(s){return t.pipe(a(s).show,function(c){return new r.ShowType(n.showApplyConfig(u)(o({show:function(f){return"<"+i+">("+c.show(f)+")"}}),s,{show:c}))})}}},newtypeIso:function(i,a,u,s){return function(c){return t.pipe(a(c).show,function(f){return new r.ShowType(n.showApplyConfig(s)({show:function(l){return"<"+u+">("+f.show(i.reverseGet(l))+")"}},c,{show:f}))})}},newtypePrism:function(i,a,u,s){return function(c){return t.pipe(a(c).show,function(f){return new r.ShowType(n.showApplyConfig(s)({show:function(l){return"<"+u+">("+f.show(i.reverseGet(l))+")"}},c,{show:f}))})}}}}),li}var fi={},Qg;function T1(){if(Qg)return fi;Qg=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.showRefinedInterpreter=void 0;var e=q,t=$e,n=$t(),r=je;return fi.showRefinedInterpreter=e.memo(function(){return{_F:r.ShowURI,refined:function(o,i,a,u){return function(s){return t.pipe(o(s).show,function(c){return new r.ShowType({show:function(f){return"<"+a+">("+n.showApplyConfig(u)(c,s,{show:c}).show(f)+")"}})})}},constrained:function(o,i,a,u){return function(s){return t.pipe(o(s).show,function(c){return new r.ShowType({show:function(f){return"<"+a+">("+n.showApplyConfig(u)(c,s,{show:c}).show(f)+")"}})})}}}}),fi}var Xg;function xD(){return Xg||(Xg=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Ae;t.__exportStar(g1(),e),t.__exportStar(A1(),e),t.__exportStar(b1(),e),t.__exportStar(v1(),e),t.__exportStar(x1(),e),t.__exportStar(_1(),e),t.__exportStar(w1(),e),t.__exportStar(C1(),e),t.__exportStar(S1(),e),t.__exportStar(T1(),e)}(xf)),xf}var Zg;function $t(){return Zg||(Zg=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.showApplyConfig=e.ShowURI=void 0;var t=Ae,n=zn,r=je;Object.defineProperty(e,"ShowURI",{enumerable:!0,get:function(){return r.ShowURI}}),t.__exportStar(xD(),e),e.showApplyConfig=n.getApplyConfig(r.ShowURI)}(vf)),vf}var Yg;function A1(){if(Yg)return ni;Yg=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.showIntersectionInterpreter=void 0;var e=q,t=je,n=$t();return ni.showIntersectionInterpreter=e.memo(function(){return{_F:t.ShowURI,intersection:function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return function(i,a){return function(u){var s=r.map(function(c){return c(u).show});return new t.ShowType(n.showApplyConfig(a)({show:function(c){return s.map(function(f){return f.show(c)}).join(" & ")}},u,{shows:s}))}}}}}),ni}var ol={};Object.defineProperty(ol,"__esModule",{value:!0});ol.showUnionInterpreter=void 0;var eb=q,tb=je;ol.showUnionInterpreter=eb.memo(function(){return{_F:tb.ShowURI,union:function(e){return function(t,n){return function(r){var o=e.map(function(a){return a(r).show.show}),i=eb.getGuardId(t,Symbol());return new tb.ShowType({show:function(a){return o[i(a)](a)}})}}}}});(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.modelShowInterpreter=void 0;var t=Ae,n=q,r=A1(),o=S1(),i=b1(),a=g1(),u=x1(),s=T1(),c=_1(),f=w1(),l=v1(),d=ol,p=C1();t.__exportStar(je,e);var y=function(){return n.merge(d.showUnionInterpreter(),s.showRefinedInterpreter(),o.showNewtypeInterpreter(),p.showUnknownInterpreter(),a.showPrimitiveInterpreter(),r.showIntersectionInterpreter(),i.showObjectInterpreter(),l.showTaggedUnionInterpreter(),u.showRecursiveInterpreter(),c.showSetInterpreter(),f.showStrMapInterpreter())};e.modelShowInterpreter=y})(m1);var _D=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},I1=function(e,t){return{get:e,reverseGet:t}},il=function(e){return mt(e.get,D.flow(e.reverseGet,D.constant))},qd=function(e){return an(D.flow(e.get,ne.some),e.reverseGet)},al=function(e){return ut(D.flow(e.get,ne.some),D.flow(e.reverseGet,D.constant))},Ld=function(e){return _n(function(t){return function(n){return function(r){return t.map(n(e.get(r)),function(o){return e.reverseGet(o)})}}})},mt=function(e,t){return{get:e,set:t}},on=function(e){return ut(D.flow(e.get,ne.some),e.set)},Zn=function(e){return _n(function(t){return function(n){return function(r){return t.map(n(e.get(r)),function(o){return e.set(o)(r)})}}})},Xa=function(e){return function(t){return mt(function(n){return e.get(t.get(n))},function(n){return function(r){return t.set(e.set(n)(t.get(r)))(r)}})}},Bd=function(e){return function(t){return an(D.flow(t.getOption,ne.chain(e.getOption)),D.flow(e.reverseGet,t.reverseGet))}},zd=function(e){return function(t){return Ye(Et(e))(on(t))}},gt=function(){return mt(D.identity,D.constant)},co=function(e){return function(t){return mt(function(n){return t.get(n)[e]},function(n){return function(r){var o,i=t.get(r);return n===i[e]?r:t.set(Object.assign({},i,(o={},o[e]=n,o)))(r)}})}},lo=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(n){return mt(function(r){for(var o=n.get(r),i={},a=0,u=e;a<u.length;a++){var s=u[a];i[s]=o[s]}return i},function(r){return function(o){for(var i=n.get(o),a=0,u=e;a<u.length;a++){var s=u[a];if(r[s]!==i[s])return n.set(Object.assign({},i,r))(o)}return o}})}},fo=function(e){return function(t){return mt(function(n){return t.get(n)[e]},function(n){return function(r){var o=t.get(r);if(n===o[e])return r;var i=o.slice();return i[e]=n,t.set(i)(r)}})}},Wd=function(e){return function(t){return B.pipe(t,Xa(nr().at(e)))}},an=function(e,t){return{getOption:e,reverseGet:t}},Et=function(e){return ut(e.getOption,function(t){return ul(t)(e)})},Yn=function(e){return _n(function(t){return function(n){return function(r){return B.pipe(e.getOption(r),ne.fold(function(){return t.of(r)},function(o){return t.map(n(o),function(i){return ul(i)(e)(r)})}))}}})},Gd=function(e){return function(t){return function(n){return B.pipe(t.getOption(n),ne.map(function(r){var o=e(r);return o===r?n:t.reverseGet(o)}))}}},Kd=function(e){return function(t){var n=Gd(e)(t);return function(r){return B.pipe(n(r),ne.getOrElse(function(){return r}))}}},ul=function(e){return Kd(function(){return e})},Hd=function(e){return function(t){return Ye(on(e))(Et(t))}},po=function(){return an(ne.fromNullable,D.identity)},er=function(e){return an(ne.fromPredicate(e),D.identity)},tr=function(){return an(D.identity,ne.some)},ho=function(){return an(ne.fromEither,Of.right)},yo=function(){return an(function(e){return Of.isLeft(e)?ne.some(e.left):ne.none},Of.left)},ut=function(e,t){return{getOption:e,set:t}},mo=function(e){return _n(function(t){return function(n){return function(r){return B.pipe(e.getOption(r),ne.fold(function(){return t.of(r)},function(o){return t.map(n(o),function(i){return e.set(i)(r)})}))}}})},Jd=function(e){return function(t){return function(n){return B.pipe(t.getOption(n),ne.map(function(r){var o=e(r);return o===r?n:t.set(o)(n)}))}}},Qd=function(e){return function(t){var n=Jd(e)(t);return function(r){return B.pipe(n(r),ne.getOrElse(function(){return r}))}}},Ye=function(e){return function(t){return ut(D.flow(t.getOption,ne.chain(e.getOption)),function(n){return Qd(e.set(n))(t)})}},Za=function(e){return function(t){return B.pipe(t,Ye(nu().index(e)))}},Ya=function(e){return function(t){return B.pipe(t,Ye(sl().index(e)))}},eu=function(e){return function(t){return B.pipe(t,Ye(ru().index(e)))}},go=function(e){return ut(rt.findFirst(e),function(t){return function(n){return B.pipe(rt.findIndex(e)(n),ne.fold(function(){return n},function(r){return rt.unsafeUpdateAt(r,t,n)}))}})},O1=function(e,t,n){if(n[e]===t)return n;var r=_D([n[0]],n.slice(1),!0);return r[e]=t,r},bo=function(e){return ut(rt.findFirst(e),function(t){return function(n){return B.pipe(rt.findIndex(e)(n),ne.fold(function(){return n},function(r){return O1(r,t,n)}))}})},_n=function(e){return{modifyF:e}};function Mt(e){return function(t){return _n(function(n){return function(r){return t.modifyF(n)(e.modifyF(n)(r))}})}}var P1={URI:"Identity",map:function(e,t){return t(e)},of:D.identity,ap:function(e,t){return e(t)}},wD=function(e){return e.URI==="Identity"};function Xd(e){return function(){return _n(function(t){var n=wD(t)?e.map:e.traverse(t);return function(r){return function(o){return n(o,r)}}})}}function vo(e){return Mt(Xd(e)())}var tu=function(e){return{index:e}},nu=function(){return tu(function(e){return ut(function(t){return rt.lookup(e,t)},function(t){return function(n){return B.pipe(rt.lookup(e,n),ne.fold(function(){return n},function(){return rt.unsafeUpdateAt(e,t,n)}))}})})},sl=function(){return tu(function(e){return ut(function(t){return rt.lookup(e,t)},function(t){return function(n){return B.pipe(rt.lookup(e,n),ne.fold(function(){return n},function(){return O1(e,t,n)}))}})})},ru=function(){return tu(function(e){return ut(function(t){return yr.lookup(e,t)},function(t){return function(n){return n[e]===t||ne.isNone(yr.lookup(e,n))?n:yr.insertAt(e,t)(n)}})})},Zd=function(e){return{at:e}};function nr(){return Zd(function(e){return mt(function(t){return yr.lookup(e,t)},ne.fold(function(){return yr.deleteAt(e)},function(t){return yr.insertAt(e,t)}))})}const cl=Object.freeze(Object.defineProperty({__proto__:null,ApplicativeIdentity:P1,at:Zd,atReadonlyRecord:nr,fromTraversable:Xd,index:tu,indexReadonlyArray:nu,indexReadonlyNonEmptyArray:sl,indexReadonlyRecord:ru,iso:I1,isoAsLens:il,isoAsOptional:al,isoAsPrism:qd,isoAsTraversal:Ld,lens:mt,lensAsOptional:on,lensAsTraversal:Zn,lensAtKey:Wd,lensComponent:fo,lensComposeLens:Xa,lensComposePrism:zd,lensId:gt,lensProp:co,lensProps:lo,optional:ut,optionalAsTraversal:mo,optionalComposeOptional:Ye,optionalFindFirst:go,optionalFindFirstNonEmpty:bo,optionalIndex:Za,optionalIndexNonEmpty:Ya,optionalKey:eu,optionalModify:Qd,optionalModifyOption:Jd,prism:an,prismAsOptional:Et,prismAsTraversal:Yn,prismComposeLens:Hd,prismComposePrism:Bd,prismFromNullable:po,prismFromPredicate:er,prismLeft:yo,prismModify:Kd,prismModifyOption:Gd,prismRight:ho,prismSet:ul,prismSome:tr,traversal:_n,traversalComposeTraversal:Mt,traversalTraverse:vo},Symbol.toStringTag,{value:"Module"}));var ll=Zd,N1=function(e){return function(t){return ll(function(n){return B.pipe(e,il,Xa(t.at(n)))})}},CD=nr,SD=function(e){var t=di.lookup(e),n=di.deleteAt(e),r=di.insertAt(e);return function(){return ll(function(o){return mt(function(i){return t(o,i)},ne.fold(function(){return n(o)},function(i){return r(o,i)}))})}},TD=function(e){var t=Il.elem(e),n=Il.insert(e),r=Il.remove(e);return ll(function(o){var i=n(o),a=r(o);return mt(function(u){return t(o,u)},function(u){return function(s){return u?i(s):a(s)}})})},AD=nr;const ID=Object.freeze(Object.defineProperty({__proto__:null,at:ll,atReadonlyMap:SD,atReadonlyRecord:CD,atReadonlySet:TD,atRecord:AD,fromIso:N1},Symbol.toStringTag,{value:"Module"}));var ou=I1,j1=function(){return ou(D.identity,D.identity)},Jt=il,Ii=qd,yn=al,zr=Ld,fl=function(e){return function(t){return ou(D.flow(t.get,e.get),D.flow(e.reverseGet,t.reverseGet))}},OD=fl,PD=function(e){return D.flow(Jt,Xa(e))},xo=function(e){return D.flow(Ii,Bd(e))},Yd=function(e){return D.flow(yn,Ye(e))},ND=function(e){return D.flow(zr,Mt(e))},$1=function(e){return ou(e.reverseGet,e.get)},E1=function(e){return function(t){return function(n){return t.reverseGet(e(t.get(n)))}}};function jD(e){return function(t){return function(n){return function(r){return B.pipe(n.get(r),t,function(o){return e.map(o,n.reverseGet)})}}}}var $D=function(e){return xo(po())(e)};function ED(e){return xo(er(e))}var MD=function(e){return D.flow(Jt,co(e))},kD=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return D.flow(Jt,lo.apply(cl,e))},FD=function(e){return D.flow(Jt,fo(e))},RD=function(e){return D.flow(yn,Za(e))},VD=function(e){return D.flow(yn,Ya(e))},UD=function(e){return D.flow(yn,eu(e))},DD=function(e){return D.flow(Jt,Wd(e))},qD=xo(tr()),LD=xo(ho()),BD=xo(yo());function zD(e){return D.flow(zr,vo(e))}function WD(e){return Yd(go(e))}function GD(e){return Yd(bo(e))}var KD=function(e,t){return function(n){return M1(n,e,t)}},M1=function(e,t,n){return ou(D.flow(e.get,t),D.flow(n,e.reverseGet))},dl="monocle-ts/Iso",HD={URI:dl,imap:M1},k1={URI:dl,compose:function(e,t){return fl(e)(t)}},JD={URI:dl,compose:k1.compose,id:j1};const QD=Object.freeze(Object.defineProperty({__proto__:null,Category:JD,Invariant:HD,Semigroupoid:k1,URI:dl,asLens:Jt,asOptional:yn,asPrism:Ii,asTraversal:zr,atKey:DD,component:FD,compose:fl,composeIso:OD,composeLens:PD,composeOptional:Yd,composePrism:xo,composeTraversal:ND,filter:ED,findFirst:WD,findFirstNonEmpty:GD,fromNullable:$D,id:j1,imap:KD,index:RD,indexNonEmpty:VD,iso:ou,key:UD,left:BD,modify:E1,modifyF:jD,prop:MD,props:kD,reverse:$1,right:LD,some:qD,traverse:zD},Symbol.toStringTag,{value:"Module"}));var pl=tu,F1=function(e){return pl(function(t){return zd(tr())(e.at(t))})},R1=function(e){return function(t){return pl(function(n){return B.pipe(e,al,Ye(t.index(n)))})}},XD=nu,ZD=sl,YD=ru,eq=function(e){var t=di.lookup(e),n=di.insertAt(e);return function(){return pl(function(r){return ut(function(o){return t(r,o)},function(o){var i=n(r,o);return function(a){return B.pipe(t(r,a),ne.fold(function(){return a},function(u){return o===u?a:i(a)}))}})})}},tq=nu,nq=ru;const rq=Object.freeze(Object.defineProperty({__proto__:null,fromAt:F1,fromIso:R1,index:pl,indexArray:tq,indexReadonlyArray:XD,indexReadonlyMap:eq,indexReadonlyNonEmptyArray:ZD,indexReadonlyRecord:YD,indexRecord:nq},Symbol.toStringTag,{value:"Module"}));var V1=mt,ss=gt,mn=on,Wr=Zn,Bn=Xa,oq=Bn,iq=D.flow(il,Bn),rr=zd,ep=function(e){return D.flow(mn,Ye(e))},aq=function(e){return D.flow(Wr,Mt(e))},U1=function(e){return function(t){return function(n){var r=t.get(n),o=e(r);return r===o?n:t.set(o)(n)}}};function uq(e){return function(t){return function(n){return function(r){return B.pipe(n.get(r),t,function(o){return e.map(o,function(i){return n.set(i)(r)})})}}}}var sq=function(e){return rr(po())(e)};function cq(e){return rr(er(e))}var D1=co,q1=lo,lq=fo,fq=function(e){return D.flow(mn,Za(e))},dq=function(e){return D.flow(mn,Ya(e))},pq=function(e){return D.flow(mn,eu(e))},hq=Wd,yq=rr(tr()),mq=rr(ho()),gq=rr(yo());function bq(e){return D.flow(Wr,vo(e))}function vq(e){return ep(go(e))}function xq(e){return ep(bo(e))}var _q=function(e,t){return function(n){return L1(n,e,t)}},L1=function(e,t,n){return V1(D.flow(e.get,t),D.flow(n,e.set))},hl="monocle-ts/Lens",wq={URI:hl,imap:L1},B1={URI:hl,compose:function(e,t){return Bn(e)(t)}},Cq={URI:hl,compose:B1.compose,id:ss};const z1=Object.freeze(Object.defineProperty({__proto__:null,Category:Cq,Invariant:wq,Semigroupoid:B1,URI:hl,asOptional:mn,asTraversal:Wr,atKey:hq,component:lq,compose:Bn,composeIso:iq,composeLens:oq,composeOptional:ep,composePrism:rr,composeTraversal:aq,filter:cq,findFirst:vq,findFirstNonEmpty:xq,fromNullable:sq,id:ss,imap:_q,index:fq,indexNonEmpty:dq,key:pq,left:gq,lens:V1,modify:U1,modifyF:uq,prop:D1,props:q1,right:mq,some:yq,traverse:bq},Symbol.toStringTag,{value:"Module"}));var tp=ut,W1=function(){return tp(ne.some,D.constant)},Oi=mo,me=Ye,Sq=me,Tq=D.flow(al,me),Aq=D.flow(on,Ye),Iq=D.flow(Et,Ye),Oq=function(e){return D.flow(Oi,Mt(e))},np=Jd,Pq=function(e){return np(function(){return e})},G1=Qd;function Nq(e){return function(t){return function(n){return function(r){return B.pipe(n.getOption(r),ne.fold(function(){return e.of(r)},function(o){return e.map(t(o),function(i){return n.set(i)(r)})}))}}}}var jq=me(Et(po()));function $q(e){return me(Et(er(e)))}var Eq=function(e){return me(B.pipe(gt(),co(e),on))},Mq=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me(B.pipe(gt(),lo.apply(cl,e),on))},kq=function(e){return me(B.pipe(gt(),fo(e),on))},Fq=Za,Rq=Ya,Vq=eu,Uq=function(e){return function(t){return B.pipe(t,me(on(nr().at(e))))}},Dq=me(Et(tr())),qq=me(Et(ho())),Lq=me(Et(yo()));function Bq(e){return D.flow(Oi,vo(e))}function zq(e){return me(go(e))}function Wq(e){return me(bo(e))}var Gq=function(e,t){return function(n){return K1(n,e,t)}},K1=function(e,t,n){return tp(D.flow(e.getOption,ne.map(t)),D.flow(n,e.set))},yl="monocle-ts/Optional",Kq={URI:yl,imap:K1},H1={URI:yl,compose:function(e,t){return me(e)(t)}},Hq={URI:yl,compose:H1.compose,id:W1};const Jq=Object.freeze(Object.defineProperty({__proto__:null,Category:Hq,Invariant:Kq,Semigroupoid:H1,URI:yl,asTraversal:Oi,atKey:Uq,component:kq,compose:me,composeIso:Tq,composeLens:Aq,composeOptional:Sq,composePrism:Iq,composeTraversal:Oq,filter:$q,findFirst:zq,findFirstNonEmpty:Wq,fromNullable:jq,id:W1,imap:Gq,index:Fq,indexNonEmpty:Rq,key:Vq,left:Lq,modify:G1,modifyF:Nq,modifyOption:np,optional:tp,prop:Eq,props:Mq,right:qq,setOption:Pq,some:Dq,traverse:Bq},Symbol.toStringTag,{value:"Module"}));var rp=an,J1=function(){return rp(ne.some,D.identity)},Q1=er,gn=Et,Gr=Yn,ot=Bd,Qq=ot,Xq=D.flow(qd,ot),iu=Hd,op=function(e){return D.flow(gn,Ye(e))},Zq=function(e){return D.flow(Gr,Mt(e))},Yq=ul,eL=Gd,tL=Kd;function nL(e){return function(t){return function(n){return function(r){return B.pipe(n.getOption(r),ne.fold(function(){return e.of(r)},function(o){return e.map(t(o),n.reverseGet)}))}}}}var rL=ot(po());function oL(e){return ot(er(e))}var iL=function(e){return iu(B.pipe(gt(),co(e)))},aL=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return iu(B.pipe(gt(),lo.apply(cl,e)))},uL=function(e){return iu(B.pipe(gt(),fo(e)))},sL=function(e){return D.flow(gn,Za(e))},cL=function(e){return D.flow(gn,Ya(e))},lL=function(e){return D.flow(gn,eu(e))},fL=function(e){return function(t){return Hd(nr().at(e))(t)}},dL=ot(tr()),pL=ot(ho()),hL=ot(yo());function yL(e){return D.flow(Gr,vo(e))}function mL(e){return op(go(e))}function gL(e){return op(bo(e))}var bL=function(e,t){return function(n){return X1(n,e,t)}},X1=function(e,t,n){return rp(D.flow(e.getOption,ne.map(t)),D.flow(n,e.reverseGet))},ml="monocle-ts/Prism",vL={URI:ml,imap:X1},Z1={URI:ml,compose:function(e,t){return ot(e)(t)}},xL={URI:ml,compose:Z1.compose,id:J1};const _L=Object.freeze(Object.defineProperty({__proto__:null,Category:xL,Invariant:vL,Semigroupoid:Z1,URI:ml,asOptional:gn,asTraversal:Gr,atKey:fL,component:uL,compose:ot,composeIso:Xq,composeLens:iu,composeOptional:op,composePrism:Qq,composeTraversal:Zq,filter:oL,findFirst:mL,findFirstNonEmpty:gL,fromNullable:rL,fromPredicate:Q1,id:J1,imap:bL,index:sL,indexNonEmpty:cL,key:lL,left:hL,modify:tL,modifyF:nL,modifyOption:eL,prism:rp,prop:iL,props:aL,right:pL,set:Yq,some:dL,traverse:yL},Symbol.toStringTag,{value:"Module"}));var Y1=_n,e_=function(){return Y1(function(e){return function(t){return t}})},t_=Xd,ye=Mt,wL=ye,CL=D.flow(Ld,ye),SL=D.flow(Zn,Mt),n_=D.flow(Yn,Mt),ip=D.flow(mo,Mt),ap=function(e){return function(t){return t.modifyF(P1)(e)}},r_=function(e){return ap(function(){return e})},TL=function(e){return n_(po())(e)};function o_(e){return ye(Yn(er(e)))}var AL=function(e){return ye(B.pipe(gt(),co(e),Zn))},IL=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ye(B.pipe(gt(),lo.apply(cl,e),Zn))},OL=function(e){return ye(B.pipe(gt(),fo(e),Zn))},PL=function(e){return function(t){return B.pipe(t,ye(mo(nu().index(e))))}},NL=function(e){return function(t){return B.pipe(t,ye(mo(sl().index(e))))}},jL=function(e){return function(t){return B.pipe(t,ye(mo(ru().index(e))))}},$L=function(e){return function(t){return B.pipe(t,ye(Zn(nr().at(e))))}},EL=ye(Yn(tr())),ML=ye(Yn(ho())),kL=ye(Yn(yo())),FL=vo;function RL(e){return ip(go(e))}function VL(e){return ip(bo(e))}var up=function(e){return function(t){return function(n){return n.modifyF(Cp.getApplicative(e))(function(r){return Cp.make(t(r))})}}},UL=function(e){return up(e)(D.identity)},DL=function(e){return function(t){return up(rt.getMonoid())(rt.of)(t)(e)}},sp="monocle-ts/Traversal",i_={URI:sp,compose:function(e,t){return ye(e)(t)}},qL={URI:sp,compose:i_.compose,id:e_};const LL=Object.freeze(Object.defineProperty({__proto__:null,Category:qL,Semigroupoid:i_,URI:sp,atKey:$L,component:OL,compose:ye,composeIso:CL,composeLens:SL,composeOptional:ip,composePrism:n_,composeTraversal:wL,filter:o_,findFirst:RL,findFirstNonEmpty:VL,fold:UL,foldMap:up,fromNullable:TL,fromTraversable:t_,getAll:DL,id:e_,index:PL,indexNonEmpty:NL,key:jL,left:kL,modify:ap,prop:AL,props:IL,right:ML,set:r_,some:EL,traversal:Y1,traverse:FL},Symbol.toStringTag,{value:"Module"}));var nb=function(e){return new u_(e.get,e.reverseGet)},En=function(e){return new gr(e.get,e.set)},bi=function(e){return new Pi(e.getOption,e.reverseGet)},Ke=function(e){return new cs(e.getOption,e.set)},Le=function(e){return new c_(e.modifyF)},BL=function(e){return new l_(function(t){return En(e.at(t))})},rb=function(e){return new cp(function(t){return Ke(e.index(t))})},a_=function(e,t,n){var r;return n===e[t]?e:Object.assign({},e,(r={},r[t]=n,r))},u_=function(){function e(t,n){this.get=t,this.reverseGet=n,this._tag="Iso",this.unwrap=this.get,this.to=this.get,this.wrap=this.reverseGet,this.from=this.reverseGet}return e.prototype.reverse=function(){return nb($1(this))},e.prototype.modify=function(t){return E1(t)(this)},e.prototype.asLens=function(){return En(Jt(this))},e.prototype.asPrism=function(){return bi(Ii(this))},e.prototype.asOptional=function(){return Ke(yn(this))},e.prototype.asTraversal=function(){return Le(zr(this))},e.prototype.asFold=function(){var t=this;return new wn(function(){return function(n){return function(r){return n(t.get(r))}}})},e.prototype.asGetter=function(){var t=this;return new lp(function(n){return t.get(n)})},e.prototype.asSetter=function(){var t=this;return new _o(function(n){return t.modify(n)})},e.prototype.compose=function(t){return nb(fl(t)(this))},e.prototype.composeIso=function(t){return this.compose(t)},e.prototype.composeLens=function(t){return En(B.pipe(this,Jt,Bn(t)))},e.prototype.composePrism=function(t){return bi(B.pipe(this,Ii,ot(t)))},e.prototype.composeOptional=function(t){return Ke(B.pipe(this,yn,me(t)))},e.prototype.composeTraversal=function(t){return Le(B.pipe(this,zr,ye(t)))},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeGetter=function(t){return this.asGetter().compose(t)},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e}(),gr=function(){function e(t,n){this.get=t,this.set=n,this._tag="Lens"}return e.fromPath=function(){var t=e.fromProp();return function(n){var r=t(n[0]);return n.slice(1).reduce(function(o,i){return o.compose(t(i))},r)}},e.fromProp=function(){return function(t){return En(B.pipe(ss(),D1(t)))}},e.fromProps=function(){return function(t){return En(B.pipe(ss(),q1.apply(z1,t)))}},e.fromNullableProp=function(){return function(t,n){return new e(function(r){var o=dt.fromNullable(r[t]);return dt.isNone(o)?n:o.value},function(r){return function(o){return a_(o,t,r)}})}},e.prototype.modify=function(t){return U1(t)(this)},e.prototype.asOptional=function(){return Ke(mn(this))},e.prototype.asTraversal=function(){return Le(Wr(this))},e.prototype.asSetter=function(){var t=this;return new _o(function(n){return t.modify(n)})},e.prototype.asGetter=function(){var t=this;return new lp(function(n){return t.get(n)})},e.prototype.asFold=function(){var t=this;return new wn(function(){return function(n){return function(r){return n(t.get(r))}}})},e.prototype.compose=function(t){return En(Bn(t)(this))},e.prototype.composeLens=function(t){return this.compose(t)},e.prototype.composeGetter=function(t){return this.asGetter().compose(t)},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeOptional=function(t){return Ke(B.pipe(this,mn,me(t)))},e.prototype.composeTraversal=function(t){return Le(B.pipe(this,Wr,ye(t)))},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e.prototype.composeIso=function(t){return En(B.pipe(this,Bn(B.pipe(t,Jt))))},e.prototype.composePrism=function(t){return Ke(rr(t)(this))},e}(),Pi=function(){function e(t,n){this.getOption=t,this.reverseGet=n,this._tag="Prism"}return e.fromPredicate=function(t){return bi(Q1(t))},e.some=function(){return s_},e.prototype.modify=function(t){var n=this;return function(r){var o=n.modifyOption(t)(r);return dt.isNone(o)?r:o.value}},e.prototype.modifyOption=function(t){var n=this;return function(r){return dt.option.map(n.getOption(r),function(o){var i=t(o);return i===o?r:n.reverseGet(i)})}},e.prototype.set=function(t){return this.modify(function(){return t})},e.prototype.asOptional=function(){return Ke(gn(this))},e.prototype.asTraversal=function(){return Le(Gr(this))},e.prototype.asSetter=function(){var t=this;return new _o(function(n){return t.modify(n)})},e.prototype.asFold=function(){var t=this;return new wn(function(n){return function(r){return function(o){var i=t.getOption(o);return dt.isNone(i)?n.empty:r(i.value)}}})},e.prototype.compose=function(t){return bi(ot(t)(this))},e.prototype.composePrism=function(t){return this.compose(t)},e.prototype.composeOptional=function(t){return Ke(B.pipe(this,gn,me(t)))},e.prototype.composeTraversal=function(t){return Le(B.pipe(this,Gr,ye(t)))},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e.prototype.composeIso=function(t){return bi(B.pipe(this,ot(B.pipe(t,Ii))))},e.prototype.composeLens=function(t){return Ke(iu(t)(this))},e.prototype.composeGetter=function(t){return this.asFold().compose(t.asFold())},e}(),s_=new Pi(D.identity,dt.some),cs=function(){function e(t,n){this.getOption=t,this.set=n,this._tag="Optional"}return e.fromPath=function(){var t=e.fromNullableProp();return function(n){var r=t(n[0]);return n.slice(1).reduce(function(o,i){return o.compose(t(i))},r)}},e.fromNullableProp=function(){return function(t){return new e(function(n){return dt.fromNullable(n[t])},function(n){return function(r){return r[t]==null?r:a_(r,t,n)}})}},e.fromOptionProp=function(){var t=gr.fromProp();return function(n){return t(n).composePrism(s_)}},e.prototype.modify=function(t){return G1(t)(this)},e.prototype.modifyOption=function(t){return np(t)(this)},e.prototype.asTraversal=function(){return Le(Oi(this))},e.prototype.asFold=function(){var t=this;return new wn(function(n){return function(r){return function(o){var i=t.getOption(o);return dt.isNone(i)?n.empty:r(i.value)}}})},e.prototype.asSetter=function(){var t=this;return new _o(function(n){return t.modify(n)})},e.prototype.compose=function(t){return Ke(me(t)(this))},e.prototype.composeOptional=function(t){return this.compose(t)},e.prototype.composeTraversal=function(t){return Le(B.pipe(this,Oi,ye(t)))},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e.prototype.composeLens=function(t){return Ke(B.pipe(this,me(B.pipe(t,mn))))},e.prototype.composePrism=function(t){return Ke(B.pipe(this,me(B.pipe(t,gn))))},e.prototype.composeIso=function(t){return Ke(B.pipe(this,me(B.pipe(t,yn))))},e.prototype.composeGetter=function(t){return this.asFold().compose(t.asFold())},e}(),c_=function(){function e(t){this.modifyF=t,this._tag="Traversal"}return e.prototype.modify=function(t){return ap(t)(this)},e.prototype.set=function(t){return r_(t)(this)},e.prototype.filter=function(t){return Le(o_(t)(this))},e.prototype.asFold=function(){var t=this;return new wn(function(n){return function(r){return t.modifyF(If.getApplicative(n))(function(o){return If.make(r(o))})}})},e.prototype.asSetter=function(){var t=this;return new _o(function(n){return t.modify(n)})},e.prototype.compose=function(t){return Le(ye(t)(this))},e.prototype.composeTraversal=function(t){return this.compose(t)},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeSetter=function(t){return this.asSetter().compose(t)},e.prototype.composeOptional=function(t){return this.compose(t.asTraversal())},e.prototype.composeLens=function(t){return Le(B.pipe(this,ye(B.pipe(t,Wr))))},e.prototype.composePrism=function(t){return Le(B.pipe(this,ye(B.pipe(t,Gr))))},e.prototype.composeIso=function(t){return Le(B.pipe(this,ye(B.pipe(t,zr))))},e.prototype.composeGetter=function(t){return this.asFold().compose(t.asFold())},e}(),l_=function(){function e(t){this.at=t,this._tag="At"}return e.prototype.fromIso=function(t){return BL(N1(t)(this))},e}(),cp=function(){function e(t){this.index=t,this._tag="Index"}return e.fromAt=function(t){return rb(F1(t))},e.prototype.fromIso=function(t){return rb(R1(t)(this))},e}(),lp=function(){function e(t){this.get=t,this._tag="Getter"}return e.prototype.asFold=function(){var t=this;return new wn(function(){return function(n){return function(r){return n(t.get(r))}}})},e.prototype.compose=function(t){var n=this;return new e(function(r){return t.get(n.get(r))})},e.prototype.composeGetter=function(t){return this.compose(t)},e.prototype.composeFold=function(t){return this.asFold().compose(t)},e.prototype.composeLens=function(t){return this.compose(t.asGetter())},e.prototype.composeIso=function(t){return this.compose(t.asGetter())},e.prototype.composeTraversal=function(t){return this.asFold().compose(t.asFold())},e.prototype.composeOptional=function(t){return this.asFold().compose(t.asFold())},e.prototype.composePrism=function(t){return this.asFold().compose(t.asFold())},e}(),wn=function(){function e(t){this.foldMap=t,this._tag="Fold",this.getAll=t(wp.getMonoid())(wp.of),this.exist=t(_p.monoidAny),this.all=t(_p.monoidAll),this.foldMapFirst=t(dt.getFirstMonoid())}return e.prototype.compose=function(t){var n=this;return new e(function(r){return function(o){return n.foldMap(r)(t.foldMap(r)(o))}})},e.prototype.composeFold=function(t){return this.compose(t)},e.prototype.composeGetter=function(t){return this.compose(t.asFold())},e.prototype.composeTraversal=function(t){return this.compose(t.asFold())},e.prototype.composeOptional=function(t){return this.compose(t.asFold())},e.prototype.composeLens=function(t){return this.compose(t.asFold())},e.prototype.composePrism=function(t){return this.compose(t.asFold())},e.prototype.composeIso=function(t){return this.compose(t.asFold())},e.prototype.find=function(t){return this.foldMapFirst(dt.fromPredicate(t))},e.prototype.headOption=function(t){return this.find(function(){return!0})(t)},e}(),_o=function(){function e(t){this.modify=t,this._tag="Setter"}return e.prototype.set=function(t){return this.modify(D.constant(t))},e.prototype.compose=function(t){var n=this;return new e(function(r){return n.modify(t.modify(r))})},e.prototype.composeSetter=function(t){return this.compose(t)},e.prototype.composeTraversal=function(t){return this.compose(t.asSetter())},e.prototype.composeOptional=function(t){return this.compose(t.asSetter())},e.prototype.composeLens=function(t){return this.compose(t.asSetter())},e.prototype.composePrism=function(t){return this.compose(t.asSetter())},e.prototype.composeIso=function(t){return this.compose(t.asSetter())},e}();function zL(e){var t=t_(e);return function(){return Le(t())}}function WL(e){return function(){return new wn(function(t){var n=e.foldMap(t);return function(r){return function(o){return n(o,r)}}})}}const GL=Object.freeze(Object.defineProperty({__proto__:null,At:l_,Fold:wn,Getter:lp,Index:cp,Iso:u_,Lens:gr,Optional:cs,Prism:Pi,Setter:_o,Traversal:c_,at:ID,fromFoldable:WL,fromTraversable:zL,index:rq,iso:QD,lens:z1,optional:Jq,prism:_L,traversal:LL},Symbol.toStringTag,{value:"Module"})),KL=()=>({lensFromProp:gr.fromProp(),lensFromProps:gr.fromProps(),lensFromPath:gr.fromPath(),indexFromAt:cp.fromAt,optionalFromOptionProp:cs.fromOptionProp(),optionalFromNullableProp:cs.fromNullableProp(),prism:Pi.some(),prismFromPredicate:Pi.fromPredicate}),HL=KL(),JL=()=>HL,f_=e=>e,d_=e=>()=>t=>t,p_=(e,t)=>Object.assign((...r)=>e(...r),t),h_=(e,t)=>p_(e,Object.assign({},e,t)),y_=e=>t=>e(t),QL=e=>e,XL=e=>e;function ZL(e,t){return XL(QL(p_(y_(e),t(e))))}function YL(e,t){const n=ZL(e,t);return h_(n,Object.assign(Object.assign({},JL()),{derive:f_(n)}))}var m_={},gl={};Object.defineProperty(gl,"__esModule",{value:!0});gl.Ctors=void 0;var ob=Ae,eB=Qt,tB=function(e){return function(t){var n=eB.mapWithIndex(function(r,o){return function(i){var a;return ob.__assign(ob.__assign({},i),(a={},a[e]=r,a))}})(t);return{of:n,as:n,make:function(r){return r},tag:e}}};gl.Ctors=tB;var bl={};const g_=vs(GL);Object.defineProperty(bl,"__esModule",{value:!0});bl.Matchers=void 0;var nB=fs,ib=g_,rB=function(e){return function(t){var n=function(s,c){return function(f){return(s[f[e]]||c)(f)}},r=function(s){return new ib.Lens(function(c){return s[c[e]].get(c)},function(c){return function(f){return s[f[e]].set(c)(f)}})},o=function(s){return new ib.Optional(function(c){var f=s[c[e]];return f!==void 0?f.getOption(c):nB.none},function(c){return function(f){var l=s[f[e]];return l!==void 0?l.set(c)(f):f}})},i=function(s){return function(c){var f=s[c[e]];return f?f(c):c}},a=function(s){return s},u=function(s){return function(c,f){var l=n(c,f||function(d){return function(p){return p}});return function(d,p){var y=d===void 0?s:d;return p[e]in t?l(p)(y):y}}};return{matchStrict:n,match:n,transform:i,fold:a,createReducer:u,createPartialReducer:u,strict:function(s){return s},matchLens:r,matchOptional:o}}};bl.Matchers=rB;var vl={};Object.defineProperty(vl,"__esModule",{value:!0});vl.MonocleFor=void 0;var un=g_,oB=function(){return{lensFromProp:un.Lens.fromProp(),lensFromProps:un.Lens.fromProps(),lensFromPath:un.Lens.fromPath(),indexFromAt:un.Index.fromAt,optionalFromOptionProp:un.Optional.fromOptionProp(),optionalFromNullableProp:un.Optional.fromNullableProp(),prism:un.Prism.some(),prismFromPredicate:un.Prism.fromPredicate}},iB=oB(),aB=function(){return iB};vl.MonocleFor=aB;var xl={};Object.defineProperty(xl,"__esModule",{value:!0});xl.Predicates=void 0;var uB=Qt,sB=function(e){return function(t){return{is:uB.mapWithIndex(function(n,r){return function(o){return o[e]===n}})(t),verified:function(n){return n[e]in t},isAnyOf:function(n){return function(r){return n.indexOf(r[e])!==-1}}}}};xl.Predicates=sB;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.makeADT=e.ofType=e.intersectADT=e.unionADT=void 0;var t=Ae,n=$i,r=ji,o=$e,i=Qt,a=gl,u=bl,s=vl,c=xl,f=function(T,A){return t.__assign(t.__assign({},T),A)},l=i.fromFoldable({concat:o.identity},n.array),d=function(T){return o.tuple(T,null)},p=function(T,A){return l(n.intersection(r.eqString)(Object.keys(T),Object.keys(A)).map(d))},y=function(T,A){return l(n.difference(r.eqString)(Object.keys(T),A).map(d))},h=function(T,A){return l(n.intersection(r.eqString)(Object.keys(T),A).map(d))},m=function(T){var A=n.reduceRight(T[0].keys,function(O,U){return f(O.keys,U)})(T);return e.makeADT(T[0].tag)(A)};e.unionADT=m;var g=function(T,A){return e.makeADT(T.tag)(p(T.keys,A.keys))};e.intersectADT=g;var w=function(){return 1};e.ofType=w;var N=function(T){return function(A){var O=A,U=a.Ctors(T)(O),E=c.Predicates(T)(O),W=s.MonocleFor(),S=u.Matchers(T)(O),$=function(k){return e.makeADT(T)(h(O,k))},z=function(k){return e.makeADT(T)(y(O,k))},R=t.__assign(t.__assign(t.__assign(t.__assign(t.__assign({},U),E),W),S),{tag:T,keys:O,select:$,exclude:z});return R}};e.makeADT=N})(m_);const b_=Qt.fromFoldable({concat:$e.identity},$i.array),cB=(e,t)=>b_($i.intersection(ji.eqString)(Object.keys(e),t).map(n=>$e.tuple(n,e[n]))),lB=(e,t)=>b_($i.difference(ji.eqString)(Object.keys(e),t).map(n=>$e.tuple(n,e[n])));function fp(e){return t=>n=>{const r=e(c=>c.taggedUnion(t,Qt.mapWithIndex((f,l)=>l(c))(n))),o=m_.makeADT(t)(n),i=fp(e)(t),a=c=>i(cB(n,c)),u=c=>i(lB(n,c));return h_(y_(r),Object.assign(Object.assign(Object.assign({},r),o),{selectMorph:a,excludeMorph:u}))}}function fB(e,t){const n=i=>YL(e(i),t),r=fp(n),o=d_()();return{summon:n,tagged:r,define:o}}const dB=Object.freeze(Object.defineProperty({__proto__:null,defineFor:d_,interpretable:f_,makeSummoner:fB,makeTagged:fp},Symbol.toStringTag,{value:"Module"})),pB=vs(dB);Object.defineProperty(kn,"__esModule",{value:!0});var au=kn.summonFor=kn.AsUOpaque=kn.AsOpaque=void 0,hB=xs,yB=Ev,mB=g0,ab=bx,gB=m1,bB=pB,vB=function(){return function(e){return e}};kn.AsOpaque=vB;var xB=function(){return function(e){return e}};kn.AsUOpaque=xB;var _B=function(e){return bB.makeSummoner(hB.cacheUnaryFunction,function(t){var n=t(ab.modelIoTsNonStrictInterpreter())(e),r=n.create,o=n.type;return{build:function(i){return i},eq:t(yB.modelEqInterpreter())(e).eq,show:t(gB.modelShowInterpreter())(e).show,arb:t(mB.modelFastCheckInterpreter())(e).arb,strictType:t(ab.modelIoTsStrictInterpreter())(e).type,type:o,create:r}})};au=kn.summonFor=_B;const{summon:wB}=au({}),ls=wB(e=>e.interface({localId:e.string(),componentPath:e.optional(e.array(e.string())),sharedConfigurationModelId:e.optional(e.string())},"GlobalAttributeId"));function v_(e){var t;return{sharedConfigurationModel:e.sharedConfigurationModelId??"",componentPath:((t=e.componentPath)==null?void 0:t.join(" -> "))??"",attributeId:e.localId}}function dp(e,t,n){return r=>I.useMemo(()=>v.pipe(r,v.O.fromNullable,v.O.filter(v.P.not(v.Str.isEmpty)),v.E.fromOption(()=>null),v.E.chain(v.flow($b.json.parse,v.E.mapLeft(o=>({message:"Error while parsing JSON.",originalError:v.some(o)})),v.E.chain(o=>v.pipe(v.E.tryCatch(()=>t(o),i=>i),v.E.flatten,v.E.mapLeft(i=>({message:"Format is invalid.",originalError:v.some(i)})))),v.E.map(n),v.E.doIfLeft(o=>()=>{console.log(e,o.message,...v.pipe(o.originalError,v.RA.fromOption,v.RA.prepend("Additional information:")))}),v.E.mapLeft(o=>b.jsx(Mb,{type:"warning",title:e+" definition is invalid and was ignored",message:b.jsxs(b.Fragment,{children:[o.message,v.O.isSome(o.originalError)&&b.jsxs(b.Fragment,{children:[b.jsx("br",{}),b.jsx("div",{children:"See developer console for more information."})]})]})}))))),[r])}const{summon:pp}=au({}),x_=pp(e=>e.interface({attributeId:ls(e),name:e.array(e.interface({localeCode:e.string(),translation:e.string()},"Name"))},"AttributeLocalization")),CB=pp(e=>e.intersection(x_(e),e.interface({choiceValueId:e.string()},""))("ChoiceValueLocalization")),SB=pp(e=>e.interface({attributes:e.optional(e.array(x_(e))),choiceValues:e.optional(e.array(CB(e)))},"RawLocalization"));function ub(e){return{...v_(e.attributeId),name:v.pipe(e.name,v.RA.map(t=>t),v.RA.toArray)}}function TB(e){const t=v.pipe(e.attributes??v.RA.empty,v.RA.map(ub),v.RA.toArray),n=v.pipe(e.choiceValues??v.RA.empty,v.RA.map(r=>({...ub(r),choiceValueId:r.choiceValueId})),v.RA.toArray);return{attributes:t,choiceValues:n}}const AB=dp("Localization",SB.create,TB),IB=AB,{summon:__}=au({}),sb=__(e=>e.interface({regex:e.string(),direction:e.keysOf({asc:null,desc:null}),mode:e.keysOf({isMatch:null,string:null,numeric:null}),description:e.optional(e.string())},"SortingRule")),OB=__(e=>e.interface({defaultRules:e.array(sb(e)),attributes:e.array(e.interface({attributeId:ls(e),choiceValues:e.array(e.string()),rules:e.array(sb(e))},""))},"RawChoiceValueSorting"));function PB(e){const t=v.pipe(e.defaultRules??[],v.RA.map(r=>r),v.RA.toArray);return{attributes:v.pipe(e.attributes??[],v.RA.map(r=>({...v_(r.attributeId),choiceValues:v.RA.toArray(r.choiceValues),rules:v.pipe(r.rules,v.RA.map(o=>o),v.RA.toArray)})),v.RA.toArray),defaultRules:t}}const NB=dp("ChoiceValueSorting",OB.create,PB),jB=NB,{summon:w_}=au({}),$B=w_(e=>e.interface({attributeId:ls(e),decisions:e.array(ls(e))},"DecisionToRespect")),EB=w_(e=>e.array($B(e))),MB=dp("AttributeRelations",EB.create,v.identity),kB=MB,C_=it(e=>{var O,U,E;const{hcaBaseUrl:t,sessionCreation:n,accessToken:r,sessionCreateUrl:o,sessionDeleteUrl:i,deploymentName:a,channel:u,children:s,explainDialogProps:c,explainPopoverProps:f,explainConstraints:l}=e,{activeLocale:d}=x.useLocaleInfo(),p=d.code;if(I.useEffect(()=>{console.info("Current locale code:",p)},[p]),_e())return b.jsxs(b.Fragment,{children:[s,b.jsx(Gu,{singletonId:"Configuration",children:b.jsx(Sp,{})})]});const h=kB((O=e.attributeRelations)==null?void 0:O.jsonDefinition),m=I.useMemo(()=>v.pipe(h,v.O.fromEither,v.O.toNullable),[h]),g=jB((U=e.choiceValueSorting)==null?void 0:U.jsonDefinition),w=I.useMemo(()=>v.pipe(g,v.E.orElse(()=>v.pipe(e.choiceValueSorting,v.E.fromNullable(null))),v.E.getOrElse(()=>({attributes:[],defaultRules:[]}))),[g,e.choiceValueSorting]),N=IB((E=e.localization)==null?void 0:E.jsonDefinition),T=I.useMemo(()=>v.pipe(N,v.E.getOrElse(()=>({attributes:[],choiceValues:[]}))),[N]),A=I.useMemo(()=>({apiBaseUrl:rC(t,"api","engine"),sessionInitialisationOptions:H.match(n).with("client-side",()=>({accessToken:r})).with("server-side",()=>({sessionCreateUrl:o})).exhaustive(),configurationModelSource:{type:_.ConfigurationModelSourceType.Channel,channel:u,deploymentName:a},attributeRelations:m,allowedInExplain:{rules:{type:_.AllowedRulesInExplainType.all}}}),[t,n,r,o,i,u,a,m]);return b.jsxs(b.Fragment,{children:[b.jsxs(ce.Configuration,{sessionContext:A,children:[v.pipe(N,v.E.swap,v.O.fromEither,v.O.toNullable),v.pipe(g,v.E.swap,v.O.fromEither,v.O.toNullable),v.pipe(h,v.E.swap,v.O.fromEither,v.O.toNullable),b.jsx(NC,{...e}),b.jsx(I.Suspense,{children:b.jsx(hs.Provider,{value:T,children:b.jsxs(rA,{explainConstraints:l,children:[b.jsx(Yf.Provider,{value:f,children:b.jsx($v.Provider,{value:w,children:s})}),b.jsx(YT,{...c})]})})})]}),b.jsx(Gu,{singletonId:"Configuration",children:b.jsx(Sp,{})})]})}),FB=C_;x.addPropertyControls(C_,{children:{title:"Content",type:x.ControlType.ComponentInstance},channel:{type:x.ControlType.String,title:"Channel",defaultValue:"release"},deploymentName:{type:x.ControlType.String,title:"Deployment Name"},hcaBaseUrl:{title:"HCA Base URL",type:x.ControlType.String,defaultValue:"https://spc.cloud.ceventis.de/hca"},sessionCreation:{title:"Session Creation",type:x.ControlType.Enum,displaySegmentedControl:!0,segmentedControlDirection:"horizontal",defaultValue:"client-side",options:["client-side","server-side"]},accessToken:{title:"HCA Access Token",type:x.ControlType.String,obscured:!0,hidden:e=>e.sessionCreation!=="client-side"},sessionCreateUrl:{title:"Create Session URl",type:x.ControlType.String,hidden:e=>e.sessionCreation!=="server-side"},sessionDeleteUrl:{title:"Close Session URl",type:x.ControlType.String,hidden:e=>e.sessionCreation!=="server-side"},configurationModelNotFoundContent:{title:"Content – Configuration Model not found",type:x.ControlType.ComponentInstance},errorContent:{title:"Content – Error",type:x.ControlType.ComponentInstance},accessTokenInvalidContent:{title:"Content – HCA Access Token invalid",type:x.ControlType.ComponentInstance},accessTokenRestrictionContent:{title:"Content – HCA Access Token restriction",type:x.ControlType.ComponentInstance},explainDialogProps:{title:"Explain Dialog",type:x.ControlType.Object,optional:!1,controls:DC,buttonTitle:"Props…"},explainPopoverProps:{title:"Explain Popover",type:x.ControlType.Object,optional:!1,controls:UC,buttonTitle:"Props…"},explainConstraints:{title:"Explain Constraints",type:x.ControlType.Boolean,defaultValue:!1},attributeRelations:{title:"Attribute Relations",type:x.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{jsonDefinition:{title:"Definition – JSON",type:x.ControlType.String,displayTextArea:!0}}},...cA,...TA});const S_={padding:{type:x.ControlType.FusedNumber,title:"Padding",toggleKey:"isMixedPadding",toggleTitles:["Padding","Padding per Side"],valueKeys:["paddingTop","paddingRight","paddingBottom","paddingLeft"],valueLabels:["Top","Right","Bottom","Left"],min:0,defaultValue:0}},RB=e=>({paddingTop:e.isMixedPadding?e.paddingTop:e.padding,paddingRight:e.isMixedPadding?e.paddingRight:e.padding,paddingBottom:e.isMixedPadding?e.paddingBottom:e.padding,paddingLeft:e.isMixedPadding?e.paddingLeft:e.padding}),VB={radius:{title:"Radius",type:x.ControlType.Number,defaultValue:6},...S_,border:{title:"Border",type:x.ControlType.Object,controls:{color:{type:x.ControlType.Color,title:"Color"},width:{type:x.ControlType.FusedNumber,title:"Width",toggleKey:"isMixedWidth",toggleTitles:["Width","Width per Side"],valueKeys:["widthTop","widthRight","widthBottom","widthLeft"],valueLabels:["Top","Right","Bottom","Left"],min:0,defaultValue:0}}}},UB=e=>{var t,n,r,o,i,a,u,s,c,f,l,d,p;return{borderRadius:e.radius,borderColor:(t=e.border)==null?void 0:t.color,borderTopWidth:(n=e.border)!=null&&n.isMixedWidth?(r=e.border)==null?void 0:r.widthTop:(o=e.border)==null?void 0:o.width,borderRightWidth:(i=e.border)!=null&&i.isMixedWidth?(a=e.border)==null?void 0:a.widthRight:(u=e.border)==null?void 0:u.width,borderBottomWidth:(s=e.border)!=null&&s.isMixedWidth?(c=e.border)==null?void 0:c.widthBottom:(f=e.border)==null?void 0:f.width,borderLeftWidth:(l=e.border)!=null&&l.isMixedWidth?(d=e.border)==null?void 0:d.widthLeft:(p=e.border)==null?void 0:p.width}},DB={fill:{title:"Fill",type:x.ControlType.Color,defaultValue:"#EBEBEB"},...S_,...VB},qB=e=>({...RB(e),...UB(e),backgroundColor:e.fill}),LB={color:{title:"Color",type:x.ControlType.Color,defaultValue:"black"},text:{title:"Text",type:x.ControlType.Font,controls:"basic",displayTextAlignment:!0,displayFontSize:!0}},BB=e=>({...e.text,color:e.color}),wo={explain:{title:"Explain",type:x.ControlType.Enum,defaultValue:"popover",options:["popover","dialog","disabled"]}},Xf={type:x.ControlType.Object,optional:!0,controls:{fill:{title:"Fill",type:x.ControlType.Color,optional:!0},color:{title:"Color",type:x.ControlType.Color,optional:!0},borderColor:{title:"Border Color",type:x.ControlType.Color,optional:!0}}},T_={...Xe,...LB,...DB,implicitLabelPrefix:{title:"Implicit Label Prefix",type:x.ControlType.String,defaultValue:"Implicit: "},unsatisfiedColors:{...Xf,title:"Unsatisfied Colors"},implicitSelectedColors:{...Xf,title:"Implicit Selected Colors"},...wo},Zf=(e,t,n)=>{var i,a,u,s,c,f;const r=qB(e),o=BB(e);return{...r,...o,backgroundColor:H.match({isSatisfied:t,isImplicitSelected:n,unsatisfiedFill:(i=e.unsatisfiedColors)==null?void 0:i.fill,implicitSelectedFill:(a=e.implicitSelectedColors)==null?void 0:a.fill}).with({isSatisfied:!1,unsatisfiedFill:H.P.string.minLength(1)},l=>l.unsatisfiedFill).with({isImplicitSelected:!0,implicitSelectedFill:H.P.string.minLength(1)},l=>l.implicitSelectedFill).otherwise(()=>r.backgroundColor),borderColor:H.match({isSatisfied:t,isImplicitSelected:n,unsatisfiedBorderColor:(u=e.unsatisfiedColors)==null?void 0:u.borderColor,implicitSelectedBorderColor:(s=e.implicitSelectedColors)==null?void 0:s.borderColor}).with({isSatisfied:!1,unsatisfiedBorderColor:H.P.string.minLength(1)},l=>l.unsatisfiedBorderColor).with({isImplicitSelected:!0,implicitSelectedBorderColor:H.P.string.minLength(1)},l=>l.implicitSelectedBorderColor).otherwise(()=>r.borderColor),color:H.match({isSatisfied:t,isImplicitSelected:n,unsatisfiedColor:(c=e.unsatisfiedColors)==null?void 0:c.color,implicitSelectedColor:(f=e.implicitSelectedColors)==null?void 0:f.color}).with({isSatisfied:!1,unsatisfiedColor:H.P.string.minLength(1)},l=>l.unsatisfiedColor).with({isImplicitSelected:!0,implicitSelectedColor:H.P.string.minLength(1)},l=>l.implicitSelectedColor).otherwise(()=>o.color),...e.style}},hp={...T_,resetLabel:{title:"Reset Label",type:x.ControlType.String,defaultValue:"Reset"},blockedLabel:{title:"Blocked Label",type:x.ControlType.String,defaultValue:"Blocked"},appearance:{title:"Appearance",type:x.ControlType.Enum,defaultValue:"auto",displaySegmentedControl:!0,segmentedControlDirection:"horizontal",options:["auto","none"]}},Kr=(e,t,n)=>({...Zf(e,t,n),appearance:e.appearance});function kt(){const{explain:e,handleExplainAnswer:t}=I.useContext(vi);return{explain:e,handleExplainAnswer:t}}function zB(e={}){const{initialOpen:t=!1,placement:n="top",modal:r=!1,open:o,onOpenChange:i,arrow:a}=e,[u,s]=I.useState(t),c=o??u,f=i??s,l=_v({placement:n,open:c,onOpenChange:f,whileElementsMounted:zS,middleware:[IS(((a==null?void 0:a.height)??0)+5),GS({crossAxis:n.includes("-"),fallbackAxisSideDirection:"end",padding:5}),WS({padding:5}),...a?[HS(a)]:[]]}),d=l.context,p=vv(d,{enabled:o==null}),y=xv(d),h=wv([p,y]);return I.useMemo(()=>({open:c,setOpen:f,...h,...l,modal:r,arrow:a}),[c,f,h,l,r,a])}const A_=I.createContext(null),uu=()=>{const e=I.useContext(A_);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e};function WB({children:e,...t}){const n=zB(t);return b.jsx(A_.Provider,{value:n,children:e})}const GB=I.forwardRef(function(t,n){const r=I.Children.toArray(t.children)[0],o=uu(),i=t.children.ref,a=ld([o.refs.setReference,n,i]);return I.isValidElement(r)?I.cloneElement(r,o.getReferenceProps({ref:a,...t,...r.props,"data-state":o.open?"open":"closed"})):b.jsx("span",{children:"Not valid children for PopoverTrigger"})}),KB=GB,HB=G.div`
279
332
  display: flex;
280
333
  justify-content: center;
281
334
 
@@ -284,7 +337,7 @@
284
337
  @container explain-actions (min-width: 300px) {
285
338
  justify-content: start;
286
339
  }
287
- `,Xs=k.button`
340
+ `,JB=G.button`
288
341
  color: inherit;
289
342
  font-size: 0.9em;
290
343
  font-family: var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif);
@@ -301,11 +354,11 @@
301
354
  outline: 2px solid var(--color-explain-popover-show-more-button-outline);
302
355
  outline-offset: 1px;
303
356
  }
304
- `;function Gs(){const{decisionExplanations:e,switchMode:t}=ye(),{showConstraintsButtonCaption:n,showMoreButtonCaption:o}=Bt(),i=e.length-1,r=T.useMemo(()=>i>0&&ki.render(o,{amount:i}),[o,i]);return d.jsx(Ys,{children:d.jsxs(Xs,{onClick:()=>t("dialog"),children:[i>0&&d.jsx("span",{children:r}),i===0&&d.jsx("span",{children:n})]})})}const Js=k.div`
357
+ `;function QB(){const{decisionExplanations:e,switchMode:t}=Zt(),{showConstraintsButtonCaption:n,showMoreButtonCaption:r}=ed(),o=e.length-1,i=I.useMemo(()=>o>0&&xC.render(r,{amount:o}),[r,o]);return b.jsx(HB,{children:b.jsxs(JB,{onClick:()=>t("dialog"),children:[o>0&&b.jsx("span",{children:i}),o===0&&b.jsx("span",{children:n})]})})}const XB=G.div`
305
358
  font-weight: 500;
306
359
  font-family: var(--font-heading);
307
360
  margin-bottom: var(--space-xs);
308
- `,jn=k.div`
361
+ `,cb=G.div`
309
362
  height: 1px;
310
363
  background-color: var(--color-explain-popover-list-separator);
311
364
  margin-left: -1.1em;
@@ -314,9 +367,9 @@
314
367
  @media only screen and (min-resolution: 2dppx) {
315
368
  height: 0.5px;
316
369
  }
317
- `,Zs=k.div`
370
+ `,ZB=G.div`
318
371
  container: explain-actions / inline-size;
319
- `,ea=k(ro)`
372
+ `,YB=G(Db)`
320
373
  display: grid;
321
374
  grid-template-columns: [name] minmax(100px, auto) [values] minmax(100px, 1fr);
322
375
  gap: var(--space-sm);
@@ -326,7 +379,7 @@
326
379
  margin-right: -1.1em;
327
380
  overflow: auto;
328
381
  max-height: 200px;
329
- `,ta=k(eo)`
382
+ `,e6=G(kb)`
330
383
  border-radius: 360px;
331
384
  background-color: var(--color-explain-popover-apply-solution-button-fill);
332
385
  color: var(--color-explain-popover-apply-solution-button-color);
@@ -349,10 +402,10 @@
349
402
  @container explain-actions (min-width: 300px) {
350
403
  width: auto;
351
404
  }
352
- `,Tt=k(so)`
405
+ `,_f=G(Lb)`
353
406
  width: min-content;
354
407
  min-width: 300px;
355
- `;function na(){const{decisionExplanations:e,constraintExplanations:t,hasError:n}=ye(),{solutionTitle:o,applySolutionButtonCaption:i}=Bt();if(n)return d.jsx(Tt,{variant:"failedToExplain"});const r=e[0];if(!r)return d.jsx(Tt,{variant:"noExplanationFound"});if(!r.solution)return d.jsx(Tt,{variant:"noSolutionFound"});const l=r.solution.decisions.filter(s=>s.state!=null);return d.jsxs(d.Fragment,{children:[d.jsx(Js,{children:o}),d.jsx(jn,{}),d.jsx(ea,{blockingDecisions:r.causedByDecisions,desiredDecisions:l}),d.jsx(jn,{}),d.jsxs(Zs,{children:[d.jsx(ta,{explanation:r,children:i}),(e.length>1||t.length>0)&&d.jsx(Gs,{})]})]})}const oi=T.createContext(null),ae=()=>T.useContext(oi);function tn(e){return T.forwardRef((t,n)=>{const o=T.useId();return d.jsx(oi.Provider,{value:o,children:d.jsx(e,{...t,ref:n})})})}const oa=T.forwardRef((e,t)=>{const{style:n,children:o,...i}=e,r=Qe(),l=Yt([r.refs.setFloating,t]);return d.jsx(Fo,{children:d.jsx(Lo,{context:r.context,modal:r.modal,children:d.jsx("div",{ref:l,style:{...r.floatingStyles,...n},...r.getFloatingProps(i),children:o})})})}),ia=oa,ra=T.forwardRef((e,t)=>{const{setOpen:n}=Qe();return d.jsx("button",{type:"button",ref:t,...e,onClick:o=>{var i;(i=e.onClick)==null||i.call(e,o),n(!1)}})}),la=ra,sa=k.div`
408
+ `;function t6(){const{decisionExplanations:e,constraintExplanations:t,hasError:n}=Zt(),{solutionTitle:r,applySolutionButtonCaption:o}=ed();if(n)return b.jsx(_f,{variant:"failedToExplain"});const i=e[0];if(!i)return b.jsx(_f,{variant:"noExplanationFound"});if(!i.solution)return b.jsx(_f,{variant:"noSolutionFound"});const a=i.solution.decisions.filter(u=>u.state!=null);return b.jsxs(b.Fragment,{children:[b.jsx(XB,{children:r}),b.jsx(cb,{}),b.jsx(YB,{blockingDecisions:i.causedByDecisions,desiredDecisions:a}),b.jsx(cb,{}),b.jsxs(ZB,{children:[b.jsx(e6,{explanation:i,children:o}),(e.length>1||t.length>0)&&b.jsx(QB,{})]})]})}const I_=I.createContext(null),st=()=>I.useContext(I_);function yp(e){return I.forwardRef((t,n)=>{const r=I.useId();return b.jsx(I_.Provider,{value:r,children:b.jsx(e,{...t,ref:n})})})}const n6=I.forwardRef((e,t)=>{const{style:n,children:r,...o}=e,i=uu(),a=ld([i.refs.setFloating,t]);return b.jsx(yv,{children:b.jsx(gv,{context:i.context,modal:i.modal,children:b.jsx("div",{ref:a,style:{...i.floatingStyles,...n},...i.getFloatingProps(o),children:r})})})}),r6=n6,o6=I.forwardRef((e,t)=>{const{setOpen:n}=uu();return b.jsx("button",{type:"button",ref:t,...e,onClick:r=>{var o;(o=e.onClick)==null||o.call(e,r),n(!1)}})}),i6=o6,a6=G.div`
356
409
  position: relative;
357
410
  background-color: var(--color-explain-popover-fill);
358
411
  color: var(--color-explain-popover-color);
@@ -363,7 +416,7 @@
363
416
  font-family: var(--font-primary);
364
417
  min-width: 300px;
365
418
  max-width: 500px;
366
- `,aa=k(la)`
419
+ `,u6=G(i6)`
367
420
  position: absolute;
368
421
  right: var(--space-sm-fixed);
369
422
  top: var(--space-sm-fixed);
@@ -378,7 +431,7 @@
378
431
  outline: 2px solid var(--color-explain-popover-close-button-outline);
379
432
  outline-offset: 1px;
380
433
  }
381
- `,ca=k(_o)`
434
+ `,s6=G(Iv)`
382
435
  font-size: var(--text-md);
383
436
  font-weight: 500;
384
437
  font-family: var(--font-heading);
@@ -388,7 +441,7 @@
388
441
  white-space: nowrap;
389
442
  text-overflow: ellipsis;
390
443
  margin-right: var(--space-md);
391
- `;function ua(e){return d.jsxs(sa,{children:[d.jsx(ca,{}),e.children,d.jsx(aa,{children:d.jsx(et.FontAwesomeIcon,{icon:Ze.faXmark})})]})}const da=k(ia)`
444
+ `;function c6(e){return b.jsxs(a6,{children:[b.jsx(s6,{}),e.children,b.jsx(u6,{children:b.jsx(Vu.FontAwesomeIcon,{icon:Ru.faXmark})})]})}const l6=G(r6)`
392
445
  --color-explain-attribute-value-fill: ${e=>e.attributeValueFill};
393
446
  --color-explain-attribute-value-add-fill: ${e=>e.attributeValueAddFill};
394
447
  --color-explain-attribute-value-add-color: ${e=>e.attributeValueAddColor};
@@ -410,31 +463,31 @@
410
463
  &:focus {
411
464
  outline: none;
412
465
  }
413
- `,fa=k(Dl)`
466
+ `,f6=G(vT)`
414
467
  fill: var(--color-explain-popover-fill);
415
- `,pa={initial:{opacity:0,scale:0},open:{opacity:1,scale:1,transition:{type:"spring",stiffness:600,damping:40}},close:{opacity:0,scale:0,transition:{duration:.2,ease:"cubicInOut"}}};function ha(e){const t=ye(),n=ae(),o=(t==null?void 0:t.displayMode)==="popover"&&(t==null?void 0:t.controlId)===n,i=T.useRef(null);return d.jsxs(Us,{open:o,onOpenChange:r=>!r&&o&&(t==null?void 0:t.dismiss()),arrow:{width:20,height:10,padding:10,element:i},children:[d.jsx(Qs,{children:e.children}),d.jsxs(ma,{isOpen:o,children:[T.Children.toArray(e.content)[0]??d.jsx(ua,{children:d.jsx(na,{})}),d.jsx(ya,{})]})]})}function ma(e){var g,u;const t=Bt(),{middlewareData:n,arrow:o,placement:i}=Qe(),r=((g=n.arrow)==null?void 0:g.x)??0,l=((u=n.arrow)==null?void 0:u.y)??0,s=(o==null?void 0:o.height)??0,a=(o==null?void 0:o.width)??0,c=r+a/2,x=l+s,h=M.match(i).with("top",()=>`${c}px calc(100% + ${s+5}px)`).with("bottom",()=>`${c}px ${-s-5}px`).with("left",()=>`calc(100% + ${s}px) ${x}px`).with("right",()=>`${-s}px ${x}px`).otherwise(()=>"");return d.jsx(f.AnimatePresence,{initial:!1,children:e.isOpen&&d.jsx(da,{...t,children:d.jsx(f.motion.div,{variants:pa,initial:"initial",animate:"open",exit:"close",style:{transformOrigin:h},children:d.jsx(Uo,{children:e.children})})})})}function ya(){const{context:e,arrow:t}=Qe();return d.jsx(fa,{ref:t.element,context:e,width:t.width,height:t.height})}function ga(e){return T.forwardRef((t,n)=>{const o=G();return t.explain!=="popover"||o?d.jsx(e,{...t}):d.jsx(ha,{children:d.jsx(e,{...t,ref:n})})})}function fe(e){return se(tn(ga(T.forwardRef(e))))}function ue(){alert(`Failed to apply your selection.
416
- Please check your internet connection and try again.`)}function ba(){alert(`Failed to reset your configuration.
417
- Please check your internet connection and try again.`)}const Fn=k.select`
468
+ `,d6={initial:{opacity:0,scale:0},open:{opacity:1,scale:1,transition:{type:"spring",stiffness:600,damping:40}},close:{opacity:0,scale:0,transition:{duration:.2,ease:"cubicInOut"}}};function p6(e){const t=Zt(),n=st(),r=(t==null?void 0:t.displayMode)==="popover"&&(t==null?void 0:t.controlId)===n,o=I.useRef(null);return b.jsxs(WB,{open:r,onOpenChange:i=>!i&&r&&(t==null?void 0:t.dismiss()),arrow:{width:20,height:10,padding:10,element:o},children:[b.jsx(KB,{children:e.children}),b.jsxs(h6,{isOpen:r,children:[I.Children.toArray(e.content)[0]??b.jsx(c6,{children:b.jsx(t6,{})}),b.jsx(y6,{})]})]})}function h6(e){var d,p;const t=ed(),{middlewareData:n,arrow:r,placement:o}=uu(),i=((d=n.arrow)==null?void 0:d.x)??0,a=((p=n.arrow)==null?void 0:p.y)??0,u=(r==null?void 0:r.height)??0,s=(r==null?void 0:r.width)??0,c=i+s/2,f=a+u,l=H.match(o).with("top",()=>`${c}px calc(100% + ${u+5}px)`).with("bottom",()=>`${c}px ${-u-5}px`).with("left",()=>`calc(100% + ${u}px) ${f}px`).with("right",()=>`${-u}px ${f}px`).otherwise(()=>"");return b.jsx(x.AnimatePresence,{initial:!1,children:e.isOpen&&b.jsx(l6,{...t,children:b.jsx(x.motion.div,{variants:d6,initial:"initial",animate:"open",exit:"close",style:{transformOrigin:l},children:b.jsx(Av,{children:e.children})})})})}function y6(){const{context:e,arrow:t}=uu();return b.jsx(f6,{ref:t.element,context:e,width:t.width,height:t.height})}function m6(e){return I.forwardRef((t,n)=>{const r=_e();return t.explain!=="popover"||r?b.jsx(e,{...t}):b.jsx(p6,{children:b.jsx(e,{...t,ref:n})})})}function Ft(e){return it(yp(m6(I.forwardRef(e))))}function wt(){alert(`Failed to apply your selection.
469
+ Please check your internet connection and try again.`)}function g6(){alert(`Failed to reset your configuration.
470
+ Please check your internet connection and try again.`)}const lb=G.select`
418
471
  color: inherit;
419
472
  cursor: inherit;
420
- `,Nn="<reset>",Ln="<nothing>",ii=fe((e,t)=>{if(G()){const A=Fe(e,!0,!1);return d.jsx(Fn,{style:A})}const o=ae(),i=J(e),r=_.useChoiceAttribute(i);if(!r)return d.jsx("span",{children:"Choice Attribute not found"});const{explain:l}=de(),s=ze(i),{attribute:a,makeDecision:c,clearDecisions:x,isMultiSelect:h,getIncludedChoiceValues:g,getBlockedChoiceValues:u,getAllowedChoiceValues:b}=r,w=ct(i,s,b()),m=ct(i,s,u()),y=g(),C=y.map(A=>A.id),P=C[0]??Ln,S=y.some(A=>{var N;return((N=A.decision)==null?void 0:N.kind)===p.DecisionKind.Explicit}),R=C.length>=1,I=y.some(A=>{var N;return((N=A.decision)==null?void 0:N.kind)===p.DecisionKind.Implicit}),V=w.length===0,D=async A=>{const N=e.explain,B=N!=="disabled"&&(()=>l(W=>W.whyIsStateNotPossible.choice(a.id).choiceValue(A).state(p.ChoiceValueDecisionState.Included),N,o));if(A===Nn)try{await x()}catch{ue()}else if(w.some(W=>W.id===A)){const W=C.some(H=>H===A)?void 0:p.ChoiceValueDecisionState.Included;try{await c(A,W)}catch(H){if(H.type===p.ConfiguratorErrorType.ConflictWithConsequence&&B){await B();return}ue()}}else m.some(W=>W.id===A)&&B&&await B()},F=va(e,a.isSatisfied,I,V);return d.jsxs(Fn,{ref:t,value:h()?C:P,multiple:h(),onChange:A=>D(A.currentTarget.value),style:F,children:[!R&&!h()&&d.jsx("option",{value:Ln}),S&&d.jsx("option",{value:Nn,children:e.resetLabel}),w.map(A=>{var N;return d.jsxs("option",{value:A.id,children:[((N=A.decision)==null?void 0:N.kind)===p.DecisionKind.Implicit?e.implicitLabelPrefix:"",s.get(A.id)??A.id]},A.id)}),m.length>0&&d.jsx("optgroup",{label:e.blockedLabel,children:m.map(A=>d.jsx("option",{value:A.id,children:s.get(A.id)??A.id},A.id))})]})}),xa=ii,Ca={...en,noOptionsAvailableColors:{...Nt,title:"No Options Available Colors"}};f.addPropertyControls(ii,Ca);const va=(e,t,n,o)=>{var r,l,s;const i=Fe(e,t,n);return{...i,backgroundColor:M.match({noOptionsAvailable:o,noOptionsAvailableFill:(r=e.noOptionsAvailableColors)==null?void 0:r.fill}).with({noOptionsAvailable:!0,noOptionsAvailableFill:M.P.string.minLength(1)},a=>a.noOptionsAvailableFill).otherwise(()=>i.backgroundColor),borderColor:M.match({noOptionsAvailable:o,noOptionsAvailableBorderColor:(l=e.noOptionsAvailableColors)==null?void 0:l.borderColor}).with({noOptionsAvailable:!0,noOptionsAvailableBorderColor:M.P.string.minLength(1)},a=>a.noOptionsAvailableBorderColor).otherwise(()=>i.borderColor),color:M.match({noOptionsAvailable:o,noOptionsAvailableColor:(s=e.noOptionsAvailableColors)==null?void 0:s.color}).with({noOptionsAvailable:!0,noOptionsAvailableColor:M.P.string.minLength(1)},a=>a.noOptionsAvailableColor).otherwise(()=>i.color)}},Mn=k.select`
473
+ `,fb="<reset>",db="<nothing>",O_=Ft((e,t)=>{if(_e()){const S=Kr(e,!0,!1);return b.jsx(lb,{style:S})}const r=st(),o=Te(e),i=ce.useChoiceAttribute(o);if(!i)return b.jsx("span",{children:"Choice Attribute not found"});const{explain:a}=kt(),u=Ei(o),{attribute:s,makeDecision:c,clearDecisions:f,isMultiSelect:l,getIncludedChoiceValues:d,getBlockedChoiceValues:p,getAllowedChoiceValues:y}=i,h=Ku(o,u,y()),m=Ku(o,u,p()),g=d(),w=g.map(S=>S.id),N=w[0]??db,T=g.some(S=>{var $;return(($=S.decision)==null?void 0:$.kind)===_.DecisionKind.Explicit}),A=w.length>=1,O=g.some(S=>{var $;return(($=S.decision)==null?void 0:$.kind)===_.DecisionKind.Implicit}),U=h.length===0,E=async S=>{const $=e.explain,z=$!=="disabled"&&(()=>a(R=>R.whyIsStateNotPossible.choice(s.id).choiceValue(S).state(_.ChoiceValueDecisionState.Included),$,r));if(S===fb)try{await f()}catch{wt()}else if(h.some(R=>R.id===S)){const R=w.some(k=>k===S)?void 0:_.ChoiceValueDecisionState.Included;try{await c(S,R)}catch(k){if(k.type===_.ConfiguratorErrorType.ConflictWithConsequence&&z){await z();return}wt()}}else m.some(R=>R.id===S)&&z&&await z()},W=x6(e,s.isSatisfied,O,U);return b.jsxs(lb,{ref:t,value:l()?w:N,multiple:l(),onChange:S=>E(S.currentTarget.value),style:W,children:[!A&&!l()&&b.jsx("option",{value:db}),T&&b.jsx("option",{value:fb,children:e.resetLabel}),h.map(S=>{var $;return b.jsxs("option",{value:S.id,children:[(($=S.decision)==null?void 0:$.kind)===_.DecisionKind.Implicit?e.implicitLabelPrefix:"",u.get(S.id)??S.id]},S.id)}),m.length>0&&b.jsx("optgroup",{label:e.blockedLabel,children:m.map(S=>b.jsx("option",{value:S.id,children:u.get(S.id)??S.id},S.id))})]})}),b6=O_,v6={...hp,noOptionsAvailableColors:{...Xf,title:"No Options Available Colors"}};x.addPropertyControls(O_,v6);const x6=(e,t,n,r)=>{var i,a,u;const o=Kr(e,t,n);return{...o,backgroundColor:H.match({noOptionsAvailable:r,noOptionsAvailableFill:(i=e.noOptionsAvailableColors)==null?void 0:i.fill}).with({noOptionsAvailable:!0,noOptionsAvailableFill:H.P.string.minLength(1)},s=>s.noOptionsAvailableFill).otherwise(()=>o.backgroundColor),borderColor:H.match({noOptionsAvailable:r,noOptionsAvailableBorderColor:(a=e.noOptionsAvailableColors)==null?void 0:a.borderColor}).with({noOptionsAvailable:!0,noOptionsAvailableBorderColor:H.P.string.minLength(1)},s=>s.noOptionsAvailableBorderColor).otherwise(()=>o.borderColor),color:H.match({noOptionsAvailable:r,noOptionsAvailableColor:(u=e.noOptionsAvailableColors)==null?void 0:u.color}).with({noOptionsAvailable:!0,noOptionsAvailableColor:H.P.string.minLength(1)},s=>s.noOptionsAvailableColor).otherwise(()=>o.color)}},pb=G.select`
421
474
  color: inherit;
422
475
  cursor: inherit;
423
- `,Bn="<reset>",Et="<nothing>",At="yes",$n="no",ri=fe((e,t)=>{var C,P,S;if(G()){const R=Fe(e,!0,!1);return d.jsx(Mn,{style:R})}const o=ae(),i=J(e),r=_.useBooleanAttribute(i),{explain:l}=de();if(!r)return d.jsx("span",{children:"Boolean Attribute not found"});const{attribute:s,makeDecision:a}=r,c=async R=>{var V;const I=((V=s.decision)==null?void 0:V.kind)===p.DecisionKind.Explicit;if(R===Bn&&I)try{await a(void 0)}catch{ue()}else{const D=R===At,F=s.possibleDecisionStates.includes(D),A=e.explain,N=A!=="disabled"&&(()=>l(B=>B.whyIsStateNotPossible.boolean(s.id).state(D),A,o));if(F)try{await a(D)}catch(B){if(B.type===p.ConfiguratorErrorType.ConflictWithConsequence&&N){await N();return}ue()}else N&&await N()}},x=M.match((C=s.decision)==null?void 0:C.state).with(!0,()=>At).with(!1,()=>$n).otherwise(()=>Et),h=((P=s.decision)==null?void 0:P.kind)===p.DecisionKind.Explicit,g=((S=s.decision)==null?void 0:S.kind)===p.DecisionKind.Implicit,u=Fe(e,s.isSatisfied,g),b=s.possibleDecisionStates.includes(!0),w=s.possibleDecisionStates.includes(!1),m=d.jsxs("option",{value:At,children:[Kn(s,!0,e.implicitLabelPrefix),e.trueLabel]}),y=d.jsxs("option",{value:$n,children:[Kn(s,!1,e.implicitLabelPrefix),e.falseLabel]});return d.jsxs(Mn,{ref:t,value:x,onChange:R=>c(R.currentTarget.value),style:u,children:[x===Et&&d.jsx("option",{value:Et}),h&&d.jsx("option",{value:Bn,children:e.resetLabel}),b&&m,w&&y,(!b||!w)&&d.jsxs("optgroup",{label:e.blockedLabel,children:[!b&&m,!w&&y]})]})}),wa=ri,Kn=(e,t,n)=>{var o,i;return((o=e.decision)==null?void 0:o.kind)===p.DecisionKind.Implicit&&((i=e.decision)==null?void 0:i.state)===t?n:""},Sa={...en,trueLabel:{title:"True Label",type:f.ControlType.String,defaultValue:"Yes"},falseLabel:{title:"False Label",type:f.ControlType.String,defaultValue:"No"}};f.addPropertyControls(ri,Sa);const Wn=k.select`
476
+ `,hb="<reset>",wf="<nothing>",Cf="yes",yb="no",P_=Ft((e,t)=>{var w,N,T;if(_e()){const A=Kr(e,!0,!1);return b.jsx(pb,{style:A})}const r=st(),o=Te(e),i=ce.useBooleanAttribute(o),{explain:a}=kt();if(!i)return b.jsx("span",{children:"Boolean Attribute not found"});const{attribute:u,makeDecision:s}=i,c=async A=>{var U;const O=((U=u.decision)==null?void 0:U.kind)===_.DecisionKind.Explicit;if(A===hb&&O)try{await s(void 0)}catch{wt()}else{const E=A===Cf,W=u.possibleDecisionStates.includes(E),S=e.explain,$=S!=="disabled"&&(()=>a(z=>z.whyIsStateNotPossible.boolean(u.id).state(E),S,r));if(W)try{await s(E)}catch(z){if(z.type===_.ConfiguratorErrorType.ConflictWithConsequence&&$){await $();return}wt()}else $&&await $()}},f=H.match((w=u.decision)==null?void 0:w.state).with(!0,()=>Cf).with(!1,()=>yb).otherwise(()=>wf),l=((N=u.decision)==null?void 0:N.kind)===_.DecisionKind.Explicit,d=((T=u.decision)==null?void 0:T.kind)===_.DecisionKind.Implicit,p=Kr(e,u.isSatisfied,d),y=u.possibleDecisionStates.includes(!0),h=u.possibleDecisionStates.includes(!1),m=b.jsxs("option",{value:Cf,children:[mb(u,!0,e.implicitLabelPrefix),e.trueLabel]}),g=b.jsxs("option",{value:yb,children:[mb(u,!1,e.implicitLabelPrefix),e.falseLabel]});return b.jsxs(pb,{ref:t,value:f,onChange:A=>c(A.currentTarget.value),style:p,children:[f===wf&&b.jsx("option",{value:wf}),l&&b.jsx("option",{value:hb,children:e.resetLabel}),y&&m,h&&g,(!y||!h)&&b.jsxs("optgroup",{label:e.blockedLabel,children:[!y&&m,!h&&g]})]})}),_6=P_,mb=(e,t,n)=>{var r,o;return((r=e.decision)==null?void 0:r.kind)===_.DecisionKind.Implicit&&((o=e.decision)==null?void 0:o.state)===t?n:""},w6={...hp,trueLabel:{title:"True Label",type:x.ControlType.String,defaultValue:"Yes"},falseLabel:{title:"False Label",type:x.ControlType.String,defaultValue:"No"}};x.addPropertyControls(P_,w6);const gb=G.select`
424
477
  color: inherit;
425
478
  cursor: inherit;
426
- `,qn="<reset>",Rt="<nothing>",It="included",Pt="excluded",li=fe((e,t)=>{var P,S,R;if(G()){const I=Fe(e,!0,!1);return d.jsx(Wn,{style:I})}const o=ae(),i=J(e),r=_.useComponentAttribute(i),{explain:l}=de();if(!r)return d.jsx("span",{children:"Component Attribute not found"});const{attribute:s,makeDecision:a}=r,c=async I=>{const V=s.possibleDecisionStates.includes(I),D=e.explain,F=D!=="disabled"&&(()=>l(A=>A.whyIsStateNotPossible.component(s.id).state(I),D,o));if(V)try{await a(I)}catch(A){if(A.type===p.ConfiguratorErrorType.ConflictWithConsequence&&F){await F();return}ue()}else F&&await F()},x=async I=>{var D;const V=((D=s.decision)==null?void 0:D.kind)===p.DecisionKind.Explicit;I===qn&&V?await a(void 0):I===It?await c(p.ComponentDecisionState.Included):I===Pt&&await c(p.ComponentDecisionState.Excluded)},h=M.match((P=s.decision)==null?void 0:P.state).with(p.ComponentDecisionState.Included,()=>It).with(p.ComponentDecisionState.Excluded,()=>Pt).otherwise(()=>Rt),g=((S=s.decision)==null?void 0:S.kind)===p.DecisionKind.Explicit,u=((R=s.decision)==null?void 0:R.kind)===p.DecisionKind.Implicit,b=Fe(e,s.isSatisfied,u),w=s.possibleDecisionStates.includes(p.ComponentDecisionState.Included),m=s.possibleDecisionStates.includes(p.ComponentDecisionState.Excluded),y=d.jsxs("option",{value:It,children:[zn(s,p.ComponentDecisionState.Included,e.implicitLabelPrefix),e.includedLabel]}),C=d.jsxs("option",{value:Pt,children:[zn(s,p.ComponentDecisionState.Excluded,e.implicitLabelPrefix),e.excludedLabel]});return d.jsxs(Wn,{ref:t,value:h,onChange:I=>x(I.currentTarget.value),style:b,children:[h===Rt&&d.jsx("option",{value:Rt}),g&&d.jsx("option",{value:qn,children:e.resetLabel}),w&&y,m&&C,(!w||!m)&&d.jsxs("optgroup",{label:e.blockedLabel,children:[!w&&y,!m&&C]})]})}),Ta=li,zn=(e,t,n)=>{var o,i;return((o=e.decision)==null?void 0:o.kind)===p.DecisionKind.Implicit&&((i=e.decision)==null?void 0:i.state)===t?n:""},Ea={...en,includedLabel:{title:"Included Label",type:f.ControlType.String,defaultValue:"Included"},excludedLabel:{title:"Excluded Label",type:f.ControlType.String,defaultValue:"Excluded"}};f.addPropertyControls(li,Ea);function si(e,t,n,o,i=1e3){const[r]=Ni.useForceUpdate(),l=Fi.useDebouncedCallback(g=>{t(g),r()},i),s=T.useRef(n),a=T.useRef(e),c=l.isPending(),x=T.useRef(c);T.useEffect(()=>{e!==a.current&&(a.current=e,c&&(l.cancel(),r()),e!==n&&o(e)),n!==s.current&&(s.current=n,n!==e?(l(n),r()):c&&(l.cancel(),r())),c!==x.current&&(x.current=c,!c&&e!==n&&o(e))},[e,n,l,c]);const h=T.useCallback(()=>{l.isPending()&&l.flush()},[l]);return T.useEffect(()=>()=>h(),[h]),{flush:h}}const Hn=k(ji)`
479
+ `,bb="<reset>",Sf="<nothing>",Tf="included",Af="excluded",N_=Ft((e,t)=>{var N,T,A;if(_e()){const O=Kr(e,!0,!1);return b.jsx(gb,{style:O})}const r=st(),o=Te(e),i=ce.useComponentAttribute(o),{explain:a}=kt();if(!i)return b.jsx("span",{children:"Component Attribute not found"});const{attribute:u,makeDecision:s}=i,c=async O=>{const U=u.possibleDecisionStates.includes(O),E=e.explain,W=E!=="disabled"&&(()=>a(S=>S.whyIsStateNotPossible.component(u.id).state(O),E,r));if(U)try{await s(O)}catch(S){if(S.type===_.ConfiguratorErrorType.ConflictWithConsequence&&W){await W();return}wt()}else W&&await W()},f=async O=>{var E;const U=((E=u.decision)==null?void 0:E.kind)===_.DecisionKind.Explicit;O===bb&&U?await s(void 0):O===Tf?await c(_.ComponentDecisionState.Included):O===Af&&await c(_.ComponentDecisionState.Excluded)},l=H.match((N=u.decision)==null?void 0:N.state).with(_.ComponentDecisionState.Included,()=>Tf).with(_.ComponentDecisionState.Excluded,()=>Af).otherwise(()=>Sf),d=((T=u.decision)==null?void 0:T.kind)===_.DecisionKind.Explicit,p=((A=u.decision)==null?void 0:A.kind)===_.DecisionKind.Implicit,y=Kr(e,u.isSatisfied,p),h=u.possibleDecisionStates.includes(_.ComponentDecisionState.Included),m=u.possibleDecisionStates.includes(_.ComponentDecisionState.Excluded),g=b.jsxs("option",{value:Tf,children:[vb(u,_.ComponentDecisionState.Included,e.implicitLabelPrefix),e.includedLabel]}),w=b.jsxs("option",{value:Af,children:[vb(u,_.ComponentDecisionState.Excluded,e.implicitLabelPrefix),e.excludedLabel]});return b.jsxs(gb,{ref:t,value:l,onChange:O=>f(O.currentTarget.value),style:y,children:[l===Sf&&b.jsx("option",{value:Sf}),d&&b.jsx("option",{value:bb,children:e.resetLabel}),h&&g,m&&w,(!h||!m)&&b.jsxs("optgroup",{label:e.blockedLabel,children:[!h&&g,!m&&w]})]})}),C6=N_,vb=(e,t,n)=>{var r,o;return((r=e.decision)==null?void 0:r.kind)===_.DecisionKind.Implicit&&((o=e.decision)==null?void 0:o.state)===t?n:""},S6={...hp,includedLabel:{title:"Included Label",type:x.ControlType.String,defaultValue:"Included"},excludedLabel:{title:"Excluded Label",type:x.ControlType.String,defaultValue:"Excluded"}};x.addPropertyControls(N_,S6);function j_(e,t,n,r,o=1e3){const[i]=CC.useForceUpdate(),a=wC.useDebouncedCallback(d=>{t(d),i()},o),u=I.useRef(n),s=I.useRef(e),c=a.isPending(),f=I.useRef(c);I.useEffect(()=>{e!==s.current&&(s.current=e,c&&(a.cancel(),i()),e!==n&&r(e)),n!==u.current&&(u.current=n,n!==e?(a(n),i()):c&&(a.cancel(),i())),c!==f.current&&(f.current=c,!c&&e!==n&&r(e))},[e,n,a,c]);const l=I.useCallback(()=>{a.isPending()&&a.flush()},[a]);return I.useEffect(()=>()=>l(),[l]),{flush:l}}const xb=G(_C)`
427
480
  color: inherit;
428
- `,ai=fe((e,t)=>{var C,P;if(G()){const S=Lt(e,!0,!1);return d.jsx(Hn,{style:S})}const o=ae(),i=J(e),r=_.useNumericAttribute(i),{explain:l}=de();if(!r)return d.jsx("span",{children:"Numeric Attribute not found"});const{attribute:s,makeDecision:a}=r,c=((C=s.decision)==null?void 0:C.kind)===p.DecisionKind.Implicit,x=Lt(e,s.isSatisfied,c),h=(P=s.decision)==null?void 0:P.state,[g,u]=T.useState(h),{min:b,max:w}=s.range,y=si(h,async S=>{if(S<b){alert(`The value must be smaller than or equal to ${b}.`);return}if(S>w){alert(`The value must be greater than or equal to ${w}.`);return}try{await a(S)}catch(R){R.type===p.ConfiguratorErrorType.SetDecisionConflict?e.explain!=="disabled"&&await l(D=>D.whyIsStateNotPossible.numeric(s.id).state(S),e.explain,o):ue()}},g,S=>u(S),e.wait);return d.jsx(Hn,{getInputRef:t,thousandsGroupStyle:"thousand",decimalSeparator:e.decimalSeparator,thousandSeparator:e.thousandSeparator,allowNegative:!0,fixedDecimalScale:!0,decimalScale:s.decimalPlaces,allowEmptyFormatting:!1,displayType:"input",placeholder:e.placeholder,prefix:Ra(s,e.implicitLabelPrefix),onBlur:()=>{y.flush()},onKeyPress:S=>{S.key==="Enter"&&y.flush()},onValueChange:S=>u(S.floatValue),value:g??"",style:x})}),Aa=ai,Ra=(e,t)=>{var n;return((n=e.decision)==null?void 0:n.kind)===p.DecisionKind.Implicit?t:""},Ia={...ti,wait:{title:"Debounce Delay",type:f.ControlType.Number,defaultValue:2e3,min:0,unit:"ms"},decimalSeparator:{title:"Decimal Separator",type:f.ControlType.String,defaultValue:",",maxLength:1},thousandSeparator:{title:"Thousand Separator",type:f.ControlType.String,defaultValue:".",maxLength:1},placeholder:{title:"Placeholder",type:f.ControlType.String,defaultValue:""}};f.addPropertyControls(ai,Ia);const Le={choiceValueId:{title:"Choice Value Id",type:f.ControlType.String}};function pe(e,t){return T.Children.map(e,n=>{if(T.isValidElement(n)){const o=Jn(n.props,t);return T.cloneElement(n,o)}return n})}const ci=fe((e,t)=>{if(G())return e.children;const o=ae(),{makeDecision:i}=_.useMakeDecision(),r=J(e),l=e.choiceValueId??"",s=l.length>0,a=_.useAttributes([r],!1)[0],{explain:c}=de();if(!a)return d.jsx("span",{children:"Attribute not found"});const x=a.type===p.AttributeType.Choice,h=a.type===p.AttributeType.Numeric,g=a.type===p.AttributeType.Boolean,u=a.type===p.AttributeType.Component;if(!x&&s)return d.jsx("span",{children:"Attribute is not a Choice Attribute"});if(h)return d.jsx("span",{children:"Numeric Attribute is not supported"});let b=x?a.values.get(l):null;if(s&&b==null)return d.jsx("span",{children:"Choice Value not found"});const w=P=>M.match({state:P,attribute:a}).with({attribute:{type:p.AttributeType.Choice},state:"undefined"},()=>b.decision==null).with({attribute:{type:p.AttributeType.Choice},state:"included"},()=>{var S,R;return((S=b.decision)==null?void 0:S.state)===p.ChoiceValueDecisionState.Included&&((R=b.decision)==null?void 0:R.kind)===p.DecisionKind.Explicit}).with({attribute:{type:p.AttributeType.Choice},state:"excluded"},()=>{var S,R;return((S=b.decision)==null?void 0:S.state)===p.ChoiceValueDecisionState.Excluded&&((R=b.decision)==null?void 0:R.kind)===p.DecisionKind.Explicit}).with({attribute:{type:p.AttributeType.Boolean},state:"undefined"},{attribute:{type:p.AttributeType.Component},state:"undefined"},({attribute:S})=>S.decision==null).with({attribute:{type:p.AttributeType.Boolean},state:"true"},({attribute:S})=>{var R,I;return((R=S.decision)==null?void 0:R.state)===!0&&((I=S.decision)==null?void 0:I.kind)===p.DecisionKind.Explicit}).with({attribute:{type:p.AttributeType.Boolean},state:"false"},({attribute:S})=>{var R,I;return((R=S.decision)==null?void 0:R.state)===!1&&((I=S.decision)==null?void 0:I.kind)===p.DecisionKind.Explicit}).with({attribute:{type:p.AttributeType.Component},state:"included"},({attribute:S})=>{var R,I;return((R=S.decision)==null?void 0:R.state)===p.ComponentDecisionState.Included&&((I=S.decision)==null?void 0:I.kind)===p.DecisionKind.Explicit}).with({attribute:{type:p.AttributeType.Component},state:"excluded"},({attribute:S})=>{var R,I;return((R=S.decision)==null?void 0:R.state)===p.ComponentDecisionState.Excluded&&((I=S.decision)==null?void 0:I.kind)===p.DecisionKind.Explicit}).otherwise(()=>!1),m=P=>M.match({isChoiceAttribute:x,isBooleanAttribute:g,isComponentAttribute:u,state:P}).with({isChoiceAttribute:!0,state:"included"},()=>p.ChoiceValueDecisionState.Included).with({isChoiceAttribute:!0,state:"excluded"},()=>p.ChoiceValueDecisionState.Excluded).with({isBooleanAttribute:!0,state:"true"},()=>!0).with({isBooleanAttribute:!0,state:"false"},()=>!1).with({isComponentAttribute:!0,state:"included"},()=>p.ComponentDecisionState.Included).with({isComponentAttribute:!0,state:"excluded"},()=>p.ComponentDecisionState.Excluded).otherwise(()=>null);w(e.toggleFrom);const y=w(e.toggleTo),C=async()=>{const P=y?e.toggleFrom:e.toggleTo,S=m(P),R=u?a.possibleDecisionStates.includes(S):!1,I=g?a.possibleDecisionStates.includes(S):!1,D=(x?b.possibleDecisionStates.includes(S):!1)||I||R,F=e.explain,A=F!=="disabled"&&(async()=>{const N=M.match({isComponentAttribute:u,isBooleanAttribute:g,isChoiceAttribute:x}).returnType().with({isChoiceAttribute:!0},()=>p.ExplainQuestionSubject.choiceValue).with({isBooleanAttribute:!0},()=>p.ExplainQuestionSubject.boolean).with({isComponentAttribute:!0},()=>p.ExplainQuestionSubject.component).otherwise(()=>null);N&&await c({question:p.ExplainQuestionType.whyIsStateNotPossible,subject:N,attributeId:r,choiceValueId:l,state:S},F,o)});if(D||S==null)try{await i({type:a.type,attributeId:r,choiceValueId:l,state:S})}catch(N){if(N.type===p.ConfiguratorErrorType.ConflictWithConsequence&&A){await A();return}ue()}else A&&await A()};return pe(e.children,{onClick:C,ref:t})}),Pa=ci,Da={...re,...Le,children:{title:"Content",type:f.ControlType.ComponentInstance},toggleFrom:{title:"Toggle From",type:f.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded","true","false"]},toggleTo:{title:"Toggle To",type:f.ControlType.Enum,defaultValue:"included",options:["undefined","included","excluded","true","false"]},...Ne};f.addPropertyControls(ci,Da);const ui=fe((e,t)=>{if(G())return e.children;const o=ae(),{makeDecision:i}=_.useMakeDecision(),r=J(e),l=e.choiceValueId??"",s=l.length>0,a=_.useAttributes([r],!1)[0],c=_.useChoiceAttribute(r),{explain:x}=de();if(!a)return d.jsx("span",{children:"Attribute not found"});const h=a.type===p.AttributeType.Choice,g=a.type===p.AttributeType.Numeric,u=a.type===p.AttributeType.Boolean,b=a.type===p.AttributeType.Component;if(!h&&s)return d.jsx("span",{children:"Attribute is not a Choice Attribute"});let w=h?a.values.get(l):null;if(s&&w==null)return d.jsx("span",{children:"Choice Value not found"});const m=()=>M.match({isChoiceAttribute:h,isBooleanAttribute:u,isComponentAttribute:b,isNumericAttribute:g,hasChoiceValueId:s,state:e.setSelection}).with({isChoiceAttribute:!0,hasChoiceValueId:!0,state:"included"},()=>p.ChoiceValueDecisionState.Included).with({isChoiceAttribute:!0,hasChoiceValueId:!0,state:"excluded"},()=>p.ChoiceValueDecisionState.Excluded).with({isBooleanAttribute:!0,state:"true"},()=>!0).with({isBooleanAttribute:!0,state:"false"},()=>!1).with({isComponentAttribute:!0,state:"included"},()=>p.ComponentDecisionState.Included).with({isComponentAttribute:!0,state:"excluded"},()=>p.ComponentDecisionState.Excluded).with({isNumericAttribute:!0,state:"numeric"},()=>e.numericValue).otherwise(()=>null),y=async()=>{if(h&&!s&&e.setSelection==="undefined")try{await c.clearDecisions()}catch{ue()}else{const C=m(),P=b?a.possibleDecisionStates.includes(C):!1,S=u?a.possibleDecisionStates.includes(C):!1,I=(h?w.possibleDecisionStates.includes(C):!1)||S||P,V=e.explain,D=V!=="disabled"&&(async()=>{const F=M.match({isComponentAttribute:b,isBooleanAttribute:u,isChoiceAttribute:h,isNumericAttribute:g}).returnType().with({isChoiceAttribute:!0},()=>p.ExplainQuestionSubject.choiceValue).with({isBooleanAttribute:!0},()=>p.ExplainQuestionSubject.boolean).with({isComponentAttribute:!0},()=>p.ExplainQuestionSubject.component).with({isNumericAttribute:!0},()=>p.ExplainQuestionSubject.numeric).otherwise(()=>null);F&&await x({question:p.ExplainQuestionType.whyIsStateNotPossible,subject:F,attributeId:r,choiceValueId:l,state:C},V,o)});if(g||I||C==null)try{await i({type:a.type,attributeId:r,choiceValueId:l,state:C})}catch(F){const A=F;if((A.type===p.ConfiguratorErrorType.ConflictWithConsequence||A.type===p.ConfiguratorErrorType.SetDecisionConflict)&&D){await D();return}ue()}else D&&await D()}};return pe(e.children,{onClick:y,ref:t})}),Va=ui,Oa={...re,...Le,children:{title:"Content",type:f.ControlType.ComponentInstance},setSelection:{title:"Set Selection To",type:f.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded","true","false","numeric"]},numericValue:{title:"Numeric Value",type:f.ControlType.Number,defaultValue:0},...Ne};f.addPropertyControls(ui,Oa);const di=fe((e,t)=>{var h;if(G())return e.children;const o=ae(),{makeManyDecisions:i}=_.useMakeDecision(),{handleExplainAnswer:r}=de(),l=e.attributes.map(J),s=_.useAttributes(l,!1).map((g,u)=>{if(!g)return{error:d.jsx("span",{children:"Attribute not found"})};const b=e.attributes[u],w=b.choiceValueId??"",m=w.length>0,y=g.type===p.AttributeType.Choice,C=g.type===p.AttributeType.Numeric,P=g.type===p.AttributeType.Boolean,S=g.type===p.AttributeType.Component;if(!y&&m)return{error:d.jsx("span",{children:"Attribute is not a Choice Attribute"})};let R=y?g.values.get(w):null;if(m&&R==null)return{error:d.jsx("span",{children:"Choice Value not found"})};const I=()=>M.match({isChoiceAttribute:y,isBooleanAttribute:P,isComponentAttribute:S,isNumericAttribute:C,hasChoiceValueId:m,state:b.setSelection}).with({isChoiceAttribute:!0,hasChoiceValueId:!0,state:"included"},()=>p.ChoiceValueDecisionState.Included).with({isChoiceAttribute:!0,hasChoiceValueId:!0,state:"excluded"},()=>p.ChoiceValueDecisionState.Excluded).with({isBooleanAttribute:!0,state:"true"},()=>!0).with({isBooleanAttribute:!0,state:"false"},()=>!1).with({isComponentAttribute:!0,state:"included"},()=>p.ComponentDecisionState.Included).with({isComponentAttribute:!0,state:"excluded"},()=>p.ComponentDecisionState.Excluded).with({isNumericAttribute:!0,state:"numeric"},()=>b.numericValue).otherwise(()=>null);return{getDecisions:()=>y&&!m&&b.setSelection==="undefined"?[...g.values.values()].filter(V=>{var D;return((D=V.decision)==null?void 0:D.kind)===p.DecisionKind.Explicit}).map(V=>({type:g.type,attributeId:g.id,choiceValueId:V.id,state:null})):[{type:g.type,attributeId:g.id,choiceValueId:w,state:I()}]}}),a=(h=s.find(g=>g.error))==null?void 0:h.error;if(a)return a;const c=async()=>{const g=s.reduce((b,w)=>[...b,...w.getDecisions()],new Array),u=M.match(e.existingSelections).with("keep",()=>({type:"KeepExistingDecisions"})).with("drop",()=>({type:"DropExistingDecisions",conflictHandling:M.match(e.autoResolveConflicts).with(!1,()=>({type:"Manual",includeConstraintsInConflictExplanation:!1})).with(!0,()=>({type:"Automatic"})).exhaustive()})).exhaustive();try{await i(g,u)}catch(b){const w=b;if(console.debug("SetMany failed",w),(w==null?void 0:w.type)===p.ConfiguratorErrorType.MakeManyDecisionsConflict&&w.decisionExplanations){e.explain!=="disabled"&&await r(w,e.explain,o);return}ue();return}},x=()=>{e.trigger==="click"&&c()};return T.useEffect(()=>{e.trigger==="auto"&&c()},[]),pe(e.children,{onClick:x,ref:t})}),ka=di,ja={children:{title:"Content",type:f.ControlType.ComponentInstance},attributes:{title:"Attributes",type:f.ControlType.Array,control:{type:f.ControlType.Object,controls:{...re,...Le,setSelection:{title:"Set Selection To",type:f.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded","true","false","numeric"]},numericValue:{title:"Numeric Value",type:f.ControlType.Number,defaultValue:0}}}},existingSelections:{title:"Existing Selections",type:f.ControlType.Enum,defaultValue:"keep",options:["keep","drop"]},autoResolveConflicts:{title:"Auto Resolve Conflicts",type:f.ControlType.Boolean,defaultValue:!0,hidden:e=>e.existingSelections!=="drop"},trigger:{title:"Trigger",type:f.ControlType.Enum,defaultValue:"click",options:["click","auto"],displaySegmentedControl:!0,segmentedControlDirection:"horizontal"},...Ne};f.addPropertyControls(di,ja);const fi=se(e=>{if(G())return e.enabledChildren;const{canResetConfiguration:n,resetConfiguration:o}=_.useConfigurationReset(),i=async()=>{if(n)try{await o()}catch{ba()}},r=n?e.enabledChildren:e.disabledChildren;return pe(r,{onClick:i})}),Fa=fi,Na={enabledChildren:{title:"Content – Enabled",type:f.ControlType.ComponentInstance},disabledChildren:{title:"Content – Disabled",type:f.ControlType.ComponentInstance}};f.addPropertyControls(fi,Na);const pi=fe((e,t)=>{if(G())return e.unsatisfiedChildren;const o=ae(),{isSatisfied:i}=_.useConfigurationSatisfaction(),{explain:r}=de(),s=[...e.attributeId.length>0?[J(e)]:[],...e.attributes.map(J)],a=()=>{var u;const h=_.useAttributes(s,!1).map(b=>b?{isSatisfied:b.isSatisfied}:{error:d.jsx("span",{children:"Attribute not found"})}),g=(u=h.find(b=>b.error))==null?void 0:u.error;return g||h.every(b=>b.isSatisfied)},c=async()=>{e.explain!=="disabled"&&(s.length===0?await r(h=>h.whyIsNotSatisfied.configuration,e.explain,o):s.length===1&&await r(h=>h.whyIsNotSatisfied.attribute(s[0]),e.explain,o))};return(s.length>0?a():i)?e.satisfiedChildren:pe(e.unsatisfiedChildren,{onClick:c,ref:t})}),La=pi,Ma={satisfiedChildren:{title:"Content – Satisfied",type:f.ControlType.ComponentInstance},unsatisfiedChildren:{title:"Content – Unsatisfied",type:f.ControlType.ComponentInstance},...re,attributes:{title:"Attributes",type:f.ControlType.Array,control:{type:f.ControlType.Object,controls:{...re}}},...Ne};f.addPropertyControls(pi,Ma);const hi=se(T.forwardRef(function(t,n){const o=b=>M.match(b).with(1,()=>t.content1).with(2,()=>t.content2).with(3,()=>t.content3).with(4,()=>t.content4).with(5,()=>t.content5).with(6,()=>t.content6).with(7,()=>t.content7).with(8,()=>t.content8).with(9,()=>t.content9).with(10,()=>t.content10).otherwise(()=>null),i=t.variants.find(b=>b.useInDesignTime)||t.variants[0];if(G())return i&&o(i.content);const l=J(t),s=t.choiceValueId??"",a=s.length>0,c=_.useAttributes([l],!1)[0];if(!c)return d.jsx("span",{children:"Attribute not found"});const x=c.type===p.AttributeType.Choice;if(!x&&a)return d.jsx("span",{children:"Attribute is not a Choice Attribute"});const h=x&&a?c.values.get(s):null;if(a&&h==null)return d.jsx("span",{children:"Choice Value not found"});const g=b=>()=>h?b(h):[...c.values.values()].some(b),u=[...t.variants].find(({selection:b,condition:w})=>M.match({selection:b,condition:w,attribute:c}).with({attribute:{type:p.AttributeType.Choice},selection:"included",condition:"blocked"},g(m=>!m.possibleDecisionStates.includes(p.ChoiceValueDecisionState.Included))).with({attribute:{type:p.AttributeType.Choice},selection:"included",condition:"implicit"},g(m=>{var y,C;return((y=m.decision)==null?void 0:y.state)===p.ChoiceValueDecisionState.Included&&((C=m.decision)==null?void 0:C.kind)===p.DecisionKind.Implicit})).with({attribute:{type:p.AttributeType.Choice},selection:"included",condition:"explicit"},g(m=>{var y,C;return((y=m.decision)==null?void 0:y.state)===p.ChoiceValueDecisionState.Included&&((C=m.decision)==null?void 0:C.kind)===p.DecisionKind.Explicit})).with({attribute:{type:p.AttributeType.Choice},selection:"included",condition:"none"},g(m=>{var y;return((y=m.decision)==null?void 0:y.state)===p.ChoiceValueDecisionState.Included})).with({attribute:{type:p.AttributeType.Choice},selection:"excluded",condition:"blocked"},g(m=>!m.possibleDecisionStates.includes(p.ChoiceValueDecisionState.Excluded))).with({attribute:{type:p.AttributeType.Choice},selection:"excluded",condition:"implicit"},g(m=>{var y,C;return((y=m.decision)==null?void 0:y.state)===p.ChoiceValueDecisionState.Excluded&&((C=m.decision)==null?void 0:C.kind)===p.DecisionKind.Implicit})).with({attribute:{type:p.AttributeType.Choice},selection:"excluded",condition:"explicit"},g(m=>{var y,C;return((y=m.decision)==null?void 0:y.state)===p.ChoiceValueDecisionState.Excluded&&((C=m.decision)==null?void 0:C.kind)===p.DecisionKind.Explicit})).with({attribute:{type:p.AttributeType.Choice},selection:"excluded",condition:"none"},g(m=>{var y;return((y=m.decision)==null?void 0:y.state)===p.ChoiceValueDecisionState.Excluded})).with({attribute:{type:p.AttributeType.Boolean},selection:"true",condition:"blocked"},({attribute:m})=>!m.possibleDecisionStates.includes(!0)).with({attribute:{type:p.AttributeType.Boolean},selection:"true",condition:"implicit"},({attribute:m})=>{var y,C;return((y=m.decision)==null?void 0:y.state)===!0&&((C=m.decision)==null?void 0:C.kind)===p.DecisionKind.Implicit}).with({attribute:{type:p.AttributeType.Boolean},selection:"true",condition:"explicit"},({attribute:m})=>{var y,C;return((y=m.decision)==null?void 0:y.state)===!0&&((C=m.decision)==null?void 0:C.kind)===p.DecisionKind.Explicit}).with({attribute:{type:p.AttributeType.Boolean},selection:"true",condition:"none"},({attribute:m})=>{var y;return((y=m.decision)==null?void 0:y.state)===!0}).with({attribute:{type:p.AttributeType.Boolean},selection:"false",condition:"blocked"},({attribute:m})=>!m.possibleDecisionStates.includes(!1)).with({attribute:{type:p.AttributeType.Boolean},selection:"false",condition:"implicit"},({attribute:m})=>{var y,C;return((y=m.decision)==null?void 0:y.state)===!1&&((C=m.decision)==null?void 0:C.kind)===p.DecisionKind.Implicit}).with({attribute:{type:p.AttributeType.Boolean},selection:"false",condition:"explicit"},({attribute:m})=>{var y,C;return((y=m.decision)==null?void 0:y.state)===!1&&((C=m.decision)==null?void 0:C.kind)===p.DecisionKind.Explicit}).with({attribute:{type:p.AttributeType.Boolean},selection:"false",condition:"none"},({attribute:m})=>{var y;return((y=m.decision)==null?void 0:y.state)===!1}).with({attribute:{type:p.AttributeType.Component},selection:"included",condition:"blocked"},({attribute:m})=>!m.possibleDecisionStates.includes(p.ComponentDecisionState.Included)).with({attribute:{type:p.AttributeType.Component},selection:"included",condition:"implicit"},({attribute:m})=>{var y,C;return((y=m.decision)==null?void 0:y.state)===p.ComponentDecisionState.Included&&((C=m.decision)==null?void 0:C.kind)===p.DecisionKind.Implicit}).with({attribute:{type:p.AttributeType.Component},selection:"included",condition:"explicit"},({attribute:m})=>{var y,C;return((y=m.decision)==null?void 0:y.state)===p.ComponentDecisionState.Included&&((C=m.decision)==null?void 0:C.kind)===p.DecisionKind.Explicit}).with({attribute:{type:p.AttributeType.Component},selection:"included",condition:"none"},({attribute:m})=>{var y;return((y=m.decision)==null?void 0:y.state)===p.ComponentDecisionState.Included}).with({attribute:{type:p.AttributeType.Component},selection:"excluded",condition:"blocked"},({attribute:m})=>!m.possibleDecisionStates.includes(p.ComponentDecisionState.Excluded)).with({attribute:{type:p.AttributeType.Component},selection:"excluded",condition:"implicit"},({attribute:m})=>{var y,C;return((y=m.decision)==null?void 0:y.state)===p.ComponentDecisionState.Excluded&&((C=m.decision)==null?void 0:C.kind)===p.DecisionKind.Implicit}).with({attribute:{type:p.AttributeType.Component},selection:"excluded",condition:"explicit"},({attribute:m})=>{var y,C;return((y=m.decision)==null?void 0:y.state)===p.ComponentDecisionState.Excluded&&((C=m.decision)==null?void 0:C.kind)===p.DecisionKind.Explicit}).with({attribute:{type:p.AttributeType.Component},selection:"excluded",condition:"none"},({attribute:m})=>{var y;return((y=m.decision)==null?void 0:y.state)===p.ComponentDecisionState.Excluded}).with({attribute:{type:p.AttributeType.Numeric},selection:"numeric",condition:"implicit"},({attribute:m})=>{var y;return((y=m.decision)==null?void 0:y.kind)===p.DecisionKind.Implicit}).with({attribute:{type:p.AttributeType.Numeric},selection:"numeric",condition:"explicit"},({attribute:m})=>{var y;return((y=m.decision)==null?void 0:y.kind)===p.DecisionKind.Explicit}).with({attribute:{type:p.AttributeType.Numeric},selection:"numeric",condition:"none"},({attribute:m})=>m.decision!=null).with({attribute:{type:p.AttributeType.Choice},selection:"undefined"},()=>h.decision==null).with({attribute:{type:p.AttributeType.Boolean},selection:"undefined"},{attribute:{type:p.AttributeType.Component},selection:"undefined"},{attribute:{type:p.AttributeType.Numeric},selection:"undefined"},({attribute:m})=>m.decision==null).otherwise(()=>!1));return u&&pe(o(u.content),{ref:n})})),Ba=hi,$a={...re,...Le,variants:{title:"Variants",type:f.ControlType.Array,maxCount:10,control:{type:f.ControlType.Object,controls:{selection:{title:"Selection",type:f.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded","true","false","numeric"]},condition:{title:"Condition",type:f.ControlType.Enum,defaultValue:"none",options:["none","explicit","implicit","blocked"]},content:{title:"Content",type:f.ControlType.Enum,defaultValue:1,options:[1,2,3,4,5,6,7,8,9,10]},useInDesignTime:{title:"Design Time",type:f.ControlType.Boolean,defaultValue:!1}}}},content1:{title:"Content 1",type:f.ControlType.ComponentInstance},content2:{title:"Content 2",type:f.ControlType.ComponentInstance},content3:{title:"Content 3",type:f.ControlType.ComponentInstance},content4:{title:"Content 4",type:f.ControlType.ComponentInstance},content5:{title:"Content 5",type:f.ControlType.ComponentInstance},content6:{title:"Content 6",type:f.ControlType.ComponentInstance},content7:{title:"Content 7",type:f.ControlType.ComponentInstance},content8:{title:"Content 8",type:f.ControlType.ComponentInstance},content9:{title:"Content 9",type:f.ControlType.ComponentInstance},content10:{title:"Content 10",type:f.ControlType.ComponentInstance}};f.addPropertyControls(hi,$a);const mi=se(e=>{const t=T.useRef(),[n,o]=T.useState(null),i=T.useRef(n),r=T.useMemo(()=>e.color.startsWith("var"),[e.color]),l=r?n:e.color,s=T.useMemo(()=>{if(!l)return;const a=Mi(l);return Li.hexToCSSFilter(`#${a}`,{acceptanceLossPercentage:1,maxChecks:30}).filter.replace(";","")},[l]);return T.useLayoutEffect(()=>{if(r){const a=t.current&&getComputedStyle(t.current).color;a!=i.current&&(i.current=a,o(a))}}),d.jsx("div",{ref:t,style:{...e.style,color:e.color,filter:s},children:e.children})}),Ka=mi,Wa={children:{title:"Content",type:f.ControlType.ComponentInstance},color:{title:"Color",type:f.ControlType.Color,defaultValue:"#0000ff"}};f.addPropertyControls(mi,Wa);const yi=se(e=>{if(G())return e.children;const{error:n}=_.useConfigurationInitialization();return n?pe(e.children,{onClick:n.retry}):null}),qa=yi,za={children:{title:"Content",type:f.ControlType.ComponentInstance}};f.addPropertyControls(yi,za);function Ha(e){return T.forwardRef((t,n)=>{const o={...t.style,width:"100%",height:"100%"};return d.jsx(e,{...t,ref:n,style:o})})}const Ua=k.div`
481
+ `,$_=Ft((e,t)=>{var w,N;if(_e()){const T=Zf(e,!0,!1);return b.jsx(xb,{style:T})}const r=st(),o=Te(e),i=ce.useNumericAttribute(o),{explain:a}=kt();if(!i)return b.jsx("span",{children:"Numeric Attribute not found"});const{attribute:u,makeDecision:s}=i,c=((w=u.decision)==null?void 0:w.kind)===_.DecisionKind.Implicit,f=Zf(e,u.isSatisfied,c),l=(N=u.decision)==null?void 0:N.state,[d,p]=I.useState(l),{min:y,max:h}=u.range,g=j_(l,async T=>{if(T<y){alert(`The value must be smaller than or equal to ${y}.`);return}if(T>h){alert(`The value must be greater than or equal to ${h}.`);return}try{await s(T)}catch(A){A.type===_.ConfiguratorErrorType.SetDecisionConflict?e.explain!=="disabled"&&await a(E=>E.whyIsStateNotPossible.numeric(u.id).state(T),e.explain,r):wt()}},d,T=>p(T),e.wait);return b.jsx(xb,{getInputRef:t,thousandsGroupStyle:"thousand",decimalSeparator:e.decimalSeparator,thousandSeparator:e.thousandSeparator,allowNegative:!0,fixedDecimalScale:!0,decimalScale:u.decimalPlaces,allowEmptyFormatting:!1,displayType:"input",placeholder:e.placeholder,prefix:A6(u,e.implicitLabelPrefix),onBlur:()=>{g.flush()},onKeyPress:T=>{T.key==="Enter"&&g.flush()},onValueChange:T=>p(T.floatValue),value:d??"",style:f})}),T6=$_,A6=(e,t)=>{var n;return((n=e.decision)==null?void 0:n.kind)===_.DecisionKind.Implicit?t:""},I6={...T_,wait:{title:"Debounce Delay",type:x.ControlType.Number,defaultValue:2e3,min:0,unit:"ms"},decimalSeparator:{title:"Decimal Separator",type:x.ControlType.String,defaultValue:",",maxLength:1},thousandSeparator:{title:"Thousand Separator",type:x.ControlType.String,defaultValue:".",maxLength:1},placeholder:{title:"Placeholder",type:x.ControlType.String,defaultValue:""}};x.addPropertyControls($_,I6);const Co={choiceValueId:{title:"Choice Value Id",type:x.ControlType.String}};function Rt(e,t){return I.Children.map(e,n=>{if(I.isValidElement(n)){const r=Ib(n.props,t);return I.cloneElement(n,r)}return n})}const E_=Ft((e,t)=>{if(_e())return e.children;const r=st(),{makeDecision:o}=ce.useMakeDecision(),i=Te(e),a=e.choiceValueId??"",u=a.length>0,s=ce.useAttributes([i],!1)[0],{explain:c}=kt();if(!s)return b.jsx("span",{children:"Attribute not found"});const f=s.type===_.AttributeType.Choice,l=s.type===_.AttributeType.Numeric,d=s.type===_.AttributeType.Boolean,p=s.type===_.AttributeType.Component;if(!f&&u)return b.jsx("span",{children:"Attribute is not a Choice Attribute"});if(l)return b.jsx("span",{children:"Numeric Attribute is not supported"});let y=f?s.values.get(a):null;if(u&&y==null)return b.jsx("span",{children:"Choice Value not found"});const h=N=>H.match({state:N,attribute:s}).with({attribute:{type:_.AttributeType.Choice},state:"undefined"},()=>y.decision==null).with({attribute:{type:_.AttributeType.Choice},state:"included"},()=>{var T,A;return((T=y.decision)==null?void 0:T.state)===_.ChoiceValueDecisionState.Included&&((A=y.decision)==null?void 0:A.kind)===_.DecisionKind.Explicit}).with({attribute:{type:_.AttributeType.Choice},state:"excluded"},()=>{var T,A;return((T=y.decision)==null?void 0:T.state)===_.ChoiceValueDecisionState.Excluded&&((A=y.decision)==null?void 0:A.kind)===_.DecisionKind.Explicit}).with({attribute:{type:_.AttributeType.Boolean},state:"undefined"},{attribute:{type:_.AttributeType.Component},state:"undefined"},({attribute:T})=>T.decision==null).with({attribute:{type:_.AttributeType.Boolean},state:"true"},({attribute:T})=>{var A,O;return((A=T.decision)==null?void 0:A.state)===!0&&((O=T.decision)==null?void 0:O.kind)===_.DecisionKind.Explicit}).with({attribute:{type:_.AttributeType.Boolean},state:"false"},({attribute:T})=>{var A,O;return((A=T.decision)==null?void 0:A.state)===!1&&((O=T.decision)==null?void 0:O.kind)===_.DecisionKind.Explicit}).with({attribute:{type:_.AttributeType.Component},state:"included"},({attribute:T})=>{var A,O;return((A=T.decision)==null?void 0:A.state)===_.ComponentDecisionState.Included&&((O=T.decision)==null?void 0:O.kind)===_.DecisionKind.Explicit}).with({attribute:{type:_.AttributeType.Component},state:"excluded"},({attribute:T})=>{var A,O;return((A=T.decision)==null?void 0:A.state)===_.ComponentDecisionState.Excluded&&((O=T.decision)==null?void 0:O.kind)===_.DecisionKind.Explicit}).otherwise(()=>!1),m=N=>H.match({isChoiceAttribute:f,isBooleanAttribute:d,isComponentAttribute:p,state:N}).with({isChoiceAttribute:!0,state:"included"},()=>_.ChoiceValueDecisionState.Included).with({isChoiceAttribute:!0,state:"excluded"},()=>_.ChoiceValueDecisionState.Excluded).with({isBooleanAttribute:!0,state:"true"},()=>!0).with({isBooleanAttribute:!0,state:"false"},()=>!1).with({isComponentAttribute:!0,state:"included"},()=>_.ComponentDecisionState.Included).with({isComponentAttribute:!0,state:"excluded"},()=>_.ComponentDecisionState.Excluded).otherwise(()=>null);h(e.toggleFrom);const g=h(e.toggleTo),w=async()=>{const N=g?e.toggleFrom:e.toggleTo,T=m(N),A=p?s.possibleDecisionStates.includes(T):!1,O=d?s.possibleDecisionStates.includes(T):!1,E=(f?y.possibleDecisionStates.includes(T):!1)||O||A,W=e.explain,S=W!=="disabled"&&(async()=>{const $=H.match({isComponentAttribute:p,isBooleanAttribute:d,isChoiceAttribute:f}).returnType().with({isChoiceAttribute:!0},()=>_.ExplainQuestionSubject.choiceValue).with({isBooleanAttribute:!0},()=>_.ExplainQuestionSubject.boolean).with({isComponentAttribute:!0},()=>_.ExplainQuestionSubject.component).otherwise(()=>null);$&&await c({question:_.ExplainQuestionType.whyIsStateNotPossible,subject:$,attributeId:i,choiceValueId:a,state:T},W,r)});if(E||T==null)try{await o({type:s.type,attributeId:i,choiceValueId:a,state:T})}catch($){if($.type===_.ConfiguratorErrorType.ConflictWithConsequence&&S){await S();return}wt()}else S&&await S()};return Rt(e.children,{onClick:w,ref:t})}),O6=E_,P6={...Xe,...Co,children:{title:"Content",type:x.ControlType.ComponentInstance},toggleFrom:{title:"Toggle From",type:x.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded","true","false"]},toggleTo:{title:"Toggle To",type:x.ControlType.Enum,defaultValue:"included",options:["undefined","included","excluded","true","false"]},...wo};x.addPropertyControls(E_,P6);const M_=Ft((e,t)=>{if(_e())return e.children;const r=st(),{makeDecision:o}=ce.useMakeDecision(),i=Te(e),a=e.choiceValueId??"",u=a.length>0,s=ce.useAttributes([i],!1)[0],c=ce.useChoiceAttribute(i),{explain:f}=kt();if(!s)return b.jsx("span",{children:"Attribute not found"});const l=s.type===_.AttributeType.Choice,d=s.type===_.AttributeType.Numeric,p=s.type===_.AttributeType.Boolean,y=s.type===_.AttributeType.Component;if(!l&&u)return b.jsx("span",{children:"Attribute is not a Choice Attribute"});let h=l?s.values.get(a):null;if(u&&h==null)return b.jsx("span",{children:"Choice Value not found"});const m=()=>H.match({isChoiceAttribute:l,isBooleanAttribute:p,isComponentAttribute:y,isNumericAttribute:d,hasChoiceValueId:u,state:e.setSelection}).with({isChoiceAttribute:!0,hasChoiceValueId:!0,state:"included"},()=>_.ChoiceValueDecisionState.Included).with({isChoiceAttribute:!0,hasChoiceValueId:!0,state:"excluded"},()=>_.ChoiceValueDecisionState.Excluded).with({isBooleanAttribute:!0,state:"true"},()=>!0).with({isBooleanAttribute:!0,state:"false"},()=>!1).with({isComponentAttribute:!0,state:"included"},()=>_.ComponentDecisionState.Included).with({isComponentAttribute:!0,state:"excluded"},()=>_.ComponentDecisionState.Excluded).with({isNumericAttribute:!0,state:"numeric"},()=>e.numericValue).otherwise(()=>null),g=async()=>{if(l&&!u&&e.setSelection==="undefined")try{await c.clearDecisions()}catch{wt()}else{const w=m(),N=y?s.possibleDecisionStates.includes(w):!1,T=p?s.possibleDecisionStates.includes(w):!1,O=(l?h.possibleDecisionStates.includes(w):!1)||T||N,U=e.explain,E=U!=="disabled"&&(async()=>{const W=H.match({isComponentAttribute:y,isBooleanAttribute:p,isChoiceAttribute:l,isNumericAttribute:d}).returnType().with({isChoiceAttribute:!0},()=>_.ExplainQuestionSubject.choiceValue).with({isBooleanAttribute:!0},()=>_.ExplainQuestionSubject.boolean).with({isComponentAttribute:!0},()=>_.ExplainQuestionSubject.component).with({isNumericAttribute:!0},()=>_.ExplainQuestionSubject.numeric).otherwise(()=>null);W&&await f({question:_.ExplainQuestionType.whyIsStateNotPossible,subject:W,attributeId:i,choiceValueId:a,state:w},U,r)});if(d||O||w==null)try{await o({type:s.type,attributeId:i,choiceValueId:a,state:w})}catch(W){const S=W;if((S.type===_.ConfiguratorErrorType.ConflictWithConsequence||S.type===_.ConfiguratorErrorType.SetDecisionConflict)&&E){await E();return}wt()}else E&&await E()}};return Rt(e.children,{onClick:g,ref:t})}),N6=M_,j6={...Xe,...Co,children:{title:"Content",type:x.ControlType.ComponentInstance},setSelection:{title:"Set Selection To",type:x.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded","true","false","numeric"]},numericValue:{title:"Numeric Value",type:x.ControlType.Number,defaultValue:0},...wo};x.addPropertyControls(M_,j6);const k_=Ft((e,t)=>{var l;if(_e())return e.children;const r=st(),{makeManyDecisions:o}=ce.useMakeDecision(),{handleExplainAnswer:i}=kt(),a=e.attributes.map(Te),u=ce.useAttributes(a,!1).map((d,p)=>{if(!d)return{error:b.jsx("span",{children:"Attribute not found"})};const y=e.attributes[p],h=y.choiceValueId??"",m=h.length>0,g=d.type===_.AttributeType.Choice,w=d.type===_.AttributeType.Numeric,N=d.type===_.AttributeType.Boolean,T=d.type===_.AttributeType.Component;if(!g&&m)return{error:b.jsx("span",{children:"Attribute is not a Choice Attribute"})};let A=g?d.values.get(h):null;if(m&&A==null)return{error:b.jsx("span",{children:"Choice Value not found"})};const O=()=>H.match({isChoiceAttribute:g,isBooleanAttribute:N,isComponentAttribute:T,isNumericAttribute:w,hasChoiceValueId:m,state:y.setSelection}).with({isChoiceAttribute:!0,hasChoiceValueId:!0,state:"included"},()=>_.ChoiceValueDecisionState.Included).with({isChoiceAttribute:!0,hasChoiceValueId:!0,state:"excluded"},()=>_.ChoiceValueDecisionState.Excluded).with({isBooleanAttribute:!0,state:"true"},()=>!0).with({isBooleanAttribute:!0,state:"false"},()=>!1).with({isComponentAttribute:!0,state:"included"},()=>_.ComponentDecisionState.Included).with({isComponentAttribute:!0,state:"excluded"},()=>_.ComponentDecisionState.Excluded).with({isNumericAttribute:!0,state:"numeric"},()=>y.numericValue).otherwise(()=>null);return{getDecisions:()=>g&&!m&&y.setSelection==="undefined"?[...d.values.values()].filter(U=>{var E;return((E=U.decision)==null?void 0:E.kind)===_.DecisionKind.Explicit}).map(U=>({type:d.type,attributeId:d.id,choiceValueId:U.id,state:null})):[{type:d.type,attributeId:d.id,choiceValueId:h,state:O()}]}}),s=(l=u.find(d=>d.error))==null?void 0:l.error;if(s)return s;const c=async()=>{const d=u.reduce((y,h)=>[...y,...h.getDecisions()],new Array),p=H.match(e.existingSelections).with("keep",()=>({type:"KeepExistingDecisions"})).with("drop",()=>({type:"DropExistingDecisions",conflictHandling:H.match(e.autoResolveConflicts).with(!1,()=>({type:"Manual",includeConstraintsInConflictExplanation:!1})).with(!0,()=>({type:"Automatic"})).exhaustive()})).exhaustive();try{await o(d,p)}catch(y){const h=y;if(console.debug("SetMany failed",h),(h==null?void 0:h.type)===_.ConfiguratorErrorType.MakeManyDecisionsConflict&&h.decisionExplanations){e.explain!=="disabled"&&await i(h,e.explain,r);return}wt();return}},f=()=>{e.trigger==="click"&&c()};return I.useEffect(()=>{e.trigger==="auto"&&c()},[]),Rt(e.children,{onClick:f,ref:t})}),$6=k_,E6={children:{title:"Content",type:x.ControlType.ComponentInstance},attributes:{title:"Attributes",type:x.ControlType.Array,control:{type:x.ControlType.Object,controls:{...Xe,...Co,setSelection:{title:"Set Selection To",type:x.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded","true","false","numeric"]},numericValue:{title:"Numeric Value",type:x.ControlType.Number,defaultValue:0}}}},existingSelections:{title:"Existing Selections",type:x.ControlType.Enum,defaultValue:"keep",options:["keep","drop"]},autoResolveConflicts:{title:"Auto Resolve Conflicts",type:x.ControlType.Boolean,defaultValue:!0,hidden:e=>e.existingSelections!=="drop"},trigger:{title:"Trigger",type:x.ControlType.Enum,defaultValue:"click",options:["click","auto"],displaySegmentedControl:!0,segmentedControlDirection:"horizontal"},...wo};x.addPropertyControls(k_,E6);const F_=it(e=>{if(_e())return e.enabledChildren;const{canResetConfiguration:n,resetConfiguration:r}=ce.useConfigurationReset(),o=async()=>{if(n)try{await r()}catch{g6()}},i=n?e.enabledChildren:e.disabledChildren;return Rt(i,{onClick:o})}),M6=F_,k6={enabledChildren:{title:"Content – Enabled",type:x.ControlType.ComponentInstance},disabledChildren:{title:"Content – Disabled",type:x.ControlType.ComponentInstance}};x.addPropertyControls(F_,k6);const R_=Ft((e,t)=>{if(_e())return e.unsatisfiedChildren;const r=st(),{isSatisfied:o}=ce.useConfigurationSatisfaction(),{explain:i}=kt(),u=[...e.attributeId.length>0?[Te(e)]:[],...e.attributes.map(Te)],s=()=>{var p;const l=ce.useAttributes(u,!1).map(y=>y?{isSatisfied:y.isSatisfied}:{error:b.jsx("span",{children:"Attribute not found"})}),d=(p=l.find(y=>y.error))==null?void 0:p.error;return d||l.every(y=>y.isSatisfied)},c=async()=>{e.explain!=="disabled"&&(u.length===0?await i(l=>l.whyIsNotSatisfied.configuration,e.explain,r):u.length===1&&await i(l=>l.whyIsNotSatisfied.attribute(u[0]),e.explain,r))};return(u.length>0?s():o)?e.satisfiedChildren:Rt(e.unsatisfiedChildren,{onClick:c,ref:t})}),F6=R_,R6={satisfiedChildren:{title:"Content – Satisfied",type:x.ControlType.ComponentInstance},unsatisfiedChildren:{title:"Content – Unsatisfied",type:x.ControlType.ComponentInstance},...Xe,attributes:{title:"Attributes",type:x.ControlType.Array,control:{type:x.ControlType.Object,controls:{...Xe}}},...wo};x.addPropertyControls(R_,R6);const V_=it(I.forwardRef(function(t,n){const r=y=>H.match(y).with(1,()=>t.content1).with(2,()=>t.content2).with(3,()=>t.content3).with(4,()=>t.content4).with(5,()=>t.content5).with(6,()=>t.content6).with(7,()=>t.content7).with(8,()=>t.content8).with(9,()=>t.content9).with(10,()=>t.content10).otherwise(()=>null),o=t.variants.find(y=>y.useInDesignTime)||t.variants[0];if(_e())return o&&r(o.content);const a=Te(t),u=t.choiceValueId??"",s=u.length>0,c=ce.useAttributes([a],!1)[0];if(!c)return b.jsx("span",{children:"Attribute not found"});const f=c.type===_.AttributeType.Choice;if(!f&&s)return b.jsx("span",{children:"Attribute is not a Choice Attribute"});const l=f&&s?c.values.get(u):null;if(s&&l==null)return b.jsx("span",{children:"Choice Value not found"});const d=y=>()=>l?y(l):[...c.values.values()].some(y),p=[...t.variants].find(({selection:y,condition:h})=>H.match({selection:y,condition:h,attribute:c}).with({attribute:{type:_.AttributeType.Choice},selection:"included",condition:"blocked"},d(m=>!m.possibleDecisionStates.includes(_.ChoiceValueDecisionState.Included))).with({attribute:{type:_.AttributeType.Choice},selection:"included",condition:"implicit"},d(m=>{var g,w;return((g=m.decision)==null?void 0:g.state)===_.ChoiceValueDecisionState.Included&&((w=m.decision)==null?void 0:w.kind)===_.DecisionKind.Implicit})).with({attribute:{type:_.AttributeType.Choice},selection:"included",condition:"explicit"},d(m=>{var g,w;return((g=m.decision)==null?void 0:g.state)===_.ChoiceValueDecisionState.Included&&((w=m.decision)==null?void 0:w.kind)===_.DecisionKind.Explicit})).with({attribute:{type:_.AttributeType.Choice},selection:"included",condition:"none"},d(m=>{var g;return((g=m.decision)==null?void 0:g.state)===_.ChoiceValueDecisionState.Included})).with({attribute:{type:_.AttributeType.Choice},selection:"excluded",condition:"blocked"},d(m=>!m.possibleDecisionStates.includes(_.ChoiceValueDecisionState.Excluded))).with({attribute:{type:_.AttributeType.Choice},selection:"excluded",condition:"implicit"},d(m=>{var g,w;return((g=m.decision)==null?void 0:g.state)===_.ChoiceValueDecisionState.Excluded&&((w=m.decision)==null?void 0:w.kind)===_.DecisionKind.Implicit})).with({attribute:{type:_.AttributeType.Choice},selection:"excluded",condition:"explicit"},d(m=>{var g,w;return((g=m.decision)==null?void 0:g.state)===_.ChoiceValueDecisionState.Excluded&&((w=m.decision)==null?void 0:w.kind)===_.DecisionKind.Explicit})).with({attribute:{type:_.AttributeType.Choice},selection:"excluded",condition:"none"},d(m=>{var g;return((g=m.decision)==null?void 0:g.state)===_.ChoiceValueDecisionState.Excluded})).with({attribute:{type:_.AttributeType.Boolean},selection:"true",condition:"blocked"},({attribute:m})=>!m.possibleDecisionStates.includes(!0)).with({attribute:{type:_.AttributeType.Boolean},selection:"true",condition:"implicit"},({attribute:m})=>{var g,w;return((g=m.decision)==null?void 0:g.state)===!0&&((w=m.decision)==null?void 0:w.kind)===_.DecisionKind.Implicit}).with({attribute:{type:_.AttributeType.Boolean},selection:"true",condition:"explicit"},({attribute:m})=>{var g,w;return((g=m.decision)==null?void 0:g.state)===!0&&((w=m.decision)==null?void 0:w.kind)===_.DecisionKind.Explicit}).with({attribute:{type:_.AttributeType.Boolean},selection:"true",condition:"none"},({attribute:m})=>{var g;return((g=m.decision)==null?void 0:g.state)===!0}).with({attribute:{type:_.AttributeType.Boolean},selection:"false",condition:"blocked"},({attribute:m})=>!m.possibleDecisionStates.includes(!1)).with({attribute:{type:_.AttributeType.Boolean},selection:"false",condition:"implicit"},({attribute:m})=>{var g,w;return((g=m.decision)==null?void 0:g.state)===!1&&((w=m.decision)==null?void 0:w.kind)===_.DecisionKind.Implicit}).with({attribute:{type:_.AttributeType.Boolean},selection:"false",condition:"explicit"},({attribute:m})=>{var g,w;return((g=m.decision)==null?void 0:g.state)===!1&&((w=m.decision)==null?void 0:w.kind)===_.DecisionKind.Explicit}).with({attribute:{type:_.AttributeType.Boolean},selection:"false",condition:"none"},({attribute:m})=>{var g;return((g=m.decision)==null?void 0:g.state)===!1}).with({attribute:{type:_.AttributeType.Component},selection:"included",condition:"blocked"},({attribute:m})=>!m.possibleDecisionStates.includes(_.ComponentDecisionState.Included)).with({attribute:{type:_.AttributeType.Component},selection:"included",condition:"implicit"},({attribute:m})=>{var g,w;return((g=m.decision)==null?void 0:g.state)===_.ComponentDecisionState.Included&&((w=m.decision)==null?void 0:w.kind)===_.DecisionKind.Implicit}).with({attribute:{type:_.AttributeType.Component},selection:"included",condition:"explicit"},({attribute:m})=>{var g,w;return((g=m.decision)==null?void 0:g.state)===_.ComponentDecisionState.Included&&((w=m.decision)==null?void 0:w.kind)===_.DecisionKind.Explicit}).with({attribute:{type:_.AttributeType.Component},selection:"included",condition:"none"},({attribute:m})=>{var g;return((g=m.decision)==null?void 0:g.state)===_.ComponentDecisionState.Included}).with({attribute:{type:_.AttributeType.Component},selection:"excluded",condition:"blocked"},({attribute:m})=>!m.possibleDecisionStates.includes(_.ComponentDecisionState.Excluded)).with({attribute:{type:_.AttributeType.Component},selection:"excluded",condition:"implicit"},({attribute:m})=>{var g,w;return((g=m.decision)==null?void 0:g.state)===_.ComponentDecisionState.Excluded&&((w=m.decision)==null?void 0:w.kind)===_.DecisionKind.Implicit}).with({attribute:{type:_.AttributeType.Component},selection:"excluded",condition:"explicit"},({attribute:m})=>{var g,w;return((g=m.decision)==null?void 0:g.state)===_.ComponentDecisionState.Excluded&&((w=m.decision)==null?void 0:w.kind)===_.DecisionKind.Explicit}).with({attribute:{type:_.AttributeType.Component},selection:"excluded",condition:"none"},({attribute:m})=>{var g;return((g=m.decision)==null?void 0:g.state)===_.ComponentDecisionState.Excluded}).with({attribute:{type:_.AttributeType.Numeric},selection:"numeric",condition:"implicit"},({attribute:m})=>{var g;return((g=m.decision)==null?void 0:g.kind)===_.DecisionKind.Implicit}).with({attribute:{type:_.AttributeType.Numeric},selection:"numeric",condition:"explicit"},({attribute:m})=>{var g;return((g=m.decision)==null?void 0:g.kind)===_.DecisionKind.Explicit}).with({attribute:{type:_.AttributeType.Numeric},selection:"numeric",condition:"none"},({attribute:m})=>m.decision!=null).with({attribute:{type:_.AttributeType.Choice},selection:"undefined"},()=>l.decision==null).with({attribute:{type:_.AttributeType.Boolean},selection:"undefined"},{attribute:{type:_.AttributeType.Component},selection:"undefined"},{attribute:{type:_.AttributeType.Numeric},selection:"undefined"},({attribute:m})=>m.decision==null).otherwise(()=>!1));return p&&Rt(r(p.content),{ref:n})})),V6=V_,U6={...Xe,...Co,variants:{title:"Variants",type:x.ControlType.Array,maxCount:10,control:{type:x.ControlType.Object,controls:{selection:{title:"Selection",type:x.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded","true","false","numeric"]},condition:{title:"Condition",type:x.ControlType.Enum,defaultValue:"none",options:["none","explicit","implicit","blocked"]},content:{title:"Content",type:x.ControlType.Enum,defaultValue:1,options:[1,2,3,4,5,6,7,8,9,10]},useInDesignTime:{title:"Design Time",type:x.ControlType.Boolean,defaultValue:!1}}}},content1:{title:"Content 1",type:x.ControlType.ComponentInstance},content2:{title:"Content 2",type:x.ControlType.ComponentInstance},content3:{title:"Content 3",type:x.ControlType.ComponentInstance},content4:{title:"Content 4",type:x.ControlType.ComponentInstance},content5:{title:"Content 5",type:x.ControlType.ComponentInstance},content6:{title:"Content 6",type:x.ControlType.ComponentInstance},content7:{title:"Content 7",type:x.ControlType.ComponentInstance},content8:{title:"Content 8",type:x.ControlType.ComponentInstance},content9:{title:"Content 9",type:x.ControlType.ComponentInstance},content10:{title:"Content 10",type:x.ControlType.ComponentInstance}};x.addPropertyControls(V_,U6);const U_=it(e=>{const t=I.useRef(),[n,r]=I.useState(null),o=I.useRef(n),i=I.useMemo(()=>e.color.startsWith("var"),[e.color]),a=i?n:e.color,u=I.useMemo(()=>{if(!a)return;const s=TC(a);return SC.hexToCSSFilter(`#${s}`,{acceptanceLossPercentage:1,maxChecks:30}).filter.replace(";","")},[a]);return I.useLayoutEffect(()=>{if(i){const s=t.current&&getComputedStyle(t.current).color;s!=o.current&&(o.current=s,r(s))}}),b.jsx("div",{ref:t,style:{...e.style,color:e.color,filter:u},children:e.children})}),D6=U_,q6={children:{title:"Content",type:x.ControlType.ComponentInstance},color:{title:"Color",type:x.ControlType.Color,defaultValue:"#0000ff"}};x.addPropertyControls(U_,q6);const D_=it(e=>{if(_e())return e.children;const{error:n}=ce.useConfigurationInitialization();return n?Rt(e.children,{onClick:n.retry}):null}),L6=D_,B6={children:{title:"Content",type:x.ControlType.ComponentInstance}};x.addPropertyControls(D_,B6);function z6(e){return I.forwardRef((t,n)=>{const r={...t.style,width:"100%",height:"100%"};return b.jsx(e,{...t,ref:n,style:r})})}const W6=G.div`
429
482
  width: 10px;
430
483
  height: 10px;
431
484
  background-color: greenyellow;
432
- `;function gi(e){const t=T.useRef(null);return T.useEffect(()=>{if(!t.current)return;const n=setTimeout(()=>{t.current.scrollIntoView()},e.delay);return()=>clearTimeout(n)},[t.current]),d.jsx(Ua,{ref:t})}const _a={delay:{title:"Delay",type:f.ControlType.Number,min:0,unit:"ms",defaultValue:0,step:1}};f.addPropertyControls(gi,_a);const bi=k.div`
485
+ `;function q_(e){const t=I.useRef(null);return I.useEffect(()=>{if(!t.current)return;const n=setTimeout(()=>{t.current.scrollIntoView()},e.delay);return()=>clearTimeout(n)},[t.current]),b.jsx(W6,{ref:t})}const G6={delay:{title:"Delay",type:x.ControlType.Number,min:0,unit:"ms",defaultValue:0,step:1}};x.addPropertyControls(q_,G6);const L_=G.div`
433
486
  display: contents;
434
- `,Qa=k.createGlobalStyle`
487
+ `,K6=G.createGlobalStyle`
435
488
  :root {
436
- *:has(> ${bi}) {
489
+ *:has(> ${L_}) {
437
490
  display: contents !important;
438
491
  }
439
492
  }
440
- `,xi=se(tn(e=>{const t=ae(),n=G(),i=(()=>{const u=b=>{var y;const w=T.Children.toArray(b)[0],m=(y=w.props)==null?void 0:y.children;return m?u(m):w};return u(e.itemTemplate)})();if(!i)return d.jsx("span",{children:"Choice Value Template not defined"});const r=(u,b)=>u.map(w=>T.cloneElement(i,{key:w,layoutId:`${t}_${w}`,attributeId:e.attributeId,componentPath:e.componentPath,sharedConfigurationModel:e.sharedConfigurationModel,choiceValueId:w,choiceValueName:b.get(w)??w}));if(n)return d.jsx(Un,{...e,children:r(["Choice Value 1","Choice Value 2","Choice Value 3"],v.RM.empty)});const l=J(e),s=_.useChoiceAttribute(l);if(!s)return d.jsx("span",{children:"Choice Attribute not found"});const a=ze(l),c=e.filter??new Array,x=[...s.attribute.values.values()].filter(u=>c.length===0||c.some(({selection:b,condition:w})=>M.match({selection:b,condition:w}).with({selection:"included",condition:"blocked"},()=>!u.possibleDecisionStates.includes(p.ChoiceValueDecisionState.Included)).with({selection:"included",condition:"implicit"},()=>{var m,y;return((m=u.decision)==null?void 0:m.state)===p.ChoiceValueDecisionState.Included&&((y=u.decision)==null?void 0:y.kind)===p.DecisionKind.Implicit}).with({selection:"included",condition:"explicit"},()=>{var m,y;return((m=u.decision)==null?void 0:m.state)===p.ChoiceValueDecisionState.Included&&((y=u.decision)==null?void 0:y.kind)===p.DecisionKind.Explicit}).with({selection:"included",condition:"none"},()=>{var m;return((m=u.decision)==null?void 0:m.state)===p.ChoiceValueDecisionState.Included}).with({selection:"excluded",condition:"blocked"},()=>!u.possibleDecisionStates.includes(p.ChoiceValueDecisionState.Excluded)).with({selection:"excluded",condition:"implicit"},()=>{var m,y;return((m=u.decision)==null?void 0:m.state)===p.ChoiceValueDecisionState.Excluded&&((y=u.decision)==null?void 0:y.kind)===p.DecisionKind.Implicit}).with({selection:"excluded",condition:"explicit"},()=>{var m,y;return((m=u.decision)==null?void 0:m.state)===p.ChoiceValueDecisionState.Excluded&&((y=u.decision)==null?void 0:y.kind)===p.DecisionKind.Explicit}).with({selection:"excluded",condition:"none"},()=>{var m;return((m=u.decision)==null?void 0:m.state)===p.ChoiceValueDecisionState.Excluded}).with({selection:"undefined"},()=>u.decision==null).otherwise(()=>!1))),g=ct(l,a,x).map(u=>u.id);return d.jsx(Un,{...e,children:r(g,a)})}));function Un(e){return d.jsxs(d.Fragment,{children:[d.jsx(at,{singletonId:"ChoiceValueListRenderer",children:d.jsx(Qa,{})}),d.jsx(bi,{style:e.style,children:e.children})]})}const Ya=xi,Xa={...re,itemTemplate:{title:"Choice Value Template",type:f.ControlType.ComponentInstance},filter:{title:"Filter",type:f.ControlType.Array,control:{type:f.ControlType.Object,controls:{selection:{title:"Selection",type:f.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded"]},condition:{title:"Condition",type:f.ControlType.Enum,defaultValue:"none",options:["none","explicit","implicit","blocked"]}}}}};f.addPropertyControls(xi,Xa);const{isValidElement:_n,cloneElement:Qn}=E;function Ga(e,t){return t?(Array.isArray(t)&&(t=t.map((n,o)=>_n(n)&&typeof n.props=="object"?Qn(n,{...n.props,key:o}):n)),!e||Array.isArray(e)?t:_n(e)?Qn(e,{...e.props,children:t}):e):e}const{isValidElement:Ja}=E;function Ci(e,t,n){function o(r,l){return t.visit(r,n,l)}function i(r,l){return Ci(r,t,l||n)}if(Ja(e)){if(typeof e.type=="function")return"prototype"in e.type&&e.type.prototype.isReactComponent?e=new e.type(e.props).render():e=e.type(e.props),i(e);if(e.props&&"children"in e.props){const r=e.props.children;return o(e,s=>Array.isArray(r)?r.map(a=>i(a,s)):i(r,s))}}else if(Array.isArray(e)){const r=e;return o(e,s=>r.map(a=>i(a,s)))}return o(e)}const{isValidElement:Yn}=E;function Za(e,t){let n;const{replace:o,updateState:i}=t;return"matchElement"in t?n=r=>Yn(r)&&r.type===t.matchElement:"matchLiteral"in t?n=r=>!Array.isArray(r)&&!Yn(r)&&t.matchLiteral(r):n=t.match,Ci(e,{visit(r,l,s){const a=i?i(l):l,c=s?s(a):void 0,x=Ga(r,c);return n(x,a)?o(x,a):x}},t.initialState)}function Xn(e){return d.jsx(d.Fragment,{children:Za(e.children,e)})}function ec(e){return v.pipe(e,v.Str.replace(/[\s\u2013]/g,"-"),Bi)}const tc=se(e=>{const{children:t,mode:n,replaceString:o,propName:i,elementName:r,text:l}=e;return n==="replace"?d.jsx(Xn,{match:s=>typeof s=="string",replace:s=>s===o?l:s,children:t}):n==="set-prop"?d.jsx(Xn,{match:s=>{var a;return((a=s.type)==null?void 0:a.displayName)===r},replace:s=>T.cloneElement(s,{[ec(i)]:l}),children:t}):t}),mt=tc,nn=e=>({children:{title:"Content",type:f.ControlType.ComponentInstance},mode:{title:"Mode",type:f.ControlType.Enum,defaultValue:"replace",options:["replace","set-prop"],displaySegmentedControl:!0},replaceString:{title:"Replace Text",type:f.ControlType.String,defaultValue:e,hidden:t=>t.mode!=="replace"},elementName:{title:"Element Name",type:f.ControlType.String,hidden:t=>t.mode!=="set-prop"},propName:{title:"Property Name",type:f.ControlType.String,hidden:t=>t.mode!=="set-prop"}}),vi=se(e=>{const{attributeId:t,children:n,customName:o}=e,i=J(e),r=(o==null?void 0:o.length)>0,l=G(),a=r?o:l?t:(()=>_.useAttributes([i],!1)[0]?dt(i)??t:"Attribute not found")();return d.jsx(mt,{...e,text:a})}),nc=vi,oc={...re,customName:{title:"Custom Name",type:f.ControlType.String},...nn("<AttributeName>")};f.addPropertyControls(vi,oc);const wi=se(e=>{const{choiceValueId:t,children:n,customName:o,mode:i,replaceString:r,propName:l,elementName:s}=e,a=J(e),c=o.length>0,x=t.length>0,h=G(),u=c?o:h?t.length>0?t:"Choice Value":(()=>{const b=_.useChoiceAttribute(a);return b?x?b.attribute.values.get(t)==null?"Choice Value not found":io(a,t)??t:"Choice Value Id missing":"Choice Attribute not found"})();return d.jsx(mt,{...e,text:u})}),ic=wi,rc={...re,...Le,customName:{title:"Custom Name",type:f.ControlType.String},...nn("<ChoiceValueName>")};f.addPropertyControls(wi,rc);function Si(e){return e.children}const lc={children:{title:"Content",type:f.ControlType.ComponentInstance}};f.addPropertyControls(Si,lc);function Ti(e){const{children:t,fileExtension:n,fileName:o,target:i}=e;if(G())return t;const{storeConfiguration:l}=_.useConfigurationStoring();return pe(t,{onClick:async()=>{const c={type:"spc-stored-configuration",storedConfiguration:await l()};i==="file"?ac(c,`${o}.${n}`):i==="clipboard"&&cc(c)}})}const sc={children:{title:"Content",type:f.ControlType.ComponentInstance},target:{title:"Target",type:f.ControlType.Enum,defaultValue:"file",options:["file","clipboard"],optionTitles:["File","Clipboard"],displaySegmentedControl:!0,segmentedControlDirection:"vertical"},fileName:{title:"File Name",type:f.ControlType.String,defaultValue:"configuration",hidden:e=>e.target!=="file"},fileExtension:{title:"File Extension",type:f.ControlType.String,defaultValue:"json",hidden:e=>e.target!=="file"}};f.addPropertyControls(Ti,sc);function ac(e,t){const n=JSON.stringify(e),o=new Blob([n],{type:"application/json"}),i=window.URL.createObjectURL(o),r=document.createElement("a");r.href=i,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(i)}function cc(e){const t=JSON.stringify(e);navigator.clipboard.writeText(t).catch(n=>{alert("Failed to copy the configuration to clipboard: "+n)})}var Ei=(e=>(e[e.parseError=0]="parseError",e[e.noConfiguration=1]="noConfiguration",e[e.noFileSelected=2]="noFileSelected",e[e.fileReadError=3]="fileReadError",e[e.noClipboardData=4]="noClipboardData",e[e.clipboardReadError=5]="clipboardReadError",e))(Ei||{});const Ai=fe((e,t)=>{const{children:n,fileExtension:o,source:i}=e;if(G())return n;const l=ae(),{restoreConfiguration:s}=_.useConfigurationStoring(),{handleExplainAnswer:a}=de();return pe(n,{onClick:async()=>{const x=v.pipe(await hc(i,o),v.O.toNullable);if(!x)return;const h={type:"DropExistingDecisions",conflictHandling:M.match(e.autoResolveConflicts).with(!1,()=>({type:"Manual",includeConstraintsInConflictExplanation:!1})).with(!0,()=>({type:"Automatic"})).exhaustive()};try{await s(x,h)}catch(g){const u=g;if(console.debug("Failed to restore stored configuration",u),u.type===p.ConfiguratorErrorType.StoredConfigurationInvalid){alert("The specific configuration is not supported. Maybe the configuration was created with new application version than the current one.");return}if((u==null?void 0:u.type)===p.ConfiguratorErrorType.MakeManyDecisionsConflict&&u.decisionExplanations){e.explain!=="disabled"&&await a(u,e.explain,l);return}alert("Failed to restore your configuration.");return}},ref:t})}),uc=Ai,dc={children:{title:"Content",type:f.ControlType.ComponentInstance},source:{title:"Source",type:f.ControlType.Enum,defaultValue:"file",options:["file","clipboard"],optionTitles:["File","Clipboard"],displaySegmentedControl:!0,segmentedControlDirection:"vertical"},fileExtension:{title:"File Extension",type:f.ControlType.String,defaultValue:"json",hidden:e=>e.source!=="file"},autoResolveConflicts:{title:"Auto Resolve Conflicts",type:f.ControlType.Boolean,defaultValue:!0},...Ne};f.addPropertyControls(Ai,dc);function fc(e){return()=>new Promise(t=>{const n=document.createElement("input");n.type="file",n.accept=`.${e}`,n.onchange=o=>{const i=o.target;if(!i.files||i.files.length===0){t(v.left(2));return}const r=i.files[0],l=new FileReader;l.onload=()=>{t(v.right(l.result))},l.onerror=()=>{t(v.left(3))},l.readAsText(r)},n.oncancel=()=>{t(v.left(2))},n.click()})}function pc(){return()=>navigator.clipboard.readText().then(e=>e?v.right(e):v.left(4)).catch(()=>v.left(5))}function hc(e,t){return v.pipe(e==="file"?fc(t):pc(),v.TE.chainEitherK(n=>v.E.tryCatch(()=>JSON.parse(n),()=>0)),v.TE.filterOrElse(n=>n.type==="spc-stored-configuration",()=>1),v.TE.map(n=>n.storedConfiguration),v.TE.doIfLeft(n=>()=>{console.debug(`Failed to load stored configuration: ${Ei[n]}`),n==3?alert("Failed to read the selected file. Maybe it is damaged."):n==1||n==0?e==="file"?alert("The selected file doesn't contain a valid configuration."):e==="clipboard"&&alert("The clipboard doesn't contain a valid configuration."):n==5?alert("Can't read the clipboard. Make to give a permission for reading the clipboard."):n==4&&alert("The clipboard doesn't contain a configuration.")}),v.TO.fromTaskEither)()}const Ri=se(e=>{const{fallback:t}=e,n=J(e),r=G()?"0.0":(()=>{var a;const l=_.useNumericAttribute(n);if(!l)return"Numeric Attribute not found";const s=(a=l.attribute.decision)==null?void 0:a.state;return s!=null?s.toLocaleString():t})();return d.jsx(mt,{...e,text:r})}),mc=Ri,yc={...re,fallback:{title:"Unselected Text",type:f.ControlType.String,defaultValue:""},...nn("<NumericValue>")};f.addPropertyControls(Ri,yc);exports.AttributeName=nc;exports.BooleanSelect=wa;exports.ChoiceSelect=xa;exports.ChoiceValueListRenderer=Ya;exports.ChoiceValueName=ic;exports.Colorize=Ka;exports.ComponentSelect=Ta;exports.Configuration=Ls;exports.InitializationRetry=qa;exports.NumericInput=Aa;exports.ReplaceText=mt;exports.ResetConfiguration=Fa;exports.RestoreConfiguration=uc;exports.SatisfactionIndicator=La;exports.ScrollIntoView=gi;exports.SelectedNumericValue=mc;exports.SelectionIndicator=Ba;exports.SelectionToggle=Pa;exports.SetSelection=Va;exports.SetSelections=ka;exports.Singleton=at;exports.Slot=Si;exports.StoreConfiguration=Ti;exports.attributeIdPropertyControls=re;exports.choiceValueIdPropertyControls=Le;exports.cloneChildrenWithProps=pe;exports.explainableComponent=fe;exports.parseGlobalAttributeId=J;exports.useAttributeName=dt;exports.useChoiceValueName=io;exports.useChoiceValueNames=ze;exports.useControlId=ae;exports.useDebounceValue=si;exports.useExplain=de;exports.useExplainProcess=ye;exports.useRenderPlaceholder=G;exports.useSortedChoiceValues=ct;exports.withControlId=tn;exports.withErrorBoundary=se;exports.withFullSize=Ha;
493
+ `,B_=it(yp(e=>{const t=st(),n=_e(),o=(()=>{const p=y=>{var g;const h=I.Children.toArray(y)[0],m=(g=h.props)==null?void 0:g.children;return m?p(m):h};return p(e.itemTemplate)})();if(!o)return b.jsx("span",{children:"Choice Value Template not defined"});const i=(p,y)=>p.map(h=>I.cloneElement(o,{key:h,layoutId:`${t}_${h}`,attributeId:e.attributeId,componentPath:e.componentPath,sharedConfigurationModel:e.sharedConfigurationModel,choiceValueId:h,choiceValueName:y.get(h)??h}));if(n)return b.jsx(_b,{...e,children:i(["Choice Value 1","Choice Value 2","Choice Value 3"],v.RM.empty)});const a=Te(e),u=ce.useChoiceAttribute(a);if(!u)return b.jsx("span",{children:"Choice Attribute not found"});const s=Ei(a),c=e.filter??new Array,f=[...u.attribute.values.values()].filter(p=>c.length===0||c.some(({selection:y,condition:h})=>H.match({selection:y,condition:h}).with({selection:"included",condition:"blocked"},()=>!p.possibleDecisionStates.includes(_.ChoiceValueDecisionState.Included)).with({selection:"included",condition:"implicit"},()=>{var m,g;return((m=p.decision)==null?void 0:m.state)===_.ChoiceValueDecisionState.Included&&((g=p.decision)==null?void 0:g.kind)===_.DecisionKind.Implicit}).with({selection:"included",condition:"explicit"},()=>{var m,g;return((m=p.decision)==null?void 0:m.state)===_.ChoiceValueDecisionState.Included&&((g=p.decision)==null?void 0:g.kind)===_.DecisionKind.Explicit}).with({selection:"included",condition:"none"},()=>{var m;return((m=p.decision)==null?void 0:m.state)===_.ChoiceValueDecisionState.Included}).with({selection:"excluded",condition:"blocked"},()=>!p.possibleDecisionStates.includes(_.ChoiceValueDecisionState.Excluded)).with({selection:"excluded",condition:"implicit"},()=>{var m,g;return((m=p.decision)==null?void 0:m.state)===_.ChoiceValueDecisionState.Excluded&&((g=p.decision)==null?void 0:g.kind)===_.DecisionKind.Implicit}).with({selection:"excluded",condition:"explicit"},()=>{var m,g;return((m=p.decision)==null?void 0:m.state)===_.ChoiceValueDecisionState.Excluded&&((g=p.decision)==null?void 0:g.kind)===_.DecisionKind.Explicit}).with({selection:"excluded",condition:"none"},()=>{var m;return((m=p.decision)==null?void 0:m.state)===_.ChoiceValueDecisionState.Excluded}).with({selection:"undefined"},()=>p.decision==null).otherwise(()=>!1))),d=Ku(a,s,f).map(p=>p.id);return b.jsx(_b,{...e,children:i(d,s)})}));function _b(e){return b.jsxs(b.Fragment,{children:[b.jsx(Gu,{singletonId:"ChoiceValueListRenderer",children:b.jsx(K6,{})}),b.jsx(L_,{style:e.style,children:e.children})]})}const H6=B_,J6={...Xe,itemTemplate:{title:"Choice Value Template",type:x.ControlType.ComponentInstance},filter:{title:"Filter",type:x.ControlType.Array,control:{type:x.ControlType.Object,controls:{selection:{title:"Selection",type:x.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded"]},condition:{title:"Condition",type:x.ControlType.Enum,defaultValue:"none",options:["none","explicit","implicit","blocked"]}}}}};x.addPropertyControls(B_,J6);const{isValidElement:wb,cloneElement:Cb}=P;function Q6(e,t){return t?(Array.isArray(t)&&(t=t.map((n,r)=>wb(n)&&typeof n.props=="object"?Cb(n,{...n.props,key:r}):n)),!e||Array.isArray(e)?t:wb(e)?Cb(e,{...e.props,children:t}):e):e}const{isValidElement:X6}=P;function z_(e,t,n){function r(i,a){return t.visit(i,n,a)}function o(i,a){return z_(i,t,a||n)}if(X6(e)){if(typeof e.type=="function")return"prototype"in e.type&&e.type.prototype.isReactComponent?e=new e.type(e.props).render():e=e.type(e.props),o(e);if(e.props&&"children"in e.props){const i=e.props.children;return r(e,u=>Array.isArray(i)?i.map(s=>o(s,u)):o(i,u))}}else if(Array.isArray(e)){const i=e;return r(e,u=>i.map(s=>o(s,u)))}return r(e)}const{isValidElement:Sb}=P;function Z6(e,t){let n;const{replace:r,updateState:o}=t;return"matchElement"in t?n=i=>Sb(i)&&i.type===t.matchElement:"matchLiteral"in t?n=i=>!Array.isArray(i)&&!Sb(i)&&t.matchLiteral(i):n=t.match,z_(e,{visit(i,a,u){const s=o?o(a):a,c=u?u(s):void 0,f=Q6(i,c);return n(f,s)?r(f,s):f}},t.initialState)}function Tb(e){return b.jsx(b.Fragment,{children:Z6(e.children,e)})}function Y6(e){return v.pipe(e,v.Str.replace(/[\s\u2013]/g,"-"),AC)}const e4=it(e=>{const{children:t,mode:n,replaceString:r,propName:o,elementName:i,text:a}=e;return n==="replace"?b.jsx(Tb,{match:u=>typeof u=="string",replace:u=>u===r?a:u,children:t}):n==="set-prop"?b.jsx(Tb,{match:u=>{var s;return((s=u.type)==null?void 0:s.displayName)===i},replace:u=>I.cloneElement(u,{[Y6(o)]:a}),children:t}):t}),_l=e4,mp=e=>({children:{title:"Content",type:x.ControlType.ComponentInstance},mode:{title:"Mode",type:x.ControlType.Enum,defaultValue:"replace",options:["replace","set-prop"],displaySegmentedControl:!0},replaceString:{title:"Replace Text",type:x.ControlType.String,defaultValue:e,hidden:t=>t.mode!=="replace"},elementName:{title:"Element Name",type:x.ControlType.String,hidden:t=>t.mode!=="set-prop"},propName:{title:"Property Name",type:x.ControlType.String,hidden:t=>t.mode!=="set-prop"}}),W_=it(e=>{const{attributeId:t,children:n,customName:r}=e,o=Te(e),i=(r==null?void 0:r.length)>0,a=_e(),s=i?r:a?t:(()=>ce.useAttributes([o],!1)[0]?ys(o)??t:"Attribute not found")();return b.jsx(_l,{...e,text:s})}),t4=W_,n4={...Xe,customName:{title:"Custom Name",type:x.ControlType.String},...mp("<AttributeName>")};x.addPropertyControls(W_,n4);const G_=it(e=>{const{choiceValueId:t,children:n,customName:r,mode:o,replaceString:i,propName:a,elementName:u}=e,s=Te(e),c=r.length>0,f=t.length>0,l=_e(),p=c?r:l?t.length>0?t:"Choice Value":(()=>{const y=ce.useChoiceAttribute(s);return y?f?y.attribute.values.get(t)==null?"Choice Value not found":Ub(s,t)??t:"Choice Value Id missing":"Choice Attribute not found"})();return b.jsx(_l,{...e,text:p})}),r4=G_,o4={...Xe,...Co,customName:{title:"Custom Name",type:x.ControlType.String},...mp("<ChoiceValueName>")};x.addPropertyControls(G_,o4);function K_(e){return e.children}const i4={children:{title:"Content",type:x.ControlType.ComponentInstance}};x.addPropertyControls(K_,i4);function H_(e){const{children:t,fileExtension:n,fileName:r,target:o}=e;if(_e())return t;const{storeConfiguration:a}=ce.useConfigurationStoring();return Rt(t,{onClick:async()=>{const c={type:"spc-stored-configuration",storedConfiguration:await a()};o==="file"?u4(c,`${r}.${n}`):o==="clipboard"&&s4(c)}})}const a4={children:{title:"Content",type:x.ControlType.ComponentInstance},target:{title:"Target",type:x.ControlType.Enum,defaultValue:"file",options:["file","clipboard"],optionTitles:["File","Clipboard"],displaySegmentedControl:!0,segmentedControlDirection:"vertical"},fileName:{title:"File Name",type:x.ControlType.String,defaultValue:"configuration",hidden:e=>e.target!=="file"},fileExtension:{title:"File Extension",type:x.ControlType.String,defaultValue:"json",hidden:e=>e.target!=="file"}};x.addPropertyControls(H_,a4);function u4(e,t){const n=JSON.stringify(e),r=new Blob([n],{type:"application/json"}),o=window.URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(o)}function s4(e){const t=JSON.stringify(e);navigator.clipboard.writeText(t).catch(n=>{alert("Failed to copy the configuration to clipboard: "+n)})}var J_=(e=>(e[e.parseError=0]="parseError",e[e.noConfiguration=1]="noConfiguration",e[e.noFileSelected=2]="noFileSelected",e[e.fileReadError=3]="fileReadError",e[e.noClipboardData=4]="noClipboardData",e[e.clipboardReadError=5]="clipboardReadError",e))(J_||{});const Q_=Ft((e,t)=>{const{children:n,fileExtension:r,source:o}=e;if(_e())return n;const a=st(),{restoreConfiguration:u}=ce.useConfigurationStoring(),{handleExplainAnswer:s}=kt();return Rt(n,{onClick:async()=>{const f=v.pipe(await p4(o,r),v.O.toNullable);if(!f)return;const l={type:"DropExistingDecisions",conflictHandling:H.match(e.autoResolveConflicts).with(!1,()=>({type:"Manual",includeConstraintsInConflictExplanation:!1})).with(!0,()=>({type:"Automatic"})).exhaustive()};try{await u(f,l)}catch(d){const p=d;if(console.debug("Failed to restore stored configuration",p),p.type===_.ConfiguratorErrorType.StoredConfigurationInvalid){alert("The specific configuration is not supported. Maybe the configuration was created with new application version than the current one.");return}if((p==null?void 0:p.type)===_.ConfiguratorErrorType.MakeManyDecisionsConflict&&p.decisionExplanations){e.explain!=="disabled"&&await s(p,e.explain,a);return}alert("Failed to restore your configuration.");return}},ref:t})}),c4=Q_,l4={children:{title:"Content",type:x.ControlType.ComponentInstance},source:{title:"Source",type:x.ControlType.Enum,defaultValue:"file",options:["file","clipboard"],optionTitles:["File","Clipboard"],displaySegmentedControl:!0,segmentedControlDirection:"vertical"},fileExtension:{title:"File Extension",type:x.ControlType.String,defaultValue:"json",hidden:e=>e.source!=="file"},autoResolveConflicts:{title:"Auto Resolve Conflicts",type:x.ControlType.Boolean,defaultValue:!0},...wo};x.addPropertyControls(Q_,l4);function f4(e){return()=>new Promise(t=>{const n=document.createElement("input");n.type="file",n.accept=`.${e}`,n.onchange=r=>{const o=r.target;if(!o.files||o.files.length===0){t(v.left(2));return}const i=o.files[0],a=new FileReader;a.onload=()=>{t(v.right(a.result))},a.onerror=()=>{t(v.left(3))},a.readAsText(i)},n.oncancel=()=>{t(v.left(2))},n.click()})}function d4(){return()=>navigator.clipboard.readText().then(e=>e?v.right(e):v.left(4)).catch(()=>v.left(5))}function p4(e,t){return v.pipe(e==="file"?f4(t):d4(),v.TE.chainEitherK(n=>v.E.tryCatch(()=>JSON.parse(n),()=>0)),v.TE.filterOrElse(n=>n.type==="spc-stored-configuration",()=>1),v.TE.map(n=>n.storedConfiguration),v.TE.doIfLeft(n=>()=>{console.debug(`Failed to load stored configuration: ${J_[n]}`),n==3?alert("Failed to read the selected file. Maybe it is damaged."):n==1||n==0?e==="file"?alert("The selected file doesn't contain a valid configuration."):e==="clipboard"&&alert("The clipboard doesn't contain a valid configuration."):n==5?alert("Can't read the clipboard. Make to give a permission for reading the clipboard."):n==4&&alert("The clipboard doesn't contain a configuration.")}),v.TO.fromTaskEither)()}const X_=it(e=>{const{fallback:t}=e,n=Te(e),i=_e()?"0.0":(()=>{var s;const a=ce.useNumericAttribute(n);if(!a)return"Numeric Attribute not found";const u=(s=a.attribute.decision)==null?void 0:s.state;return u!=null?u.toLocaleString():t})();return b.jsx(_l,{...e,text:i})}),h4=X_,y4={...Xe,fallback:{title:"Unselected Text",type:x.ControlType.String,defaultValue:""},...mp("<NumericValue>")};x.addPropertyControls(X_,y4);exports.AttributeName=t4;exports.BooleanSelect=_6;exports.ChoiceSelect=b6;exports.ChoiceValueListRenderer=H6;exports.ChoiceValueName=r4;exports.Colorize=D6;exports.ComponentSelect=C6;exports.Configuration=FB;exports.InitializationRetry=L6;exports.NumericInput=T6;exports.ReplaceText=_l;exports.ResetConfiguration=M6;exports.RestoreConfiguration=c4;exports.SatisfactionIndicator=F6;exports.ScrollIntoView=q_;exports.SelectedNumericValue=h4;exports.SelectionIndicator=V6;exports.SelectionToggle=O6;exports.SetSelection=N6;exports.SetSelections=$6;exports.Singleton=Gu;exports.Slot=K_;exports.StoreConfiguration=H_;exports.attributeIdPropertyControls=Xe;exports.choiceValueIdPropertyControls=Co;exports.cloneChildrenWithProps=Rt;exports.explainableComponent=Ft;exports.parseGlobalAttributeId=Te;exports.useAttributeName=ys;exports.useChoiceValueName=Ub;exports.useChoiceValueNames=Ei;exports.useControlId=st;exports.useDebounceValue=j_;exports.useExplain=kt;exports.useExplainProcess=Zt;exports.useRenderPlaceholder=_e;exports.useSortedChoiceValues=Ku;exports.withControlId=yp;exports.withErrorBoundary=it;exports.withFullSize=z6;