@viamedici-spc/configurator-framer 2.2.0-alpha0003 → 2.2.0-alpha0004
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +10 -10
- package/dist/index.js +167 -161
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -67,7 +67,7 @@ ${c}`);case h.ConfiguratorErrorType.SessionParametersInvalid:return o(`Configura
|
|
|
67
67
|
--shape-border-radius-md: 12px;
|
|
68
68
|
--shape-border-radius-lg: 20px;
|
|
69
69
|
}
|
|
70
|
-
`,yr=mr;function Cn(){return f.jsxs(f.Fragment,{children:[f.jsx(yr,{}),f.jsx(gr,{}),f.jsx(pr,{})]})}const _e=T.createContext(null);function xe(){const{process:e,switchMode:t,applySolution:n,dismiss:o}=T.useContext(_e);return e?{...e,switchMode:t,applySolution:n,dismiss:o}:null}const bo=(e={})=>({padding:{type:d.ControlType.FusedNumber,title:"Padding",toggleKey:"isMixedPadding",toggleTitles:["Padding","Padding per Side"],valueKeys:["paddingTop","paddingRight","paddingBottom","paddingLeft"],valueLabels:["Top","Right","Bottom","Left"],min:0,defaultValue:e.padding??0}}),xo=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}),_t=(e={})=>{var t,n;return{radius:{title:"Radius",type:d.ControlType.Number,defaultValue:e.radius??0},border:{title:"Border",type:d.ControlType.Object,controls:{color:{type:d.ControlType.Color,title:"Color",defaultValue:(t=e.border)==null?void 0:t.color},width:{type:d.ControlType.FusedNumber,title:"Width",toggleKey:"isMixedWidth",toggleTitles:["Width","Width per Side"],valueKeys:["widthTop","widthRight","widthBottom","widthLeft"],valueLabels:["Top","Right","Bottom","Left"],min:0,defaultValue:((n=e.border)==null?void 0:n.width)??0}}}}},Co=e=>{var t,n,o,i,r,l,s,a,c,x,g,C,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:(g=e.border)!=null&&g.isMixedWidth?(C=e.border)==null?void 0:C.widthLeft:(u=e.border)==null?void 0:u.width,borderStyle:"solid"}},He=(e={})=>({fill:{title:"Fill",type:d.ControlType.Color,defaultValue:e.fill},backdropFilter:{title:"Backdrop Filter",type:d.ControlType.String,defaultValue:e.backdropFilter??"none"},shadow:{title:"Shadow",type:d.ControlType.String,defaultValue:e.shadow??"none"},filter:{title:"Filter",type:d.ControlType.String,defaultValue:e.filter??"none"},...bo(e),..._t(e)}),Be=e=>({...xo(e),...Co(e),backgroundColor:e.fill,backdropFilter:e.backdropFilter,boxShadow:e.shadow,filter:e.filter}),de=(e={})=>{var t,n;return{color:{title:"Color",type:d.ControlType.Color,defaultValue:e.color??"black"},text:{title:"Text",type:d.ControlType.Font,controls:"basic",displayTextAlignment:!0,displayFontSize:!0,defaultValue:{fontSize:(t=e.text)==null?void 0:t.fontSize,textAlign:(n=e.text)==null?void 0:n.textAlign}}}},fe=e=>({...e.text,color:e.color}),st=(e={})=>({staticText:{title:"Text",type:d.ControlType.String,defaultValue:e.staticText},...de(e)}),at=e=>fe(e),ct=(e={})=>{var t,n,o;return{fillHover:{title:"Fill – Hover",type:d.ControlType.Color,defaultValue:e.fillHover},focusOutline:{title:"Focus Outline",type:d.ControlType.Object,controls:{color:{title:"Color",type:d.ControlType.Color,defaultValue:(t=e.focusOutline)==null?void 0:t.color},size:{title:"Size",type:d.ControlType.Number,defaultValue:(n=e.focusOutline)==null?void 0:n.size},offset:{title:"Offset",type:d.ControlType.Number,defaultValue:(o=e.focusOutline)==null?void 0:o.offset}}},...He(e),...st(e)}},vt=e=>({...Be(e),...at(e),"--color-button-fill-hover":e.fillHover,"--color-button-focus-outline":e.focusOutline.color,"--size-button-focus-outline":`${e.focusOutline.size}px`,"--size-button-focus-outline-offset":`${e.focusOutline.offset}px`}),ut=(e={})=>({margin:{type:d.ControlType.FusedNumber,title:"Margin",toggleKey:"isMixedMargin",toggleTitles:["Margin","Margin per Side"],valueKeys:["marginTop","marginRight","marginBottom","marginLeft"],valueLabels:["Top","Right","Bottom","Left"],defaultValue:e.margin??0}}),wt=e=>({marginTop:e.isMixedMargin?e.marginTop:e.margin,marginRight:e.isMixedMargin?e.marginRight:e.margin,marginBottom:e.isMixedMargin?e.marginBottom:e.margin,marginLeft:e.isMixedMargin?e.marginLeft:e.margin}),br=(e={})=>{var t,n,o,i;return{subject:{title:"Subject",type:d.ControlType.Object,controls:{...de(e.subject??{}),configurationSubjectTitle:{title:"Configuration Subject Title",type:d.ControlType.String,defaultValue:((t=e.subject)==null?void 0:t.configurationSubjectTitle)??"Configuration"},generalConflictTitle:{title:"General Conflict Title",type:d.ControlType.String,defaultValue:((n=e.subject)==null?void 0:n.generalConflictTitle)??"Conflict"}}},suffix:{title:"Suffix",type:d.ControlType.Object,controls:{...de(e.suffix??{}),isBlockedSuffix:{title:"Is Blocked Suffix",type:d.ControlType.String,defaultValue:((o=e.suffix)==null?void 0:o.isBlockedSuffix)??"is blocked"},isNotSatisfiedSuffix:{title:"Is Not Satisfied Suffix",type:d.ControlType.String,defaultValue:((i=e.suffix)==null?void 0:i.isNotSatisfiedSuffix)??"is not satisfied"}}}}},vo=(e={})=>{var t,n,o,i,r,l,s,a,c,x,g,C,u,b,w,y,m,v,P,S;return{header:{title:"Header",type:d.ControlType.Object,controls:{...br(e.header??{})}},attributeName:{title:"Attribute Name",type:d.ControlType.Object,controls:{...de(e.attributeName??{})}},attributeValue:{title:"Attribute Value",type:d.ControlType.Object,controls:{add:{title:"Adding",type:d.ControlType.Object,controls:{...de(((t=e.attributeValue)==null?void 0:t.add)??{}),..._t(((n=e.attributeValue)==null?void 0:n.add)??{}),fill:{title:"Fill",type:d.ControlType.Color,defaultValue:(i=(o=e.attributeValue)==null?void 0:o.add)==null?void 0:i.fill},iconFill:{title:"Icon Fill",type:d.ControlType.Color,defaultValue:(l=(r=e.attributeValue)==null?void 0:r.add)==null?void 0:l.iconFill},iconColor:{title:"Icon Color",type:d.ControlType.Color,defaultValue:(a=(s=e.attributeValue)==null?void 0:s.add)==null?void 0:a.iconColor}}},remove:{title:"Removing",type:d.ControlType.Object,controls:{...de(((c=e.attributeValue)==null?void 0:c.remove)??{}),..._t(((x=e.attributeValue)==null?void 0:x.remove)??{}),fill:{title:"Fill",type:d.ControlType.Color,defaultValue:(C=(g=e.attributeValue)==null?void 0:g.remove)==null?void 0:C.fill},iconFill:{title:"Icon Fill",type:d.ControlType.Color,defaultValue:(b=(u=e.attributeValue)==null?void 0:u.remove)==null?void 0:b.iconFill},iconColor:{title:"Icon Color",type:d.ControlType.Color,defaultValue:(y=(w=e.attributeValue)==null?void 0:w.remove)==null?void 0:y.iconColor}}},...bo(e.attributeValue??{}),componentDecisionStateIncludedLabel:{title:"Component Decision State Included Label",type:d.ControlType.String,defaultValue:((m=e.attributeValue)==null?void 0:m.componentDecisionStateIncludedLabel)??"Included"},componentDecisionStateExcludedLabel:{title:"Component Decision State Excluded Label",type:d.ControlType.String,defaultValue:((v=e.attributeValue)==null?void 0:v.componentDecisionStateExcludedLabel)??"Excluded"},booleanDecisionStateTrueLabel:{title:"Boolean Decision State True Label",type:d.ControlType.String,defaultValue:((P=e.attributeValue)==null?void 0:P.booleanDecisionStateTrueLabel)??"Yes"},booleanDecisionStateFalseLabel:{title:"Boolean Decision State False Label",type:d.ControlType.String,defaultValue:((S=e.attributeValue)==null?void 0:S.booleanDecisionStateFalseLabel)??"No"}}},applySolutionButton:{title:"Apply Solution Button",type:d.ControlType.Object,controls:{...ct(e.applySolutionButton??{}),...ut(e.applySolutionButton??{})}},closeButton:{title:"Close Button",type:d.ControlType.Object,controls:{...ct(e.closeButton??{})}},infoMessage:{title:"Info Message",type:d.ControlType.Object,controls:{...de(e.infoMessage??{})}}}},xr={popoverBox:{title:"Popover Box",type:d.ControlType.Object,controls:He({fill:"#002134",radius:12,padding:18,isMixedPadding:!1,filter:"drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.4))"})},subline:{title:"Subline",type:d.ControlType.Object,controls:{...st({color:"white",staticText:"Solution",text:{fontWeight:"500",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}})}},...vo({header:{subject:{color:"rgb(0, 161, 230)",text:{fontWeight:"500",fontSize:19,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}},suffix:{color:"white",text:{fontWeight:"500",fontSize:19,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}}},attributeName:{color:"white",text:{fontWeight:"400",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}},attributeValue:{add:{color:"white",text:{fontWeight:"500",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},radius:300,fill:"rgba(255, 255, 255, 0.2)",iconFill:"rgba(47, 255, 0, 0.2)",iconColor:"#63e446"},remove:{color:"white",text:{fontWeight:"500",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},radius:300,fill:"rgba(255, 255, 255, 0.2)",iconFill:"#ff00004a",iconColor:"#ff6060"},paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:10,isMixedPadding:!0},applySolutionButton:{fill:"rgb(0, 161, 230)",radius:300,paddingTop:9,paddingBottom:9,paddingLeft:29,paddingRight:29,isMixedPadding:!0,color:"white",staticText:"Apply Solution",text:{textAlign:"center",fontWeight:"600",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},focusOutline:{color:"rgba(255, 255, 255, 0.8)",size:2,offset:-1},marginTop:18,isMixedMargin:!0},closeButton:{fill:"transparent",radius:5,paddingTop:1,paddingBottom:1,paddingLeft:6,paddingRight:6,isMixedPadding:!0,color:"white",staticText:"Close",text:{textAlign:"center",fontWeight:"400",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},focusOutline:{color:"rgba(255, 255, 255, 0.8)",size:2,offset:-1}},infoMessage:{color:"white",text:{fontWeight:"400",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}}}),showConstraintsButton:{title:"Show Constraints Button",type:d.ControlType.Object,controls:{...ct({fill:"transparent",radius:5,paddingTop:1,paddingBottom:1,paddingLeft:6,paddingRight:6,isMixedPadding:!0,color:"white",staticText:"Show Constraints",text:{textAlign:"center",fontWeight:"500",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},focusOutline:{color:"rgba(255, 255, 255, 0.8)",size:2,offset:-1}}),...ut({marginTop:13})}},showMoreButton:{title:"Show More Button",type:d.ControlType.Object,controls:{...ct({fill:"transparent",radius:5,paddingTop:1,paddingBottom:1,paddingLeft:6,paddingRight:6,isMixedPadding:!0,color:"white",staticText:"Show more ({{amount}})",text:{textAlign:"center",fontWeight:"500",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},focusOutline:{color:"rgba(255, 255, 255, 0.8)",size:2,offset:-1}}),...ut({marginTop:13})}},listSeparator:{title:"List Separator",type:d.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.3)"}},en=T.createContext(null),St=()=>T.useContext(en),Cr={dialogBox:{title:"Dialog Box",type:d.ControlType.Object,controls:He({fill:"rgba(255, 255, 255, 0.7)",backdropFilter:"blur(10px) saturate(200%)",shadow:"0.2px 0.4px 2.3px rgba(0, 0, 0, 0.02), 0.6px 1px 5.7px rgba(0, 0, 0, 0.025), 1.2px 2.1px 10.6px rgba(0, 0, 0, 0.03), 2.3px 4px 17.2px rgba(0, 0, 0, 0.034), 4.2px 7.2px 25.9px rgba(0, 0, 0, 0.04), 7.6px 12.8px 37.7px rgba(0, 0, 0, 0.048), 13.9px 23.6px 54.7px rgba(0, 0, 0, 0.061), 40px 68px 96px rgba(0, 0, 0, 0.1)",radius:12,paddingTop:18,paddingBottom:0,paddingLeft:20,paddingRight:24,isMixedPadding:!0})},explanationCard:{title:"Explanation Card",type:d.ControlType.Object,controls:{...He({fill:"white",shadow:"2px 1px 10px -5px rgba(0, 0, 0, 0.4)",radius:7,padding:12,isMixedPadding:!1}),...ut({marginLeft:-12,marginRight:-12,isMixedMargin:!0})}},constraintExplanation:{title:"Constraint Explanation",type:d.ControlType.Object,controls:{configurationModelId:{title:"Configuration Model Id",type:d.ControlType.Object,controls:de({color:"#171717",text:{fontWeight:"400",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}})},ruleId:{title:"Rule Id",type:d.ControlType.Object,controls:de({color:"#171717",text:{fontWeight:"500",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}})}}},...vo({header:{subject:{color:"rgb(0, 161, 230)",text:{fontWeight:"500",fontSize:19,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}},suffix:{color:"#171717",text:{fontWeight:"500",fontSize:19,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}}},attributeName:{color:"#171717",text:{fontWeight:"400",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}},attributeValue:{add:{color:"white",text:{fontWeight:"500",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},radius:300,fill:"#efefef",iconFill:"#cfefc7",iconColor:"#48c52b"},remove:{color:"white",text:{fontWeight:"500",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},radius:300,fill:"#efefef",iconFill:"#ffdada",iconColor:"#c52b2b"},paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:10,isMixedPadding:!0},applySolutionButton:{fill:"#F2F2F2",radius:7,paddingTop:9,paddingBottom:9,paddingLeft:29,paddingRight:29,isMixedPadding:!0,color:"#171717",staticText:"Apply Solution",text:{textAlign:"center",fontWeight:"600",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},focusOutline:{color:"#00a1e6",size:2,offset:-1},marginTop:18,isMixedMargin:!0},closeButton:{fill:"transparent",radius:5,paddingTop:1,paddingBottom:1,paddingLeft:6,paddingRight:6,isMixedPadding:!0,color:"#171717",staticText:"Close",text:{textAlign:"center",fontWeight:"400",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},focusOutline:{color:"#00a1e6",size:2,offset:-1}},infoMessage:{color:"#171717",text:{fontWeight:"400",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}}}),decisionExplanationSolutionsTitle:{title:"Decision Explanation Solutions Title",type:d.ControlType.Object,controls:{...st({color:"#171717",staticText:"Solutions",text:{fontWeight:"500",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}})}},constraintExplanationSolutionsTitle:{title:"Constraint Explanation Solutions Title",type:d.ControlType.Object,controls:{...st({color:"#171717",staticText:"Constraint Explanations",text:{fontWeight:"500",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}})}},scrollShadowBorder:{title:"Scroll Shadow Border",type:d.ControlType.Color,defaultValue:"rgba(0, 0, 0, 0.3)"}},tn=T.createContext(null),Tt=()=>T.useContext(tn),vr=()=>T.useContext(en)||T.useContext(tn),Ye=vr,wr=k.button`
|
|
70
|
+
`,yr=mr;function Cn(){return f.jsxs(f.Fragment,{children:[f.jsx(yr,{}),f.jsx(gr,{}),f.jsx(pr,{})]})}const He=T.createContext(null);function xe(){const{process:e,switchMode:t,applySolution:n,dismiss:o}=T.useContext(He);return e?{...e,switchMode:t,applySolution:n,dismiss:o}:null}const bo=(e={})=>({padding:{type:d.ControlType.FusedNumber,title:"Padding",toggleKey:"isMixedPadding",toggleTitles:["Padding","Padding per Side"],valueKeys:["paddingTop","paddingRight","paddingBottom","paddingLeft"],valueLabels:["Top","Right","Bottom","Left"],min:0,defaultValue:e.padding??0}}),xo=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}),Ht=(e={})=>{var t,n;return{radius:{title:"Radius",type:d.ControlType.Number,defaultValue:e.radius??0},border:{title:"Border",type:d.ControlType.Object,controls:{color:{type:d.ControlType.Color,title:"Color",defaultValue:(t=e.border)==null?void 0:t.color},width:{type:d.ControlType.FusedNumber,title:"Width",toggleKey:"isMixedWidth",toggleTitles:["Width","Width per Side"],valueKeys:["widthTop","widthRight","widthBottom","widthLeft"],valueLabels:["Top","Right","Bottom","Left"],min:0,defaultValue:((n=e.border)==null?void 0:n.width)??0}}}}},Co=e=>{var t,n,o,i,r,l,s,a,c,x,g,C,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:(g=e.border)!=null&&g.isMixedWidth?(C=e.border)==null?void 0:C.widthLeft:(u=e.border)==null?void 0:u.width,borderStyle:"solid"}},_e=(e={})=>({fill:{title:"Fill",type:d.ControlType.Color,defaultValue:e.fill},backdropFilter:{title:"Backdrop Filter",type:d.ControlType.String,defaultValue:e.backdropFilter??"none"},shadow:{title:"Shadow",type:d.ControlType.String,defaultValue:e.shadow??"none"},filter:{title:"Filter",type:d.ControlType.String,defaultValue:e.filter??"none"},...bo(e),...Ht(e)}),Be=e=>({...xo(e),...Co(e),backgroundColor:e.fill,backdropFilter:e.backdropFilter,boxShadow:e.shadow,filter:e.filter}),de=(e={})=>{var t,n;return{color:{title:"Color",type:d.ControlType.Color,defaultValue:e.color??"black"},text:{title:"Text",type:d.ControlType.Font,controls:"basic",displayTextAlignment:!0,displayFontSize:!0,defaultValue:{fontSize:(t=e.text)==null?void 0:t.fontSize,textAlign:(n=e.text)==null?void 0:n.textAlign}}}},fe=e=>({...e.text,color:e.color}),st=(e={})=>({staticText:{title:"Text",type:d.ControlType.String,defaultValue:e.staticText},...de(e)}),at=e=>fe(e),ct=(e={})=>{var t,n,o;return{fillHover:{title:"Fill – Hover",type:d.ControlType.Color,defaultValue:e.fillHover},focusOutline:{title:"Focus Outline",type:d.ControlType.Object,controls:{color:{title:"Color",type:d.ControlType.Color,defaultValue:(t=e.focusOutline)==null?void 0:t.color},size:{title:"Size",type:d.ControlType.Number,defaultValue:(n=e.focusOutline)==null?void 0:n.size},offset:{title:"Offset",type:d.ControlType.Number,defaultValue:(o=e.focusOutline)==null?void 0:o.offset}}},..._e(e),...st(e)}},vt=e=>({...Be(e),...at(e),"--color-button-fill-hover":e.fillHover,"--color-button-focus-outline":e.focusOutline.color,"--size-button-focus-outline":`${e.focusOutline.size}px`,"--size-button-focus-outline-offset":`${e.focusOutline.offset}px`}),ut=(e={})=>({margin:{type:d.ControlType.FusedNumber,title:"Margin",toggleKey:"isMixedMargin",toggleTitles:["Margin","Margin per Side"],valueKeys:["marginTop","marginRight","marginBottom","marginLeft"],valueLabels:["Top","Right","Bottom","Left"],defaultValue:e.margin??0}}),wt=e=>({marginTop:e.isMixedMargin?e.marginTop:e.margin,marginRight:e.isMixedMargin?e.marginRight:e.margin,marginBottom:e.isMixedMargin?e.marginBottom:e.margin,marginLeft:e.isMixedMargin?e.marginLeft:e.margin}),br=(e={})=>{var t,n,o,i;return{subject:{title:"Subject",type:d.ControlType.Object,controls:{...de(e.subject??{}),configurationSubjectTitle:{title:"Configuration Subject Title",type:d.ControlType.String,defaultValue:((t=e.subject)==null?void 0:t.configurationSubjectTitle)??"Configuration"},generalConflictTitle:{title:"General Conflict Title",type:d.ControlType.String,defaultValue:((n=e.subject)==null?void 0:n.generalConflictTitle)??"Conflict"}}},suffix:{title:"Suffix",type:d.ControlType.Object,controls:{...de(e.suffix??{}),isBlockedSuffix:{title:"Is Blocked Suffix",type:d.ControlType.String,defaultValue:((o=e.suffix)==null?void 0:o.isBlockedSuffix)??"is blocked"},isNotSatisfiedSuffix:{title:"Is Not Satisfied Suffix",type:d.ControlType.String,defaultValue:((i=e.suffix)==null?void 0:i.isNotSatisfiedSuffix)??"is not satisfied"}}}}},vo=(e={})=>{var t,n,o,i,r,l,s,a,c,x,g,C,u,b,w,y,m,v,P,S;return{header:{title:"Header",type:d.ControlType.Object,controls:{...br(e.header??{})}},attributeName:{title:"Attribute Name",type:d.ControlType.Object,controls:{...de(e.attributeName??{})}},attributeValue:{title:"Attribute Value",type:d.ControlType.Object,controls:{add:{title:"Adding",type:d.ControlType.Object,controls:{...de(((t=e.attributeValue)==null?void 0:t.add)??{}),...Ht(((n=e.attributeValue)==null?void 0:n.add)??{}),fill:{title:"Fill",type:d.ControlType.Color,defaultValue:(i=(o=e.attributeValue)==null?void 0:o.add)==null?void 0:i.fill},iconFill:{title:"Icon Fill",type:d.ControlType.Color,defaultValue:(l=(r=e.attributeValue)==null?void 0:r.add)==null?void 0:l.iconFill},iconColor:{title:"Icon Color",type:d.ControlType.Color,defaultValue:(a=(s=e.attributeValue)==null?void 0:s.add)==null?void 0:a.iconColor}}},remove:{title:"Removing",type:d.ControlType.Object,controls:{...de(((c=e.attributeValue)==null?void 0:c.remove)??{}),...Ht(((x=e.attributeValue)==null?void 0:x.remove)??{}),fill:{title:"Fill",type:d.ControlType.Color,defaultValue:(C=(g=e.attributeValue)==null?void 0:g.remove)==null?void 0:C.fill},iconFill:{title:"Icon Fill",type:d.ControlType.Color,defaultValue:(b=(u=e.attributeValue)==null?void 0:u.remove)==null?void 0:b.iconFill},iconColor:{title:"Icon Color",type:d.ControlType.Color,defaultValue:(y=(w=e.attributeValue)==null?void 0:w.remove)==null?void 0:y.iconColor}}},...bo(e.attributeValue??{}),componentDecisionStateIncludedLabel:{title:"Component Decision State Included Label",type:d.ControlType.String,defaultValue:((m=e.attributeValue)==null?void 0:m.componentDecisionStateIncludedLabel)??"Included"},componentDecisionStateExcludedLabel:{title:"Component Decision State Excluded Label",type:d.ControlType.String,defaultValue:((v=e.attributeValue)==null?void 0:v.componentDecisionStateExcludedLabel)??"Excluded"},booleanDecisionStateTrueLabel:{title:"Boolean Decision State True Label",type:d.ControlType.String,defaultValue:((P=e.attributeValue)==null?void 0:P.booleanDecisionStateTrueLabel)??"Yes"},booleanDecisionStateFalseLabel:{title:"Boolean Decision State False Label",type:d.ControlType.String,defaultValue:((S=e.attributeValue)==null?void 0:S.booleanDecisionStateFalseLabel)??"No"}}},applySolutionButton:{title:"Apply Solution Button",type:d.ControlType.Object,controls:{...ct(e.applySolutionButton??{}),...ut(e.applySolutionButton??{})}},closeButton:{title:"Close Button",type:d.ControlType.Object,controls:{...ct(e.closeButton??{})}},infoMessage:{title:"Info Message",type:d.ControlType.Object,controls:{...de(e.infoMessage??{})}}}},xr={popoverBox:{title:"Popover Box",type:d.ControlType.Object,controls:_e({fill:"#002134",radius:12,padding:18,isMixedPadding:!1,filter:"drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.4))"})},subline:{title:"Subline",type:d.ControlType.Object,controls:{...st({color:"white",staticText:"Solution",text:{fontWeight:"500",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}})}},...vo({header:{subject:{color:"rgb(0, 161, 230)",text:{fontWeight:"500",fontSize:19,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}},suffix:{color:"white",text:{fontWeight:"500",fontSize:19,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}}},attributeName:{color:"white",text:{fontWeight:"400",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}},attributeValue:{add:{color:"white",text:{fontWeight:"500",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},radius:300,fill:"rgba(255, 255, 255, 0.2)",iconFill:"rgba(47, 255, 0, 0.2)",iconColor:"#63e446"},remove:{color:"white",text:{fontWeight:"500",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},radius:300,fill:"rgba(255, 255, 255, 0.2)",iconFill:"#ff00004a",iconColor:"#ff6060"},paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:10,isMixedPadding:!0},applySolutionButton:{fill:"rgb(0, 161, 230)",fillHover:"#15ACED",radius:300,paddingTop:9,paddingBottom:9,paddingLeft:29,paddingRight:29,isMixedPadding:!0,color:"white",staticText:"Apply Solution",text:{textAlign:"center",fontWeight:"600",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},focusOutline:{color:"rgba(255, 255, 255, 0.8)",size:2,offset:-1},marginTop:18,isMixedMargin:!0},closeButton:{fill:"transparent",fillHover:"#FFFFFF26",radius:300,paddingTop:2,paddingBottom:2,paddingLeft:6,paddingRight:6,isMixedPadding:!0,color:"white",staticText:"Close",text:{textAlign:"center",fontWeight:"400",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},focusOutline:{color:"rgba(255, 255, 255, 0.8)",size:2,offset:-1}},infoMessage:{color:"white",text:{fontWeight:"400",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}}}),showConstraintsButton:{title:"Show Constraints Button",type:d.ControlType.Object,controls:{...ct({fill:"transparent",fillHover:"transparent",radius:5,paddingTop:1,paddingBottom:1,paddingLeft:6,paddingRight:6,isMixedPadding:!0,color:"white",staticText:"Show Constraints",text:{textAlign:"center",fontWeight:"500",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},focusOutline:{color:"rgba(255, 255, 255, 0.8)",size:2,offset:-1}}),...ut({marginTop:13})}},showMoreButton:{title:"Show More Button",type:d.ControlType.Object,controls:{...ct({fill:"transparent",fillHover:"transparent",radius:5,paddingTop:1,paddingBottom:1,paddingLeft:6,paddingRight:6,isMixedPadding:!0,color:"white",staticText:"Show more ({{amount}})",text:{textAlign:"center",fontWeight:"500",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},focusOutline:{color:"rgba(255, 255, 255, 0.8)",size:2,offset:-1}}),...ut({marginTop:13})}},listSeparator:{title:"List Separator",type:d.ControlType.Color,defaultValue:"rgba(255, 255, 255, 0.3)"}},en=T.createContext(null),St=()=>T.useContext(en),Cr={dialogBox:{title:"Dialog Box",type:d.ControlType.Object,controls:_e({fill:"rgba(255, 255, 255, 0.7)",backdropFilter:"blur(10px) saturate(200%)",shadow:"0.2px 0.4px 2.3px rgba(0, 0, 0, 0.02), 0.6px 1px 5.7px rgba(0, 0, 0, 0.025), 1.2px 2.1px 10.6px rgba(0, 0, 0, 0.03), 2.3px 4px 17.2px rgba(0, 0, 0, 0.034), 4.2px 7.2px 25.9px rgba(0, 0, 0, 0.04), 7.6px 12.8px 37.7px rgba(0, 0, 0, 0.048), 13.9px 23.6px 54.7px rgba(0, 0, 0, 0.061), 40px 68px 96px rgba(0, 0, 0, 0.1)",radius:12,paddingTop:18,paddingBottom:0,paddingLeft:24,paddingRight:24,isMixedPadding:!0})},explanationCard:{title:"Explanation Card",type:d.ControlType.Object,controls:{..._e({fill:"white",shadow:"2px 1px 10px -5px rgba(0, 0, 0, 0.4)",radius:7,padding:12,isMixedPadding:!1}),...ut({marginLeft:-12,marginRight:-12,isMixedMargin:!0})}},constraintExplanation:{title:"Constraint Explanation",type:d.ControlType.Object,controls:{configurationModelId:{title:"Configuration Model Id",type:d.ControlType.Object,controls:de({color:"#171717",text:{fontWeight:"400",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}})},ruleId:{title:"Rule Id",type:d.ControlType.Object,controls:de({color:"#171717",text:{fontWeight:"500",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}})}}},...vo({header:{subject:{color:"rgb(0, 161, 230)",text:{fontWeight:"500",fontSize:19,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}},suffix:{color:"#171717",text:{fontWeight:"500",fontSize:19,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}}},attributeName:{color:"#171717",text:{fontWeight:"400",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}},attributeValue:{add:{color:"#171717",text:{fontWeight:"500",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},radius:300,fill:"#efefef",iconFill:"#cfefc7",iconColor:"#48c52b"},remove:{color:"#171717",text:{fontWeight:"500",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},radius:300,fill:"#efefef",iconFill:"#ffdada",iconColor:"#c52b2b"},paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:10,isMixedPadding:!0},applySolutionButton:{fill:"#F2F2F2",fillHover:"#F7F7F7",radius:7,paddingTop:9,paddingBottom:9,paddingLeft:29,paddingRight:29,isMixedPadding:!0,color:"#171717",staticText:"Apply Solution",text:{textAlign:"center",fontWeight:"600",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},focusOutline:{color:"#00a1e6",size:2,offset:-1},marginTop:18,isMixedMargin:!0},closeButton:{fill:"transparent",fillHover:"00000012",radius:300,paddingTop:2,paddingBottom:2,paddingLeft:6,paddingRight:6,isMixedPadding:!0,color:"#171717",staticText:"Close",text:{textAlign:"center",fontWeight:"400",fontSize:14,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'},focusOutline:{color:"#00a1e6",size:2,offset:-1}},infoMessage:{color:"#171717",text:{fontWeight:"400",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}}}),decisionExplanationSolutionsTitle:{title:"Decision Explanation Solutions Title",type:d.ControlType.Object,controls:{...st({color:"#171717",staticText:"Solutions",text:{fontWeight:"500",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}})}},constraintExplanationSolutionsTitle:{title:"Constraint Explanation Solutions Title",type:d.ControlType.Object,controls:{...st({color:"#171717",staticText:"Constraint Explanations",text:{fontWeight:"500",fontSize:16,fontFamily:'var(--framer-font-family, "Inter", "Inter Placeholder", sans-serif)'}})}},scrollShadowBorder:{title:"Scroll Shadow Border",type:d.ControlType.Color,defaultValue:"rgba(0, 0, 0, 0.3)"}},tn=T.createContext(null),Tt=()=>T.useContext(tn),vr=()=>T.useContext(en)||T.useContext(tn),Ye=vr,wr=k.button`
|
|
71
71
|
appearance: none;
|
|
72
72
|
cursor: pointer;
|
|
73
73
|
|
|
@@ -144,10 +144,10 @@ ${c}`);case h.ConfiguratorErrorType.SessionParametersInvalid:return o(`Configura
|
|
|
144
144
|
width: min-content;
|
|
145
145
|
min-width: 400px;
|
|
146
146
|
margin: var(--space-sm-fixed) var(--space-md-fixed) var(--space-sm-fixed) var(--space-sm-fixed);
|
|
147
|
-
`;function Br(){const{decisionExplanations:e,constraintExplanations:t,hasError:n}=xe(),{decisionExplanationSolutionsTitle:o,constraintExplanationSolutionsTitle:i}=Tt();return n?f.jsx(Tn,{variant:"failedToExplain"}):e.length===0&&t.length===0?f.jsx(Tn,{variant:"noExplanationFound"}):f.jsxs(Nr,{children:[e.length>0&&f.jsxs("div",{children:[f.jsx(wn,{style:at(o),children:o.staticText}),f.jsx(Sn,{children:e.map(r=>f.jsx(kr,{explanation:r},e.indexOf(r)))})]}),t.length>0&&f.jsxs("div",{children:[f.jsx(wn,{style:at(i),children:i.staticText}),f.jsx(Sn,{children:t.map(r=>f.jsx(Lr,{explanation:r},t.indexOf(r)))})]})]})}function be(e){return Io(e)?(e.nodeName||"").toLowerCase():"#document"}function re(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ce(e){var t;return(t=(Io(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Io(e){return e instanceof Node||e instanceof re(e).Node}function X(e){return e instanceof Element||e instanceof re(e).Element}function ne(e){return e instanceof HTMLElement||e instanceof re(e).HTMLElement}function Ht(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof re(e).ShadowRoot}function Xe(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=le(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function $r(e){return["table","td","th"].includes(be(e))}function on(e){const t=rn(),n=le(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 Ro(e){let t=Ae(e);for(;ne(t)&&!ke(t);){if(on(t))return t;t=Ae(t)}return null}function rn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ke(e){return["html","body","#document"].includes(be(e))}function le(e){return re(e).getComputedStyle(e)}function It(e){return X(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ae(e){if(be(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ht(e)&&e.host||Ce(e);return Ht(t)?t.host:t}function Po(e){const t=Ae(e);return ke(t)?e.ownerDocument?e.ownerDocument.body:e.body:ne(t)&&Xe(t)?t:Po(t)}function ve(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Po(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),l=re(i);return r?t.concat(l,l.visualViewport||[],Xe(i)?i:[],l.frameElement&&n?ve(l.frameElement):[]):t.concat(i,ve(i,[],n))}function Oe(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 ie(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ht(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Oo(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Do(){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 zr(e){return e.mozInputSource===0&&e.isTrusted?!0:Ut()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Wr(e){return qr()?!1:!Ut()&&e.width===0&&e.height===0||Ut()&&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 Kr(){return/apple/i.test(navigator.vendor)}function Ut(){const e=/android/i;return e.test(Oo())||e.test(Do())}function qr(){return Do().includes("jsdom/")}function En(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function _r(e){return"nativeEvent"in e}function Hr(e){return e.matches("html,body")}function ye(e){return(e==null?void 0:e.ownerDocument)||document}function Dt(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 De(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Ur="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Vo(e){return ne(e)&&e.matches(Ur)}function Vt(e){e.preventDefault(),e.stopPropagation()}function Qr(e){return e?e.getAttribute("role")==="combobox"&&Vo(e):!1}const Me=Math.min,Ee=Math.max,dt=Math.round,tt=Math.floor,we=e=>({x:e,y:e}),Yr={left:"right",right:"left",bottom:"top",top:"bottom"},Gr={start:"end",end:"start"};function Qt(e,t,n){return Ee(e,Me(t,n))}function Je(e,t){return typeof e=="function"?e(t):e}function Ie(e){return e.split("-")[0]}function Ze(e){return e.split("-")[1]}function jo(e){return e==="x"?"y":"x"}function ln(e){return e==="y"?"height":"width"}function Rt(e){return["top","bottom"].includes(Ie(e))?"y":"x"}function sn(e){return jo(Rt(e))}function Xr(e,t,n){n===void 0&&(n=!1);const o=Ze(e),i=sn(e),r=ln(i);let l=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=ft(l)),[l,ft(l)]}function Jr(e){const t=ft(e);return[Yt(e),t,Yt(t)]}function Yt(e){return e.replace(/start|end/g,t=>Gr[t])}function Zr(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 el(e,t,n,o){const i=Ze(e);let r=Zr(Ie(e),n==="start",o);return i&&(r=r.map(l=>l+"-"+i),t&&(r=r.concat(r.map(Yt)))),r}function ft(e){return e.replace(/left|right|bottom|top/g,t=>Yr[t])}function tl(e){return{top:0,right:0,bottom:0,left:0,...e}}function ko(e){return typeof e!="number"?tl(e):{top:e,right:e,bottom:e,left:e}}function pt(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function An(e,t,n){let{reference:o,floating:i}=e;const r=Rt(t),l=sn(t),s=ln(l),a=Ie(t),c=r==="y",x=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,C=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:g};break;case"left":u={x:o.x-i.width,y:g};break;default:u={x:o.x,y:o.y}}switch(Ze(t)){case"start":u[l]-=C*(n&&c?-1:1);break;case"end":u[l]+=C*(n&&c?-1:1);break}return u}const nl=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:g}=An(c,o,a),C=o,u={},b=0;for(let w=0;w<s.length;w++){const{name:y,fn:m}=s[w],{x:v,y:P,data:S,reset:I}=await m({x,y:g,initialPlacement:o,placement:C,strategy:i,middlewareData:u,rects:c,platform:l,elements:{reference:e,floating:t}});x=v??x,g=P??g,u={...u,[y]:{...u[y],...S}},I&&b<=50&&(b++,typeof I=="object"&&(I.placement&&(C=I.placement),I.rects&&(c=I.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x,y:g}=An(c,C,a)),w=-1)}return{x,y:g,placement:C,strategy:i,middlewareData:u}};async function Mo(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:g="floating",altBoundary:C=!1,padding:u=0}=Je(t,e),b=ko(u),y=s[C?g==="floating"?"reference":"floating":g],m=pt(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(y)))==null||n?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:x,strategy:a})),v=g==="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},I=pt(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:P,strategy:a}):v);return{top:(m.top-I.top+b.top)/S.y,bottom:(I.bottom-m.bottom+b.bottom)/S.y,left:(m.left-I.left+b.left)/S.x,right:(I.right-m.right+b.right)/S.x}}const ol=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}=Je(e,t)||{};if(c==null)return{};const g=ko(x),C={x:n,y:o},u=sn(i),b=ln(u),w=await l.getDimensions(c),y=u==="y",m=y?"top":"left",v=y?"bottom":"right",P=y?"clientHeight":"clientWidth",S=r.reference[b]+r.reference[u]-C[u]-r.floating[b],I=C[u]-r.reference[u],R=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let D=R?R[P]:0;(!D||!await(l.isElement==null?void 0:l.isElement(R)))&&(D=s.floating[P]||r.floating[b]);const O=S/2-I/2,j=D/2-w[b]/2-1,A=Me(g[m],j),F=Me(g[v],j),B=A,W=D-w[b]-F,_=D/2-w[b]/2+O,M=Qt(B,_,W),$=!a.arrow&&Ze(i)!=null&&_!==M&&r.reference[b]/2-(_<B?A:F)-w[b]/2<0,V=$?_<B?_-B:_-W:0;return{[u]:C[u]+V,data:{[u]:M,centerOffset:_-M-V,...$&&{alignmentOffset:V}},reset:$}}}),il=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:g=!0,fallbackPlacements:C,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,...y}=Je(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const m=Ie(i),v=Ie(s)===s,P=await(a.isRTL==null?void 0:a.isRTL(c.floating)),S=C||(v||!w?[ft(s)]:Jr(s));!C&&b!=="none"&&S.push(...el(s,w,b,P));const I=[s,...S],R=await Mo(t,y),D=[];let O=((o=r.flip)==null?void 0:o.overflows)||[];if(x&&D.push(R[m]),g){const B=Xr(i,l,P);D.push(R[B[0]],R[B[1]])}if(O=[...O,{placement:i,overflows:D}],!D.every(B=>B<=0)){var j,A;const B=(((j=r.flip)==null?void 0:j.index)||0)+1,W=I[B];if(W)return{data:{index:B,overflows:O},reset:{placement:W}};let _=(A=O.filter(M=>M.overflows[0]<=0).sort((M,$)=>M.overflows[1]-$.overflows[1])[0])==null?void 0:A.placement;if(!_)switch(u){case"bestFit":{var F;const M=(F=O.map($=>[$.placement,$.overflows.filter(V=>V>0).reduce((V,L)=>V+L,0)]).sort(($,V)=>$[1]-V[1])[0])==null?void 0:F[0];M&&(_=M);break}case"initialPlacement":_=s;break}if(i!==_)return{reset:{placement:_}}}return{}}}};async function rl(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=Ie(n),s=Ze(n),a=Rt(n)==="y",c=["left","top"].includes(l)?-1:1,x=r&&a?-1:1,g=Je(t,e);let{mainAxis:C,crossAxis:u,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(u=s==="end"?b*-1:b),a?{x:u*x,y:C*c}:{x:C*c,y:u*x}}const ll=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 rl(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}}}}},sl=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:y=>{let{x:m,y:v}=y;return{x:m,y:v}}},...a}=Je(e,t),c={x:n,y:o},x=await Mo(t,a),g=Rt(Ie(i)),C=jo(g);let u=c[C],b=c[g];if(r){const y=C==="y"?"top":"left",m=C==="y"?"bottom":"right",v=u+x[y],P=u-x[m];u=Qt(v,u,P)}if(l){const y=g==="y"?"top":"left",m=g==="y"?"bottom":"right",v=b+x[y],P=b-x[m];b=Qt(v,b,P)}const w=s.fn({...t,[C]:u,[g]:b});return{...w,data:{x:w.x-n,y:w.y-o}}}}};function Fo(e){const t=le(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=ne(e),r=i?e.offsetWidth:n,l=i?e.offsetHeight:o,s=dt(n)!==r||dt(o)!==l;return s&&(n=r,o=l),{width:n,height:o,$:s}}function an(e){return X(e)?e:e.contextElement}function je(e){const t=an(e);if(!ne(t))return we(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=Fo(t);let l=(r?dt(n.width):n.width)/o,s=(r?dt(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const al=we(0);function Lo(e){const t=re(e);return!rn()||!t.visualViewport?al:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==re(e)?!1:t}function Re(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=an(e);let l=we(1);t&&(o?X(o)&&(l=je(o)):l=je(e));const s=cl(r,n,o)?Lo(r):we(0);let a=(i.left+s.x)/l.x,c=(i.top+s.y)/l.y,x=i.width/l.x,g=i.height/l.y;if(r){const C=re(r),u=o&&X(o)?re(o):o;let b=C.frameElement;for(;b&&o&&u!==C;){const w=je(b),y=b.getBoundingClientRect(),m=le(b),v=y.left+(b.clientLeft+parseFloat(m.paddingLeft))*w.x,P=y.top+(b.clientTop+parseFloat(m.paddingTop))*w.y;a*=w.x,c*=w.y,x*=w.x,g*=w.y,a+=v,c+=P,b=re(b).frameElement}}return pt({width:x,height:g,x:a,y:c})}const ul=[":popover-open",":modal"];function No(e){let t=!1,n=0,o=0;function i(r){try{t=t||e.matches(r)}catch{}}if(ul.forEach(r=>{i(r)}),t){const r=Ro(e);if(r){const l=r.getBoundingClientRect();n=l.x,o=l.y}}return[t,n,o]}function dl(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=Ce(o),[l]=t?No(t.floating):[!1];if(o===r||l)return n;let s={scrollLeft:0,scrollTop:0},a=we(1);const c=we(0),x=ne(o);if((x||!x&&i!=="fixed")&&((be(o)!=="body"||Xe(r))&&(s=It(o)),ne(o))){const g=Re(o);a=je(o),c.x=g.x+o.clientLeft,c.y=g.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 fl(e){return Array.from(e.getClientRects())}function Bo(e){return Re(Ce(e)).left+It(e).scrollLeft}function pl(e){const t=Ce(e),n=It(e),o=e.ownerDocument.body,i=Ee(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=Ee(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+Bo(e);const s=-n.scrollTop;return le(o).direction==="rtl"&&(l+=Ee(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:s}}function hl(e,t){const n=re(e),o=Ce(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=rn();(!c||c&&t==="fixed")&&(s=i.offsetLeft,a=i.offsetTop)}return{width:r,height:l,x:s,y:a}}function gl(e,t){const n=Re(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=ne(e)?je(e):we(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 In(e,t,n){let o;if(t==="viewport")o=hl(e,n);else if(t==="document")o=pl(Ce(e));else if(X(t))o=gl(t,n);else{const i=Lo(e);o={...t,x:t.x-i.x,y:t.y-i.y}}return pt(o)}function $o(e,t){const n=Ae(e);return n===t||!X(n)||ke(n)?!1:le(n).position==="fixed"||$o(n,t)}function ml(e,t){const n=t.get(e);if(n)return n;let o=ve(e,[],!1).filter(s=>X(s)&&be(s)!=="body"),i=null;const r=le(e).position==="fixed";let l=r?Ae(e):e;for(;X(l)&&!ke(l);){const s=le(l),a=on(l);!a&&s.position==="fixed"&&(i=null),(r?!a&&!i:!a&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Xe(l)&&!a&&$o(e,l))?o=o.filter(x=>x!==l):i=s,l=Ae(l)}return t.set(e,o),o}function yl(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const l=[...n==="clippingAncestors"?ml(t,this._c):[].concat(n),o],s=l[0],a=l.reduce((c,x)=>{const g=In(t,x,i);return c.top=Ee(g.top,c.top),c.right=Me(g.right,c.right),c.bottom=Me(g.bottom,c.bottom),c.left=Ee(g.left,c.left),c},In(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function bl(e){const{width:t,height:n}=Fo(e);return{width:t,height:n}}function xl(e,t,n,o){const i=ne(t),r=Ce(t),l=n==="fixed",s=Re(e,!0,l,t);let a={scrollLeft:0,scrollTop:0};const c=we(0);if(i||!i&&!l)if((be(t)!=="body"||Xe(r))&&(a=It(t)),i){const w=Re(t,!0,l,t);c.x=w.x+t.clientLeft,c.y=w.y+t.clientTop}else r&&(c.x=Bo(r));let x=s.left+a.scrollLeft-c.x,g=s.top+a.scrollTop-c.y;const[C,u,b]=No(o);return C&&(x+=u,g+=b,i&&(x+=t.clientLeft,g+=t.clientTop)),{x,y:g,width:s.width,height:s.height}}function Rn(e,t){return!ne(e)||le(e).position==="fixed"?null:t?t(e):e.offsetParent}function zo(e,t){const n=re(e);if(!ne(e))return n;let o=Rn(e,t);for(;o&&$r(o)&&le(o).position==="static";)o=Rn(o,t);return o&&(be(o)==="html"||be(o)==="body"&&le(o).position==="static"&&!on(o))?n:o||Ro(e)||n}const Cl=async function(e){const t=this.getOffsetParent||zo,n=this.getDimensions;return{reference:xl(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function vl(e){return le(e).direction==="rtl"}const Wo={convertOffsetParentRelativeRectToViewportRelativeRect:dl,getDocumentElement:Ce,getClippingRect:yl,getOffsetParent:zo,getElementRects:Cl,getClientRects:fl,getDimensions:bl,getScale:je,isElement:X,isRTL:vl};function wl(e,t){let n=null,o;const i=Ce(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:g,height:C}=e.getBoundingClientRect();if(s||t(),!g||!C)return;const u=tt(x),b=tt(i.clientWidth-(c+g)),w=tt(i.clientHeight-(x+C)),y=tt(c),v={rootMargin:-u+"px "+-b+"px "+-w+"px "+-y+"px",threshold:Ee(0,Me(1,a))||1};let P=!0;function S(I){const R=I[0].intersectionRatio;if(R!==a){if(!P)return l();R?l(!1,R):o=setTimeout(()=>{l(!1,1e-7)},100)}P=!1}try{n=new IntersectionObserver(S,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return l(!0),r}function Sl(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=an(e),x=i||r?[...c?ve(c):[],...ve(t)]:[];x.forEach(m=>{i&&m.addEventListener("scroll",n,{passive:!0}),r&&m.addEventListener("resize",n)});const g=c&&s?wl(c,n):null;let C=-1,u=null;l&&(u=new ResizeObserver(m=>{let[v]=m;v&&v.target===c&&u&&(u.unobserve(t),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var P;(P=u)==null||P.observe(t)})),n()}),c&&!a&&u.observe(c),u.observe(t));let b,w=a?Re(e):null;a&&y();function y(){const m=Re(e);w&&(m.x!==w.x||m.y!==w.y||m.width!==w.width||m.height!==w.height)&&n(),w=m,b=requestAnimationFrame(y)}return n(),()=>{var m;x.forEach(v=>{i&&v.removeEventListener("scroll",n),r&&v.removeEventListener("resize",n)}),g==null||g(),(m=u)==null||m.disconnect(),u=null,a&&cancelAnimationFrame(b)}}const Tl=sl,El=il,Pn=ol,Al=(e,t,n)=>{const o=new Map,i={platform:Wo,...n},r={...i.platform,_c:o};return nl(e,t,{...i,platform:r})},Il=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?Pn({element:o.current,padding:i}).fn(n):{}:o?Pn({element:o,padding:i}).fn(n):{}}}};var it=typeof document<"u"?T.useLayoutEffect:T.useEffect;function ht(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(!ht(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)&&!ht(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function Ko(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function On(e,t){const n=Ko(e);return Math.round(t*n)/n}function Dn(e){const t=E.useRef(e);return it(()=>{t.current=e}),t}function Rl(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,g]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[C,u]=E.useState(o);ht(C,o)||u(o);const[b,w]=E.useState(null),[y,m]=E.useState(null),v=E.useCallback(V=>{V!==R.current&&(R.current=V,w(V))},[]),P=E.useCallback(V=>{V!==D.current&&(D.current=V,m(V))},[]),S=r||b,I=l||y,R=E.useRef(null),D=E.useRef(null),O=E.useRef(x),j=a!=null,A=Dn(a),F=Dn(i),B=E.useCallback(()=>{if(!R.current||!D.current)return;const V={placement:t,strategy:n,middleware:C};F.current&&(V.platform=F.current),Al(R.current,D.current,V).then(L=>{const te={...L,isPositioned:!0};W.current&&!ht(O.current,te)&&(O.current=te,sr.flushSync(()=>{g(te)}))})},[C,t,n,F]);it(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,g(V=>({...V,isPositioned:!1})))},[c]);const W=E.useRef(!1);it(()=>(W.current=!0,()=>{W.current=!1}),[]),it(()=>{if(S&&(R.current=S),I&&(D.current=I),S&&I){if(A.current)return A.current(S,I,B);B()}},[S,I,B,A,j]);const _=E.useMemo(()=>({reference:R,floating:D,setReference:v,setFloating:P}),[v,P]),M=E.useMemo(()=>({reference:S,floating:I}),[S,I]),$=E.useMemo(()=>{const V={position:n,left:0,top:0};if(!M.floating)return V;const L=On(M.floating,x.x),te=On(M.floating,x.y);return s?{...V,transform:"translate("+L+"px, "+te+"px)",...Ko(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:te}},[n,s,M.floating,x.x,x.y]);return E.useMemo(()=>({...x,update:B,refs:_,elements:M,floatingStyles:$}),[x,B,_,M,$])}/*!
|
|
147
|
+
`;function Br(){const{decisionExplanations:e,constraintExplanations:t,hasError:n}=xe(),{decisionExplanationSolutionsTitle:o,constraintExplanationSolutionsTitle:i}=Tt();return n?f.jsx(Tn,{variant:"failedToExplain"}):e.length===0&&t.length===0?f.jsx(Tn,{variant:"noExplanationFound"}):f.jsxs(Nr,{children:[e.length>0&&f.jsxs("div",{children:[f.jsx(wn,{style:at(o),children:o.staticText}),f.jsx(Sn,{children:e.map(r=>f.jsx(kr,{explanation:r},e.indexOf(r)))})]}),t.length>0&&f.jsxs("div",{children:[f.jsx(wn,{style:at(i),children:i.staticText}),f.jsx(Sn,{children:t.map(r=>f.jsx(Lr,{explanation:r},t.indexOf(r)))})]})]})}function be(e){return Io(e)?(e.nodeName||"").toLowerCase():"#document"}function re(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ce(e){var t;return(t=(Io(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Io(e){return e instanceof Node||e instanceof re(e).Node}function X(e){return e instanceof Element||e instanceof re(e).Element}function ne(e){return e instanceof HTMLElement||e instanceof re(e).HTMLElement}function _t(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof re(e).ShadowRoot}function Xe(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=le(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function $r(e){return["table","td","th"].includes(be(e))}function on(e){const t=rn(),n=le(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 Ro(e){let t=Ae(e);for(;ne(t)&&!ke(t);){if(on(t))return t;t=Ae(t)}return null}function rn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ke(e){return["html","body","#document"].includes(be(e))}function le(e){return re(e).getComputedStyle(e)}function It(e){return X(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ae(e){if(be(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_t(e)&&e.host||Ce(e);return _t(t)?t.host:t}function Po(e){const t=Ae(e);return ke(t)?e.ownerDocument?e.ownerDocument.body:e.body:ne(t)&&Xe(t)?t:Po(t)}function ve(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Po(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),l=re(i);return r?t.concat(l,l.visualViewport||[],Xe(i)?i:[],l.frameElement&&n?ve(l.frameElement):[]):t.concat(i,ve(i,[],n))}function Oe(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 ie(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&_t(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Oo(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Do(){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 zr(e){return e.mozInputSource===0&&e.isTrusted?!0:Ut()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Wr(e){return qr()?!1:!Ut()&&e.width===0&&e.height===0||Ut()&&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 Kr(){return/apple/i.test(navigator.vendor)}function Ut(){const e=/android/i;return e.test(Oo())||e.test(Do())}function qr(){return Do().includes("jsdom/")}function En(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Hr(e){return"nativeEvent"in e}function _r(e){return e.matches("html,body")}function ye(e){return(e==null?void 0:e.ownerDocument)||document}function Dt(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 De(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Ur="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Vo(e){return ne(e)&&e.matches(Ur)}function Vt(e){e.preventDefault(),e.stopPropagation()}function Qr(e){return e?e.getAttribute("role")==="combobox"&&Vo(e):!1}const Me=Math.min,Ee=Math.max,dt=Math.round,tt=Math.floor,we=e=>({x:e,y:e}),Yr={left:"right",right:"left",bottom:"top",top:"bottom"},Gr={start:"end",end:"start"};function Qt(e,t,n){return Ee(e,Me(t,n))}function Je(e,t){return typeof e=="function"?e(t):e}function Ie(e){return e.split("-")[0]}function Ze(e){return e.split("-")[1]}function jo(e){return e==="x"?"y":"x"}function ln(e){return e==="y"?"height":"width"}function Rt(e){return["top","bottom"].includes(Ie(e))?"y":"x"}function sn(e){return jo(Rt(e))}function Xr(e,t,n){n===void 0&&(n=!1);const o=Ze(e),i=sn(e),r=ln(i);let l=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=ft(l)),[l,ft(l)]}function Jr(e){const t=ft(e);return[Yt(e),t,Yt(t)]}function Yt(e){return e.replace(/start|end/g,t=>Gr[t])}function Zr(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 el(e,t,n,o){const i=Ze(e);let r=Zr(Ie(e),n==="start",o);return i&&(r=r.map(l=>l+"-"+i),t&&(r=r.concat(r.map(Yt)))),r}function ft(e){return e.replace(/left|right|bottom|top/g,t=>Yr[t])}function tl(e){return{top:0,right:0,bottom:0,left:0,...e}}function ko(e){return typeof e!="number"?tl(e):{top:e,right:e,bottom:e,left:e}}function pt(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function An(e,t,n){let{reference:o,floating:i}=e;const r=Rt(t),l=sn(t),s=ln(l),a=Ie(t),c=r==="y",x=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,C=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:g};break;case"left":u={x:o.x-i.width,y:g};break;default:u={x:o.x,y:o.y}}switch(Ze(t)){case"start":u[l]-=C*(n&&c?-1:1);break;case"end":u[l]+=C*(n&&c?-1:1);break}return u}const nl=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:g}=An(c,o,a),C=o,u={},b=0;for(let w=0;w<s.length;w++){const{name:y,fn:m}=s[w],{x:v,y:P,data:S,reset:I}=await m({x,y:g,initialPlacement:o,placement:C,strategy:i,middlewareData:u,rects:c,platform:l,elements:{reference:e,floating:t}});x=v??x,g=P??g,u={...u,[y]:{...u[y],...S}},I&&b<=50&&(b++,typeof I=="object"&&(I.placement&&(C=I.placement),I.rects&&(c=I.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x,y:g}=An(c,C,a)),w=-1)}return{x,y:g,placement:C,strategy:i,middlewareData:u}};async function Mo(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:g="floating",altBoundary:C=!1,padding:u=0}=Je(t,e),b=ko(u),y=s[C?g==="floating"?"reference":"floating":g],m=pt(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(y)))==null||n?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:x,strategy:a})),v=g==="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},I=pt(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:P,strategy:a}):v);return{top:(m.top-I.top+b.top)/S.y,bottom:(I.bottom-m.bottom+b.bottom)/S.y,left:(m.left-I.left+b.left)/S.x,right:(I.right-m.right+b.right)/S.x}}const ol=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}=Je(e,t)||{};if(c==null)return{};const g=ko(x),C={x:n,y:o},u=sn(i),b=ln(u),w=await l.getDimensions(c),y=u==="y",m=y?"top":"left",v=y?"bottom":"right",P=y?"clientHeight":"clientWidth",S=r.reference[b]+r.reference[u]-C[u]-r.floating[b],I=C[u]-r.reference[u],R=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let D=R?R[P]:0;(!D||!await(l.isElement==null?void 0:l.isElement(R)))&&(D=s.floating[P]||r.floating[b]);const O=S/2-I/2,j=D/2-w[b]/2-1,A=Me(g[m],j),F=Me(g[v],j),B=A,W=D-w[b]-F,H=D/2-w[b]/2+O,M=Qt(B,H,W),$=!a.arrow&&Ze(i)!=null&&H!==M&&r.reference[b]/2-(H<B?A:F)-w[b]/2<0,V=$?H<B?H-B:H-W:0;return{[u]:C[u]+V,data:{[u]:M,centerOffset:H-M-V,...$&&{alignmentOffset:V}},reset:$}}}),il=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:g=!0,fallbackPlacements:C,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,...y}=Je(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const m=Ie(i),v=Ie(s)===s,P=await(a.isRTL==null?void 0:a.isRTL(c.floating)),S=C||(v||!w?[ft(s)]:Jr(s));!C&&b!=="none"&&S.push(...el(s,w,b,P));const I=[s,...S],R=await Mo(t,y),D=[];let O=((o=r.flip)==null?void 0:o.overflows)||[];if(x&&D.push(R[m]),g){const B=Xr(i,l,P);D.push(R[B[0]],R[B[1]])}if(O=[...O,{placement:i,overflows:D}],!D.every(B=>B<=0)){var j,A;const B=(((j=r.flip)==null?void 0:j.index)||0)+1,W=I[B];if(W)return{data:{index:B,overflows:O},reset:{placement:W}};let H=(A=O.filter(M=>M.overflows[0]<=0).sort((M,$)=>M.overflows[1]-$.overflows[1])[0])==null?void 0:A.placement;if(!H)switch(u){case"bestFit":{var F;const M=(F=O.map($=>[$.placement,$.overflows.filter(V=>V>0).reduce((V,L)=>V+L,0)]).sort(($,V)=>$[1]-V[1])[0])==null?void 0:F[0];M&&(H=M);break}case"initialPlacement":H=s;break}if(i!==H)return{reset:{placement:H}}}return{}}}};async function rl(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=Ie(n),s=Ze(n),a=Rt(n)==="y",c=["left","top"].includes(l)?-1:1,x=r&&a?-1:1,g=Je(t,e);let{mainAxis:C,crossAxis:u,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof b=="number"&&(u=s==="end"?b*-1:b),a?{x:u*x,y:C*c}:{x:C*c,y:u*x}}const ll=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 rl(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}}}}},sl=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:y=>{let{x:m,y:v}=y;return{x:m,y:v}}},...a}=Je(e,t),c={x:n,y:o},x=await Mo(t,a),g=Rt(Ie(i)),C=jo(g);let u=c[C],b=c[g];if(r){const y=C==="y"?"top":"left",m=C==="y"?"bottom":"right",v=u+x[y],P=u-x[m];u=Qt(v,u,P)}if(l){const y=g==="y"?"top":"left",m=g==="y"?"bottom":"right",v=b+x[y],P=b-x[m];b=Qt(v,b,P)}const w=s.fn({...t,[C]:u,[g]:b});return{...w,data:{x:w.x-n,y:w.y-o}}}}};function Fo(e){const t=le(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=ne(e),r=i?e.offsetWidth:n,l=i?e.offsetHeight:o,s=dt(n)!==r||dt(o)!==l;return s&&(n=r,o=l),{width:n,height:o,$:s}}function an(e){return X(e)?e:e.contextElement}function je(e){const t=an(e);if(!ne(t))return we(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=Fo(t);let l=(r?dt(n.width):n.width)/o,s=(r?dt(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const al=we(0);function Lo(e){const t=re(e);return!rn()||!t.visualViewport?al:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==re(e)?!1:t}function Re(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=an(e);let l=we(1);t&&(o?X(o)&&(l=je(o)):l=je(e));const s=cl(r,n,o)?Lo(r):we(0);let a=(i.left+s.x)/l.x,c=(i.top+s.y)/l.y,x=i.width/l.x,g=i.height/l.y;if(r){const C=re(r),u=o&&X(o)?re(o):o;let b=C.frameElement;for(;b&&o&&u!==C;){const w=je(b),y=b.getBoundingClientRect(),m=le(b),v=y.left+(b.clientLeft+parseFloat(m.paddingLeft))*w.x,P=y.top+(b.clientTop+parseFloat(m.paddingTop))*w.y;a*=w.x,c*=w.y,x*=w.x,g*=w.y,a+=v,c+=P,b=re(b).frameElement}}return pt({width:x,height:g,x:a,y:c})}const ul=[":popover-open",":modal"];function No(e){let t=!1,n=0,o=0;function i(r){try{t=t||e.matches(r)}catch{}}if(ul.forEach(r=>{i(r)}),t){const r=Ro(e);if(r){const l=r.getBoundingClientRect();n=l.x,o=l.y}}return[t,n,o]}function dl(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=Ce(o),[l]=t?No(t.floating):[!1];if(o===r||l)return n;let s={scrollLeft:0,scrollTop:0},a=we(1);const c=we(0),x=ne(o);if((x||!x&&i!=="fixed")&&((be(o)!=="body"||Xe(r))&&(s=It(o)),ne(o))){const g=Re(o);a=je(o),c.x=g.x+o.clientLeft,c.y=g.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 fl(e){return Array.from(e.getClientRects())}function Bo(e){return Re(Ce(e)).left+It(e).scrollLeft}function pl(e){const t=Ce(e),n=It(e),o=e.ownerDocument.body,i=Ee(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=Ee(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+Bo(e);const s=-n.scrollTop;return le(o).direction==="rtl"&&(l+=Ee(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:s}}function hl(e,t){const n=re(e),o=Ce(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=rn();(!c||c&&t==="fixed")&&(s=i.offsetLeft,a=i.offsetTop)}return{width:r,height:l,x:s,y:a}}function gl(e,t){const n=Re(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=ne(e)?je(e):we(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 In(e,t,n){let o;if(t==="viewport")o=hl(e,n);else if(t==="document")o=pl(Ce(e));else if(X(t))o=gl(t,n);else{const i=Lo(e);o={...t,x:t.x-i.x,y:t.y-i.y}}return pt(o)}function $o(e,t){const n=Ae(e);return n===t||!X(n)||ke(n)?!1:le(n).position==="fixed"||$o(n,t)}function ml(e,t){const n=t.get(e);if(n)return n;let o=ve(e,[],!1).filter(s=>X(s)&&be(s)!=="body"),i=null;const r=le(e).position==="fixed";let l=r?Ae(e):e;for(;X(l)&&!ke(l);){const s=le(l),a=on(l);!a&&s.position==="fixed"&&(i=null),(r?!a&&!i:!a&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Xe(l)&&!a&&$o(e,l))?o=o.filter(x=>x!==l):i=s,l=Ae(l)}return t.set(e,o),o}function yl(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const l=[...n==="clippingAncestors"?ml(t,this._c):[].concat(n),o],s=l[0],a=l.reduce((c,x)=>{const g=In(t,x,i);return c.top=Ee(g.top,c.top),c.right=Me(g.right,c.right),c.bottom=Me(g.bottom,c.bottom),c.left=Ee(g.left,c.left),c},In(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function bl(e){const{width:t,height:n}=Fo(e);return{width:t,height:n}}function xl(e,t,n,o){const i=ne(t),r=Ce(t),l=n==="fixed",s=Re(e,!0,l,t);let a={scrollLeft:0,scrollTop:0};const c=we(0);if(i||!i&&!l)if((be(t)!=="body"||Xe(r))&&(a=It(t)),i){const w=Re(t,!0,l,t);c.x=w.x+t.clientLeft,c.y=w.y+t.clientTop}else r&&(c.x=Bo(r));let x=s.left+a.scrollLeft-c.x,g=s.top+a.scrollTop-c.y;const[C,u,b]=No(o);return C&&(x+=u,g+=b,i&&(x+=t.clientLeft,g+=t.clientTop)),{x,y:g,width:s.width,height:s.height}}function Rn(e,t){return!ne(e)||le(e).position==="fixed"?null:t?t(e):e.offsetParent}function zo(e,t){const n=re(e);if(!ne(e))return n;let o=Rn(e,t);for(;o&&$r(o)&&le(o).position==="static";)o=Rn(o,t);return o&&(be(o)==="html"||be(o)==="body"&&le(o).position==="static"&&!on(o))?n:o||Ro(e)||n}const Cl=async function(e){const t=this.getOffsetParent||zo,n=this.getDimensions;return{reference:xl(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function vl(e){return le(e).direction==="rtl"}const Wo={convertOffsetParentRelativeRectToViewportRelativeRect:dl,getDocumentElement:Ce,getClippingRect:yl,getOffsetParent:zo,getElementRects:Cl,getClientRects:fl,getDimensions:bl,getScale:je,isElement:X,isRTL:vl};function wl(e,t){let n=null,o;const i=Ce(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:g,height:C}=e.getBoundingClientRect();if(s||t(),!g||!C)return;const u=tt(x),b=tt(i.clientWidth-(c+g)),w=tt(i.clientHeight-(x+C)),y=tt(c),v={rootMargin:-u+"px "+-b+"px "+-w+"px "+-y+"px",threshold:Ee(0,Me(1,a))||1};let P=!0;function S(I){const R=I[0].intersectionRatio;if(R!==a){if(!P)return l();R?l(!1,R):o=setTimeout(()=>{l(!1,1e-7)},100)}P=!1}try{n=new IntersectionObserver(S,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return l(!0),r}function Sl(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=an(e),x=i||r?[...c?ve(c):[],...ve(t)]:[];x.forEach(m=>{i&&m.addEventListener("scroll",n,{passive:!0}),r&&m.addEventListener("resize",n)});const g=c&&s?wl(c,n):null;let C=-1,u=null;l&&(u=new ResizeObserver(m=>{let[v]=m;v&&v.target===c&&u&&(u.unobserve(t),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var P;(P=u)==null||P.observe(t)})),n()}),c&&!a&&u.observe(c),u.observe(t));let b,w=a?Re(e):null;a&&y();function y(){const m=Re(e);w&&(m.x!==w.x||m.y!==w.y||m.width!==w.width||m.height!==w.height)&&n(),w=m,b=requestAnimationFrame(y)}return n(),()=>{var m;x.forEach(v=>{i&&v.removeEventListener("scroll",n),r&&v.removeEventListener("resize",n)}),g==null||g(),(m=u)==null||m.disconnect(),u=null,a&&cancelAnimationFrame(b)}}const Tl=sl,El=il,Pn=ol,Al=(e,t,n)=>{const o=new Map,i={platform:Wo,...n},r={...i.platform,_c:o};return nl(e,t,{...i,platform:r})},Il=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?Pn({element:o.current,padding:i}).fn(n):{}:o?Pn({element:o,padding:i}).fn(n):{}}}};var it=typeof document<"u"?T.useLayoutEffect:T.useEffect;function ht(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(!ht(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)&&!ht(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function Ko(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function On(e,t){const n=Ko(e);return Math.round(t*n)/n}function Dn(e){const t=E.useRef(e);return it(()=>{t.current=e}),t}function Rl(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,g]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[C,u]=E.useState(o);ht(C,o)||u(o);const[b,w]=E.useState(null),[y,m]=E.useState(null),v=E.useCallback(V=>{V!==R.current&&(R.current=V,w(V))},[]),P=E.useCallback(V=>{V!==D.current&&(D.current=V,m(V))},[]),S=r||b,I=l||y,R=E.useRef(null),D=E.useRef(null),O=E.useRef(x),j=a!=null,A=Dn(a),F=Dn(i),B=E.useCallback(()=>{if(!R.current||!D.current)return;const V={placement:t,strategy:n,middleware:C};F.current&&(V.platform=F.current),Al(R.current,D.current,V).then(L=>{const te={...L,isPositioned:!0};W.current&&!ht(O.current,te)&&(O.current=te,sr.flushSync(()=>{g(te)}))})},[C,t,n,F]);it(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,g(V=>({...V,isPositioned:!1})))},[c]);const W=E.useRef(!1);it(()=>(W.current=!0,()=>{W.current=!1}),[]),it(()=>{if(S&&(R.current=S),I&&(D.current=I),S&&I){if(A.current)return A.current(S,I,B);B()}},[S,I,B,A,j]);const H=E.useMemo(()=>({reference:R,floating:D,setReference:v,setFloating:P}),[v,P]),M=E.useMemo(()=>({reference:S,floating:I}),[S,I]),$=E.useMemo(()=>{const V={position:n,left:0,top:0};if(!M.floating)return V;const L=On(M.floating,x.x),te=On(M.floating,x.y);return s?{...V,transform:"translate("+L+"px, "+te+"px)",...Ko(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:te}},[n,s,M.floating,x.x,x.y]);return E.useMemo(()=>({...x,update:B,refs:H,elements:M,floatingStyles:$}),[x,B,H,M,$])}/*!
|
|
148
148
|
* tabbable 6.2.0
|
|
149
149
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
150
|
-
*/var Pl=["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])"],Gt=Pl.join(","),qo=typeof Element>"u",Ue=qo?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,gt=!qo&&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},mt=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},Ol=function(t){var n,o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return o===""||o==="true"},Dl=function(t,n,o){if(mt(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Gt));return n&&Ue.call(t,Gt)&&i.unshift(t),i=i.filter(o),i},Vl=function e(t,n,o){for(var i=[],r=Array.from(t);r.length;){var l=r.shift();if(!mt(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=Ue.call(l,Gt);x&&o.filter(l)&&(n||!t.includes(l))&&i.push(l);var g=l.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(l),C=!mt(g,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(l));if(g&&C){var u=e(g===!0?l.children:g.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},_o=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ho=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Ol(t))&&!_o(t)?0:t.tabIndex},jl=function(t,n){var o=Ho(t);return o<0&&n&&!_o(t)?0:o},kl=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Uo=function(t){return t.tagName==="INPUT"},Ml=function(t){return Uo(t)&&t.type==="hidden"},Fl=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(o){return o.tagName==="SUMMARY"});return n},Ll=function(t,n){for(var o=0;o<t.length;o++)if(t[o].checked&&t[o].form===n)return t[o]},Nl=function(t){if(!t.name)return!0;var n=t.form||gt(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=Ll(i,t.form);return!r||r===t},Bl=function(t){return Uo(t)&&t.type==="radio"},$l=function(t){return Bl(t)&&!Nl(t)},zl=function(t){var n,o=t&>(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,g;o=gt(i),i=(c=o)===null||c===void 0?void 0:c.host,r=!!((x=i)!==null&&x!==void 0&&(g=x.ownerDocument)!==null&&g!==void 0&&g.contains(i))}}return r},Vn=function(t){var n=t.getBoundingClientRect(),o=n.width,i=n.height;return o===0&&i===0},Wl=function(t,n){var o=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var r=Ue.call(t,"details>summary:first-of-type"),l=r?t.parentElement:t;if(Ue.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=gt(t);if(a&&!a.shadowRoot&&i(a)===!0)return Vn(t);t.assignedSlot?t=t.assignedSlot:!a&&c!==t.ownerDocument?t=c.host:t=a}t=s}if(zl(t))return!t.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return Vn(t);return!1},Kl=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 Ue.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},ql=function(t,n){return!(n.disabled||mt(n)||Ml(n)||Wl(n,t)||Fl(n)||Kl(n))},jn=function(t,n){return!($l(n)||Ho(n)<0||!ql(t,n))},_l=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Hl=function e(t){var n=[],o=[];return t.forEach(function(i,r){var l=!!i.scopeParent,s=l?i.scopeParent:i,a=jl(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(kl).reduce(function(i,r){return r.isScope?i.push.apply(i,r.content):i.push(r.content),i},[]).concat(n)},cn=function(t,n){n=n||{};var o;return n.getShadowRoot?o=Vl([t],n.includeContainer,{filter:jn.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:_l}):o=Dl(t,n.includeContainer,jn.bind(null,n)),Hl(o)};function un(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 Ul=E["useInsertionEffect".toString()],Ql=Ul||(e=>e());function Ve(e){const t=E.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ql(()=>{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 kn=0;function Se(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:o=!0,sync:i=!1}=t;o&&cancelAnimationFrame(kn);const r=()=>e==null?void 0:e.focus({preventScroll:n});i?r():kn=requestAnimationFrame(r)}var se=typeof document<"u"?T.useLayoutEffect:T.useEffect;function Fe(){return Fe=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},Fe.apply(this,arguments)}let jt=!1,Yl=0;const Mn=()=>"floating-ui-"+Yl++;function Gl(){const[e,t]=E.useState(()=>jt?Mn():void 0);return se(()=>{e==null&&t(Mn())},[]),E.useEffect(()=>{jt||(jt=!0)},[]),e}const Xl=E["useId".toString()],Pt=Xl||Gl,Jl=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:g,d:C,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 y=Pt();if(!i)return null;c*=2;const m=c/2,v=l/2*(a/-8+1),P=s/2*a/4,[S,I]=o.split("-"),R=Wo.isRTL(i),D=!!C,O=S==="top"||S==="bottom",j=x&&I==="end"?"bottom":"top";let A=x&&I==="end"?"right":"left";x&&R&&(A=I==="end"?"left":"right");const F=(r==null?void 0:r.x)!=null?x||r.x:"",B=(r==null?void 0:r.y)!=null?x||r.y:"",W=C||"M0,0"+(" H"+l)+(" L"+(l-v)+","+(s-P))+(" Q"+l/2+","+s+" "+v+","+(s-P))+" Z",_={top:D?"rotate(180deg)":"",left:D?"rotate(90deg)":"rotate(-90deg)",bottom:D?"":"rotate(180deg)",right:D?"rotate(-90deg)":"rotate(90deg)"}[S];return E.createElement("svg",Fe({},w,{"aria-hidden":!0,ref:n,width:D?l:l+c,height:l,viewBox:"0 0 "+l+" "+(s>l?s:l),style:{position:"absolute",pointerEvents:"none",[A]:F,[j]:B,[S]:O||D?"100%":"calc(100% - "+c/2+"px)",transform:""+_+(u??""),...b}}),c>0&&E.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:g,strokeWidth:c+(C?0:1),d:W}),E.createElement("path",{stroke:c&&!C?w.fill:"none",d:W}),E.createElement("clipPath",{id:y},E.createElement("rect",{x:-m,y:m*(D?-1:1),width:l+c,height:l})))});function Zl(){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 es=E.createContext(null),ts=E.createContext(null),ns=()=>{var e;return((e=E.useContext(es))==null?void 0:e.id)||null},dn=()=>E.useContext(ts);function Qe(e){return"data-floating-ui-"+e}function kt(e){const t=T.useRef(e);return se(()=>{t.current=e}),t}function os(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 Ke(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 Pe=new WeakMap,nt=new WeakSet,ot={},Mt=0;const is=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Qo=e=>e&&(e.host||Qo(e.parentNode)),rs=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=Qo(n);return e.contains(o)?o:null}).filter(n=>n!=null);function ls(e,t,n,o){const i="data-floating-ui-inert",r=o?"inert":n?"aria-hidden":null,l=rs(t,e),s=new Set,a=new Set(l),c=[];ot[i]||(ot[i]=new WeakMap);const x=ot[i];l.forEach(g),C(t),s.clear();function g(u){!u||s.has(u)||(s.add(u),u.parentNode&&g(u.parentNode))}function C(u){!u||a.has(u)||Array.prototype.forEach.call(u.children,b=>{if(s.has(b))C(b);else{const w=r?b.getAttribute(r):null,y=w!==null&&w!=="false",m=(Pe.get(b)||0)+1,v=(x.get(b)||0)+1;Pe.set(b,m),x.set(b,v),c.push(b),m===1&&y&&nt.add(b),v===1&&b.setAttribute(i,""),!y&&r&&b.setAttribute(r,"true")}})}return Mt++,()=>{c.forEach(u=>{const b=(Pe.get(u)||0)-1,w=(x.get(u)||0)-1;Pe.set(u,b),x.set(u,w),b||(!nt.has(u)&&r&&u.removeAttribute(r),nt.delete(u)),w||u.removeAttribute(i)}),Mt--,Mt||(Pe=new WeakMap,Pe=new WeakMap,nt=new WeakSet,ot={})}}function Fn(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=ye(e[0]).body;return ls(e.concat(Array.from(o.querySelectorAll("[aria-live]"))),o,t,n)}const fn=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Yo(e,t){const n=cn(e,fn());t==="prev"&&n.reverse();const o=n.indexOf(Oe(ye(e)));return n.slice(o+1)[0]}function Go(){return Yo(document.body,"next")}function Xo(){return Yo(document.body,"prev")}function qe(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!ie(n,o)}function ss(e){cn(e,fn()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function as(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 pn={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 cs;function Ln(e){e.key==="Tab"&&(e.target,clearTimeout(cs))}const yt=E.forwardRef(function(t,n){const[o,i]=E.useState();se(()=>(Kr()&&i("button"),document.addEventListener("keydown",Ln),()=>{document.removeEventListener("keydown",Ln)}),[]);const r={ref:n,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,[Qe("focus-guard")]:"",style:pn};return E.createElement("span",Fe({},t,r))}),Jo=E.createContext(null),Nn=Qe("portal");function us(e){let{id:t,root:n}=e===void 0?{}:e;const[o,i]=E.useState(null),r=Pt(),l=ei(),s=E.useRef(null);return se(()=>()=>{o==null||o.remove(),queueMicrotask(()=>{s.current=null})},[o]),se(()=>{if(s.current)return;const a=t?document.getElementById(t):null;if(!a)return;const c=document.createElement("div");c.id=r,c.setAttribute(Nn,""),a.appendChild(c),s.current=c,i(c)},[t,r]),se(()=>{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(Nn,""),a=c||a,a.appendChild(x),s.current=x,i(x)},[t,n,r,l]),o}function Zo(e){let{children:t,id:n,root:o=null,preserveTabOrder:i=!0}=e;const r=us({id:n,root:o}),[l,s]=E.useState(null),a=E.useRef(null),c=E.useRef(null),x=E.useRef(null),g=E.useRef(null),C=!!l&&!l.modal&&l.open&&i&&!!(o||r);return E.useEffect(()=>{if(!r||!i||l!=null&&l.modal)return;function u(b){r&&qe(b)&&(b.type==="focusin"?as:ss)(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:g,portalNode:r,setFocusManagerState:s}),[i,r])},C&&r&&E.createElement(yt,{"data-type":"outside",ref:a,onFocus:u=>{if(qe(u,r)){var b;(b=x.current)==null||b.focus()}else{const w=Xo()||(l==null?void 0:l.refs.domReference.current);w==null||w.focus()}}}),C&&r&&E.createElement("span",{"aria-owns":r.id,style:pn}),r&&ho.createPortal(t,r),C&&r&&E.createElement(yt,{"data-type":"outside",ref:c,onFocus:u=>{if(qe(u,r)){var b;(b=g.current)==null||b.focus()}else{const w=Go()||(l==null?void 0:l.refs.domReference.current);w==null||w.focus(),l!=null&&l.closeOnFocusOut&&(l==null||l.onOpenChange(!1,u.nativeEvent))}}}))}const ei=()=>E.useContext(Jo),Bn=20;let Te=[];function Ft(e){Te=Te.filter(t=>t.isConnected),e&&be(e)!=="body"&&(Te.push(e),Te.length>Bn&&(Te=Te.slice(-Bn)))}function $n(){return Te.slice().reverse().find(e=>e.isConnected)}const ds=E.forwardRef(function(t,n){return E.createElement("button",Fe({},t,{type:"button",ref:n,tabIndex:-1,style:pn}))});function ti(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:g,refs:C,nodeId:u,onOpenChange:b,events:w,dataRef:y,elements:{domReference:m,floating:v}}=t,P=typeof l=="number"&&l<0,S=Qr(m)&&P,I=is()?r:!0,R=kt(i),D=kt(l),O=kt(s),j=dn(),A=ei(),F=E.useRef(null),B=E.useRef(null),W=E.useRef(!1),_=E.useRef(!1),M=A!=null,$=E.useCallback(function(q){return q===void 0&&(q=v),q?cn(q,fn()):[]},[v]),V=E.useCallback(q=>{const K=$(q);return R.current.map(z=>m&&z==="reference"?m:v&&z==="floating"?v:K).filter(Boolean).flat()},[m,v,R,$]);E.useEffect(()=>{if(o||!a)return;function q(z){if(z.key==="Tab"){ie(v,Oe(ye(v)))&&$().length===0&&!S&&Vt(z);const H=V(),Q=De(z);R.current[0]==="reference"&&Q===m&&(Vt(z),z.shiftKey?Se(H[H.length-1]):Se(H[1])),R.current[1]==="floating"&&Q===v&&z.shiftKey&&(Vt(z),Se(H[0]))}}const K=ye(v);return K.addEventListener("keydown",q),()=>{K.removeEventListener("keydown",q)}},[o,m,v,a,R,S,$,V]),E.useEffect(()=>{if(o||!x)return;function q(){_.current=!0,setTimeout(()=>{_.current=!1})}function K(z){const H=z.relatedTarget;queueMicrotask(()=>{const Q=!(ie(m,H)||ie(v,H)||ie(H,v)||ie(A==null?void 0:A.portalNode,H)||H!=null&&H.hasAttribute(Qe("focus-guard"))||j&&(Ke(j.nodesRef.current,u).find(Y=>{var ee,ue;return ie((ee=Y.context)==null?void 0:ee.elements.floating,H)||ie((ue=Y.context)==null?void 0:ue.elements.domReference,H)})||os(j.nodesRef.current,u).find(Y=>{var ee,ue;return((ee=Y.context)==null?void 0:ee.elements.floating)===H||((ue=Y.context)==null?void 0:ue.elements.domReference)===H})));H&&Q&&!_.current&&H!==$n()&&(W.current=!0,b(!1,z))})}if(v&&ne(m))return m.addEventListener("focusout",K),m.addEventListener("pointerdown",q),!a&&v.addEventListener("focusout",K),()=>{m.removeEventListener("focusout",K),m.removeEventListener("pointerdown",q),!a&&v.removeEventListener("focusout",K)}},[o,m,v,a,u,j,A,b,x]),E.useEffect(()=>{var q;if(o)return;const K=Array.from((A==null||(q=A.portalNode)==null?void 0:q.querySelectorAll("["+Qe("portal")+"]"))||[]);if(v){const z=[v,...K,F.current,B.current,R.current.includes("reference")||S?m:null].filter(Q=>Q!=null),H=a||S?Fn(z,I,!I):Fn(z);return()=>{H()}}},[o,m,v,a,R,A,S,I]),se(()=>{if(o||!v)return;const q=ye(v),K=Oe(q);queueMicrotask(()=>{const z=V(v),H=D.current,Q=(typeof H=="number"?z[H]:H.current)||v,Y=ie(v,K);!P&&!Y&&g&&Se(Q,{preventScroll:Q===v})})},[o,g,v,P,V,D]),se(()=>{if(o||!v)return;let q=!1;const K=ye(v),z=Oe(K),H=y.current;Ft(z);function Q(Y){let{reason:ee,event:ue,nested:We}=Y;ee==="escape-key"&&C.domReference.current&&Ft(C.domReference.current),ee==="hover"&&ue.type==="mouseleave"&&(W.current=!0),ee==="outside-press"&&(We?(W.current=!1,q=!0):W.current=!(zr(ue)||Wr(ue)))}return w.on("openchange",Q),()=>{w.off("openchange",Q);const Y=Oe(K),ee=ie(v,Y)||j&&Ke(j.nodesRef.current,u).some(Qi=>{var xn;return ie((xn=Qi.context)==null?void 0:xn.elements.floating,Y)});(ee||H.openEvent&&["click","mousedown"].includes(H.openEvent.type))&&C.domReference.current&&Ft(C.domReference.current);const We=$n();O.current&&!W.current&&ne(We)&&(!(We!==Y&&Y!==K.body)||ee)&&Se(We,{cancelPrevious:!1,preventScroll:q})}},[o,v,O,y,C,w,j,u]),se(()=>{if(!(o||!A))return A.setFocusManagerState({modal:a,closeOnFocusOut:x,open:g,onOpenChange:b,refs:C}),()=>{A.setFocusManagerState(null)}},[o,A,a,g,b,C,x]),se(()=>{if(o||!v||typeof MutationObserver!="function"||P)return;const q=()=>{const z=v.getAttribute("tabindex");R.current.includes("floating")||Oe(ye(v))!==C.domReference.current&&$().length===0?z!=="0"&&v.setAttribute("tabindex","0"):z!=="-1"&&v.setAttribute("tabindex","-1")};q();const K=new MutationObserver(q);return K.observe(v,{childList:!0,subtree:!0,attributes:!0}),()=>{K.disconnect()}},[o,v,C,R,$,P]);function L(q){return o||!c||!a?null:E.createElement(ds,{ref:q==="start"?F:B,onClick:K=>b(!1,K.nativeEvent)},typeof c=="string"?c:"Dismiss")}const te=!o&&I&&(M||a);return E.createElement(E.Fragment,null,te&&E.createElement(yt,{"data-type":"inside",ref:A==null?void 0:A.beforeInsideRef,onFocus:q=>{if(a){const z=V();Se(i[0]==="reference"?z[0]:z[z.length-1])}else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(W.current=!1,qe(q,A.portalNode)){const z=Go()||m;z==null||z.focus()}else{var K;(K=A.beforeOutsideRef.current)==null||K.focus()}}}),!S&&L("start"),n,L("end"),te&&E.createElement(yt,{"data-type":"inside",ref:A==null?void 0:A.afterInsideRef,onFocus:q=>{if(a)Se(V()[0]);else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(x&&(W.current=!0),qe(q,A.portalNode)){const z=Xo()||m;z==null||z.focus()}else{var K;(K=A.afterOutsideRef.current)==null||K.focus()}}}))}const Lt=new Set,ni=E.forwardRef(function(t,n){let{lockScroll:o=!1,...i}=t;const r=Pt();return se(()=>{if(!o)return;Lt.add(r);const l=/iP(hone|ad|od)|iOS/.test(Oo()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",x=window.innerWidth-document.documentElement.clientWidth,g=s.left?parseFloat(s.left):window.pageXOffset,C=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,y=((b=window.visualViewport)==null?void 0:b.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(C-Math.floor(y))+"px",left:-(g-Math.floor(w))+"px",right:"0"})}return()=>{Lt.delete(r),Lt.size===0&&(Object.assign(s,{overflow:"",[c]:""}),l&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(g,C)))}},[r,o]),E.createElement("div",Fe({ref:n},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))});function zn(e){return ne(e.target)&&e.target.tagName==="BUTTON"}function Wn(e){return Vo(e)}function oi(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,g=E.useRef(),C=E.useRef(!1);return E.useMemo(()=>l?{reference:{onPointerDown(u){g.current=u.pointerType},onMouseDown(u){u.button===0&&(En(g.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"&&g.current){g.current=void 0;return}En(g.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){g.current=void 0,!(u.defaultPrevented||!x||zn(u))&&(u.key===" "&&!Wn(r)&&(u.preventDefault(),C.current=!0),u.key==="Enter"&&o(!(n&&a),u.nativeEvent,"click"))},onKeyUp(u){u.defaultPrevented||!x||zn(u)||Wn(r)||u.key===" "&&C.current&&(C.current=!1,o(!(n&&a),u.nativeEvent,"click"))}}}:{},[l,i,s,c,x,r,a,n,o])}const fs={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},ps={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Kn=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 ii(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:g=!0,outsidePressEvent:C="pointerdown",referencePress:u=!1,referencePressEvent:b="pointerdown",ancestorScroll:w=!1,bubbles:y,capture:m}=t,v=dn(),P=Ve(typeof g=="function"?g:()=>!1),S=typeof g=="function"?P:g,I=E.useRef(!1),R=E.useRef(!1),{escapeKey:D,outsidePress:O}=Kn(y),{escapeKey:j,outsidePress:A}=Kn(m),F=Ve(M=>{if(!n||!c||!x||M.key!=="Escape")return;const $=v?Ke(v.nodesRef.current,i):[];if(!D&&(M.stopPropagation(),$.length>0)){let V=!0;if($.forEach(L=>{var te;if((te=L.context)!=null&&te.open&&!L.context.dataRef.current.__escapeKeyBubbles){V=!1;return}}),!V)return}o(!1,_r(M)?M.nativeEvent:M,"escape-key")}),B=Ve(M=>{var $;const V=()=>{var L;F(M),(L=De(M))==null||L.removeEventListener("keydown",V)};($=De(M))==null||$.addEventListener("keydown",V)}),W=Ve(M=>{const $=I.current;I.current=!1;const V=R.current;if(R.current=!1,C==="click"&&V||$||typeof S=="function"&&!S(M))return;const L=De(M),te="["+Qe("inert")+"]",q=ye(s).querySelectorAll(te);let K=X(L)?L:null;for(;K&&!ke(K);){const Q=Ae(K);if(ke(Q)||!X(Q))break;K=Q}if(q.length&&X(L)&&!Hr(L)&&!ie(L,s)&&Array.from(q).every(Q=>!ie(K,Q)))return;if(ne(L)&&s){const Q=L.clientWidth>0&&L.scrollWidth>L.clientWidth,Y=L.clientHeight>0&&L.scrollHeight>L.clientHeight;let ee=Y&&M.offsetX>L.clientWidth;if(Y&&le(L).direction==="rtl"&&(ee=M.offsetX<=L.offsetWidth-L.clientWidth),ee||Q&&M.offsetY>L.clientHeight)return}const z=v&&Ke(v.nodesRef.current,i).some(Q=>{var Y;return Dt(M,(Y=Q.context)==null?void 0:Y.elements.floating)});if(Dt(M,s)||Dt(M,l)||z)return;const H=v?Ke(v.nodesRef.current,i):[];if(H.length>0){let Q=!0;if(H.forEach(Y=>{var ee;if((ee=Y.context)!=null&&ee.open&&!Y.context.dataRef.current.__outsidePressBubbles){Q=!1;return}}),!Q)return}o(!1,M,"outside-press")}),_=Ve(M=>{var $;const V=()=>{var L;W(M),(L=De(M))==null||L.removeEventListener(C,V)};($=De(M))==null||$.addEventListener(C,V)});return E.useEffect(()=>{if(!n||!c)return;a.current.__escapeKeyBubbles=D,a.current.__outsidePressBubbles=O;function M(L){o(!1,L,"ancestor-scroll")}const $=ye(s);x&&$.addEventListener("keydown",j?B:F,j),S&&$.addEventListener(C,A?_:W,A);let V=[];return w&&(X(l)&&(V=ve(l)),X(s)&&(V=V.concat(ve(s))),!X(r)&&r&&r.contextElement&&(V=V.concat(ve(r.contextElement)))),V=V.filter(L=>{var te;return L!==((te=$.defaultView)==null?void 0:te.visualViewport)}),V.forEach(L=>{L.addEventListener("scroll",M,{passive:!0})}),()=>{x&&$.removeEventListener("keydown",j?B:F,j),S&&$.removeEventListener(C,A?_:W,A),V.forEach(L=>{L.removeEventListener("scroll",M)})}},[a,s,l,r,x,S,C,n,o,w,c,D,O,F,j,B,W,A,_]),E.useEffect(()=>{I.current=!1},[S,C]),E.useMemo(()=>c?{reference:{onKeyDown:F,[fs[b]]:M=>{u&&o(!1,M.nativeEvent,"reference-press")}},floating:{onKeyDown:F,onMouseDown(){R.current=!0},onMouseUp(){R.current=!0},[ps[C]]:()=>{I.current=!0}}}:{},[c,u,C,b,o,F])}let Xt;process.env.NODE_ENV!=="production"&&(Xt=new Set);function ri(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 O="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=Xt)!=null&&l.has(O))){var s;(s=Xt)==null||s.add(O),console.error(O)}}}const[a,c]=E.useState(null),x=((t=e.elements)==null?void 0:t.reference)||a,g=Rl(e),C=dn(),u=ns()!=null,b=Ve((O,j,A)=>{O&&(y.current.openEvent=j),m.emit("openchange",{open:O,event:j,reason:A,nested:u}),o==null||o(O,j,A)}),w=E.useRef(null),y=E.useRef({}),m=E.useState(()=>Zl())[0],v=Pt(),P=E.useCallback(O=>{const j=X(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),contextElement:O}:O;g.refs.setReference(j)},[g.refs]),S=E.useCallback(O=>{(X(O)||O===null)&&(w.current=O,c(O)),(X(g.refs.reference.current)||g.refs.reference.current===null||O!==null&&!X(O))&&g.refs.setReference(O)},[g.refs]),I=E.useMemo(()=>({...g.refs,setReference:S,setPositionReference:P,domReference:w}),[g.refs,S,P]),R=E.useMemo(()=>({...g.elements,domReference:x}),[g.elements,x]),D=E.useMemo(()=>({...g,refs:I,elements:R,dataRef:y,nodeId:i,floatingId:v,events:m,open:n,onOpenChange:b}),[g,i,v,m,n,b,I,R]);return se(()=>{const O=C==null?void 0:C.nodesRef.current.find(j=>j.id===i);O&&(O.context=D)}),E.useMemo(()=>({...g,context:D,refs:I,elements:R}),[g,I,R,D])}const qn="active",_n="selected";function Nt(e,t,n){const o=new Map,i=n==="item";let r=e;if(i&&e){const{[qn]:l,[_n]: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&&[qn,_n].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof x=="function"){var g;(g=o.get(c))==null||g.push(x),l[c]=function(){for(var C,u=arguments.length,b=new Array(u),w=0;w<u;w++)b[w]=arguments[w];return(C=o.get(c))==null?void 0:C.map(y=>y(...b)).find(y=>y!==void 0)}}}else l[c]=x}),l),{})}}function li(e){e===void 0&&(e=[]);const t=e,n=E.useCallback(r=>Nt(r,e,"reference"),t),o=E.useCallback(r=>Nt(r,e,"floating"),t),i=E.useCallback(r=>Nt(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 hs(e={}){const{initialOpen:t=!1,open:n,onOpenChange:o}=e,[i,r]=E.useState(t),l=n??i,s=o??r,a=ri({open:l,onOpenChange:s}),c=a.context,x=oi(c,{enabled:n==null}),g=ii(c,{outsidePressEvent:"mousedown"}),C=li([x,g]);return E.useMemo(()=>({open:l,setOpen:s,...C,...a}),[l,s,C,a])}const si=E.createContext(null),ai=()=>{const e=E.useContext(si);if(e==null)throw new Error("Dialog components must be wrapped in <Dialog />");return e};function gs({children:e,...t}){const n=hs(t);return f.jsx(si.Provider,{value:n,children:e})}const ci=k.css`
|
|
150
|
+
*/var Pl=["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])"],Gt=Pl.join(","),qo=typeof Element>"u",Ue=qo?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,gt=!qo&&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},mt=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},Ol=function(t){var n,o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return o===""||o==="true"},Dl=function(t,n,o){if(mt(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Gt));return n&&Ue.call(t,Gt)&&i.unshift(t),i=i.filter(o),i},Vl=function e(t,n,o){for(var i=[],r=Array.from(t);r.length;){var l=r.shift();if(!mt(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=Ue.call(l,Gt);x&&o.filter(l)&&(n||!t.includes(l))&&i.push(l);var g=l.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(l),C=!mt(g,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(l));if(g&&C){var u=e(g===!0?l.children:g.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},Ho=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},_o=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Ol(t))&&!Ho(t)?0:t.tabIndex},jl=function(t,n){var o=_o(t);return o<0&&n&&!Ho(t)?0:o},kl=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Uo=function(t){return t.tagName==="INPUT"},Ml=function(t){return Uo(t)&&t.type==="hidden"},Fl=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(o){return o.tagName==="SUMMARY"});return n},Ll=function(t,n){for(var o=0;o<t.length;o++)if(t[o].checked&&t[o].form===n)return t[o]},Nl=function(t){if(!t.name)return!0;var n=t.form||gt(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=Ll(i,t.form);return!r||r===t},Bl=function(t){return Uo(t)&&t.type==="radio"},$l=function(t){return Bl(t)&&!Nl(t)},zl=function(t){var n,o=t&>(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,g;o=gt(i),i=(c=o)===null||c===void 0?void 0:c.host,r=!!((x=i)!==null&&x!==void 0&&(g=x.ownerDocument)!==null&&g!==void 0&&g.contains(i))}}return r},Vn=function(t){var n=t.getBoundingClientRect(),o=n.width,i=n.height;return o===0&&i===0},Wl=function(t,n){var o=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var r=Ue.call(t,"details>summary:first-of-type"),l=r?t.parentElement:t;if(Ue.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=gt(t);if(a&&!a.shadowRoot&&i(a)===!0)return Vn(t);t.assignedSlot?t=t.assignedSlot:!a&&c!==t.ownerDocument?t=c.host:t=a}t=s}if(zl(t))return!t.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return Vn(t);return!1},Kl=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 Ue.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},ql=function(t,n){return!(n.disabled||mt(n)||Ml(n)||Wl(n,t)||Fl(n)||Kl(n))},jn=function(t,n){return!($l(n)||_o(n)<0||!ql(t,n))},Hl=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},_l=function e(t){var n=[],o=[];return t.forEach(function(i,r){var l=!!i.scopeParent,s=l?i.scopeParent:i,a=jl(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(kl).reduce(function(i,r){return r.isScope?i.push.apply(i,r.content):i.push(r.content),i},[]).concat(n)},cn=function(t,n){n=n||{};var o;return n.getShadowRoot?o=Vl([t],n.includeContainer,{filter:jn.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Hl}):o=Dl(t,n.includeContainer,jn.bind(null,n)),_l(o)};function un(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 Ul=E["useInsertionEffect".toString()],Ql=Ul||(e=>e());function Ve(e){const t=E.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ql(()=>{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 kn=0;function Se(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:o=!0,sync:i=!1}=t;o&&cancelAnimationFrame(kn);const r=()=>e==null?void 0:e.focus({preventScroll:n});i?r():kn=requestAnimationFrame(r)}var se=typeof document<"u"?T.useLayoutEffect:T.useEffect;function Fe(){return Fe=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},Fe.apply(this,arguments)}let jt=!1,Yl=0;const Mn=()=>"floating-ui-"+Yl++;function Gl(){const[e,t]=E.useState(()=>jt?Mn():void 0);return se(()=>{e==null&&t(Mn())},[]),E.useEffect(()=>{jt||(jt=!0)},[]),e}const Xl=E["useId".toString()],Pt=Xl||Gl,Jl=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:g,d:C,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 y=Pt();if(!i)return null;c*=2;const m=c/2,v=l/2*(a/-8+1),P=s/2*a/4,[S,I]=o.split("-"),R=Wo.isRTL(i),D=!!C,O=S==="top"||S==="bottom",j=x&&I==="end"?"bottom":"top";let A=x&&I==="end"?"right":"left";x&&R&&(A=I==="end"?"left":"right");const F=(r==null?void 0:r.x)!=null?x||r.x:"",B=(r==null?void 0:r.y)!=null?x||r.y:"",W=C||"M0,0"+(" H"+l)+(" L"+(l-v)+","+(s-P))+(" Q"+l/2+","+s+" "+v+","+(s-P))+" Z",H={top:D?"rotate(180deg)":"",left:D?"rotate(90deg)":"rotate(-90deg)",bottom:D?"":"rotate(180deg)",right:D?"rotate(-90deg)":"rotate(90deg)"}[S];return E.createElement("svg",Fe({},w,{"aria-hidden":!0,ref:n,width:D?l:l+c,height:l,viewBox:"0 0 "+l+" "+(s>l?s:l),style:{position:"absolute",pointerEvents:"none",[A]:F,[j]:B,[S]:O||D?"100%":"calc(100% - "+c/2+"px)",transform:""+H+(u??""),...b}}),c>0&&E.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:g,strokeWidth:c+(C?0:1),d:W}),E.createElement("path",{stroke:c&&!C?w.fill:"none",d:W}),E.createElement("clipPath",{id:y},E.createElement("rect",{x:-m,y:m*(D?-1:1),width:l+c,height:l})))});function Zl(){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 es=E.createContext(null),ts=E.createContext(null),ns=()=>{var e;return((e=E.useContext(es))==null?void 0:e.id)||null},dn=()=>E.useContext(ts);function Qe(e){return"data-floating-ui-"+e}function kt(e){const t=T.useRef(e);return se(()=>{t.current=e}),t}function os(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 Ke(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 Pe=new WeakMap,nt=new WeakSet,ot={},Mt=0;const is=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Qo=e=>e&&(e.host||Qo(e.parentNode)),rs=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=Qo(n);return e.contains(o)?o:null}).filter(n=>n!=null);function ls(e,t,n,o){const i="data-floating-ui-inert",r=o?"inert":n?"aria-hidden":null,l=rs(t,e),s=new Set,a=new Set(l),c=[];ot[i]||(ot[i]=new WeakMap);const x=ot[i];l.forEach(g),C(t),s.clear();function g(u){!u||s.has(u)||(s.add(u),u.parentNode&&g(u.parentNode))}function C(u){!u||a.has(u)||Array.prototype.forEach.call(u.children,b=>{if(s.has(b))C(b);else{const w=r?b.getAttribute(r):null,y=w!==null&&w!=="false",m=(Pe.get(b)||0)+1,v=(x.get(b)||0)+1;Pe.set(b,m),x.set(b,v),c.push(b),m===1&&y&&nt.add(b),v===1&&b.setAttribute(i,""),!y&&r&&b.setAttribute(r,"true")}})}return Mt++,()=>{c.forEach(u=>{const b=(Pe.get(u)||0)-1,w=(x.get(u)||0)-1;Pe.set(u,b),x.set(u,w),b||(!nt.has(u)&&r&&u.removeAttribute(r),nt.delete(u)),w||u.removeAttribute(i)}),Mt--,Mt||(Pe=new WeakMap,Pe=new WeakMap,nt=new WeakSet,ot={})}}function Fn(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=ye(e[0]).body;return ls(e.concat(Array.from(o.querySelectorAll("[aria-live]"))),o,t,n)}const fn=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Yo(e,t){const n=cn(e,fn());t==="prev"&&n.reverse();const o=n.indexOf(Oe(ye(e)));return n.slice(o+1)[0]}function Go(){return Yo(document.body,"next")}function Xo(){return Yo(document.body,"prev")}function qe(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!ie(n,o)}function ss(e){cn(e,fn()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function as(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 pn={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 cs;function Ln(e){e.key==="Tab"&&(e.target,clearTimeout(cs))}const yt=E.forwardRef(function(t,n){const[o,i]=E.useState();se(()=>(Kr()&&i("button"),document.addEventListener("keydown",Ln),()=>{document.removeEventListener("keydown",Ln)}),[]);const r={ref:n,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,[Qe("focus-guard")]:"",style:pn};return E.createElement("span",Fe({},t,r))}),Jo=E.createContext(null),Nn=Qe("portal");function us(e){let{id:t,root:n}=e===void 0?{}:e;const[o,i]=E.useState(null),r=Pt(),l=ei(),s=E.useRef(null);return se(()=>()=>{o==null||o.remove(),queueMicrotask(()=>{s.current=null})},[o]),se(()=>{if(s.current)return;const a=t?document.getElementById(t):null;if(!a)return;const c=document.createElement("div");c.id=r,c.setAttribute(Nn,""),a.appendChild(c),s.current=c,i(c)},[t,r]),se(()=>{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(Nn,""),a=c||a,a.appendChild(x),s.current=x,i(x)},[t,n,r,l]),o}function Zo(e){let{children:t,id:n,root:o=null,preserveTabOrder:i=!0}=e;const r=us({id:n,root:o}),[l,s]=E.useState(null),a=E.useRef(null),c=E.useRef(null),x=E.useRef(null),g=E.useRef(null),C=!!l&&!l.modal&&l.open&&i&&!!(o||r);return E.useEffect(()=>{if(!r||!i||l!=null&&l.modal)return;function u(b){r&&qe(b)&&(b.type==="focusin"?as:ss)(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:g,portalNode:r,setFocusManagerState:s}),[i,r])},C&&r&&E.createElement(yt,{"data-type":"outside",ref:a,onFocus:u=>{if(qe(u,r)){var b;(b=x.current)==null||b.focus()}else{const w=Xo()||(l==null?void 0:l.refs.domReference.current);w==null||w.focus()}}}),C&&r&&E.createElement("span",{"aria-owns":r.id,style:pn}),r&&ho.createPortal(t,r),C&&r&&E.createElement(yt,{"data-type":"outside",ref:c,onFocus:u=>{if(qe(u,r)){var b;(b=g.current)==null||b.focus()}else{const w=Go()||(l==null?void 0:l.refs.domReference.current);w==null||w.focus(),l!=null&&l.closeOnFocusOut&&(l==null||l.onOpenChange(!1,u.nativeEvent))}}}))}const ei=()=>E.useContext(Jo),Bn=20;let Te=[];function Ft(e){Te=Te.filter(t=>t.isConnected),e&&be(e)!=="body"&&(Te.push(e),Te.length>Bn&&(Te=Te.slice(-Bn)))}function $n(){return Te.slice().reverse().find(e=>e.isConnected)}const ds=E.forwardRef(function(t,n){return E.createElement("button",Fe({},t,{type:"button",ref:n,tabIndex:-1,style:pn}))});function ti(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:g,refs:C,nodeId:u,onOpenChange:b,events:w,dataRef:y,elements:{domReference:m,floating:v}}=t,P=typeof l=="number"&&l<0,S=Qr(m)&&P,I=is()?r:!0,R=kt(i),D=kt(l),O=kt(s),j=dn(),A=ei(),F=E.useRef(null),B=E.useRef(null),W=E.useRef(!1),H=E.useRef(!1),M=A!=null,$=E.useCallback(function(q){return q===void 0&&(q=v),q?cn(q,fn()):[]},[v]),V=E.useCallback(q=>{const K=$(q);return R.current.map(z=>m&&z==="reference"?m:v&&z==="floating"?v:K).filter(Boolean).flat()},[m,v,R,$]);E.useEffect(()=>{if(o||!a)return;function q(z){if(z.key==="Tab"){ie(v,Oe(ye(v)))&&$().length===0&&!S&&Vt(z);const _=V(),Q=De(z);R.current[0]==="reference"&&Q===m&&(Vt(z),z.shiftKey?Se(_[_.length-1]):Se(_[1])),R.current[1]==="floating"&&Q===v&&z.shiftKey&&(Vt(z),Se(_[0]))}}const K=ye(v);return K.addEventListener("keydown",q),()=>{K.removeEventListener("keydown",q)}},[o,m,v,a,R,S,$,V]),E.useEffect(()=>{if(o||!x)return;function q(){H.current=!0,setTimeout(()=>{H.current=!1})}function K(z){const _=z.relatedTarget;queueMicrotask(()=>{const Q=!(ie(m,_)||ie(v,_)||ie(_,v)||ie(A==null?void 0:A.portalNode,_)||_!=null&&_.hasAttribute(Qe("focus-guard"))||j&&(Ke(j.nodesRef.current,u).find(Y=>{var ee,ue;return ie((ee=Y.context)==null?void 0:ee.elements.floating,_)||ie((ue=Y.context)==null?void 0:ue.elements.domReference,_)})||os(j.nodesRef.current,u).find(Y=>{var ee,ue;return((ee=Y.context)==null?void 0:ee.elements.floating)===_||((ue=Y.context)==null?void 0:ue.elements.domReference)===_})));_&&Q&&!H.current&&_!==$n()&&(W.current=!0,b(!1,z))})}if(v&&ne(m))return m.addEventListener("focusout",K),m.addEventListener("pointerdown",q),!a&&v.addEventListener("focusout",K),()=>{m.removeEventListener("focusout",K),m.removeEventListener("pointerdown",q),!a&&v.removeEventListener("focusout",K)}},[o,m,v,a,u,j,A,b,x]),E.useEffect(()=>{var q;if(o)return;const K=Array.from((A==null||(q=A.portalNode)==null?void 0:q.querySelectorAll("["+Qe("portal")+"]"))||[]);if(v){const z=[v,...K,F.current,B.current,R.current.includes("reference")||S?m:null].filter(Q=>Q!=null),_=a||S?Fn(z,I,!I):Fn(z);return()=>{_()}}},[o,m,v,a,R,A,S,I]),se(()=>{if(o||!v)return;const q=ye(v),K=Oe(q);queueMicrotask(()=>{const z=V(v),_=D.current,Q=(typeof _=="number"?z[_]:_.current)||v,Y=ie(v,K);!P&&!Y&&g&&Se(Q,{preventScroll:Q===v})})},[o,g,v,P,V,D]),se(()=>{if(o||!v)return;let q=!1;const K=ye(v),z=Oe(K),_=y.current;Ft(z);function Q(Y){let{reason:ee,event:ue,nested:We}=Y;ee==="escape-key"&&C.domReference.current&&Ft(C.domReference.current),ee==="hover"&&ue.type==="mouseleave"&&(W.current=!0),ee==="outside-press"&&(We?(W.current=!1,q=!0):W.current=!(zr(ue)||Wr(ue)))}return w.on("openchange",Q),()=>{w.off("openchange",Q);const Y=Oe(K),ee=ie(v,Y)||j&&Ke(j.nodesRef.current,u).some(Qi=>{var xn;return ie((xn=Qi.context)==null?void 0:xn.elements.floating,Y)});(ee||_.openEvent&&["click","mousedown"].includes(_.openEvent.type))&&C.domReference.current&&Ft(C.domReference.current);const We=$n();O.current&&!W.current&&ne(We)&&(!(We!==Y&&Y!==K.body)||ee)&&Se(We,{cancelPrevious:!1,preventScroll:q})}},[o,v,O,y,C,w,j,u]),se(()=>{if(!(o||!A))return A.setFocusManagerState({modal:a,closeOnFocusOut:x,open:g,onOpenChange:b,refs:C}),()=>{A.setFocusManagerState(null)}},[o,A,a,g,b,C,x]),se(()=>{if(o||!v||typeof MutationObserver!="function"||P)return;const q=()=>{const z=v.getAttribute("tabindex");R.current.includes("floating")||Oe(ye(v))!==C.domReference.current&&$().length===0?z!=="0"&&v.setAttribute("tabindex","0"):z!=="-1"&&v.setAttribute("tabindex","-1")};q();const K=new MutationObserver(q);return K.observe(v,{childList:!0,subtree:!0,attributes:!0}),()=>{K.disconnect()}},[o,v,C,R,$,P]);function L(q){return o||!c||!a?null:E.createElement(ds,{ref:q==="start"?F:B,onClick:K=>b(!1,K.nativeEvent)},typeof c=="string"?c:"Dismiss")}const te=!o&&I&&(M||a);return E.createElement(E.Fragment,null,te&&E.createElement(yt,{"data-type":"inside",ref:A==null?void 0:A.beforeInsideRef,onFocus:q=>{if(a){const z=V();Se(i[0]==="reference"?z[0]:z[z.length-1])}else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(W.current=!1,qe(q,A.portalNode)){const z=Go()||m;z==null||z.focus()}else{var K;(K=A.beforeOutsideRef.current)==null||K.focus()}}}),!S&&L("start"),n,L("end"),te&&E.createElement(yt,{"data-type":"inside",ref:A==null?void 0:A.afterInsideRef,onFocus:q=>{if(a)Se(V()[0]);else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(x&&(W.current=!0),qe(q,A.portalNode)){const z=Xo()||m;z==null||z.focus()}else{var K;(K=A.afterOutsideRef.current)==null||K.focus()}}}))}const Lt=new Set,ni=E.forwardRef(function(t,n){let{lockScroll:o=!1,...i}=t;const r=Pt();return se(()=>{if(!o)return;Lt.add(r);const l=/iP(hone|ad|od)|iOS/.test(Oo()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",x=window.innerWidth-document.documentElement.clientWidth,g=s.left?parseFloat(s.left):window.pageXOffset,C=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,y=((b=window.visualViewport)==null?void 0:b.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(C-Math.floor(y))+"px",left:-(g-Math.floor(w))+"px",right:"0"})}return()=>{Lt.delete(r),Lt.size===0&&(Object.assign(s,{overflow:"",[c]:""}),l&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(g,C)))}},[r,o]),E.createElement("div",Fe({ref:n},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))});function zn(e){return ne(e.target)&&e.target.tagName==="BUTTON"}function Wn(e){return Vo(e)}function oi(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,g=E.useRef(),C=E.useRef(!1);return E.useMemo(()=>l?{reference:{onPointerDown(u){g.current=u.pointerType},onMouseDown(u){u.button===0&&(En(g.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"&&g.current){g.current=void 0;return}En(g.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){g.current=void 0,!(u.defaultPrevented||!x||zn(u))&&(u.key===" "&&!Wn(r)&&(u.preventDefault(),C.current=!0),u.key==="Enter"&&o(!(n&&a),u.nativeEvent,"click"))},onKeyUp(u){u.defaultPrevented||!x||zn(u)||Wn(r)||u.key===" "&&C.current&&(C.current=!1,o(!(n&&a),u.nativeEvent,"click"))}}}:{},[l,i,s,c,x,r,a,n,o])}const fs={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},ps={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Kn=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 ii(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:g=!0,outsidePressEvent:C="pointerdown",referencePress:u=!1,referencePressEvent:b="pointerdown",ancestorScroll:w=!1,bubbles:y,capture:m}=t,v=dn(),P=Ve(typeof g=="function"?g:()=>!1),S=typeof g=="function"?P:g,I=E.useRef(!1),R=E.useRef(!1),{escapeKey:D,outsidePress:O}=Kn(y),{escapeKey:j,outsidePress:A}=Kn(m),F=Ve(M=>{if(!n||!c||!x||M.key!=="Escape")return;const $=v?Ke(v.nodesRef.current,i):[];if(!D&&(M.stopPropagation(),$.length>0)){let V=!0;if($.forEach(L=>{var te;if((te=L.context)!=null&&te.open&&!L.context.dataRef.current.__escapeKeyBubbles){V=!1;return}}),!V)return}o(!1,Hr(M)?M.nativeEvent:M,"escape-key")}),B=Ve(M=>{var $;const V=()=>{var L;F(M),(L=De(M))==null||L.removeEventListener("keydown",V)};($=De(M))==null||$.addEventListener("keydown",V)}),W=Ve(M=>{const $=I.current;I.current=!1;const V=R.current;if(R.current=!1,C==="click"&&V||$||typeof S=="function"&&!S(M))return;const L=De(M),te="["+Qe("inert")+"]",q=ye(s).querySelectorAll(te);let K=X(L)?L:null;for(;K&&!ke(K);){const Q=Ae(K);if(ke(Q)||!X(Q))break;K=Q}if(q.length&&X(L)&&!_r(L)&&!ie(L,s)&&Array.from(q).every(Q=>!ie(K,Q)))return;if(ne(L)&&s){const Q=L.clientWidth>0&&L.scrollWidth>L.clientWidth,Y=L.clientHeight>0&&L.scrollHeight>L.clientHeight;let ee=Y&&M.offsetX>L.clientWidth;if(Y&&le(L).direction==="rtl"&&(ee=M.offsetX<=L.offsetWidth-L.clientWidth),ee||Q&&M.offsetY>L.clientHeight)return}const z=v&&Ke(v.nodesRef.current,i).some(Q=>{var Y;return Dt(M,(Y=Q.context)==null?void 0:Y.elements.floating)});if(Dt(M,s)||Dt(M,l)||z)return;const _=v?Ke(v.nodesRef.current,i):[];if(_.length>0){let Q=!0;if(_.forEach(Y=>{var ee;if((ee=Y.context)!=null&&ee.open&&!Y.context.dataRef.current.__outsidePressBubbles){Q=!1;return}}),!Q)return}o(!1,M,"outside-press")}),H=Ve(M=>{var $;const V=()=>{var L;W(M),(L=De(M))==null||L.removeEventListener(C,V)};($=De(M))==null||$.addEventListener(C,V)});return E.useEffect(()=>{if(!n||!c)return;a.current.__escapeKeyBubbles=D,a.current.__outsidePressBubbles=O;function M(L){o(!1,L,"ancestor-scroll")}const $=ye(s);x&&$.addEventListener("keydown",j?B:F,j),S&&$.addEventListener(C,A?H:W,A);let V=[];return w&&(X(l)&&(V=ve(l)),X(s)&&(V=V.concat(ve(s))),!X(r)&&r&&r.contextElement&&(V=V.concat(ve(r.contextElement)))),V=V.filter(L=>{var te;return L!==((te=$.defaultView)==null?void 0:te.visualViewport)}),V.forEach(L=>{L.addEventListener("scroll",M,{passive:!0})}),()=>{x&&$.removeEventListener("keydown",j?B:F,j),S&&$.removeEventListener(C,A?H:W,A),V.forEach(L=>{L.removeEventListener("scroll",M)})}},[a,s,l,r,x,S,C,n,o,w,c,D,O,F,j,B,W,A,H]),E.useEffect(()=>{I.current=!1},[S,C]),E.useMemo(()=>c?{reference:{onKeyDown:F,[fs[b]]:M=>{u&&o(!1,M.nativeEvent,"reference-press")}},floating:{onKeyDown:F,onMouseDown(){R.current=!0},onMouseUp(){R.current=!0},[ps[C]]:()=>{I.current=!0}}}:{},[c,u,C,b,o,F])}let Xt;process.env.NODE_ENV!=="production"&&(Xt=new Set);function ri(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 O="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=Xt)!=null&&l.has(O))){var s;(s=Xt)==null||s.add(O),console.error(O)}}}const[a,c]=E.useState(null),x=((t=e.elements)==null?void 0:t.reference)||a,g=Rl(e),C=dn(),u=ns()!=null,b=Ve((O,j,A)=>{O&&(y.current.openEvent=j),m.emit("openchange",{open:O,event:j,reason:A,nested:u}),o==null||o(O,j,A)}),w=E.useRef(null),y=E.useRef({}),m=E.useState(()=>Zl())[0],v=Pt(),P=E.useCallback(O=>{const j=X(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),contextElement:O}:O;g.refs.setReference(j)},[g.refs]),S=E.useCallback(O=>{(X(O)||O===null)&&(w.current=O,c(O)),(X(g.refs.reference.current)||g.refs.reference.current===null||O!==null&&!X(O))&&g.refs.setReference(O)},[g.refs]),I=E.useMemo(()=>({...g.refs,setReference:S,setPositionReference:P,domReference:w}),[g.refs,S,P]),R=E.useMemo(()=>({...g.elements,domReference:x}),[g.elements,x]),D=E.useMemo(()=>({...g,refs:I,elements:R,dataRef:y,nodeId:i,floatingId:v,events:m,open:n,onOpenChange:b}),[g,i,v,m,n,b,I,R]);return se(()=>{const O=C==null?void 0:C.nodesRef.current.find(j=>j.id===i);O&&(O.context=D)}),E.useMemo(()=>({...g,context:D,refs:I,elements:R}),[g,I,R,D])}const qn="active",Hn="selected";function Nt(e,t,n){const o=new Map,i=n==="item";let r=e;if(i&&e){const{[qn]:l,[Hn]: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&&[qn,Hn].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof x=="function"){var g;(g=o.get(c))==null||g.push(x),l[c]=function(){for(var C,u=arguments.length,b=new Array(u),w=0;w<u;w++)b[w]=arguments[w];return(C=o.get(c))==null?void 0:C.map(y=>y(...b)).find(y=>y!==void 0)}}}else l[c]=x}),l),{})}}function li(e){e===void 0&&(e=[]);const t=e,n=E.useCallback(r=>Nt(r,e,"reference"),t),o=E.useCallback(r=>Nt(r,e,"floating"),t),i=E.useCallback(r=>Nt(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 hs(e={}){const{initialOpen:t=!1,open:n,onOpenChange:o}=e,[i,r]=E.useState(t),l=n??i,s=o??r,a=ri({open:l,onOpenChange:s}),c=a.context,x=oi(c,{enabled:n==null}),g=ii(c,{outsidePressEvent:"mousedown"}),C=li([x,g]);return E.useMemo(()=>({open:l,setOpen:s,...C,...a}),[l,s,C,a])}const si=E.createContext(null),ai=()=>{const e=E.useContext(si);if(e==null)throw new Error("Dialog components must be wrapped in <Dialog />");return e};function gs({children:e,...t}){const n=hs(t);return f.jsx(si.Provider,{value:n,children:e})}const ci=k.css`
|
|
151
151
|
display: flex;
|
|
152
152
|
justify-content: center;
|
|
153
153
|
align-items: center;
|
|
@@ -155,7 +155,7 @@ ${c}`);case h.ConfiguratorErrorType.SessionParametersInvalid:return o(`Configura
|
|
|
155
155
|
padding: var(--space-md-fixed);
|
|
156
156
|
`,ms=k(ni)`
|
|
157
157
|
${ci};
|
|
158
|
-
`,ys=T.forwardRef((e,t)=>{const{style:n,children:o,components:i,...r}=e,l=ai(),s=un([l.refs.setFloating,t]),a=(i==null?void 0:i.Overlay)??ms;return f.jsx(Zo,{children:f.jsx(a,{lockScroll:!0,children:f.jsx(ti,{context:l.context,children:f.jsx("div",{ref:s,...l.getFloatingProps(r),children:o})})})})}),bs=ys;function ui(e){const t=T.useContext(
|
|
158
|
+
`,ys=T.forwardRef((e,t)=>{const{style:n,children:o,components:i,...r}=e,l=ai(),s=un([l.refs.setFloating,t]),a=(i==null?void 0:i.Overlay)??ms;return f.jsx(Zo,{children:f.jsx(a,{lockScroll:!0,children:f.jsx(ti,{context:l.context,children:f.jsx("div",{ref:s,...l.getFloatingProps(r),children:o})})})})}),bs=ys;function ui(e){const t=T.useContext(He),[n,o]=T.useState(t);return f.jsx(He.Provider,{value:n,children:e.children})}const xs=T.forwardRef((e,t)=>{const{setOpen:n}=ai();return f.jsx("button",{type:"button",ref:t,...e,onClick:o=>{var i;(i=e.onClick)==null||i.call(e,o),n(!1)}})}),Cs=xs,vs=k.span`
|
|
159
159
|
overflow: hidden;
|
|
160
160
|
white-space: nowrap;
|
|
161
161
|
text-overflow: ellipsis;
|
|
@@ -232,10 +232,10 @@ ${c}`);case h.ConfiguratorErrorType.SessionParametersInvalid:return o(`Configura
|
|
|
232
232
|
}
|
|
233
233
|
`;function Vs(e){const t=xe(),n=(t==null?void 0:t.displayMode)==="dialog";return f.jsx(gs,{open:n,onOpenChange:o=>!o&&n&&(t==null?void 0:t.dismiss()),children:f.jsx(js,{...e,isOpen:n,children:T.Children.toArray(e.content)[0]??f.jsx(Os,{children:f.jsx(Br,{})})})})}function js(e){return f.jsx(d.AnimatePresence,{initial:!1,children:e.isOpen&&f.jsx(tn.Provider,{value:e,children:f.jsx(Ds,{...e,components:{Overlay:Ms},children:f.jsx(ui,{children:e.children})})})})}const ks=k(d.motion(ni))`
|
|
234
234
|
${ci}
|
|
235
|
-
`;function Ms(e){return f.jsx(ks,{...e,initial:{backgroundColor:"rgba(0,0,0,0)"},animate:{backgroundColor:"rgba(0,0,0,0.1)"},exit:{backgroundColor:"rgba(0,0,0,0)"}})}function Fs(e){const[t,n]=T.useState(null),{explain:o,applySolution:i}=U.useExplain(),r=T.useRef(null),l=T.useCallback(async(u,b,w,y)=>{const m=Ji.guid();r.current=m,n(null);try{const v=await u(),P=v,S=v,I=(P==null?void 0:P.decisionExplanations)??[],R=(S==null?void 0:S.constraintExplanations)??[];m==r.current&&n({controlId:y,displayMode:I.length===0&&R.length>0?"dialog":w,explainQuestion:b,hasError:!1,decisionExplanations:Ls(I),constraintExplanations:R})}catch{m==r.current&&n({controlId:y,displayMode:w,explainQuestion:b,hasError:!0,decisionExplanations:null,constraintExplanations:null})}},[]),s=T.useCallback((u,b,w)=>{const y=typeof u=="function"?u(h.explainQuestionBuilder):u;return l(()=>e.explainConstraints?o(y,"full"):o(y,"decisions"),y,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]),g=T.useCallback(u=>{n(b=>b!=null?{...b,displayMode:u}:b)},[]),C=T.useMemo(()=>({process:t,applySolution:x,explain:s,handleExplainAnswer:a,dismiss:c,switchMode:g}),[t,x,s,a,c,g]);return f.jsx(
|
|
235
|
+
`;function Ms(e){return f.jsx(ks,{...e,initial:{backgroundColor:"rgba(0,0,0,0)"},animate:{backgroundColor:"rgba(0,0,0,0.1)"},exit:{backgroundColor:"rgba(0,0,0,0)"}})}function Fs(e){const[t,n]=T.useState(null),{explain:o,applySolution:i}=U.useExplain(),r=T.useRef(null),l=T.useCallback(async(u,b,w,y)=>{const m=Ji.guid();r.current=m,n(null);try{const v=await u(),P=v,S=v,I=(P==null?void 0:P.decisionExplanations)??[],R=(S==null?void 0:S.constraintExplanations)??[];m==r.current&&n({controlId:y,displayMode:I.length===0&&R.length>0?"dialog":w,explainQuestion:b,hasError:!1,decisionExplanations:Ls(I),constraintExplanations:R})}catch{m==r.current&&n({controlId:y,displayMode:w,explainQuestion:b,hasError:!0,decisionExplanations:null,constraintExplanations:null})}},[]),s=T.useCallback((u,b,w)=>{const y=typeof u=="function"?u(h.explainQuestionBuilder):u;return l(()=>e.explainConstraints?o(y,"full"):o(y,"decisions"),y,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]),g=T.useCallback(u=>{n(b=>b!=null?{...b,displayMode:u}:b)},[]),C=T.useMemo(()=>({process:t,applySolution:x,explain:s,handleExplainAnswer:a,dismiss:c,switchMode:g}),[t,x,s,a,c,g]);return f.jsx(He.Provider,{value:C,children:e.children})}function Ls(e){const t=p.pipe(p.Bool.Ord,p.Ord.contramap(o=>o.solution==null)),n=p.pipe(p.Num.Ord,p.Ord.contramap(o=>o.causedByDecisions.length));return p.pipe(e,p.RA.sortBy([t,n]))}const Le=new Map;function bt(e){const{singletonId:t,children:n}=e,[o,i]=T.useState(!1),r=T.useRef({chose:()=>i(!0)});return T.useEffect(()=>(Ns(t,r.current),()=>Bs(t,r.current)),[]),o?f.jsx(f.Fragment,{children:n}):null}function Ns(e,t){zs(e).candidates.add(t),fi(e)}function Bs(e,t){let n=Le.get(e);n!=null&&(n.candidates.delete(t),n.chosen===t&&(n.chosen=null),$s(e),fi(e))}function fi(e){let t=Le.get(e);if(t==null||t.chosen!=null)return;const n=t.candidates.values().next().value;n!=null&&(t.chosen=n,n.chose())}function $s(e){let t=Le.get(e);t==null||t.candidates.size>0||Le.delete(e)}function zs(e){let t=Le.get(e);return t==null&&(t={chosen:null,candidates:new Set},Le.set(e,t)),t}const oe={attributeId:{title:"Attribute Id",type:d.ControlType.String},componentPath:{title:"Component Path",type:d.ControlType.String},sharedConfigurationModel:{title:"Shared Configuration Model",type:d.ControlType.String}},_n={description:{title:"Description",type:d.ControlType.String},regex:{title:"Regex",type:d.ControlType.String},direction:{title:"Direction",type:d.ControlType.Enum,defaultValue:"asc",options:["asc","desc"],displaySegmentedControl:!0},mode:{title:"Mode",type:d.ControlType.Enum,defaultValue:"isMatch",options:["isMatch","string","numeric"]}},Ws={choiceValueSorting:{title:"Choice Value Sorting",type:d.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{defaultRules:{title:"Default Rules",type:d.ControlType.Array,control:{type:d.ControlType.Object,controls:_n}},attributes:{title:"Attribute",type:d.ControlType.Array,control:{type:d.ControlType.Object,controls:{...oe,choiceValues:{title:"Choice Values",type:d.ControlType.Array,control:{type:d.ControlType.String}},rules:{title:"Rules",type:d.ControlType.Array,control:{type:d.ControlType.Object,controls:_n}}}}},jsonDefinition:{title:"Definition – JSON",type:d.ControlType.String,displayTextArea:!0}}}};function Ks(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=p.Ord.fromCompare(o);return{cachedOrderings:n,...i}}function qs(){const e=[];return{getCache:(t,n)=>{const o=e.find(r=>r.eq===t&&r.ord===n);if(o)return o.ordCache;const i=Ks(t,n);return e.push({eq:t,ord:n,ordCache:i}),i}}}const pi=p.Ord.getMonoid(),Hs=new Intl.Collator("en",{sensitivity:"base"}),_s=new Intl.Collator("en",{sensitivity:"variant"}),Us={regex:".*",direction:"asc",mode:"string"},Qs=p.pipe([Hs,_s],p.RA.map(na),p.MO.concatAll(p.Ord.getMonoid())),Ys=p.pipe(p.Bool.Ord,p.Ord.contramap(e=>p.O.isSome(e))),Gs=p.Num.Ord;function Xs(e,t){return p.pipe((t==null?void 0:t.attributes)??[],p.RA.findFirst(n=>h.globalAttributeIdEq.equals(Z(n),e)),p.O.map(n=>[Js(n.choiceValues??[]),Un(n.rules??[])]),p.O.getOrElse(()=>[Un((t==null?void 0:t.defaultRules)??[])]),p.RA.append(hi(Us)),p.MO.concatAll(pi))}function Js(e){return p.pipe(p.Num.Ord,p.Ord.reverse,p.O.getOrd,p.Ord.reverse,p.Ord.contramap(t=>p.pipe(e,p.RA.findIndex(n=>p.Str.Eq.equals(t,n)))))}function Un(e){return p.pipe(e,p.RA.map(hi),p.MO.concatAll(pi))}function hi(e){const t=p.O.tryCatch(()=>new RegExp(e.regex)),n=N.match(e.mode).returnType().with("string",()=>Zs(e.direction)).with("numeric",()=>ea(e.direction)).with("isMatch",()=>ta(e.direction)).exhaustive();return p.pipe(n,p.Ord.contramap(o=>p.pipe(t,p.O.chainNullableK(i=>(i.lastIndex=0,i[Symbol.match](o))),p.O.chain(i=>p.pipe(i,p.RA.lookup(1),p.O.alt(()=>p.pipe(i,p.RA.lookup(0))))))))}function Zs(e){return p.pipe(Qs,hn(e),gi)}function ea(e){return p.pipe(Gs,hn(e),gi,p.Ord.contramap(p.O.chain(p.Num.parseFloatO)))}function ta(e){return p.pipe(Ys,hn(e))}function gi(e){return p.pipe(e,p.Ord.reverse,p.O.getOrd,p.Ord.reverse)}function hn(e){return t=>N.match(e).returnType().with("asc",()=>t).with("desc",()=>p.Ord.reverse(t)).exhaustive()}function na(e){return p.Ord.fromCompare((t,n)=>N.match(e.compare(t,n)).returnType().with(N.P.number.gt(0),()=>1).with(N.P.number.lt(0),()=>-1).otherwise(()=>0))}const oa=qs(),mi=T.createContext(null);function xt(e,t){const n=T.useContext(mi),o=T.useMemo(()=>p.pipe(Xs(e,n),r=>oa.getCache(p.Str.Eq,r),p.Ord.contramap(r=>r.id)),[]),{attribute:i}=U.useChoiceAttribute(e);return p.pipe(t??(i==null?void 0:i.values)??[],p.RA.sort(o))}const ia={localization:{title:"Localization",type:d.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{jsonDefinition:{title:"Definition – JSON",type:d.ControlType.String,displayTextArea:!0}}}};globalThis&&globalThis.__spreadArray;function ra(e){return e}globalThis&&globalThis.__spreadArray;var la=function(e){return{_tag:"Left",left:e}},sa=function(e){return{_tag:"Right",right:e}},aa=la,ca=sa,ua=function(e,t){try{return ca(e())}catch(n){return aa(t(n))}},da=function(e){return ua(function(){return JSON.parse(e)},ra)};const Ct=J.z.object({localId:J.z.string(),componentPath:J.z.string().array().optional().nullish(),sharedConfigurationModelId:J.z.string().optional().nullish()});function yi(e){var t;return{sharedConfigurationModel:e.sharedConfigurationModelId??"",componentPath:((t=e.componentPath)==null?void 0:t.join(" -> "))??"",attributeId:e.localId}}function gn(e,t,n){return o=>T.useMemo(()=>p.pipe(o,p.O.fromNullable,p.O.filter(p.P.not(p.Str.isEmpty)),p.E.fromOption(()=>null),p.E.chain(p.flow(da,p.E.mapLeft(i=>`The JSON content could not be parsed. Please check for syntax errors.
|
|
236
236
|
`+i.toString()),p.E.chain(i=>p.pipe(t.safeParse(i),r=>r.success?p.E.right(r.data):p.E.left(r.error),p.E.mapLeft(r=>Zi.fromError(r,{maxIssuesInMessage:5,issueSeparator:`
|
|
237
237
|
- `})),p.E.mapLeft(r=>`The JSON schema is invalid. Ensure all required fields and types are correctly defined.
|
|
238
|
-
`+r.toString()))),p.E.map(n),p.E.mapLeft(i=>f.jsx(yo,{type:"warning",title:e+" definition is invalid and was ignored",message:i}))))),[o])}const bi=J.z.object({attributeId:Ct,name:J.z.array(J.z.object({localeCode:J.z.string(),translation:J.z.string()}))}),fa=bi.extend({choiceValueId:J.z.string()}),pa=J.z.object({attributes:bi.array().optional().nullish(),choiceValues:fa.array().optional().nullish()});function Qn(e){return{...yi(e.attributeId),name:p.pipe(e.name,p.RA.map(t=>t),p.RA.toArray)}}function ha(e){const t=p.pipe(e.attributes??[],p.RA.map(Qn),p.RA.toArray),n=p.pipe(e.choiceValues??[],p.RA.map(o=>({...Qn(o),choiceValueId:o.choiceValueId})),p.RA.toArray);return{attributes:t,choiceValues:n}}const ga=gn("Localization",pa,ha),ma=ga,Yn=J.z.object({regex:J.z.string(),direction:J.z.enum(["asc","desc"]),mode:J.z.enum(["isMatch","string","numeric"]),description:J.z.string().optional()}),ya=J.z.object({defaultRules:Yn.array().optional().nullish(),attributes:J.z.object({attributeId:Ct,choiceValues:J.z.string().array(),rules:Yn.array()}).array().optional().nullish()});function ba(e){const t=p.pipe(e.defaultRules??[],p.RA.map(o=>o),p.RA.toArray);return{attributes:p.pipe(e.attributes??[],p.RA.map(o=>({...yi(o.attributeId),choiceValues:p.RA.toArray(o.choiceValues),rules:p.pipe(o.rules,p.RA.map(i=>i),p.RA.toArray)})),p.RA.toArray),defaultRules:t}}const xa=gn("ChoiceValueSorting",ya,ba),Ca=xa,va=J.z.object({attributeId:Ct,decisions:Ct.array()}),wa=va.array(),Sa=gn("AttributeRelations",wa,e=>e),Ta=Sa,Ea={wizardAttributeRelations:{title:"Wizard Attribute Relations",type:d.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{wizardSteps:{title:"Wizard Steps",type:d.ControlType.Array,control:{type:d.ControlType.Object,controls:{name:{title:"Name",type:d.ControlType.String},attributes:{title:"Attributes",type:d.ControlType.Array,control:{type:d.ControlType.Object,controls:oe}}}}}}}},xi=ae(e=>{var D,O,j,A;const{hcaBaseUrl:t,sessionCreation:n,accessToken:o,sessionCreateUrl:i,sessionDeleteUrl:r,deploymentName:l,channel:s,children:a,explainDialogProps:c,explainPopoverProps:x,explainConstraints:g}=e,{activeLocale:C}=d.useLocaleInfo(),u=C.code;if(T.useEffect(()=>{console.info("Current locale code:",u)},[u]),G())return f.jsxs(f.Fragment,{children:[a,f.jsx(bt,{singletonId:"Configuration",children:f.jsx(Cn,{})})]});const w=Ta((D=e.attributeRelations)==null?void 0:D.jsonDefinition),y=T.useMemo(()=>p.pipe(w,p.O.fromEither,p.O.toNullable),[w]),m=Ca((O=e.choiceValueSorting)==null?void 0:O.jsonDefinition),v=T.useMemo(()=>p.pipe(m,p.E.orElse(()=>p.pipe(e.choiceValueSorting,p.E.fromNullable(null))),p.E.getOrElse(()=>({attributes:[],defaultRules:[]}))),[m,e.choiceValueSorting]),P=ma((j=e.localization)==null?void 0:j.jsonDefinition),S=T.useMemo(()=>p.pipe(P,p.E.getOrElse(()=>({attributes:[],choiceValues:[]}))),[P]),I=p.pipe((A=e.wizardAttributeRelations)==null?void 0:A.wizardSteps,p.O.fromNullable,p.O.filter(p.RA.isNonEmpty),p.O.map(p.RA.map(F=>({attributes:p.pipe(F.attributes,p.RA.map(Z))}))),p.O.toNullable),R=T.useMemo(()=>({apiBaseUrl:Yi(t,"api","engine"),sessionInitialisationOptions:N.match(n).with("client-side",()=>({accessToken:o})).with("server-side",()=>({sessionCreateUrl:i})).exhaustive(),configurationModelSource:{type:h.ConfigurationModelSourceType.Channel,channel:s,deploymentName:l},attributeRelations:y,wizardAttributeRelations:I,allowedInExplain:{rules:{type:h.AllowedRulesInExplainType.all}}}),[t,n,o,i,r,s,l,y]);return f.jsxs(f.Fragment,{children:[f.jsxs(U.Configuration,{sessionContext:R,children:[p.pipe(P,p.E.swap,p.O.fromEither,p.O.toNullable),p.pipe(m,p.E.swap,p.O.fromEither,p.O.toNullable),p.pipe(w,p.E.swap,p.O.fromEither,p.O.toNullable),f.jsx(dr,{...e}),f.jsx(T.Suspense,{children:f.jsx(Et.Provider,{value:S,children:f.jsxs(Fs,{explainConstraints:g,children:[f.jsx(en.Provider,{value:x,children:f.jsx(mi.Provider,{value:v,children:a})}),f.jsx(Vs,{...c})]})})})]}),f.jsx(bt,{singletonId:"Configuration",children:f.jsx(Cn,{})})]})}),Aa=xi;d.addPropertyControls(xi,{children:{title:"Content",type:d.ControlType.ComponentInstance},channel:{type:d.ControlType.String,title:"Channel",defaultValue:"release"},deploymentName:{type:d.ControlType.String,title:"Deployment Name"},hcaBaseUrl:{title:"HCA Base URL",type:d.ControlType.String,defaultValue:"https://spc.cloud.ceventis.de/hca"},sessionCreation:{title:"Session Creation",type:d.ControlType.Enum,displaySegmentedControl:!0,segmentedControlDirection:"horizontal",defaultValue:"client-side",options:["client-side","server-side"]},accessToken:{title:"HCA Access Token",type:d.ControlType.String,obscured:!0,hidden:e=>e.sessionCreation!=="client-side"},sessionCreateUrl:{title:"Create Session URl",type:d.ControlType.String,hidden:e=>e.sessionCreation!=="server-side"},sessionDeleteUrl:{title:"Close Session URl",type:d.ControlType.String,hidden:e=>e.sessionCreation!=="server-side"},configurationModelNotFoundContent:{title:"Content – Configuration Model not found",type:d.ControlType.ComponentInstance},errorContent:{title:"Content – Error",type:d.ControlType.ComponentInstance},accessTokenInvalidContent:{title:"Content – HCA Access Token invalid",type:d.ControlType.ComponentInstance},accessTokenRestrictionContent:{title:"Content – HCA Access Token restriction",type:d.ControlType.ComponentInstance},explainDialogProps:{title:"Explain Dialog",type:d.ControlType.Object,optional:!1,controls:Cr,buttonTitle:"Props…"},explainPopoverProps:{title:"Explain Popover",type:d.ControlType.Object,optional:!1,controls:xr,buttonTitle:"Props…"},explainConstraints:{title:"Explain Constraints",type:d.ControlType.Boolean,defaultValue:!1},attributeRelations:{title:"Attribute Relations",type:d.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{jsonDefinition:{title:"Definition – JSON",type:d.ControlType.String,displayTextArea:!0}}},...Ea,...Ws,...ia});const $e={explain:{title:"Explain",type:d.ControlType.Enum,defaultValue:"popover",options:["popover","dialog","disabled"]}},Jt={type:d.ControlType.Object,optional:!0,controls:{fill:{title:"Fill",type:d.ControlType.Color,optional:!0},color:{title:"Color",type:d.ControlType.Color,optional:!0},borderColor:{title:"Border Color",type:d.ControlType.Color,optional:!0}}},Ci={...oe,...de({color:"black",text:{fontSize:16,textAlign:"left"}}),...
|
|
238
|
+
`+r.toString()))),p.E.map(n),p.E.mapLeft(i=>f.jsx(yo,{type:"warning",title:e+" definition is invalid and was ignored",message:i}))))),[o])}const bi=J.z.object({attributeId:Ct,name:J.z.array(J.z.object({localeCode:J.z.string(),translation:J.z.string()}))}),fa=bi.extend({choiceValueId:J.z.string()}),pa=J.z.object({attributes:bi.array().optional().nullish(),choiceValues:fa.array().optional().nullish()});function Qn(e){return{...yi(e.attributeId),name:p.pipe(e.name,p.RA.map(t=>t),p.RA.toArray)}}function ha(e){const t=p.pipe(e.attributes??[],p.RA.map(Qn),p.RA.toArray),n=p.pipe(e.choiceValues??[],p.RA.map(o=>({...Qn(o),choiceValueId:o.choiceValueId})),p.RA.toArray);return{attributes:t,choiceValues:n}}const ga=gn("Localization",pa,ha),ma=ga,Yn=J.z.object({regex:J.z.string(),direction:J.z.enum(["asc","desc"]),mode:J.z.enum(["isMatch","string","numeric"]),description:J.z.string().optional()}),ya=J.z.object({defaultRules:Yn.array().optional().nullish(),attributes:J.z.object({attributeId:Ct,choiceValues:J.z.string().array(),rules:Yn.array()}).array().optional().nullish()});function ba(e){const t=p.pipe(e.defaultRules??[],p.RA.map(o=>o),p.RA.toArray);return{attributes:p.pipe(e.attributes??[],p.RA.map(o=>({...yi(o.attributeId),choiceValues:p.RA.toArray(o.choiceValues),rules:p.pipe(o.rules,p.RA.map(i=>i),p.RA.toArray)})),p.RA.toArray),defaultRules:t}}const xa=gn("ChoiceValueSorting",ya,ba),Ca=xa,va=J.z.object({attributeId:Ct,decisions:Ct.array()}),wa=va.array(),Sa=gn("AttributeRelations",wa,e=>e),Ta=Sa,Ea={wizardAttributeRelations:{title:"Wizard Attribute Relations",type:d.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{wizardSteps:{title:"Wizard Steps",type:d.ControlType.Array,control:{type:d.ControlType.Object,controls:{name:{title:"Name",type:d.ControlType.String},attributes:{title:"Attributes",type:d.ControlType.Array,control:{type:d.ControlType.Object,controls:oe}}}}}}}},xi=ae(e=>{var D,O,j,A;const{hcaBaseUrl:t,sessionCreation:n,accessToken:o,sessionCreateUrl:i,sessionDeleteUrl:r,deploymentName:l,channel:s,children:a,explainDialogProps:c,explainPopoverProps:x,explainConstraints:g}=e,{activeLocale:C}=d.useLocaleInfo(),u=C.code;if(T.useEffect(()=>{console.info("Current locale code:",u)},[u]),G())return f.jsxs(f.Fragment,{children:[a,f.jsx(bt,{singletonId:"Configuration",children:f.jsx(Cn,{})})]});const w=Ta((D=e.attributeRelations)==null?void 0:D.jsonDefinition),y=T.useMemo(()=>p.pipe(w,p.O.fromEither,p.O.toNullable),[w]),m=Ca((O=e.choiceValueSorting)==null?void 0:O.jsonDefinition),v=T.useMemo(()=>p.pipe(m,p.E.orElse(()=>p.pipe(e.choiceValueSorting,p.E.fromNullable(null))),p.E.getOrElse(()=>({attributes:[],defaultRules:[]}))),[m,e.choiceValueSorting]),P=ma((j=e.localization)==null?void 0:j.jsonDefinition),S=T.useMemo(()=>p.pipe(P,p.E.getOrElse(()=>({attributes:[],choiceValues:[]}))),[P]),I=p.pipe((A=e.wizardAttributeRelations)==null?void 0:A.wizardSteps,p.O.fromNullable,p.O.filter(p.RA.isNonEmpty),p.O.map(p.RA.map(F=>({attributes:p.pipe(F.attributes,p.RA.map(Z))}))),p.O.toNullable),R=T.useMemo(()=>({apiBaseUrl:Yi(t,"api","engine"),sessionInitialisationOptions:N.match(n).with("client-side",()=>({accessToken:o})).with("server-side",()=>({sessionCreateUrl:i})).exhaustive(),configurationModelSource:{type:h.ConfigurationModelSourceType.Channel,channel:s,deploymentName:l},attributeRelations:y,wizardAttributeRelations:I,allowedInExplain:{rules:{type:h.AllowedRulesInExplainType.all}}}),[t,n,o,i,r,s,l,y]);return f.jsxs(f.Fragment,{children:[f.jsxs(U.Configuration,{sessionContext:R,children:[p.pipe(P,p.E.swap,p.O.fromEither,p.O.toNullable),p.pipe(m,p.E.swap,p.O.fromEither,p.O.toNullable),p.pipe(w,p.E.swap,p.O.fromEither,p.O.toNullable),f.jsx(dr,{...e}),f.jsx(T.Suspense,{children:f.jsx(Et.Provider,{value:S,children:f.jsxs(Fs,{explainConstraints:g,children:[f.jsx(en.Provider,{value:x,children:f.jsx(mi.Provider,{value:v,children:a})}),f.jsx(Vs,{...c})]})})})]}),f.jsx(bt,{singletonId:"Configuration",children:f.jsx(Cn,{})})]})}),Aa=xi;d.addPropertyControls(xi,{children:{title:"Content",type:d.ControlType.ComponentInstance},channel:{type:d.ControlType.String,title:"Channel",defaultValue:"release"},deploymentName:{type:d.ControlType.String,title:"Deployment Name"},hcaBaseUrl:{title:"HCA Base URL",type:d.ControlType.String,defaultValue:"https://spc.cloud.ceventis.de/hca"},sessionCreation:{title:"Session Creation",type:d.ControlType.Enum,displaySegmentedControl:!0,segmentedControlDirection:"horizontal",defaultValue:"client-side",options:["client-side","server-side"]},accessToken:{title:"HCA Access Token",type:d.ControlType.String,obscured:!0,hidden:e=>e.sessionCreation!=="client-side"},sessionCreateUrl:{title:"Create Session URl",type:d.ControlType.String,hidden:e=>e.sessionCreation!=="server-side"},sessionDeleteUrl:{title:"Close Session URl",type:d.ControlType.String,hidden:e=>e.sessionCreation!=="server-side"},configurationModelNotFoundContent:{title:"Content – Configuration Model not found",type:d.ControlType.ComponentInstance},errorContent:{title:"Content – Error",type:d.ControlType.ComponentInstance},accessTokenInvalidContent:{title:"Content – HCA Access Token invalid",type:d.ControlType.ComponentInstance},accessTokenRestrictionContent:{title:"Content – HCA Access Token restriction",type:d.ControlType.ComponentInstance},explainDialogProps:{title:"Explain Dialog",type:d.ControlType.Object,optional:!1,controls:Cr,buttonTitle:"Props…"},explainPopoverProps:{title:"Explain Popover",type:d.ControlType.Object,optional:!1,controls:xr,buttonTitle:"Props…"},explainConstraints:{title:"Explain Constraints",type:d.ControlType.Boolean,defaultValue:!1},attributeRelations:{title:"Attribute Relations",type:d.ControlType.Object,defaultValue:null,buttonTitle:"Definition…",controls:{jsonDefinition:{title:"Definition – JSON",type:d.ControlType.String,displayTextArea:!0}}},...Ea,...Ws,...ia});const $e={explain:{title:"Explain",type:d.ControlType.Enum,defaultValue:"popover",options:["popover","dialog","disabled"]}},Jt={type:d.ControlType.Object,optional:!0,controls:{fill:{title:"Fill",type:d.ControlType.Color,optional:!0},color:{title:"Color",type:d.ControlType.Color,optional:!0},borderColor:{title:"Border Color",type:d.ControlType.Color,optional:!0}}},Ci={...oe,...de({color:"black",text:{fontSize:16,textAlign:"left"}}),..._e({fill:"#EBEBEB",radius:6}),implicitLabelPrefix:{title:"Implicit Label Prefix",type:d.ControlType.String,defaultValue:"Implicit: "},unsatisfiedColors:{...Jt,title:"Unsatisfied Colors"},implicitSelectedColors:{...Jt,title:"Implicit Selected Colors"},...$e},Zt=(e,t,n)=>{var r,l,s,a,c,x;const o=Be(e),i=fe(e);return{...o,...i,backgroundColor:N.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:N.P.string.minLength(1)},g=>g.unsatisfiedFill).with({isImplicitSelected:!0,implicitSelectedFill:N.P.string.minLength(1)},g=>g.implicitSelectedFill).otherwise(()=>o.backgroundColor),borderColor:N.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:N.P.string.minLength(1)},g=>g.unsatisfiedBorderColor).with({isImplicitSelected:!0,implicitSelectedBorderColor:N.P.string.minLength(1)},g=>g.implicitSelectedBorderColor).otherwise(()=>o.borderColor),color:N.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:N.P.string.minLength(1)},g=>g.unsatisfiedColor).with({isImplicitSelected:!0,implicitSelectedColor:N.P.string.minLength(1)},g=>g.implicitSelectedColor).otherwise(()=>i.color),...e.style}},mn={...Ci,resetLabel:{title:"Reset Label",type:d.ControlType.String,defaultValue:"Reset"},blockedLabel:{title:"Blocked Label",type:d.ControlType.String,defaultValue:"Blocked"},appearance:{title:"Appearance",type:d.ControlType.Enum,defaultValue:"auto",displaySegmentedControl:!0,segmentedControlDirection:"horizontal",options:["auto","none"]}},Ne=(e,t,n)=>({...Zt(e,t,n),appearance:e.appearance});function he(){const{explain:e,handleExplainAnswer:t}=T.useContext(He);return{explain:e,handleExplainAnswer:t}}function Ia(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,g=ri({placement:n,open:c,onOpenChange:x,whileElementsMounted:Sl,middleware:[ll(((l==null?void 0:l.height)??0)+5),El({crossAxis:n.includes("-"),fallbackAxisSideDirection:"end",padding:5}),Tl({padding:5}),...l?[Il(l)]:[]]}),C=g.context,u=oi(C,{enabled:i==null}),b=ii(C),w=li([u,b]);return T.useMemo(()=>({open:c,setOpen:x,...w,...g,modal:o,arrow:l}),[c,x,w,g,o,l])}const vi=T.createContext(null),et=()=>{const e=T.useContext(vi);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e};function Ra({children:e,...t}){const n=Ia(t);return f.jsx(vi.Provider,{value:n,children:e})}const Pa=T.forwardRef(function(t,n){const o=T.Children.toArray(t.children)[0],i=et(),r=t.children.ref,l=un([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"})):f.jsx("span",{children:"Not valid children for PopoverTrigger"})}),Oa=Pa,Da=k.button`
|
|
239
239
|
appearance: none;
|
|
240
240
|
border: none;
|
|
241
241
|
text-decoration: underline;
|
|
@@ -311,7 +311,7 @@ ${c}`);case h.ConfiguratorErrorType.SessionParametersInvalid:return o(`Configura
|
|
|
311
311
|
white-space: nowrap;
|
|
312
312
|
text-overflow: ellipsis;
|
|
313
313
|
margin-right: var(--space-md);
|
|
314
|
-
`;function
|
|
314
|
+
`;function Ha(e){const{popoverBox:t,closeButton:n}=St();return f.jsxs(Wa,{style:Be(t),children:[f.jsx(qa,{}),e.children,f.jsx(Ka,{style:vt(n),children:f.jsx(lt.FontAwesomeIcon,{icon:rt.faXmark})})]})}const _a=k(Ba)`
|
|
315
315
|
--color-explain-popover-box-fill: ${e=>e.popoverBox.fill};
|
|
316
316
|
--size-explain-popover-box-padding-top: ${e=>e.popoverBox.isMixedPadding?e.popoverBox.paddingTop:e.popoverBox.padding}px;
|
|
317
317
|
--size-explain-popover-box-padding-right: ${e=>e.popoverBox.isMixedPadding?e.popoverBox.paddingRight:e.popoverBox.padding}px;
|
|
@@ -326,12 +326,12 @@ ${c}`);case h.ConfiguratorErrorType.SessionParametersInvalid:return o(`Configura
|
|
|
326
326
|
}
|
|
327
327
|
`,Ua=k(Jl)`
|
|
328
328
|
fill: var(--color-explain-popover-box-fill);
|
|
329
|
-
`,Qa={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 Ya(e){const t=xe(),n=ce(),o=(t==null?void 0:t.displayMode)==="popover"&&(t==null?void 0:t.controlId)===n,i=T.useRef(null);return f.jsxs(Ra,{open:o,onOpenChange:r=>!r&&o&&(t==null?void 0:t.dismiss()),arrow:{width:20,height:10,padding:10,element:i},children:[f.jsx(Oa,{children:e.children}),f.jsxs(Ga,{isOpen:o,children:[T.Children.toArray(e.content)[0]??f.jsx(
|
|
329
|
+
`,Qa={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 Ya(e){const t=xe(),n=ce(),o=(t==null?void 0:t.displayMode)==="popover"&&(t==null?void 0:t.controlId)===n,i=T.useRef(null);return f.jsxs(Ra,{open:o,onOpenChange:r=>!r&&o&&(t==null?void 0:t.dismiss()),arrow:{width:20,height:10,padding:10,element:i},children:[f.jsx(Oa,{children:e.children}),f.jsxs(Ga,{isOpen:o,children:[T.Children.toArray(e.content)[0]??f.jsx(Ha,{children:f.jsx(La,{})}),f.jsx(Xa,{})]})]})}function Ga(e){var C,u;const t=St(),{middlewareData:n,arrow:o,placement:i}=et(),r=((C=n.arrow)==null?void 0:C.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,g=N.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 f.jsx(d.AnimatePresence,{initial:!1,children:e.isOpen&&f.jsx(_a,{...t,children:f.jsx(d.motion.div,{variants:Qa,initial:"initial",animate:"open",exit:"close",style:{transformOrigin:g},children:f.jsx(ui,{children:e.children})})})})}function Xa(){const{context:e,arrow:t}=et();return f.jsx(Ua,{ref:t.element,context:e,width:t.width,height:t.height})}function Ja(e){return T.forwardRef((t,n)=>{const o=G();return t.explain!=="popover"||o?f.jsx(e,{...t}):f.jsx(Ya,{children:f.jsx(e,{...t,ref:n})})})}function ge(e){return ae(yn(Ja(T.forwardRef(e))))}function pe(){alert(`Failed to apply your selection.
|
|
330
330
|
Please check your internet connection and try again.`)}function Za(){alert(`Failed to reset your configuration.
|
|
331
331
|
Please check your internet connection and try again.`)}const Xn=k.select`
|
|
332
332
|
color: inherit;
|
|
333
333
|
cursor: inherit;
|
|
334
|
-
`,Jn="<reset>",Zn="<nothing>",Si=ge((e,t)=>{if(G()){const A=Ne(e,!0,!1);return f.jsx(Xn,{style:A})}const o=ce(),i=Z(e),r=U.useChoiceAttribute(i);if(!r)return f.jsx("span",{children:"Choice Attribute not found"});const{explain:l}=he(),s=Ge(i),{attribute:a,makeDecision:c,clearDecisions:x,isMultiSelect:g,getIncludedChoiceValues:C,getBlockedChoiceValues:u,getAllowedChoiceValues:b}=r,w=xt(i,b()),y=xt(i,u()),m=C(),v=m.map(A=>A.id),P=v[0]??Zn,S=m.some(A=>{var F;return((F=A.decision)==null?void 0:F.kind)===h.DecisionKind.Explicit}),I=v.length>=1,R=m.some(A=>{var F;return((F=A.decision)==null?void 0:F.kind)===h.DecisionKind.Implicit}),D=w.length===0,O=async A=>{const F=e.explain,B=F!=="disabled"&&(()=>l(W=>W.whyIsStateNotPossible.choice(a.id).choiceValue(A).state(h.ChoiceValueDecisionState.Included),F,o));if(A===Jn)try{await x()}catch{pe()}else if(w.some(W=>W.id===A)){const W=v.some(
|
|
334
|
+
`,Jn="<reset>",Zn="<nothing>",Si=ge((e,t)=>{if(G()){const A=Ne(e,!0,!1);return f.jsx(Xn,{style:A})}const o=ce(),i=Z(e),r=U.useChoiceAttribute(i);if(!r)return f.jsx("span",{children:"Choice Attribute not found"});const{explain:l}=he(),s=Ge(i),{attribute:a,makeDecision:c,clearDecisions:x,isMultiSelect:g,getIncludedChoiceValues:C,getBlockedChoiceValues:u,getAllowedChoiceValues:b}=r,w=xt(i,b()),y=xt(i,u()),m=C(),v=m.map(A=>A.id),P=v[0]??Zn,S=m.some(A=>{var F;return((F=A.decision)==null?void 0:F.kind)===h.DecisionKind.Explicit}),I=v.length>=1,R=m.some(A=>{var F;return((F=A.decision)==null?void 0:F.kind)===h.DecisionKind.Implicit}),D=w.length===0,O=async A=>{const F=e.explain,B=F!=="disabled"&&(()=>l(W=>W.whyIsStateNotPossible.choice(a.id).choiceValue(A).state(h.ChoiceValueDecisionState.Included),F,o));if(A===Jn)try{await x()}catch{pe()}else if(w.some(W=>W.id===A)){const W=v.some(H=>H===A)?void 0:h.ChoiceValueDecisionState.Included;try{await c(A,W)}catch(H){if(H.type===h.ConfiguratorErrorType.ConflictWithConsequence&&B){await B();return}pe()}}else y.some(W=>W.id===A)&&B&&await B()},j=nc(e,a.isSatisfied,R,D);return f.jsxs(Xn,{ref:t,value:g()?v:P,multiple:g(),onChange:A=>O(A.currentTarget.value),style:j,children:[!I&&!g()&&f.jsx("option",{value:Zn}),S&&f.jsx("option",{value:Jn,children:e.resetLabel}),w.map(A=>{var F;return f.jsxs("option",{value:A.id,children:[((F=A.decision)==null?void 0:F.kind)===h.DecisionKind.Implicit?e.implicitLabelPrefix:"",s.get(A.id)??A.id]},A.id)}),y.length>0&&f.jsx("optgroup",{label:e.blockedLabel,children:y.map(A=>f.jsx("option",{value:A.id,children:s.get(A.id)??A.id},A.id))})]})}),ec=Si,tc={...mn,noOptionsAvailableColors:{...Jt,title:"No Options Available Colors"}};d.addPropertyControls(Si,tc);const nc=(e,t,n,o)=>{var r,l,s;const i=Ne(e,t,n);return{...i,backgroundColor:N.match({noOptionsAvailable:o,noOptionsAvailableFill:(r=e.noOptionsAvailableColors)==null?void 0:r.fill}).with({noOptionsAvailable:!0,noOptionsAvailableFill:N.P.string.minLength(1)},a=>a.noOptionsAvailableFill).otherwise(()=>i.backgroundColor),borderColor:N.match({noOptionsAvailable:o,noOptionsAvailableBorderColor:(l=e.noOptionsAvailableColors)==null?void 0:l.borderColor}).with({noOptionsAvailable:!0,noOptionsAvailableBorderColor:N.P.string.minLength(1)},a=>a.noOptionsAvailableBorderColor).otherwise(()=>i.borderColor),color:N.match({noOptionsAvailable:o,noOptionsAvailableColor:(s=e.noOptionsAvailableColors)==null?void 0:s.color}).with({noOptionsAvailable:!0,noOptionsAvailableColor:N.P.string.minLength(1)},a=>a.noOptionsAvailableColor).otherwise(()=>i.color)}},eo=k.select`
|
|
335
335
|
color: inherit;
|
|
336
336
|
cursor: inherit;
|
|
337
337
|
`,to="<reset>",$t="<nothing>",zt="yes",no="no",Ti=ge((e,t)=>{var v,P,S;if(G()){const I=Ne(e,!0,!1);return f.jsx(eo,{style:I})}const o=ce(),i=Z(e),r=U.useBooleanAttribute(i),{explain:l}=he();if(!r)return f.jsx("span",{children:"Boolean Attribute not found"});const{attribute:s,makeDecision:a}=r,c=async I=>{var D;const R=((D=s.decision)==null?void 0:D.kind)===h.DecisionKind.Explicit;if(I===to&&R)try{await a(void 0)}catch{pe()}else{const O=I===zt,j=s.possibleDecisionStates.includes(O),A=e.explain,F=A!=="disabled"&&(()=>l(B=>B.whyIsStateNotPossible.boolean(s.id).state(O),A,o));if(j)try{await a(O)}catch(B){if(B.type===h.ConfiguratorErrorType.ConflictWithConsequence&&F){await F();return}pe()}else F&&await F()}},x=N.match((v=s.decision)==null?void 0:v.state).with(!0,()=>zt).with(!1,()=>no).otherwise(()=>$t),g=((P=s.decision)==null?void 0:P.kind)===h.DecisionKind.Explicit,C=((S=s.decision)==null?void 0:S.kind)===h.DecisionKind.Implicit,u=Ne(e,s.isSatisfied,C),b=s.possibleDecisionStates.includes(!0),w=s.possibleDecisionStates.includes(!1),y=f.jsxs("option",{value:zt,children:[oo(s,!0,e.implicitLabelPrefix),e.trueLabel]}),m=f.jsxs("option",{value:no,children:[oo(s,!1,e.implicitLabelPrefix),e.falseLabel]});return f.jsxs(eo,{ref:t,value:x,onChange:I=>c(I.currentTarget.value),style:u,children:[x===$t&&f.jsx("option",{value:$t}),g&&f.jsx("option",{value:to,children:e.resetLabel}),b&&y,w&&m,(!b||!w)&&f.jsxs("optgroup",{label:e.blockedLabel,children:[!b&&y,!w&&m]})]})}),oc=Ti,oo=(e,t,n)=>{var o,i;return((o=e.decision)==null?void 0:o.kind)===h.DecisionKind.Implicit&&((i=e.decision)==null?void 0:i.state)===t?n:""},ic={...mn,trueLabel:{title:"True Label",type:d.ControlType.String,defaultValue:"Yes"},falseLabel:{title:"False Label",type:d.ControlType.String,defaultValue:"No"}};d.addPropertyControls(Ti,ic);const io=k.select`
|
|
@@ -351,4 +351,4 @@ Please check your internet connection and try again.`)}const Xn=k.select`
|
|
|
351
351
|
display: contents !important;
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
`,Ni=ae(yn(e=>{const t=ce(),n=G(),i=(()=>{const u=b=>{var m;const w=T.Children.toArray(b)[0],y=(m=w.props)==null?void 0:m.children;return y?u(y):w};return u(e.itemTemplate)})();if(!i)return f.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 f.jsx(ao,{...e,children:r(["Choice Value 1","Choice Value 2","Choice Value 3"],p.RM.empty)});const l=Z(e),s=U.useChoiceAttribute(l);if(!s)return f.jsx("span",{children:"Choice Attribute not found"});const a=Ge(l),c=e.filter??new Array,x=[...s.attribute.values.values()].filter(u=>c.length===0||c.some(({selection:b,condition:w})=>N.match({selection:b,condition:w}).with({selection:"included",condition:"blocked"},()=>!u.possibleDecisionStates.includes(h.ChoiceValueDecisionState.Included)).with({selection:"included",condition:"implicit"},()=>{var y,m;return((y=u.decision)==null?void 0:y.state)===h.ChoiceValueDecisionState.Included&&((m=u.decision)==null?void 0:m.kind)===h.DecisionKind.Implicit}).with({selection:"included",condition:"explicit"},()=>{var y,m;return((y=u.decision)==null?void 0:y.state)===h.ChoiceValueDecisionState.Included&&((m=u.decision)==null?void 0:m.kind)===h.DecisionKind.Explicit}).with({selection:"included",condition:"none"},()=>{var y;return((y=u.decision)==null?void 0:y.state)===h.ChoiceValueDecisionState.Included}).with({selection:"excluded",condition:"blocked"},()=>!u.possibleDecisionStates.includes(h.ChoiceValueDecisionState.Excluded)).with({selection:"excluded",condition:"implicit"},()=>{var y,m;return((y=u.decision)==null?void 0:y.state)===h.ChoiceValueDecisionState.Excluded&&((m=u.decision)==null?void 0:m.kind)===h.DecisionKind.Implicit}).with({selection:"excluded",condition:"explicit"},()=>{var y,m;return((y=u.decision)==null?void 0:y.state)===h.ChoiceValueDecisionState.Excluded&&((m=u.decision)==null?void 0:m.kind)===h.DecisionKind.Explicit}).with({selection:"excluded",condition:"none"},()=>{var y;return((y=u.decision)==null?void 0:y.state)===h.ChoiceValueDecisionState.Excluded}).with({selection:"undefined"},()=>u.decision==null).otherwise(()=>!1))),C=xt(l,x).map(u=>u.id);return f.jsx(ao,{...e,children:r(C,a)})}));function ao(e){return f.jsxs(f.Fragment,{children:[f.jsx(bt,{singletonId:"ChoiceValueListRenderer",children:f.jsx(Pc,{})}),f.jsx(Li,{style:e.style,children:e.children})]})}const Oc=Ni,Dc={...oe,itemTemplate:{title:"Choice Value Template",type:d.ControlType.ComponentInstance},filter:{title:"Filter",type:d.ControlType.Array,control:{type:d.ControlType.Object,controls:{selection:{title:"Selection",type:d.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded"]},condition:{title:"Condition",type:d.ControlType.Enum,defaultValue:"none",options:["none","explicit","implicit","blocked"]}}}}};d.addPropertyControls(Ni,Dc);const{isValidElement:co,cloneElement:uo}=E;function Vc(e,t){return t?(Array.isArray(t)&&(t=t.map((n,o)=>co(n)&&typeof n.props=="object"?uo(n,{...n.props,key:o}):n)),!e||Array.isArray(e)?t:co(e)?uo(e,{...e.props,children:t}):e):e}const{isValidElement:jc}=E;function Bi(e,t,n){function o(r,l){return t.visit(r,n,l)}function i(r,l){return Bi(r,t,l||n)}if(jc(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:fo}=E;function kc(e,t){let n;const{replace:o,updateState:i}=t;return"matchElement"in t?n=r=>fo(r)&&r.type===t.matchElement:"matchLiteral"in t?n=r=>!Array.isArray(r)&&!fo(r)&&t.matchLiteral(r):n=t.match,Bi(e,{visit(r,l,s){const a=i?i(l):l,c=s?s(a):void 0,x=Vc(r,c);return n(x,a)?o(x,a):x}},t.initialState)}function po(e){return f.jsx(f.Fragment,{children:kc(e.children,e)})}function Mc(e){return p.pipe(e,p.Str.replace(/[\s\u2013]/g,"-"),lr)}const Fc=ae(e=>{const{children:t,mode:n,replaceString:o,propName:i,elementName:r,text:l}=e;return n==="replace"?f.jsx(po,{match:s=>typeof s=="string",replace:s=>s===o?l:s,children:t}):n==="set-prop"?f.jsx(po,{match:s=>{var a;return((a=s.type)==null?void 0:a.displayName)===r},replace:s=>T.cloneElement(s,{[Mc(i)]:l}),children:t}):t}),Ot=Fc,bn=e=>({children:{title:"Content",type:d.ControlType.ComponentInstance},mode:{title:"Mode",type:d.ControlType.Enum,defaultValue:"replace",options:["replace","set-prop"],displaySegmentedControl:!0},replaceString:{title:"Replace Text",type:d.ControlType.String,defaultValue:e,hidden:t=>t.mode!=="replace"},elementName:{title:"Element Name",type:d.ControlType.String,hidden:t=>t.mode!=="set-prop"},propName:{title:"Property Name",type:d.ControlType.String,hidden:t=>t.mode!=="set-prop"}}),$i=ae(e=>{const{attributeId:t,children:n,customName:o}=e,i=Z(e),r=(o==null?void 0:o.length)>0,l=G(),a=r?o:l?t:(()=>U.useAttributes([i],!1)[0]?At(i)??t:"Attribute not found")();return f.jsx(Ot,{...e,text:a})}),Lc=$i,Nc={...oe,customName:{title:"Custom Name",type:d.ControlType.String},...bn("<AttributeName>")};d.addPropertyControls($i,Nc);const zi=ae(e=>{const{choiceValueId:t,children:n,customName:o,mode:i,replaceString:r,propName:l,elementName:s}=e,a=Z(e),c=o.length>0,x=t.length>0,g=G(),u=c?o:g?t.length>0?t:"Choice Value":(()=>{const b=U.useChoiceAttribute(a);return b?x?b.attribute.values.get(t)==null?"Choice Value not found":To(a,t)??t:"Choice Value Id missing":"Choice Attribute not found"})();return f.jsx(Ot,{...e,text:u})}),Bc=zi,$c={...oe,...ze,customName:{title:"Custom Name",type:d.ControlType.String},...bn("<ChoiceValueName>")};d.addPropertyControls(zi,$c);function Wi(e){return e.children}const zc={children:{title:"Content",type:d.ControlType.ComponentInstance}};d.addPropertyControls(Wi,zc);function Ki(e){const{children:t,fileExtension:n,fileName:o,target:i}=e;if(G())return t;const{storeConfiguration:l}=U.useConfigurationStoring();return me(t,{onClick:async()=>{const c={type:"spc-stored-configuration",storedConfiguration:await l()};i==="file"?Kc(c,`${o}.${n}`):i==="clipboard"&&qc(c)}})}const Wc={children:{title:"Content",type:d.ControlType.ComponentInstance},target:{title:"Target",type:d.ControlType.Enum,defaultValue:"file",options:["file","clipboard"],optionTitles:["File","Clipboard"],displaySegmentedControl:!0,segmentedControlDirection:"vertical"},fileName:{title:"File Name",type:d.ControlType.String,defaultValue:"configuration",hidden:e=>e.target!=="file"},fileExtension:{title:"File Extension",type:d.ControlType.String,defaultValue:"json",hidden:e=>e.target!=="file"}};d.addPropertyControls(Ki,Wc);function Kc(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 qc(e){const t=JSON.stringify(e);navigator.clipboard.writeText(t).catch(n=>{alert("Failed to copy the configuration to clipboard: "+n)})}var qi=(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))(qi||{});const _i=ge((e,t)=>{const{children:n,fileExtension:o,source:i}=e;if(G())return n;const l=ce(),{restoreConfiguration:s}=U.useConfigurationStoring(),{handleExplainAnswer:a}=he();return me(n,{onClick:async()=>{const x=p.pipe(await Yc(i,o),p.O.toNullable);if(!x)return;const g={type:"DropExistingDecisions",conflictHandling:N.match(e.autoResolveConflicts).with(!1,()=>({type:"Manual",includeConstraintsInConflictExplanation:!1})).with(!0,()=>({type:"Automatic"})).exhaustive()};try{await s(x,g)}catch(C){const u=C;if(console.debug("Failed to restore stored configuration",u),u.type===h.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)===h.ConfiguratorErrorType.MakeManyDecisionsConflict&&u.decisionExplanations){e.explain!=="disabled"&&await a(u,e.explain,l);return}alert("Failed to restore your configuration.");return}},ref:t})}),_c=_i,Hc={children:{title:"Content",type:d.ControlType.ComponentInstance},source:{title:"Source",type:d.ControlType.Enum,defaultValue:"file",options:["file","clipboard"],optionTitles:["File","Clipboard"],displaySegmentedControl:!0,segmentedControlDirection:"vertical"},fileExtension:{title:"File Extension",type:d.ControlType.String,defaultValue:"json",hidden:e=>e.source!=="file"},autoResolveConflicts:{title:"Auto Resolve Conflicts",type:d.ControlType.Boolean,defaultValue:!0},...$e};d.addPropertyControls(_i,Hc);function Uc(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(p.left(2));return}const r=i.files[0],l=new FileReader;l.onload=()=>{t(p.right(l.result))},l.onerror=()=>{t(p.left(3))},l.readAsText(r)},n.oncancel=()=>{t(p.left(2))},n.click()})}function Qc(){return()=>navigator.clipboard.readText().then(e=>e?p.right(e):p.left(4)).catch(()=>p.left(5))}function Yc(e,t){return p.pipe(e==="file"?Uc(t):Qc(),p.TE.chainEitherK(n=>p.E.tryCatch(()=>JSON.parse(n),()=>0)),p.TE.filterOrElse(n=>n.type==="spc-stored-configuration",()=>1),p.TE.map(n=>n.storedConfiguration),p.TE.doIfLeft(n=>()=>{console.debug(`Failed to load stored configuration: ${qi[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.")}),p.TO.fromTaskEither)()}const Hi=ae(e=>{const{fallback:t}=e,n=Z(e),r=G()?"0.0":(()=>{var a;const l=U.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 f.jsx(Ot,{...e,text:r})}),Gc=Hi,Xc={...oe,fallback:{title:"Unselected Text",type:d.ControlType.String,defaultValue:""},...bn("<NumericValue>")};d.addPropertyControls(Hi,Xc);function Ui(e){if(G())return f.jsx("div",{style:{width:"100%"},children:e.children});const n=T.useRef(0),[o,i]=T.useState(null),r=s=>{window.parent.postMessage({type:"spc.configurator.height",height:s},"*")};function l(s=o){if(!s)return;const a=s.offsetHeight;a!==n.current&&(n.current=a,r(a))}return T.useEffect(()=>{const s=o;if(!s)return;l(s);const a=new ResizeObserver(()=>{l(s)});return a.observe(s),()=>{a.disconnect()}},[o]),f.jsx("div",{ref:i,style:{width:"100%"},children:e.children})}d.addPropertyControls(Ui,{children:{title:"Content",type:d.ControlType.ComponentInstance}});exports.AttributeName=Lc;exports.BooleanSelect=oc;exports.ChoiceSelect=ec;exports.ChoiceValueListRenderer=Oc;exports.ChoiceValueName=Bc;exports.Colorize=wc;exports.ComponentSelect=rc;exports.Configuration=Aa;exports.InitializationRetry=Tc;exports.NumericInput=sc;exports.PropagateHeight=Ui;exports.ReplaceText=Ot;exports.ResetConfiguration=mc;exports.RestoreConfiguration=_c;exports.SatisfactionIndicator=bc;exports.ScrollIntoView=Fi;exports.SelectedNumericValue=Gc;exports.SelectionIndicator=Cc;exports.SelectionToggle=uc;exports.SetSelection=fc;exports.SetSelections=hc;exports.Singleton=bt;exports.Slot=Wi;exports.StoreConfiguration=Ki;exports.attributeIdPropertyControls=oe;exports.choiceValueIdPropertyControls=ze;exports.cloneChildrenWithProps=me;exports.explainableComponent=ge;exports.parseGlobalAttributeId=Z;exports.useAttributeName=At;exports.useChoiceValueName=To;exports.useChoiceValueNames=Ge;exports.useControlId=ce;exports.useDebounceValue=Ai;exports.useExplain=he;exports.useExplainProcess=xe;exports.useRenderPlaceholder=G;exports.useSortedChoiceValues=xt;exports.withControlId=yn;exports.withErrorBoundary=ae;exports.withFullSize=Ac;
|
|
354
|
+
`,Ni=ae(yn(e=>{const t=ce(),n=G(),i=(()=>{const u=b=>{var m;const w=T.Children.toArray(b)[0],y=(m=w.props)==null?void 0:m.children;return y?u(y):w};return u(e.itemTemplate)})();if(!i)return f.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 f.jsx(ao,{...e,children:r(["Choice Value 1","Choice Value 2","Choice Value 3"],p.RM.empty)});const l=Z(e),s=U.useChoiceAttribute(l);if(!s)return f.jsx("span",{children:"Choice Attribute not found"});const a=Ge(l),c=e.filter??new Array,x=[...s.attribute.values.values()].filter(u=>c.length===0||c.some(({selection:b,condition:w})=>N.match({selection:b,condition:w}).with({selection:"included",condition:"blocked"},()=>!u.possibleDecisionStates.includes(h.ChoiceValueDecisionState.Included)).with({selection:"included",condition:"implicit"},()=>{var y,m;return((y=u.decision)==null?void 0:y.state)===h.ChoiceValueDecisionState.Included&&((m=u.decision)==null?void 0:m.kind)===h.DecisionKind.Implicit}).with({selection:"included",condition:"explicit"},()=>{var y,m;return((y=u.decision)==null?void 0:y.state)===h.ChoiceValueDecisionState.Included&&((m=u.decision)==null?void 0:m.kind)===h.DecisionKind.Explicit}).with({selection:"included",condition:"none"},()=>{var y;return((y=u.decision)==null?void 0:y.state)===h.ChoiceValueDecisionState.Included}).with({selection:"excluded",condition:"blocked"},()=>!u.possibleDecisionStates.includes(h.ChoiceValueDecisionState.Excluded)).with({selection:"excluded",condition:"implicit"},()=>{var y,m;return((y=u.decision)==null?void 0:y.state)===h.ChoiceValueDecisionState.Excluded&&((m=u.decision)==null?void 0:m.kind)===h.DecisionKind.Implicit}).with({selection:"excluded",condition:"explicit"},()=>{var y,m;return((y=u.decision)==null?void 0:y.state)===h.ChoiceValueDecisionState.Excluded&&((m=u.decision)==null?void 0:m.kind)===h.DecisionKind.Explicit}).with({selection:"excluded",condition:"none"},()=>{var y;return((y=u.decision)==null?void 0:y.state)===h.ChoiceValueDecisionState.Excluded}).with({selection:"undefined"},()=>u.decision==null).otherwise(()=>!1))),C=xt(l,x).map(u=>u.id);return f.jsx(ao,{...e,children:r(C,a)})}));function ao(e){return f.jsxs(f.Fragment,{children:[f.jsx(bt,{singletonId:"ChoiceValueListRenderer",children:f.jsx(Pc,{})}),f.jsx(Li,{style:e.style,children:e.children})]})}const Oc=Ni,Dc={...oe,itemTemplate:{title:"Choice Value Template",type:d.ControlType.ComponentInstance},filter:{title:"Filter",type:d.ControlType.Array,control:{type:d.ControlType.Object,controls:{selection:{title:"Selection",type:d.ControlType.Enum,defaultValue:"undefined",options:["undefined","included","excluded"]},condition:{title:"Condition",type:d.ControlType.Enum,defaultValue:"none",options:["none","explicit","implicit","blocked"]}}}}};d.addPropertyControls(Ni,Dc);const{isValidElement:co,cloneElement:uo}=E;function Vc(e,t){return t?(Array.isArray(t)&&(t=t.map((n,o)=>co(n)&&typeof n.props=="object"?uo(n,{...n.props,key:o}):n)),!e||Array.isArray(e)?t:co(e)?uo(e,{...e.props,children:t}):e):e}const{isValidElement:jc}=E;function Bi(e,t,n){function o(r,l){return t.visit(r,n,l)}function i(r,l){return Bi(r,t,l||n)}if(jc(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:fo}=E;function kc(e,t){let n;const{replace:o,updateState:i}=t;return"matchElement"in t?n=r=>fo(r)&&r.type===t.matchElement:"matchLiteral"in t?n=r=>!Array.isArray(r)&&!fo(r)&&t.matchLiteral(r):n=t.match,Bi(e,{visit(r,l,s){const a=i?i(l):l,c=s?s(a):void 0,x=Vc(r,c);return n(x,a)?o(x,a):x}},t.initialState)}function po(e){return f.jsx(f.Fragment,{children:kc(e.children,e)})}function Mc(e){return p.pipe(e,p.Str.replace(/[\s\u2013]/g,"-"),lr)}const Fc=ae(e=>{const{children:t,mode:n,replaceString:o,propName:i,elementName:r,text:l}=e;return n==="replace"?f.jsx(po,{match:s=>typeof s=="string",replace:s=>s===o?l:s,children:t}):n==="set-prop"?f.jsx(po,{match:s=>{var a;return((a=s.type)==null?void 0:a.displayName)===r},replace:s=>T.cloneElement(s,{[Mc(i)]:l}),children:t}):t}),Ot=Fc,bn=e=>({children:{title:"Content",type:d.ControlType.ComponentInstance},mode:{title:"Mode",type:d.ControlType.Enum,defaultValue:"replace",options:["replace","set-prop"],displaySegmentedControl:!0},replaceString:{title:"Replace Text",type:d.ControlType.String,defaultValue:e,hidden:t=>t.mode!=="replace"},elementName:{title:"Element Name",type:d.ControlType.String,hidden:t=>t.mode!=="set-prop"},propName:{title:"Property Name",type:d.ControlType.String,hidden:t=>t.mode!=="set-prop"}}),$i=ae(e=>{const{attributeId:t,children:n,customName:o}=e,i=Z(e),r=(o==null?void 0:o.length)>0,l=G(),a=r?o:l?t:(()=>U.useAttributes([i],!1)[0]?At(i)??t:"Attribute not found")();return f.jsx(Ot,{...e,text:a})}),Lc=$i,Nc={...oe,customName:{title:"Custom Name",type:d.ControlType.String},...bn("<AttributeName>")};d.addPropertyControls($i,Nc);const zi=ae(e=>{const{choiceValueId:t,children:n,customName:o,mode:i,replaceString:r,propName:l,elementName:s}=e,a=Z(e),c=o.length>0,x=t.length>0,g=G(),u=c?o:g?t.length>0?t:"Choice Value":(()=>{const b=U.useChoiceAttribute(a);return b?x?b.attribute.values.get(t)==null?"Choice Value not found":To(a,t)??t:"Choice Value Id missing":"Choice Attribute not found"})();return f.jsx(Ot,{...e,text:u})}),Bc=zi,$c={...oe,...ze,customName:{title:"Custom Name",type:d.ControlType.String},...bn("<ChoiceValueName>")};d.addPropertyControls(zi,$c);function Wi(e){return e.children}const zc={children:{title:"Content",type:d.ControlType.ComponentInstance}};d.addPropertyControls(Wi,zc);function Ki(e){const{children:t,fileExtension:n,fileName:o,target:i}=e;if(G())return t;const{storeConfiguration:l}=U.useConfigurationStoring();return me(t,{onClick:async()=>{const c={type:"spc-stored-configuration",storedConfiguration:await l()};i==="file"?Kc(c,`${o}.${n}`):i==="clipboard"&&qc(c)}})}const Wc={children:{title:"Content",type:d.ControlType.ComponentInstance},target:{title:"Target",type:d.ControlType.Enum,defaultValue:"file",options:["file","clipboard"],optionTitles:["File","Clipboard"],displaySegmentedControl:!0,segmentedControlDirection:"vertical"},fileName:{title:"File Name",type:d.ControlType.String,defaultValue:"configuration",hidden:e=>e.target!=="file"},fileExtension:{title:"File Extension",type:d.ControlType.String,defaultValue:"json",hidden:e=>e.target!=="file"}};d.addPropertyControls(Ki,Wc);function Kc(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 qc(e){const t=JSON.stringify(e);navigator.clipboard.writeText(t).catch(n=>{alert("Failed to copy the configuration to clipboard: "+n)})}var qi=(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))(qi||{});const Hi=ge((e,t)=>{const{children:n,fileExtension:o,source:i}=e;if(G())return n;const l=ce(),{restoreConfiguration:s}=U.useConfigurationStoring(),{handleExplainAnswer:a}=he();return me(n,{onClick:async()=>{const x=p.pipe(await Yc(i,o),p.O.toNullable);if(!x)return;const g={type:"DropExistingDecisions",conflictHandling:N.match(e.autoResolveConflicts).with(!1,()=>({type:"Manual",includeConstraintsInConflictExplanation:!1})).with(!0,()=>({type:"Automatic"})).exhaustive()};try{await s(x,g)}catch(C){const u=C;if(console.debug("Failed to restore stored configuration",u),u.type===h.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)===h.ConfiguratorErrorType.MakeManyDecisionsConflict&&u.decisionExplanations){e.explain!=="disabled"&&await a(u,e.explain,l);return}alert("Failed to restore your configuration.");return}},ref:t})}),Hc=Hi,_c={children:{title:"Content",type:d.ControlType.ComponentInstance},source:{title:"Source",type:d.ControlType.Enum,defaultValue:"file",options:["file","clipboard"],optionTitles:["File","Clipboard"],displaySegmentedControl:!0,segmentedControlDirection:"vertical"},fileExtension:{title:"File Extension",type:d.ControlType.String,defaultValue:"json",hidden:e=>e.source!=="file"},autoResolveConflicts:{title:"Auto Resolve Conflicts",type:d.ControlType.Boolean,defaultValue:!0},...$e};d.addPropertyControls(Hi,_c);function Uc(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(p.left(2));return}const r=i.files[0],l=new FileReader;l.onload=()=>{t(p.right(l.result))},l.onerror=()=>{t(p.left(3))},l.readAsText(r)},n.oncancel=()=>{t(p.left(2))},n.click()})}function Qc(){return()=>navigator.clipboard.readText().then(e=>e?p.right(e):p.left(4)).catch(()=>p.left(5))}function Yc(e,t){return p.pipe(e==="file"?Uc(t):Qc(),p.TE.chainEitherK(n=>p.E.tryCatch(()=>JSON.parse(n),()=>0)),p.TE.filterOrElse(n=>n.type==="spc-stored-configuration",()=>1),p.TE.map(n=>n.storedConfiguration),p.TE.doIfLeft(n=>()=>{console.debug(`Failed to load stored configuration: ${qi[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.")}),p.TO.fromTaskEither)()}const _i=ae(e=>{const{fallback:t}=e,n=Z(e),r=G()?"0.0":(()=>{var a;const l=U.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 f.jsx(Ot,{...e,text:r})}),Gc=_i,Xc={...oe,fallback:{title:"Unselected Text",type:d.ControlType.String,defaultValue:""},...bn("<NumericValue>")};d.addPropertyControls(_i,Xc);function Ui(e){if(G())return f.jsx("div",{style:{width:"100%"},children:e.children});const n=T.useRef(0),[o,i]=T.useState(null),r=s=>{window.parent.postMessage({type:"spc.configurator.height",height:s},"*")};function l(s=o){if(!s)return;const a=s.offsetHeight;a!==n.current&&(n.current=a,r(a))}return T.useEffect(()=>{const s=o;if(!s)return;l(s);const a=new ResizeObserver(()=>{l(s)});return a.observe(s),()=>{a.disconnect()}},[o]),f.jsx("div",{ref:i,style:{width:"100%"},children:e.children})}d.addPropertyControls(Ui,{children:{title:"Content",type:d.ControlType.ComponentInstance}});exports.AttributeName=Lc;exports.BooleanSelect=oc;exports.ChoiceSelect=ec;exports.ChoiceValueListRenderer=Oc;exports.ChoiceValueName=Bc;exports.Colorize=wc;exports.ComponentSelect=rc;exports.Configuration=Aa;exports.InitializationRetry=Tc;exports.NumericInput=sc;exports.PropagateHeight=Ui;exports.ReplaceText=Ot;exports.ResetConfiguration=mc;exports.RestoreConfiguration=Hc;exports.SatisfactionIndicator=bc;exports.ScrollIntoView=Fi;exports.SelectedNumericValue=Gc;exports.SelectionIndicator=Cc;exports.SelectionToggle=uc;exports.SetSelection=fc;exports.SetSelections=hc;exports.Singleton=bt;exports.Slot=Wi;exports.StoreConfiguration=Ki;exports.attributeIdPropertyControls=oe;exports.choiceValueIdPropertyControls=ze;exports.cloneChildrenWithProps=me;exports.explainableComponent=ge;exports.parseGlobalAttributeId=Z;exports.useAttributeName=At;exports.useChoiceValueName=To;exports.useChoiceValueNames=Ge;exports.useControlId=ce;exports.useDebounceValue=Ai;exports.useExplain=he;exports.useExplainProcess=xe;exports.useRenderPlaceholder=G;exports.useSortedChoiceValues=xt;exports.withControlId=yn;exports.withErrorBoundary=ae;exports.withFullSize=Ac;
|