@frigade/react 2.4.0 → 2.4.2
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 +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -48,7 +48,7 @@ var Ce__namespace = /*#__PURE__*/_interopNamespace(Ce);
|
|
|
48
48
|
var N__namespace = /*#__PURE__*/_interopNamespace(N);
|
|
49
49
|
var Z__namespace = /*#__PURE__*/_interopNamespace(Z);
|
|
50
50
|
|
|
51
|
-
var Do=Object.defineProperty,nr=Object.defineProperties;var ir=Object.getOwnPropertyDescriptors;var Ae=Object.getOwnPropertySymbols;var Eo=Object.prototype.hasOwnProperty,Oo=Object.prototype.propertyIsEnumerable;var ko=(e,o,t)=>o in e?Do(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,a=(e,o)=>{for(var t in o||(o={}))Eo.call(o,t)&&ko(e,t,o[t]);if(Ae)for(var t of Ae(o))Oo.call(o,t)&&ko(e,t,o[t]);return e},d=(e,o)=>nr(e,ir(o));var ar=(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 r in e)Eo.call(e,r)&&o.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&Ae)for(var r of Ae(e))o.indexOf(r)<0&&Oo.call(e,r)&&(t[r]=e[r]);return t};var ee=(e,o)=>{for(var t in o)Do(e,t,{get:o[t],enumerable:!0});};var H=(e,o,t)=>new Promise((r,n)=>{var i=c=>{try{l(t.next(c));}catch(u){n(u);}},s=c=>{try{l(t.throw(c));}catch(u){n(u);}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,s);l((t=t.apply(e,o)).next());});var Io={borderWidths:{md:"1px"}};var $e=[5,10,20,35,50,65,80,95,98],Ho=[...$e],oo=[...$e];Ho[4]=40;oo[4]=60;var sr={blue:{h:213,s:100,l:$e},gray:{h:220,s:10,l:$e},green:{h:141,s:90,l:Ho},red:{h:9,s:90,l:oo},yellow:{h:50,s:90,l:oo}};var L={};for(let[e,{h:o,s:t,l:r}]of Object.entries(sr))L[e]=Object.fromEntries(r.map((n,i)=>[`${(i+1)*100}`,`hsl(${o} ${t}% ${n}%)`]));var Mo=d(a({black:"hsl(0 0% 0%)",white:"hsl(0 0% 100%)"},L),{gray100:L.gray[100],gray200:L.gray[200],gray300:L.gray[300],gray400:L.gray[400],gray500:L.gray[500],gray600:L.gray[600],gray700:L.gray[700],gray800:L.gray[800],gray900:L.gray[900],blue400:L.blue[400],blue500:L.blue[500],blue800:L.blue[800],blue900:L.blue[900],green400:L.blue[400],green500:L.green[500],green800:L.green[800],red500:L.red[500],transparent:"#FFFFFF00",inherit:"inherit"});var Wo={md:"8px",lg:"20px",round:"50%"};var p=e=>`var(--fr-colors-${e})`,Lo={negative:{100:p("red-100"),200:p("red-200"),300:p("red-300"),400:p("red-400"),500:p("red-500"),600:p("red-600"),700:p("red-700"),800:p("red-800"),900:p("red-900"),background:p("negative-500"),border:p("negative-500"),foreground:p("white"),surface:p("negative-500"),active:{background:p("negative-400"),border:p("negative-400"),foreground:p("white"),surface:p("negative-400")},focus:{background:p("negative-500"),border:p("negative-500"),foreground:p("white"),surface:p("negative-500")},hover:{background:p("negative-400"),border:p("negative-400"),foreground:p("white"),surface:p("negative-400")}},neutral:{100:p("gray-100"),200:p("gray-200"),300:p("gray-300"),400:p("gray-400"),500:p("gray-500"),600:p("gray-600"),700:p("gray-700"),800:p("gray-800"),900:p("gray-900"),background:p("white"),border:p("neutral-800"),foreground:p("black"),surface:p("neutral-700"),active:{background:p("white"),border:p("neutral-900"),foreground:p("black"),surface:p("neutral-700")},focus:{background:p("white"),border:p("neutral-900"),foreground:p("black"),surface:p("neutral-700")},hover:{background:p("white"),border:p("neutral-900"),foreground:p("black"),surface:p("neutral-700")}},positive:{100:p("green-100"),200:p("green-200"),300:p("green-300"),400:p("green-400"),500:p("green-500"),600:p("green-600"),700:p("green-700"),800:p("green-800"),900:p("green-900"),background:p("positive-500"),border:p("positive-500"),foreground:p("white"),surface:p("positive-500"),active:{background:p("positive-400"),border:p("positive-400"),foreground:p("white"),surface:p("positive-400")},focus:{background:p("positive-500"),border:p("positive-500"),foreground:p("white"),surface:p("positive-500")},hover:{background:p("positive-400"),border:p("positive-400"),foreground:p("white"),surface:p("positive-400")}},primary:{100:p("blue-100"),200:p("blue-200"),300:p("blue-300"),400:p("blue-400"),500:p("blue-500"),600:p("blue-600"),700:p("blue-700"),800:p("blue-800"),900:p("blue-900"),background:p("primary-500"),border:p("primary-500"),foreground:p("white"),surface:p("primary-500"),active:{background:p("primary-400"),border:p("primary-400"),foreground:p("white"),surface:p("primary-400")},focus:{background:p("primary-500"),border:p("primary-500"),foreground:p("white"),surface:p("primary-500")},hover:{background:p("primary-400"),border:p("primary-400"),foreground:p("white"),surface:p("primary-400")}},secondary:{100:p("gray-100"),200:p("gray-200"),300:p("gray-300"),400:p("gray-400"),500:p("gray-500"),600:p("gray-600"),700:p("gray-700"),800:p("gray-800"),900:p("gray-900"),background:p("white"),border:p("secondary-800"),foreground:p("black"),surface:p("secondary-900"),active:{background:p("secondary-900"),border:p("secondary-800"),foreground:p("black"),surface:p("secondary-800")},focus:{background:p("secondary-900"),border:p("secondary-800"),foreground:p("black"),surface:p("secondary-900")},hover:{background:p("secondary-900"),border:p("secondary-800"),foreground:p("black"),surface:p("secondary-800")}}};var Ao={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var lr="px",pr=e=>typeof e=="number"?`${4*e}${lr}`:e,dr=[-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"],$o=Object.fromEntries(dr.map(e=>[e,pr(e)]));var No={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 Ne=d(a(d(a({},Io),{colors:a(a({},Mo),Lo)}),No),{radii:Wo,shadows:Ao,space:$o});function Be(e,o="",t="."){return Object.keys(e).reduce((r,n)=>{let s=`${o.length?`${o}${t}`:""}${n}`,l=e[n];return typeof l=="object"&&l!==null&&!Array.isArray(l)?Object.assign(r,Be(l,s,t)):r[s]=l,r},{})}function to(e){let o=Be(e,"--fr","-");for(let[t,r]of Object.entries(o))if(t.indexOf(".")>-1){let n=t.replace(/\./g,"-");o[n]=r,delete o[t];}return o}function Vo(e,o="--fr"){let t={};return Object.keys(e).forEach(r=>{let n=e[r],i=r.replace(/\./g,"-");typeof n=="object"&&n!==null&&!Array.isArray(n)?t[r]=Vo(n,`${o}-${r}`):t[r]=`var(${o}-${i})`;}),t}var ro=to(Ne),T=Vo(Ne);var ur=new Set(["alt","size","src"]),mr=cr__default.default.all.filter(e=>e.indexOf("-")!=0&&!ur.has(e)).map(e=>[e.replace(/-([a-z])/g,(o,t)=>t.toUpperCase()),null]),fr=Object.fromEntries(mr),Ve=Be(T.colors),gr={color:Ve,backgroundColor:Ve,borderColor:Ve,border:a(a({},T.borderWidths),Ve),borderRadius:T.radii,borderWidth:T.borderWidths,boxShadow:T.shadows,fontFamily:T.fontFamilies,fontSize:T.fontSizes,fontWeight:T.fontWeights,gap:T.space,lineHeight:T.lineHeights,margin:T.space,marginBottom:T.space,marginLeft:T.space,marginRight:T.space,marginTop:T.space,padding:T.space,paddingBottom:T.space,paddingLeft:T.space,paddingRight:T.space,paddingTop:T.space},_o=a(a({},fr),gr),zo={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"]},Ko=new Set(["active","disabled","focus","focusVisible","focusWithin","hover"]);function yr(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 Uo=new Map(Object.entries(_o).map(([e,o])=>[e,yr(o)])),xr=new Map(Object.entries(zo).map(([e,o])=>[e,new Set(o)])),br=new Set(["height","width"]),hr=new Set(["canvas","embed","iframe","img","input","object","video"]);function jo(e){let[o,t]=e.split(":");return [o,Ko.has(t)?t:null]}function Go(e,o="div"){let t=Object.assign({},e),r={};function n(i){if(i==null)return r;let l=`&:${i.replace(/[A-Z]/g,c=>`-${c.toLocaleLowerCase()}`)}`;return r[l]==null&&(r[l]={}),r[l]}return Object.entries(t).forEach(([i,s])=>{let[l,c]=jo(i),u=xr.get(l);u!=null&&(u.forEach(g=>{let h=`${g}${c?":"+c:""}`;t[h]=s;}),delete t[i]);}),Object.entries(t).forEach(([i,s])=>{let[l,c]=jo(i),u=Uo.get(l);if(u!=null){if(s==null)delete t[i];else if(typeof s=="string"&&s.indexOf(" ")>-1){let g=s.split(" ");n(c)[l]=g.map(h=>{var x;return (x=u.get(h.toString()))!=null?x:h}).join(" ");}else u.has(s.toString())?n(c)[l]=u.get(s.toString()):n(c)[l]=s;(typeof o!="string"||!hr.has(o)||!br.has(l))&&delete t[i];}}),Object.keys(t).forEach(i=>{let s=i.substring(1);i.indexOf("_")===0&&Uo.has(s)&&(t[s]=t[i],delete t[i]);}),{cssFromProps:r,unmatchedProps:t}}function Cr(){if(typeof window=="undefined"){let{JSDOM:e}=ar("jsdom");return new e("<!DOCTYPE html>").window}return window}function Jo(e){return e?{__html:Pr__default.default(Cr()).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"],ALLOWED_ATTR:["style","class","target","id","href","alt","src","controls","autoplay","loop","muted","playsinline"]})}:{__html:""}}function Fr(e){return e&&`fr-${e}`}function Yo(e){return e&&(Array.isArray(e)?e.filter(o=>o!=null).map(o=>Yo(o)).join(" "):Fr(e))}function wr(l,s){var c=l,{as:e,children:o,className:t,css:r={},part:n}=c,i=f(c,["as","children","className","css","part"]);let u=e!=null?e:"div",{cssFromProps:g,unmatchedProps:h}=Go(i,u),x=Yo(n),m=t||x?clsx.clsx(t,x):void 0,w=[{boxSizing:"border-box"},g,r];return typeof o=="string"?jsxRuntime.jsx(u,d(a({className:m,css:w},h),{ref:s,dangerouslySetInnerHTML:Jo(o)})):jsxRuntime.jsx(u,d(a({className:m,css:w},h),{ref:s,children:o}))}var y=so__namespace.forwardRef(wr);var D={};ee(D,{Link:()=>Zr,Plain:()=>en,Primary:()=>Yr,Secondary:()=>Qr});var C={};ee(C,{Body1:()=>Vr,Body2:()=>_r,Caption:()=>zr,Display1:()=>Mr,Display2:()=>Wr,H1:()=>Lr,H2:()=>Ar,H3:()=>$r,H4:()=>Nr});var no={};ee(no,{Body1:()=>Er,Body2:()=>Or,Caption:()=>Ir,Display1:()=>Tr,Display2:()=>Br,H1:()=>vr,H2:()=>Rr,H3:()=>kr,H4:()=>Dr});var oe={color:"neutral.foreground",fontFamily:"default",margin:"0"},Tr=d(a({},oe),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),Br=d(a({},oe),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),vr=d(a({},oe),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),Rr=d(a({},oe),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),kr=d(a({},oe),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),Dr=d(a({},oe),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),Er=d(a({},oe),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),Or=d(a({},oe),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),Ir=d(a({},oe),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var Hr=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],te=Object.fromEntries(Hr.map(e=>{let o=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",t=so__namespace.forwardRef((l,s)=>{var c=l,{as:r=o,children:n}=c,i=f(c,["as","children"]);return jsxRuntime.jsx(y,d(a(a({as:r},no[e]),i),{ref:s,children:n}))});return t.displayName=`Text.${e}`,[e,t]})),Mr=te.Display1,Wr=te.Display2,Lr=te.H1,Ar=te.H2,$r=te.H3,Nr=te.H4,Vr=te.Body1,_r=te.Body2,zr=te.Caption;var ao={};ee(ao,{Link:()=>Jr,Plain:()=>Xr,Primary:()=>jr,Secondary:()=>Gr,loadingCSSStyle:()=>io});var _e={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},jr=d(a({},_e),{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"}),Gr=d(a({},_e),{backgroundColor:"secondary.background",borderColor:"secondary.border",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background","backgroundColor:disabled":"secondary.background","opacity:disabled":"0.6"}),Jr=d(a({},_e),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),Xr=d(a({},_e),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),qr=react.keyframes({from:{transform:"rotate(0turn)"},to:{transform:"rotate(1turn)"}}),io={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:qr+" 1s ease infinite"}};function ze(s){var l=s,{as:e,children:o,part:t,title:r,variant:n="Primary"}=l,i=f(l,["as","children","part","title","variant"]);var u;let c=n.toLocaleLowerCase();return jsxRuntime.jsxs(y,d(a(d(a({as:e!=null?e:"button",part:[`button-${c}`,t]},ao[n]),{css:a(a({},(u=i.css)!=null?u:{}),i.loading?io:{})}),i),{loading:void 0,children:[o,r&&jsxRuntime.jsx(C.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"medium",lineHeight:"20px",part:"button-title",textWrap:"nowrap",children:r})]}))}function Yr(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsxRuntime.jsx(ze,d(a({},o),{variant:"Primary",children:e}))}function Qr(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsxRuntime.jsx(ze,d(a({},o),{variant:"Secondary",children:e}))}function Zr(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsxRuntime.jsx(ze,d(a({},o),{variant:"Link",children:e}))}function en(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsxRuntime.jsx(ze,d(a({},o),{variant:"Plain",children:e}))}var P={};ee(P,{Column:()=>rn,Row:()=>tn});var tn=so__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,d(a({display:"flex",flexDirection:"row"},e),{ref:o}))),rn=so__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,d(a({display:"flex",flexDirection:"column"},e),{ref:o})));function lo(n){var i=n,{dismissible:e,flowId:o,part:t}=i,r=f(i,["dismissible","flowId","part"]);return jsxRuntime.jsx(U,d(a({as:null,flowId:o},r),{children:({handleDismiss:s,handlePrimary:l,handleSecondary:c,parentProps:{containerProps:u},step:g})=>{var S,B,E,v,O;let h=(S=g.props)!=null?S:{},x=(E=(B=g.primaryButton)==null?void 0:B.title)!=null?E:g.primaryButtonTitle,m=(O=(v=g.secondaryButton)==null?void 0:v.title)!=null?O:g.secondaryButtonTitle,w=g.$state.blocked;return jsxRuntime.jsxs(b,d(a(a({alignItems:"center",borderWidth:"md",display:"flex",flexDirection:"row",gap:3,justifyContent:"flex-start",part:["banner",t]},u),h),{children:[g.imageUri&&jsxRuntime.jsx(y,{as:"img",part:"image",src:g.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxRuntime.jsxs(P.Column,{marginInlineEnd:"auto",part:"banner-title-wrapper",children:[jsxRuntime.jsx(b.Title,{part:"title",children:g.title}),jsxRuntime.jsx(b.Subtitle,{part:"subtitle",children:g.subtitle})]}),jsxRuntime.jsx(b.Secondary,{disabled:w,title:m,onClick:c}),jsxRuntime.jsx(b.Primary,{disabled:w,title:x,onClick:l}),e&&jsxRuntime.jsx(b.Dismiss,{onClick:s})]}))}}))}var Ue={};ee(Ue,{Carousel:()=>ct,Collapsible:()=>Ke,CollapsibleStep:()=>De});var Re={};ee(Re,{Bar:()=>xe,Dots:()=>rt,Segments:()=>it});function xe(r){var n=r,{current:e,total:o}=n,t=f(n,["current","total"]);let i=o>0?Math.min(e/o,1):0,s=i===0?"10px":`${100*i}%`;return jsxRuntime.jsx(y,d(a({part:"progress-bar",backgroundColor:"blue800",borderRadius:"md",height:"10px"},t),{children:jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:s},transition:"width 300ms ease-out"})}))}function rt(r){var n=r,{current:e,total:o}=n,t=f(n,["current","total"]);if(o==1)return null;let i=[...Array(o)].map((s,l)=>jsxRuntime.jsx(y,{as:"circle",r:4,cx:4+16*l,cy:"4px",fill:e-1===l?T.colors.blue500:T.colors.blue800},l));return jsxRuntime.jsx(y,d(a({as:"svg",height:"8px",part:"progress-dots",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8},t),{children:i}))}function it(r){var n=r,{current:e,total:o}=n,t=f(n,["current","total"]);let i=[...Array(o)].map((s,l)=>jsxRuntime.jsx(y,{backgroundColor:e-1===l?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%"},l));return jsxRuntime.jsx(P.Row,d(a({gap:1,height:"10px",part:"progress-segments"},t),{children:i}))}function nn(){return jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",fill:"none",height:"8px",part:"check-icon",viewBox:"0 0 10 8",width:"10px",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function at(t){var r=t,{checked:e=!1}=r,o=f(r,["checked"]);return jsxRuntime.jsx(y,d(a({backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"check-indicator",position:"relative",height:"22px",width:"22px"},o),{children:e&&jsxRuntime.jsx(y,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"check-indicator-checked",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(nn,{})})}))}function re(e,{onPrimary:o,onSecondary:t}={}){let{navigate:r}=so.useContext(I),n={"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:so.useCallback((i,s,l=!0)=>H(this,null,function*(){if((yield o==null?void 0:o(e,i,s))===!1)return i.preventDefault(),!1;if(e.primaryButton!=null){let u=e.primaryButton.action===!1?!1:n[e.primaryButton.action];typeof u=="function"?u():u!==!1&&(yield e.complete(s,l)),e.primaryButton.uri!=null&&r(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(s,l),e.primaryButtonUri!=null&&r(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:so.useCallback((i,s)=>H(this,null,function*(){if((yield t==null?void 0:t(e,i,s))===!1)return i.preventDefault(),!1;if(e.secondaryButton!=null){let c=e.secondaryButton.action===!1?!1:n[e.secondaryButton.action];typeof c=="function"?c():c!==!1&&e.complete(s),e.secondaryButton.uri!=null&&r(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(s),e.secondaryButtonUri!=null&&r(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}function lt({onPrimary:e,onSecondary:o,step:t}){var u,g;let{handlePrimary:r,handleSecondary:n}=re(t,{onPrimary:e,onSecondary:o}),{blocked:i,completed:s,skipped:l}=t.$state,c=s||l||!i?jsxRuntime.jsx(at,{checked:s||l,marginLeft:"auto"}):jsxRuntime.jsx(y,{as:outline.LockClosedIcon,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:i,opacity:i?.5:1,children:[jsxRuntime.jsxs(P.Row,{marginBottom:"2",part:"carousel-step-header",children:[t.iconUri&&jsxRuntime.jsx(b.Media,{borderRadius:"0",height:"24px",src:t.iconUri,width:"24px"}),c]}),jsxRuntime.jsx(b.Title,{children:t.title}),jsxRuntime.jsx(b.Subtitle,{children:t.subtitle}),jsxRuntime.jsxs(P.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:i,onClick:n,title:(u=t.secondaryButton)==null?void 0:u.title}),jsxRuntime.jsx(b.Primary,{disabled:s||i,onClick:r,title:(g=t.primaryButton)==null?void 0:g.title})]})]})}var dt=react.keyframes`
|
|
51
|
+
var Do=Object.defineProperty,nr=Object.defineProperties;var ir=Object.getOwnPropertyDescriptors;var Ae=Object.getOwnPropertySymbols;var Eo=Object.prototype.hasOwnProperty,Oo=Object.prototype.propertyIsEnumerable;var ko=(e,o,t)=>o in e?Do(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,a=(e,o)=>{for(var t in o||(o={}))Eo.call(o,t)&&ko(e,t,o[t]);if(Ae)for(var t of Ae(o))Oo.call(o,t)&&ko(e,t,o[t]);return e},d=(e,o)=>nr(e,ir(o));var ar=(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 r in e)Eo.call(e,r)&&o.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&Ae)for(var r of Ae(e))o.indexOf(r)<0&&Oo.call(e,r)&&(t[r]=e[r]);return t};var ee=(e,o)=>{for(var t in o)Do(e,t,{get:o[t],enumerable:!0});};var H=(e,o,t)=>new Promise((r,n)=>{var i=c=>{try{l(t.next(c));}catch(u){n(u);}},s=c=>{try{l(t.throw(c));}catch(u){n(u);}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,s);l((t=t.apply(e,o)).next());});var Io={borderWidths:{md:"1px"}};var $e=[5,10,20,35,50,65,80,95,98],Ho=[...$e],oo=[...$e];Ho[4]=40;oo[4]=60;var sr={blue:{h:213,s:100,l:$e},gray:{h:220,s:10,l:$e},green:{h:141,s:90,l:Ho},red:{h:9,s:90,l:oo},yellow:{h:50,s:90,l:oo}};var L={};for(let[e,{h:o,s:t,l:r}]of Object.entries(sr))L[e]=Object.fromEntries(r.map((n,i)=>[`${(i+1)*100}`,`hsl(${o} ${t}% ${n}%)`]));var Mo=d(a({black:"hsl(0 0% 0%)",white:"hsl(0 0% 100%)"},L),{gray100:L.gray[100],gray200:L.gray[200],gray300:L.gray[300],gray400:L.gray[400],gray500:L.gray[500],gray600:L.gray[600],gray700:L.gray[700],gray800:L.gray[800],gray900:L.gray[900],blue400:L.blue[400],blue500:L.blue[500],blue800:L.blue[800],blue900:L.blue[900],green400:L.blue[400],green500:L.green[500],green800:L.green[800],red500:L.red[500],transparent:"#FFFFFF00",inherit:"inherit"});var Wo={md:"8px",lg:"20px",round:"50%"};var p=e=>`var(--fr-colors-${e})`,Lo={negative:{100:p("red-100"),200:p("red-200"),300:p("red-300"),400:p("red-400"),500:p("red-500"),600:p("red-600"),700:p("red-700"),800:p("red-800"),900:p("red-900"),background:p("negative-500"),border:p("negative-500"),foreground:p("white"),surface:p("negative-500"),active:{background:p("negative-400"),border:p("negative-400"),foreground:p("white"),surface:p("negative-400")},focus:{background:p("negative-500"),border:p("negative-500"),foreground:p("white"),surface:p("negative-500")},hover:{background:p("negative-400"),border:p("negative-400"),foreground:p("white"),surface:p("negative-400")}},neutral:{100:p("gray-100"),200:p("gray-200"),300:p("gray-300"),400:p("gray-400"),500:p("gray-500"),600:p("gray-600"),700:p("gray-700"),800:p("gray-800"),900:p("gray-900"),background:p("white"),border:p("neutral-800"),foreground:p("black"),surface:p("neutral-700"),active:{background:p("white"),border:p("neutral-900"),foreground:p("black"),surface:p("neutral-700")},focus:{background:p("white"),border:p("neutral-900"),foreground:p("black"),surface:p("neutral-700")},hover:{background:p("white"),border:p("neutral-900"),foreground:p("black"),surface:p("neutral-700")}},positive:{100:p("green-100"),200:p("green-200"),300:p("green-300"),400:p("green-400"),500:p("green-500"),600:p("green-600"),700:p("green-700"),800:p("green-800"),900:p("green-900"),background:p("positive-500"),border:p("positive-500"),foreground:p("white"),surface:p("positive-500"),active:{background:p("positive-400"),border:p("positive-400"),foreground:p("white"),surface:p("positive-400")},focus:{background:p("positive-500"),border:p("positive-500"),foreground:p("white"),surface:p("positive-500")},hover:{background:p("positive-400"),border:p("positive-400"),foreground:p("white"),surface:p("positive-400")}},primary:{100:p("blue-100"),200:p("blue-200"),300:p("blue-300"),400:p("blue-400"),500:p("blue-500"),600:p("blue-600"),700:p("blue-700"),800:p("blue-800"),900:p("blue-900"),background:p("primary-500"),border:p("primary-500"),foreground:p("white"),surface:p("primary-500"),active:{background:p("primary-400"),border:p("primary-400"),foreground:p("white"),surface:p("primary-400")},focus:{background:p("primary-500"),border:p("primary-500"),foreground:p("white"),surface:p("primary-500")},hover:{background:p("primary-400"),border:p("primary-400"),foreground:p("white"),surface:p("primary-400")}},secondary:{100:p("gray-100"),200:p("gray-200"),300:p("gray-300"),400:p("gray-400"),500:p("gray-500"),600:p("gray-600"),700:p("gray-700"),800:p("gray-800"),900:p("gray-900"),background:p("white"),border:p("secondary-800"),foreground:p("black"),surface:p("secondary-900"),active:{background:p("secondary-900"),border:p("secondary-800"),foreground:p("black"),surface:p("secondary-800")},focus:{background:p("secondary-900"),border:p("secondary-800"),foreground:p("black"),surface:p("secondary-900")},hover:{background:p("secondary-900"),border:p("secondary-800"),foreground:p("black"),surface:p("secondary-800")}}};var Ao={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var lr="px",pr=e=>typeof e=="number"?`${4*e}${lr}`:e,dr=[-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"],$o=Object.fromEntries(dr.map(e=>[e,pr(e)]));var No={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 Ne=d(a(d(a({},Io),{colors:a(a({},Mo),Lo)}),No),{radii:Wo,shadows:Ao,space:$o});function Be(e,o="",t="."){return Object.keys(e).reduce((r,n)=>{let s=`${o.length?`${o}${t}`:""}${n}`,l=e[n];return typeof l=="object"&&l!==null&&!Array.isArray(l)?Object.assign(r,Be(l,s,t)):r[s]=l,r},{})}function to(e){let o=Be(e,"--fr","-");for(let[t,r]of Object.entries(o))if(t.indexOf(".")>-1){let n=t.replace(/\./g,"-");o[n]=r,delete o[t];}return o}function Vo(e,o="--fr"){let t={};return Object.keys(e).forEach(r=>{let n=e[r],i=r.replace(/\./g,"-");typeof n=="object"&&n!==null&&!Array.isArray(n)?t[r]=Vo(n,`${o}-${r}`):t[r]=`var(${o}-${i})`;}),t}var ro=to(Ne),T=Vo(Ne);var ur=new Set(["alt","size","src"]),mr=cr__default.default.all.filter(e=>e.indexOf("-")!=0&&!ur.has(e)).map(e=>[e.replace(/-([a-z])/g,(o,t)=>t.toUpperCase()),null]),fr=Object.fromEntries(mr),Ve=Be(T.colors),gr={color:Ve,backgroundColor:Ve,borderColor:Ve,border:a(a({},T.borderWidths),Ve),borderRadius:T.radii,borderWidth:T.borderWidths,boxShadow:T.shadows,fontFamily:T.fontFamilies,fontSize:T.fontSizes,fontWeight:T.fontWeights,gap:T.space,lineHeight:T.lineHeights,margin:T.space,marginBottom:T.space,marginLeft:T.space,marginRight:T.space,marginTop:T.space,padding:T.space,paddingBottom:T.space,paddingLeft:T.space,paddingRight:T.space,paddingTop:T.space},_o=a(a({},fr),gr),zo={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"]},Ko=new Set(["active","disabled","focus","focusVisible","focusWithin","hover"]);function yr(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 Uo=new Map(Object.entries(_o).map(([e,o])=>[e,yr(o)])),xr=new Map(Object.entries(zo).map(([e,o])=>[e,new Set(o)])),br=new Set(["height","width"]),hr=new Set(["canvas","embed","iframe","img","input","object","video"]);function jo(e){let[o,t]=e.split(":");return [o,Ko.has(t)?t:null]}function Go(e,o="div"){let t=Object.assign({},e),r={};function n(i){if(i==null)return r;let l=`&:${i.replace(/[A-Z]/g,c=>`-${c.toLocaleLowerCase()}`)}`;return r[l]==null&&(r[l]={}),r[l]}return Object.entries(t).forEach(([i,s])=>{let[l,c]=jo(i),u=xr.get(l);u!=null&&(u.forEach(g=>{let h=`${g}${c?":"+c:""}`;t[h]=s;}),delete t[i]);}),Object.entries(t).forEach(([i,s])=>{let[l,c]=jo(i),u=Uo.get(l);if(u!=null){if(s==null)delete t[i];else if(typeof s=="string"&&s.indexOf(" ")>-1){let g=s.split(" ");n(c)[l]=g.map(h=>{var x;return (x=u.get(h.toString()))!=null?x:h}).join(" ");}else u.has(s.toString())?n(c)[l]=u.get(s.toString()):n(c)[l]=s;(typeof o!="string"||!hr.has(o)||!br.has(l))&&delete t[i];}}),Object.keys(t).forEach(i=>{let s=i.substring(1);i.indexOf("_")===0&&Uo.has(s)&&(t[s]=t[i],delete t[i]);}),{cssFromProps:r,unmatchedProps:t}}function Cr(){if(typeof window=="undefined"){let{JSDOM:e}=ar("jsdom");return new e("<!DOCTYPE html>").window}return window}function Jo(e){return e?{__html:Pr__default.default(Cr()).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"],ALLOWED_ATTR:["style","class","target","id","href","alt","src","controls","autoplay","loop","muted","playsinline"]})}:{__html:""}}function Fr(e){return e&&`fr-${e}`}function Yo(e){return e&&(Array.isArray(e)?e.filter(o=>o!=null).map(o=>Yo(o)).join(" "):Fr(e))}function wr(l,s){var c=l,{as:e,children:o,className:t,css:r={},part:n}=c,i=f(c,["as","children","className","css","part"]);let u=e!=null?e:"div",{cssFromProps:g,unmatchedProps:h}=Go(i,u),x=Yo(n),m=t||x?clsx.clsx(t,x):void 0,w=[{boxSizing:"border-box"},g,r];return typeof o=="string"?jsxRuntime.jsx(u,d(a({className:m,css:w},h),{ref:s,dangerouslySetInnerHTML:Jo(o)})):jsxRuntime.jsx(u,d(a({className:m,css:w},h),{ref:s,children:o}))}var y=so__namespace.forwardRef(wr);var D={};ee(D,{Link:()=>Zr,Plain:()=>en,Primary:()=>Yr,Secondary:()=>Qr});var C={};ee(C,{Body1:()=>Vr,Body2:()=>_r,Caption:()=>zr,Display1:()=>Mr,Display2:()=>Wr,H1:()=>Lr,H2:()=>Ar,H3:()=>$r,H4:()=>Nr});var no={};ee(no,{Body1:()=>Er,Body2:()=>Or,Caption:()=>Ir,Display1:()=>Tr,Display2:()=>Br,H1:()=>vr,H2:()=>Rr,H3:()=>kr,H4:()=>Dr});var oe={color:"neutral.foreground",fontFamily:"default",margin:"0"},Tr=d(a({},oe),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),Br=d(a({},oe),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),vr=d(a({},oe),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),Rr=d(a({},oe),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),kr=d(a({},oe),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),Dr=d(a({},oe),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),Er=d(a({},oe),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),Or=d(a({},oe),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),Ir=d(a({},oe),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var Hr=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],te=Object.fromEntries(Hr.map(e=>{let o=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",t=so__namespace.forwardRef((l,s)=>{var c=l,{as:r=o,children:n}=c,i=f(c,["as","children"]);return jsxRuntime.jsx(y,d(a(a({as:r},no[e]),i),{ref:s,children:n}))});return t.displayName=`Text.${e}`,[e,t]})),Mr=te.Display1,Wr=te.Display2,Lr=te.H1,Ar=te.H2,$r=te.H3,Nr=te.H4,Vr=te.Body1,_r=te.Body2,zr=te.Caption;var ao={};ee(ao,{Link:()=>Jr,Plain:()=>Xr,Primary:()=>jr,Secondary:()=>Gr,loadingCSSStyle:()=>io});var _e={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},jr=d(a({},_e),{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"}),Gr=d(a({},_e),{backgroundColor:"secondary.background",borderColor:"secondary.border",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background","backgroundColor:disabled":"secondary.background","opacity:disabled":"0.6"}),Jr=d(a({},_e),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),Xr=d(a({},_e),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),qr=react.keyframes({from:{transform:"rotate(0turn)"},to:{transform:"rotate(1turn)"}}),io={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:qr+" 1s ease infinite"}};function ze(s){var l=s,{as:e,children:o,part:t,title:r,variant:n="Primary"}=l,i=f(l,["as","children","part","title","variant"]);var u;let c=n.toLocaleLowerCase();return jsxRuntime.jsxs(y,d(a(d(a({as:e!=null?e:"button",part:[`button-${c}`,t]},ao[n]),{css:a(a({},(u=i.css)!=null?u:{}),i.loading?io:{})}),i),{loading:void 0,children:[o,r&&jsxRuntime.jsx(C.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"medium",lineHeight:"20px",part:"button-title",textWrap:"nowrap",children:r})]}))}function Yr(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsxRuntime.jsx(ze,d(a({},o),{variant:"Primary",children:e}))}function Qr(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsxRuntime.jsx(ze,d(a({},o),{variant:"Secondary",children:e}))}function Zr(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsxRuntime.jsx(ze,d(a({},o),{variant:"Link",children:e}))}function en(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsxRuntime.jsx(ze,d(a({},o),{variant:"Plain",children:e}))}var P={};ee(P,{Column:()=>rn,Row:()=>tn});var tn=so__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,d(a({display:"flex",flexDirection:"row"},e),{ref:o}))),rn=so__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,d(a({display:"flex",flexDirection:"column"},e),{ref:o})));function lo(n){var i=n,{dismissible:e,flowId:o,part:t}=i,r=f(i,["dismissible","flowId","part"]);return jsxRuntime.jsx(U,d(a({as:null,flowId:o},r),{children:({handleDismiss:s,handlePrimary:l,handleSecondary:c,parentProps:{containerProps:u},step:g})=>{var S,B,E,v,O;let h=(S=g.props)!=null?S:{},x=(E=(B=g.primaryButton)==null?void 0:B.title)!=null?E:g.primaryButtonTitle,m=(O=(v=g.secondaryButton)==null?void 0:v.title)!=null?O:g.secondaryButtonTitle,w=g.$state.blocked;return jsxRuntime.jsxs(b,d(a(a({alignItems:"center",borderWidth:"md",display:"flex",flexDirection:"row",gap:3,justifyContent:"flex-start",part:["banner",t]},u),h),{children:[g.imageUri&&jsxRuntime.jsx(y,{as:"img",part:"image",src:g.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxRuntime.jsxs(P.Column,{marginInlineEnd:"auto",part:"banner-title-wrapper",children:[jsxRuntime.jsx(b.Title,{part:"title",children:g.title}),jsxRuntime.jsx(b.Subtitle,{part:"subtitle",children:g.subtitle})]}),jsxRuntime.jsx(b.Secondary,{disabled:w,title:m,onClick:c}),jsxRuntime.jsx(b.Primary,{disabled:w,title:x,onClick:l}),e&&jsxRuntime.jsx(b.Dismiss,{onClick:s})]}))}}))}var Ue={};ee(Ue,{Carousel:()=>ct,Collapsible:()=>Ke,CollapsibleStep:()=>De});var Re={};ee(Re,{Bar:()=>xe,Dots:()=>rt,Segments:()=>it});function xe(r){var n=r,{current:e,total:o}=n,t=f(n,["current","total"]);let i=o>0?Math.min(e/o,1):0,s=i===0?"10px":`${100*i}%`;return jsxRuntime.jsx(y,d(a({part:"progress-bar",backgroundColor:"blue800",borderRadius:"md",height:"10px"},t),{children:jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:s},transition:"width 300ms ease-out"})}))}function rt(r){var n=r,{current:e,total:o}=n,t=f(n,["current","total"]);if(o==1)return null;let i=[...Array(o)].map((s,l)=>jsxRuntime.jsx(y,{as:"circle",r:4,cx:4+16*l,cy:"4px",fill:e-1===l?T.colors.blue500:T.colors.blue800},l));return jsxRuntime.jsx(y,d(a({as:"svg",height:"8px",part:"progress-dots",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8},t),{children:i}))}function it(r){var n=r,{current:e,total:o}=n,t=f(n,["current","total"]);let i=[...Array(o)].map((s,l)=>jsxRuntime.jsx(y,{backgroundColor:e-1===l?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%"},l));return jsxRuntime.jsx(P.Row,d(a({gap:1,height:"10px",part:"progress-segments"},t),{children:i}))}function nn(){return jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",fill:"none",height:"8px",part:"check-icon",viewBox:"0 0 10 8",width:"10px",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function at(t){var r=t,{checked:e=!1}=r,o=f(r,["checked"]);return jsxRuntime.jsx(y,d(a({backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"check-indicator",position:"relative",height:"22px",width:"22px"},o),{children:e&&jsxRuntime.jsx(y,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"check-indicator-checked",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(nn,{})})}))}function re(e,{onPrimary:o,onSecondary:t}={}){let{navigate:r}=so.useContext(I),n={"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:so.useCallback((i,s,l=!0)=>H(this,null,function*(){if((yield o==null?void 0:o(e,i,s))===!1)return i.preventDefault(),!1;if(e.primaryButton!=null){let u=e.primaryButton.action===!1?!1:n[e.primaryButton.action];typeof u=="function"?u():u!==!1&&(yield e.complete(s,l)),e.primaryButton.uri!=null&&r(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(s,l),e.primaryButtonUri!=null&&r(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:so.useCallback((i,s)=>H(this,null,function*(){if((yield t==null?void 0:t(e,i,s))===!1)return i.preventDefault(),!1;if(e.secondaryButton!=null){let c=e.secondaryButton.action===!1?!1:n[e.secondaryButton.action];typeof c=="function"?c():c!==!1&&e.complete(s),e.secondaryButton.uri!=null&&r(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(s),e.secondaryButtonUri!=null&&r(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}function lt({onPrimary:e,onSecondary:o,step:t}){var u,g;let{handlePrimary:r,handleSecondary:n}=re(t,{onPrimary:e,onSecondary:o}),{blocked:i,completed:s,skipped:l}=t.$state,c=s||l||!i?jsxRuntime.jsx(at,{checked:s||l,marginLeft:"auto"}):jsxRuntime.jsx(y,{as:outline.LockClosedIcon,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:i,opacity:i?.5:1,children:[jsxRuntime.jsxs(P.Row,{marginBottom:"2",part:"carousel-step-header",children:[t.iconUri&&jsxRuntime.jsx(b.Media,{borderRadius:"0",height:"24px",src:t.iconUri,width:"24px"}),c]}),jsxRuntime.jsx(b.Title,{children:t.title}),jsxRuntime.jsx(b.Subtitle,{children:t.subtitle}),jsxRuntime.jsxs(P.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:i,onClick:n,title:(u=t.secondaryButton)==null?void 0:u.title}),jsxRuntime.jsx(b.Primary,{disabled:i,onClick:r,title:(g=t.primaryButton)==null?void 0:g.title})]})]})}var dt=react.keyframes`
|
|
52
52
|
from {
|
|
53
53
|
opacity: 0;
|
|
54
54
|
}
|
|
@@ -73,7 +73,7 @@ var Do=Object.defineProperty,nr=Object.defineProperties;var ir=Object.getOwnProp
|
|
|
73
73
|
height: 0;
|
|
74
74
|
opacity: 0;
|
|
75
75
|
}
|
|
76
|
-
`,xn=()=>jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function bn({checked:e=!1}){return jsxRuntime.jsx(y,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"22px",width:"22px",children:e&&jsxRuntime.jsx(y,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"field-radio-indicator",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(xn,{})})})}function uo({children:e}){return jsxRuntime.jsx(he__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(P.Column,{css:{'&[data-state="open"]':{animation:`${gn} 300ms ease-out`},'&[data-state="closed"]':{animation:`${yn} 300ms ease-out`},overflow:"hidden"},gap:5,children:[jsxRuntime.jsx(y,{}),e]})})}function mo(i){var s=i,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:r=!1}=s,n=f(s,["children","disabled","onOpenChange","open"]);return jsxRuntime.jsx(he__namespace.Root,{asChild:!0,disabled:o,open:r,onOpenChange:t,children:jsxRuntime.jsx(b,d(a({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0},n),{children:e}))})}function fo({isCompleted:e,isBlocked:o,title:t}){return jsxRuntime.jsx(he__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(P.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",children:[jsxRuntime.jsxs(P.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(bn,{checked:e}),jsxRuntime.jsx(C.Body2,{fontWeight:"demibold",userSelect:"none",children:t})]}),jsxRuntime.jsx(y,{as:outline.ChevronDownIcon,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var mt=so.createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function ft({handlePrimary:e,handleSecondary:o,open:t,onOpenChange:r,step:n}){var w,S,B,E,v,O;let{$state:{blocked:i,completed:s,skipped:l},subtitle:c,title:u}=n,g=(S=(w=n.primaryButton)==null?void 0:w.title)!=null?S:n.primaryButtonTitle,h=(E=(B=n.secondaryButton)==null?void 0:B.title)!=null?E:n.secondaryButtonTitle,x=(v=n.props)!=null?v:{},m=!!(s||i||l);return jsxRuntime.jsxs(mo,d(a({open:t,onOpenChange:r},x),{children:[jsxRuntime.jsx(fo,{isBlocked:n.$state.blocked,isCompleted:s||l,title:u}),jsxRuntime.jsxs(uo,{children:[jsxRuntime.jsx(b.Media,{aspectRatio:2.5,objectFit:"cover",src:(O=n.videoUri)!=null?O:n.imageUri,type:n.videoUri?"video":"image"}),jsxRuntime.jsx(b.Subtitle,{color:"neutral.400",children:c}),jsxRuntime.jsxs(P.Row,{gap:3,children:[jsxRuntime.jsx(b.Secondary,{title:h,onClick:o}),jsxRuntime.jsx(b.Primary,{disabled:m,title:g,onClick:e})]})]})]}))}var Sn={default:ft};function Fn(r){var n=r,{flow:e,step:o}=n,t=f(n,["flow","step"]);var S;let{onPrimary:i,onSecondary:s,openStepId:l,setOpenStepId:c,stepTypes:u}=so.useContext(mt),{handlePrimary:g,handleSecondary:h}=re(o,{onPrimary:i,onSecondary:s}),x=(l!=null?l:e.getCurrentStep().id)===o.id,m=(S=u[o.type])!=null?S:ft;function w(B){return H(this,null,function*(){c(B?o.id:""),B&&!o.$state.completed&&(yield o.start(),c(null));})}return jsxRuntime.jsx(m,d(a({flow:e,onOpenChange:w,open:x,step:o},t),{handlePrimary:g,handleSecondary:h}),o.id)}function Ke(l){var c=l,{dismissible:e,flowId:o,onPrimary:t,onSecondary:r,part:n,stepTypes:i={}}=c,s=f(c,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[u,g]=so.useState(null),h=a(a({},Sn),i);return jsxRuntime.jsx(mt.Provider,{value:{openStepId:u,setOpenStepId:g,onPrimary:t,onSecondary:r,stepTypes:h},children:jsxRuntime.jsx(U,d(a({as:b,borderWidth:"md",flowId:o,part:["checklist",n]},s),{children:S=>{var B=S,{flow:x,handleDismiss:m}=B,w=f(B,["flow","handleDismiss"]);let v=Array.from(x.steps.entries()).filter(([,F])=>F.$state.visible===!0).map(([,F])=>jsxRuntime.jsx(Fn,d(a({flow:x,handleDismiss:m},w),{step:F}),F.id)),O=x.getNumberOfCompletedSteps(),W=x.getNumberOfAvailableSteps();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(P.Column,{gap:2,children:[jsxRuntime.jsx(b.Header,{dismissible:e,handleDismiss:m,part:"checklist-header",subtitle:x.subtitle,title:x.title}),jsxRuntime.jsxs(P.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsxs(C.Body2,{fontWeight:"demibold",children:[O,"/",W]}),jsxRuntime.jsx(xe,{current:O,total:W,flexGrow:1})]})]}),v]})}}))})}var En=new Set(["required","min","max","minLength","maxLength","pattern"]);function On({fieldComponent:e,control:o,fieldData:t,submit:r}){let n=reactHookForm.useFormContext();t.pattern!=null&&(typeof t.pattern=="string"?t.pattern=new RegExp(t.pattern.replace(/^\/|\/$/g,"")):typeof t.pattern=="object"&&typeof t.pattern.value=="string"&&(t.pattern.value=new RegExp(t.pattern.value.replace(/^\/|\/$/g,""))));let i=Object.fromEntries(Object.entries(t).filter(([l])=>En.has(l))),s=reactHookForm.useController({name:t.id,control:o,rules:i});return jsxRuntime.jsx(e,d(a({},s),{fieldData:t,formContext:n,submit:r}))}function yt({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:r,parentProps:{dismissible:n},step:i}){var v,O,W,F,R,k;let{__readOnly:s}=so.useContext(I),l=reactHookForm.useForm({delayError:2e3,mode:"onChange"}),[c,u]=so.useState(!1),g=[],{control:h,handleSubmit:x}=l,m=(v=i.props)!=null?v:{};function w(V,Se){u(!0),t(Se,V,s===!0).then(()=>u(!1));}(O=i.fields)==null||O.forEach(V=>{e[V.type]!=null&&g.push(jsxRuntime.jsx(On,{control:h,fieldComponent:e[V.type],fieldData:V,submit:x(w)},`${i.flow.id}-${V.id}`));});let S=(F=(W=i.primaryButton)==null?void 0:W.title)!=null?F:i.primaryButtonTitle,B=(k=(R=i.secondaryButton)==null?void 0:R.title)!=null?k:i.secondaryButtonTitle,E=!!(i.$state.blocked||!l.formState.isValid);return jsxRuntime.jsxs(P.Column,d(a({gap:5,part:"form-step"},m),{children:[jsxRuntime.jsx(b.Header,{dismissible:n,handleDismiss:o,part:"form-step-header",subtitle:i.subtitle,title:i.title}),jsxRuntime.jsx(reactHookForm.FormProvider,d(a({},l),{children:g})),jsxRuntime.jsxs(P.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[B&&jsxRuntime.jsx(D.Secondary,{disabled:E,onClick:r,title:B}),jsxRuntime.jsx(D.Primary,{disabled:E||c,onClick:x(w),title:S!=null?S:"Submit",loading:c})]},"form-footer")]}))}function xt({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.length?jsxRuntime.jsx(C.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function go({children:e,id:o,required:t=!1}){return jsxRuntime.jsxs(C.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsxRuntime.jsx(y,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Ee={px:"4",py:"2",backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md",display:"block",outline:"none",width:"100%"};function ne({children:e,field:o,fieldData:t,fieldState:r}){var u;let{id:n,label:i,placeholder:s}=t,{error:l}=r,c=d(a(a(a({id:n},o),s?{placeholder:s}:{}),Ee),{"aria-invalid":!!l,value:(u=o.value)!=null?u:""});return jsxRuntime.jsxs(y,{part:"field",children:[jsxRuntime.jsx(go,{id:n,required:!!t.required,children:i}),e(c),jsxRuntime.jsx(xt,{error:l})]})}var Ln=()=>jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),An=so__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsxs(y,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:o,justifyContent:"space-between",part:"field-radio",px:4,py:2,children:[jsxRuntime.jsx(C.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx(Ce__namespace.Item,{id:o,value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(y,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(y,{as:Ce__namespace.Indicator,alignItems:"center",bg:"primary.surface",borderWidth:"md",borderStyle:"solid",borderColor:"primary.border",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(Ln,{})})})})]}));function yo(e){let{field:{onChange:o,value:t},fieldData:{options:r=[]}}=e,n=r.map(({label:i,value:s})=>jsxRuntime.jsx(An,{value:s,label:i},s));return jsxRuntime.jsx(ne,d(a({},e),{children:()=>jsxRuntime.jsx(Ce__namespace.Root,{value:t,onValueChange:o,asChild:!0,children:jsxRuntime.jsx(P.Column,{gap:2,part:"field-radio-group",children:n})})}))}var Vn=so__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsx(N__namespace.Item,{value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(y,{"backgroundColor:hover":"blue900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsxRuntime.jsx(N__namespace.ItemText,{asChild:!0,children:jsxRuntime.jsx(C.Body2,{part:"field-select-option-label",children:e})})})}));function xo(e){let{field:{onChange:o,value:t},fieldData:{options:r=[],placeholder:n}}=e,i=r.map(({label:s,value:l})=>jsxRuntime.jsx(Vn,{value:l,label:s},l));return jsxRuntime.jsx(ne,d(a({},e),{children:()=>jsxRuntime.jsxs(N__namespace.Root,{value:t,onValueChange:o,children:[jsxRuntime.jsx(N__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(C.Body2,d(a({},Ee),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsxRuntime.jsx(N__namespace.Value,{placeholder:n!=null?n:"Select one"}),jsxRuntime.jsx(N__namespace.Icon,{children:jsxRuntime.jsx(y,{as:outline.ChevronDownIcon,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsxRuntime.jsx(N__namespace.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsxRuntime.jsx(y,d(a({},Ee),{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(N__namespace.Viewport,{children:i})}))})]})}))}function bo(e){return jsxRuntime.jsx(ne,d(a({},e),{children:o=>jsxRuntime.jsx(C.Body2,a({as:"input",part:"field-text",type:"text"},o))}))}function Tt(e){return jsxRuntime.jsx(ne,d(a({},e),{children:o=>jsxRuntime.jsx(C.Body2,a({as:"textarea",part:"field-textarea"},o))}))}var _n={radio:yo,select:xo,text:bo,textarea:Tt};function Oe(n){var i=n,{fieldTypes:e={},flowId:o,part:t}=i,r=f(i,["fieldTypes","flowId","part"]);let s=Object.assign({},_n,e);return jsxRuntime.jsx(U,d(a({flowId:o,part:["form",t]},r),{children:l=>jsxRuntime.jsx(yt,a({fieldTypes:s},l))}))}var Je={};ee(Je,{NPS:()=>Ge});function Rt({field:e,fieldData:o,submit:t}){var n,i;let r=[...Array(11)].map((s,l)=>{let c=e.value===l?D.Primary:D.Secondary;return jsxRuntime.jsx(c,{borderWidth:"1px",onClick:()=>{e.onChange(l),t();},title:`${l}`,css:{".fr-button-title":{fontSize:"15px"}}},l)});return jsxRuntime.jsxs(P.Column,{gap:2,children:[jsxRuntime.jsx(P.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:r}),jsxRuntime.jsxs(P.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsxRuntime.jsx(C.Caption,{part:"field-nps-left-label",color:"neutral.400",children:(n=o.negativeLabel)!=null?n:"Not likely at all"}),jsxRuntime.jsx(C.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(i=o.positiveLabel)!=null?i:"Extremely likely"})]})]})}function Ge(i){var s=i,{as:e=M,flowId:o,fieldTypes:t,part:r}=s,n=f(s,["as","flowId","fieldTypes","part"]);let{flow:l}=ie(o);return jsxRuntime.jsx(Oe,a({alignSelf:"end",as:e,flowId:o,fieldTypes:a({nps:Rt},t),modal:!1,onEscapeKeyDown:c=>{typeof n.onEscapeKeyDown=="function"&&n.onEscapeKeyDown(c),c.defaultPrevented||l.skip();},part:["nps",r],css:d(a({},!l||l.getCurrentStepIndex()==0?{".fr-form-step-footer":{display:"none"}}:{}),{".fr-form":{padding:"20px","@media (min-width: 660px)":{minWidth:"600px"},minWidth:"100%"},".fr-form-step":{gap:"14px","@media (min-width: 660px)":{gap:"1"}}})},n))}function fe(e,{onComplete:o,onDismiss:t}={}){let r=so.useRef(null);return so.useEffect(()=>{e!=null&&(e.isCompleted&&r.current===!1&&H(this,null,function*(){yield o==null?void 0:o(e);}),r.current=e==null?void 0:e.isCompleted);},[e==null?void 0:e.isCompleted]),{handleDismiss:so.useCallback(n=>H(this,null,function*(){if((yield t==null?void 0:t(e,n))===!1)return n.preventDefault(),!1;e.skip();}),[e])}}function Xe(){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]=so.useState(e),[r,n]=so.useState(null),i=so.useCallback(s=>{n(s);},[]);return so.useLayoutEffect(()=>{if(!r)return;let s=()=>{let l=r.getBoundingClientRect();t(l);};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[r]),{node:r,rect:o,ref:i}}var qn=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function Et(r){var n=r,{style:e={},part:o=""}=n,t=f(n,["style","part"]);return jsxRuntime.jsxs(y,d(a({part:`dot-wrapper ${o}`,style:a({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${qn}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]}))}function qe(r){var n=r,{part:e,src:o}=n,t=f(n,["part","src"]);return jsxRuntime.jsx(y,a({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function Zn(e){var o,t,r,n,i;return e.includes("youtube")?`https://www.youtube.com/embed/${(o=e.split("v=")[1])==null?void 0:o.split("&")[0]}`:e.includes("youtu.be")?`https://www.youtube.com/embed/${(t=e.split("youtu.be/")[1])==null?void 0:t.split("&")[0]}`:e.includes("vimeo")?`https://player.vimeo.com/video/${(r=e.split("vimeo.com/")[1])==null?void 0:r.split("&")[0]}`:e.includes("wistia")?`https://fast.wistia.net/embed/iframe/${(n=e.split("wistia.com/medias/")[1])==null?void 0:n.split("&")[0]}`:e.includes("loom")?`https://loom.com/embed/${(i=e.split("loom.com/share/")[1])==null?void 0:i.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function Ye(r){var n=r,{part:e,src:o}=n,t=f(n,["part","src"]);let i=Zn(o);return i?jsxRuntime.jsx(y,a({allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"neutral.100",borderWidth:"0",part:["video",e],src:i},t)):o!=null&&o.endsWith(".mp4")?jsxRuntime.jsx(y,a({as:"video",controls:!0,part:["video",e],src:o},t)):(console.error(`Could not map videoUri ${o} to a known provider (Youtube, Vimeo, Wistia, Loom) or valid mp4 file.`),null)}function le(r){var n=r,{src:e,type:o}=n,t=f(n,["src","type"]);return jsxRuntime.jsx(o==="video"?Ye:qe,a({src:e},t))}function It({props:e,alignAttr:o,sideAttr:t}){let r=t!=null?t:"bottom",n={},i=()=>{var u;if(["after","before"].includes(e.align)){if(o=="start")return "before";if(o=="end")return "after"}return (u=e.align)!=null?u:"after"},s="-24px",l={top:"bottom",right:"left",bottom:"top",left:"right"};n[l[r]]=s;let c=i();return ["before","end"].includes(c)?["top","bottom"].includes(r)?n.right=s:n.bottom=s:["after","start"].includes(c)?["top","bottom"].includes(r)?n.left=s:n.top=s:["top","bottom"].includes(r)?n.left=`calc(50% + ${s})`:n.top=`calc(50% + ${s})`,n}var Qe={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["defaultOpen","modal","onOpenChange","open"]};function Ht(e,o){var i,s,l,c,u;let t=Object.fromEntries(Qe.content.map(g=>[g,e[g]]).filter(g=>g[1]!==void 0)),r=Object.fromEntries(Qe.root.map(g=>[g,e[g]]).filter(g=>g[1]!==void 0)),n={};for(let g of Object.keys(e))!Qe.content.includes(g)&&!Qe.root.includes(g)&&(n[g]=e[g]);if(t.align=(i=t.align)!=null?i:"after",t.side=(s=t.side)!=null?s:"bottom",["before","after"].includes(t.align)){let g={after:"end",before:"start"},h=(E,v)=>["top","bottom"].includes(v)?E=="after"?"marginLeft":"marginRight":E=="after"?"marginTop":"marginBottom",x=(l=t.alignOffset)!=null?l:0,m=(c=t.style)!=null?c:{},w=(u=t.side)!=null?u:"bottom",S=t.align;t.style=d(a({},m),{[h(S,w)]:x});let B=["top","bottom"].includes(w)?o.width:o.height;t.alignOffset=(B+x)*-1,t.align=g[S];}return {contentProps:t,otherProps:n,rootProps:r}}var Mt=react.keyframes`
|
|
76
|
+
`,xn=()=>jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function bn({checked:e=!1}){return jsxRuntime.jsx(y,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"22px",width:"22px",children:e&&jsxRuntime.jsx(y,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"field-radio-indicator",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(xn,{})})})}function uo({children:e}){return jsxRuntime.jsx(he__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(P.Column,{css:{'&[data-state="open"]':{animation:`${gn} 300ms ease-out`},'&[data-state="closed"]':{animation:`${yn} 300ms ease-out`},overflow:"hidden"},gap:5,part:"collapsible-content",children:[jsxRuntime.jsx(y,{}),e]})})}function mo(i){var s=i,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:r=!1}=s,n=f(s,["children","disabled","onOpenChange","open"]);return jsxRuntime.jsx(he__namespace.Root,{asChild:!0,disabled:o,open:r,onOpenChange:t,children:jsxRuntime.jsx(b,d(a({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,part:"collapsible-step"},n),{children:e}))})}function fo({isCompleted:e,isBlocked:o,title:t}){return jsxRuntime.jsx(he__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(P.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(P.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(bn,{checked:e}),jsxRuntime.jsx(C.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:t})]}),jsxRuntime.jsx(y,{as:outline.ChevronDownIcon,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var mt=so.createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function ft({handlePrimary:e,handleSecondary:o,open:t,onOpenChange:r,step:n}){var w,S,B,E,v,O;let{$state:{blocked:i,completed:s,skipped:l},subtitle:c,title:u}=n,g=(S=(w=n.primaryButton)==null?void 0:w.title)!=null?S:n.primaryButtonTitle,h=(E=(B=n.secondaryButton)==null?void 0:B.title)!=null?E:n.secondaryButtonTitle,x=(v=n.props)!=null?v:{},m=!!i;return jsxRuntime.jsxs(mo,d(a({open:t,onOpenChange:r},x),{children:[jsxRuntime.jsx(fo,{isBlocked:n.$state.blocked,isCompleted:s||l,title:u}),jsxRuntime.jsxs(uo,{children:[jsxRuntime.jsx(b.Media,{aspectRatio:2.5,objectFit:"cover",src:(O=n.videoUri)!=null?O:n.imageUri,type:n.videoUri?"video":"image"}),jsxRuntime.jsx(b.Subtitle,{color:"neutral.400",children:c}),jsxRuntime.jsxs(P.Row,{gap:3,part:"collapsible-footer",children:[jsxRuntime.jsx(b.Secondary,{title:h,onClick:o}),jsxRuntime.jsx(b.Primary,{disabled:m,title:g,onClick:e})]})]})]}))}var Sn={default:ft};function Fn(r){var n=r,{flow:e,step:o}=n,t=f(n,["flow","step"]);var S;let{onPrimary:i,onSecondary:s,openStepId:l,setOpenStepId:c,stepTypes:u}=so.useContext(mt),{handlePrimary:g,handleSecondary:h}=re(o,{onPrimary:i,onSecondary:s}),x=(l!=null?l:e.getCurrentStep().id)===o.id,m=(S=u[o.type])!=null?S:ft;function w(B){return H(this,null,function*(){c(B?o.id:""),B&&!o.$state.completed&&(yield o.start(),c(null));})}return jsxRuntime.jsx(m,d(a({flow:e,onOpenChange:w,open:x,step:o},t),{handlePrimary:g,handleSecondary:h}),o.id)}function Ke(l){var c=l,{dismissible:e,flowId:o,onPrimary:t,onSecondary:r,part:n,stepTypes:i={}}=c,s=f(c,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[u,g]=so.useState(null),h=a(a({},Sn),i);return jsxRuntime.jsx(mt.Provider,{value:{openStepId:u,setOpenStepId:g,onPrimary:t,onSecondary:r,stepTypes:h},children:jsxRuntime.jsx(U,d(a({as:b,borderWidth:"md",flowId:o,part:["checklist",n]},s),{children:S=>{var B=S,{flow:x,handleDismiss:m}=B,w=f(B,["flow","handleDismiss"]);let v=Array.from(x.steps.entries()).filter(([,F])=>F.$state.visible===!0).map(([,F])=>jsxRuntime.jsx(Fn,d(a({flow:x,handleDismiss:m},w),{step:F}),F.id)),O=x.getNumberOfCompletedSteps(),W=x.getNumberOfAvailableSteps();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(P.Column,{gap:2,children:[jsxRuntime.jsx(b.Header,{dismissible:e,handleDismiss:m,part:"checklist-header",subtitle:x.subtitle,title:x.title}),jsxRuntime.jsxs(P.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsxs(C.Body2,{fontWeight:"demibold",children:[O,"/",W]}),jsxRuntime.jsx(xe,{current:O,total:W,flexGrow:1})]})]}),v]})}}))})}var En=new Set(["required","min","max","minLength","maxLength","pattern"]);function On({fieldComponent:e,control:o,fieldData:t,submit:r}){let n=reactHookForm.useFormContext();t.pattern!=null&&(typeof t.pattern=="string"?t.pattern=new RegExp(t.pattern.replace(/^\/|\/$/g,"")):typeof t.pattern=="object"&&typeof t.pattern.value=="string"&&(t.pattern.value=new RegExp(t.pattern.value.replace(/^\/|\/$/g,""))));let i=Object.fromEntries(Object.entries(t).filter(([l])=>En.has(l))),s=reactHookForm.useController({name:t.id,control:o,rules:i});return jsxRuntime.jsx(e,d(a({},s),{fieldData:t,formContext:n,submit:r}))}function yt({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:r,parentProps:{dismissible:n},step:i}){var v,O,W,F,R,k;let{__readOnly:s}=so.useContext(I),l=reactHookForm.useForm({delayError:2e3,mode:"onChange"}),[c,u]=so.useState(!1),g=[],{control:h,handleSubmit:x}=l,m=(v=i.props)!=null?v:{};function w(V,Se){u(!0),t(Se,V,s===!0).then(()=>u(!1));}(O=i.fields)==null||O.forEach(V=>{e[V.type]!=null&&g.push(jsxRuntime.jsx(On,{control:h,fieldComponent:e[V.type],fieldData:V,submit:x(w)},`${i.flow.id}-${V.id}`));});let S=(F=(W=i.primaryButton)==null?void 0:W.title)!=null?F:i.primaryButtonTitle,B=(k=(R=i.secondaryButton)==null?void 0:R.title)!=null?k:i.secondaryButtonTitle,E=!!(i.$state.blocked||!l.formState.isValid);return jsxRuntime.jsxs(P.Column,d(a({gap:5,part:"form-step"},m),{children:[jsxRuntime.jsx(b.Header,{dismissible:n,handleDismiss:o,part:"form-step-header",subtitle:i.subtitle,title:i.title}),jsxRuntime.jsx(reactHookForm.FormProvider,d(a({},l),{children:g})),jsxRuntime.jsxs(P.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[B&&jsxRuntime.jsx(D.Secondary,{disabled:E,onClick:r,title:B}),jsxRuntime.jsx(D.Primary,{disabled:E||c,onClick:x(w),title:S!=null?S:"Submit",loading:c})]},"form-footer")]}))}function xt({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.length?jsxRuntime.jsx(C.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function go({children:e,id:o,required:t=!1}){return jsxRuntime.jsxs(C.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsxRuntime.jsx(y,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Ee={px:"4",py:"2",backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md",display:"block",outline:"none",width:"100%"};function ne({children:e,field:o,fieldData:t,fieldState:r}){var u;let{id:n,label:i,placeholder:s}=t,{error:l}=r,c=d(a(a(a({id:n},o),s?{placeholder:s}:{}),Ee),{"aria-invalid":!!l,value:(u=o.value)!=null?u:""});return jsxRuntime.jsxs(y,{part:"field",children:[jsxRuntime.jsx(go,{id:n,required:!!t.required,children:i}),e(c),jsxRuntime.jsx(xt,{error:l})]})}var Ln=()=>jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),An=so__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsxs(y,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:o,justifyContent:"space-between",part:"field-radio",px:4,py:2,children:[jsxRuntime.jsx(C.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx(Ce__namespace.Item,{id:o,value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(y,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(y,{as:Ce__namespace.Indicator,alignItems:"center",bg:"primary.surface",borderWidth:"md",borderStyle:"solid",borderColor:"primary.border",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(Ln,{})})})})]}));function yo(e){let{field:{onChange:o,value:t},fieldData:{options:r=[]}}=e,n=r.map(({label:i,value:s})=>jsxRuntime.jsx(An,{value:s,label:i},s));return jsxRuntime.jsx(ne,d(a({},e),{children:()=>jsxRuntime.jsx(Ce__namespace.Root,{value:t,onValueChange:o,asChild:!0,children:jsxRuntime.jsx(P.Column,{gap:2,part:"field-radio-group",children:n})})}))}var Vn=so__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsx(N__namespace.Item,{value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(y,{"backgroundColor:hover":"blue900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsxRuntime.jsx(N__namespace.ItemText,{asChild:!0,children:jsxRuntime.jsx(C.Body2,{part:"field-select-option-label",children:e})})})}));function xo(e){let{field:{onChange:o,value:t},fieldData:{options:r=[],placeholder:n}}=e,i=r.map(({label:s,value:l})=>jsxRuntime.jsx(Vn,{value:l,label:s},l));return jsxRuntime.jsx(ne,d(a({},e),{children:()=>jsxRuntime.jsxs(N__namespace.Root,{value:t,onValueChange:o,children:[jsxRuntime.jsx(N__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(C.Body2,d(a({},Ee),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsxRuntime.jsx(N__namespace.Value,{placeholder:n!=null?n:"Select one"}),jsxRuntime.jsx(N__namespace.Icon,{children:jsxRuntime.jsx(y,{as:outline.ChevronDownIcon,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsxRuntime.jsx(N__namespace.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsxRuntime.jsx(y,d(a({},Ee),{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(N__namespace.Viewport,{children:i})}))})]})}))}function bo(e){return jsxRuntime.jsx(ne,d(a({},e),{children:o=>jsxRuntime.jsx(C.Body2,a({as:"input",part:"field-text",type:"text"},o))}))}function Tt(e){return jsxRuntime.jsx(ne,d(a({},e),{children:o=>jsxRuntime.jsx(C.Body2,a({as:"textarea",part:"field-textarea"},o))}))}var _n={radio:yo,select:xo,text:bo,textarea:Tt};function Oe(n){var i=n,{fieldTypes:e={},flowId:o,part:t}=i,r=f(i,["fieldTypes","flowId","part"]);let s=Object.assign({},_n,e);return jsxRuntime.jsx(U,d(a({flowId:o,part:["form",t]},r),{children:l=>jsxRuntime.jsx(yt,a({fieldTypes:s},l))}))}var Je={};ee(Je,{NPS:()=>Ge});function Rt({field:e,fieldData:o,submit:t}){var n,i;let r=[...Array(11)].map((s,l)=>{let c=e.value===l?D.Primary:D.Secondary;return jsxRuntime.jsx(c,{borderWidth:"1px",onClick:()=>{e.onChange(l),t();},title:`${l}`,css:{".fr-button-title":{fontSize:"15px"}}},l)});return jsxRuntime.jsxs(P.Column,{gap:2,children:[jsxRuntime.jsx(P.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:r}),jsxRuntime.jsxs(P.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsxRuntime.jsx(C.Caption,{part:"field-nps-left-label",color:"neutral.400",children:(n=o.negativeLabel)!=null?n:"Not likely at all"}),jsxRuntime.jsx(C.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(i=o.positiveLabel)!=null?i:"Extremely likely"})]})]})}function Ge(i){var s=i,{as:e=M,flowId:o,fieldTypes:t,part:r}=s,n=f(s,["as","flowId","fieldTypes","part"]);let{flow:l}=ie(o);return jsxRuntime.jsx(Oe,a({alignSelf:"end",as:e,flowId:o,fieldTypes:a({nps:Rt},t),modal:!1,onEscapeKeyDown:c=>{typeof n.onEscapeKeyDown=="function"&&n.onEscapeKeyDown(c),c.defaultPrevented||l.skip();},part:["nps",r],css:d(a({},!l||l.getCurrentStepIndex()==0?{".fr-form-step-footer":{display:"none"}}:{}),{".fr-form":{padding:"20px","@media (min-width: 660px)":{minWidth:"600px"},minWidth:"100%"},".fr-form-step":{gap:"14px","@media (min-width: 660px)":{gap:"1"}}})},n))}function fe(e,{onComplete:o,onDismiss:t}={}){let r=so.useRef(null);return so.useEffect(()=>{e!=null&&(e.isCompleted&&r.current===!1&&H(this,null,function*(){yield o==null?void 0:o(e);}),r.current=e==null?void 0:e.isCompleted);},[e==null?void 0:e.isCompleted]),{handleDismiss:so.useCallback(n=>H(this,null,function*(){if((yield t==null?void 0:t(e,n))===!1)return n.preventDefault(),!1;e.skip();}),[e])}}function Xe(){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]=so.useState(e),[r,n]=so.useState(null),i=so.useCallback(s=>{n(s);},[]);return so.useLayoutEffect(()=>{if(!r)return;let s=()=>{let l=r.getBoundingClientRect();t(l);};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[r]),{node:r,rect:o,ref:i}}var qn=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function Et(r){var n=r,{style:e={},part:o=""}=n,t=f(n,["style","part"]);return jsxRuntime.jsxs(y,d(a({part:`dot-wrapper ${o}`,style:a({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${qn}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]}))}function qe(r){var n=r,{part:e,src:o}=n,t=f(n,["part","src"]);return jsxRuntime.jsx(y,a({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function Zn(e){var o,t,r,n,i;return e.includes("youtube")?`https://www.youtube.com/embed/${(o=e.split("v=")[1])==null?void 0:o.split("&")[0]}`:e.includes("youtu.be")?`https://www.youtube.com/embed/${(t=e.split("youtu.be/")[1])==null?void 0:t.split("&")[0]}`:e.includes("vimeo")?`https://player.vimeo.com/video/${(r=e.split("vimeo.com/")[1])==null?void 0:r.split("&")[0]}`:e.includes("wistia")?`https://fast.wistia.net/embed/iframe/${(n=e.split("wistia.com/medias/")[1])==null?void 0:n.split("&")[0]}`:e.includes("loom")?`https://loom.com/embed/${(i=e.split("loom.com/share/")[1])==null?void 0:i.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function Ye(r){var n=r,{part:e,src:o}=n,t=f(n,["part","src"]);let i=Zn(o);return i?jsxRuntime.jsx(y,a({allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"neutral.100",borderWidth:"0",part:["video",e],src:i},t)):o!=null&&o.endsWith(".mp4")?jsxRuntime.jsx(y,a({as:"video",controls:!0,part:["video",e],src:o},t)):(console.error(`Could not map videoUri ${o} to a known provider (Youtube, Vimeo, Wistia, Loom) or valid mp4 file.`),null)}function le(r){var n=r,{src:e,type:o}=n,t=f(n,["src","type"]);return jsxRuntime.jsx(o==="video"?Ye:qe,a({src:e},t))}function It({props:e,alignAttr:o,sideAttr:t}){let r=t!=null?t:"bottom",n={},i=()=>{var u;if(["after","before"].includes(e.align)){if(o=="start")return "before";if(o=="end")return "after"}return (u=e.align)!=null?u:"after"},s="-24px",l={top:"bottom",right:"left",bottom:"top",left:"right"};n[l[r]]=s;let c=i();return ["before","end"].includes(c)?["top","bottom"].includes(r)?n.right=s:n.bottom=s:["after","start"].includes(c)?["top","bottom"].includes(r)?n.left=s:n.top=s:["top","bottom"].includes(r)?n.left=`calc(50% + ${s})`:n.top=`calc(50% + ${s})`,n}var Qe={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["defaultOpen","modal","onOpenChange","open"]};function Ht(e,o){var i,s,l,c,u;let t=Object.fromEntries(Qe.content.map(g=>[g,e[g]]).filter(g=>g[1]!==void 0)),r=Object.fromEntries(Qe.root.map(g=>[g,e[g]]).filter(g=>g[1]!==void 0)),n={};for(let g of Object.keys(e))!Qe.content.includes(g)&&!Qe.root.includes(g)&&(n[g]=e[g]);if(t.align=(i=t.align)!=null?i:"after",t.side=(s=t.side)!=null?s:"bottom",["before","after"].includes(t.align)){let g={after:"end",before:"start"},h=(E,v)=>["top","bottom"].includes(v)?E=="after"?"marginLeft":"marginRight":E=="after"?"marginTop":"marginBottom",x=(l=t.alignOffset)!=null?l:0,m=(c=t.style)!=null?c:{},w=(u=t.side)!=null?u:"bottom",S=t.align;t.style=d(a({},m),{[h(S,w)]:x});let B=["top","bottom"].includes(w)?o.width:o.height;t.alignOffset=(B+x)*-1,t.align=g[S];}return {contentProps:t,otherProps:n,rootProps:r}}var Mt=react.keyframes`
|
|
77
77
|
from {
|
|
78
78
|
opacity: 0;
|
|
79
79
|
}
|