@frigade/react 2.5.2 → 2.5.3

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 V__namespace = /*#__PURE__*/_interopNamespace(V);
51
51
  var no__namespace = /*#__PURE__*/_interopNamespace(no);
52
52
  var re__namespace = /*#__PURE__*/_interopNamespace(re);
53
53
 
54
- var qo=Object.defineProperty,_r=Object.defineProperties;var Ur=Object.getOwnPropertyDescriptors;var je=Object.getOwnPropertySymbols;var Zo=Object.prototype.hasOwnProperty,Yo=Object.prototype.propertyIsEnumerable;var Jo=(e,o,t)=>o in e?qo(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,i=(e,o)=>{for(var t in o||(o={}))Zo.call(o,t)&&Jo(e,t,o[t]);if(je)for(var t of je(o))Yo.call(o,t)&&Jo(e,t,o[t]);return e},s=(e,o)=>_r(e,Ur(o));var Gr=(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 u=(e,o)=>{var t={};for(var n in e)Zo.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&&Yo.call(e,n)&&(t[n]=e[n]);return t};var ie=(e,o)=>{for(var t in o)qo(e,t,{get:o[t],enumerable:!0});};var M=(e,o,t)=>new Promise((n,r)=>{var a=d=>{try{l(t.next(d));}catch(m){r(m);}},p=d=>{try{l(t.throw(d));}catch(m){r(m);}},l=d=>d.done?n(d.value):Promise.resolve(d.value).then(a,p);l((t=t.apply(e,o)).next());});function Fe(e){return jsxRuntime.jsx("svg",s(i({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 et={borderWidths:{md:"1px"}};var Xe=[5,10,20,35,50,65,80,95,98],ot=[...Xe],ho=[...Xe];ot[4]=40;ho[4]=60;var Kr={blue:{h:213,s:100,l:Xe},gray:{h:220,s:10,l:Xe},green:{h:141,s:90,l:ot},red:{h:9,s:90,l:ho},yellow:{h:50,s:90,l:ho}};var A={};for(let[e,{h:o,s:t,l:n}]of Object.entries(Kr))A[e]=Object.fromEntries(n.map((r,a)=>[`${(a+1)*100}`,`hsl(${o} ${t}% ${r}%)`]));var tt=s(i({black:"hsl(0 0% 0%)",white:"hsl(0 0% 100%)"},A),{gray100:A.gray[100],gray200:A.gray[200],gray300:A.gray[300],gray400:A.gray[400],gray500:A.gray[500],gray600:A.gray[600],gray700:A.gray[700],gray800:A.gray[800],gray900:A.gray[900],blue400:A.blue[400],blue500:A.blue[500],blue800:A.blue[800],blue900:A.blue[900],green400:A.blue[400],green500:A.green[500],green800:A.green[800],red500:A.red[500],transparent:"#FFFFFF00",inherit:"inherit"});var rt={md:"8px",lg:"20px",round:"50%"};var c=e=>`var(--fr-colors-${e})`,nt={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("white"),border:c("neutral-900"),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 it={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var jr="px",Xr=e=>typeof e=="number"?`${4*e}${jr}`:e,Jr=[-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"],at=Object.fromEntries(Jr.map(e=>[e,Xr(e)]));var st={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 Je=s(i(s(i({},et),{colors:i(i({},tt),nt)}),st),{radii:rt,shadows:it,space:at});function Me(e,o="",t="."){return Object.keys(e).reduce((n,r)=>{let p=`${o.length?`${o}${t}`:""}${r}`,l=e[r];return typeof l=="object"&&l!==null&&!Array.isArray(l)?Object.assign(n,Me(l,p,t)):n[p]=l,n},{})}function bo(e){let o=Me(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 lt(e,o="--fr"){let t={};return Object.keys(e).forEach(n=>{let r=e[n],a=n.replace(/\./g,"-");typeof r=="object"&&r!==null&&!Array.isArray(r)?t[n]=lt(r,`${o}-${n}`):t[n]=`var(${o}-${a})`;}),t}var Po=bo(Je),D=lt(Je);var Zr=new Set(["alt","size","src"]),Yr=qr__default.default.all.filter(e=>e.indexOf("-")!=0&&!Zr.has(e)).map(e=>[e.replace(/-([a-z])/g,(o,t)=>t.toUpperCase()),null]),Qr=Object.fromEntries(Yr),qe=Me(D.colors),en={color:qe,backgroundColor:qe,borderColor:qe,border:i(i({},D.borderWidths),qe),borderRadius:D.radii,borderWidth:D.borderWidths,boxShadow:D.shadows,fontFamily:D.fontFamilies,fontSize:D.fontSizes,fontWeight:D.fontWeights,gap:D.space,lineHeight:D.lineHeights,margin:D.space,marginBottom:D.space,marginLeft:D.space,marginRight:D.space,marginTop:D.space,padding:D.space,paddingBottom:D.space,paddingLeft:D.space,paddingRight:D.space,paddingTop:D.space},pt=i(i({},Qr),en),dt={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 on(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 mt=new Map(Object.entries(pt).map(([e,o])=>[e,on(o)])),tn=new Map(Object.entries(dt).map(([e,o])=>[e,new Set(o)])),rn=new Set(["height","width"]),nn=new Set(["canvas","embed","iframe","img","input","object","video"]);function ut(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(a){if(a==null)return n;let l=`&:${a.replace(/[A-Z]/g,d=>`-${d.toLocaleLowerCase()}`)}`;return n[l]==null&&(n[l]={}),n[l]}return Object.entries(t).forEach(([a,p])=>{let[l,d]=ut(a),m=tn.get(l);m!=null&&(m.forEach(f=>{let y=`${f}${d?":"+d:""}`;t[y]=p;}),delete t[a]);}),Object.entries(t).forEach(([a,p])=>{let[l,d]=ut(a),m=mt.get(l);if(m!=null){if(p==null)delete t[a];else if(typeof p=="string"&&p.indexOf(" ")>-1){let f=p.split(" ");r(d)[l]=f.map(y=>{var h;return (h=m.get(y.toString()))!=null?h:y}).join(" ");}else m.has(p.toString())?r(d)[l]=m.get(p.toString()):r(d)[l]=p;(typeof o!="string"||!nn.has(o)||!rn.has(l))&&delete t[a];}}),Object.keys(t).forEach(a=>{let p=a.substring(1);a.indexOf("_")===0&&mt.has(p)&&(t[p]=t[a],delete t[a]);}),{cssFromProps:n,unmatchedProps:t}}function sn(){if(typeof window=="undefined"){let{JSDOM:e}=Gr("jsdom");return new e("<!DOCTYPE html>").window}return window}function gt(e){return e?{__html:an__default.default(sn()).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 pn(e){return e&&`fr-${e}`}function ht(e){return e&&(Array.isArray(e)?e.filter(o=>o!=null).map(o=>ht(o)).join(" "):pn(e))}function dn(l,p){var d=l,{as:e,children:o,className:t,css:n={},part:r}=d,a=u(d,["as","children","className","css","part"]);let m=e!=null?e:"div",{cssFromProps:f,unmatchedProps:y}=ft(a,m),h=ht(r),x=t||h?clsx.clsx(t,h):void 0,R=[{boxSizing:"border-box"},f,n];return typeof o=="string"?jsxRuntime.jsx(m,s(i({className:x,css:R},y),{ref:p,dangerouslySetInnerHTML:gt(o)})):jsxRuntime.jsx(m,s(i({className:x,css:R},y),{ref:p,children:o}))}var g=Fo__namespace.forwardRef(dn);var O={};ie(O,{Link:()=>Vn,Plain:()=>Ln,Primary:()=>An,Secondary:()=>Wn});var F={};ie(F,{Body1:()=>Bn,Body2:()=>Tn,Caption:()=>kn,Display1:()=>Cn,Display2:()=>Sn,H1:()=>wn,H2:()=>Fn,H3:()=>vn,H4:()=>Rn});var Co={};ie(Co,{Body1:()=>xn,Body2:()=>hn,Caption:()=>bn,Display1:()=>cn,Display2:()=>mn,H1:()=>un,H2:()=>fn,H3:()=>gn,H4:()=>yn});var ae={color:"neutral.foreground",fontFamily:"default",margin:"0"},cn=s(i({},ae),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),mn=s(i({},ae),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),un=s(i({},ae),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),fn=s(i({},ae),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),gn=s(i({},ae),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),yn=s(i({},ae),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),xn=s(i({},ae),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),hn=s(i({},ae),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),bn=s(i({},ae),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var Pn=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],se=Object.fromEntries(Pn.map(e=>{let o=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",t=Fo__namespace.forwardRef((l,p)=>{var d=l,{as:n=o,children:r}=d,a=u(d,["as","children"]);return jsxRuntime.jsx(g,s(i(i({as:n},Co[e]),a),{ref:p,children:r}))});return t.displayName=`Text.${e}`,[e,t]})),Cn=se.Display1,Sn=se.Display2,wn=se.H1,Fn=se.H2,vn=se.H3,Rn=se.H4,Bn=se.Body1,Tn=se.Body2,kn=se.Caption;var wo={};ie(wo,{Link:()=>Hn,Plain:()=>$n,Primary:()=>On,Secondary:()=>In,loadingCSSStyle:()=>So});var Ze={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},On=s(i({},Ze),{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"}),In=s(i({},Ze),{backgroundColor:"secondary.background",borderColor:"secondary.border",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background","backgroundColor:disabled":"secondary.background","opacity:disabled":"0.6"}),Hn=s(i({},Ze),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),$n=s(i({},Ze),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),Mn=react.keyframes({from:{transform:"rotate(0turn)"},to:{transform:"rotate(1turn)"}}),So={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:Mn+" 1s ease infinite"}};function Ye(p){var l=p,{as:e,children:o,part:t,title:n,variant:r="Primary"}=l,a=u(l,["as","children","part","title","variant"]);var m;let d=r.toLocaleLowerCase();return jsxRuntime.jsxs(g,s(i(s(i({as:e!=null?e:"button",part:[`button-${d}`,t]},wo[r]),{css:i(i({},(m=a.css)!=null?m:{}),a.loading?So:{})}),a),{loading:void 0,children:[o,n&&jsxRuntime.jsx(F.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"medium",lineHeight:"20px",part:"button-title",textWrap:"nowrap",children:n})]}))}function An(t){var n=t,{children:e}=n,o=u(n,["children"]);return jsxRuntime.jsx(Ye,s(i({},o),{variant:"Primary",children:e}))}function Wn(t){var n=t,{children:e}=n,o=u(n,["children"]);return jsxRuntime.jsx(Ye,s(i({},o),{variant:"Secondary",children:e}))}function Vn(t){var n=t,{children:e}=n,o=u(n,["children"]);return jsxRuntime.jsx(Ye,s(i({},o),{variant:"Link",children:e}))}function Ln(t){var n=t,{children:e}=n,o=u(n,["children"]);return jsxRuntime.jsx(Ye,s(i({},o),{variant:"Plain",children:e}))}var S={};ie(S,{Column:()=>_n,Row:()=>zn});var zn=Fo__namespace.forwardRef((e,o)=>jsxRuntime.jsx(g,s(i({display:"flex",flexDirection:"row"},e),{ref:o}))),_n=Fo__namespace.forwardRef((e,o)=>jsxRuntime.jsx(g,s(i({display:"flex",flexDirection:"column"},e),{ref:o})));function vo(r){var a=r,{dismissible:e,flowId:o,part:t}=a,n=u(a,["dismissible","flowId","part"]);return jsxRuntime.jsx(_,s(i({as:null,flowId:o},n),{children:({handleDismiss:p,handlePrimary:l,handleSecondary:d,parentProps:{containerProps:m},step:f})=>{var B,T,w,P,C;let y=(B=f.props)!=null?B:{},h=(w=(T=f.primaryButton)==null?void 0:T.title)!=null?w:f.primaryButtonTitle,x=(C=(P=f.secondaryButton)==null?void 0:P.title)!=null?C:f.secondaryButtonTitle,R=f.$state.blocked;return jsxRuntime.jsxs(b,s(i(i({alignItems:"center",borderWidth:"md",display:"flex",flexDirection:"row",gap:3,justifyContent:"flex-start",part:["banner",t]},m),y),{children:[f.imageUri&&jsxRuntime.jsx(g,{as:"img",part:"image",src:f.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxRuntime.jsxs(S.Column,{marginInlineEnd:"auto",part:"banner-title-wrapper",children:[jsxRuntime.jsx(b.Title,{part:"title",children:f.title}),jsxRuntime.jsx(b.Subtitle,{part:"subtitle",children:f.subtitle})]}),jsxRuntime.jsx(b.Secondary,{disabled:R,title:x,onClick:d}),jsxRuntime.jsx(b.Primary,{disabled:R,title:h,onClick:l}),e&&jsxRuntime.jsx(b.Dismiss,{onClick:p})]}))}}))}var to={};ie(to,{Carousel:()=>Vt,Collapsible:()=>oo,CollapsibleStep:()=>Ve});var Re={};ie(Re,{Bar:()=>ve,Dots:()=>Ft,Fraction:()=>Qe,Segments:()=>Rt});function ve(n){var r=n,{current:e,total:o}=r,t=u(r,["current","total"]);let a=o>0?Math.min(e/o,1):0,p=a===0?"10px":`${100*a}%`;return jsxRuntime.jsx(g,s(i({part:"progress-bar",backgroundColor:"neutral.800",borderRadius:"md",height:"10px"},t),{children:jsxRuntime.jsx(g,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:p},transition:"width 300ms ease-out"})}))}function Ft(n){var r=n,{current:e,total:o}=r,t=u(r,["current","total"]);if(o==1)return null;let a=[...Array(o)].map((p,l)=>jsxRuntime.jsx(g,{as:"circle",r:4,cx:4+16*l,cy:"4px",fill:e-1===l?D.colors.blue500:D.colors.blue800},l));return jsxRuntime.jsx(g,s(i({as:"svg",height:"8px",part:"progress-dots",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8},t),{children:a}))}function Qe(n){var r=n,{current:e,total:o}=r,t=u(r,["current","total"]);return jsxRuntime.jsx(F.Body2,s(i({part:"progress-fraction"},t),{children:`${e}/${o}`}))}function Rt(n){var r=n,{current:e,total:o}=r,t=u(r,["current","total"]);let a=[...Array(o)].map((p,l)=>jsxRuntime.jsx(g,{backgroundColor:e-1===l?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%"},l));return jsxRuntime.jsx(S.Row,s(i({gap:1,height:"10px",part:"progress-segments"},t),{children:a}))}function Tt(e){return jsxRuntime.jsx("svg",s(i({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 Gn(){return jsxRuntime.jsx(g,{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 kt(t){var n=t,{checked:e=!1}=n,o=u(n,["checked"]);return jsxRuntime.jsx(g,s(i({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(g,{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(Gn,{})})}))}function le(e,{onPrimary:o,onSecondary:t}={}){let{navigate:n}=Fo.useContext(z),r={"flow.back":()=>e.flow.back(),"flow.complete":()=>e.flow.complete(),"flow.forward":()=>e.flow.forward(),"flow.restart":()=>e.flow.restart(),"flow.skip":()=>e.flow.skip(),"flow.start":()=>e.flow.start(),"step.complete":()=>e.complete(),"step.skip":()=>e.skip(),"step.reset":()=>e.reset(),"step.start":()=>e.start()};return {handlePrimary:Fo.useCallback((a,p,l=!0)=>M(this,null,function*(){if((yield o==null?void 0:o(e,a,p))===!1)return a.preventDefault(),!1;if(e.primaryButton!=null){let m=e.primaryButton.action===!1?!1:r[e.primaryButton.action];typeof m=="function"?m():m!==!1&&(yield e.complete(p,l)),e.primaryButton.uri!=null&&n(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(p,l),e.primaryButtonUri!=null&&n(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:Fo.useCallback((a,p)=>M(this,null,function*(){if((yield t==null?void 0:t(e,a,p))===!1)return a.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(p),e.secondaryButton.uri!=null&&n(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(p),e.secondaryButtonUri!=null&&n(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}function Dt({onPrimary:e,onSecondary:o,step:t}){var m,f;let{handlePrimary:n,handleSecondary:r}=le(t,{onPrimary:e,onSecondary:o}),{blocked:a,completed:p,skipped:l}=t.$state,d=p||l||!a?jsxRuntime.jsx(kt,{checked:p||l,marginLeft:"auto"}):jsxRuntime.jsx(g,{as:Tt,height:"22px",marginLeft:"auto",width:"22px"});return jsxRuntime.jsxs(b,{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:a,opacity:a?.5:1,children:[jsxRuntime.jsxs(S.Row,{marginBottom:"2",part:"carousel-step-header",children:[t.iconUri&&jsxRuntime.jsx(b.Media,{borderRadius:"0",height:"24px",src:t.iconUri,width:"24px"}),d]}),jsxRuntime.jsx(b.Title,{children:t.title}),jsxRuntime.jsx(b.Subtitle,{children:t.subtitle}),jsxRuntime.jsxs(S.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(b.Secondary,{disabled:a,onClick:r,title:(m=t.secondaryButton)==null?void 0:m.title}),jsxRuntime.jsx(b.Primary,{disabled:a,onClick:n,title:(f=t.primaryButton)==null?void 0:f.title})]})]})}function It(e){return jsxRuntime.jsx("svg",s(i({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",s(i({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 Mt=react.keyframes`
54
+ var qo=Object.defineProperty,_r=Object.defineProperties;var Ur=Object.getOwnPropertyDescriptors;var je=Object.getOwnPropertySymbols;var Zo=Object.prototype.hasOwnProperty,Yo=Object.prototype.propertyIsEnumerable;var Jo=(e,o,t)=>o in e?qo(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,i=(e,o)=>{for(var t in o||(o={}))Zo.call(o,t)&&Jo(e,t,o[t]);if(je)for(var t of je(o))Yo.call(o,t)&&Jo(e,t,o[t]);return e},s=(e,o)=>_r(e,Ur(o));var Gr=(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)Zo.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&&Yo.call(e,n)&&(t[n]=e[n]);return t};var ie=(e,o)=>{for(var t in o)qo(e,t,{get:o[t],enumerable:!0});};var M=(e,o,t)=>new Promise((n,r)=>{var a=d=>{try{l(t.next(d));}catch(m){r(m);}},p=d=>{try{l(t.throw(d));}catch(m){r(m);}},l=d=>d.done?n(d.value):Promise.resolve(d.value).then(a,p);l((t=t.apply(e,o)).next());});function Fe(e){return jsxRuntime.jsx("svg",s(i({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 et={borderWidths:{md:"1px"}};var Xe=[5,10,20,35,50,65,80,95,98],ot=[...Xe],ho=[...Xe];ot[4]=40;ho[4]=60;var Kr={blue:{h:213,s:100,l:Xe},gray:{h:220,s:10,l:Xe},green:{h:141,s:90,l:ot},red:{h:9,s:90,l:ho},yellow:{h:50,s:90,l:ho}};var A={};for(let[e,{h:o,s:t,l:n}]of Object.entries(Kr))A[e]=Object.fromEntries(n.map((r,a)=>[`${(a+1)*100}`,`hsl(${o} ${t}% ${r}%)`]));var tt=s(i({black:"hsl(0 0% 0%)",white:"hsl(0 0% 100%)"},A),{gray100:A.gray[100],gray200:A.gray[200],gray300:A.gray[300],gray400:A.gray[400],gray500:A.gray[500],gray600:A.gray[600],gray700:A.gray[700],gray800:A.gray[800],gray900:A.gray[900],blue400:A.blue[400],blue500:A.blue[500],blue800:A.blue[800],blue900:A.blue[900],green400:A.blue[400],green500:A.green[500],green800:A.green[800],red500:A.red[500],transparent:"#FFFFFF00",inherit:"inherit"});var rt={md:"8px",lg:"20px",round:"50%"};var c=e=>`var(--fr-colors-${e})`,nt={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("white"),border:c("neutral-900"),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 it={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var jr="px",Xr=e=>typeof e=="number"?`${4*e}${jr}`:e,Jr=[-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"],at=Object.fromEntries(Jr.map(e=>[e,Xr(e)]));var st={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 Je=s(i(s(i({},et),{colors:i(i({},tt),nt)}),st),{radii:rt,shadows:it,space:at});function Me(e,o="",t="."){return Object.keys(e).reduce((n,r)=>{let p=`${o.length?`${o}${t}`:""}${r}`,l=e[r];return typeof l=="object"&&l!==null&&!Array.isArray(l)?Object.assign(n,Me(l,p,t)):n[p]=l,n},{})}function bo(e){let o=Me(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 lt(e,o="--fr"){let t={};return Object.keys(e).forEach(n=>{let r=e[n],a=n.replace(/\./g,"-");typeof r=="object"&&r!==null&&!Array.isArray(r)?t[n]=lt(r,`${o}-${n}`):t[n]=`var(${o}-${a})`;}),t}var Po=bo(Je),D=lt(Je);var Zr=new Set(["alt","size","src"]),Yr=qr__default.default.all.filter(e=>e.indexOf("-")!=0&&!Zr.has(e)).map(e=>[e.replace(/-([a-z])/g,(o,t)=>t.toUpperCase()),null]),Qr=Object.fromEntries(Yr),qe=Me(D.colors),en={color:qe,backgroundColor:qe,borderColor:qe,border:i(i({},D.borderWidths),qe),borderRadius:D.radii,borderWidth:D.borderWidths,boxShadow:D.shadows,fontFamily:D.fontFamilies,fontSize:D.fontSizes,fontWeight:D.fontWeights,gap:D.space,lineHeight:D.lineHeights,margin:D.space,marginBottom:D.space,marginLeft:D.space,marginRight:D.space,marginTop:D.space,padding:D.space,paddingBottom:D.space,paddingLeft:D.space,paddingRight:D.space,paddingTop:D.space},pt=i(i({},Qr),en),dt={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 on(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 mt=new Map(Object.entries(pt).map(([e,o])=>[e,on(o)])),tn=new Map(Object.entries(dt).map(([e,o])=>[e,new Set(o)])),rn=new Set(["height","width"]),nn=new Set(["canvas","embed","iframe","img","input","object","video"]);function ut(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(a){if(a==null)return n;let l=`&:${a.replace(/[A-Z]/g,d=>`-${d.toLocaleLowerCase()}`)}`;return n[l]==null&&(n[l]={}),n[l]}return Object.entries(t).forEach(([a,p])=>{let[l,d]=ut(a),m=tn.get(l);m!=null&&(m.forEach(u=>{let y=`${u}${d?":"+d:""}`;t[y]=p;}),delete t[a]);}),Object.entries(t).forEach(([a,p])=>{let[l,d]=ut(a),m=mt.get(l);if(m!=null){if(p==null)delete t[a];else if(typeof p=="string"&&p.indexOf(" ")>-1){let u=p.split(" ");r(d)[l]=u.map(y=>{var h;return (h=m.get(y.toString()))!=null?h:y}).join(" ");}else m.has(p.toString())?r(d)[l]=m.get(p.toString()):r(d)[l]=p;(typeof o!="string"||!nn.has(o)||!rn.has(l))&&delete t[a];}}),Object.keys(t).forEach(a=>{let p=a.substring(1);a.indexOf("_")===0&&mt.has(p)&&(t[p]=t[a],delete t[a]);}),{cssFromProps:n,unmatchedProps:t}}function sn(){if(typeof window=="undefined"){let{JSDOM:e}=Gr("jsdom");return new e("<!DOCTYPE html>").window}return window}function gt(e){return e?{__html:an__default.default(sn()).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 pn(e){return e&&`fr-${e}`}function ht(e){return e&&(Array.isArray(e)?e.filter(o=>o!=null).map(o=>ht(o)).join(" "):pn(e))}function dn(l,p){var d=l,{as:e,children:o,className:t,css:n={},part:r}=d,a=f(d,["as","children","className","css","part"]);let m=e!=null?e:"div",{cssFromProps:u,unmatchedProps:y}=ft(a,m),h=ht(r),x=t||h?clsx.clsx(t,h):void 0,R=[{boxSizing:"border-box"},u,n];return typeof o=="string"?jsxRuntime.jsx(m,s(i({className:x,css:R},y),{ref:p,dangerouslySetInnerHTML:gt(o)})):jsxRuntime.jsx(m,s(i({className:x,css:R},y),{ref:p,children:o}))}var g=Fo__namespace.forwardRef(dn);var O={};ie(O,{Link:()=>Vn,Plain:()=>Ln,Primary:()=>An,Secondary:()=>Wn});var F={};ie(F,{Body1:()=>Bn,Body2:()=>Tn,Caption:()=>kn,Display1:()=>Cn,Display2:()=>Sn,H1:()=>wn,H2:()=>Fn,H3:()=>vn,H4:()=>Rn});var Co={};ie(Co,{Body1:()=>xn,Body2:()=>hn,Caption:()=>bn,Display1:()=>cn,Display2:()=>mn,H1:()=>un,H2:()=>fn,H3:()=>gn,H4:()=>yn});var ae={color:"neutral.foreground",fontFamily:"default",margin:"0"},cn=s(i({},ae),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),mn=s(i({},ae),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),un=s(i({},ae),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),fn=s(i({},ae),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),gn=s(i({},ae),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),yn=s(i({},ae),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),xn=s(i({},ae),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),hn=s(i({},ae),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),bn=s(i({},ae),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var Pn=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],se=Object.fromEntries(Pn.map(e=>{let o=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",t=Fo__namespace.forwardRef((l,p)=>{var d=l,{as:n=o,children:r}=d,a=f(d,["as","children"]);return jsxRuntime.jsx(g,s(i(i({as:n},Co[e]),a),{ref:p,children:r}))});return t.displayName=`Text.${e}`,[e,t]})),Cn=se.Display1,Sn=se.Display2,wn=se.H1,Fn=se.H2,vn=se.H3,Rn=se.H4,Bn=se.Body1,Tn=se.Body2,kn=se.Caption;var wo={};ie(wo,{Link:()=>Hn,Plain:()=>$n,Primary:()=>On,Secondary:()=>In,loadingCSSStyle:()=>So});var Ze={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},On=s(i({},Ze),{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"}),In=s(i({},Ze),{backgroundColor:"secondary.background",borderColor:"secondary.border",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background","backgroundColor:disabled":"secondary.background","opacity:disabled":"0.6"}),Hn=s(i({},Ze),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),$n=s(i({},Ze),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),Mn=react.keyframes({from:{transform:"rotate(0turn)"},to:{transform:"rotate(1turn)"}}),So={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:Mn+" 1s ease infinite"}};function Ye(p){var l=p,{as:e,children:o,part:t,title:n,variant:r="Primary"}=l,a=f(l,["as","children","part","title","variant"]);var m;let d=r.toLocaleLowerCase();return jsxRuntime.jsxs(g,s(i(s(i({as:e!=null?e:"button",part:[`button-${d}`,t]},wo[r]),{css:i(i({},(m=a.css)!=null?m:{}),a.loading?So:{})}),a),{loading:void 0,children:[o,n&&jsxRuntime.jsx(F.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"medium",lineHeight:"20px",part:"button-title",textWrap:"nowrap",children:n})]}))}function An(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Ye,s(i({},o),{variant:"Primary",children:e}))}function Wn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Ye,s(i({},o),{variant:"Secondary",children:e}))}function Vn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Ye,s(i({},o),{variant:"Link",children:e}))}function Ln(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Ye,s(i({},o),{variant:"Plain",children:e}))}var S={};ie(S,{Column:()=>_n,Row:()=>zn});var zn=Fo__namespace.forwardRef((e,o)=>jsxRuntime.jsx(g,s(i({display:"flex",flexDirection:"row"},e),{ref:o}))),_n=Fo__namespace.forwardRef((e,o)=>jsxRuntime.jsx(g,s(i({display:"flex",flexDirection:"column"},e),{ref:o})));function vo(r){var a=r,{dismissible:e,flowId:o,part:t}=a,n=f(a,["dismissible","flowId","part"]);return jsxRuntime.jsx(_,s(i({as:null,flowId:o},n),{children:({handleDismiss:p,handlePrimary:l,handleSecondary:d,parentProps:{containerProps:m},step:u})=>{var B,T,w,P,C;let y=(B=u.props)!=null?B:{},h=(w=(T=u.primaryButton)==null?void 0:T.title)!=null?w:u.primaryButtonTitle,x=(C=(P=u.secondaryButton)==null?void 0:P.title)!=null?C:u.secondaryButtonTitle,R=u.$state.blocked;return jsxRuntime.jsxs(b,s(i(i({alignItems:"center",borderWidth:"md",display:"flex",flexDirection:"row",gap:3,justifyContent:"flex-start",part:["banner",t]},m),y),{children:[u.imageUri&&jsxRuntime.jsx(g,{as:"img",part:"image",src:u.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxRuntime.jsxs(S.Column,{marginInlineEnd:"auto",part:"banner-title-wrapper",children:[jsxRuntime.jsx(b.Title,{part:"title",children:u.title}),jsxRuntime.jsx(b.Subtitle,{part:"subtitle",children:u.subtitle})]}),jsxRuntime.jsx(b.Secondary,{disabled:R,title:x,onClick:d}),jsxRuntime.jsx(b.Primary,{disabled:R,title:h,onClick:l}),e&&jsxRuntime.jsx(b.Dismiss,{onClick:p})]}))}}))}var to={};ie(to,{Carousel:()=>Vt,Collapsible:()=>oo,CollapsibleStep:()=>Ve});var Re={};ie(Re,{Bar:()=>ve,Dots:()=>Ft,Fraction:()=>Qe,Segments:()=>Rt});function ve(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let a=o>0?Math.min(e/o,1):0,p=a===0?"10px":`${100*a}%`;return jsxRuntime.jsx(g,s(i({part:"progress-bar",backgroundColor:"neutral.800",borderRadius:"md",height:"10px"},t),{children:jsxRuntime.jsx(g,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:p},transition:"width 300ms ease-out"})}))}function Ft(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);if(o==1)return null;let a=[...Array(o)].map((p,l)=>jsxRuntime.jsx(g,{as:"circle",r:4,cx:4+16*l,cy:"4px",fill:e-1===l?D.colors.blue500:D.colors.blue800},l));return jsxRuntime.jsx(g,s(i({as:"svg",height:"8px",part:"progress-dots",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8},t),{children:a}))}function Qe(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);return jsxRuntime.jsx(F.Body2,s(i({part:"progress-fraction"},t),{children:`${e}/${o}`}))}function Rt(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let a=[...Array(o)].map((p,l)=>jsxRuntime.jsx(g,{backgroundColor:e-1===l?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%"},l));return jsxRuntime.jsx(S.Row,s(i({gap:1,height:"10px",part:"progress-segments"},t),{children:a}))}function Tt(e){return jsxRuntime.jsx("svg",s(i({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 Gn(){return jsxRuntime.jsx(g,{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 kt(t){var n=t,{checked:e=!1}=n,o=f(n,["checked"]);return jsxRuntime.jsx(g,s(i({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(g,{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(Gn,{})})}))}function le(e,{onPrimary:o,onSecondary:t}={}){let{navigate:n}=Fo.useContext(z),r={"flow.back":()=>e.flow.back(),"flow.complete":()=>e.flow.complete(),"flow.forward":()=>e.flow.forward(),"flow.restart":()=>e.flow.restart(),"flow.skip":()=>e.flow.skip(),"flow.start":()=>e.flow.start(),"step.complete":()=>e.complete(),"step.skip":()=>e.skip(),"step.reset":()=>e.reset(),"step.start":()=>e.start()};return {handlePrimary:Fo.useCallback((a,p,l=!0)=>M(this,null,function*(){if((yield o==null?void 0:o(e,a,p))===!1)return a.preventDefault(),!1;if(e.primaryButton!=null){let m=e.primaryButton.action===!1?!1:r[e.primaryButton.action];typeof m=="function"?m():m!==!1&&(yield e.complete(p,l)),e.primaryButton.uri!=null&&n(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(p,l),e.primaryButtonUri!=null&&n(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:Fo.useCallback((a,p)=>M(this,null,function*(){if((yield t==null?void 0:t(e,a,p))===!1)return a.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(p),e.secondaryButton.uri!=null&&n(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(p),e.secondaryButtonUri!=null&&n(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}function Dt({onPrimary:e,onSecondary:o,step:t}){var m,u;let{handlePrimary:n,handleSecondary:r}=le(t,{onPrimary:e,onSecondary:o}),{blocked:a,completed:p,skipped:l}=t.$state,d=p||l||!a?jsxRuntime.jsx(kt,{checked:p||l,marginLeft:"auto"}):jsxRuntime.jsx(g,{as:Tt,height:"22px",marginLeft:"auto",width:"22px"});return jsxRuntime.jsxs(b,{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:a,opacity:a?.5:1,children:[jsxRuntime.jsxs(S.Row,{marginBottom:"2",part:"carousel-step-header",children:[t.iconUri&&jsxRuntime.jsx(b.Media,{borderRadius:"0",height:"24px",src:t.iconUri,width:"24px"}),d]}),jsxRuntime.jsx(b.Title,{children:t.title}),jsxRuntime.jsx(b.Subtitle,{children:t.subtitle}),jsxRuntime.jsxs(S.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(b.Secondary,{disabled:a,onClick:r,title:(m=t.secondaryButton)==null?void 0:m.title}),jsxRuntime.jsx(b.Primary,{disabled:a,onClick:n,title:(u=t.primaryButton)==null?void 0:u.title})]})]})}function It(e){return jsxRuntime.jsx("svg",s(i({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",s(i({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 Mt=react.keyframes`
55
55
  from {
56
56
  opacity: 0;
57
57
  }
58
58
  to {
59
59
  opacity: 1;
60
60
  }
61
- `;function At({flow:e,sort:o,onPrimary:t,onSecondary:n}){var B,T;let[r,a]=Fo.useState(),[p]=Fo.useState({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step",startIndex:o=="completed-last"?0:(T=(B=Array.from(e.steps.values()).find(w=>!w.$state.completed&&!w.$state.skipped))==null?void 0:B.order)!=null?T:0}),[l,d]=qn__default.default(p),[m,f]=Fo.useState(),[y,h]=Fo.useState();Fo.useLayoutEffect(()=>{d&&(m==null&&f(d.canScrollNext()),y==null&&h(d.canScrollPrev()),d.on("select",()=>{f(d.canScrollNext()),h(d.canScrollPrev());}));},[d]),Fo.useEffect(()=>{if(!r){let w=Array.from(e.steps.values()),P=w.filter(v=>v.$state.completed||v.$state.skipped).sort((v,E)=>v.order-E.order),C=w.filter(v=>!v.$state.completed&&!v.$state.skipped).sort((v,E)=>v.order-E.order);a(o==="completed-last"?[...C,...P].map(v=>v.id):w.map(v=>v.id));}},[]);let x=e.getNumberOfCompletedSteps(),R=e.getNumberOfAvailableSteps();return r?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(S.Row,{css:{"@container (max-width: 750px)":{flexDirection:"column",gap:D.space[5]}},justifyContent:"space-between",part:"carousel-header",children:[jsxRuntime.jsxs(S.Column,{part:"carousel-header-content",children:[jsxRuntime.jsx(F.H3,{children:e.title}),jsxRuntime.jsx(F.Body2,{color:"neutral.400",children:e.subtitle})]}),jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,part:"progress",children:[jsxRuntime.jsxs(F.Body2,{fontWeight:"demibold",part:"progress-text",children:[x,"/",R]}),jsxRuntime.jsx(ve,{current:x,total:R,minWidth:"200px"})]})]}),jsxRuntime.jsxs(g,{margin:`0 ${D.space[-4]}`,overflow:"hidden",part:"carousel-wrapper",px:"4",position:"relative",ref:l,children:[jsxRuntime.jsx(S.Row,{gap:4,part:"carousel-content",children:Array.from(e.steps.values()).filter(w=>w.$state.visible).sort((w,P)=>r.indexOf(w.id)-r.indexOf(P.id)).map(w=>jsxRuntime.jsx(Dt,{onPrimary:t,onSecondary:n,step:w},w.id))}),y&&jsxRuntime.jsx(S.Column,{animation:`${Mt} 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(O.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"})})}),m&&jsxRuntime.jsx(S.Column,{animation:`${Mt} 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(O.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollNext(),padding:"2",children:jsxRuntime.jsx(It,{height:"24px",width:"24px"})})})]})]}):null}function Vt(o){var e=u(o,[]);return jsxRuntime.jsx(_,s(i({as:b,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:t=>jsxRuntime.jsx(At,i(i({},e),t))}))}var Ve={};ie(Ve,{Content:()=>To,Root:()=>ko,Trigger:()=>Eo});function Nt(e){return jsxRuntime.jsx("svg",s(i({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 Yn=react.keyframes`
61
+ `;function At({flow:e,sort:o,onPrimary:t,onSecondary:n}){var B,T;let[r,a]=Fo.useState(),[p]=Fo.useState({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step",startIndex:o=="completed-last"?0:(T=(B=Array.from(e.steps.values()).find(w=>!w.$state.completed&&!w.$state.skipped))==null?void 0:B.order)!=null?T:0}),[l,d]=qn__default.default(p),[m,u]=Fo.useState(),[y,h]=Fo.useState();Fo.useLayoutEffect(()=>{d&&(m==null&&u(d.canScrollNext()),y==null&&h(d.canScrollPrev()),d.on("select",()=>{u(d.canScrollNext()),h(d.canScrollPrev());}));},[d]),Fo.useEffect(()=>{if(!r){let w=Array.from(e.steps.values()),P=w.filter(v=>v.$state.completed||v.$state.skipped).sort((v,E)=>v.order-E.order),C=w.filter(v=>!v.$state.completed&&!v.$state.skipped).sort((v,E)=>v.order-E.order);a(o==="completed-last"?[...C,...P].map(v=>v.id):w.map(v=>v.id));}},[]);let x=e.getNumberOfCompletedSteps(),R=e.getNumberOfAvailableSteps();return r?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(S.Row,{css:{"@container (max-width: 750px)":{flexDirection:"column",gap:D.space[5]}},justifyContent:"space-between",part:"carousel-header",children:[jsxRuntime.jsxs(S.Column,{part:"carousel-header-content",children:[jsxRuntime.jsx(F.H3,{children:e.title}),jsxRuntime.jsx(F.Body2,{color:"neutral.400",children:e.subtitle})]}),jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,part:"progress",children:[jsxRuntime.jsxs(F.Body2,{fontWeight:"demibold",part:"progress-text",children:[x,"/",R]}),jsxRuntime.jsx(ve,{current:x,total:R,minWidth:"200px"})]})]}),jsxRuntime.jsxs(g,{margin:`0 ${D.space[-4]}`,overflow:"hidden",part:"carousel-wrapper",px:"4",position:"relative",ref:l,children:[jsxRuntime.jsx(S.Row,{gap:4,part:"carousel-content",children:Array.from(e.steps.values()).filter(w=>w.$state.visible).sort((w,P)=>r.indexOf(w.id)-r.indexOf(P.id)).map(w=>jsxRuntime.jsx(Dt,{onPrimary:t,onSecondary:n,step:w},w.id))}),y&&jsxRuntime.jsx(S.Column,{animation:`${Mt} 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(O.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"})})}),m&&jsxRuntime.jsx(S.Column,{animation:`${Mt} 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(O.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollNext(),padding:"2",children:jsxRuntime.jsx(It,{height:"24px",width:"24px"})})})]})]}):null}function Vt(o){var e=f(o,[]);return jsxRuntime.jsx(_,s(i({as:b,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:t=>jsxRuntime.jsx(At,i(i({},e),t))}))}var Ve={};ie(Ve,{Content:()=>To,Root:()=>ko,Trigger:()=>Eo});function Nt(e){return jsxRuntime.jsx("svg",s(i({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 Yn=react.keyframes`
62
62
  from {
63
63
  height: 0;
64
64
  opacity: 0;
@@ -76,7 +76,7 @@ var qo=Object.defineProperty,_r=Object.defineProperties;var Ur=Object.getOwnProp
76
76
  height: 0;
77
77
  opacity: 0;
78
78
  }
79
- `,ei=()=>jsxRuntime.jsx(g,{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 oi({checked:e=!1}){return jsxRuntime.jsx(g,{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(g,{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(ei,{})})})}function To({children:e}){return jsxRuntime.jsx(Te__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(S.Column,{css:{'&[data-state="open"]':{animation:`${Yn} 300ms ease-out`},'&[data-state="closed"]':{animation:`${Qn} 300ms ease-out`},overflow:"hidden"},gap:5,part:"collapsible-content",children:[jsxRuntime.jsx(g,{}),e]})})}function ko(a){var p=a,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:n=!1}=p,r=u(p,["children","disabled","onOpenChange","open"]);return jsxRuntime.jsx(Te__namespace.Root,{asChild:!0,disabled:o,open:n,onOpenChange:t,children:jsxRuntime.jsx(b,s(i({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,part:"collapsible-step"},r),{children:e}))})}function Eo({isCompleted:e,isBlocked:o,title:t}){return jsxRuntime.jsx(Te__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(S.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(S.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(oi,{checked:e}),jsxRuntime.jsx(F.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:t})]}),jsxRuntime.jsx(g,{as:Nt,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var _t=Fo.createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function Ut({handlePrimary:e,handleSecondary:o,open:t,onOpenChange:n,step:r}){var R,B,T,w,P,C;let{$state:{blocked:a,completed:p,skipped:l},subtitle:d,title:m}=r,f=(B=(R=r.primaryButton)==null?void 0:R.title)!=null?B:r.primaryButtonTitle,y=(w=(T=r.secondaryButton)==null?void 0:T.title)!=null?w:r.secondaryButtonTitle,h=(P=r.props)!=null?P:{},x=!!a;return jsxRuntime.jsxs(ko,s(i({open:t,onOpenChange:n},h),{children:[jsxRuntime.jsx(Eo,{isBlocked:r.$state.blocked,isCompleted:p||l,title:m}),jsxRuntime.jsxs(To,{children:[jsxRuntime.jsx(b.Media,{aspectRatio:2.5,objectFit:"cover",overflowClipMargin:"unset",src:(C=r.videoUri)!=null?C:r.imageUri,transform:"translate3d(0, 0, 1px)",type:r.videoUri?"video":"image"}),jsxRuntime.jsx(b.Subtitle,{color:"neutral.400",children:d}),jsxRuntime.jsxs(S.Row,{gap:3,part:"collapsible-footer",children:[jsxRuntime.jsx(b.Secondary,{title:y,onClick:o}),jsxRuntime.jsx(b.Primary,{disabled:x,title:f,onClick:e})]})]})]}))}var ii={default:Ut};function ai(n){var r=n,{flow:e,step:o}=r,t=u(r,["flow","step"]);var B;let{onPrimary:a,onSecondary:p,openStepId:l,setOpenStepId:d,stepTypes:m}=Fo.useContext(_t),{handlePrimary:f,handleSecondary:y}=le(o,{onPrimary:a,onSecondary:p}),h=(l!=null?l:e.getCurrentStep().id)===o.id,x=(B=m[o.type])!=null?B:Ut;function R(T){return M(this,null,function*(){d(T?o.id:""),T&&!o.$state.completed&&(yield o.start(),d(null));})}return jsxRuntime.jsx(x,s(i({flow:e,onOpenChange:R,open:h,step:o},t),{handlePrimary:f,handleSecondary:y}),o.id)}function oo(l){var d=l,{dismissible:e,flowId:o,onPrimary:t,onSecondary:n,part:r,stepTypes:a={}}=d,p=u(d,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[m,f]=Fo.useState(null),y=i(i({},ii),a);return jsxRuntime.jsx(_t.Provider,{value:{openStepId:m,setOpenStepId:f,onPrimary:t,onSecondary:n,stepTypes:y},children:jsxRuntime.jsx(_,s(i({as:b,borderWidth:"md",flowId:o,part:["checklist",r]},p),{children:B=>{var T=B,{flow:h,handleDismiss:x}=T,R=u(T,["flow","handleDismiss"]);let P=Array.from(h.steps.entries()).filter(([,E])=>E.$state.visible===!0).map(([,E])=>jsxRuntime.jsx(ai,s(i({flow:h,handleDismiss:x},R),{step:E}),E.id)),C=h.getNumberOfCompletedSteps(),v=h.getNumberOfAvailableSteps();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(S.Column,{gap:2,children:[jsxRuntime.jsx(b.Header,{dismissible:e,handleDismiss:x,part:"checklist-header",subtitle:h.subtitle,title:h.title}),jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsxs(F.Body2,{fontWeight:"demibold",children:[C,"/",v]}),jsxRuntime.jsx(ve,{current:C,total:v,flexGrow:1})]})]}),P]})}}))})}var gi=new Set(["required","min","max","minLength","maxLength","pattern"]);function yi({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 a=Object.fromEntries(Object.entries(t).filter(([l])=>gi.has(l))),p=reactHookForm.useController({name:t.id,control:o,rules:a});return jsxRuntime.jsx(e,s(i({},p),{fieldData:t,formContext:r,submit:n}))}function jt({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:n,parentProps:{dismissible:r},step:a}){var C,v,E,$,N;let{__readOnly:p}=Fo.useContext(z),l=Fo.useMemo(()=>{var k;return (k=a.fields)==null?void 0:k.filter(I=>e[I.type]!=null&&I.id)},[a.fields,e]),d=reactHookForm.useForm({delayError:2e3,mode:"onChange",defaultValues:l.reduce((k,I)=>{var W;return k[I.id]=(W=I.value)!=null?W:"",k},{})});Fo.useEffect(()=>{d.formState.isDirty||d.reset(l.reduce((k,I)=>{var W;return k[I.id]=(W=I.value)!=null?W:"",k},{}));},[l]);let[m,f]=Fo.useState(!1),y=[],{control:h,handleSubmit:x}=d,R=(C=a.props)!=null?C:{};function B(k,I){f(!0),t(I,k,p===!0).then(()=>f(!1));}l.forEach(k=>{e[k.type]!=null&&y.push(jsxRuntime.jsx(yi,{control:h,fieldComponent:e[k.type],fieldData:k,submit:x(B)},`${a.flow.id}-${k.id}`));});let T=(E=(v=a.primaryButton)==null?void 0:v.title)!=null?E:a.primaryButtonTitle,w=(N=($=a.secondaryButton)==null?void 0:$.title)!=null?N:a.secondaryButtonTitle,P=!!(a.$state.blocked||!d.formState.isValid);return Fo.useEffect(()=>{d.clearErrors();},[a]),jsxRuntime.jsxs(S.Column,s(i({gap:5,part:"form-step"},R),{children:[jsxRuntime.jsx(b.Header,{dismissible:r,handleDismiss:o,part:"form-step-header",subtitle:a.subtitle,title:a.title}),jsxRuntime.jsx(reactHookForm.FormProvider,s(i({},d),{children:y})),jsxRuntime.jsxs(S.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[w&&jsxRuntime.jsx(O.Secondary,{onClick:n,title:w}),jsxRuntime.jsx(O.Primary,{disabled:P||m,onClick:x(B),title:T!=null?T:"Submit",loading:m})]},`form-footer-${a.id}`)]}))}function Xt({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.length?jsxRuntime.jsx(F.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function Do({children:e,id:o,required:t=!1}){return jsxRuntime.jsxs(F.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsxRuntime.jsx(g,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Oo={backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md"},Le=s(i({},Oo),{px:"4",py:"2",display:"block",outline:"none",width:"100%"}),ro={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 Y({children:e,field:o,fieldData:t,fieldState:n}){var m;let{id:r,label:a,placeholder:p}=t,{error:l}=n,d=s(i(i(i({id:r},o),p?{placeholder:p}:{}),Le),{"aria-invalid":!!l,value:(m=o.value)!=null?m:""});return jsxRuntime.jsxs(g,{part:"field",children:[jsxRuntime.jsx(Do,{id:r,required:!!t.required,children:a}),e(d),jsxRuntime.jsx(Xt,{error:l})]})}function Ee(e){return jsxRuntime.jsx("svg",s(i({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 Ci=Fo__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsxs(g,{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(F.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx(De__namespace.Item,{id:o,value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(g,{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(g,s(i({as:De__namespace.Indicator},ro),{children:jsxRuntime.jsx(Ee,{height:"14",width:"14"})}))})})]}));function Io(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,r=n.map(({label:a,value:p})=>jsxRuntime.jsx(Ci,{value:p,label:a},p));return jsxRuntime.jsx(Y,s(i({},e),{children:()=>jsxRuntime.jsx(De__namespace.Root,{value:t,onValueChange:o,asChild:!0,children:jsxRuntime.jsx(S.Column,{gap:2,part:"field-radio-group",children:r})})}))}function Qt(e){return jsxRuntime.jsx("svg",s(i({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 or(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,[r,a]=Fo__namespace.useState([]);function p(l){let d=[];r.includes(l)?d=[...r.filter(m=>m!==l)]:d=[...r,l],a(d),o(d);}return jsxRuntime.jsx(Y,s(i({},e),{children:()=>jsxRuntime.jsx(S.Column,{gap:2,part:"field-select-multiple",children:n.map(({label:l,value:d})=>jsxRuntime.jsx(no__namespace.Root,{value:r.includes(d)?d:void 0,onCheckedChange:()=>p(d),asChild:!0,children:jsxRuntime.jsxs(g,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:d,justifyContent:"space-between",part:"field-check",px:4,py:2,children:[jsxRuntime.jsx(F.Body2,{part:"field-check-label",children:l}),jsxRuntime.jsx(g,{as:"button",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(no__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(g,s(i({},ro),{children:jsxRuntime.jsx(Ee,{height:"14",width:"14"})}))})})]})},d))})}))}var Fi=Fo__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsx(V__namespace.Item,{value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(g,{"backgroundColor:hover":"neutral.900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsxRuntime.jsx(V__namespace.ItemText,{asChild:!0,children:jsxRuntime.jsx(F.Body2,{part:"field-select-option-label",children:e})})})}));function Ho(e){let{field:{onChange:o,value:t},fieldData:{options:n=[],placeholder:r}}=e,a=n.map(({label:p,value:l})=>jsxRuntime.jsx(Fi,{value:l,label:p},l));return e.fieldData.multiple?jsxRuntime.jsx(or,i({},e)):jsxRuntime.jsx(Y,s(i({},e),{children:()=>jsxRuntime.jsxs(V__namespace.Root,{value:t,onValueChange:o,children:[jsxRuntime.jsx(V__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(F.Body2,s(i({},Le),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsxRuntime.jsx(V__namespace.Value,{placeholder:r!=null?r:"Select one"}),jsxRuntime.jsx(V__namespace.Icon,{children:jsxRuntime.jsx(g,{as:Qt,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsxRuntime.jsx(V__namespace.Portal,{children:jsxRuntime.jsx(V__namespace.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsxRuntime.jsx(g,s(i({},Le),{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(V__namespace.Viewport,{children:a})}))})})]})}))}function $o(e){return jsxRuntime.jsx(Y,s(i({},e),{children:o=>jsxRuntime.jsx(F.Body2,i({as:"input",part:"field-text",type:"text"},o))}))}function Mo(e){return jsxRuntime.jsx(Y,s(i({},e),{children:o=>jsxRuntime.jsx(F.Body2,i({as:"textarea",part:"field-textarea"},o))}))}function ar(e){let{field:{onChange:o,value:t},fieldData:{options:n,label:r,id:a=[]}}=e;return jsxRuntime.jsxs(g,{part:"field",display:"flex",gap:2,alignItems:"center",children:[jsxRuntime.jsx(no__namespace.Root,{defaultChecked:!0,onCheckedChange:o,value:t,checked:t===!0,asChild:!0,children:jsxRuntime.jsx(g,s(i({},Oo),{as:"button",width:"25px",minWidth:"25px",height:"25px",justifyContent:"center",alignItems:"center",display:"flex","backgroundColor:hover":"neutral.900",part:"field-checkbox",id:a,children:jsxRuntime.jsx(no__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(g,{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",children:jsxRuntime.jsx(Ee,{height:"14",fill:"currentColor"})})})}))}),jsxRuntime.jsx(F.Body2,{part:"field-checkbox-label",as:"label",htmlFor:a,children:r})]})}var Ri={checkbox:ar,radio:Io,select:Ho,text:$o,textarea:Mo};function Ie(r){var a=r,{fieldTypes:e={},flowId:o,part:t}=a,n=u(a,["fieldTypes","flowId","part"]);let p=Object.assign({},Ri,e);return jsxRuntime.jsx(_,s(i({flowId:o,part:["form",t]},n),{children:l=>jsxRuntime.jsx(jt,i({fieldTypes:p},l))}))}var so={};ie(so,{NPS:()=>ze});function pr({field:e,fieldData:o,submit:t}){var r,a;let n=[...Array(11)].map((p,l)=>{let d=e.value===l?O.Primary:O.Secondary;return jsxRuntime.jsx(d,{borderWidth:"1px",onClick:()=>{e.onChange(l),t();},title:`${l}`,css:{".fr-button-title":{fontSize:"15px"}}},l)});return jsxRuntime.jsxs(S.Column,{gap:2,children:[jsxRuntime.jsx(S.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:n}),jsxRuntime.jsxs(S.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsxRuntime.jsx(F.Caption,{part:"field-nps-left-label",color:"neutral.400",children:(r=o.negativeLabel)!=null?r:"Not likely at all"}),jsxRuntime.jsx(F.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(a=o.positiveLabel)!=null?a:"Extremely likely"})]})]})}function ze(a){var p=a,{as:e=H,flowId:o,fieldTypes:t,part:n}=p,r=u(p,["as","flowId","fieldTypes","part"]);let{flow:l}=Se(o);return jsxRuntime.jsx(Ie,s(i({alignSelf:"end",as:e,flowId:o,fieldTypes:i({nps:pr},t),modal:!1,onEscapeKeyDown:d=>{typeof r.onEscapeKeyDown=="function"&&r.onEscapeKeyDown(d),d.defaultPrevented||l.skip();},part:["nps",n]},r),{css:i({},i(s(i({},!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"}}}),r.css))}))}function ki(r,n){var a=r,{children:e,part:o}=a,t=u(a,["children","part"]);return jsxRuntime.jsx(reactRemoveScroll.RemoveScroll,{forwardProps:!0,ref:n,children:jsxRuntime.jsx(g,s(i({backgroundColor:"black",inset:"0",opacity:"0.5",part:["overlay",o],position:"absolute"},t),{children:e}))})}var lo=Fo__namespace.forwardRef(ki);var Di=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function ur(t){var n=t,{part:e=""}=n,o=u(n,["part"]);return jsxRuntime.jsxs(g,s(i({borderRadius:"24px",height:"24px",part:`ping-wrapper ${e}`,position:"relative",width:"24px"},o),{children:[jsxRuntime.jsx(g,{backgroundColor:"primary.surface",animation:`2s ease-out infinite ${Di}`,borderRadius:"24px",height:"48px",left:"-12px",part:"ping-pulse",pointerEvents:"none",position:"absolute",top:"-12px",transformOrigin:"center center",width:"48px"}),jsxRuntime.jsx(g,{backgroundColor:"primary.surface",borderRadius:"12px",height:"24px",left:"0",part:"ping",position:"absolute",top:"0",width:"24px"})]}))}function Ai({maxX:e,maxY:o,radius:t,x1:n,x2:r,y1:a,y2:p}){return t>0?`path("${[`M${n+t},${a}`,`H${r-t}`,`A${t} ${t} 0,0,1 ${r} ${a+t}`,`V${p-t}`,`A${t} ${t} 0,0,1 ${r-t} ${p}`,`H${n+t}`,`A${t} ${t} 0,0,1 ${n} ${p-t}`,`V${o}`,`H${e}`,"V0","H0",`V${o}`,`H${n}`,`V${a+t}`,`A${t} ${t} 0,0,1 ${n+t} ${a}`,"Z"].join(" ")}")`:`path("M${n},${a} H${r} V${p} H${n} V${o} H${e} V0 H0 V${o} H${n} Z")`}function Wi(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 Ao(r){var a=r,{anchor:e,part:o,style:t={}}=a,n=u(a,["anchor","part","style"]);let[p,l]=Fo.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:m,rects:f}){return l({maxX:m.floating.clientWidth,maxY:m.floating.clientHeight,radius:Wi(m.reference),x1:f.reference.x,x2:f.reference.x+f.reference.width,y1:f.reference.y,y2:f.reference.y+f.reference.height}),{}}}],open:!0,placement:"top-center",transform:!1,whileElementsMounted:react$1.autoUpdate});return Fo.useEffect(()=>{let m=document.querySelector(e);m!=null?d.setReference(m):console.debug(`[frigade] Spotlight: No anchor found for selector: ${e}`);},[e]),jsxRuntime.jsx(lo,i({part:["spotlight",o],ref:d.setFloating,style:i({clipPath:Ai(p)},t)},n))}function fr({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 qi(e){switch(e){case"after":return "end";case"before":return "start";default:return e}}function gr({align:e,alignOffset:o,anchor:t,onOpenChange:n=()=>{},open:r,side:a,sideOffset:p}){let l=`${a}-${qi(e)}`;function d({rects:C}){let v={alignmentAxis:o,mainAxis:p};return ["after","before"].includes(e)&&(["bottom","top"].includes(a)?v.alignmentAxis=o-C.floating.width:v.alignmentAxis=o-C.floating.height),v}let{context:m,floatingStyles:f,placement:y,refs:h}=react$1.useFloating({middleware:[react$1.offset(d),react$1.flip(),react$1.shift()],onOpenChange:n,open:r,placement:l,whileElementsMounted:react$1.autoUpdate}),x=react$1.useClick(m),R=react$1.useDismiss(m,{outsidePress:!1}),B=react$1.useRole(m),{getFloatingProps:T,getReferenceProps:w}=react$1.useInteractions([x,R,B]);Fo.useEffect(()=>{let C=document.querySelector(t);C!=null?h.setReference(C):console.debug(`[frigade] Hint: No anchor found for selector: ${t}`);},[t]);let P=y.split("-");return e==="before"?P[1]=P[1]==="end"?"after":"before":e==="after"&&(P[1]=P[1]==="start"?"before":"after"),{context:m,getFloatingProps:T,getReferenceProps:w,floatingStyles:f,placement:P.join("-"),refs:h}}function Vo(R){var B=R,{align:e="center",alignOffset:o=0,anchor:t,children:n,defaultOpen:r=!0,modal:a=!1,onOpenChange:p=()=>{},open:l,part:d,side:m="bottom",sideOffset:f=0,spotlight:y=!1,style:h={}}=B,x=u(B,["align","alignOffset","anchor","children","defaultOpen","modal","onOpenChange","open","part","side","sideOffset","spotlight","style"]);let[T,w]=Fo.useState(r),P=l!=null?l:T,{getFloatingProps:C,getReferenceProps:v,floatingStyles:E,placement:$,refs:N}=gr({align:e,alignOffset:o,anchor:t,onOpenChange:he=>{p(he),l==null&&w(he);},open:P,side:m,sideOffset:f}),[k,I]=$.split("-"),W=v();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[y&&P&&jsxRuntime.jsx(Ao,{anchor:t}),a&&!y&&P&&jsxRuntime.jsx(lo,{lockScroll:!0}),jsxRuntime.jsxs(g,s(i(i({part:["hint",d],ref:N.setFloating,style:i(i({},E),h)},C()),x),{children:[P&&n,jsxRuntime.jsx(ur,s(i({},W),{position:"absolute",style:fr({align:I,side:k})}))]}))]})}var ea=react.keyframes`
79
+ `,ei=()=>jsxRuntime.jsx(g,{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 oi({checked:e=!1}){return jsxRuntime.jsx(g,{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(g,{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(ei,{})})})}function To({children:e}){return jsxRuntime.jsx(Te__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(S.Column,{css:{'&[data-state="open"]':{animation:`${Yn} 300ms ease-out`},'&[data-state="closed"]':{animation:`${Qn} 300ms ease-out`},overflow:"hidden"},gap:5,part:"collapsible-content",children:[jsxRuntime.jsx(g,{}),e]})})}function ko(a){var p=a,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:n=!1}=p,r=f(p,["children","disabled","onOpenChange","open"]);return jsxRuntime.jsx(Te__namespace.Root,{asChild:!0,disabled:o,open:n,onOpenChange:t,children:jsxRuntime.jsx(b,s(i({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,part:"collapsible-step"},r),{children:e}))})}function Eo({isCompleted:e,isBlocked:o,title:t}){return jsxRuntime.jsx(Te__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(S.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(S.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(oi,{checked:e}),jsxRuntime.jsx(F.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:t})]}),jsxRuntime.jsx(g,{as:Nt,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var _t=Fo.createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function Ut({handlePrimary:e,handleSecondary:o,open:t,onOpenChange:n,step:r}){var R,B,T,w,P,C;let{$state:{blocked:a,completed:p,skipped:l},subtitle:d,title:m}=r,u=(B=(R=r.primaryButton)==null?void 0:R.title)!=null?B:r.primaryButtonTitle,y=(w=(T=r.secondaryButton)==null?void 0:T.title)!=null?w:r.secondaryButtonTitle,h=(P=r.props)!=null?P:{},x=!!a;return jsxRuntime.jsxs(ko,s(i({open:t,onOpenChange:n},h),{children:[jsxRuntime.jsx(Eo,{isBlocked:r.$state.blocked,isCompleted:p||l,title:m}),jsxRuntime.jsxs(To,{children:[jsxRuntime.jsx(b.Media,{aspectRatio:2.5,objectFit:"cover",overflowClipMargin:"unset",src:(C=r.videoUri)!=null?C:r.imageUri,transform:"translate3d(0, 0, 1px)",type:r.videoUri?"video":"image"}),jsxRuntime.jsx(b.Subtitle,{color:"neutral.400",children:d}),jsxRuntime.jsxs(S.Row,{gap:3,part:"collapsible-footer",children:[jsxRuntime.jsx(b.Secondary,{title:y,onClick:o}),jsxRuntime.jsx(b.Primary,{disabled:x,title:u,onClick:e})]})]})]}))}var ii={default:Ut};function ai(n){var r=n,{flow:e,step:o}=r,t=f(r,["flow","step"]);var B;let{onPrimary:a,onSecondary:p,openStepId:l,setOpenStepId:d,stepTypes:m}=Fo.useContext(_t),{handlePrimary:u,handleSecondary:y}=le(o,{onPrimary:a,onSecondary:p}),h=(l!=null?l:e.getCurrentStep().id)===o.id,x=(B=m[o.type])!=null?B:Ut;function R(T){return M(this,null,function*(){d(T?o.id:""),T&&!o.$state.completed&&(yield o.start(),d(null));})}return jsxRuntime.jsx(x,s(i({flow:e,onOpenChange:R,open:h,step:o},t),{handlePrimary:u,handleSecondary:y}),o.id)}function oo(l){var d=l,{dismissible:e,flowId:o,onPrimary:t,onSecondary:n,part:r,stepTypes:a={}}=d,p=f(d,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[m,u]=Fo.useState(null),y=i(i({},ii),a);return jsxRuntime.jsx(_t.Provider,{value:{openStepId:m,setOpenStepId:u,onPrimary:t,onSecondary:n,stepTypes:y},children:jsxRuntime.jsx(_,s(i({as:b,borderWidth:"md",flowId:o,part:["checklist",r]},p),{children:B=>{var T=B,{flow:h,handleDismiss:x}=T,R=f(T,["flow","handleDismiss"]);let P=Array.from(h.steps.entries()).filter(([,E])=>E.$state.visible===!0).map(([,E])=>jsxRuntime.jsx(ai,s(i({flow:h,handleDismiss:x},R),{step:E}),E.id)),C=h.getNumberOfCompletedSteps(),v=h.getNumberOfAvailableSteps();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(S.Column,{gap:2,children:[jsxRuntime.jsx(b.Header,{dismissible:e,handleDismiss:x,part:"checklist-header",subtitle:h.subtitle,title:h.title}),jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsxs(F.Body2,{fontWeight:"demibold",children:[C,"/",v]}),jsxRuntime.jsx(ve,{current:C,total:v,flexGrow:1})]})]}),P]})}}))})}var gi=new Set(["required","min","max","minLength","maxLength","pattern"]);function yi({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 a=Object.fromEntries(Object.entries(t).filter(([l])=>gi.has(l))),p=reactHookForm.useController({name:t.id,control:o,rules:a});return jsxRuntime.jsx(e,s(i({},p),{fieldData:t,formContext:r,submit:n}))}function jt({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:n,parentProps:{dismissible:r},step:a}){var C,v,E,$,N;let{__readOnly:p}=Fo.useContext(z),l=Fo.useMemo(()=>{var k;return (k=a.fields)==null?void 0:k.filter(I=>e[I.type]!=null&&I.id)},[a.fields,e]),d=reactHookForm.useForm({delayError:2e3,mode:"onChange",defaultValues:l.reduce((k,I)=>{var W;return k[I.id]=(W=I.value)!=null?W:"",k},{})});Fo.useEffect(()=>{d.formState.isDirty||d.reset(l.reduce((k,I)=>{var W;return k[I.id]=(W=I.value)!=null?W:"",k},{}));},[l]);let[m,u]=Fo.useState(!1),y=[],{control:h,handleSubmit:x}=d,R=(C=a.props)!=null?C:{};function B(k,I){u(!0),t(I,k,p===!0).then(()=>u(!1));}l.forEach(k=>{e[k.type]!=null&&y.push(jsxRuntime.jsx(yi,{control:h,fieldComponent:e[k.type],fieldData:k,submit:x(B)},`${a.flow.id}-${k.id}`));});let T=(E=(v=a.primaryButton)==null?void 0:v.title)!=null?E:a.primaryButtonTitle,w=(N=($=a.secondaryButton)==null?void 0:$.title)!=null?N:a.secondaryButtonTitle,P=!!(a.$state.blocked||!d.formState.isValid);return Fo.useEffect(()=>{d.clearErrors();},[a]),jsxRuntime.jsxs(S.Column,s(i({gap:5,part:"form-step"},R),{children:[jsxRuntime.jsx(b.Header,{dismissible:r,handleDismiss:o,part:"form-step-header",subtitle:a.subtitle,title:a.title}),jsxRuntime.jsx(reactHookForm.FormProvider,s(i({},d),{children:y})),jsxRuntime.jsxs(S.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[w&&jsxRuntime.jsx(O.Secondary,{onClick:n,title:w}),jsxRuntime.jsx(O.Primary,{disabled:P||m,onClick:x(B),title:T!=null?T:"Submit",loading:m})]},`form-footer-${a.id}`)]}))}function Xt({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.length?jsxRuntime.jsx(F.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function Do({children:e,id:o,required:t=!1}){return jsxRuntime.jsxs(F.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsxRuntime.jsx(g,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Oo={backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md"},Le=s(i({},Oo),{px:"4",py:"2",display:"block",outline:"none",width:"100%"}),ro={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 Y({children:e,field:o,fieldData:t,fieldState:n}){var m;let{id:r,label:a,placeholder:p}=t,{error:l}=n,d=s(i(i(i({id:r},o),p?{placeholder:p}:{}),Le),{"aria-invalid":!!l,value:(m=o.value)!=null?m:""});return jsxRuntime.jsxs(g,{part:"field",children:[jsxRuntime.jsx(Do,{id:r,required:!!t.required,children:a}),e(d),jsxRuntime.jsx(Xt,{error:l})]})}function Ee(e){return jsxRuntime.jsx("svg",s(i({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 Ci=Fo__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsxs(g,{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(F.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx(De__namespace.Item,{id:o,value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(g,{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(g,s(i({as:De__namespace.Indicator},ro),{children:jsxRuntime.jsx(Ee,{height:"14",width:"14"})}))})})]}));function Io(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,r=n.map(({label:a,value:p})=>jsxRuntime.jsx(Ci,{value:p,label:a},p));return jsxRuntime.jsx(Y,s(i({},e),{children:()=>jsxRuntime.jsx(De__namespace.Root,{value:t,onValueChange:o,asChild:!0,children:jsxRuntime.jsx(S.Column,{gap:2,part:"field-radio-group",children:r})})}))}function Qt(e){return jsxRuntime.jsx("svg",s(i({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 or(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,[r,a]=Fo__namespace.useState([]);function p(l){let d=[];r.includes(l)?d=[...r.filter(m=>m!==l)]:d=[...r,l],a(d),o(d);}return jsxRuntime.jsx(Y,s(i({},e),{children:()=>jsxRuntime.jsx(S.Column,{gap:2,part:"field-select-multiple",children:n.map(({label:l,value:d})=>jsxRuntime.jsx(no__namespace.Root,{value:r.includes(d)?d:void 0,onCheckedChange:()=>p(d),asChild:!0,children:jsxRuntime.jsxs(g,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:d,justifyContent:"space-between",part:"field-check",px:4,py:2,children:[jsxRuntime.jsx(F.Body2,{part:"field-check-label",children:l}),jsxRuntime.jsx(g,{as:"button",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(no__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(g,s(i({},ro),{children:jsxRuntime.jsx(Ee,{height:"14",width:"14"})}))})})]})},d))})}))}var Fi=Fo__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsx(V__namespace.Item,{value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(g,{"backgroundColor:hover":"neutral.900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsxRuntime.jsx(V__namespace.ItemText,{asChild:!0,children:jsxRuntime.jsx(F.Body2,{part:"field-select-option-label",children:e})})})}));function Ho(e){let{field:{onChange:o,value:t},fieldData:{options:n=[],placeholder:r}}=e,a=n.map(({label:p,value:l})=>jsxRuntime.jsx(Fi,{value:l,label:p},l));return e.fieldData.multiple?jsxRuntime.jsx(or,i({},e)):jsxRuntime.jsx(Y,s(i({},e),{children:()=>jsxRuntime.jsxs(V__namespace.Root,{value:t,onValueChange:o,children:[jsxRuntime.jsx(V__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(F.Body2,s(i({},Le),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsxRuntime.jsx(V__namespace.Value,{placeholder:r!=null?r:"Select one"}),jsxRuntime.jsx(V__namespace.Icon,{children:jsxRuntime.jsx(g,{as:Qt,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsxRuntime.jsx(V__namespace.Portal,{children:jsxRuntime.jsx(V__namespace.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsxRuntime.jsx(g,s(i({},Le),{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(V__namespace.Viewport,{children:a})}))})})]})}))}function $o(e){return jsxRuntime.jsx(Y,s(i({},e),{children:o=>jsxRuntime.jsx(F.Body2,i({as:"input",part:"field-text",type:"text"},o))}))}function Mo(e){return jsxRuntime.jsx(Y,s(i({},e),{children:o=>jsxRuntime.jsx(F.Body2,i({as:"textarea",part:"field-textarea"},o))}))}function ar(e){let{field:{onChange:o,value:t},fieldData:{options:n,label:r,id:a=[]}}=e;return jsxRuntime.jsxs(g,{part:"field",display:"flex",gap:2,alignItems:"center",children:[jsxRuntime.jsx(no__namespace.Root,{defaultChecked:!0,onCheckedChange:o,value:t,checked:t===!0,asChild:!0,children:jsxRuntime.jsx(g,s(i({},Oo),{as:"button",width:"25px",minWidth:"25px",height:"25px",justifyContent:"center",alignItems:"center",display:"flex","backgroundColor:hover":"neutral.900",part:"field-checkbox",id:a,children:jsxRuntime.jsx(no__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(g,{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",children:jsxRuntime.jsx(Ee,{height:"14",fill:"currentColor"})})})}))}),jsxRuntime.jsx(F.Body2,{part:"field-checkbox-label",as:"label",htmlFor:a,children:r})]})}var Ri={checkbox:ar,radio:Io,select:Ho,text:$o,textarea:Mo};function Ie(r){var a=r,{fieldTypes:e={},flowId:o,part:t}=a,n=f(a,["fieldTypes","flowId","part"]);let p=Object.assign({},Ri,e);return jsxRuntime.jsx(_,s(i({flowId:o,part:["form",t]},n),{children:l=>jsxRuntime.jsx(jt,i({fieldTypes:p},l))}))}var so={};ie(so,{NPS:()=>ze});function pr({field:e,fieldData:o,submit:t}){var r,a;let n=[...Array(11)].map((p,l)=>{let d=e.value===l?O.Primary:O.Secondary;return jsxRuntime.jsx(d,{borderWidth:"1px",onClick:()=>{e.onChange(l),t();},title:`${l}`,css:{".fr-button-title":{fontSize:"15px"}}},l)});return jsxRuntime.jsxs(S.Column,{gap:2,children:[jsxRuntime.jsx(S.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:n}),jsxRuntime.jsxs(S.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsxRuntime.jsx(F.Caption,{part:"field-nps-left-label",color:"neutral.400",children:(r=o.negativeLabel)!=null?r:"Not likely at all"}),jsxRuntime.jsx(F.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(a=o.positiveLabel)!=null?a:"Extremely likely"})]})]})}function ze(a){var p=a,{as:e=H,flowId:o,fieldTypes:t,part:n}=p,r=f(p,["as","flowId","fieldTypes","part"]);let{flow:l}=Se(o);return jsxRuntime.jsx(Ie,s(i({alignSelf:"end",as:e,flowId:o,fieldTypes:i({nps:pr},t),modal:!1,onEscapeKeyDown:d=>{typeof r.onEscapeKeyDown=="function"&&r.onEscapeKeyDown(d),d.defaultPrevented||l.skip();},part:["nps",n]},r),{css:i({},i(s(i({},!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"}}}),r.css))}))}function ki(r,n){var a=r,{children:e,part:o}=a,t=f(a,["children","part"]);return jsxRuntime.jsx(reactRemoveScroll.RemoveScroll,{forwardProps:!0,ref:n,children:jsxRuntime.jsx(g,s(i({backgroundColor:"black",inset:"0",opacity:"0.5",part:["overlay",o],position:"absolute"},t),{children:e}))})}var lo=Fo__namespace.forwardRef(ki);var Di=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function ur(t){var n=t,{part:e=""}=n,o=f(n,["part"]);return jsxRuntime.jsxs(g,s(i({borderRadius:"24px",height:"24px",part:`ping-wrapper ${e}`,position:"relative",width:"24px"},o),{children:[jsxRuntime.jsx(g,{backgroundColor:"primary.surface",animation:`2s ease-out infinite ${Di}`,borderRadius:"24px",height:"48px",left:"-12px",part:"ping-pulse",pointerEvents:"none",position:"absolute",top:"-12px",transformOrigin:"center center",width:"48px"}),jsxRuntime.jsx(g,{backgroundColor:"primary.surface",borderRadius:"12px",height:"24px",left:"0",part:"ping",position:"absolute",top:"0",width:"24px"})]}))}function Ai({maxX:e,maxY:o,radius:t,x1:n,x2:r,y1:a,y2:p}){return t>0?`path("${[`M${n+t},${a}`,`H${r-t}`,`A${t} ${t} 0,0,1 ${r} ${a+t}`,`V${p-t}`,`A${t} ${t} 0,0,1 ${r-t} ${p}`,`H${n+t}`,`A${t} ${t} 0,0,1 ${n} ${p-t}`,`V${o}`,`H${e}`,"V0","H0",`V${o}`,`H${n}`,`V${a+t}`,`A${t} ${t} 0,0,1 ${n+t} ${a}`,"Z"].join(" ")}")`:`path("M${n},${a} H${r} V${p} H${n} V${o} H${e} V0 H0 V${o} H${n} Z")`}function Wi(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 Ao(r){var a=r,{anchor:e,part:o,style:t={}}=a,n=f(a,["anchor","part","style"]);let[p,l]=Fo.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:m,rects:u}){return l({maxX:m.floating.clientWidth,maxY:m.floating.clientHeight,radius:Wi(m.reference),x1:u.reference.x,x2:u.reference.x+u.reference.width,y1:u.reference.y,y2:u.reference.y+u.reference.height}),{}}}],open:!0,placement:"top-center",transform:!1,whileElementsMounted:react$1.autoUpdate});return Fo.useEffect(()=>{let m=document.querySelector(e);m!=null?d.setReference(m):console.debug(`[frigade] Spotlight: No anchor found for selector: ${e}`);},[e]),jsxRuntime.jsx(lo,i({part:["spotlight",o],ref:d.setFloating,style:i({clipPath:Ai(p)},t)},n))}function fr({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 qi(e){switch(e){case"after":return "end";case"before":return "start";default:return e}}function gr({align:e,alignOffset:o,anchor:t,onOpenChange:n=()=>{},open:r,side:a,sideOffset:p}){let l=`${a}-${qi(e)}`;function d({rects:C}){let v={alignmentAxis:o,mainAxis:p};return ["after","before"].includes(e)&&(["bottom","top"].includes(a)?v.alignmentAxis=o-C.floating.width:v.alignmentAxis=o-C.floating.height),v}let{context:m,floatingStyles:u,placement:y,refs:h}=react$1.useFloating({middleware:[react$1.offset(d),react$1.flip(),react$1.shift()],onOpenChange:n,open:r,placement:l,whileElementsMounted:react$1.autoUpdate}),x=react$1.useClick(m),R=react$1.useDismiss(m,{outsidePress:!1}),B=react$1.useRole(m),{getFloatingProps:T,getReferenceProps:w}=react$1.useInteractions([x,R,B]);Fo.useEffect(()=>{let C=document.querySelector(t);C!=null?h.setReference(C):console.debug(`[frigade] Hint: No anchor found for selector: ${t}`);},[t]);let P=y.split("-");return e==="before"?P[1]=P[1]==="end"?"after":"before":e==="after"&&(P[1]=P[1]==="start"?"before":"after"),{context:m,getFloatingProps:T,getReferenceProps:w,floatingStyles:u,placement:P.join("-"),refs:h}}function Vo(R){var B=R,{align:e="center",alignOffset:o=0,anchor:t,children:n,defaultOpen:r=!0,modal:a=!1,onOpenChange:p=()=>{},open:l,part:d,side:m="bottom",sideOffset:u=0,spotlight:y=!1,style:h={}}=B,x=f(B,["align","alignOffset","anchor","children","defaultOpen","modal","onOpenChange","open","part","side","sideOffset","spotlight","style"]);let[T,w]=Fo.useState(r),P=l!=null?l:T,{getFloatingProps:C,getReferenceProps:v,floatingStyles:E,placement:$,refs:N}=gr({align:e,alignOffset:o,anchor:t,onOpenChange:he=>{p(he),l==null&&w(he);},open:P,side:m,sideOffset:u}),[k,I]=$.split("-"),W=v();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[y&&P&&jsxRuntime.jsx(Ao,{anchor:t}),a&&!y&&P&&jsxRuntime.jsx(lo,{lockScroll:!0}),jsxRuntime.jsxs(g,s(i(i({part:["hint",d],ref:N.setFloating,style:i(i({},E),h)},C()),x),{children:[P&&n,jsxRuntime.jsx(ur,s(i({},W),{position:"absolute",style:fr({align:I,side:k})}))]}))]})}var ea=react.keyframes`
80
80
  from {
81
81
  opacity: 0;
82
82
  }
@@ -86,7 +86,7 @@ var qo=Object.defineProperty,_r=Object.defineProperties;var Ur=Object.getOwnProp
86
86
  to {
87
87
  opacity: 1;
88
88
  }
89
- `;function po(B){var T=B,{align:e,alignOffset:o,defaultOpen:t,dismissible:n,flow:r,handleDismiss:a,modal:p,onPrimary:l,onSecondary:d,part:m,side:f,sideOffset:y,spotlight:h,step:x}=T,R=u(T,["align","alignOffset","defaultOpen","dismissible","flow","handleDismiss","modal","onPrimary","onSecondary","part","side","sideOffset","spotlight","step"]);var $,N,k,I,W;let{handlePrimary:w,handleSecondary:P}=le(x,{onPrimary:l,onSecondary:d}),C=(N=($=x.primaryButton)==null?void 0:$.title)!=null?N:x.primaryButtonTitle,v=(I=(k=x.secondaryButton)==null?void 0:k.title)!=null?I:x.secondaryButtonTitle,E=!!x.$state.blocked;return jsxRuntime.jsx(Vo,s(i({align:e,alignOffset:o,anchor:x.selector,"data-step-id":x.id,defaultOpen:t,modal:p,part:m,side:f,sideOffset:y,spotlight:h},R),{children:jsxRuntime.jsxs(b,{animation:`${ea} 300ms ease-out`,boxShadow:"md",maxWidth:"min(360px, calc(100vw - 25px))",children:[jsxRuntime.jsx(b.Media,{aspectRatio:"2",borderRadius:"md md 0 0",borderWidth:"0",margin:"-5 -5 0",objectFit:"cover",overflowClipMargin:"unset",src:(W=x.videoUri)!=null?W:x.imageUri,transform:"translate3d(0, 0, 1px)",type:x.videoUri?"video":"image"}),jsxRuntime.jsx(b.Header,{css:{".fr-dismiss":{position:"absolute",right:"12px",top:"12px"}},dismissible:n,handleDismiss:a,subtitle:x.subtitle,title:x.title}),jsxRuntime.jsxs(b.Footer,{children:[r.getNumberOfAvailableSteps()>1&&jsxRuntime.jsx(Qe,{current:r.getCurrentStepOrder()+1,marginRight:"auto",total:r.getNumberOfAvailableSteps()}),jsxRuntime.jsx(b.Secondary,{disabled:E,onClick:P,title:v}),jsxRuntime.jsx(b.Primary,{disabled:E,onClick:w,title:C})]})]})}))}function hr(e,o,t){let[n,r]=Fo.useState(!1),a=Fo.useRef();return Fo.useEffect(()=>{a.current=typeof o=="string"?document.querySelector(o):o,r(!0);},[]),n?reactDom.createPortal(e,a.current,t):null}function co(R){var B=R,{align:e="after",alignOffset:o=0,as:t,defaultOpen:n,dismissible:r=!1,flowId:a,modal:p,part:l,sequential:d=!0,side:m="bottom",sideOffset:f=0,spotlight:y,zIndex:h=9999}=B,x=u(B,["align","alignOffset","as","defaultOpen","dismissible","flowId","modal","part","sequential","side","sideOffset","spotlight","zIndex"]);let{onDismiss:T,onPrimary:w,onSecondary:P}=x;return hr(jsxRuntime.jsx(_,s(i({as:t,flowId:a,part:"tour"},x),{children:({flow:C,handleDismiss:v,parentProps:{containerProps:E},step:$})=>{var k,I,W,he;let N=i({align:e,alignOffset:o,dismissible:r,flow:C,handleDismiss:v,modal:p,onPrimary:w,onSecondary:P,part:l,side:m,sideOffset:f,spotlight:y,step:$,zIndex:(W=(I=(k=$.props)==null?void 0:k.zIndex)!=null?I:E==null?void 0:E.zIndex)!=null?W:h},(he=$.props)!=null?he:{});return d?jsxRuntime.jsx(po,i({defaultOpen:n!=null?n:!0},N)):Array.from(C.steps.values()).filter(Q=>{let{blocked:$e,completed:me,skipped:ee,visible:we}=Q.$state;return !$e&&!me&&!ee&&we}).map(Q=>{var Ke,K,oe,ne,te;function $e(ue){return M(this,null,function*(){return (yield T==null?void 0:T(C,ue))===!1?(ue.preventDefault(),!1):(Q.skip(),!0)})}let me=y&&Q.id===$.id,ee=(oe=(K=(Ke=Q.props)==null?void 0:Ke.zIndex)!=null?K:E==null?void 0:E.zIndex)!=null?oe:h,we=i({align:e,alignOffset:o,dismissible:r,flow:C,handleDismiss:$e,onPrimary:w,onSecondary:P,part:l,side:m,sideOffset:f,spotlight:y,zIndex:ee},(ne=Q.props)!=null?ne:{});return jsxRuntime.jsx(po,i({css:{"&:has([aria-expanded=true])":{zIndex:Number(ee)+2},".fr-overlay":{zIndex:Number(ee)+1},".fr-progress-fraction":{display:"none"}},defaultOpen:(te=n||me)!=null?te:!1,step:Q},we),`${Q.id}-${me}`)})}})),"body")}function br(e){var m,f,y;let{frigade:o}=Fo.useContext(z),[,t]=Fo.useState(!1),n,r=Fo.useCallback(h=>{o==null||o.getCollection(e).then(()=>{h();});let x=()=>{clearTimeout(n),n=setTimeout(()=>{t(R=>!R),h();},100);};return o==null||o.onStateChange(x),()=>{o==null||o.removeStateChangeHandler(x);}},[e]),a=Fo.useSyncExternalStore(r,()=>{let h;try{h=o==null?void 0:o.getCollectionSync(e);}catch(x){}return h},()=>{let h;try{h=o==null?void 0:o.getCollectionSync(e);}catch(x){}return h}),l=(y=((f=(m=a==null?void 0:a.flows)==null?void 0:m.map(h=>s(i({},h),{flow:o==null?void 0:o.getFlowSync(h.flowId)})))!=null?f:[]).find(({flow:h})=>h.isVisible))==null?void 0:y.flowId,{flow:d}=Se(l);return {collection:a,currentFlow:d}}function No(r){var a=r,{collectionId:e,part:o,variables:t={}}=a,n=u(a,["collectionId","part","variables"]);var m,f,y;let p={ANNOUNCEMENT:zo,BANNER:vo,CARD:b,CHECKLIST:oo,EMBEDDED_TIP:b,FORM:Ie,NPS_SURVEY:ze,SURVEY:ze,TOUR:co},{currentFlow:l}=br(e),d=(f=p[(m=l==null?void 0:l.rawData)==null?void 0:m.flowType])!=null?f:null;return l==null||d==null?null:((y=l==null?void 0:l.rawData)==null?void 0:y.flowType)===js.FlowType.FORM?jsxRuntime.jsx(g,s(i({part:["collection",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(Ie,{flowId:l.id,as:H,variables:t},l.id)})):jsxRuntime.jsx(g,s(i({part:["collection",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(d,{flowId:l.id,variables:t},l.id)}))}function _e(){let{frigade:e}=Fo.useContext(z);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Pr(){let[e,o]=Fo.useState(),{frigade:t}=_e();return Fo.useEffect(()=>{t.getCollections().then(n=>{n==null||n.forEach((r,a)=>{r.collectionType==="DEFAULT"&&o(a);});});},[]),e==null?null:jsxRuntime.jsx(No,{as:null,collectionId:e})}var z=Fo.createContext({apiKey:"",navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{}});function Cr(){let{frigade:e}=_e();return Fo.useEffect(()=>{M(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 Sr="2.5.2";function Rr(p){var l=p,{children:e,css:o={},defaultCollection:t=!0,navigate:n,theme:r}=l,a=u(l,["children","css","defaultCollection","navigate","theme"]);let d=r?bo(r):{},m=Fo.useRef(new Map),f=Fo.useRef(),[y,h]=Fo.useState(!1),x=Fo.useMemo(()=>(h(!1),f.current=void 0,new js.Frigade(a.apiKey,{apiKey:a.apiKey,apiUrl:a.apiUrl,userId:a.userId,groupId:a.groupId,userProperties:a.userProperties,groupProperties:a.groupProperties,generateGuestId:a.generateGuestId,syncOnWindowUpdates:a.syncOnWindowUpdates,__readOnly:a.__readOnly,__flowStateOverrides:a.__flowStateOverrides,__platformVersion:Sr,__platformName:"React"})),[a.userId,a.groupId,a.apiKey]);Fo.useEffect(()=>{if(a.__flowStateOverrides){let P=x.getConfig();P.__flowStateOverrides=a.__flowStateOverrides,x.reload(P);}},[a.__flowStateOverrides]);function R(){let P=[...m.current.entries()].map(([C,v])=>[C,v.callback]);x.batchRegister(P),h(!0);}function B(P,C){if(f.current&&clearTimeout(f.current),y){m.current.has(P)?x.getFlow(P).then(v=>C(v.isVisible)):(x.getFlow(P).then(v=>v.register(C)),m.current.set(P,{callback:C}));return}m.current.has(P)||m.current.set(P,{callback:C}),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>R(),0);}function T(P){m.current.has(P)&&x.getFlow(P).then(C=>{m.current.delete(P),C==null||C.unregister();});}let w=n!=null?n:(P,C="_self")=>{window.open(P,C);};return Fo.useEffect(()=>()=>{x.destroy();},[]),jsxRuntime.jsxs(z.Provider,{value:s(i({navigate:w},a),{frigade:x,registerComponent:B,unregisterComponent:T,hasInitialized:y}),children:[jsxRuntime.jsx(react.Global,{styles:{":root":i(i(i({},Po),d),o)}}),jsxRuntime.jsxs(react.ThemeProvider,{theme:D,children:[t&&jsxRuntime.jsx(Pr,{}),e]}),a.preloadImages!==!1&&jsxRuntime.jsx(Cr,{})]})}function Se(e,o){let{frigade:t}=Fo.useContext(z),[,n]=Fo.useState(!1),r=Fo.useCallback(p=>{t==null||t.getFlow(e).then(()=>{p();});let l=d=>{d.id===e&&setTimeout(()=>{n(m=>!m),p();},0);};return t==null||t.onStateChange(l),()=>{t==null||t.removeStateChangeHandler(l);}},[e]),a=Fo.useSyncExternalStore(r,()=>t==null?void 0:t.getFlowSync(e),()=>t==null?void 0:t.getFlowSync(e));return a!=null&&(o!=null&&o.variables)&&a.applyVariables(o.variables),{flow:a,isLoading:t!=null&&t.hasFailedToLoad()?!1:!a}}function Uo(e,{onComplete:o,onDismiss:t}={}){let n=Fo.useRef(null);return Fo.useEffect(()=>{e!=null&&(e.isCompleted&&n.current===!1&&M(this,null,function*(){yield o==null?void 0:o(e);}),n.current=e==null?void 0:e.isCompleted);},[e==null?void 0:e.isCompleted]),{handleDismiss:Fo.useCallback(r=>M(this,null,function*(){if((yield t==null?void 0:t(e,r))===!1)return r.preventDefault(),!1;e.skip();}),[e])}}var de=new Set;function Go(e,o=!0){let t=Fo.useCallback(()=>{de.has(e==null?void 0:e.id)&&de.delete(e==null?void 0:e.id);},[de,o]),n=Fo.useCallback(()=>{o&&(e!=null&&e.isVisible)&&!de.has(e.id)&&de.add(e.id);},[de,o]);Fo.useEffect(()=>()=>{t();},[]),e!=null&&e.isVisible?n():t();let r=de.size>0?de.values().next().value:null;return {isCurrentModal:o?r===(e==null?void 0:e.id)||de.size==0:!0}}function _(m){var f=m,{as:e,children:o,flowId:t,onComplete:n,onDismiss:r,onPrimary:a,onSecondary:p,variables:l}=f,d=u(f,["as","children","flowId","onComplete","onDismiss","onPrimary","onSecondary","variables"]);var k,W;let{flow:y}=Se(t,{variables:l}),I=i(i({},d),(k=y==null?void 0:y.props)!=null?k:{}),{dismissible:h=!1,forceMount:x=!1}=I,R=u(I,["dismissible","forceMount"]),B=y==null?void 0:y.getCurrentStep(),{handleDismiss:T}=Uo(y,{onComplete:n,onDismiss:r}),{handlePrimary:w,handleSecondary:P}=le(B,{onPrimary:a,onSecondary:p}),C=(R==null?void 0:R.modal)||typeof e=="function"&&(e==null?void 0:e.displayName)==="Dialog"||[js.FlowType.ANNOUNCEMENT,js.FlowType.TOUR].includes((W=y==null?void 0:y.rawData)==null?void 0:W.flowType),{isCurrentModal:v}=Go(y,C),E=x&&((y==null?void 0:y.isCompleted)||(y==null?void 0:y.isSkipped));if(!y||!y.isVisible&&!E||!E&&!v)return null;(E||!y.isCompleted&&!y.isSkipped)&&B.start();let $=e===null?Fo.Fragment:e!=null?e:g,N=s(i({},R),{"data-flow-id":y.id});return jsxRuntime.jsx($,s(i({},e===null?{}:N),{children:o({flow:y,handleDismiss:T,handlePrimary:w,handleSecondary:P,parentProps:{dismissible:h,flowId:t,variables:l,containerProps:N},step:B})}))}function Er(t){var n=t,{part:e}=n,o=u(n,["part"]);return jsxRuntime.jsx(_,s(i({as:b,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},o),{children:({handleDismiss:r,handlePrimary:a,handleSecondary:p,parentProps:{dismissible:l},step:d})=>{var y,h,x,R;let m=(h=(y=d.primaryButton)==null?void 0:y.title)!=null?h:d.primaryButtonTitle,f=(R=(x=d.secondaryButton)==null?void 0:x.title)!=null?R:d.secondaryButtonTitle;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(b.Header,{dismissible:l,handleDismiss:r,subtitle:d.subtitle,title:d.title}),jsxRuntime.jsx(b.Media,{src:d.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxRuntime.jsxs(S.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsxRuntime.jsx(b.Secondary,{title:f,onClick:p}),jsxRuntime.jsx(b.Primary,{title:m,onClick:a})]})]})}}))}function uo(n){var r=n,{part:e,src:o}=r,t=u(r,["part","src"]);return jsxRuntime.jsx(g,i({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function Ia(e){var o,t,n,r,a;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/${(a=e.split("loom.com/share/")[1])==null?void 0:a.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function fo(n){var r=n,{part:e,src:o}=r,t=u(r,["part","src"]);let a=Ia(o);return a?jsxRuntime.jsx(g,i({allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"neutral.100",borderWidth:"0",part:["video",e],src:a},t)):o!=null&&o.endsWith(".mp4")?jsxRuntime.jsx(g,i({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 ye(n){var r=n,{src:e,type:o}=r,t=u(r,["src","type"]);return jsxRuntime.jsx(o==="video"?fo:uo,i({src:e},t))}var b=Fo__namespace.forwardRef((a,r)=>{var p=a,{children:e,flowId:o,part:t}=p,n=u(p,["children","flowId","part"]);var d;if(o!=null)return jsxRuntime.jsx(Er,i({flowId:o},n));let l=(d=n.as)!=null?d:S.Column;return jsxRuntime.jsx(l,s(i({backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderRadius:"md",borderWidth:"0",gap:5,p:5,part:["card",t]},n),{ref:r,children:e}))});b.Dismiss=e=>jsxRuntime.jsx(O.Plain,s(i({part:"dismiss",padding:0},e),{children:jsxRuntime.jsx(Fe,{height:"20",fill:"currentColor"})}));b.Footer=n=>{var r=n,{children:e,part:o}=r,t=u(r,["children","part"]);return jsxRuntime.jsx(S.Row,s(i({alignItems:"center",gap:3,justifyContent:"flex-end",part:["card-footer",o]},t),{children:e}))};b.Header=p=>{var l=p,{dismissible:e,handleDismiss:o,part:t,subtitle:n,title:r}=l,a=u(l,["dismissible","handleDismiss","part","subtitle","title"]);return jsxRuntime.jsxs(S.Row,s(i({alignItems:"flex-start",flexWrap:"wrap",gap:1,part:["card-header",t]},a),{children:[jsxRuntime.jsx(b.Title,{maxWidth:"calc(100% - 32px)",children:r}),e&&jsxRuntime.jsx(b.Dismiss,{onClick:o,marginLeft:"auto"}),jsxRuntime.jsx(b.Subtitle,{color:"neutral.400",flexBasis:"100%",children:n})]}))};b.Media=t=>{var n=t,{src:e}=n,o=u(n,["src"]);return e==null||(e==null?void 0:e.length)===0?null:jsxRuntime.jsx(ye,i({borderRadius:"md",src:e},o))};b.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=u(r,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsxRuntime.jsx(O.Primary,i({title:o,onClick:e},t))};b.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=u(r,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsxRuntime.jsx(O.Secondary,i({title:o,onClick:e},t))};b.Subtitle=n=>{var r=n,{children:e,part:o}=r,t=u(r,["children","part"]);return e==null?null:jsxRuntime.jsx(F.Body2,s(i({display:"block",color:"neutral.400",part:["subtitle",o]},t),{children:e}))};b.Title=n=>{var r=n,{children:e,part:o}=r,t=u(r,["children","part"]);return e==null?null:jsxRuntime.jsx(F.H4,s(i({display:"block",part:["title",o]},t),{children:e}))};var go={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function Ir(e){let o=Object.fromEntries(go.content.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),t=Object.fromEntries(go.root.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),n={};for(let r of Object.keys(e))!go.content.some(a=>a===r)&&!go.root.some(a=>a===r)&&(n[r]=e[r]);return {contentProps:o,otherProps:n,rootProps:t}}var Aa=react.keyframes`
89
+ `;function po(B){var T=B,{align:e,alignOffset:o,defaultOpen:t,dismissible:n,flow:r,handleDismiss:a,modal:p,onPrimary:l,onSecondary:d,part:m,side:u,sideOffset:y,spotlight:h,step:x}=T,R=f(T,["align","alignOffset","defaultOpen","dismissible","flow","handleDismiss","modal","onPrimary","onSecondary","part","side","sideOffset","spotlight","step"]);var $,N,k,I,W;let{handlePrimary:w,handleSecondary:P}=le(x,{onPrimary:l,onSecondary:d}),C=(N=($=x.primaryButton)==null?void 0:$.title)!=null?N:x.primaryButtonTitle,v=(I=(k=x.secondaryButton)==null?void 0:k.title)!=null?I:x.secondaryButtonTitle,E=!!x.$state.blocked;return jsxRuntime.jsx(Vo,s(i({align:e,alignOffset:o,anchor:x.selector,"data-step-id":x.id,defaultOpen:t,modal:p,part:m,side:u,sideOffset:y,spotlight:h},R),{children:jsxRuntime.jsxs(b,{animation:`${ea} 300ms ease-out`,boxShadow:"md",maxWidth:"min(360px, calc(100vw - 25px))",children:[jsxRuntime.jsx(b.Media,{aspectRatio:"2",borderRadius:"md md 0 0",borderWidth:"0",margin:"-5 -5 0",objectFit:"cover",overflowClipMargin:"unset",src:(W=x.videoUri)!=null?W:x.imageUri,transform:"translate3d(0, 0, 1px)",type:x.videoUri?"video":"image"}),jsxRuntime.jsx(b.Header,{css:{".fr-dismiss":{position:"absolute",right:"12px",top:"12px"}},dismissible:n,handleDismiss:a,subtitle:x.subtitle,title:x.title}),jsxRuntime.jsxs(b.Footer,{children:[r.getNumberOfAvailableSteps()>1&&jsxRuntime.jsx(Qe,{current:r.getCurrentStepOrder()+1,marginRight:"auto",total:r.getNumberOfAvailableSteps()}),jsxRuntime.jsx(b.Secondary,{disabled:E,onClick:P,title:v}),jsxRuntime.jsx(b.Primary,{disabled:E,onClick:w,title:C})]})]})}))}function hr(e,o,t){let[n,r]=Fo.useState(!1),a=Fo.useRef();return Fo.useEffect(()=>{a.current=typeof o=="string"?document.querySelector(o):o,r(!0);},[]),n?reactDom.createPortal(e,a.current,t):null}function co(R){var B=R,{align:e="after",alignOffset:o=0,as:t,defaultOpen:n,dismissible:r=!1,flowId:a,modal:p,part:l,sequential:d=!0,side:m="bottom",sideOffset:u=0,spotlight:y,zIndex:h=9999}=B,x=f(B,["align","alignOffset","as","defaultOpen","dismissible","flowId","modal","part","sequential","side","sideOffset","spotlight","zIndex"]);let{onDismiss:T,onPrimary:w,onSecondary:P}=x;return hr(jsxRuntime.jsx(_,s(i({as:t,flowId:a,part:"tour"},x),{children:({flow:C,handleDismiss:v,parentProps:{containerProps:E},step:$})=>{var k,I,W,he;let N=i({align:e,alignOffset:o,dismissible:r,flow:C,handleDismiss:v,modal:p,onPrimary:w,onSecondary:P,part:l,side:m,sideOffset:u,spotlight:y,step:$,zIndex:(W=(I=(k=$.props)==null?void 0:k.zIndex)!=null?I:E==null?void 0:E.zIndex)!=null?W:h},(he=$.props)!=null?he:{});return d?jsxRuntime.jsx(po,i({defaultOpen:n!=null?n:!0},N)):Array.from(C.steps.values()).filter(Q=>{let{blocked:$e,completed:me,skipped:ee,visible:we}=Q.$state;return !$e&&!me&&!ee&&we}).map(Q=>{var Ke,K,oe,ne,te;function $e(ue){return M(this,null,function*(){return (yield T==null?void 0:T(C,ue))===!1?(ue.preventDefault(),!1):(Q.skip(),!0)})}let me=y&&Q.id===$.id,ee=(oe=(K=(Ke=Q.props)==null?void 0:Ke.zIndex)!=null?K:E==null?void 0:E.zIndex)!=null?oe:h,we=i({align:e,alignOffset:o,dismissible:r,flow:C,handleDismiss:$e,onPrimary:w,onSecondary:P,part:l,side:m,sideOffset:u,spotlight:y,zIndex:ee},(ne=Q.props)!=null?ne:{});return jsxRuntime.jsx(po,i({css:{"&:has([aria-expanded=true])":{zIndex:Number(ee)+2},".fr-overlay":{zIndex:Number(ee)+1},".fr-progress-fraction":{display:"none"}},defaultOpen:(te=n||me)!=null?te:!1,step:Q},we),`${Q.id}-${me}`)})}})),"body")}function br(e){var m,u,y;let{frigade:o}=Fo.useContext(z),[,t]=Fo.useState(!1),n,r=Fo.useCallback(h=>{o==null||o.getCollection(e).then(()=>{h();});let x=()=>{clearTimeout(n),n=setTimeout(()=>{t(R=>!R),h();},100);};return o==null||o.onStateChange(x),()=>{o==null||o.removeStateChangeHandler(x);}},[e]),a=Fo.useSyncExternalStore(r,()=>{let h;try{h=o==null?void 0:o.getCollectionSync(e);}catch(x){}return h},()=>{let h;try{h=o==null?void 0:o.getCollectionSync(e);}catch(x){}return h}),l=(y=((u=(m=a==null?void 0:a.flows)==null?void 0:m.map(h=>s(i({},h),{flow:o==null?void 0:o.getFlowSync(h.flowId)})))!=null?u:[]).find(({flow:h})=>h.isVisible))==null?void 0:y.flowId,{flow:d}=Se(l);return {collection:a,currentFlow:d}}function No(r){var a=r,{collectionId:e,part:o,variables:t={}}=a,n=f(a,["collectionId","part","variables"]);var m,u,y;let p={ANNOUNCEMENT:zo,BANNER:vo,CARD:b,CHECKLIST:oo,EMBEDDED_TIP:b,FORM:Ie,NPS_SURVEY:ze,SURVEY:ze,TOUR:co},{currentFlow:l}=br(e),d=(u=p[(m=l==null?void 0:l.rawData)==null?void 0:m.flowType])!=null?u:null;return l==null||d==null?null:((y=l==null?void 0:l.rawData)==null?void 0:y.flowType)===js.FlowType.FORM?jsxRuntime.jsx(g,s(i({part:["collection",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(Ie,{flowId:l.id,as:H,variables:t},l.id)})):jsxRuntime.jsx(g,s(i({part:["collection",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(d,{flowId:l.id,variables:t},l.id)}))}function _e(){let{frigade:e}=Fo.useContext(z);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Pr(){let[e,o]=Fo.useState(),{frigade:t}=_e();return Fo.useEffect(()=>{t.getCollections().then(n=>{n==null||n.forEach((r,a)=>{r.collectionType==="DEFAULT"&&o(a);});});},[]),e==null?null:jsxRuntime.jsx(No,{as:null,collectionId:e})}var z=Fo.createContext({apiKey:"",navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{},variables:{}});function Cr(){let{frigade:e}=_e();return Fo.useEffect(()=>{M(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 Sr="2.5.3";function Rr(p){var l=p,{children:e,css:o={},defaultCollection:t=!0,navigate:n,theme:r}=l,a=f(l,["children","css","defaultCollection","navigate","theme"]);let d=r?bo(r):{},m=Fo.useRef(new Map),u=Fo.useRef(),[y,h]=Fo.useState(!1),x=Fo.useMemo(()=>(h(!1),u.current=void 0,new js.Frigade(a.apiKey,{apiKey:a.apiKey,apiUrl:a.apiUrl,userId:a.userId,groupId:a.groupId,userProperties:a.userProperties,groupProperties:a.groupProperties,generateGuestId:a.generateGuestId,syncOnWindowUpdates:a.syncOnWindowUpdates,__readOnly:a.__readOnly,__flowStateOverrides:a.__flowStateOverrides,__platformVersion:Sr,__platformName:"React"})),[a.userId,a.groupId,a.apiKey]);Fo.useEffect(()=>{if(a.__flowStateOverrides){let P=x.getConfig();P.__flowStateOverrides=a.__flowStateOverrides,x.reload(P);}},[a.__flowStateOverrides]);function R(){let P=[...m.current.entries()].map(([C,v])=>[C,v.callback]);x.batchRegister(P),h(!0);}function B(P,C){if(u.current&&clearTimeout(u.current),y){m.current.has(P)?x.getFlow(P).then(v=>C(v.isVisible)):(x.getFlow(P).then(v=>v.register(C)),m.current.set(P,{callback:C}));return}m.current.has(P)||m.current.set(P,{callback:C}),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>R(),0);}function T(P){m.current.has(P)&&x.getFlow(P).then(C=>{m.current.delete(P),C==null||C.unregister();});}let w=n!=null?n:(P,C="_self")=>{window.open(P,C);};return Fo.useEffect(()=>()=>{x.destroy();},[]),jsxRuntime.jsxs(z.Provider,{value:s(i({navigate:w},a),{frigade:x,registerComponent:B,unregisterComponent:T,hasInitialized:y,variables:a.variables||{}}),children:[jsxRuntime.jsx(react.Global,{styles:{":root":i(i(i({},Po),d),o)}}),jsxRuntime.jsxs(react.ThemeProvider,{theme:D,children:[t&&jsxRuntime.jsx(Pr,{}),e]}),a.preloadImages!==!1&&jsxRuntime.jsx(Cr,{})]})}function Se(e,o){let{frigade:t,variables:n}=Fo.useContext(z),[,r]=Fo.useState(!1),a=Fo.useCallback(l=>{t==null||t.getFlow(e).then(()=>{l();});let d=m=>{m.id===e&&setTimeout(()=>{r(u=>!u),l();},0);};return t==null||t.onStateChange(d),()=>{t==null||t.removeStateChangeHandler(d);}},[e]),p=Fo.useSyncExternalStore(a,()=>t==null?void 0:t.getFlowSync(e),()=>t==null?void 0:t.getFlowSync(e));return p==null||p.applyVariables(i(i({},n),o==null?void 0:o.variables)),{flow:p,isLoading:t!=null&&t.hasFailedToLoad()?!1:!p}}function Uo(e,{onComplete:o,onDismiss:t}={}){let n=Fo.useRef(null);return Fo.useEffect(()=>{e!=null&&(e.isCompleted&&n.current===!1&&M(this,null,function*(){yield o==null?void 0:o(e);}),n.current=e==null?void 0:e.isCompleted);},[e==null?void 0:e.isCompleted]),{handleDismiss:Fo.useCallback(r=>M(this,null,function*(){if((yield t==null?void 0:t(e,r))===!1)return r.preventDefault(),!1;e.skip();}),[e])}}var de=new Set;function Go(e,o=!0){let t=Fo.useCallback(()=>{de.has(e==null?void 0:e.id)&&de.delete(e==null?void 0:e.id);},[de,o]),n=Fo.useCallback(()=>{o&&(e!=null&&e.isVisible)&&!de.has(e.id)&&de.add(e.id);},[de,o]);Fo.useEffect(()=>()=>{t();},[]),e!=null&&e.isVisible?n():t();let r=de.size>0?de.values().next().value:null;return {isCurrentModal:o?r===(e==null?void 0:e.id)||de.size==0:!0}}function _(m){var u=m,{as:e,children:o,flowId:t,onComplete:n,onDismiss:r,onPrimary:a,onSecondary:p,variables:l}=u,d=f(u,["as","children","flowId","onComplete","onDismiss","onPrimary","onSecondary","variables"]);var k,W;let{flow:y}=Se(t,{variables:l}),I=i(i({},d),(k=y==null?void 0:y.props)!=null?k:{}),{dismissible:h=!1,forceMount:x=!1}=I,R=f(I,["dismissible","forceMount"]),B=y==null?void 0:y.getCurrentStep(),{handleDismiss:T}=Uo(y,{onComplete:n,onDismiss:r}),{handlePrimary:w,handleSecondary:P}=le(B,{onPrimary:a,onSecondary:p}),C=(R==null?void 0:R.modal)||typeof e=="function"&&(e==null?void 0:e.displayName)==="Dialog"||[js.FlowType.ANNOUNCEMENT,js.FlowType.TOUR].includes((W=y==null?void 0:y.rawData)==null?void 0:W.flowType),{isCurrentModal:v}=Go(y,C),E=x&&((y==null?void 0:y.isCompleted)||(y==null?void 0:y.isSkipped));if(!y||!y.isVisible&&!E||!E&&!v)return null;(E||!y.isCompleted&&!y.isSkipped)&&B.start();let $=e===null?Fo.Fragment:e!=null?e:g,N=s(i({},R),{"data-flow-id":y.id});return jsxRuntime.jsx($,s(i({},e===null?{}:N),{children:o({flow:y,handleDismiss:T,handlePrimary:w,handleSecondary:P,parentProps:{dismissible:h,flowId:t,variables:l,containerProps:N},step:B})}))}function Er(t){var n=t,{part:e}=n,o=f(n,["part"]);return jsxRuntime.jsx(_,s(i({as:b,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},o),{children:({handleDismiss:r,handlePrimary:a,handleSecondary:p,parentProps:{dismissible:l},step:d})=>{var y,h,x,R;let m=(h=(y=d.primaryButton)==null?void 0:y.title)!=null?h:d.primaryButtonTitle,u=(R=(x=d.secondaryButton)==null?void 0:x.title)!=null?R:d.secondaryButtonTitle;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(b.Header,{dismissible:l,handleDismiss:r,subtitle:d.subtitle,title:d.title}),jsxRuntime.jsx(b.Media,{src:d.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxRuntime.jsxs(S.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsxRuntime.jsx(b.Secondary,{title:u,onClick:p}),jsxRuntime.jsx(b.Primary,{title:m,onClick:a})]})]})}}))}function uo(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);return jsxRuntime.jsx(g,i({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function Ia(e){var o,t,n,r,a;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/${(a=e.split("loom.com/share/")[1])==null?void 0:a.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function fo(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);let a=Ia(o);return a?jsxRuntime.jsx(g,i({allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"neutral.100",borderWidth:"0",part:["video",e],src:a},t)):o!=null&&o.endsWith(".mp4")?jsxRuntime.jsx(g,i({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 ye(n){var r=n,{src:e,type:o}=r,t=f(r,["src","type"]);return jsxRuntime.jsx(o==="video"?fo:uo,i({src:e},t))}var b=Fo__namespace.forwardRef((a,r)=>{var p=a,{children:e,flowId:o,part:t}=p,n=f(p,["children","flowId","part"]);var d;if(o!=null)return jsxRuntime.jsx(Er,i({flowId:o},n));let l=(d=n.as)!=null?d:S.Column;return jsxRuntime.jsx(l,s(i({backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderRadius:"md",borderWidth:"0",gap:5,p:5,part:["card",t]},n),{ref:r,children:e}))});b.Dismiss=e=>jsxRuntime.jsx(O.Plain,s(i({part:"dismiss",padding:0},e),{children:jsxRuntime.jsx(Fe,{height:"20",fill:"currentColor"})}));b.Footer=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return jsxRuntime.jsx(S.Row,s(i({alignItems:"center",gap:3,justifyContent:"flex-end",part:["card-footer",o]},t),{children:e}))};b.Header=p=>{var l=p,{dismissible:e,handleDismiss:o,part:t,subtitle:n,title:r}=l,a=f(l,["dismissible","handleDismiss","part","subtitle","title"]);return jsxRuntime.jsxs(S.Row,s(i({alignItems:"flex-start",flexWrap:"wrap",gap:1,part:["card-header",t]},a),{children:[jsxRuntime.jsx(b.Title,{maxWidth:"calc(100% - 32px)",children:r}),e&&jsxRuntime.jsx(b.Dismiss,{onClick:o,marginLeft:"auto"}),jsxRuntime.jsx(b.Subtitle,{color:"neutral.400",flexBasis:"100%",children:n})]}))};b.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(ye,i({borderRadius:"md",src:e},o))};b.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(O.Primary,i({title:o,onClick:e},t))};b.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(O.Secondary,i({title:o,onClick:e},t))};b.Subtitle=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return e==null?null:jsxRuntime.jsx(F.Body2,s(i({display:"block",color:"neutral.400",part:["subtitle",o]},t),{children:e}))};b.Title=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return e==null?null:jsxRuntime.jsx(F.H4,s(i({display:"block",part:["title",o]},t),{children:e}))};var go={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function Ir(e){let o=Object.fromEntries(go.content.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),t=Object.fromEntries(go.root.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),n={};for(let r of Object.keys(e))!go.content.some(a=>a===r)&&!go.root.some(a=>a===r)&&(n[r]=e[r]);return {contentProps:o,otherProps:n,rootProps:t}}var Aa=react.keyframes`
90
90
  from {
91
91
  opacity: 0;
92
92
  }
@@ -96,7 +96,7 @@ var qo=Object.defineProperty,_r=Object.defineProperties;var Ur=Object.getOwnProp
96
96
  to {
97
97
  opacity: 1;
98
98
  }
99
- `;function H(r){var a=r,{children:e,className:o,modal:t=!0}=a,n=u(a,["children","className","modal"]);let{rootProps:p,contentProps:l,otherProps:f}=Ir(n),y=f,{zIndex:d}=y,m=u(y,["zIndex"]);return jsxRuntime.jsx(j__namespace.Root,s(i({defaultOpen:!0,modal:t},p),{children:jsxRuntime.jsx(j__namespace.Portal,{children:jsxRuntime.jsxs(g,{animation:`${Aa} 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(j__namespace.Overlay,{asChild:!0,children:jsxRuntime.jsx(g,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsxRuntime.jsx(j__namespace.Content,s(i({asChild:!0,onOpenAutoFocus:h=>h.preventDefault(),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault()},l),{children:jsxRuntime.jsx(b,s(i({alignSelf:"center",boxShadow:"md",justifySelf:"center",maxHeight:"100%",maxWidth:"430px",overflowY:"auto",padding:8,part:"dialog",pointerEvents:"auto",position:"relative"},m),{children:e}))}))]})})}))}H.Dismiss=e=>jsxRuntime.jsx(j__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(O.Plain,s(i({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsxRuntime.jsx(Fe,{height:"20",fill:"currentColor"})}))});H.Subtitle=t=>{var n=t,{children:e}=n,o=u(n,["children"]);return jsxRuntime.jsx(j__namespace.Description,{asChild:!0,children:jsxRuntime.jsx(F.Body2,s(i({part:"subtitle"},o),{children:e}))})};H.Media=t=>{var n=t,{src:e}=n,o=u(n,["src"]);return e==null?null:jsxRuntime.jsx(ye,i({borderRadius:"md",src:e},o))};H.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=u(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(O.Primary,i({title:o,onClick:e},t))};H.ProgressDots=({current:e,total:o})=>{if(o==1)return null;let t=[...Array(o)].map((n,r)=>jsxRuntime.jsx(g,{as:"circle",r:4,cx:4+16*r,cy:"4px",fill:e===r?D.colors.primary.surface:D.colors.neutral[700],part:e===r?"progress-dot-selected":"progress-dot"},r));return jsxRuntime.jsx(g,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8,children:t})};H.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=u(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(O.Secondary,i({title:o,onClick:e},t))};H.Title=t=>{var n=t,{children:e}=n,o=u(n,["children"]);return jsxRuntime.jsx(j__namespace.Title,{asChild:!0,children:jsxRuntime.jsx(F.H4,s(i({part:"title"},o),{children:e}))})};H.displayName="Dialog";var Hr=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function zo(n){var r=n,{flowId:e,part:o}=r,t=u(r,["flowId","part"]);let a=Object.fromEntries(Object.entries(t).filter(([l])=>Hr.some(d=>l===d))),p=Object.fromEntries(Object.entries(t).filter(([l])=>Hr.indexOf(l)===-1));return jsxRuntime.jsx(_,s(i({as:null,flowId:e},a),{children:({flow:l,handleDismiss:d,handlePrimary:m,handleSecondary:f,parentProps:{containerProps:y,dismissible:h},step:x})=>{var P,C,v,E,$,N;let R=(P=x.props)!=null?P:{},B=(v=(C=x.primaryButton)==null?void 0:C.title)!=null?v:x.primaryButtonTitle,T=($=(E=x.secondaryButton)==null?void 0:E.title)!=null?$:x.secondaryButtonTitle,w=x.$state.blocked;return jsxRuntime.jsx(H,s(i(i({part:["announcement",o],textAlign:"center"},y),p),{onEscapeKeyDown:k=>{if(t.dismissible===!1){k.preventDefault();return}typeof t.onEscapeKeyDown=="function"&&t.onEscapeKeyDown(k),k.defaultPrevented||d(k);},children:jsxRuntime.jsxs(S.Column,s(i({gap:5,part:"announcement-step"},R),{children:[h&&jsxRuntime.jsx(H.Dismiss,{onClick:d}),jsxRuntime.jsxs(S.Column,{gap:1,part:"announcement-header",children:[jsxRuntime.jsx(H.Title,{children:x.title}),jsxRuntime.jsx(H.Subtitle,{children:x.subtitle})]}),jsxRuntime.jsx(H.Media,{aspectRatio:"1.5",objectFit:"cover",overflowClipMargin:"unset",src:(N=x.videoUri)!=null?N:x.imageUri,transform:"translate3d(0, 0, 1px)",type:x.videoUri?"video":"image",width:"100%"}),jsxRuntime.jsx(H.ProgressDots,{current:l.getCurrentStepIndex(),total:l.getNumberOfAvailableSteps()}),jsxRuntime.jsxs(S.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[T&&jsxRuntime.jsx(H.Secondary,{disabled:w,onClick:f,title:T}),B&&jsxRuntime.jsx(H.Primary,{disabled:w,onClick:m,title:B})]})]}))}))}}))}function yo(){let e="DOMRect"in globalThis?new DOMRect:{height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}},[o,t]=Fo.useState(e),[n,r]=Fo.useState(null),a=Fo.useCallback(p=>{r(p);},[]);return Fo.useLayoutEffect(()=>{if(!n)return;let p=()=>{let l=n.getBoundingClientRect();t(l);};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[n]),{node:n,rect:o,ref:a}}var za=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function Ar(n){var r=n,{style:e={},part:o=""}=r,t=u(r,["style","part"]);return jsxRuntime.jsxs(g,s(i({part:`dot-wrapper ${o}`,style:i({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsxRuntime.jsx(g,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${za}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsxRuntime.jsx(g,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]}))}function Wr({props:e,alignAttr:o,sideAttr:t}){let n=t!=null?t:"bottom",r={},a=()=>{var m;if(["after","before"].includes(e.align)){if(o=="start")return "before";if(o=="end")return "after"}return (m=e.align)!=null?m:"after"},p="-24px",l={top:"bottom",right:"left",bottom:"top",left:"right"};r[l[n]]=p;let d=a();return ["before","end"].includes(d)?["top","bottom"].includes(n)?r.right=p:r.bottom=p:["after","start"].includes(d)?["top","bottom"].includes(n)?r.left=p:r.top=p:["top","bottom"].includes(n)?r.left=`calc(50% + ${p})`:r.top=`calc(50% + ${p})`,r}var xo={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["modal","onOpenChange"]};function Vr(e,o){var a,p,l,d,m;let t=Object.fromEntries(xo.content.map(f=>[f,e[f]]).filter(f=>f[1]!==void 0)),n=Object.fromEntries(xo.root.map(f=>[f,e[f]]).filter(f=>f[1]!==void 0)),r={};for(let f of Object.keys(e))!xo.content.includes(f)&&!xo.root.includes(f)&&(r[f]=e[f]);if(t.align=(a=t.align)!=null?a:"after",t.side=(p=t.side)!=null?p:"bottom",["before","after"].includes(t.align)){let f={after:"end",before:"start"},y=(w,P)=>["top","bottom"].includes(P)?w=="after"?"marginLeft":"marginRight":w=="after"?"marginTop":"marginBottom",h=(l=t.alignOffset)!=null?l:0,x=(d=t.style)!=null?d:{},R=(m=t.side)!=null?m:"bottom",B=t.align;t.style=s(i({},x),{[y(B,R)]:h});let T=["top","bottom"].includes(R)?o.width:o.height;t.alignOffset=(T+h)*-1,t.align=f[B];}return {contentProps:t,otherProps:r,rootProps:n}}var Lr=react.keyframes`
99
+ `;function H(r){var a=r,{children:e,className:o,modal:t=!0}=a,n=f(a,["children","className","modal"]);let{rootProps:p,contentProps:l,otherProps:u}=Ir(n),y=u,{zIndex:d}=y,m=f(y,["zIndex"]);return jsxRuntime.jsx(j__namespace.Root,s(i({defaultOpen:!0,modal:t},p),{children:jsxRuntime.jsx(j__namespace.Portal,{children:jsxRuntime.jsxs(g,{animation:`${Aa} 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(j__namespace.Overlay,{asChild:!0,children:jsxRuntime.jsx(g,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsxRuntime.jsx(j__namespace.Content,s(i({asChild:!0,onOpenAutoFocus:h=>h.preventDefault(),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault()},l),{children:jsxRuntime.jsx(b,s(i({alignSelf:"center",boxShadow:"md",justifySelf:"center",maxHeight:"100%",maxWidth:"430px",overflowY:"auto",padding:8,part:"dialog",pointerEvents:"auto",position:"relative"},m),{children:e}))}))]})})}))}H.Dismiss=e=>jsxRuntime.jsx(j__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(O.Plain,s(i({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsxRuntime.jsx(Fe,{height:"20",fill:"currentColor"})}))});H.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(j__namespace.Description,{asChild:!0,children:jsxRuntime.jsx(F.Body2,s(i({part:"subtitle"},o),{children:e}))})};H.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsxRuntime.jsx(ye,i({borderRadius:"md",src:e},o))};H.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(O.Primary,i({title:o,onClick:e},t))};H.ProgressDots=({current:e,total:o})=>{if(o==1)return null;let t=[...Array(o)].map((n,r)=>jsxRuntime.jsx(g,{as:"circle",r:4,cx:4+16*r,cy:"4px",fill:e===r?D.colors.primary.surface:D.colors.neutral[700],part:e===r?"progress-dot-selected":"progress-dot"},r));return jsxRuntime.jsx(g,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8,children:t})};H.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(O.Secondary,i({title:o,onClick:e},t))};H.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(j__namespace.Title,{asChild:!0,children:jsxRuntime.jsx(F.H4,s(i({part:"title"},o),{children:e}))})};H.displayName="Dialog";var Hr=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function zo(n){var r=n,{flowId:e,part:o}=r,t=f(r,["flowId","part"]);let a=Object.fromEntries(Object.entries(t).filter(([l])=>Hr.some(d=>l===d))),p=Object.fromEntries(Object.entries(t).filter(([l])=>Hr.indexOf(l)===-1));return jsxRuntime.jsx(_,s(i({as:null,flowId:e},a),{children:({flow:l,handleDismiss:d,handlePrimary:m,handleSecondary:u,parentProps:{containerProps:y,dismissible:h},step:x})=>{var P,C,v,E,$,N;let R=(P=x.props)!=null?P:{},B=(v=(C=x.primaryButton)==null?void 0:C.title)!=null?v:x.primaryButtonTitle,T=($=(E=x.secondaryButton)==null?void 0:E.title)!=null?$:x.secondaryButtonTitle,w=x.$state.blocked;return jsxRuntime.jsx(H,s(i(i({part:["announcement",o],textAlign:"center"},y),p),{onEscapeKeyDown:k=>{if(t.dismissible===!1){k.preventDefault();return}typeof t.onEscapeKeyDown=="function"&&t.onEscapeKeyDown(k),k.defaultPrevented||d(k);},children:jsxRuntime.jsxs(S.Column,s(i({gap:5,part:"announcement-step"},R),{children:[h&&jsxRuntime.jsx(H.Dismiss,{onClick:d}),jsxRuntime.jsxs(S.Column,{gap:1,part:"announcement-header",children:[jsxRuntime.jsx(H.Title,{children:x.title}),jsxRuntime.jsx(H.Subtitle,{children:x.subtitle})]}),jsxRuntime.jsx(H.Media,{aspectRatio:"1.5",objectFit:"cover",overflowClipMargin:"unset",src:(N=x.videoUri)!=null?N:x.imageUri,transform:"translate3d(0, 0, 1px)",type:x.videoUri?"video":"image",width:"100%"}),jsxRuntime.jsx(H.ProgressDots,{current:l.getCurrentStepIndex(),total:l.getNumberOfAvailableSteps()}),jsxRuntime.jsxs(S.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[T&&jsxRuntime.jsx(H.Secondary,{disabled:w,onClick:u,title:T}),B&&jsxRuntime.jsx(H.Primary,{disabled:w,onClick:m,title:B})]})]}))}))}}))}function yo(){let e="DOMRect"in globalThis?new DOMRect:{height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}},[o,t]=Fo.useState(e),[n,r]=Fo.useState(null),a=Fo.useCallback(p=>{r(p);},[]);return Fo.useLayoutEffect(()=>{if(!n)return;let p=()=>{let l=n.getBoundingClientRect();t(l);};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[n]),{node:n,rect:o,ref:a}}var za=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function Ar(n){var r=n,{style:e={},part:o=""}=r,t=f(r,["style","part"]);return jsxRuntime.jsxs(g,s(i({part:`dot-wrapper ${o}`,style:i({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsxRuntime.jsx(g,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${za}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsxRuntime.jsx(g,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]}))}function Wr({props:e,alignAttr:o,sideAttr:t}){let n=t!=null?t:"bottom",r={},a=()=>{var m;if(["after","before"].includes(e.align)){if(o=="start")return "before";if(o=="end")return "after"}return (m=e.align)!=null?m:"after"},p="-24px",l={top:"bottom",right:"left",bottom:"top",left:"right"};r[l[n]]=p;let d=a();return ["before","end"].includes(d)?["top","bottom"].includes(n)?r.right=p:r.bottom=p:["after","start"].includes(d)?["top","bottom"].includes(n)?r.left=p:r.top=p:["top","bottom"].includes(n)?r.left=`calc(50% + ${p})`:r.top=`calc(50% + ${p})`,r}var xo={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["modal","onOpenChange"]};function Vr(e,o){var a,p,l,d,m;let t=Object.fromEntries(xo.content.map(u=>[u,e[u]]).filter(u=>u[1]!==void 0)),n=Object.fromEntries(xo.root.map(u=>[u,e[u]]).filter(u=>u[1]!==void 0)),r={};for(let u of Object.keys(e))!xo.content.includes(u)&&!xo.root.includes(u)&&(r[u]=e[u]);if(t.align=(a=t.align)!=null?a:"after",t.side=(p=t.side)!=null?p:"bottom",["before","after"].includes(t.align)){let u={after:"end",before:"start"},y=(w,P)=>["top","bottom"].includes(P)?w=="after"?"marginLeft":"marginRight":w=="after"?"marginTop":"marginBottom",h=(l=t.alignOffset)!=null?l:0,x=(d=t.style)!=null?d:{},R=(m=t.side)!=null?m:"bottom",B=t.align;t.style=s(i({},x),{[y(B,R)]:h});let T=["top","bottom"].includes(R)?o.width:o.height;t.alignOffset=(T+h)*-1,t.align=u[B];}return {contentProps:t,otherProps:r,rootProps:n}}var Lr=react.keyframes`
100
100
  from {
101
101
  opacity: 0;
102
102
  }
@@ -106,7 +106,7 @@ var qo=Object.defineProperty,_r=Object.defineProperties;var Ur=Object.getOwnProp
106
106
  to {
107
107
  opacity: 1;
108
108
  }
109
- `;function Nr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function xe(m){var f=m,{anchor:e,children:o,className:t,defaultOpen:n=!0,open:r,part:a,spotlight:p=!1,style:l={}}=f,d=u(f,["anchor","children","className","defaultOpen","open","part","spotlight","style"]);let{node:y,rect:h,ref:x}=yo(),{node:R,rect:B,ref:T}=yo(),{contentProps:w,otherProps:P,rootProps:C}=Vr(d,h),[v,E]=Fo.useState(n),[$,N]=Fo.useState(w.align),[k,I]=Fo.useState(w.side),[W,he]=Fo.useState(0),[Q,$e]=Fo.useState(0);function me(){return r!=null?(console.log("OVERRIDE: ",r),r):(console.log("INTERNAL: ",v),v)}if(y!==null){let K=y.getAttribute("data-align"),oe=y.getAttribute("data-side");$!==K&&N(K),k!==oe&&I(oe);}let ee=Fo.useRef(null);if(Fo.useEffect(()=>{let K=document.querySelector(e);K!=null?(T(K),ee.current=K):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),Fo.useEffect(()=>{function K(ne){if(ne.matches(e))return Nr(ne)?ne:null;let te=ne.querySelectorAll(e);return te.length>0&&Nr(te[0])?te[0]:null}let oe=new MutationObserver(ne=>{for(let te of ne)if(te.type==="childList"){for(let ue of te.addedNodes){if(ue.nodeType!==Node.ELEMENT_NODE)continue;let fe=K(ue);if(fe!=null){T(fe),ee.current=fe,console.debug("[frigade] Tooltip: MutationObserver added anchor: ",fe);break}}for(let ue of te.removedNodes){if(ue.nodeType!==Node.ELEMENT_NODE)continue;let fe=K(ue);if(fe!=null){T(null),ee.current=null,console.debug("[frigade] Tooltip: MutationObserver removed anchor: ",fe);break}}}});return oe.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>oe.disconnect()},[]),Fo.useEffect(()=>{let{scrollX:K,scrollY:oe}=window;he(B.left+K),$e(B.top+oe);},[B.left,B.top]),R==null)return null;let we="0";typeof window!="undefined"&&(we=window.getComputedStyle(R).borderRadius);let Ke=Wr({props:d,alignAttr:$,sideAttr:k});return jsxRuntime.jsxs(re__namespace.Root,s(i({defaultOpen:!0},C),{children:[jsxRuntime.jsx(re__namespace.Anchor,{virtualRef:ee}),jsxRuntime.jsx(re__namespace.Portal,{children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p&&jsxRuntime.jsx(g,i({animation:`${Lr} 300ms ease-out`,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",part:"tooltip-spotlight",pointerEvents:"none",position:"absolute",style:{borderRadius:we,height:B.height,left:W,top:Q,width:B.width}},d.zIndex!=null?{zIndex:d.zIndex}:{})),jsxRuntime.jsx(re__namespace.Content,s(i({},w),{ref:x,children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[me()&&jsxRuntime.jsx(b,s(i({animation:`${Lr} 300ms ease-out`,boxShadow:"md",position:"relative",className:t,maxWidth:"min(360px, calc(100vw - 25px))",part:["tooltip",a],style:l},P),{children:o})),jsxRuntime.jsx(Ar,{onClick:()=>{E(()=>(typeof C.onOpenChange=="function"&&C.onOpenChange(!me()),!me()));},style:Ke})]})}),v)]})})]}))}xe.Close=e=>jsxRuntime.jsx(re__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(O.Plain,s(i({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsxRuntime.jsx(Fe,{height:"20",fill:"currentColor"})}))});xe.Media=t=>{var n=t,{src:e}=n,o=u(n,["src"]);return e==null?null:jsxRuntime.jsx(ye,i({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))};xe.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=u(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(O.Primary,i({title:o,onClick:e},t))};xe.Progress=t=>{var n=t,{children:e}=n,o=u(n,["children"]);return e==null?null:jsxRuntime.jsx(F.Body2,s(i({part:"progress"},o),{children:e}))};xe.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=u(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(O.Secondary,i({title:o,onClick:e},t))};xe.Subtitle=t=>{var n=t,{children:e}=n,o=u(n,["children"]);return e==null?null:jsxRuntime.jsx(F.Body2,s(i({part:"subtitle"},o),{children:e}))};xe.Title=t=>{var n=t,{children:e}=n,o=u(n,["children"]);return e==null?null:jsxRuntime.jsx(F.H4,s(i({part:"title"},o),{children:e}))};function ja(){let{userId:e,frigade:o}=Fo.useContext(z);function t(r){return M(this,null,function*(){yield o.identify(e,r);})}function n(r,a){return M(this,null,function*(){yield o.track(r,a);})}return {userId:e,addProperties:t,track:n}}function Ja(){var r;let{frigade:e}=Fo.useContext(z);function o(a){return M(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,a);})}function t(a,p){return M(this,null,function*(){yield e.track(a,p);})}function n(a,p){return M(this,null,function*(){yield e.group(a,p);})}return {groupId:(r=e==null?void 0:e.config)==null?void 0:r.groupId,setGroupId:n,addProperties:o,track:t}}
109
+ `;function Nr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function xe(m){var u=m,{anchor:e,children:o,className:t,defaultOpen:n=!0,open:r,part:a,spotlight:p=!1,style:l={}}=u,d=f(u,["anchor","children","className","defaultOpen","open","part","spotlight","style"]);let{node:y,rect:h,ref:x}=yo(),{node:R,rect:B,ref:T}=yo(),{contentProps:w,otherProps:P,rootProps:C}=Vr(d,h),[v,E]=Fo.useState(n),[$,N]=Fo.useState(w.align),[k,I]=Fo.useState(w.side),[W,he]=Fo.useState(0),[Q,$e]=Fo.useState(0);function me(){return r!=null?(console.log("OVERRIDE: ",r),r):(console.log("INTERNAL: ",v),v)}if(y!==null){let K=y.getAttribute("data-align"),oe=y.getAttribute("data-side");$!==K&&N(K),k!==oe&&I(oe);}let ee=Fo.useRef(null);if(Fo.useEffect(()=>{let K=document.querySelector(e);K!=null?(T(K),ee.current=K):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),Fo.useEffect(()=>{function K(ne){if(ne.matches(e))return Nr(ne)?ne:null;let te=ne.querySelectorAll(e);return te.length>0&&Nr(te[0])?te[0]:null}let oe=new MutationObserver(ne=>{for(let te of ne)if(te.type==="childList"){for(let ue of te.addedNodes){if(ue.nodeType!==Node.ELEMENT_NODE)continue;let fe=K(ue);if(fe!=null){T(fe),ee.current=fe,console.debug("[frigade] Tooltip: MutationObserver added anchor: ",fe);break}}for(let ue of te.removedNodes){if(ue.nodeType!==Node.ELEMENT_NODE)continue;let fe=K(ue);if(fe!=null){T(null),ee.current=null,console.debug("[frigade] Tooltip: MutationObserver removed anchor: ",fe);break}}}});return oe.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>oe.disconnect()},[]),Fo.useEffect(()=>{let{scrollX:K,scrollY:oe}=window;he(B.left+K),$e(B.top+oe);},[B.left,B.top]),R==null)return null;let we="0";typeof window!="undefined"&&(we=window.getComputedStyle(R).borderRadius);let Ke=Wr({props:d,alignAttr:$,sideAttr:k});return jsxRuntime.jsxs(re__namespace.Root,s(i({defaultOpen:!0},C),{children:[jsxRuntime.jsx(re__namespace.Anchor,{virtualRef:ee}),jsxRuntime.jsx(re__namespace.Portal,{children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p&&jsxRuntime.jsx(g,i({animation:`${Lr} 300ms ease-out`,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",part:"tooltip-spotlight",pointerEvents:"none",position:"absolute",style:{borderRadius:we,height:B.height,left:W,top:Q,width:B.width}},d.zIndex!=null?{zIndex:d.zIndex}:{})),jsxRuntime.jsx(re__namespace.Content,s(i({},w),{ref:x,children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[me()&&jsxRuntime.jsx(b,s(i({animation:`${Lr} 300ms ease-out`,boxShadow:"md",position:"relative",className:t,maxWidth:"min(360px, calc(100vw - 25px))",part:["tooltip",a],style:l},P),{children:o})),jsxRuntime.jsx(Ar,{onClick:()=>{E(()=>(typeof C.onOpenChange=="function"&&C.onOpenChange(!me()),!me()));},style:Ke})]})}),v)]})})]}))}xe.Close=e=>jsxRuntime.jsx(re__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(O.Plain,s(i({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsxRuntime.jsx(Fe,{height:"20",fill:"currentColor"})}))});xe.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsxRuntime.jsx(ye,i({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))};xe.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(O.Primary,i({title:o,onClick:e},t))};xe.Progress=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.Body2,s(i({part:"progress"},o),{children:e}))};xe.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(O.Secondary,i({title:o,onClick:e},t))};xe.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.Body2,s(i({part:"subtitle"},o),{children:e}))};xe.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.H4,s(i({part:"title"},o),{children:e}))};function ja(){let{userId:e,frigade:o}=Fo.useContext(z);function t(r){return M(this,null,function*(){yield o.identify(e,r);})}function n(r,a){return M(this,null,function*(){yield o.track(r,a);})}return {userId:e,addProperties:t,track:n}}function Ja(){var r;let{frigade:e}=Fo.useContext(z);function o(a){return M(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,a);})}function t(a,p){return M(this,null,function*(){yield e.track(a,p);})}function n(a,p){return M(this,null,function*(){yield e.group(a,p);})}return {groupId:(r=e==null?void 0:e.config)==null?void 0:r.groupId,setGroupId:n,addProperties:o,track:t}}
110
110
 
111
111
  exports.FrigadeJS = js__namespace;
112
112
  exports.Announcement = zo;