@frigade/react 2.5.22 → 2.5.24

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 CHANGED
@@ -51,14 +51,14 @@ var z__namespace = /*#__PURE__*/_interopNamespace(z);
51
51
  var so__namespace = /*#__PURE__*/_interopNamespace(so);
52
52
  var ae__namespace = /*#__PURE__*/_interopNamespace(ae);
53
53
 
54
- var it=Object.defineProperty,an=Object.defineProperties;var sn=Object.getOwnPropertyDescriptors;var Je=Object.getOwnPropertySymbols;var at=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var nt=(e,o,t)=>o in e?it(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,a=(e,o)=>{for(var t in o||(o={}))at.call(o,t)&&nt(e,t,o[t]);if(Je)for(var t of Je(o))st.call(o,t)&&nt(e,t,o[t]);return e},p=(e,o)=>an(e,sn(o));var ln=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(o,t)=>(typeof require!="undefined"?require:o)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var f=(e,o)=>{var t={};for(var n in e)at.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&Je)for(var n of Je(e))o.indexOf(n)<0&&st.call(e,n)&&(t[n]=e[n]);return t};var pe=(e,o)=>{for(var t in o)it(e,t,{get:o[t],enumerable:!0});};var W=(e,o,t)=>new Promise((n,r)=>{var i=d=>{try{l(t.next(d));}catch(u){r(u);}},s=d=>{try{l(t.throw(d));}catch(u){r(u);}},l=d=>d.done?n(d.value):Promise.resolve(d.value).then(i,s);l((t=t.apply(e,o)).next());});function Be(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})}))}var pt={borderWidths:{md:"1px"}};var qe=[5,10,20,35,50,65,80,95,98],dt=[...qe],Fo=[...qe];dt[4]=40;Fo[4]=60;var pn={blue:{h:213,s:100,l:qe},gray:{h:220,s:10,l:qe},green:{h:141,s:90,l:dt},red:{h:9,s:90,l:Fo},yellow:{h:50,s:90,l:Fo}};var V={};for(let[e,{h:o,s:t,l:n}]of Object.entries(pn))V[e]=Object.fromEntries(n.map((r,i)=>[`${(i+1)*100}`,`hsl(${o} ${t}% ${r}%)`]));var ct=p(a({black:"hsl(0 0% 0%)",white:"hsl(0 0% 100%)"},V),{gray100:V.gray[100],gray200:V.gray[200],gray300:V.gray[300],gray400:V.gray[400],gray500:V.gray[500],gray600:V.gray[600],gray700:V.gray[700],gray800:V.gray[800],gray900:V.gray[900],blue400:V.blue[400],blue500:V.blue[500],blue800:V.blue[800],blue900:V.blue[900],green400:V.blue[400],green500:V.green[500],green800:V.green[800],red500:V.red[500],transparent:"#FFFFFF00",inherit:"inherit"});var ut={md:"8px",lg:"20px",round:"50%"};var c=e=>`var(--fr-colors-${e})`,mt={negative:{100:c("red-100"),200:c("red-200"),300:c("red-300"),400:c("red-400"),500:c("red-500"),600:c("red-600"),700:c("red-700"),800:c("red-800"),900:c("red-900"),background:c("negative-500"),border:c("negative-500"),foreground:c("white"),surface:c("negative-500"),active:{background:c("negative-400"),border:c("negative-400"),foreground:c("white"),surface:c("negative-400")},focus:{background:c("negative-500"),border:c("negative-500"),foreground:c("white"),surface:c("negative-500")},hover:{background:c("negative-400"),border:c("negative-400"),foreground:c("white"),surface:c("negative-400")}},neutral:{100:c("gray-100"),200:c("gray-200"),300:c("gray-300"),400:c("gray-400"),500:c("gray-500"),600:c("gray-600"),700:c("gray-700"),800:c("gray-800"),900:c("gray-900"),background:c("white"),border:c("neutral-800"),foreground:c("black"),surface:c("neutral-700"),active:{background:c("white"),border:c("neutral-900"),foreground:c("black"),surface:c("neutral-700")},focus:{background:c("white"),border:c("neutral-900"),foreground:c("black"),surface:c("neutral-700")},hover:{background:c("neutral-900"),border:c("neutral-800"),foreground:c("black"),surface:c("neutral-700")}},positive:{100:c("green-100"),200:c("green-200"),300:c("green-300"),400:c("green-400"),500:c("green-500"),600:c("green-600"),700:c("green-700"),800:c("green-800"),900:c("green-900"),background:c("positive-500"),border:c("positive-500"),foreground:c("white"),surface:c("positive-500"),active:{background:c("positive-400"),border:c("positive-400"),foreground:c("white"),surface:c("positive-400")},focus:{background:c("positive-500"),border:c("positive-500"),foreground:c("white"),surface:c("positive-500")},hover:{background:c("positive-400"),border:c("positive-400"),foreground:c("white"),surface:c("positive-400")}},primary:{100:c("blue-100"),200:c("blue-200"),300:c("blue-300"),400:c("blue-400"),500:c("blue-500"),600:c("blue-600"),700:c("blue-700"),800:c("blue-800"),900:c("blue-900"),background:c("primary-500"),border:c("primary-500"),foreground:c("white"),surface:c("primary-500"),active:{background:c("primary-400"),border:c("primary-400"),foreground:c("white"),surface:c("primary-400")},focus:{background:c("primary-500"),border:c("primary-500"),foreground:c("white"),surface:c("primary-500")},hover:{background:c("primary-400"),border:c("primary-400"),foreground:c("white"),surface:c("primary-400")}},secondary:{100:c("gray-100"),200:c("gray-200"),300:c("gray-300"),400:c("gray-400"),500:c("gray-500"),600:c("gray-600"),700:c("gray-700"),800:c("gray-800"),900:c("gray-900"),background:c("white"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-900"),active:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-800")},focus:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-900")},hover:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-800")}}};var ft={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var dn="px",cn=e=>typeof e=="number"?`${4*e}${dn}`:e,un=[-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,-.5,0,.5,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,"auto"],gt=Object.fromEntries(un.map(e=>[e,cn(e)]));var yt={fontFamilies:{default:"inherit"},fontSizes:{xs:"12px",sm:"14px",md:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},fontWeights:{thin:"100",extralight:"200",light:"300",regular:"400",medium:"500",demibold:"600",bold:"700",extrabold:"800",black:"900"},letterSpacings:{md:"0.02em"},lineHeights:{xs:"18px",sm:"22px",md:"24px",lg:"26px",xl:"30px","2xl":"38px","3xl":"46px","4xl":"60px"}};var Ze=p(a(p(a({},pt),{colors:a(a({},ct),mt)}),yt),{radii:ut,shadows:ft,space:gt});function Ve(e,o="",t="."){return Object.keys(e).reduce((n,r)=>{let s=`${o.length?`${o}${t}`:""}${r}`,l=e[r];return typeof l=="object"&&l!==null&&!Array.isArray(l)?Object.assign(n,Ve(l,s,t)):n[s]=l,n},{})}function vo(e){let o=Ve(e,"--fr","-");for(let[t,n]of Object.entries(o))if(t.indexOf(".")>-1){let r=t.replace(/\./g,"-");o[r]=n,delete o[t];}return o}function xt(e,o="--fr"){let t={};return Object.keys(e).forEach(n=>{let r=e[n],i=n.replace(/\./g,"-");typeof r=="object"&&r!==null&&!Array.isArray(r)?t[n]=xt(r,`${o}-${n}`):t[n]=`var(${o}-${i})`;}),t}var Ro=vo(Ze),E=xt(Ze);var fn=new Set(["alt","size","src"]),gn=mn__default.default.all.filter(e=>e.indexOf("-")!=0&&!fn.has(e)).map(e=>[e.replace(/-([a-z])/g,(o,t)=>t.toUpperCase()),null]),yn=Object.fromEntries(gn),Ye=Ve(E.colors),xn={color:Ye,backgroundColor:Ye,borderColor:Ye,border:a(a({},E.borderWidths),Ye),borderRadius:E.radii,borderWidth:E.borderWidths,boxShadow:E.shadows,fontFamily:E.fontFamilies,fontSize:E.fontSizes,fontWeight:E.fontWeights,gap:E.space,lineHeight:E.lineHeights,margin:E.space,marginBottom:E.space,marginLeft:E.space,marginRight:E.space,marginTop:E.space,padding:E.space,paddingBottom:E.space,paddingLeft:E.space,paddingRight:E.space,paddingTop:E.space},ht=a(a({},yn),xn),bt={bg:["backgroundColor"],m:["margin"],mt:["marginTop"],mr:["marginRight"],mb:["marginBottom"],ml:["marginLeft"],mx:["marginLeft","marginRight"],my:["marginTop","marginBottom"],p:["padding"],pt:["paddingTop"],pr:["paddingRight"],pb:["paddingBottom"],pl:["paddingLeft"],px:["paddingLeft","paddingRight"],py:["paddingTop","paddingBottom"]},Pt=new Set(["active","disabled","focus","focusVisible","focusWithin","hover"]);function hn(e){return Array.isArray(e)?new Map(e.map(o=>[o,o])):typeof e=="object"&&e!==null?new Map(Object.entries(e)):typeof e=="string"||typeof e=="number"?new Map([[e,e]]):new Map}var Ct=new Map(Object.entries(ht).map(([e,o])=>[e,hn(o)])),bn=new Map(Object.entries(bt).map(([e,o])=>[e,new Set(o)])),Pn=new Set(["height","width"]),Cn=new Set(["canvas","embed","iframe","img","input","object","video"]);function St(e){let[o,t]=e.split(":");return [o,Pt.has(t)?t:null]}function wt(e,o="div"){let t=Object.assign({},e),n={};function r(i){if(i==null)return n;let l=`&:${i.replace(/[A-Z]/g,d=>`-${d.toLocaleLowerCase()}`)}`;return n[l]==null&&(n[l]={}),n[l]}return Object.entries(t).forEach(([i,s])=>{let[l,d]=St(i),u=bn.get(l);u!=null&&(u.forEach(m=>{let g=`${m}${d?":"+d:""}`;t[g]=s;}),delete t[i]);}),Object.entries(t).forEach(([i,s])=>{let[l,d]=St(i),u=Ct.get(l);if(u!=null){if(s==null)delete t[i];else if(typeof s=="string"&&s.indexOf(" ")>-1){let m=s.split(" ");r(d)[l]=m.map(g=>{var b;return (b=u.get(g.toString()))!=null?b:g}).join(" ");}else u.has(s.toString())?r(d)[l]=u.get(s.toString()):r(d)[l]=s;(typeof o!="string"||!Cn.has(o)||!Pn.has(l))&&delete t[i];}}),Object.keys(t).forEach(i=>{let s=i.substring(1);i.indexOf("_")===0&&Ct.has(s)&&(t[s]=t[i],delete t[i]);}),{cssFromProps:n,unmatchedProps:t}}function wn(){if(typeof window=="undefined"){let{JSDOM:e}=ln("jsdom");return new e("<!DOCTYPE html>").window}return window}function Ft(e){return e?{__html:Sn__default.default(wn()).sanitize(e,{ALLOWED_TAGS:["b","strong","i","em","a","span","div","p","pre","s","u","br","img","code","li","ol","ul","table","tbody","thead","tr","td","th","h1","h2","h3","h4","video","p","style"],ALLOWED_ATTR:["style","class","target","id","href","alt","src","controls","autoplay","loop","muted","playsinline"]})}:{__html:""}}function vn(e){return e&&`fr-${e}`}function Tt(e){return e&&(Array.isArray(e)?e.filter(o=>o!=null).map(o=>Tt(o)).join(" "):vn(e))}function Rn(l,s){var d=l,{as:e,children:o,className:t,css:n={},part:r}=d,i=f(d,["as","children","className","css","part"]);let u=e!=null?e:"div",{cssFromProps:m,unmatchedProps:g}=wt(i,u),b=Tt(r),h=t||b?clsx.clsx(t,b):void 0,P=[{boxSizing:"border-box"},m,n];return typeof o=="string"?jsxRuntime.jsx(u,p(a({className:h,css:P},g),{ref:s,dangerouslySetInnerHTML:Ft(o)})):jsxRuntime.jsx(u,p(a({className:h,css:P},g),{ref:s,children:o}))}var y=Eo__namespace.forwardRef(Rn);var I={};pe(I,{Link:()=>oi,Plain:()=>ti,Primary:()=>Qn,Secondary:()=>ei});var R={};pe(R,{Body1:()=>_n,Body2:()=>Un,Caption:()=>Gn,Display1:()=>Mn,Display2:()=>Wn,H1:()=>Vn,H2:()=>Ln,H3:()=>Nn,H4:()=>zn});var To={};pe(To,{Body1:()=>In,Body2:()=>Hn,Caption:()=>$n,Display1:()=>Tn,Display2:()=>Bn,H1:()=>kn,H2:()=>En,H3:()=>On,H4:()=>Dn});var de={color:"neutral.foreground",fontFamily:"default",margin:"0"},Tn=p(a({},de),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),Bn=p(a({},de),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),kn=p(a({},de),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),En=p(a({},de),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),On=p(a({},de),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),Dn=p(a({},de),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),In=p(a({},de),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),Hn=p(a({},de),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),$n=p(a({},de),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var An=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],ce=Object.fromEntries(An.map(e=>{let o=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",t=Eo__namespace.forwardRef((l,s)=>{var d=l,{as:n=o,children:r}=d,i=f(d,["as","children"]);return jsxRuntime.jsx(y,p(a(a({as:n},To[e]),i),{ref:s,children:r}))});return t.displayName=`Text.${e}`,[e,t]})),Mn=ce.Display1,Wn=ce.Display2,Vn=ce.H1,Ln=ce.H2,Nn=ce.H3,zn=ce.H4,_n=ce.Body1,Un=ce.Body2,Gn=ce.Caption;var ko={};pe(ko,{Link:()=>qn,Plain:()=>Zn,Primary:()=>Xn,Secondary:()=>Jn,loadingCSSStyle:()=>Bo});var Qe={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},Xn=p(a({},Qe),{backgroundColor:"primary.surface",borderColor:"primary.border",color:"primary.foreground","backgroundColor:disabled":"primary.surface","backgroundColor:hover":"primary.hover.surface","opacity:disabled":"0.6","pointerEvents:disabled":"none"}),Jn=p(a({},Qe),{backgroundColor:"secondary.background",borderColor:"secondary.border",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background","backgroundColor:disabled":"secondary.background","opacity:disabled":"0.6"}),qn=p(a({},Qe),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),Zn=p(a({},Qe),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),Yn=react.keyframes({from:{transform:"rotate(0turn)"},to:{transform:"rotate(1turn)"}}),Bo={position:"relative",color:"transparent","&:after":{content:'""',position:"absolute",width:"16px",height:"16px",top:0,left:0,right:0,bottom:0,margin:"auto",border:"4px solid transparent",borderTopColor:"var(--fr-colors-primary-foreground)",borderRadius:"50%",animation:Yn+" 1s ease infinite"}};function eo(s){var l=s,{as:e,children:o,part:t,title:n,variant:r="Primary"}=l,i=f(l,["as","children","part","title","variant"]);var u;let d=r.toLocaleLowerCase();return jsxRuntime.jsxs(y,p(a(p(a({as:e!=null?e:"button",part:[`button-${d}`,t]},ko[r]),{css:a(a({},(u=i.css)!=null?u:{}),i.loading?Bo:{})}),i),{loading:void 0,children:[o,n&&jsxRuntime.jsx(R.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"medium",lineHeight:"20px",part:"button-title",textWrap:"nowrap",children:n})]}))}function Qn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,p(a({},o),{variant:"Primary",children:e}))}function ei(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,p(a({},o),{variant:"Secondary",children:e}))}function oi(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,p(a({},o),{variant:"Link",children:e}))}function ti(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,p(a({},o),{variant:"Plain",children:e}))}var C={};pe(C,{Column:()=>ii,Row:()=>ni});var ni=Eo__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,p(a({display:"flex",flexDirection:"row"},e),{ref:o}))),ii=Eo__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,p(a({display:"flex",flexDirection:"column"},e),{ref:o})));function Oo(r){var i=r,{dismissible:e,flowId:o,part:t}=i,n=f(i,["dismissible","flowId","part"]);return jsxRuntime.jsx(U,p(a({as:null,flowId:o},n),{children:({handleDismiss:s,handlePrimary:l,handleSecondary:d,parentProps:{containerProps:u},step:m})=>{var T,B,S,w,v;let g=(T=m.props)!=null?T:{},b=(S=(B=m.primaryButton)==null?void 0:B.title)!=null?S:m.primaryButtonTitle,h=(v=(w=m.secondaryButton)==null?void 0:w.title)!=null?v:m.secondaryButtonTitle,P=m.$state.blocked;return jsxRuntime.jsxs(x,p(a(a({alignItems:"center","aria-label":"Banner",borderWidth:"md",display:"flex",flexDirection:"row",gap:3,justifyContent:"flex-start",part:["banner",t],role:"complementary"},u),g),{children:[m.imageUri&&jsxRuntime.jsx(y,{as:"img",part:"image",src:m.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxRuntime.jsxs(C.Column,{marginInlineEnd:"auto",part:"banner-title-wrapper",children:[jsxRuntime.jsx(x.Title,{part:"title",children:m.title}),jsxRuntime.jsx(x.Subtitle,{part:"subtitle",children:m.subtitle})]}),jsxRuntime.jsx(x.Secondary,{disabled:P,title:h,onClick:d}),jsxRuntime.jsx(x.Primary,{disabled:P,title:b,onClick:l}),e&&jsxRuntime.jsx(x.Dismiss,{onClick:s})]}))}}))}var no={};pe(no,{Carousel:()=>jt,Collapsible:()=>ro,CollapsibleStep:()=>ze});var Ce={};pe(Ce,{Bar:()=>ke,Dots:()=>It,Fraction:()=>Ee,Segments:()=>oo});function ke(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let i=o>0?Math.min(e/o,1):0,s=i===0?"10px":`${100*i}%`;return jsxRuntime.jsx(y,p(a({"aria-description":"Progress represented as a bar","aria-label":"Progress Bar","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,backgroundColor:"neutral.800",borderRadius:"md",height:"10px",part:"progress-bar",role:"meter"},t),{children:jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:s},transition:"width 300ms ease-out"})}))}function It(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);if(o==1)return null;let i=[...Array(o)].map((s,l)=>jsxRuntime.jsx(y,{as:"circle",cx:4+16*l,cy:"4px",fill:e-1===l?E.colors.blue500:E.colors.blue800,part:["progress-dot",e-1===l?"progress-dot-filled":null],r:4},l));return jsxRuntime.jsx(y,p(a({"aria-description":"Progress represented as dots","aria-label":"Progress Dots","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,as:"svg",height:"8px",part:"progress-dots",role:"meter",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8},t),{children:i}))}function Ee(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);return jsxRuntime.jsx(R.Body2,p(a({"aria-description":"Progress represented as a fraction of a total","aria-label":"Progress Fraction","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,part:"progress-fraction",role:"meter"},t),{children:`${e}/${o}`}))}function oo(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let i=[...Array(o)].map((s,l)=>jsxRuntime.jsx(y,{backgroundColor:e-1>=l?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%",minWidth:"10px",part:["progress-segment",e-1===l?"progress-segment-filled":null]},l));return jsxRuntime.jsx(C.Row,p(a({"aria-description":"Progress represented as a segmented bar","aria-label":"Progress Segments","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,gap:1,height:"10px",part:"progress-segments",role:"meter"},t),{children:i}))}function At(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"size-4"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}))}function si(){return jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",fill:"none",height:"8px",part:"check-icon",viewBox:"0 0 10 8",width:"10px",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Mt(t){var n=t,{checked:e=!1}=n,o=f(n,["checked"]);return jsxRuntime.jsx(y,p(a({backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"check-indicator",position:"relative",height:"22px",width:"22px"},o),{children:e&&jsxRuntime.jsx(y,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"check-indicator-checked",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(si,{})})}))}function ue(e,{onPrimary:o,onSecondary:t}={}){let{navigate:n}=Eo.useContext(L),r={"flow.back":(...i)=>e.flow.back(...i),"flow.complete":(...i)=>e.flow.complete(...i),"flow.forward":(...i)=>e.flow.forward(...i),"flow.restart":()=>e.flow.restart(),"flow.skip":(...i)=>e.flow.skip(...i),"flow.start":(...i)=>e.flow.start(...i),"step.complete":(...i)=>e.complete(...i),"step.skip":(...i)=>e.skip(...i),"step.reset":()=>e.reset(),"step.start":(...i)=>e.start(...i)};return {handlePrimary:Eo.useCallback((i,s,l=!0)=>W(this,null,function*(){if((yield o==null?void 0:o(e,i,s))===!1)return i.preventDefault(),!1;if(e.primaryButton!=null){let u=e.primaryButton.action===!1?!1:r[e.primaryButton.action];typeof u=="function"?yield u(s,l):u!==!1&&(yield e.complete(s,l)),e.primaryButton.uri!=null&&n(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(s,l),e.primaryButtonUri!=null&&n(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:Eo.useCallback((i,s)=>W(this,null,function*(){if((yield t==null?void 0:t(e,i,s))===!1)return i.preventDefault(),!1;if(e.secondaryButton!=null){let d=e.secondaryButton.action===!1?!1:r[e.secondaryButton.action];typeof d=="function"?d():d!==!1&&e.complete(s),e.secondaryButton.uri!=null&&n(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(s),e.secondaryButtonUri!=null&&n(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}function Vt({onPrimary:e,onSecondary:o,step:t}){var u,m;let{handlePrimary:n,handleSecondary:r}=ue(t,{onPrimary:e,onSecondary:o}),{blocked:i,completed:s,skipped:l}=t.$state,d=s||l||!i?jsxRuntime.jsx(Mt,{checked:s||l,marginLeft:"auto"}):jsxRuntime.jsx(y,{as:At,height:"22px",marginLeft:"auto",width:"22px"});return jsxRuntime.jsxs(x,{borderWidth:1,containerType:"inline-size",css:{"@container (max-width: 600px)":{flexBasis:"85%"},"@container (min-width: 601px) and (max-width: 900px)":{flexBasis:"45%"},"@container (min-width: 1200px)":{flexBasis:"25%"}},flex:"0 0 30%",gap:"2",p:"4",part:"carousel-step",userSelect:"none",disabled:i,opacity:i?.5:1,children:[jsxRuntime.jsxs(C.Row,{marginBottom:"2",part:"carousel-step-header",children:[t.iconUri&&jsxRuntime.jsx(x.Media,{borderRadius:"0",height:"24px",src:t.iconUri,width:"24px"}),d]}),jsxRuntime.jsx(x.Title,{children:t.title}),jsxRuntime.jsx(x.Subtitle,{children:t.subtitle}),jsxRuntime.jsxs(C.Row,{css:{"@container (max-width: 200px)":{"& > button":{flexBasis:"50%",flexGrow:1},flexDirection:"column-reverse"}},gap:"2",marginTop:"auto",paddingTop:"3",part:"carousel-step-footer",children:[jsxRuntime.jsx(x.Secondary,{disabled:i,onClick:r,title:(u=t.secondaryButton)==null?void 0:u.title}),jsxRuntime.jsx(x.Primary,{disabled:i,onClick:n,title:(m=t.primaryButton)==null?void 0:m.title})]})]})}function Nt(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M3 10a.75.75 0 0 1 .75-.75h10.638L10.23 5.29a.75.75 0 1 1 1.04-1.08l5.5 5.25a.75.75 0 0 1 0 1.08l-5.5 5.25a.75.75 0 1 1-1.04-1.08l4.158-3.96H3.75A.75.75 0 0 1 3 10Z",clipRule:"evenodd"})}))}function _t(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M17 10a.75.75 0 0 1-.75.75H5.612l4.158 3.96a.75.75 0 1 1-1.04 1.08l-5.5-5.25a.75.75 0 0 1 0-1.08l5.5-5.25a.75.75 0 1 1 1.04 1.08L5.612 9.25H16.25A.75.75 0 0 1 17 10Z",clipRule:"evenodd"})}))}var Ut=react.keyframes`
54
+ var at=Object.defineProperty,an=Object.defineProperties;var sn=Object.getOwnPropertyDescriptors;var Je=Object.getOwnPropertySymbols;var st=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable;var it=(e,o,t)=>o in e?at(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,a=(e,o)=>{for(var t in o||(o={}))st.call(o,t)&&it(e,t,o[t]);if(Je)for(var t of Je(o))lt.call(o,t)&&it(e,t,o[t]);return e},p=(e,o)=>an(e,sn(o));var ln=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(o,t)=>(typeof require!="undefined"?require:o)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var f=(e,o)=>{var t={};for(var n in e)st.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&Je)for(var n of Je(e))o.indexOf(n)<0&&lt.call(e,n)&&(t[n]=e[n]);return t};var pe=(e,o)=>{for(var t in o)at(e,t,{get:o[t],enumerable:!0});};var W=(e,o,t)=>new Promise((n,r)=>{var i=d=>{try{l(t.next(d));}catch(u){r(u);}},s=d=>{try{l(t.throw(d));}catch(u){r(u);}},l=d=>d.done?n(d.value):Promise.resolve(d.value).then(i,s);l((t=t.apply(e,o)).next());});function Be(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})}))}var dt={borderWidths:{md:"1px"}};var qe=[5,10,20,35,50,65,80,95,98],ct=[...qe],Fo=[...qe];ct[4]=40;Fo[4]=60;var pn={blue:{h:213,s:100,l:qe},gray:{h:220,s:10,l:qe},green:{h:141,s:90,l:ct},red:{h:9,s:90,l:Fo},yellow:{h:50,s:90,l:Fo}};var V={};for(let[e,{h:o,s:t,l:n}]of Object.entries(pn))V[e]=Object.fromEntries(n.map((r,i)=>[`${(i+1)*100}`,`hsl(${o} ${t}% ${r}%)`]));var ut=p(a({black:"hsl(0 0% 0%)",white:"hsl(0 0% 100%)"},V),{gray100:V.gray[100],gray200:V.gray[200],gray300:V.gray[300],gray400:V.gray[400],gray500:V.gray[500],gray600:V.gray[600],gray700:V.gray[700],gray800:V.gray[800],gray900:V.gray[900],blue400:V.blue[400],blue500:V.blue[500],blue800:V.blue[800],blue900:V.blue[900],green400:V.blue[400],green500:V.green[500],green800:V.green[800],red500:V.red[500],transparent:"#FFFFFF00",inherit:"inherit"});var mt={md:"8px",lg:"20px",round:"50%"};var c=e=>`var(--fr-colors-${e})`,ft={negative:{100:c("red-100"),200:c("red-200"),300:c("red-300"),400:c("red-400"),500:c("red-500"),600:c("red-600"),700:c("red-700"),800:c("red-800"),900:c("red-900"),background:c("negative-500"),border:c("negative-500"),foreground:c("white"),surface:c("negative-500"),active:{background:c("negative-400"),border:c("negative-400"),foreground:c("white"),surface:c("negative-400")},focus:{background:c("negative-500"),border:c("negative-500"),foreground:c("white"),surface:c("negative-500")},hover:{background:c("negative-400"),border:c("negative-400"),foreground:c("white"),surface:c("negative-400")}},neutral:{100:c("gray-100"),200:c("gray-200"),300:c("gray-300"),400:c("gray-400"),500:c("gray-500"),600:c("gray-600"),700:c("gray-700"),800:c("gray-800"),900:c("gray-900"),background:c("white"),border:c("neutral-800"),foreground:c("black"),surface:c("neutral-700"),active:{background:c("white"),border:c("neutral-900"),foreground:c("black"),surface:c("neutral-700")},focus:{background:c("white"),border:c("neutral-900"),foreground:c("black"),surface:c("neutral-700")},hover:{background:c("neutral-900"),border:c("neutral-800"),foreground:c("black"),surface:c("neutral-700")}},positive:{100:c("green-100"),200:c("green-200"),300:c("green-300"),400:c("green-400"),500:c("green-500"),600:c("green-600"),700:c("green-700"),800:c("green-800"),900:c("green-900"),background:c("positive-500"),border:c("positive-500"),foreground:c("white"),surface:c("positive-500"),active:{background:c("positive-400"),border:c("positive-400"),foreground:c("white"),surface:c("positive-400")},focus:{background:c("positive-500"),border:c("positive-500"),foreground:c("white"),surface:c("positive-500")},hover:{background:c("positive-400"),border:c("positive-400"),foreground:c("white"),surface:c("positive-400")}},primary:{100:c("blue-100"),200:c("blue-200"),300:c("blue-300"),400:c("blue-400"),500:c("blue-500"),600:c("blue-600"),700:c("blue-700"),800:c("blue-800"),900:c("blue-900"),background:c("primary-500"),border:c("primary-500"),foreground:c("white"),surface:c("primary-500"),active:{background:c("primary-400"),border:c("primary-400"),foreground:c("white"),surface:c("primary-400")},focus:{background:c("primary-500"),border:c("primary-500"),foreground:c("white"),surface:c("primary-500")},hover:{background:c("primary-400"),border:c("primary-400"),foreground:c("white"),surface:c("primary-400")}},secondary:{100:c("gray-100"),200:c("gray-200"),300:c("gray-300"),400:c("gray-400"),500:c("gray-500"),600:c("gray-600"),700:c("gray-700"),800:c("gray-800"),900:c("gray-900"),background:c("white"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-900"),active:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-800")},focus:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-900")},hover:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-800")}}};var gt={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var dn="px",cn=e=>typeof e=="number"?`${4*e}${dn}`:e,un=[-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,-.5,0,.5,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,"auto"],yt=Object.fromEntries(un.map(e=>[e,cn(e)]));var xt={fontFamilies:{default:"inherit"},fontSizes:{xs:"12px",sm:"14px",md:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},fontWeights:{thin:"100",extralight:"200",light:"300",regular:"400",medium:"500",demibold:"600",bold:"700",extrabold:"800",black:"900"},letterSpacings:{md:"0.02em"},lineHeights:{xs:"18px",sm:"22px",md:"24px",lg:"26px",xl:"30px","2xl":"38px","3xl":"46px","4xl":"60px"}};var Ze=p(a(p(a({},dt),{colors:a(a({},ut),ft)}),xt),{radii:mt,shadows:gt,space:yt});function Ve(e,o="",t="."){return Object.keys(e).reduce((n,r)=>{let s=`${o.length?`${o}${t}`:""}${r}`,l=e[r];return typeof l=="object"&&l!==null&&!Array.isArray(l)?Object.assign(n,Ve(l,s,t)):n[s]=l,n},{})}function vo(e){let o=Ve(e,"--fr","-");for(let[t,n]of Object.entries(o))if(t.indexOf(".")>-1){let r=t.replace(/\./g,"-");o[r]=n,delete o[t];}return o}function ht(e,o="--fr"){let t={};return Object.keys(e).forEach(n=>{let r=e[n],i=n.replace(/\./g,"-");typeof r=="object"&&r!==null&&!Array.isArray(r)?t[n]=ht(r,`${o}-${n}`):t[n]=`var(${o}-${i})`;}),t}var Ro=vo(Ze),E=ht(Ze);var fn=new Set(["alt","size","src"]),gn=mn__default.default.all.filter(e=>e.indexOf("-")!=0&&!fn.has(e)).map(e=>[e.replace(/-([a-z])/g,(o,t)=>t.toUpperCase()),null]),yn=Object.fromEntries(gn),Ye=Ve(E.colors),xn={color:Ye,backgroundColor:Ye,borderColor:Ye,border:a(a({},E.borderWidths),Ye),borderRadius:E.radii,borderWidth:E.borderWidths,boxShadow:E.shadows,fontFamily:E.fontFamilies,fontSize:E.fontSizes,fontWeight:E.fontWeights,gap:E.space,lineHeight:E.lineHeights,margin:E.space,marginBottom:E.space,marginLeft:E.space,marginRight:E.space,marginTop:E.space,padding:E.space,paddingBottom:E.space,paddingLeft:E.space,paddingRight:E.space,paddingTop:E.space},bt=a(a({},yn),xn),Pt={bg:["backgroundColor"],m:["margin"],mt:["marginTop"],mr:["marginRight"],mb:["marginBottom"],ml:["marginLeft"],mx:["marginLeft","marginRight"],my:["marginTop","marginBottom"],p:["padding"],pt:["paddingTop"],pr:["paddingRight"],pb:["paddingBottom"],pl:["paddingLeft"],px:["paddingLeft","paddingRight"],py:["paddingTop","paddingBottom"]},Ct=new Set(["active","disabled","focus","focusVisible","focusWithin","hover"]);function hn(e){return Array.isArray(e)?new Map(e.map(o=>[o,o])):typeof e=="object"&&e!==null?new Map(Object.entries(e)):typeof e=="string"||typeof e=="number"?new Map([[e,e]]):new Map}var St=new Map(Object.entries(bt).map(([e,o])=>[e,hn(o)])),bn=new Map(Object.entries(Pt).map(([e,o])=>[e,new Set(o)])),Pn=new Set(["height","width"]),Cn=new Set(["canvas","embed","iframe","img","input","object","video"]);function wt(e){let[o,t]=e.split(":");return [o,Ct.has(t)?t:null]}function Ft(e,o="div"){let t=Object.assign({},e),n={};function r(i){if(i==null)return n;let l=`&:${i.replace(/[A-Z]/g,d=>`-${d.toLocaleLowerCase()}`)}`;return n[l]==null&&(n[l]={}),n[l]}return Object.entries(t).forEach(([i,s])=>{let[l,d]=wt(i),u=bn.get(l);u!=null&&(u.forEach(m=>{let g=`${m}${d?":"+d:""}`;t[g]=s;}),delete t[i]);}),Object.entries(t).forEach(([i,s])=>{let[l,d]=wt(i),u=St.get(l);if(u!=null){if(s==null)delete t[i];else if(typeof s=="string"&&s.indexOf(" ")>-1){let m=s.split(" ");r(d)[l]=m.map(g=>{var b;return (b=u.get(g.toString()))!=null?b:g}).join(" ");}else u.has(s.toString())?r(d)[l]=u.get(s.toString()):r(d)[l]=s;(typeof o!="string"||!Cn.has(o)||!Pn.has(l))&&delete t[i];}}),Object.keys(t).forEach(i=>{let s=i.substring(1);i.indexOf("_")===0&&St.has(s)&&(t[s]=t[i],delete t[i]);}),{cssFromProps:n,unmatchedProps:t}}function wn(){if(typeof window=="undefined"){let{JSDOM:e}=ln("jsdom");return new e("<!DOCTYPE html>").window}return window}function vt(e){return e?{__html:Sn__default.default(wn()).sanitize(e,{ALLOWED_TAGS:["b","strong","i","em","a","span","div","p","pre","s","u","br","img","code","li","ol","ul","table","tbody","thead","tr","td","th","h1","h2","h3","h4","video","p","style"],ALLOWED_ATTR:["style","class","target","id","href","alt","src","controls","autoplay","loop","muted","playsinline"]})}:{__html:""}}function vn(e){return e&&`fr-${e}`}function Bt(e){return e&&(Array.isArray(e)?e.filter(o=>o!=null).map(o=>Bt(o)).join(" "):vn(e))}function Rn(l,s){var d=l,{as:e,children:o,className:t,css:n={},part:r}=d,i=f(d,["as","children","className","css","part"]);let u=e!=null?e:"div",{cssFromProps:m,unmatchedProps:g}=Ft(i,u),b=Bt(r),h=t||b?clsx.clsx(t,b):void 0,P=[{boxSizing:"border-box"},m,n];return typeof o=="string"?jsxRuntime.jsx(u,p(a({className:h,css:P},g),{ref:s,dangerouslySetInnerHTML:vt(o)})):jsxRuntime.jsx(u,p(a({className:h,css:P},g),{ref:s,children:o}))}var y=Eo__namespace.forwardRef(Rn);var H={};pe(H,{Link:()=>oi,Plain:()=>ti,Primary:()=>Qn,Secondary:()=>ei});var R={};pe(R,{Body1:()=>_n,Body2:()=>Un,Caption:()=>Gn,Display1:()=>Mn,Display2:()=>Wn,H1:()=>Vn,H2:()=>Ln,H3:()=>Nn,H4:()=>zn});var To={};pe(To,{Body1:()=>In,Body2:()=>Hn,Caption:()=>$n,Display1:()=>Tn,Display2:()=>Bn,H1:()=>kn,H2:()=>En,H3:()=>On,H4:()=>Dn});var de={color:"neutral.foreground",fontFamily:"default",margin:"0"},Tn=p(a({},de),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),Bn=p(a({},de),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),kn=p(a({},de),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),En=p(a({},de),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),On=p(a({},de),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),Dn=p(a({},de),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),In=p(a({},de),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),Hn=p(a({},de),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),$n=p(a({},de),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var An=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],ce=Object.fromEntries(An.map(e=>{let o=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",t=Eo__namespace.forwardRef((l,s)=>{var d=l,{as:n=o,children:r}=d,i=f(d,["as","children"]);return jsxRuntime.jsx(y,p(a(a({as:n},To[e]),i),{ref:s,children:r}))});return t.displayName=`Text.${e}`,[e,t]})),Mn=ce.Display1,Wn=ce.Display2,Vn=ce.H1,Ln=ce.H2,Nn=ce.H3,zn=ce.H4,_n=ce.Body1,Un=ce.Body2,Gn=ce.Caption;var ko={};pe(ko,{Link:()=>qn,Plain:()=>Zn,Primary:()=>Xn,Secondary:()=>Jn,loadingCSSStyle:()=>Bo});var Qe={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},Xn=p(a({},Qe),{backgroundColor:"primary.surface",borderColor:"primary.border",color:"primary.foreground","backgroundColor:disabled":"primary.surface","backgroundColor:hover":"primary.hover.surface","opacity:disabled":"0.6","pointerEvents:disabled":"none"}),Jn=p(a({},Qe),{backgroundColor:"secondary.background",borderColor:"secondary.border",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background","backgroundColor:disabled":"secondary.background","opacity:disabled":"0.6"}),qn=p(a({},Qe),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),Zn=p(a({},Qe),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),Yn=react.keyframes({from:{transform:"rotate(0turn)"},to:{transform:"rotate(1turn)"}}),Bo={position:"relative",color:"transparent","&:after":{content:'""',position:"absolute",width:"16px",height:"16px",top:0,left:0,right:0,bottom:0,margin:"auto",border:"4px solid transparent",borderTopColor:"var(--fr-colors-primary-foreground)",borderRadius:"50%",animation:Yn+" 1s ease infinite"}};function eo(s){var l=s,{as:e,children:o,part:t,title:n,variant:r="Primary"}=l,i=f(l,["as","children","part","title","variant"]);var u;let d=r.toLocaleLowerCase();return jsxRuntime.jsxs(y,p(a(p(a({as:e!=null?e:"button",part:[`button-${d}`,t]},ko[r]),{css:a(a({},(u=i.css)!=null?u:{}),i.loading?Bo:{})}),i),{loading:void 0,children:[o,n&&jsxRuntime.jsx(R.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"medium",lineHeight:"20px",part:"button-title",textWrap:"nowrap",children:n})]}))}function Qn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,p(a({},o),{variant:"Primary",children:e}))}function ei(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,p(a({},o),{variant:"Secondary",children:e}))}function oi(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,p(a({},o),{variant:"Link",children:e}))}function ti(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,p(a({},o),{variant:"Plain",children:e}))}var C={};pe(C,{Column:()=>ii,Row:()=>ni});var ni=Eo__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,p(a({display:"flex",flexDirection:"row"},e),{ref:o}))),ii=Eo__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,p(a({display:"flex",flexDirection:"column"},e),{ref:o})));function Oo(r){var i=r,{dismissible:e,flowId:o,part:t}=i,n=f(i,["dismissible","flowId","part"]);return jsxRuntime.jsx(U,p(a({as:null,flowId:o},n),{children:({handleDismiss:s,handlePrimary:l,handleSecondary:d,parentProps:{containerProps:u},step:m})=>{var T,B,S,w,v;let g=(T=m.props)!=null?T:{},b=(S=(B=m.primaryButton)==null?void 0:B.title)!=null?S:m.primaryButtonTitle,h=(v=(w=m.secondaryButton)==null?void 0:w.title)!=null?v:m.secondaryButtonTitle,P=m.$state.blocked;return jsxRuntime.jsxs(x,p(a(a({alignItems:"center","aria-label":"Banner",borderWidth:"md",display:"flex",flexDirection:"row",gap:3,justifyContent:"flex-start",part:["banner",t],role:"complementary"},u),g),{children:[m.imageUri&&jsxRuntime.jsx(y,{as:"img",part:"image",src:m.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxRuntime.jsxs(C.Column,{marginInlineEnd:"auto",part:"banner-title-wrapper",children:[jsxRuntime.jsx(x.Title,{part:"title",children:m.title}),jsxRuntime.jsx(x.Subtitle,{part:"subtitle",children:m.subtitle})]}),jsxRuntime.jsx(x.Secondary,{disabled:P,title:h,onClick:d}),jsxRuntime.jsx(x.Primary,{disabled:P,title:b,onClick:l}),e&&jsxRuntime.jsx(x.Dismiss,{onClick:s})]}))}}))}var no={};pe(no,{Carousel:()=>Xt,Collapsible:()=>ro,CollapsibleStep:()=>ze});var Ce={};pe(Ce,{Bar:()=>ke,Dots:()=>Ht,Fraction:()=>Ee,Segments:()=>oo});function ke(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let i=o>0?Math.min(e/o,1):0,s=i===0?"10px":`${100*i}%`;return jsxRuntime.jsx(y,p(a({"aria-description":"Progress represented as a bar","aria-label":"Progress Bar","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,backgroundColor:"neutral.800",borderRadius:"md",height:"10px",part:"progress-bar",role:"meter"},t),{children:jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:s},transition:"width 300ms ease-out"})}))}function Ht(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);if(o==1)return null;let i=[...Array(o)].map((s,l)=>jsxRuntime.jsx(y,{as:"circle",cx:4+16*l,cy:"4px",fill:e-1===l?E.colors.blue500:E.colors.blue800,part:["progress-dot",e-1===l?"progress-dot-filled":null],r:4},l));return jsxRuntime.jsx(y,p(a({"aria-description":"Progress represented as dots","aria-label":"Progress Dots","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,as:"svg",height:"8px",part:"progress-dots",role:"meter",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8},t),{children:i}))}function Ee(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);return jsxRuntime.jsx(R.Body2,p(a({"aria-description":"Progress represented as a fraction of a total","aria-label":"Progress Fraction","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,part:"progress-fraction",role:"meter"},t),{children:`${e}/${o}`}))}function oo(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let i=[...Array(o)].map((s,l)=>jsxRuntime.jsx(y,{backgroundColor:e-1>=l?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%",minWidth:"10px",part:["progress-segment",e-1===l?"progress-segment-filled":null]},l));return jsxRuntime.jsx(C.Row,p(a({"aria-description":"Progress represented as a segmented bar","aria-label":"Progress Segments","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,gap:1,height:"10px",part:"progress-segments",role:"meter"},t),{children:i}))}function Mt(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"size-4"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}))}function si(){return jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",fill:"none",height:"8px",part:"check-icon",viewBox:"0 0 10 8",width:"10px",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Wt(t){var n=t,{checked:e=!1}=n,o=f(n,["checked"]);return jsxRuntime.jsx(y,p(a({backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"check-indicator",position:"relative",height:"22px",width:"22px"},o),{children:e&&jsxRuntime.jsx(y,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"check-indicator-checked",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(si,{})})}))}function ue(e,{onPrimary:o,onSecondary:t}={}){let{navigate:n}=Eo.useContext(L),r={"flow.back":(...i)=>e.flow.back(...i),"flow.complete":(...i)=>e.flow.complete(...i),"flow.forward":(...i)=>e.flow.forward(...i),"flow.restart":()=>e.flow.restart(),"flow.skip":(...i)=>e.flow.skip(...i),"flow.start":(...i)=>e.flow.start(...i),"step.complete":(...i)=>e.complete(...i),"step.skip":(...i)=>e.skip(...i),"step.reset":()=>e.reset(),"step.start":(...i)=>e.start(...i)};return {handlePrimary:Eo.useCallback((i,s,l=!0)=>W(this,null,function*(){if((yield o==null?void 0:o(e,i,s))===!1)return i.preventDefault(),!1;if(e.primaryButton!=null){let u=e.primaryButton.action===!1?!1:r[e.primaryButton.action];typeof u=="function"?yield u(s,l):u!==!1&&(yield e.complete(s,l)),e.primaryButton.uri!=null&&n(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(s,l),e.primaryButtonUri!=null&&n(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:Eo.useCallback((i,s)=>W(this,null,function*(){if((yield t==null?void 0:t(e,i,s))===!1)return i.preventDefault(),!1;if(e.secondaryButton!=null){let d=e.secondaryButton.action===!1?!1:r[e.secondaryButton.action];typeof d=="function"?d():d!==!1&&e.complete(s),e.secondaryButton.uri!=null&&n(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(s),e.secondaryButtonUri!=null&&n(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}function Lt({onPrimary:e,onSecondary:o,step:t}){var u,m;let{handlePrimary:n,handleSecondary:r}=ue(t,{onPrimary:e,onSecondary:o}),{blocked:i,completed:s,skipped:l}=t.$state,d=s||l||!i?jsxRuntime.jsx(Wt,{checked:s||l,marginLeft:"auto"}):jsxRuntime.jsx(y,{as:Mt,height:"22px",marginLeft:"auto",width:"22px"});return jsxRuntime.jsxs(x,{borderWidth:1,containerType:"inline-size",css:{"@container (max-width: 600px)":{flexBasis:"85%"},"@container (min-width: 601px) and (max-width: 900px)":{flexBasis:"45%"},"@container (min-width: 1200px)":{flexBasis:"25%"}},flex:"0 0 30%",gap:"2",p:"4",part:"carousel-step",userSelect:"none",disabled:i,opacity:i?.5:1,children:[jsxRuntime.jsxs(C.Row,{marginBottom:"2",part:"carousel-step-header",children:[t.iconUri&&jsxRuntime.jsx(x.Media,{borderRadius:"0",height:"24px",src:t.iconUri,width:"24px"}),d]}),jsxRuntime.jsx(x.Title,{children:t.title}),jsxRuntime.jsx(x.Subtitle,{children:t.subtitle}),jsxRuntime.jsxs(C.Row,{css:{"@container (max-width: 200px)":{"& > button":{flexBasis:"50%",flexGrow:1},flexDirection:"column-reverse"}},gap:"2",marginTop:"auto",paddingTop:"3",part:"carousel-step-footer",children:[jsxRuntime.jsx(x.Secondary,{disabled:i,onClick:r,title:(u=t.secondaryButton)==null?void 0:u.title}),jsxRuntime.jsx(x.Primary,{disabled:i,onClick:n,title:(m=t.primaryButton)==null?void 0:m.title})]})]})}function zt(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M3 10a.75.75 0 0 1 .75-.75h10.638L10.23 5.29a.75.75 0 1 1 1.04-1.08l5.5 5.25a.75.75 0 0 1 0 1.08l-5.5 5.25a.75.75 0 1 1-1.04-1.08l4.158-3.96H3.75A.75.75 0 0 1 3 10Z",clipRule:"evenodd"})}))}function Ut(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M17 10a.75.75 0 0 1-.75.75H5.612l4.158 3.96a.75.75 0 1 1-1.04 1.08l-5.5-5.25a.75.75 0 0 1 0-1.08l5.5-5.25a.75.75 0 1 1 1.04 1.08L5.612 9.25H16.25A.75.75 0 0 1 17 10Z",clipRule:"evenodd"})}))}var Gt=react.keyframes`
55
55
  from {
56
56
  opacity: 0;
57
57
  }
58
58
  to {
59
59
  opacity: 1;
60
60
  }
61
- `;function Gt({flow:e,sort:o,onPrimary:t,onSecondary:n}){var T,B;let[r,i]=Eo.useState(),[s]=Eo.useState({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step",startIndex:o=="completed-last"?0:(B=(T=Array.from(e.steps.values()).find(S=>!S.$state.completed&&!S.$state.skipped))==null?void 0:T.order)!=null?B:0}),[l,d]=ui__default.default(s),[u,m]=Eo.useState(),[g,b]=Eo.useState();Eo.useLayoutEffect(()=>{d&&(u==null&&m(d.canScrollNext()),g==null&&b(d.canScrollPrev()),d.on("select",()=>{m(d.canScrollNext()),b(d.canScrollPrev());}));},[d]),Eo.useEffect(()=>{if(!r){let S=Array.from(e.steps.values()),w=S.filter(F=>F.$state.completed||F.$state.skipped).sort((F,O)=>F.order-O.order),v=S.filter(F=>!F.$state.completed&&!F.$state.skipped).sort((F,O)=>F.order-O.order);i(o==="completed-last"?[...v,...w].map(F=>F.id):S.map(F=>F.id));}},[]);let h=e.getNumberOfCompletedSteps(),P=e.getNumberOfAvailableSteps();return r?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(C.Row,{css:{"@container (max-width: 750px)":{flexDirection:"column",gap:E.space[5]}},justifyContent:"space-between",part:"carousel-header",children:[jsxRuntime.jsxs(C.Column,{part:"carousel-header-content",children:[jsxRuntime.jsx(R.H3,{children:e.title}),jsxRuntime.jsx(R.Body2,{color:"neutral.400",children:e.subtitle})]}),jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:2,part:"progress",children:[jsxRuntime.jsxs(R.Body2,{fontWeight:"demibold",part:"progress-text",children:[h,"/",P]}),jsxRuntime.jsx(ke,{current:h,total:P,minWidth:"200px"})]})]}),jsxRuntime.jsxs(y,{margin:`0 ${E.space[-4]}`,overflow:"hidden",part:"carousel-wrapper",px:"4",position:"relative",ref:l,children:[jsxRuntime.jsx(C.Row,{gap:4,part:"carousel-content",children:Array.from(e.steps.values()).filter(S=>S.$state.visible).sort((S,w)=>r.indexOf(S.id)-r.indexOf(w.id)).map(S=>jsxRuntime.jsx(Vt,{onPrimary:t,onSecondary:n,step:S},S.id))}),g&&jsxRuntime.jsx(C.Column,{animation:`${Ut} 300ms ease-out`,background:"linear-gradient(to right, rgba(255, 255, 255, 0.5), transparent 50%)",bottom:"0",left:"0",justifyContent:"center",paddingLeft:"3",part:"carousel-prev-wrapper",position:"absolute",top:"0",children:jsxRuntime.jsx(I.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollPrev(),padding:"2",children:jsxRuntime.jsx(_t,{height:"24px",width:"24px"})})}),u&&jsxRuntime.jsx(C.Column,{animation:`${Ut} 300ms ease-out`,background:"linear-gradient(to left, rgba(255, 255, 255, 0.5), transparent 50%)",bottom:"0",justifyContent:"center",paddingRight:"3",part:"carousel-next-wrapper",position:"absolute",right:"0",top:"0",children:jsxRuntime.jsx(I.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollNext(),padding:"2",children:jsxRuntime.jsx(Nt,{height:"24px",width:"24px"})})})]})]}):null}function jt(o){var e=f(o,[]);return jsxRuntime.jsx(U,p(a({as:x,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:t=>jsxRuntime.jsx(Gt,a(a({},e),t))}))}var ze={};pe(ze,{Content:()=>Ho,Root:()=>$o,Trigger:()=>Ao});function Jt(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6"},e),{children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})}))}var fi=react.keyframes`
61
+ `;function Kt({flow:e,sort:o,onPrimary:t,onSecondary:n}){var T,B;let[r,i]=Eo.useState(),[s]=Eo.useState({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step",startIndex:o=="completed-last"?0:(B=(T=Array.from(e.steps.values()).find(S=>!S.$state.completed&&!S.$state.skipped))==null?void 0:T.order)!=null?B:0}),[l,d]=ui__default.default(s),[u,m]=Eo.useState(),[g,b]=Eo.useState();Eo.useLayoutEffect(()=>{d&&(u==null&&m(d.canScrollNext()),g==null&&b(d.canScrollPrev()),d.on("select",()=>{m(d.canScrollNext()),b(d.canScrollPrev());}));},[d]),Eo.useEffect(()=>{if(!r){let S=Array.from(e.steps.values()),w=S.filter(F=>F.$state.completed||F.$state.skipped).sort((F,O)=>F.order-O.order),v=S.filter(F=>!F.$state.completed&&!F.$state.skipped).sort((F,O)=>F.order-O.order);i(o==="completed-last"?[...v,...w].map(F=>F.id):S.map(F=>F.id));}},[]);let h=e.getNumberOfCompletedSteps(),P=e.getNumberOfAvailableSteps();return r?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(C.Row,{css:{"@container (max-width: 750px)":{flexDirection:"column",gap:E.space[5]}},justifyContent:"space-between",part:"carousel-header",children:[jsxRuntime.jsxs(C.Column,{part:"carousel-header-content",children:[jsxRuntime.jsx(R.H3,{children:e.title}),jsxRuntime.jsx(R.Body2,{color:"neutral.400",children:e.subtitle})]}),jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:2,part:"progress",children:[jsxRuntime.jsxs(R.Body2,{fontWeight:"demibold",part:"progress-text",children:[h,"/",P]}),jsxRuntime.jsx(ke,{current:h,total:P,minWidth:"200px"})]})]}),jsxRuntime.jsxs(y,{margin:`0 ${E.space[-4]}`,overflow:"hidden",part:"carousel-wrapper",px:"4",position:"relative",ref:l,children:[jsxRuntime.jsx(C.Row,{gap:4,part:"carousel-content",children:Array.from(e.steps.values()).filter(S=>S.$state.visible).sort((S,w)=>r.indexOf(S.id)-r.indexOf(w.id)).map(S=>jsxRuntime.jsx(Lt,{onPrimary:t,onSecondary:n,step:S},S.id))}),g&&jsxRuntime.jsx(C.Column,{animation:`${Gt} 300ms ease-out`,background:"linear-gradient(to right, rgba(255, 255, 255, 0.5), transparent 50%)",bottom:"0",left:"0",justifyContent:"center",paddingLeft:"3",part:"carousel-prev-wrapper",position:"absolute",top:"0",children:jsxRuntime.jsx(H.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollPrev(),padding:"2",children:jsxRuntime.jsx(Ut,{height:"24px",width:"24px"})})}),u&&jsxRuntime.jsx(C.Column,{animation:`${Gt} 300ms ease-out`,background:"linear-gradient(to left, rgba(255, 255, 255, 0.5), transparent 50%)",bottom:"0",justifyContent:"center",paddingRight:"3",part:"carousel-next-wrapper",position:"absolute",right:"0",top:"0",children:jsxRuntime.jsx(H.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollNext(),padding:"2",children:jsxRuntime.jsx(zt,{height:"24px",width:"24px"})})})]})]}):null}function Xt(o){var e=f(o,[]);return jsxRuntime.jsx(U,p(a({as:x,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:t=>jsxRuntime.jsx(Kt,a(a({},e),t))}))}var ze={};pe(ze,{Content:()=>Ho,Root:()=>$o,Trigger:()=>Ao});function qt(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6"},e),{children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})}))}var fi=react.keyframes`
62
62
  from {
63
63
  height: 0;
64
64
  opacity: 0;
@@ -76,14 +76,14 @@ var it=Object.defineProperty,an=Object.defineProperties;var sn=Object.getOwnProp
76
76
  height: 0;
77
77
  opacity: 0;
78
78
  }
79
- `,yi=()=>jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function xi({checked:e=!1}){return jsxRuntime.jsx(y,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"22px",width:"22px",children:e&&jsxRuntime.jsx(y,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"field-radio-indicator",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(yi,{})})})}function Ho({children:e}){return jsxRuntime.jsx(De__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(C.Column,{css:{'&[data-state="open"]':{animation:`${fi} 300ms ease-out`},'&[data-state="closed"]':{animation:`${gi} 300ms ease-out`},overflow:"hidden"},gap:5,part:"collapsible-content",children:[jsxRuntime.jsx(y,{}),e]})})}function $o(i){var s=i,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:n=!1}=s,r=f(s,["children","disabled","onOpenChange","open"]);return jsxRuntime.jsx(De__namespace.Root,{asChild:!0,disabled:o,open:n,onOpenChange:t,children:jsxRuntime.jsx(x,p(a({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,part:"collapsible-step"},r),{children:e}))})}function Ao({isCompleted:e,isBlocked:o,title:t}){return jsxRuntime.jsx(De__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(C.Row,{alignItems:"center",justifyContent:"space-between",margin:-5,padding:5,zIndex:1,opacity:o?.4:1,disabled:o,pointerEvents:o?"none":"auto",cursor:o?"not-allowed":"pointer",part:"collapsible-header",children:[jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(xi,{checked:e}),jsxRuntime.jsx(R.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:t})]}),jsxRuntime.jsx(y,{as:Jt,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var Zt=Eo.createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function Yt({handlePrimary:e,handleSecondary:o,open:t,onOpenChange:n,step:r}){var P,T,B,S,w,v;let{$state:{blocked:i,completed:s,skipped:l},subtitle:d,title:u}=r,m=(T=(P=r.primaryButton)==null?void 0:P.title)!=null?T:r.primaryButtonTitle,g=(S=(B=r.secondaryButton)==null?void 0:B.title)!=null?S:r.secondaryButtonTitle,b=(w=r.props)!=null?w:{},h=!!i;return jsxRuntime.jsxs($o,p(a({open:t,onOpenChange:n},b),{children:[jsxRuntime.jsx(Ao,{isBlocked:r.$state.blocked,isCompleted:s||l,title:u}),jsxRuntime.jsxs(Ho,{children:[jsxRuntime.jsx(x.Media,{aspectRatio:2.5,objectFit:"cover",overflowClipMargin:"unset",src:(v=r.videoUri)!=null?v:r.imageUri,transform:"translate3d(0, 0, 1px)",type:r.videoUri?"video":"image"}),jsxRuntime.jsx(x.Subtitle,{color:"neutral.400",children:d}),jsxRuntime.jsxs(C.Row,{gap:3,part:"collapsible-footer",children:[jsxRuntime.jsx(x.Secondary,{title:g,onClick:o}),jsxRuntime.jsx(x.Primary,{disabled:h,title:m,onClick:e})]})]})]}))}var Ci={default:Yt};function Si(n){var r=n,{flow:e,step:o}=r,t=f(r,["flow","step"]);var T;let{onPrimary:i,onSecondary:s,openStepId:l,setOpenStepId:d,stepTypes:u}=Eo.useContext(Zt),{handlePrimary:m,handleSecondary:g}=ue(o,{onPrimary:i,onSecondary:s}),b=(l!=null?l:e.getCurrentStep().id)===o.id,h=(T=u[o.type])!=null?T:Yt;function P(B){return W(this,null,function*(){d(B?o.id:""),B&&!o.$state.completed&&(yield o.start(),d(null));})}return jsxRuntime.jsx(h,p(a({flow:e,onOpenChange:P,open:b,step:o},t),{handlePrimary:m,handleSecondary:g}),o.id)}function ro(l){var d=l,{dismissible:e,flowId:o,onPrimary:t,onSecondary:n,part:r,stepTypes:i={}}=d,s=f(d,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[u,m]=Eo.useState(null),g=a(a({},Ci),i);return jsxRuntime.jsx(Zt.Provider,{value:{openStepId:u,setOpenStepId:m,onPrimary:t,onSecondary:n,stepTypes:g},children:jsxRuntime.jsx(U,p(a({as:x,borderWidth:"md",flowId:o,part:["checklist",r]},s),{children:T=>{var B=T,{flow:b,handleDismiss:h}=B,P=f(B,["flow","handleDismiss"]);let w=Array.from(b.steps.entries()).filter(([,O])=>O.$state.visible===!0).map(([,O])=>jsxRuntime.jsx(Si,p(a({flow:b,handleDismiss:h},P),{step:O}),O.id)),v=b.getNumberOfCompletedSteps(),F=b.getNumberOfAvailableSteps();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(C.Column,{gap:2,children:[jsxRuntime.jsx(x.Header,{dismissible:e,handleDismiss:h,part:"checklist-header",subtitle:b.subtitle,title:b.title}),jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsxs(R.Body2,{fontWeight:"demibold",children:[v,"/",F]}),jsxRuntime.jsx(ke,{current:v,total:F,flexGrow:1})]})]}),w]})}}))})}var Oi=new Set(["required","min","max","minLength","maxLength","pattern"]);function Di({fieldComponent:e,control:o,fieldData:t,submit:n}){let r=reactHookForm.useFormContext();t.pattern!=null&&(typeof t.pattern=="string"?t.pattern=new RegExp(t.pattern.replace(/^\/|\/$/g,"")):typeof t.pattern=="object"&&typeof t.pattern.value=="string"&&(t.pattern.value=new RegExp(t.pattern.value.replace(/^\/|\/$/g,""))));let i=Object.fromEntries(Object.entries(t).filter(([l])=>Oi.has(l))),s=reactHookForm.useController({name:t.id,control:o,rules:i});return jsxRuntime.jsx(e,p(a({},s),{fieldData:t,formContext:r,submit:n}))}function or({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:n,parentProps:{dismissible:r},step:i}){var v,F,O,D,M;let{__readOnly:s}=Eo.useContext(L),l=Eo.useMemo(()=>{var k,H;return (H=(k=i.fields)==null?void 0:k.filter(A=>e[A.type]!=null&&A.id))!=null?H:[]},[i.fields,e]),d=reactHookForm.useForm({delayError:2e3,mode:"onChange",defaultValues:l.reduce((k,H)=>{var A;return k[H.id]=(A=H.value)!=null?A:"",k},{})});Eo.useEffect(()=>{d.formState.isDirty||d.reset(l.reduce((k,H)=>{var A;return k[H.id]=(A=H.value)!=null?A:"",k},{}));},[l]);let[u,m]=Eo.useState(!1),g=[],{control:b,handleSubmit:h}=d,P=(v=i.props)!=null?v:{};function T(k,H){m(!0),t(H,k,s===!0).then(()=>m(!1));}l.forEach(k=>{e[k.type]!=null&&g.push(jsxRuntime.jsx(Di,{control:b,fieldComponent:e[k.type],fieldData:k,submit:h(T)},`${i.flow.id}-${k.id}`));});let B=(O=(F=i.primaryButton)==null?void 0:F.title)!=null?O:i.primaryButtonTitle,S=(M=(D=i.secondaryButton)==null?void 0:D.title)!=null?M:i.secondaryButtonTitle,w=!!(i.$state.blocked||!d.formState.isValid);return Eo.useEffect(()=>{d.clearErrors();},[i]),jsxRuntime.jsxs(C.Column,p(a({gap:5,part:"form-step"},P),{children:[jsxRuntime.jsx(x.Header,{dismissible:r,handleDismiss:o,part:"form-step-header",subtitle:i.subtitle,title:i.title}),jsxRuntime.jsx(reactHookForm.FormProvider,p(a({},d),{children:g})),jsxRuntime.jsxs(C.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[S&&jsxRuntime.jsx(I.Secondary,{onClick:n,title:S}),jsxRuntime.jsx(I.Primary,{disabled:w||u,onClick:h(T),title:B!=null?B:"Submit",loading:u})]},`form-footer-${i.id}`)]}))}function tr({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.length?jsxRuntime.jsx(R.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function Mo({children:e,id:o,required:t=!1}){return jsxRuntime.jsxs(R.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsxRuntime.jsx(y,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Wo={backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md"},_e=p(a({},Wo),{px:"4",py:"2",display:"block",outline:"none",width:"100%"}),io={alignItems:"center",bg:"primary.surface",borderWidth:"md",borderStyle:"solid",borderColor:"primary.border",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",position:"absolute",top:"-1px",width:"calc(100% + 2px)",color:"primary.foreground"};function te({children:e,field:o,fieldData:t,fieldState:n}){var m;let{id:r,label:i,placeholder:s,props:l}=t,{error:d}=n,u=a(p(a(a(a({id:r},o),s?{placeholder:s}:{}),_e),{"aria-invalid":!!d,value:(m=o.value)!=null?m:""}),l);return jsxRuntime.jsxs(y,{part:"field",children:[jsxRuntime.jsx(Mo,{id:r,required:!!t.required,children:i}),e(u),jsxRuntime.jsx(tr,{error:d})]})}function He(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"})}))}var Mi=Eo__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsxs(y,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:o,justifyContent:"space-between",part:"field-radio",px:4,py:2,children:[jsxRuntime.jsx(R.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx($e__namespace.Item,{id:o,value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(y,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",flex:"0 0 auto",padding:"0",part:"field-radio-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(y,p(a({as:$e__namespace.Indicator},io),{children:jsxRuntime.jsx(He,{height:"14",width:"14"})}))})})]}));function Vo(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,r=n.map(({label:i,value:s})=>jsxRuntime.jsx(Mi,{value:s,label:i},s));return jsxRuntime.jsx(te,p(a({},e),{children:()=>jsxRuntime.jsx($e__namespace.Root,{value:t,onValueChange:o,asChild:!0,children:jsxRuntime.jsx(C.Column,{gap:2,part:"field-radio-group",children:r})})}))}function ao(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}))}function lr(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,[r,i]=Eo__namespace.useState([]);function s(l){let d=[];r.includes(l)?d=[...r.filter(u=>u!==l)]:d=[...r,l],i(d),o(d);}return jsxRuntime.jsx(te,p(a({},e),{children:()=>jsxRuntime.jsx(C.Column,{gap:2,part:"field-select-multiple",children:n.map(({label:l,value:d})=>jsxRuntime.jsx(so__namespace.Root,{value:r.includes(d)?d:void 0,onCheckedChange:()=>s(d),asChild:!0,children:jsxRuntime.jsxs(y,{as:"button",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",justifyContent:"space-between",part:"field-check",px:4,py:2,children:[jsxRuntime.jsx(R.Body2,{part:"field-check-label",children:l}),jsxRuntime.jsx(y,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",flex:"0 0 auto",id:d,padding:"0",part:"field-check-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(so__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,p(a({},io),{children:jsxRuntime.jsx(He,{height:"14",width:"14"})}))})})]})},d))})}))}var Li=Eo__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsx(z__namespace.Item,{value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(y,{"backgroundColor:hover":"neutral.900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsxRuntime.jsx(z__namespace.ItemText,{asChild:!0,children:jsxRuntime.jsx(R.Body2,{part:"field-select-option-label",children:e})})})}));function Lo(e){let{field:{onChange:o,value:t},fieldData:{options:n=[],placeholder:r}}=e,i=n.map(({label:s,value:l})=>jsxRuntime.jsx(Li,{value:l,label:s},l));return e.fieldData.multiple?jsxRuntime.jsx(lr,a({},e)):jsxRuntime.jsx(te,p(a({},e),{children:()=>jsxRuntime.jsxs(z__namespace.Root,{value:t,onValueChange:o,children:[jsxRuntime.jsx(z__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(R.Body2,p(a({},_e),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsxRuntime.jsx(z__namespace.Value,{placeholder:r!=null?r:"Select one"}),jsxRuntime.jsx(z__namespace.Icon,{children:jsxRuntime.jsx(y,{as:ao,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsxRuntime.jsx(z__namespace.Portal,{children:jsxRuntime.jsx(z__namespace.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsxRuntime.jsx(y,p(a({},_e),{boxShadow:"md",maxHeight:"var(--radix-select-content-available-height)",p:"1",part:"field-select-options",width:"var(--radix-popper-anchor-width)",zIndex:"99999",children:jsxRuntime.jsx(z__namespace.Viewport,{children:i})}))})})]})}))}function No(e){return jsxRuntime.jsx(te,p(a({},e),{children:o=>jsxRuntime.jsx(R.Body2,a({as:"input",part:"field-text",type:"text"},o))}))}function zo(e){return jsxRuntime.jsx(te,p(a({},e),{children:o=>jsxRuntime.jsx(R.Body2,a({as:"textarea",part:"field-textarea"},o))}))}function mr(e){let{field:{onChange:o,value:t},fieldData:{options:n,label:r,id:i=[]}}=e;return jsxRuntime.jsxs(y,{part:"field",display:"flex",gap:2,alignItems:"center",children:[jsxRuntime.jsx(so__namespace.Root,{defaultChecked:!0,onCheckedChange:o,value:t,checked:t===!0,asChild:!0,children:jsxRuntime.jsx(y,p(a({},Wo),{as:"button",width:"25px",minWidth:"25px",height:"25px",justifyContent:"center",alignItems:"center",display:"flex","backgroundColor:hover":"neutral.900",part:"field-checkbox",id:i,children:jsxRuntime.jsx(so__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",children:jsxRuntime.jsx(He,{height:"14",fill:"currentColor"})})})}))}),jsxRuntime.jsx(R.Body2,{part:"field-checkbox-label",as:"label",htmlFor:i,children:r})]})}var zi={checkbox:mr,radio:Vo,select:Lo,text:No,textarea:zo};function Me(r){var i=r,{fieldTypes:e={},flowId:o,part:t}=i,n=f(i,["fieldTypes","flowId","part"]);let s=Object.assign({},zi,e);return jsxRuntime.jsx(U,p(a({flowId:o,part:["form",t]},n),{children:l=>jsxRuntime.jsx(or,a({fieldTypes:s},l))}))}var co={};pe(co,{NPS:()=>Ge});function yr({field:e,fieldData:o,submit:t}){var r,i;let n=[...Array(11)].map((s,l)=>{let d=e.value===l?I.Primary:I.Secondary;return jsxRuntime.jsx(d,{borderWidth:"1px",onClick:()=>{e.onChange(l),t();},title:`${l}`,css:{".fr-button-title":{fontSize:"15px"}}},l)});return jsxRuntime.jsxs(C.Column,{gap:2,children:[jsxRuntime.jsx(C.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:n}),jsxRuntime.jsxs(C.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsxRuntime.jsx(R.Caption,{part:"field-nps-left-label",color:"neutral.400",children:(r=o.negativeLabel)!=null?r:"Not likely at all"}),jsxRuntime.jsx(R.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(i=o.positiveLabel)!=null?i:"Extremely likely"})]})]})}function Ge(i){var s=i,{as:e=$,flowId:o,fieldTypes:t,part:n}=s,r=f(s,["as","flowId","fieldTypes","part"]);var d;let{flow:l}=Fe(o);return jsxRuntime.jsx(Me,p(a({alignSelf:"end",as:e,flowId:o,fieldTypes:a({nps:yr},t),modal:!1,onEscapeKeyDown:u=>{typeof r.onEscapeKeyDown=="function"&&r.onEscapeKeyDown(u),u.defaultPrevented||l.skip();},part:["nps",n]},r),{css:a({},a(p(a({},!l||l.getCurrentStepIndex()==0?{".fr-form-step-footer":{display:"none"}}:{}),{".fr-form":{padding:"20px","@media (min-width: 660px)":{minWidth:"600px"},minWidth:"100%"},".fr-form-step":{gap:"14px","@media (min-width: 660px)":{gap:"1"}}}),(d=r.css)!=null?d:{}))}))}function xr(e,o,t){let[n,r]=Eo.useState(!1),i=Eo.useRef();return Eo.useEffect(()=>{i.current=typeof o=="string"?document.querySelector(o):o,r(!0);},[]),n?reactDom.createPortal(e,i.current,t):null}function hr({children:e,container:o="body"}){return e!=null?xr(e,o):null}function qi(i,r){var s=i,{children:e,part:o,opacity:t=.5}=s,n=f(s,["children","part","opacity"]);let l=react.keyframes`
79
+ `,yi=()=>jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function xi({checked:e=!1}){return jsxRuntime.jsx(y,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"22px",width:"22px",children:e&&jsxRuntime.jsx(y,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"field-radio-indicator",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(yi,{})})})}function Ho({children:e}){return jsxRuntime.jsx(De__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(C.Column,{css:{'&[data-state="open"]':{animation:`${fi} 300ms ease-out`},'&[data-state="closed"]':{animation:`${gi} 300ms ease-out`},overflow:"hidden"},gap:5,part:"collapsible-content",children:[jsxRuntime.jsx(y,{}),e]})})}function $o(i){var s=i,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:n=!1}=s,r=f(s,["children","disabled","onOpenChange","open"]);return jsxRuntime.jsx(De__namespace.Root,{asChild:!0,disabled:o,open:n,onOpenChange:t,children:jsxRuntime.jsx(x,p(a({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,part:"collapsible-step"},r),{children:e}))})}function Ao({isCompleted:e,isBlocked:o,title:t}){return jsxRuntime.jsx(De__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(C.Row,{alignItems:"center",justifyContent:"space-between",margin:-5,padding:5,zIndex:1,opacity:o?.4:1,disabled:o,pointerEvents:o?"none":"auto",cursor:o?"not-allowed":"pointer",part:"collapsible-header",children:[jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(xi,{checked:e}),jsxRuntime.jsx(R.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:t})]}),jsxRuntime.jsx(y,{as:qt,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var Yt=Eo.createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function Qt({handlePrimary:e,handleSecondary:o,open:t,onOpenChange:n,step:r}){var P,T,B,S,w,v;let{$state:{blocked:i,completed:s,skipped:l},subtitle:d,title:u}=r,m=(T=(P=r.primaryButton)==null?void 0:P.title)!=null?T:r.primaryButtonTitle,g=(S=(B=r.secondaryButton)==null?void 0:B.title)!=null?S:r.secondaryButtonTitle,b=(w=r.props)!=null?w:{},h=!!i;return jsxRuntime.jsxs($o,p(a({open:t,onOpenChange:n},b),{children:[jsxRuntime.jsx(Ao,{isBlocked:r.$state.blocked,isCompleted:s||l,title:u}),jsxRuntime.jsxs(Ho,{children:[jsxRuntime.jsx(x.Media,{aspectRatio:2.5,objectFit:"cover",overflowClipMargin:"unset",src:(v=r.videoUri)!=null?v:r.imageUri,transform:"translate3d(0, 0, 1px)",type:r.videoUri?"video":"image"}),jsxRuntime.jsx(x.Subtitle,{color:"neutral.400",children:d}),jsxRuntime.jsxs(C.Row,{gap:3,part:"collapsible-footer",children:[jsxRuntime.jsx(x.Secondary,{title:g,onClick:o}),jsxRuntime.jsx(x.Primary,{disabled:h,title:m,onClick:e})]})]})]}))}var Ci={default:Qt};function Si(n){var r=n,{flow:e,step:o}=r,t=f(r,["flow","step"]);var T;let{onPrimary:i,onSecondary:s,openStepId:l,setOpenStepId:d,stepTypes:u}=Eo.useContext(Yt),{handlePrimary:m,handleSecondary:g}=ue(o,{onPrimary:i,onSecondary:s}),b=(l!=null?l:e.getCurrentStep().id)===o.id,h=(T=u[o.type])!=null?T:Qt;function P(B){return W(this,null,function*(){d(B?o.id:""),B&&!o.$state.completed&&(yield o.start(),d(null));})}return jsxRuntime.jsx(h,p(a({flow:e,onOpenChange:P,open:b,step:o},t),{handlePrimary:m,handleSecondary:g}),o.id)}function ro(l){var d=l,{dismissible:e,flowId:o,onPrimary:t,onSecondary:n,part:r,stepTypes:i={}}=d,s=f(d,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[u,m]=Eo.useState(null),g=a(a({},Ci),i);return jsxRuntime.jsx(Yt.Provider,{value:{openStepId:u,setOpenStepId:m,onPrimary:t,onSecondary:n,stepTypes:g},children:jsxRuntime.jsx(U,p(a({as:x,borderWidth:"md",flowId:o,part:["checklist",r]},s),{children:T=>{var B=T,{flow:b,handleDismiss:h}=B,P=f(B,["flow","handleDismiss"]);let w=Array.from(b.steps.entries()).filter(([,O])=>O.$state.visible===!0).map(([,O])=>jsxRuntime.jsx(Si,p(a({flow:b,handleDismiss:h},P),{step:O}),O.id)),v=b.getNumberOfCompletedSteps(),F=b.getNumberOfAvailableSteps();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(C.Column,{gap:2,children:[jsxRuntime.jsx(x.Header,{dismissible:e,handleDismiss:h,part:"checklist-header",subtitle:b.subtitle,title:b.title}),jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsxs(R.Body2,{fontWeight:"demibold",children:[v,"/",F]}),jsxRuntime.jsx(ke,{current:v,total:F,flexGrow:1})]})]}),w]})}}))})}var Oi=new Set(["required","min","max","minLength","maxLength","pattern"]);function Di({fieldComponent:e,control:o,fieldData:t,submit:n}){let r=reactHookForm.useFormContext();t.pattern!=null&&(typeof t.pattern=="string"?t.pattern=new RegExp(t.pattern.replace(/^\/|\/$/g,"")):typeof t.pattern=="object"&&typeof t.pattern.value=="string"&&(t.pattern.value=new RegExp(t.pattern.value.replace(/^\/|\/$/g,""))));let i=Object.fromEntries(Object.entries(t).filter(([l])=>Oi.has(l))),s=reactHookForm.useController({name:t.id,control:o,rules:i});return jsxRuntime.jsx(e,p(a({},s),{fieldData:t,formContext:r,submit:n}))}function or({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:n,parentProps:{dismissible:r},step:i}){var v,F,O,D,M;let{__readOnly:s}=Eo.useContext(L),l=Eo.useMemo(()=>{var k,I;return (I=(k=i.fields)==null?void 0:k.filter(A=>e[A.type]!=null&&A.id))!=null?I:[]},[i.fields,e]),d=reactHookForm.useForm({delayError:2e3,mode:"onChange",defaultValues:l.reduce((k,I)=>{var A;return k[I.id]=(A=I.value)!=null?A:"",k},{})});Eo.useEffect(()=>{d.formState.isDirty||d.reset(l.reduce((k,I)=>{var A;return k[I.id]=(A=I.value)!=null?A:"",k},{}));},[l]),Eo.useEffect(()=>{Object.keys(d.formState.dirtyFields).some(k=>l.some(I=>I.id===k))&&d.trigger();},[i.id]);let[u,m]=Eo.useState(!1),g=[],{control:b,handleSubmit:h}=d,P=(v=i.props)!=null?v:{};function T(k,I){m(!0),t(I,k,s===!0).then(()=>m(!1));}l.forEach(k=>{e[k.type]!=null&&g.push(jsxRuntime.jsx(Di,{control:b,fieldComponent:e[k.type],fieldData:k,submit:h(T)},`${i.flow.id}-${k.id}`));});let B=(O=(F=i.primaryButton)==null?void 0:F.title)!=null?O:i.primaryButtonTitle,S=(M=(D=i.secondaryButton)==null?void 0:D.title)!=null?M:i.secondaryButtonTitle,w=!!(i.$state.blocked||!d.formState.isValid);return Eo.useEffect(()=>{d.clearErrors();},[i]),jsxRuntime.jsxs(C.Column,p(a({gap:5,part:"form-step"},P),{children:[jsxRuntime.jsx(x.Header,{dismissible:r,handleDismiss:o,part:"form-step-header",subtitle:i.subtitle,title:i.title}),jsxRuntime.jsx(reactHookForm.FormProvider,p(a({},d),{children:g})),jsxRuntime.jsxs(C.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[S&&jsxRuntime.jsx(H.Secondary,{onClick:n,title:S}),jsxRuntime.jsx(H.Primary,{disabled:w||u,onClick:h(T),title:B!=null?B:"Submit",loading:u})]},`form-footer-${i.id}`)]}))}function tr({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.length?jsxRuntime.jsx(R.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function Wo({children:e,id:o,required:t=!1}){return jsxRuntime.jsxs(R.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsxRuntime.jsx(y,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Vo={backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md"},_e=p(a({},Vo),{px:"4",py:"2",display:"block",outline:"none",width:"100%"}),io={alignItems:"center",bg:"primary.surface",borderWidth:"md",borderStyle:"solid",borderColor:"primary.border",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",position:"absolute",top:"-1px",width:"calc(100% + 2px)",color:"primary.foreground"};function te({children:e,field:o,fieldData:t,fieldState:n}){var m;let{id:r,label:i,placeholder:s,props:l}=t,{error:d}=n,u=a(p(a(a(a({id:r},o),s?{placeholder:s}:{}),_e),{"aria-invalid":!!d,value:(m=o.value)!=null?m:""}),l);return jsxRuntime.jsxs(y,{part:"field",children:[jsxRuntime.jsx(Wo,{id:r,required:!!t.required,children:i}),e(u),jsxRuntime.jsx(tr,{error:d})]})}function He(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"})}))}var Mi=Eo__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsxs(y,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:o,justifyContent:"space-between",part:"field-radio",px:4,py:2,children:[jsxRuntime.jsx(R.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx($e__namespace.Item,{id:o,value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(y,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",flex:"0 0 auto",padding:"0",part:"field-radio-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(y,p(a({as:$e__namespace.Indicator},io),{children:jsxRuntime.jsx(He,{height:"14",width:"14"})}))})})]}));function Lo(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,r=n.map(({label:i,value:s})=>jsxRuntime.jsx(Mi,{value:s,label:i},s));return jsxRuntime.jsx(te,p(a({},e),{children:()=>jsxRuntime.jsx($e__namespace.Root,{value:t,onValueChange:o,asChild:!0,children:jsxRuntime.jsx(C.Column,{gap:2,part:"field-radio-group",children:r})})}))}function ao(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}))}function lr(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,[r,i]=Eo__namespace.useState([]);function s(l){let d=[];r.includes(l)?d=[...r.filter(u=>u!==l)]:d=[...r,l],i(d),o(d);}return jsxRuntime.jsx(te,p(a({},e),{children:()=>jsxRuntime.jsx(C.Column,{gap:2,part:"field-select-multiple",children:n.map(({label:l,value:d})=>jsxRuntime.jsx(so__namespace.Root,{value:r.includes(d)?d:void 0,onCheckedChange:()=>s(d),asChild:!0,children:jsxRuntime.jsxs(y,{as:"button",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",justifyContent:"space-between",part:"field-check",px:4,py:2,children:[jsxRuntime.jsx(R.Body2,{part:"field-check-label",children:l}),jsxRuntime.jsx(y,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",flex:"0 0 auto",id:d,padding:"0",part:"field-check-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(so__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,p(a({},io),{children:jsxRuntime.jsx(He,{height:"14",width:"14"})}))})})]})},d))})}))}var Li=Eo__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsx(z__namespace.Item,{value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(y,{"backgroundColor:hover":"neutral.900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsxRuntime.jsx(z__namespace.ItemText,{asChild:!0,children:jsxRuntime.jsx(R.Body2,{part:"field-select-option-label",children:e})})})}));function No(e){let{field:{onChange:o,value:t},fieldData:{options:n=[],placeholder:r}}=e,i=n.map(({label:s,value:l})=>jsxRuntime.jsx(Li,{value:l,label:s},l));return e.fieldData.multiple?jsxRuntime.jsx(lr,a({},e)):jsxRuntime.jsx(te,p(a({},e),{children:()=>jsxRuntime.jsxs(z__namespace.Root,{value:t,onValueChange:o,children:[jsxRuntime.jsx(z__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(R.Body2,p(a({},_e),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsxRuntime.jsx(z__namespace.Value,{placeholder:r!=null?r:"Select one"}),jsxRuntime.jsx(z__namespace.Icon,{children:jsxRuntime.jsx(y,{as:ao,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsxRuntime.jsx(z__namespace.Portal,{children:jsxRuntime.jsx(z__namespace.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsxRuntime.jsx(y,p(a({},_e),{boxShadow:"md",maxHeight:"var(--radix-select-content-available-height)",p:"1",part:"field-select-options",width:"var(--radix-popper-anchor-width)",zIndex:"99999",children:jsxRuntime.jsx(z__namespace.Viewport,{children:i})}))})})]})}))}function zo(e){return jsxRuntime.jsx(te,p(a({},e),{children:o=>jsxRuntime.jsx(R.Body2,a({as:"input",part:"field-text",type:"text"},o))}))}function _o(e){return jsxRuntime.jsx(te,p(a({},e),{children:o=>jsxRuntime.jsx(R.Body2,a({as:"textarea",part:"field-textarea"},o))}))}function mr(e){let{field:{onChange:o,value:t},fieldData:{options:n,label:r,id:i=[]}}=e;return jsxRuntime.jsxs(y,{part:"field",display:"flex",gap:2,alignItems:"center",children:[jsxRuntime.jsx(so__namespace.Root,{defaultChecked:!0,onCheckedChange:o,value:t,checked:t===!0,asChild:!0,children:jsxRuntime.jsx(y,p(a({},Vo),{as:"button",width:"25px",minWidth:"25px",height:"25px",justifyContent:"center",alignItems:"center",display:"flex","backgroundColor:hover":"neutral.900",part:"field-checkbox",id:i,children:jsxRuntime.jsx(so__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",children:jsxRuntime.jsx(He,{height:"14",fill:"currentColor"})})})}))}),jsxRuntime.jsx(R.Body2,{part:"field-checkbox-label",as:"label",htmlFor:i,children:r})]})}var zi={checkbox:mr,radio:Lo,select:No,text:zo,textarea:_o};function Me(r){var i=r,{fieldTypes:e={},flowId:o,part:t}=i,n=f(i,["fieldTypes","flowId","part"]);let s=Object.assign({},zi,e);return jsxRuntime.jsx(U,p(a({flowId:o,part:["form",t]},n),{children:l=>jsxRuntime.jsx(or,a({fieldTypes:s},l))}))}var co={};pe(co,{NPS:()=>Ge});function yr({field:e,fieldData:o,submit:t}){var r,i;let n=[...Array(11)].map((s,l)=>{let d=e.value===l?H.Primary:H.Secondary;return jsxRuntime.jsx(d,{borderWidth:"1px",onClick:()=>{e.onChange(l),t();},title:`${l}`,css:{".fr-button-title":{fontSize:"15px"}}},l)});return jsxRuntime.jsxs(C.Column,{gap:2,children:[jsxRuntime.jsx(C.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:n}),jsxRuntime.jsxs(C.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsxRuntime.jsx(R.Caption,{part:"field-nps-left-label",color:"neutral.400",children:(r=o.negativeLabel)!=null?r:"Not likely at all"}),jsxRuntime.jsx(R.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(i=o.positiveLabel)!=null?i:"Extremely likely"})]})]})}function Ge(i){var s=i,{as:e=$,flowId:o,fieldTypes:t,part:n}=s,r=f(s,["as","flowId","fieldTypes","part"]);var d;let{flow:l}=Fe(o);return jsxRuntime.jsx(Me,p(a({alignSelf:"end",as:e,flowId:o,fieldTypes:a({nps:yr},t),modal:!1,onEscapeKeyDown:u=>{typeof r.onEscapeKeyDown=="function"&&r.onEscapeKeyDown(u),u.defaultPrevented||l.skip();},part:["nps",n]},r),{css:a({},a(p(a({},!l||l.getCurrentStepIndex()==0?{".fr-form-step-footer":{display:"none"}}:{}),{".fr-form":{padding:"20px","@media (min-width: 660px)":{minWidth:"600px"},minWidth:"100%"},".fr-form-step":{gap:"14px","@media (min-width: 660px)":{gap:"1"}}}),(d=r.css)!=null?d:{}))}))}function xr(e,o,t){let[n,r]=Eo.useState(!1),i=Eo.useRef();return Eo.useEffect(()=>{i.current=typeof o=="string"?document.querySelector(o):o,r(!0);},[]),n?reactDom.createPortal(e,i.current,t):null}function hr({children:e,container:o="body"}){return e!=null?xr(e,o):null}function qi(i,r){var s=i,{children:e,part:o,opacity:t=.5}=s,n=f(s,["children","part","opacity"]);let l=react.keyframes`
80
80
  from {
81
81
  opacity: 0;
82
82
  }
83
83
  to {
84
84
  opacity: ${t}
85
85
  }
86
- `;return jsxRuntime.jsx(reactRemoveScroll.RemoveScroll,{forwardProps:!0,ref:r,children:jsxRuntime.jsx(y,p(a({animation:`${l} 300ms ease-out`,backgroundColor:"black",inset:"0",opacity:"0.5",part:["overlay",o],position:"fixed"},n),{children:e}))})}var uo=Eo__namespace.forwardRef(qi);var ea=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function Sr(r){var i=r,{clickable:e=!1,part:o="",style:t={}}=i,n=f(i,["clickable","part","style"]);let[s,l]=Eo.useState(!1);return Eo.useEffect(()=>{l(!0);},[]),jsxRuntime.jsxs(y,p(a({borderRadius:"24px",height:"24px",part:`ping-wrapper ${o}`,position:"relative",width:"24px",cursor:e?"pointer":void 0,style:a({opacity:s?1:0},t),transition:"opacity 0.2s ease-out"},n),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",animation:`2s ease-out infinite ${ea}`,borderRadius:"24px",height:"48px",left:"-12px",part:"ping-pulse",pointerEvents:"none",position:"absolute",top:"-12px",transformOrigin:"center center",width:"48px"}),jsxRuntime.jsx(y,{backgroundColor:"primary.surface",borderRadius:"12px",height:"24px",left:"0",part:"ping",position:"absolute",top:"0",width:"24px","backgroundColor:hover":e?"primary.hover.surface":void 0})]}))}function aa({maxX:e,maxY:o,radius:t,x1:n,x2:r,y1:i,y2:s}){return t>0?`path("${[`M${n+t},${i}`,`H${r-t}`,`A${t} ${t} 0,0,1 ${r} ${i+t}`,`V${s-t}`,`A${t} ${t} 0,0,1 ${r-t} ${s}`,`H${n+t}`,`A${t} ${t} 0,0,1 ${n} ${s-t}`,`V${o}`,`H${e}`,"V0","H0",`V${o}`,`H${n}`,`V${i+t}`,`A${t} ${t} 0,0,1 ${n+t} ${i}`,"Z"].join(" ")}")`:`path("M${n},${i} H${r} V${s} H${n} V${o} H${e} V0 H0 V${o} H${n} Z")`}function sa(e){if(!window||!("nodeType"in e))return 0;let o=Number(window.getComputedStyle(e).borderRadius.replace(/\D/g,""));return Number.isNaN(o)?0:o}function _o(r){var i=r,{anchor:e,part:o,style:t={}}=i,n=f(i,["anchor","part","style"]);let[s,l]=Eo.useState({maxX:0,maxY:0,radius:0,x1:0,x2:0,y1:0,y2:0}),{refs:d}=react$1.useFloating({middleware:[{name:"clipPath",fn({elements:u,rects:m}){return l({maxX:u.floating.clientWidth,maxY:u.floating.clientHeight,radius:sa(u.reference),x1:m.reference.x,x2:m.reference.x+m.reference.width,y1:m.reference.y,y2:m.reference.y+m.reference.height}),{}}}],open:!0,placement:"top-center",transform:!1,whileElementsMounted:react$1.autoUpdate});return Eo.useEffect(()=>{try{let u=document.querySelector(e);u!=null?d.setReference(u):console.debug(`[frigade] Spotlight: No anchor found for selector: ${e}`);}catch(u){}},[e]),jsxRuntime.jsx(uo,a({part:["spotlight",o],ref:d.setFloating,style:a({clipPath:aa(s)},t)},n))}function wr({align:e,side:o}){let t={},n="-12px",r={top:"bottom",right:"left",bottom:"top",left:"right"};return t[r[o]]=n,["before","end"].includes(e)?["top","bottom"].includes(o)?t.right=n:t.bottom=n:["after","start"].includes(e)?["top","bottom"].includes(o)?t.left=n:t.top=n:["top","bottom"].includes(o)?t.left=`calc(50% + ${n})`:t.top=`calc(50% + ${n})`,t}function vr(e,o){try{if(e.matches(o)&&Rr(e))return e;let t=e.querySelectorAll(o);if(t.length>0&&Rr(t[0]))return t[0]}catch(t){return null}}function Rr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function Tr(e){let[o,t]=Eo.useState(null);return Eo.useEffect(()=>{try{let n=document.querySelector(e);n!=null&&t(n);}catch(n){}},[e]),Eo.useEffect(()=>{let n=new MutationObserver(r=>{for(let i of r)if(i.type==="childList"){for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let l=vr(s,e);if(l!=null){t(l);break}}for(let s of i.removedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;if(vr(s,e)!=null){t(null);break}}}});return n.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>n.disconnect()},[e]),{anchorElement:o}}function Ca(e){switch(e){case"after":return "end";case"before":return "start";default:return e}}function Br({align:e,alignOffset:o,anchor:t,onOpenChange:n=()=>{},open:r,side:i,sideOffset:s}){let l=`${i}-${Ca(e)}`;function d({rects:O}){let D={alignmentAxis:o,mainAxis:s};return ["after","before"].includes(e)&&(["bottom","top"].includes(i)?D.alignmentAxis=o-O.floating.width:D.alignmentAxis=o-O.floating.height),D}let{context:u,floatingStyles:m,placement:g,refs:b}=react$1.useFloating({middleware:[react$1.offset(d,[e,o,i,s]),react$1.flip(),react$1.shift()],onOpenChange:n,open:r,placement:l,whileElementsMounted:react$1.autoUpdate}),h=react$1.useClick(u),P=react$1.useDismiss(u,{outsidePress:!1}),T=react$1.useRole(u),B=react$1.useTransitionStatus(u),{getFloatingProps:S,getReferenceProps:w}=react$1.useInteractions([h,P,T]),{anchorElement:v}=Tr(t);Eo.useEffect(()=>{v!=null?b.setReference(v):console.debug(`[frigade] Hint: No anchor found for selector: ${t}`);},[v]);let F=g.split("-");return e==="before"?F[1]=F[1]==="end"?"after":"before":e==="after"&&(F[1]=F[1]==="start"?"before":"after"),{context:u,getFloatingProps:S,getReferenceProps:w,floatingStyles:m,placement:F.join("-"),refs:b,status:B}}var Uo={height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}};function mo(){let e="DOMRect"in globalThis?new DOMRect:Uo,[o,t]=Eo.useState(e),[n,r]=Eo.useState(null),i=Eo.useCallback(s=>{r(s);},[]);return Eo.useLayoutEffect(()=>{if(!n)return;let s=()=>{let l=n.getBoundingClientRect();t(l);};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n]),{node:n,rect:o,ref:i}}function Or(e){let[o,t]=Eo.useState(!1),[n,r]=Eo.useState(Uo),i=n.height>0&&n.width>0;return Eo.useEffect(()=>{if(e==null)return;let s=new IntersectionObserver(l=>{let d=l[0];r(d.boundingClientRect),t(d.isIntersecting);},{root:null});return s.observe(e),()=>{s.disconnect();}},[e]),{isVisible:o&&i}}function Ko(B){var S=B,{align:e="center",alignOffset:o=0,anchor:t,autoScroll:n=!1,children:r,css:i={},defaultOpen:s=!0,modal:l=!1,onOpenChange:d=()=>{},open:u,part:m,side:g="bottom",sideOffset:b=0,spotlight:h=!1,style:P={}}=S,T=f(S,["align","alignOffset","anchor","autoScroll","children","css","defaultOpen","modal","onOpenChange","open","part","side","sideOffset","spotlight","style"]);let[w,v]=Eo.useState(s),[F,O]=Eo.useState(!1),D=u!=null?u:w,{getFloatingProps:M,getReferenceProps:k,floatingStyles:H,placement:A,refs:J,status:Re}=Br({align:e,alignOffset:o,anchor:t,onOpenChange:Y=>{d(Y),u==null&&v(Y);},open:D,side:g,sideOffset:b}),[Te,j]=A.split("-"),re=k(),{isVisible:se}=Or(J.reference.current);return Eo.useEffect(()=>{if(!F&&n&&J.reference.current instanceof Element){let Y=typeof n!="boolean"?n:{behavior:"smooth",block:"center"},N;window.addEventListener("scroll",function Q(){clearTimeout(N),N=setTimeout(()=>{window.removeEventListener("scroll",Q),O(!0);},100);},!0),J.reference.current.scrollIntoView(Y);}else n||O(!0);},[n,J.reference.current]),J.reference.current==null||!F||!se?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[h&&D&&jsxRuntime.jsx(_o,{anchor:t}),l&&!h&&D&&jsxRuntime.jsx(uo,{lockScroll:!0}),jsxRuntime.jsxs(y,p(a(a({css:a({'&[data-status="open"]':{transition:"transform 0.2s ease-out"}},i),"data-placement":A,"data-status":Re.status,part:["hint",m],ref:J.setFloating,style:a(a({},H),P)},M()),T),{children:[D&&r,jsxRuntime.jsx(Sr,p(a({},re),{position:"absolute",style:wr({align:j,side:Te}),clickable:s===!1}))]}))]})}var Ba=react.keyframes`
86
+ `;return jsxRuntime.jsx(reactRemoveScroll.RemoveScroll,{forwardProps:!0,ref:r,children:jsxRuntime.jsx(y,p(a({animation:`${l} 300ms ease-out`,backgroundColor:"black",inset:"0",opacity:"0.5",part:["overlay",o],position:"fixed"},n),{children:e}))})}var uo=Eo__namespace.forwardRef(qi);var ea=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function Sr(r){var i=r,{clickable:e=!1,part:o="",style:t={}}=i,n=f(i,["clickable","part","style"]);let[s,l]=Eo.useState(!1);return Eo.useEffect(()=>{l(!0);},[]),jsxRuntime.jsxs(y,p(a({borderRadius:"24px",height:"24px",part:`ping-wrapper ${o}`,position:"relative",width:"24px",cursor:e?"pointer":void 0,style:a({opacity:s?1:0},t),transition:"opacity 0.2s ease-out"},n),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",animation:`2s ease-out infinite ${ea}`,borderRadius:"24px",height:"48px",left:"-12px",part:"ping-pulse",pointerEvents:"none",position:"absolute",top:"-12px",transformOrigin:"center center",width:"48px"}),jsxRuntime.jsx(y,{backgroundColor:"primary.surface",borderRadius:"12px",height:"24px",left:"0",part:"ping",position:"absolute",top:"0",width:"24px","backgroundColor:hover":e?"primary.hover.surface":void 0})]}))}function aa({maxX:e,maxY:o,radius:t,x1:n,x2:r,y1:i,y2:s}){return t>0?`path("${[`M${n+t},${i}`,`H${r-t}`,`A${t} ${t} 0,0,1 ${r} ${i+t}`,`V${s-t}`,`A${t} ${t} 0,0,1 ${r-t} ${s}`,`H${n+t}`,`A${t} ${t} 0,0,1 ${n} ${s-t}`,`V${o}`,`H${e}`,"V0","H0",`V${o}`,`H${n}`,`V${i+t}`,`A${t} ${t} 0,0,1 ${n+t} ${i}`,"Z"].join(" ")}")`:`path("M${n},${i} H${r} V${s} H${n} V${o} H${e} V0 H0 V${o} H${n} Z")`}function sa(e){if(!window||!("nodeType"in e))return 0;let o=Number(window.getComputedStyle(e).borderRadius.replace(/\D/g,""));return Number.isNaN(o)?0:o}function Uo(r){var i=r,{anchor:e,part:o,style:t={}}=i,n=f(i,["anchor","part","style"]);let[s,l]=Eo.useState({maxX:0,maxY:0,radius:0,x1:0,x2:0,y1:0,y2:0}),{refs:d}=react$1.useFloating({middleware:[{name:"clipPath",fn({elements:u,rects:m}){return l({maxX:u.floating.clientWidth,maxY:u.floating.clientHeight,radius:sa(u.reference),x1:m.reference.x,x2:m.reference.x+m.reference.width,y1:m.reference.y,y2:m.reference.y+m.reference.height}),{}}}],open:!0,placement:"top-center",transform:!1,whileElementsMounted:react$1.autoUpdate});return Eo.useEffect(()=>{try{let u=document.querySelector(e);u!=null?d.setReference(u):console.debug(`[frigade] Spotlight: No anchor found for selector: ${e}`);}catch(u){}},[e]),jsxRuntime.jsx(uo,a({part:["spotlight",o],ref:d.setFloating,style:a({clipPath:aa(s)},t)},n))}function wr({align:e,side:o}){let t={},n="-12px",r={top:"bottom",right:"left",bottom:"top",left:"right"};return t[r[o]]=n,["before","end"].includes(e)?["top","bottom"].includes(o)?t.right=n:t.bottom=n:["after","start"].includes(e)?["top","bottom"].includes(o)?t.left=n:t.top=n:["top","bottom"].includes(o)?t.left=`calc(50% + ${n})`:t.top=`calc(50% + ${n})`,t}function vr(e,o){try{if(e.matches(o)&&Rr(e))return e;let t=e.querySelectorAll(o);if(t.length>0&&Rr(t[0]))return t[0]}catch(t){return null}}function Rr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function Tr(e){let[o,t]=Eo.useState(null);return Eo.useEffect(()=>{try{let n=document.querySelector(e);n!=null&&t(n);}catch(n){}},[e]),Eo.useEffect(()=>{let n=new MutationObserver(r=>{for(let i of r)if(i.type==="childList"){for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let l=vr(s,e);if(l!=null){t(l);break}}for(let s of i.removedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;if(vr(s,e)!=null){t(null);break}}}});return n.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>n.disconnect()},[e]),{anchorElement:o}}function Ca(e){switch(e){case"after":return "end";case"before":return "start";default:return e}}function Br({align:e,alignOffset:o,anchor:t,onOpenChange:n=()=>{},open:r,side:i,sideOffset:s}){let l=`${i}-${Ca(e)}`;function d({rects:O}){let D={alignmentAxis:o,mainAxis:s};return ["after","before"].includes(e)&&(["bottom","top"].includes(i)?D.alignmentAxis=o-O.floating.width:D.alignmentAxis=o-O.floating.height),D}let{context:u,floatingStyles:m,placement:g,refs:b}=react$1.useFloating({middleware:[react$1.offset(d,[e,o,i,s]),react$1.flip(),react$1.shift()],onOpenChange:n,open:r,placement:l,whileElementsMounted:react$1.autoUpdate}),h=react$1.useClick(u),P=react$1.useDismiss(u,{outsidePress:!1}),T=react$1.useRole(u),B=react$1.useTransitionStatus(u),{getFloatingProps:S,getReferenceProps:w}=react$1.useInteractions([h,P,T]),{anchorElement:v}=Tr(t);Eo.useEffect(()=>{v!=null?b.setReference(v):console.debug(`[frigade] Hint: No anchor found for selector: ${t}`);},[v]);let F=g.split("-");return e==="before"?F[1]=F[1]==="end"?"after":"before":e==="after"&&(F[1]=F[1]==="start"?"before":"after"),{context:u,getFloatingProps:S,getReferenceProps:w,floatingStyles:m,placement:F.join("-"),refs:b,status:B}}var Go={height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}};function mo(){let e="DOMRect"in globalThis?new DOMRect:Go,[o,t]=Eo.useState(e),[n,r]=Eo.useState(null),i=Eo.useCallback(s=>{r(s);},[]);return Eo.useLayoutEffect(()=>{if(!n)return;let s=()=>{let l=n.getBoundingClientRect();t(l);};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n]),{node:n,rect:o,ref:i}}function Or(e){let[o,t]=Eo.useState(!1),[n,r]=Eo.useState(Go),i=n.height>0&&n.width>0;return Eo.useEffect(()=>{if(e==null)return;let s=new IntersectionObserver(l=>{let d=l[0];r(d.boundingClientRect),t(d.isIntersecting);},{root:null});return s.observe(e),()=>{s.disconnect();}},[e]),{isVisible:o&&i}}function jo(B){var S=B,{align:e="center",alignOffset:o=0,anchor:t,autoScroll:n=!1,children:r,css:i={},defaultOpen:s=!0,modal:l=!1,onOpenChange:d=()=>{},open:u,part:m,side:g="bottom",sideOffset:b=0,spotlight:h=!1,style:P={}}=S,T=f(S,["align","alignOffset","anchor","autoScroll","children","css","defaultOpen","modal","onOpenChange","open","part","side","sideOffset","spotlight","style"]);let[w,v]=Eo.useState(s),[F,O]=Eo.useState(!1),D=u!=null?u:w,{getFloatingProps:M,getReferenceProps:k,floatingStyles:I,placement:A,refs:J,status:Re}=Br({align:e,alignOffset:o,anchor:t,onOpenChange:Y=>{d(Y),u==null&&v(Y);},open:D,side:g,sideOffset:b}),[Te,j]=A.split("-"),re=k(),{isVisible:se}=Or(J.reference.current);return Eo.useEffect(()=>{if(!F&&n&&J.reference.current instanceof Element){let Y=typeof n!="boolean"?n:{behavior:"smooth",block:"center"},N;window.addEventListener("scroll",function Q(){clearTimeout(N),N=setTimeout(()=>{window.removeEventListener("scroll",Q),O(!0);},100);},!0),J.reference.current.scrollIntoView(Y);}else n||O(!0);},[n,J.reference.current]),J.reference.current==null||!F||!se?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[h&&D&&jsxRuntime.jsx(Uo,{anchor:t}),l&&!h&&D&&jsxRuntime.jsx(uo,{lockScroll:!0}),jsxRuntime.jsxs(y,p(a(a({css:a({'&[data-status="open"]':{transition:"transform 0.2s ease-out"}},i),"data-placement":A,"data-status":Re.status,part:["hint",m],ref:J.setFloating,style:a(a({},I),P)},M()),T),{children:[D&&r,jsxRuntime.jsx(Sr,p(a({},re),{position:"absolute",style:wr({align:j,side:Te}),clickable:s===!1}))]}))]})}var Ba=react.keyframes`
87
87
  from {
88
88
  opacity: 0;
89
89
  }
@@ -93,7 +93,7 @@ var it=Object.defineProperty,an=Object.defineProperties;var sn=Object.getOwnProp
93
93
  to {
94
94
  opacity: 1;
95
95
  }
96
- `;function fo(B){var S=B,{align:e,alignOffset:o,autoScroll:t,defaultOpen:n,dismissible:r,flow:i,handleDismiss:s,modal:l,onPrimary:d,onSecondary:u,part:m,side:g,sideOffset:b,spotlight:h,step:P}=S,T=f(S,["align","alignOffset","autoScroll","defaultOpen","dismissible","flow","handleDismiss","modal","onPrimary","onSecondary","part","side","sideOffset","spotlight","step"]);var M,k,H,A,J;let{handlePrimary:w,handleSecondary:v}=ue(P,{onPrimary:d,onSecondary:u}),F=(k=(M=P.primaryButton)==null?void 0:M.title)!=null?k:P.primaryButtonTitle,O=(A=(H=P.secondaryButton)==null?void 0:H.title)!=null?A:P.secondaryButtonTitle,D=!!P.$state.blocked;return jsxRuntime.jsx(Ko,p(a({align:e,alignOffset:o,anchor:P.selector,autoScroll:t,"data-step-id":P.id,defaultOpen:n,modal:l,part:m,side:g,sideOffset:b,spotlight:h},T),{children:jsxRuntime.jsxs(x,{animation:`${Ba} 300ms ease-out`,boxShadow:"md",maxWidth:"min(360px, calc(100vw - 25px))",children:[jsxRuntime.jsx(x.Media,{aspectRatio:"2",borderRadius:"md md 0 0",borderWidth:"0",margin:"-5 -5 0",objectFit:"cover",overflowClipMargin:"unset",src:(J=P.videoUri)!=null?J:P.imageUri,transform:"translate3d(0, 0, 1px)",type:P.videoUri?"video":"image"}),jsxRuntime.jsx(x.Header,{css:{".fr-dismiss":{position:"absolute",right:"12px",top:"12px"}},dismissible:r,handleDismiss:s,subtitle:P.subtitle,title:P.title}),jsxRuntime.jsxs(x.Footer,{children:[i.getNumberOfAvailableSteps()>1&&jsxRuntime.jsx(Ee,{current:i.getCurrentStepOrder()+1,marginRight:"auto",total:i.getNumberOfAvailableSteps()}),jsxRuntime.jsx(x.Secondary,{disabled:D,onClick:v,title:O}),jsxRuntime.jsx(x.Primary,{disabled:D,onClick:w,title:F})]})]})}))}function $r(r){var i=r,{children:e,container:o,flowId:t}=i,n=f(i,["children","container","flowId"]);return jsxRuntime.jsx(hr,{container:o,children:jsxRuntime.jsx(y,p(a({"data-flow-id":t,part:"tour"},n),{children:e}))})}function go(n){var r=n,{as:e,flowId:o}=r,t=f(r,["as","flowId"]);let{onDismiss:i,onPrimary:s,onSecondary:l}=t;return jsxRuntime.jsx(U,p(a({as:null,flowId:o},t),{children:({flow:d,handleDismiss:u,parentProps:m,step:g})=>{var Te;let Re=m.containerProps,{align:b="after",alignOffset:h=0,autoScroll:P=!1,container:T="body",defaultOpen:B,dismissible:S=!1,modal:w,part:v,sequential:F=!0,side:O="bottom",sideOffset:D=0,spotlight:M,zIndex:k=9999}=Re,H=f(Re,["align","alignOffset","autoScroll","container","defaultOpen","dismissible","modal","part","sequential","side","sideOffset","spotlight","zIndex"]),A=a({align:b,alignOffset:h,autoScroll:P,dismissible:S,flow:d,handleDismiss:u,modal:w,onPrimary:s,onSecondary:l,part:v,side:O,sideOffset:D,spotlight:M,step:g,zIndex:k},(Te=g.props)!=null?Te:{});if(F)return jsxRuntime.jsx($r,p(a({as:e,container:T,flowId:o,part:"tour",zIndex:k},H),{children:jsxRuntime.jsx(fo,a({defaultOpen:B!=null?B:!0},A),g.id)}));let J=Array.from(d.steps.values()).filter(j=>{let{blocked:re,completed:se,skipped:Y,visible:N}=j.$state;return !re&&!se&&!Y&&N}).map(j=>{var Q,le,ne,ye;function re(ie){return W(this,null,function*(){return (yield i==null?void 0:i(d,ie))===!1?(ie.preventDefault(),!1):(j.skip(),!0)})}let se=M&&j.id===g.id,Y=(le=(Q=j.props)==null?void 0:Q.zIndex)!=null?le:k,N=a({align:b,alignOffset:h,dismissible:S,flow:d,handleDismiss:re,onPrimary:s,onSecondary:l,part:v,side:O,sideOffset:D,spotlight:M,zIndex:Y},(ne=j.props)!=null?ne:{});return jsxRuntime.jsx(fo,a({css:{"&:has([aria-expanded=true])":{zIndex:Number(Y)+2},".fr-overlay":{zIndex:Number(Y)+1},".fr-progress-fraction":{display:"none"}},defaultOpen:(ye=B||se)!=null?ye:!1,step:j},N),`${j.id}-${se}`)});return jsxRuntime.jsx($r,p(a({as:e,container:T,flowId:o,part:"tour",zIndex:k},H),{children:J}))}}))}function yo(){let{frigade:e}=Eo.useContext(L),[,o]=Eo.useState(!1),t,n=Eo.useCallback(s=>{e==null||e.getCollections().then(()=>{s();});let l=()=>{clearTimeout(t),t=setTimeout(()=>{o(d=>!d),s();},0);};return e==null||e.onStateChange(l),()=>{e==null||e.removeStateChangeHandler(l);}},[]),r=()=>{let s;try{s=e==null?void 0:e.getCollectionsSync();}catch(l){}return s};return {collections:Eo.useSyncExternalStore(n,r,r)}}function xo(e){var l,d,u,m;let{frigade:o}=Eo.useContext(L),{collections:t}=yo(),n=t==null?void 0:t.get(e),i=(m=((u=(d=(l=t==null?void 0:t.get(e))==null?void 0:l.flows)==null?void 0:d.filter(g=>g.visible).map(g=>p(a({},g),{flow:o==null?void 0:o.getFlowSync(g.flowId)})))!=null?u:[]).find(({flow:g})=>g.isVisible))==null?void 0:m.flowId,{flow:s}=Fe(i);return Eo.useEffect(()=>{o==null||o.registerCollection(e);},[e]),{collection:n,currentFlow:s}}function jo(r){var i=r,{collectionId:e,part:o,variables:t={}}=i,n=f(i,["collectionId","part","variables"]);var u,m,g;let s={ANNOUNCEMENT:Xo,BANNER:Oo,CARD:x,CHECKLIST:ro,EMBEDDED_TIP:x,FORM:Me,NPS_SURVEY:Ge,SURVEY:Ge,TOUR:go},{currentFlow:l}=xo(e),d=(m=s[(u=l==null?void 0:l.rawData)==null?void 0:u.flowType])!=null?m:null;return l==null||d==null?null:((g=l==null?void 0:l.rawData)==null?void 0:g.flowType)===js.FlowType.FORM?jsxRuntime.jsx(y,p(a({part:["collection",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(Me,{flowId:l.id,as:$,variables:t},l.id)})):jsxRuntime.jsx(y,p(a({part:["collection",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(d,{flowId:l.id,variables:t},l.id)}))}function Ar(){var t,n;let{collections:e}=yo(),o=(n=Array.from((t=e==null?void 0:e.entries())!=null?t:[]).find(r=>r[1].collectionType==="DEFAULT"))==null?void 0:n[0];return xo(o),o==null?null:jsxRuntime.jsx(jo,{as:null,collectionId:o})}var L=Eo.createContext({apiKey:"",navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{},variables:{}});function Jo(){let{frigade:e}=Eo.useContext(L);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Mr(){let{frigade:e}=Jo();return Eo.useEffect(()=>{W(this,null,function*(){(yield e.getFlows()).forEach(t=>{t.steps.forEach(n=>{if(n.imageUri){let r=new Image;r.src=n.imageUri;}});});});},[]),null}var Wr="2.5.22";function zr(s){var l=s,{children:e,css:o={},defaultCollection:t=!0,navigate:n,theme:r}=l,i=f(l,["children","css","defaultCollection","navigate","theme"]);let d=r?vo(r):{},u=Eo.useRef(new Map),m=Eo.useRef(),[g,b]=Eo.useState(!1),h=Eo.useMemo(()=>(b(!1),m.current=void 0,new js.Frigade(i.apiKey,{apiKey:i.apiKey,apiUrl:i.apiUrl,userId:i.userId,groupId:i.groupId,userProperties:i.userProperties,groupProperties:i.groupProperties,generateGuestId:i.generateGuestId,syncOnWindowUpdates:i.syncOnWindowUpdates,__readOnly:i.__readOnly,__flowStateOverrides:i.__flowStateOverrides,__platformVersion:Wr,__platformName:"React"})),[i.userId,i.groupId,i.apiKey]);Eo.useEffect(()=>{if(i.__flowStateOverrides){let w=h.getConfig();w.__flowStateOverrides=i.__flowStateOverrides,h.reload(w);}},[i.__flowStateOverrides]);function P(){let w=[...u.current.entries()].map(([v,F])=>[v,F.callback]);h.batchRegister(w),b(!0);}function T(w,v){if(m.current&&clearTimeout(m.current),g){u.current.has(w)?h.getFlow(w).then(F=>v(F.isVisible)):(h.getFlow(w).then(F=>F.register(v)),u.current.set(w,{callback:v}));return}u.current.has(w)||u.current.set(w,{callback:v}),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>P(),0);}function B(w){u.current.has(w)&&h.getFlow(w).then(v=>{u.current.delete(w),v==null||v.unregister();});}let S=n!=null?n:(w,v="_self")=>{window.open(w,v);};return Eo.useEffect(()=>()=>{h.destroy();},[]),jsxRuntime.jsxs(L.Provider,{value:p(a({navigate:S},i),{frigade:h,registerComponent:T,unregisterComponent:B,hasInitialized:g,variables:i.variables||{}}),children:[jsxRuntime.jsx(react.Global,{styles:{":root":a(a(a({},Ro),d),o)}}),jsxRuntime.jsxs(react.ThemeProvider,{theme:E,children:[t&&jsxRuntime.jsx(Ar,{}),e]}),i.preloadImages!==!1&&jsxRuntime.jsx(Mr,{})]})}function Fe(e,o){let{frigade:t,variables:n}=Eo.useContext(L),[,r]=Eo.useState(!1),i=Eo.useCallback(l=>{t==null||t.getFlow(e).then(()=>{l();});let d=u=>{u.id===e&&setTimeout(()=>{r(m=>!m),l();},0);};return t==null||t.onStateChange(d),()=>{t==null||t.removeStateChangeHandler(d);}},[e,t]),s=Eo.useSyncExternalStore(i,()=>t==null?void 0:t.getFlowSync(e),()=>t==null?void 0:t.getFlowSync(e));return Eo.useEffect(()=>{s==null||s.applyVariables(a(a({},n),o==null?void 0:o.variables));},[o==null?void 0:o.variables,e,n]),{flow:s,isLoading:t!=null&&t.hasFailedToLoad()?!1:!s}}function Zo(e,{onComplete:o,onDismiss:t}={}){let n=Eo.useRef(null);return Eo.useEffect(()=>{if(e==null)return;function r(){return W(this,null,function*(){e.isCompleted&&n.current===!1&&(yield o==null?void 0:o(e));})}return r(),n.current=e==null?void 0:e.isCompleted,()=>{r();}},[e==null?void 0:e.isCompleted]),{handleDismiss:Eo.useCallback(r=>W(this,null,function*(){if((yield t==null?void 0:t(e,r))===!1)return r.preventDefault(),!1;e.skip();}),[e])}}var fe=new Set;function Yo(e,o=!0){let t=Eo.useCallback(()=>{fe.has(e==null?void 0:e.id)&&fe.delete(e==null?void 0:e.id);},[fe,o]),n=Eo.useCallback(()=>{o&&(e!=null&&e.isVisible)&&!fe.has(e.id)&&fe.add(e.id);},[fe,o]);Eo.useEffect(()=>()=>{t();},[]),Eo.useEffect(()=>{n();let i=()=>{t();};return window.addEventListener("popstate",i),window.addEventListener("beforeunload",i),()=>{t(),window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",i);}},[n,t]),e!=null&&e.isVisible?n():t();let r=fe.size>0?fe.values().next().value:null;return {isCurrentModal:o?r===(e==null?void 0:e.id)||fe.size==0:!0}}function U(u){var m=u,{as:e,children:o,flowId:t,onComplete:n,onDismiss:r,onPrimary:i,onSecondary:s,variables:l}=m,d=f(m,["as","children","flowId","onComplete","onDismiss","onPrimary","onSecondary","variables"]);var k,A;let{flow:g}=Fe(t,{variables:l}),H=a(a({},d),(k=g==null?void 0:g.props)!=null?k:{}),{dismissible:b=!1,forceMount:h=!1}=H,P=f(H,["dismissible","forceMount"]),T=g==null?void 0:g.getCurrentStep(),{handleDismiss:B}=Zo(g,{onComplete:n,onDismiss:r}),{handlePrimary:S,handleSecondary:w}=ue(T,{onPrimary:i,onSecondary:s}),v=(P==null?void 0:P.modal)||typeof e=="function"&&(e==null?void 0:e.displayName)==="Dialog"||[js.FlowType.ANNOUNCEMENT,js.FlowType.TOUR].includes((A=g==null?void 0:g.rawData)==null?void 0:A.flowType),{isCurrentModal:F}=Yo(g,v),O=h&&((g==null?void 0:g.isCompleted)||(g==null?void 0:g.isSkipped));if(!g||!g.isVisible&&!O||!O&&!F)return null;(O||!g.isCompleted&&!g.isSkipped)&&(T==null||T.start());let D=e===null?Eo.Fragment:e!=null?e:y,M=p(a({},P),{"data-flow-id":g.id});return jsxRuntime.jsx(D,p(a({},e===null?{}:M),{children:o({flow:g,handleDismiss:B,handlePrimary:S,handleSecondary:w,parentProps:{dismissible:b,flowId:t,variables:l,containerProps:M},step:T})}))}function jr(t){var n=t,{part:e}=n,o=f(n,["part"]);return jsxRuntime.jsx(U,p(a({as:x,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},o),{children:({handleDismiss:r,handlePrimary:i,handleSecondary:s,parentProps:{dismissible:l},step:d})=>{var g,b,h,P;let u=(b=(g=d.primaryButton)==null?void 0:g.title)!=null?b:d.primaryButtonTitle,m=(P=(h=d.secondaryButton)==null?void 0:h.title)!=null?P:d.secondaryButtonTitle;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(x.Header,{dismissible:l,handleDismiss:r,subtitle:d.subtitle,title:d.title}),jsxRuntime.jsx(x.Media,{src:d.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxRuntime.jsxs(C.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsxRuntime.jsx(x.Secondary,{title:m,onClick:s}),jsxRuntime.jsx(x.Primary,{title:u,onClick:i})]})]})}}))}function bo(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);return jsxRuntime.jsx(y,a({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function rs(e){var o,t,n,r,i;return e.includes("youtube")?`https://www.youtube.com/embed/${(o=e.split("v=")[1])==null?void 0:o.split("&")[0]}`:e.includes("youtu.be")?`https://www.youtube.com/embed/${(t=e.split("youtu.be/")[1])==null?void 0:t.split("&")[0]}`:e.includes("vimeo")?`https://player.vimeo.com/video/${(n=e.split("vimeo.com/")[1])==null?void 0:n.split("&")[0]}`:e.includes("wistia")?`https://fast.wistia.net/embed/iframe/${(r=e.split("wistia.com/medias/")[1])==null?void 0:r.split("&")[0]}`:e.includes("loom")?`https://loom.com/embed/${(i=e.split("loom.com/share/")[1])==null?void 0:i.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function Po(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);let i=rs(o);return i?jsxRuntime.jsx(y,a({allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"neutral.100",borderWidth:"0",part:["video",e],src:i},t)):o!=null&&o.endsWith(".mp4")?jsxRuntime.jsx(y,a({as:"video",controls:!0,part:["video",e],src:o},t)):(console.error(`Could not map videoUri ${o} to a known provider (Youtube, Vimeo, Wistia, Loom) or valid mp4 file.`),null)}function he(n){var r=n,{src:e,type:o}=r,t=f(r,["src","type"]);return jsxRuntime.jsx(o==="video"?Po:bo,a({src:e},t))}var x=Eo__namespace.forwardRef((i,r)=>{var s=i,{children:e,flowId:o,part:t}=s,n=f(s,["children","flowId","part"]);var d;if(o!=null)return jsxRuntime.jsx(jr,a({flowId:o},n));let l=(d=n.as)!=null?d:C.Column;return jsxRuntime.jsx(l,p(a({backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderRadius:"md",borderWidth:"0",gap:5,p:5,part:["card",t]},n),{ref:r,children:e}))});x.Dismiss=e=>jsxRuntime.jsx(I.Plain,p(a({"aria-label":"Dismiss",part:"dismiss",padding:0},e),{children:jsxRuntime.jsx(Be,{height:"20",fill:"currentColor"})}));x.Footer=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return jsxRuntime.jsx(C.Row,p(a({alignItems:"center",gap:3,justifyContent:"flex-end",part:["card-footer",o]},t),{children:e}))};x.Header=s=>{var l=s,{dismissible:e,handleDismiss:o,part:t,subtitle:n,title:r}=l,i=f(l,["dismissible","handleDismiss","part","subtitle","title"]);return jsxRuntime.jsxs(C.Row,p(a({alignItems:"flex-start",flexWrap:"wrap",gap:1,part:["card-header",t]},i),{children:[jsxRuntime.jsx(x.Title,{maxWidth:"calc(100% - 32px)",children:r}),e&&jsxRuntime.jsx(x.Dismiss,{onClick:o,marginLeft:"auto"}),jsxRuntime.jsx(x.Subtitle,{color:"neutral.400",flexBasis:"100%",children:n})]}))};x.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null||(e==null?void 0:e.length)===0?null:jsxRuntime.jsx(he,a({borderRadius:"md",src:e},o))};x.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsxRuntime.jsx(I.Primary,a({title:o,onClick:e},t))};x.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsxRuntime.jsx(I.Secondary,a({title:o,onClick:e},t))};x.Subtitle=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return e==null?null:jsxRuntime.jsx(R.Body2,p(a({display:"block",color:"neutral.400",part:["subtitle",o]},t),{children:e}))};x.Title=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return e==null?null:jsxRuntime.jsx(R.H4,p(a({display:"block",part:["title",o]},t),{children:e}))};var Co={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function qr(e){let o=Object.fromEntries(Co.content.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),t=Object.fromEntries(Co.root.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),n={};for(let r of Object.keys(e))!Co.content.some(i=>i===r)&&!Co.root.some(i=>i===r)&&(n[r]=e[r]);return {contentProps:o,otherProps:n,rootProps:t}}var ss=react.keyframes`
96
+ `;function fo(B){var S=B,{align:e,alignOffset:o,autoScroll:t,defaultOpen:n,dismissible:r,flow:i,handleDismiss:s,modal:l,onPrimary:d,onSecondary:u,part:m,side:g,sideOffset:b,spotlight:h,step:P}=S,T=f(S,["align","alignOffset","autoScroll","defaultOpen","dismissible","flow","handleDismiss","modal","onPrimary","onSecondary","part","side","sideOffset","spotlight","step"]);var M,k,I,A,J;let{handlePrimary:w,handleSecondary:v}=ue(P,{onPrimary:d,onSecondary:u}),F=(k=(M=P.primaryButton)==null?void 0:M.title)!=null?k:P.primaryButtonTitle,O=(A=(I=P.secondaryButton)==null?void 0:I.title)!=null?A:P.secondaryButtonTitle,D=!!P.$state.blocked;return jsxRuntime.jsx(jo,p(a({align:e,alignOffset:o,anchor:P.selector,autoScroll:t,"data-step-id":P.id,defaultOpen:n,modal:l,part:m,side:g,sideOffset:b,spotlight:h},T),{children:jsxRuntime.jsxs(x,{animation:`${Ba} 300ms ease-out`,boxShadow:"md",maxWidth:"min(360px, calc(100vw - 25px))",children:[jsxRuntime.jsx(x.Media,{aspectRatio:"2",borderRadius:"md md 0 0",borderWidth:"0",margin:"-5 -5 0",objectFit:"cover",overflowClipMargin:"unset",src:(J=P.videoUri)!=null?J:P.imageUri,transform:"translate3d(0, 0, 1px)",type:P.videoUri?"video":"image"}),jsxRuntime.jsx(x.Header,{css:{".fr-dismiss":{position:"absolute",right:"12px",top:"12px"}},dismissible:r,handleDismiss:s,subtitle:P.subtitle,title:P.title}),jsxRuntime.jsxs(x.Footer,{children:[i.getNumberOfAvailableSteps()>1&&jsxRuntime.jsx(Ee,{current:i.getCurrentStepOrder()+1,marginRight:"auto",total:i.getNumberOfAvailableSteps()}),jsxRuntime.jsx(x.Secondary,{disabled:D,onClick:v,title:O}),jsxRuntime.jsx(x.Primary,{disabled:D,onClick:w,title:F})]})]})}))}function $r(r){var i=r,{children:e,container:o,flowId:t}=i,n=f(i,["children","container","flowId"]);return jsxRuntime.jsx(hr,{container:o,children:jsxRuntime.jsx(y,p(a({"data-flow-id":t,part:"tour"},n),{children:e}))})}function go(n){var r=n,{as:e,flowId:o}=r,t=f(r,["as","flowId"]);let{onDismiss:i,onPrimary:s,onSecondary:l}=t;return jsxRuntime.jsx(U,p(a({as:null,flowId:o},t),{children:({flow:d,handleDismiss:u,parentProps:m,step:g})=>{var Te;let Re=m.containerProps,{align:b="after",alignOffset:h=0,autoScroll:P=!1,container:T="body",defaultOpen:B,dismissible:S=!1,modal:w,part:v,sequential:F=!0,side:O="bottom",sideOffset:D=0,spotlight:M,zIndex:k=9999}=Re,I=f(Re,["align","alignOffset","autoScroll","container","defaultOpen","dismissible","modal","part","sequential","side","sideOffset","spotlight","zIndex"]),A=a({align:b,alignOffset:h,autoScroll:P,dismissible:S,flow:d,handleDismiss:u,modal:w,onPrimary:s,onSecondary:l,part:v,side:O,sideOffset:D,spotlight:M,step:g,zIndex:k},(Te=g.props)!=null?Te:{});if(F)return jsxRuntime.jsx($r,p(a({as:e,container:T,flowId:o,part:"tour",zIndex:k},I),{children:jsxRuntime.jsx(fo,a({defaultOpen:B!=null?B:!0},A),g.id)}));let J=Array.from(d.steps.values()).filter(j=>{let{blocked:re,completed:se,skipped:Y,visible:N}=j.$state;return !re&&!se&&!Y&&N}).map(j=>{var Q,le,ne,ye;function re(ie){return W(this,null,function*(){return (yield i==null?void 0:i(d,ie))===!1?(ie.preventDefault(),!1):(j.skip(),!0)})}let se=M&&j.id===g.id,Y=(le=(Q=j.props)==null?void 0:Q.zIndex)!=null?le:k,N=a({align:b,alignOffset:h,dismissible:S,flow:d,handleDismiss:re,onPrimary:s,onSecondary:l,part:v,side:O,sideOffset:D,spotlight:M,zIndex:Y},(ne=j.props)!=null?ne:{});return jsxRuntime.jsx(fo,a({css:{"&:has([aria-expanded=true])":{zIndex:Number(Y)+2},".fr-overlay":{zIndex:Number(Y)+1},".fr-progress-fraction":{display:"none"}},defaultOpen:(ye=B||se)!=null?ye:!1,step:j},N),`${j.id}-${se}`)});return jsxRuntime.jsx($r,p(a({as:e,container:T,flowId:o,part:"tour",zIndex:k},I),{children:J}))}}))}function yo(){let{frigade:e}=Eo.useContext(L),[,o]=Eo.useState(!1),t,n=Eo.useCallback(s=>{e==null||e.getCollections().then(()=>{s();});let l=()=>{clearTimeout(t),t=setTimeout(()=>{o(d=>!d),s();},0);};return e==null||e.onStateChange(l),()=>{e==null||e.removeStateChangeHandler(l);}},[]),r=()=>{let s;try{s=e==null?void 0:e.getCollectionsSync();}catch(l){}return s};return {collections:Eo.useSyncExternalStore(n,r,r)}}function xo(e){var l,d,u,m;let{frigade:o}=Eo.useContext(L),{collections:t}=yo(),n=t==null?void 0:t.get(e),i=(m=((u=(d=(l=t==null?void 0:t.get(e))==null?void 0:l.flows)==null?void 0:d.filter(g=>g.visible).map(g=>p(a({},g),{flow:o==null?void 0:o.getFlowSync(g.flowId)})))!=null?u:[]).find(({flow:g})=>g.isVisible))==null?void 0:m.flowId,{flow:s}=Fe(i);return Eo.useEffect(()=>{o==null||o.registerCollection(e);},[e]),{collection:n,currentFlow:s}}function Xo(r){var i=r,{collectionId:e,part:o,variables:t={}}=i,n=f(i,["collectionId","part","variables"]);var u,m,g;let s={ANNOUNCEMENT:Jo,BANNER:Oo,CARD:x,CHECKLIST:ro,EMBEDDED_TIP:x,FORM:Me,NPS_SURVEY:Ge,SURVEY:Ge,TOUR:go},{currentFlow:l}=xo(e),d=(m=s[(u=l==null?void 0:l.rawData)==null?void 0:u.flowType])!=null?m:null;return l==null||d==null?null:((g=l==null?void 0:l.rawData)==null?void 0:g.flowType)===js.FlowType.FORM?jsxRuntime.jsx(y,p(a({part:["collection",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(Me,{flowId:l.id,as:$,variables:t},l.id)})):jsxRuntime.jsx(y,p(a({part:["collection",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(d,{flowId:l.id,variables:t},l.id)}))}function Ar(){var t,n;let{collections:e}=yo(),o=(n=Array.from((t=e==null?void 0:e.entries())!=null?t:[]).find(r=>r[1].collectionType==="DEFAULT"))==null?void 0:n[0];return xo(o),o==null?null:jsxRuntime.jsx(Xo,{as:null,collectionId:o})}var L=Eo.createContext({apiKey:"",navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{},variables:{}});function qo(){let{frigade:e}=Eo.useContext(L);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Mr(){let{frigade:e}=qo();return Eo.useEffect(()=>{W(this,null,function*(){(yield e.getFlows()).forEach(t=>{t.steps.forEach(n=>{if(n.imageUri){let r=new Image;r.src=n.imageUri;}});});});},[]),null}var Wr="2.5.24";function zr(s){var l=s,{children:e,css:o={},defaultCollection:t=!0,navigate:n,theme:r}=l,i=f(l,["children","css","defaultCollection","navigate","theme"]);let d=r?vo(r):{},u=Eo.useRef(new Map),m=Eo.useRef(),[g,b]=Eo.useState(!1),h=Eo.useMemo(()=>(b(!1),m.current=void 0,new js.Frigade(i.apiKey,{apiKey:i.apiKey,apiUrl:i.apiUrl,userId:i.userId,groupId:i.groupId,userProperties:i.userProperties,groupProperties:i.groupProperties,generateGuestId:i.generateGuestId,syncOnWindowUpdates:i.syncOnWindowUpdates,__readOnly:i.__readOnly,__flowStateOverrides:i.__flowStateOverrides,__platformVersion:Wr,__platformName:"React"})),[i.userId,i.groupId,i.apiKey]);Eo.useEffect(()=>{if(i.__flowStateOverrides){let w=h.getConfig();w.__flowStateOverrides=i.__flowStateOverrides,h.reload(w);}},[i.__flowStateOverrides]);function P(){let w=[...u.current.entries()].map(([v,F])=>[v,F.callback]);h.batchRegister(w),b(!0);}function T(w,v){if(m.current&&clearTimeout(m.current),g){u.current.has(w)?h.getFlow(w).then(F=>v(F.isVisible)):(h.getFlow(w).then(F=>F.register(v)),u.current.set(w,{callback:v}));return}u.current.has(w)||u.current.set(w,{callback:v}),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>P(),0);}function B(w){u.current.has(w)&&h.getFlow(w).then(v=>{u.current.delete(w),v==null||v.unregister();});}let S=n!=null?n:(w,v="_self")=>{window.open(w,v);};return Eo.useEffect(()=>()=>{h.destroy();},[]),jsxRuntime.jsxs(L.Provider,{value:p(a({navigate:S},i),{frigade:h,registerComponent:T,unregisterComponent:B,hasInitialized:g,variables:i.variables||{}}),children:[jsxRuntime.jsx(react.Global,{styles:{":root":a(a(a({},Ro),d),o)}}),jsxRuntime.jsxs(react.ThemeProvider,{theme:E,children:[t&&jsxRuntime.jsx(Ar,{}),e]}),i.preloadImages!==!1&&jsxRuntime.jsx(Mr,{})]})}function Fe(e,o){let{frigade:t,variables:n}=Eo.useContext(L),[,r]=Eo.useState(!1),i=Eo.useCallback(l=>{t==null||t.getFlow(e).then(()=>{l();});let d=u=>{u.id===e&&setTimeout(()=>{r(m=>!m),l();},0);};return t==null||t.onStateChange(d),()=>{t==null||t.removeStateChangeHandler(d);}},[e,t]),s=Eo.useSyncExternalStore(i,()=>t==null?void 0:t.getFlowSync(e),()=>t==null?void 0:t.getFlowSync(e));return Eo.useEffect(()=>{s==null||s.applyVariables(a(a({},n),o==null?void 0:o.variables));},[o==null?void 0:o.variables,e,n]),{flow:s,isLoading:t!=null&&t.hasFailedToLoad()?!1:!s}}function Yo(e,{onComplete:o,onDismiss:t}={}){let n=Eo.useRef(null);return Eo.useEffect(()=>{if(e==null)return;function r(){return W(this,null,function*(){e.isCompleted&&n.current===!1&&(n.current=!0,yield o==null?void 0:o(e));})}return r(),n.current=e==null?void 0:e.isCompleted,()=>{r();}},[e==null?void 0:e.isCompleted]),{handleDismiss:Eo.useCallback(r=>W(this,null,function*(){if((yield t==null?void 0:t(e,r))===!1)return r.preventDefault(),!1;e.skip();}),[e])}}var fe=new Set;function Qo(e,o=!0){let t=Eo.useCallback(()=>{fe.has(e==null?void 0:e.id)&&fe.delete(e==null?void 0:e.id);},[fe,o]),n=Eo.useCallback(()=>{o&&(e!=null&&e.isVisible)&&!fe.has(e.id)&&fe.add(e.id);},[fe,o]);Eo.useEffect(()=>()=>{t();},[]),Eo.useEffect(()=>{n();let i=()=>{t();};return window.addEventListener("popstate",i),window.addEventListener("beforeunload",i),()=>{t(),window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",i);}},[n,t]),e!=null&&e.isVisible?n():t();let r=fe.size>0?fe.values().next().value:null;return {isCurrentModal:o?r===(e==null?void 0:e.id)||fe.size==0:!0}}function U(u){var m=u,{as:e,children:o,flowId:t,onComplete:n,onDismiss:r,onPrimary:i,onSecondary:s,variables:l}=m,d=f(m,["as","children","flowId","onComplete","onDismiss","onPrimary","onSecondary","variables"]);var k,A;let{flow:g}=Fe(t,{variables:l}),I=a(a({},d),(k=g==null?void 0:g.props)!=null?k:{}),{dismissible:b=!1,forceMount:h=!1}=I,P=f(I,["dismissible","forceMount"]),T=g==null?void 0:g.getCurrentStep(),{handleDismiss:B}=Yo(g,{onComplete:n,onDismiss:r}),{handlePrimary:S,handleSecondary:w}=ue(T,{onPrimary:i,onSecondary:s}),v=(P==null?void 0:P.modal)||typeof e=="function"&&(e==null?void 0:e.displayName)==="Dialog"||[js.FlowType.ANNOUNCEMENT,js.FlowType.TOUR].includes((A=g==null?void 0:g.rawData)==null?void 0:A.flowType),{isCurrentModal:F}=Qo(g,v),O=h&&((g==null?void 0:g.isCompleted)||(g==null?void 0:g.isSkipped));if(!g||!g.isVisible&&!O||!O&&!F)return null;(O||!g.isCompleted&&!g.isSkipped)&&(T==null||T.start());let D=e===null?Eo.Fragment:e!=null?e:y,M=p(a({},P),{"data-flow-id":g.id});return jsxRuntime.jsx(D,p(a({},e===null?{}:M),{children:o({flow:g,handleDismiss:B,handlePrimary:S,handleSecondary:w,parentProps:{dismissible:b,flowId:t,variables:l,containerProps:M},step:T})}))}function jr(t){var n=t,{part:e}=n,o=f(n,["part"]);return jsxRuntime.jsx(U,p(a({as:x,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},o),{children:({handleDismiss:r,handlePrimary:i,handleSecondary:s,parentProps:{dismissible:l},step:d})=>{var g,b,h,P;let u=(b=(g=d.primaryButton)==null?void 0:g.title)!=null?b:d.primaryButtonTitle,m=(P=(h=d.secondaryButton)==null?void 0:h.title)!=null?P:d.secondaryButtonTitle;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(x.Header,{dismissible:l,handleDismiss:r,subtitle:d.subtitle,title:d.title}),jsxRuntime.jsx(x.Media,{src:d.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxRuntime.jsxs(C.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsxRuntime.jsx(x.Secondary,{title:m,onClick:s}),jsxRuntime.jsx(x.Primary,{title:u,onClick:i})]})]})}}))}function bo(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);return jsxRuntime.jsx(y,a({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function rs(e){var o,t,n,r,i;return e.includes("youtube")?`https://www.youtube.com/embed/${(o=e.split("v=")[1])==null?void 0:o.split("&")[0]}`:e.includes("youtu.be")?`https://www.youtube.com/embed/${(t=e.split("youtu.be/")[1])==null?void 0:t.split("&")[0]}`:e.includes("vimeo")?`https://player.vimeo.com/video/${(n=e.split("vimeo.com/")[1])==null?void 0:n.split("&")[0]}`:e.includes("wistia")?`https://fast.wistia.net/embed/iframe/${(r=e.split("wistia.com/medias/")[1])==null?void 0:r.split("&")[0]}`:e.includes("loom")?`https://loom.com/embed/${(i=e.split("loom.com/share/")[1])==null?void 0:i.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function Po(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);let i=rs(o);return i?jsxRuntime.jsx(y,a({allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"neutral.100",borderWidth:"0",part:["video",e],src:i},t)):o!=null&&o.endsWith(".mp4")?jsxRuntime.jsx(y,a({as:"video",controls:!0,part:["video",e],src:o},t)):(console.error(`Could not map videoUri ${o} to a known provider (Youtube, Vimeo, Wistia, Loom) or valid mp4 file.`),null)}function he(n){var r=n,{src:e,type:o}=r,t=f(r,["src","type"]);return jsxRuntime.jsx(o==="video"?Po:bo,a({src:e},t))}var x=Eo__namespace.forwardRef((i,r)=>{var s=i,{children:e,flowId:o,part:t}=s,n=f(s,["children","flowId","part"]);var d;if(o!=null)return jsxRuntime.jsx(jr,a({flowId:o},n));let l=(d=n.as)!=null?d:C.Column;return jsxRuntime.jsx(l,p(a({backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderRadius:"md",borderWidth:"0",gap:5,p:5,part:["card",t]},n),{ref:r,children:e}))});x.Dismiss=e=>jsxRuntime.jsx(H.Plain,p(a({"aria-label":"Dismiss",part:"dismiss",padding:0},e),{children:jsxRuntime.jsx(Be,{height:"20",fill:"currentColor"})}));x.Footer=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return jsxRuntime.jsx(C.Row,p(a({alignItems:"center",gap:3,justifyContent:"flex-end",part:["card-footer",o]},t),{children:e}))};x.Header=s=>{var l=s,{dismissible:e,handleDismiss:o,part:t,subtitle:n,title:r}=l,i=f(l,["dismissible","handleDismiss","part","subtitle","title"]);return jsxRuntime.jsxs(C.Row,p(a({alignItems:"flex-start",flexWrap:"wrap",gap:1,part:["card-header",t]},i),{children:[jsxRuntime.jsx(x.Title,{maxWidth:"calc(100% - 32px)",children:r}),e&&jsxRuntime.jsx(x.Dismiss,{onClick:o,marginLeft:"auto"}),jsxRuntime.jsx(x.Subtitle,{color:"neutral.400",flexBasis:"100%",children:n})]}))};x.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null||(e==null?void 0:e.length)===0?null:jsxRuntime.jsx(he,a({borderRadius:"md",src:e},o))};x.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsxRuntime.jsx(H.Primary,a({title:o,onClick:e},t))};x.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsxRuntime.jsx(H.Secondary,a({title:o,onClick:e},t))};x.Subtitle=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return e==null?null:jsxRuntime.jsx(R.Body2,p(a({display:"block",color:"neutral.400",part:["subtitle",o]},t),{children:e}))};x.Title=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return e==null?null:jsxRuntime.jsx(R.H4,p(a({display:"block",part:["title",o]},t),{children:e}))};var Co={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function qr(e){let o=Object.fromEntries(Co.content.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),t=Object.fromEntries(Co.root.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),n={};for(let r of Object.keys(e))!Co.content.some(i=>i===r)&&!Co.root.some(i=>i===r)&&(n[r]=e[r]);return {contentProps:o,otherProps:n,rootProps:t}}var ss=react.keyframes`
97
97
  from {
98
98
  opacity: 0;
99
99
  }
@@ -103,7 +103,7 @@ var it=Object.defineProperty,an=Object.defineProperties;var sn=Object.getOwnProp
103
103
  to {
104
104
  opacity: 1;
105
105
  }
106
- `;function $(r){var i=r,{children:e,className:o,modal:t=!0}=i,n=f(i,["children","className","modal"]);let{rootProps:s,contentProps:l,otherProps:m}=qr(n),g=m,{zIndex:d}=g,u=f(g,["zIndex"]);return jsxRuntime.jsx(X__namespace.Root,p(a({defaultOpen:!0,modal:t},s),{children:jsxRuntime.jsx(X__namespace.Portal,{children:jsxRuntime.jsxs(y,{animation:`${ss} 300ms ease-out`,className:o,display:"grid",inset:"0",padding:"6",part:"dialog-wrapper",pointerEvents:"none",position:"fixed",zIndex:d!=null?d:10,children:[t&&jsxRuntime.jsx(X__namespace.Overlay,{asChild:!0,children:jsxRuntime.jsx(y,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsxRuntime.jsx(X__namespace.Content,p(a({asChild:!0,onOpenAutoFocus:b=>b.preventDefault(),onPointerDownOutside:b=>b.preventDefault(),onInteractOutside:b=>b.preventDefault()},l),{children:jsxRuntime.jsx(x,p(a({alignSelf:"center",boxShadow:"md",justifySelf:"center",maxHeight:"100%",maxWidth:"430px",overflowY:"auto",padding:8,part:"dialog",pointerEvents:"auto",position:"relative"},u),{children:e}))}))]})})}))}$.Dismiss=e=>jsxRuntime.jsx(X__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(I.Plain,p(a({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsxRuntime.jsx(Be,{height:"20",fill:"currentColor"})}))});$.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(X__namespace.Description,{asChild:!0,children:jsxRuntime.jsx(R.Body2,p(a({part:"subtitle"},o),{children:e}))})};$.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsxRuntime.jsx(he,a({borderRadius:"md",src:e},o))};$.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Primary,a({title:o,onClick:e},t))};$.ProgressDots=({current:e,total:o})=>{if(o==1)return null;let t=[...Array(o)].map((n,r)=>jsxRuntime.jsx(y,{as:"circle",r:4,cx:4+16*r,cy:"4px",fill:e===r?E.colors.primary.surface:E.colors.neutral[700],part:e===r?"progress-dot-selected":"progress-dot"},r));return jsxRuntime.jsx(y,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8,children:t})};$.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Secondary,a({title:o,onClick:e},t))};$.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(X__namespace.Title,{asChild:!0,children:jsxRuntime.jsx(R.H4,p(a({part:"title"},o),{children:e}))})};$.displayName="Dialog";var Zr=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function Xo(n){var r=n,{flowId:e,part:o}=r,t=f(r,["flowId","part"]);let i=Object.fromEntries(Object.entries(t).filter(([l])=>Zr.some(d=>l===d))),s=Object.fromEntries(Object.entries(t).filter(([l])=>Zr.indexOf(l)===-1));return jsxRuntime.jsx(U,p(a({as:null,flowId:e},i),{children:({flow:l,handleDismiss:d,handlePrimary:u,handleSecondary:m,parentProps:{containerProps:g,dismissible:b},step:h})=>{var w,v,F,O,D,M;let P=(w=h.props)!=null?w:{},T=(F=(v=h.primaryButton)==null?void 0:v.title)!=null?F:h.primaryButtonTitle,B=(D=(O=h.secondaryButton)==null?void 0:O.title)!=null?D:h.secondaryButtonTitle,S=h.$state.blocked;return jsxRuntime.jsx($,p(a(a({part:["announcement",o],textAlign:"center"},g),s),{onEscapeKeyDown:k=>{if(t.dismissible===!1){k.preventDefault();return}typeof t.onEscapeKeyDown=="function"&&t.onEscapeKeyDown(k),k.defaultPrevented||d(k);},children:jsxRuntime.jsxs(C.Column,p(a({gap:5,part:"announcement-step"},P),{children:[b&&jsxRuntime.jsx($.Dismiss,{onClick:d}),jsxRuntime.jsxs(C.Column,{gap:1,part:"announcement-header",children:[jsxRuntime.jsx($.Title,{children:h.title}),jsxRuntime.jsx($.Subtitle,{children:h.subtitle})]}),jsxRuntime.jsx($.Media,{aspectRatio:"1.5",objectFit:"cover",overflowClipMargin:"unset",src:(M=h.videoUri)!=null?M:h.imageUri,transform:"translate3d(0, 0, 1px)",type:h.videoUri?"video":"image",width:"100%"}),jsxRuntime.jsx($.ProgressDots,{current:l.getCurrentStepIndex(),total:l.getNumberOfAvailableSteps()}),jsxRuntime.jsxs(C.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[B&&jsxRuntime.jsx($.Secondary,{disabled:S,onClick:m,title:B}),T&&jsxRuntime.jsx($.Primary,{disabled:S,onClick:u,title:T})]})]}))}))}}))}function et(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function So(...e){let o=e.shift(),t=e.length===1?e[0]:So(...e);if(!et(o)||!et(t))throw new Error("deepmerge can only merge Objects");let n=structuredClone(o);return Object.entries(t).forEach(([r,i])=>{et(i)?n[r]!==void 0?Object.assign(n,{[r]:So(n[r],structuredClone(i))}):Object.assign(n,{[r]:structuredClone(i)}):Array.isArray(i)?n[r]!==void 0?Object.assign(n,{[r]:[...n[r],...structuredClone(i)]}):Object.assign(n,{[r]:structuredClone(i)}):Object.assign(n,{[r]:i});}),n}function ps(...e){for(let o of e)if(o!=null&&o.length>0)return o;return null}function ds(t){var n=t,{title:e}=n,o=f(n,["title"]);return jsxRuntime.jsx(U,p(a({as:null},o),{children:({flow:r,parentProps:{containerProps:i},step:s})=>{var g,b,h;let l=ps(e,r.title,s.title),d=(g=r==null?void 0:r.getNumberOfCompletedSteps())!=null?g:0,u=(b=r==null?void 0:r.getNumberOfAvailableSteps())!=null?b:1,m=i.onClick!=null;return m&&(i.css=So({"&:hover":{backgroundColor:"var(--fr-colors-neutral-hover-background)"}},(h=i.css)!=null?h:{})),jsxRuntime.jsxs(x,p(a({"aria-label":"Progress Badge",borderWidth:"md",cursor:m?"pointer":"auto",gap:"1",p:"3",part:"progress-badge",role:"complementary"},i),{children:[jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:"2",part:"progress-badge-header",children:[jsxRuntime.jsx(x.Title,{fontSize:"sm",lineHeight:"sm",children:l}),jsxRuntime.jsx(y,{as:ao,height:"20px",marginLeft:"auto",marginRight:"-1",transform:"rotate(-90deg)",width:"20px"})]}),jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:"2",part:"progress-badge-footer",children:[jsxRuntime.jsx(Ee,{current:d,fontSize:"xs",fontWeight:"medium",lineHeight:"xs",total:u}),jsxRuntime.jsx(oo,{current:d,flexGrow:"1",total:u})]})]}))}}))}var us=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function Qr(n){var r=n,{style:e={},part:o=""}=r,t=f(r,["style","part"]);return jsxRuntime.jsxs(y,p(a({part:`dot-wrapper ${o}`,style:a({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${us}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]}))}function en({props:e,alignAttr:o,sideAttr:t}){let n=t!=null?t:"bottom",r={},i=()=>{var u;if(["after","before"].includes(e.align)){if(o=="start")return "before";if(o=="end")return "after"}return (u=e.align)!=null?u:"after"},s="-24px",l={top:"bottom",right:"left",bottom:"top",left:"right"};r[l[n]]=s;let d=i();return ["before","end"].includes(d)?["top","bottom"].includes(n)?r.right=s:r.bottom=s:["after","start"].includes(d)?["top","bottom"].includes(n)?r.left=s:r.top=s:["top","bottom"].includes(n)?r.left=`calc(50% + ${s})`:r.top=`calc(50% + ${s})`,r}var wo={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["modal","onOpenChange"]};function on(e,o){var i,s,l,d,u;let t=Object.fromEntries(wo.content.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),n=Object.fromEntries(wo.root.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),r={};for(let m of Object.keys(e))!wo.content.includes(m)&&!wo.root.includes(m)&&(r[m]=e[m]);if(t.align=(i=t.align)!=null?i:"after",t.side=(s=t.side)!=null?s:"bottom",["before","after"].includes(t.align)){let m={after:"end",before:"start"},g=(S,w)=>["top","bottom"].includes(w)?S=="after"?"marginLeft":"marginRight":S=="after"?"marginTop":"marginBottom",b=(l=t.alignOffset)!=null?l:0,h=(d=t.style)!=null?d:{},P=(u=t.side)!=null?u:"bottom",T=t.align;t.style=p(a({},h),{[g(T,P)]:b});let B=["top","bottom"].includes(P)?o.width:o.height;t.alignOffset=(B+b)*-1,t.align=m[T];}return {contentProps:t,otherProps:r,rootProps:n}}var tn=react.keyframes`
106
+ `;function $(r){var i=r,{children:e,className:o,modal:t=!0}=i,n=f(i,["children","className","modal"]);let{rootProps:s,contentProps:l,otherProps:m}=qr(n),g=m,{zIndex:d}=g,u=f(g,["zIndex"]);return jsxRuntime.jsx(X__namespace.Root,p(a({defaultOpen:!0,modal:t},s),{children:jsxRuntime.jsx(X__namespace.Portal,{children:jsxRuntime.jsxs(y,{animation:`${ss} 300ms ease-out`,className:o,display:"grid",inset:"0",padding:"6",part:"dialog-wrapper",pointerEvents:"none",position:"fixed",zIndex:d!=null?d:10,children:[t&&jsxRuntime.jsx(X__namespace.Overlay,{asChild:!0,children:jsxRuntime.jsx(y,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsxRuntime.jsx(X__namespace.Content,p(a({asChild:!0,onOpenAutoFocus:b=>b.preventDefault(),onPointerDownOutside:b=>b.preventDefault(),onInteractOutside:b=>b.preventDefault()},l),{children:jsxRuntime.jsx(x,p(a({alignSelf:"center",boxShadow:"md",justifySelf:"center",maxHeight:"100%",maxWidth:"430px",overflowY:"auto",padding:8,part:"dialog",pointerEvents:"auto",position:"relative"},u),{children:e}))}))]})})}))}$.Dismiss=e=>jsxRuntime.jsx(X__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(H.Plain,p(a({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsxRuntime.jsx(Be,{height:"20",fill:"currentColor"})}))});$.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(X__namespace.Description,{asChild:!0,children:jsxRuntime.jsx(R.Body2,p(a({part:"subtitle"},o),{children:e}))})};$.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsxRuntime.jsx(he,a({borderRadius:"md",src:e},o))};$.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(H.Primary,a({title:o,onClick:e},t))};$.ProgressDots=({current:e,total:o})=>{if(o==1)return null;let t=[...Array(o)].map((n,r)=>jsxRuntime.jsx(y,{as:"circle",r:4,cx:4+16*r,cy:"4px",fill:e===r?E.colors.primary.surface:E.colors.neutral[700],part:e===r?"progress-dot-selected":"progress-dot"},r));return jsxRuntime.jsx(y,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8,children:t})};$.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(H.Secondary,a({title:o,onClick:e},t))};$.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(X__namespace.Title,{asChild:!0,children:jsxRuntime.jsx(R.H4,p(a({part:"title"},o),{children:e}))})};$.displayName="Dialog";var Zr=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function Jo(n){var r=n,{flowId:e,part:o}=r,t=f(r,["flowId","part"]);let i=Object.fromEntries(Object.entries(t).filter(([l])=>Zr.some(d=>l===d))),s=Object.fromEntries(Object.entries(t).filter(([l])=>Zr.indexOf(l)===-1));return jsxRuntime.jsx(U,p(a({as:null,flowId:e},i),{children:({flow:l,handleDismiss:d,handlePrimary:u,handleSecondary:m,parentProps:{containerProps:g,dismissible:b},step:h})=>{var w,v,F,O,D,M;let P=(w=h.props)!=null?w:{},T=(F=(v=h.primaryButton)==null?void 0:v.title)!=null?F:h.primaryButtonTitle,B=(D=(O=h.secondaryButton)==null?void 0:O.title)!=null?D:h.secondaryButtonTitle,S=h.$state.blocked;return jsxRuntime.jsx($,p(a(a({part:["announcement",o],textAlign:"center"},g),s),{onEscapeKeyDown:k=>{if(t.dismissible===!1){k.preventDefault();return}typeof t.onEscapeKeyDown=="function"&&t.onEscapeKeyDown(k),k.defaultPrevented||d(k);},children:jsxRuntime.jsxs(C.Column,p(a({gap:5,part:"announcement-step"},P),{children:[b&&jsxRuntime.jsx($.Dismiss,{onClick:d}),jsxRuntime.jsxs(C.Column,{gap:1,part:"announcement-header",children:[jsxRuntime.jsx($.Title,{children:h.title}),jsxRuntime.jsx($.Subtitle,{children:h.subtitle})]}),jsxRuntime.jsx($.Media,{aspectRatio:"1.5",objectFit:"cover",overflowClipMargin:"unset",src:(M=h.videoUri)!=null?M:h.imageUri,transform:"translate3d(0, 0, 1px)",type:h.videoUri?"video":"image",width:"100%"}),jsxRuntime.jsx($.ProgressDots,{current:l.getCurrentStepIndex(),total:l.getNumberOfAvailableSteps()}),jsxRuntime.jsxs(C.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[B&&jsxRuntime.jsx($.Secondary,{disabled:S,onClick:m,title:B}),T&&jsxRuntime.jsx($.Primary,{disabled:S,onClick:u,title:T})]})]}))}))}}))}function ot(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function So(...e){let o=e.shift(),t=e.length===1?e[0]:So(...e);if(!ot(o)||!ot(t))throw new Error("deepmerge can only merge Objects");let n=structuredClone(o);return Object.entries(t).forEach(([r,i])=>{ot(i)?n[r]!==void 0?Object.assign(n,{[r]:So(n[r],structuredClone(i))}):Object.assign(n,{[r]:structuredClone(i)}):Array.isArray(i)?n[r]!==void 0?Object.assign(n,{[r]:[...n[r],...structuredClone(i)]}):Object.assign(n,{[r]:structuredClone(i)}):Object.assign(n,{[r]:i});}),n}function ps(...e){for(let o of e)if(o!=null&&o.length>0)return o;return null}function ds(t){var n=t,{title:e}=n,o=f(n,["title"]);return jsxRuntime.jsx(U,p(a({as:null},o),{children:({flow:r,parentProps:{containerProps:i},step:s})=>{var g,b,h;let l=ps(e,r.title,s.title),d=(g=r==null?void 0:r.getNumberOfCompletedSteps())!=null?g:0,u=(b=r==null?void 0:r.getNumberOfAvailableSteps())!=null?b:1,m=i.onClick!=null;return m&&(i.css=So({"&:hover":{backgroundColor:"var(--fr-colors-neutral-hover-background)"}},(h=i.css)!=null?h:{})),jsxRuntime.jsxs(x,p(a({"aria-label":"Progress Badge",borderWidth:"md",cursor:m?"pointer":"auto",gap:"1",p:"3",part:"progress-badge",role:"complementary"},i),{children:[jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:"2",part:"progress-badge-header",children:[jsxRuntime.jsx(x.Title,{fontSize:"sm",lineHeight:"sm",children:l}),jsxRuntime.jsx(y,{as:ao,height:"20px",marginLeft:"auto",marginRight:"-1",transform:"rotate(-90deg)",width:"20px"})]}),jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:"2",part:"progress-badge-footer",children:[jsxRuntime.jsx(Ee,{current:d,fontSize:"xs",fontWeight:"medium",lineHeight:"xs",total:u}),jsxRuntime.jsx(oo,{current:d,flexGrow:"1",total:u})]})]}))}}))}var us=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function Qr(n){var r=n,{style:e={},part:o=""}=r,t=f(r,["style","part"]);return jsxRuntime.jsxs(y,p(a({part:`dot-wrapper ${o}`,style:a({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${us}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]}))}function en({props:e,alignAttr:o,sideAttr:t}){let n=t!=null?t:"bottom",r={},i=()=>{var u;if(["after","before"].includes(e.align)){if(o=="start")return "before";if(o=="end")return "after"}return (u=e.align)!=null?u:"after"},s="-24px",l={top:"bottom",right:"left",bottom:"top",left:"right"};r[l[n]]=s;let d=i();return ["before","end"].includes(d)?["top","bottom"].includes(n)?r.right=s:r.bottom=s:["after","start"].includes(d)?["top","bottom"].includes(n)?r.left=s:r.top=s:["top","bottom"].includes(n)?r.left=`calc(50% + ${s})`:r.top=`calc(50% + ${s})`,r}var wo={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["modal","onOpenChange"]};function on(e,o){var i,s,l,d,u;let t=Object.fromEntries(wo.content.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),n=Object.fromEntries(wo.root.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),r={};for(let m of Object.keys(e))!wo.content.includes(m)&&!wo.root.includes(m)&&(r[m]=e[m]);if(t.align=(i=t.align)!=null?i:"after",t.side=(s=t.side)!=null?s:"bottom",["before","after"].includes(t.align)){let m={after:"end",before:"start"},g=(S,w)=>["top","bottom"].includes(w)?S=="after"?"marginLeft":"marginRight":S=="after"?"marginTop":"marginBottom",b=(l=t.alignOffset)!=null?l:0,h=(d=t.style)!=null?d:{},P=(u=t.side)!=null?u:"bottom",T=t.align;t.style=p(a({},h),{[g(T,P)]:b});let B=["top","bottom"].includes(P)?o.width:o.height;t.alignOffset=(B+b)*-1,t.align=m[T];}return {contentProps:t,otherProps:r,rootProps:n}}var tn=react.keyframes`
107
107
  from {
108
108
  opacity: 0;
109
109
  }
@@ -113,35 +113,35 @@ var it=Object.defineProperty,an=Object.defineProperties;var sn=Object.getOwnProp
113
113
  to {
114
114
  opacity: 1;
115
115
  }
116
- `;function rn(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function be(u){var m=u,{anchor:e,children:o,className:t,defaultOpen:n=!0,open:r,part:i,spotlight:s=!1,style:l={}}=m,d=f(m,["anchor","children","className","defaultOpen","open","part","spotlight","style"]);let{node:g,rect:b,ref:h}=mo(),{node:P,rect:T,ref:B}=mo(),{contentProps:S,otherProps:w,rootProps:v}=on(d,b),[F,O]=Eo.useState(n),[D,M]=Eo.useState(S.align),[k,H]=Eo.useState(S.side),[A,J]=Eo.useState(0),[Re,Te]=Eo.useState(0);function j(){return r!=null?(console.log("OVERRIDE: ",r),r):(console.log("INTERNAL: ",F),F)}if(g!==null){let N=g.getAttribute("data-align"),Q=g.getAttribute("data-side");D!==N&&M(N),k!==Q&&H(Q);}let re=Eo.useRef(null);if(Eo.useEffect(()=>{let N=document.querySelector(e);N!=null?(B(N),re.current=N):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),Eo.useEffect(()=>{function N(le){if(le.matches(e))return rn(le)?le:null;let ne=le.querySelectorAll(e);return ne.length>0&&rn(ne[0])?ne[0]:null}let Q=new MutationObserver(le=>{for(let ne of le)if(ne.type==="childList"){for(let ye of ne.addedNodes){if(ye.nodeType!==Node.ELEMENT_NODE)continue;let ie=N(ye);if(ie!=null){B(ie),re.current=ie,console.debug("[frigade] Tooltip: MutationObserver added anchor: ",ie);break}}for(let ye of ne.removedNodes){if(ye.nodeType!==Node.ELEMENT_NODE)continue;let ie=N(ye);if(ie!=null){B(null),re.current=null,console.debug("[frigade] Tooltip: MutationObserver removed anchor: ",ie);break}}}});return Q.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>Q.disconnect()},[]),Eo.useEffect(()=>{let{scrollX:N,scrollY:Q}=window;J(T.left+N),Te(T.top+Q);},[T.left,T.top]),P==null)return null;let se="0";typeof window!="undefined"&&(se=window.getComputedStyle(P).borderRadius);let Y=en({props:d,alignAttr:D,sideAttr:k});return jsxRuntime.jsxs(ae__namespace.Root,p(a({defaultOpen:!0},v),{children:[jsxRuntime.jsx(ae__namespace.Anchor,{virtualRef:re}),jsxRuntime.jsx(ae__namespace.Portal,{children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(y,a({animation:`${tn} 300ms ease-out`,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",part:"tooltip-spotlight",pointerEvents:"none",position:"absolute",style:{borderRadius:se,height:T.height,left:A,top:Re,width:T.width}},d.zIndex!=null?{zIndex:d.zIndex}:{})),jsxRuntime.jsx(ae__namespace.Content,p(a({},S),{ref:h,children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[j()&&jsxRuntime.jsx(x,p(a({animation:`${tn} 300ms ease-out`,boxShadow:"md",position:"relative",className:t,maxWidth:"min(360px, calc(100vw - 25px))",part:["tooltip",i],style:l},w),{children:o})),jsxRuntime.jsx(Qr,{onClick:()=>{O(()=>(typeof v.onOpenChange=="function"&&v.onOpenChange(!j()),!j()));},style:Y})]})}),F)]})})]}))}be.Close=e=>jsxRuntime.jsx(ae__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(I.Plain,p(a({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsxRuntime.jsx(Be,{height:"20",fill:"currentColor"})}))});be.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsxRuntime.jsx(he,a({aspectRatio:"2",borderRadius:"md md 0 0",borderWidth:"0",margin:"-5 -5 0",objectFit:"cover",overflowClipMargin:"unset",src:e,transform:"translate3d(0, 0, 1px)"},o))};be.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Primary,a({title:o,onClick:e},t))};be.Progress=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(R.Body2,p(a({part:"progress"},o),{children:e}))};be.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Secondary,a({title:o,onClick:e},t))};be.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(R.Body2,p(a({part:"subtitle"},o),{children:e}))};be.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(R.H4,p(a({part:"title"},o),{children:e}))};function xs(){let{userId:e,frigade:o}=Eo.useContext(L);function t(r){return W(this,null,function*(){yield o.identify(e,r);})}function n(r,i){return W(this,null,function*(){yield o.track(r,i);})}return {userId:e,addProperties:t,track:n}}function bs(){var r;let{frigade:e}=Eo.useContext(L);function o(i){return W(this,null,function*(){if(!e.config.groupId){console.error("No Group ID is set. Cannot set properties without a Group ID.");return}yield e.group(e.config.groupId,i);})}function t(i,s){return W(this,null,function*(){yield e.track(i,s);})}function n(i,s){return W(this,null,function*(){yield e.group(i,s);})}return {groupId:(r=e==null?void 0:e.config)==null?void 0:r.groupId,setGroupId:n,addProperties:o,track:t}}
116
+ `;function rn(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function be(u){var m=u,{anchor:e,children:o,className:t,defaultOpen:n=!0,open:r,part:i,spotlight:s=!1,style:l={}}=m,d=f(m,["anchor","children","className","defaultOpen","open","part","spotlight","style"]);let{node:g,rect:b,ref:h}=mo(),{node:P,rect:T,ref:B}=mo(),{contentProps:S,otherProps:w,rootProps:v}=on(d,b),[F,O]=Eo.useState(n),[D,M]=Eo.useState(S.align),[k,I]=Eo.useState(S.side),[A,J]=Eo.useState(0),[Re,Te]=Eo.useState(0);function j(){return r!=null?(console.log("OVERRIDE: ",r),r):(console.log("INTERNAL: ",F),F)}if(g!==null){let N=g.getAttribute("data-align"),Q=g.getAttribute("data-side");D!==N&&M(N),k!==Q&&I(Q);}let re=Eo.useRef(null);if(Eo.useEffect(()=>{let N=document.querySelector(e);N!=null?(B(N),re.current=N):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),Eo.useEffect(()=>{function N(le){if(le.matches(e))return rn(le)?le:null;let ne=le.querySelectorAll(e);return ne.length>0&&rn(ne[0])?ne[0]:null}let Q=new MutationObserver(le=>{for(let ne of le)if(ne.type==="childList"){for(let ye of ne.addedNodes){if(ye.nodeType!==Node.ELEMENT_NODE)continue;let ie=N(ye);if(ie!=null){B(ie),re.current=ie,console.debug("[frigade] Tooltip: MutationObserver added anchor: ",ie);break}}for(let ye of ne.removedNodes){if(ye.nodeType!==Node.ELEMENT_NODE)continue;let ie=N(ye);if(ie!=null){B(null),re.current=null,console.debug("[frigade] Tooltip: MutationObserver removed anchor: ",ie);break}}}});return Q.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>Q.disconnect()},[]),Eo.useEffect(()=>{let{scrollX:N,scrollY:Q}=window;J(T.left+N),Te(T.top+Q);},[T.left,T.top]),P==null)return null;let se="0";typeof window!="undefined"&&(se=window.getComputedStyle(P).borderRadius);let Y=en({props:d,alignAttr:D,sideAttr:k});return jsxRuntime.jsxs(ae__namespace.Root,p(a({defaultOpen:!0},v),{children:[jsxRuntime.jsx(ae__namespace.Anchor,{virtualRef:re}),jsxRuntime.jsx(ae__namespace.Portal,{children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(y,a({animation:`${tn} 300ms ease-out`,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",part:"tooltip-spotlight",pointerEvents:"none",position:"absolute",style:{borderRadius:se,height:T.height,left:A,top:Re,width:T.width}},d.zIndex!=null?{zIndex:d.zIndex}:{})),jsxRuntime.jsx(ae__namespace.Content,p(a({},S),{ref:h,children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[j()&&jsxRuntime.jsx(x,p(a({animation:`${tn} 300ms ease-out`,boxShadow:"md",position:"relative",className:t,maxWidth:"min(360px, calc(100vw - 25px))",part:["tooltip",i],style:l},w),{children:o})),jsxRuntime.jsx(Qr,{onClick:()=>{O(()=>(typeof v.onOpenChange=="function"&&v.onOpenChange(!j()),!j()));},style:Y})]})}),F)]})})]}))}be.Close=e=>jsxRuntime.jsx(ae__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(H.Plain,p(a({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsxRuntime.jsx(Be,{height:"20",fill:"currentColor"})}))});be.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsxRuntime.jsx(he,a({aspectRatio:"2",borderRadius:"md md 0 0",borderWidth:"0",margin:"-5 -5 0",objectFit:"cover",overflowClipMargin:"unset",src:e,transform:"translate3d(0, 0, 1px)"},o))};be.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(H.Primary,a({title:o,onClick:e},t))};be.Progress=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(R.Body2,p(a({part:"progress"},o),{children:e}))};be.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(H.Secondary,a({title:o,onClick:e},t))};be.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(R.Body2,p(a({part:"subtitle"},o),{children:e}))};be.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(R.H4,p(a({part:"title"},o),{children:e}))};function xs(){let{userId:e,frigade:o}=Eo.useContext(L);function t(r){return W(this,null,function*(){yield o.identify(e,r);})}function n(r,i){return W(this,null,function*(){yield o.track(r,i);})}return {userId:e,addProperties:t,track:n}}function bs(){var r;let{frigade:e}=Eo.useContext(L);function o(i){return W(this,null,function*(){if(!e.config.groupId){console.error("No Group ID is set. Cannot set properties without a Group ID.");return}yield e.group(e.config.groupId,i);})}function t(i,s){return W(this,null,function*(){yield e.track(i,s);})}function n(i,s){return W(this,null,function*(){yield e.group(i,s);})}return {groupId:(r=e==null?void 0:e.config)==null?void 0:r.groupId,setGroupId:n,addProperties:o,track:t}}
117
117
 
118
118
  exports.FrigadeJS = js__namespace;
119
- exports.Announcement = Xo;
119
+ exports.Announcement = Jo;
120
120
  exports.Banner = Oo;
121
121
  exports.BaseField = te;
122
122
  exports.Box = y;
123
- exports.Button = I;
123
+ exports.Button = H;
124
124
  exports.Card = x;
125
125
  exports.Checklist = no;
126
- exports.Collection = jo;
126
+ exports.Collection = Xo;
127
127
  exports.Dialog = $;
128
128
  exports.Flex = C;
129
129
  exports.Flow = U;
130
130
  exports.Form = Me;
131
- exports.Hint = Ko;
131
+ exports.Hint = jo;
132
132
  exports.Image = bo;
133
- exports.Label = Mo;
133
+ exports.Label = Wo;
134
134
  exports.Media = he;
135
135
  exports.Progress = Ce;
136
136
  exports.ProgressBadge = ds;
137
137
  exports.Provider = zr;
138
- exports.RadioField = Vo;
139
- exports.SelectField = Lo;
140
- exports.Spotlight = _o;
138
+ exports.RadioField = Lo;
139
+ exports.SelectField = No;
140
+ exports.Spotlight = Uo;
141
141
  exports.Survey = co;
142
142
  exports.Text = R;
143
- exports.TextField = No;
144
- exports.TextareaField = zo;
143
+ exports.TextField = zo;
144
+ exports.TextareaField = _o;
145
145
  exports.Tooltip = be;
146
146
  exports.Tour = go;
147
147
  exports.Video = Po;
@@ -149,10 +149,10 @@ exports.themeVariables = Ro;
149
149
  exports.tokens = Ze;
150
150
  exports.useBoundingClientRect = mo;
151
151
  exports.useFlow = Fe;
152
- exports.useFlowHandlers = Zo;
153
- exports.useFrigade = Jo;
152
+ exports.useFlowHandlers = Yo;
153
+ exports.useFrigade = qo;
154
154
  exports.useGroup = bs;
155
- exports.useModal = Yo;
155
+ exports.useModal = Qo;
156
156
  exports.useStepHandlers = ue;
157
157
  exports.useUser = xs;
158
158
  //# sourceMappingURL=out.js.map