@frigade/react 1.37.1 → 1.37.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.js +209 -209
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +183 -183
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnPropertyDescriptors;var Ao=Object.getOwnPropertySymbols;var si=Object.prototype.hasOwnProperty,li=Object.prototype.propertyIsEnumerable;var ni=(e,t,o)=>t in e?ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,b=(e,t)=>{for(var o in t||(t={}))si.call(t,o)&&ni(e,o,t[o]);if(Ao)for(var o of Ao(t))li.call(t,o)&&ni(e,o,t[o]);return e},j=(e,t)=>na(e,sa(t));var ai=e=>typeof e=="symbol"?e:e+"",Le=(e,t)=>{var o={};for(var i in e)si.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(e!=null&&Ao)for(var i of Ao(e))t.indexOf(i)<0&&li.call(e,i)&&(o[i]=e[i]);return o};var U=(e,t,o)=>new Promise((i,n)=>{var r=d=>{try{p(o.next(d))}catch(l){n(l)}},s=d=>{try{p(o.throw(d))}catch(l){n(l)}},p=d=>d.done?i(d.value):Promise.resolve(d.value).then(r,s);p((o=o.apply(e,t)).next())});import Ot,{createContext as wd,useEffect as Jo,useState as Ge}from"react";import{ThemeProvider as Td}from"styled-components";import At,{useContext as Qp,useEffect as Qt,useState as So}from"react";import{useCallback as Pt,useContext as ya,useEffect as Sa}from"react";import ar,{useMemo as di}from"react";var pi="1.32.18";var nt="NOT_STARTED_STEP",ee="COMPLETED_FLOW",Oo="ABORTED_FLOW",kt="STARTED_FLOW",Ue="NOT_STARTED_FLOW",$e="COMPLETED_STEP",po="STARTED_STEP";function Xe(){let{publicApiKey:e,userId:t,apiUrl:o}=ar.useContext(Y);return{config:di(()=>({headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json","X-Frigade-SDK-Version":pi,"X-Frigade-SDK-Platform":"React"}}),[e,t]),apiUrl:di(()=>`${o}/v1/public/`,[o])}}var la="frigade-last-call-at-",aa="frigade-last-call-data-";function Ht(){let{shouldGracefullyDegrade:e,readonly:t}=ar.useContext(Y);return(o,i)=>U(this,null,function*(){if(t&&(i.method==="POST"||i.method==="PUT"||i.method==="DELETE"))return _t();if(e)return console.log(`Skipping ${o} call to Frigade due to error`),_t();let n=la+o,r=aa+o;if(typeof window!="undefined"&&window.localStorage&&i&&i.body&&i.method==="POST"){let p=window.localStorage.getItem(n),d=window.localStorage.getItem(r);if(p&&d&&d==i.body){let l=new Date(p);if(new Date().getTime()-l.getTime()<1e3)return _t()}typeof window!="undefined"&&(window.localStorage.setItem(n,new Date().toISOString()),window.localStorage.setItem(r,i.body))}let s;try{s=yield fetch(o,i)}catch(p){return _t(p)}return s?s.ok?s:_t(s.statusText):_t()})}function _t(e){return e&&console.log("Call to Frigade failed",e),{json:()=>({})}}function Vt(){let{publicApiKey:e,shouldGracefullyDegrade:t}=ar.useContext(Y);function o(){return t?(console.error("Frigade hooks cannot be used when Frigade SDK has failed to initialize"),!1):e?!0:(console.error("Frigade hooks cannot be used outside the scope of FrigadeProvider"),!1)}return{verifySDKInitiated:o}}import{useContext as ha,useState as ci}from"react";import{useContext as da,useEffect as ca,useState as ma}from"react";import ua from"swr";import{useContext as pa}from"react";function Oe(){let{openFlowStates:e,setOpenFlowStates:t,hasActiveFullPageFlow:o,setCompletedFlowsToKeepOpenDuringSession:i,completedFlowsToKeepOpenDuringSession:n}=pa(Y);function r(c,f=!1){var C;return(C=e[c])!=null?C:f}function s(c,f){t(C=>j(b({},C),{[c]:f}))}function p(c){t(f=>{let x=f,{[c]:C}=x,w=Le(x,[ai(c)]);return b({},w)})}function d(c){n.includes(c)||i(f=>[...f,c])}function l(c){return n.includes(c)}function m(c){return Object.entries(e).some(([f,C])=>C&&f!=c)||o}return{getOpenFlowState:r,setOpenFlowState:s,resetOpenFlowState:p,hasOpenModals:m,setKeepCompletedFlowOpenDuringSession:d,shouldKeepCompletedFlowOpenDuringSession:l}}import fa from"swr/immutable";import co from"core-js-pure/actual/structured-clone";function pr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ce(...e){let t=e.shift(),o=e.length===1?e[0]:Ce(...e);if(!pr(t)||!pr(o))throw new Error("deepmerge can only merge Objects");let i=co(t);return Object.entries(o).forEach(([n,r])=>{pr(r)?i[n]!==void 0?Object.assign(i,{[n]:Ce(i[n],co(r))}):Object.assign(i,{[n]:co(r)}):Array.isArray(r)?i[n]!==void 0?Object.assign(i,{[n]:[...i[n],...co(r)]}):Object.assign(i,{[n]:co(r)}):Object.assign(i,{[n]:r})}),i}var ga="unknown";function We(){let{config:e,apiUrl:t}=Xe(),{publicApiKey:o,userId:i,organizationId:n,flows:r,setShouldGracefullyDegrade:s,readonly:p}=da(Y),{resetOpenFlowState:d}=Oe(),[l,m]=ma(!1),c={data:r.map(S=>({flowId:S.id,flowState:ee,lastStepId:null,userId:i,foreignUserId:i,stepStates:{},shouldTrigger:!1}))},f=S=>fetch(S,e).then(F=>{if(F.ok)return F.json();throw new Error("Failed to fetch user flow states")}).catch(F=>(console.log(`Error fetching ${S}: ${F}. Will gracefully degrade and hide Frigade`),s(!0),c)),C=o&&r&&i?`${t}userFlowStates?foreignUserId=${encodeURIComponent(i)}${n?`&foreignUserGroupId=${encodeURIComponent(n)}`:""}`:null,{data:w,isLoading:x,mutate:g,error:A}=p?fa(C,f):ua(C,f,{revalidateOnFocus:!0,revalidateIfStale:!0,keepPreviousData:!0,revalidateOnMount:!1,errorRetryInterval:1e4,errorRetryCount:3,onError:()=>c,onLoadingSlow:()=>c}),T=w==null?void 0:w.data;ca(()=>{!l&&!x&&T&&m(!0)},[T,l,x]);function k(S){return U(this,null,function*(){if(T&&!p){let F=T.find(M=>M.flowId===S);F&&F.flowState!==ee&&(F.flowState=ee),yield g(Promise.resolve(Ce(w,{data:T})),{optimisticData:Ce(w,{data:T}),revalidate:!1,rollbackOnError:!1})}})}function P(S,F,M){return U(this,null,function*(){if(T){let O=T.find(I=>I.flowId===S);O&&(O.stepStates[F]=M,O.flowState=kt),yield g(Promise.resolve(Ce(w,{data:T})),{optimisticData:Ce(w,{data:T}),revalidate:!1,rollbackOnError:!1})}})}function v(S,F,M){return U(this,null,function*(){if(T){let O=T.find(I=>I.flowId===S);O&&(O.lastStepId=F,O.stepStates[F]=M,O.flowState=kt),yield g(Ce(w,{data:T}),{optimisticData:Ce(w,{data:T}),revalidate:!1,rollbackOnError:!1})}})}function u(S){return U(this,null,function*(){if(T){let F=T.find(M=>M.flowId===S);F&&F.flowState!==Ue&&(F.flowState=Ue,F.lastStepId=ga,Object.keys(F.stepStates).forEach(M=>{F.stepStates[M].actionType=nt,F.stepStates[M].createdAt=new Date().toISOString()}),yield g(Ce(w,{data:T}),{optimisticData:Ce(w,{data:T}),revalidate:!1,rollbackOnError:!1}),d(S))}})}function L(S,F,M){return U(this,null,function*(){if(T){let O=T.find(I=>I.flowId===S);O&&(O.stepStates[F]=M),yield g(Promise.resolve(Ce(w,{data:T})),{optimisticData:Ce(w,{data:T}),revalidate:!1,rollbackOnError:!1})}})}return{userFlowStatesData:T,isLoadingUserFlowStateData:!l,mutateUserFlowState:g,optimisticallyMarkFlowCompleted:k,optimisticallyMarkFlowNotStarted:u,optimisticallyMarkStepCompleted:P,optimisticallyMarkStepNotStarted:L,optimisticallyMarkStepStarted:v,error:A}}function mo(){let{config:e,apiUrl:t}=Xe(),{userFlowStatesData:o,mutateUserFlowState:i}=We(),{failedFlowResponses:n,setFailedFlowResponses:r,flowResponses:s,setFlowResponses:p}=ha(Y),[d,l]=ci(new Set),[m,c]=ci(new Set),f=Ht();function C(g){let A=JSON.stringify(g);if(d.has(A))return null;d.add(A),l(d),m.add(g),c(m);let T=s==null?void 0:s.find(k=>k.flowSlug===g.flowSlug&&k.stepId===g.stepId&&k.actionType===g.actionType&&k.createdAt===g.createdAt);return f(`${t}flowResponses`,j(b({},e),{method:"POST",body:A})).then(k=>{k.status!==200&&k.status!==201?(console.log("Failed to send flow response for step "+g.stepId+". Will retry again later."),r([...n,g])):T||p(P=>[...P!=null?P:[],g])})}function w(g){return U(this,null,function*(){g.foreignUserId&&(g.actionType===kt||g.actionType===Ue?yield C(g):g.actionType===ee?yield C(g):g.actionType===po?yield C(g):g.actionType===$e?yield C(g):g.actionType===Oo?yield C(g):g.actionType===nt&&(yield C(g)))})}function x(){let g=[];return o==null||o.forEach(A=>{if(A&&A.stepStates&&Object.keys(A.stepStates).length!==0)for(let T in A.stepStates){let k=A.stepStates[T];g.push({foreignUserId:A.foreignUserId,flowSlug:A.flowId,stepId:k.stepId,actionType:k.actionType,data:{},createdAt:new Date(k.createdAt),blocked:k.blocked,hidden:k.hidden})}}),[...g,...s]}return{addResponse:w,setFlowResponses:p,getFlowResponses:x}}import ba from"swr";var xa=/user.flow\(([^\)]+)\) == '?COMPLETED_FLOW'?/gm,mi=e=>{let t=xa.exec(e);if(t===null)return null;let o=null;return t.forEach((i,n)=>{let r=Ca(i,"'","");r.startsWith("flow_")&&(o=r)}),o},Ca=function(e,t,o){return e.replace(new RegExp(t,"g"),o)};function dr(e){try{return JSON.parse(e)}catch(t){return console.error("Failed to parse Frigade config.yml to JSON",t),null}}var cr=(l=>(l.CHECKLIST="CHECKLIST",l.FORM="FORM",l.TOUR="TOUR",l.SUPPORT="SUPPORT",l.CUSTOM="CUSTOM",l.BANNER="BANNER",l.EMBEDDED_TIP="EMBEDDED_TIP",l.NPS_SURVEY="NPS_SURVEY",l.ANNOUNCEMENT="ANNOUNCEMENT",l))(cr||{});function J(){let{config:e,apiUrl:t}=Xe(),{flows:o,setFlows:i,userId:n,organizationId:r,publicApiKey:s,customVariables:p,setCustomVariables:d,hasActiveFullPageFlow:l,setHasActiveFullPageFlow:m,setFlowResponses:c,setShouldGracefullyDegrade:f,readonly:C}=ya(Y),w={data:[]},{verifySDKInitiated:x}=Vt(),{addResponse:g,getFlowResponses:A}=mo(),T=h=>fetch(h,e).then(y=>y.ok?y.json():(console.log(`Error fetching ${h} (${y.status}): ${y.statusText}. Will gracefully degrade and hide Frigade`),f(!0),w)).catch(y=>(console.log(`Error fetching ${h}: ${y}. Will gracefully degrade and hide Frigade`),f(!0),w)),{mutateUserFlowState:k,userFlowStatesData:P,isLoadingUserFlowStateData:v,optimisticallyMarkFlowCompleted:u,optimisticallyMarkFlowNotStarted:L,optimisticallyMarkStepCompleted:S,optimisticallyMarkStepNotStarted:F,optimisticallyMarkStepStarted:M}=We(),{data:O,error:I,isLoading:V}=ba(s?`${t}flows${C?"?readonly=true":""}`:null,T,{keepPreviousData:!0});Sa(()=>{if(I){console.error(I);return}O&&O.data&&i(O.data)},[O,I]);function W(h){if(V)return null;let y=o.find(B=>B.slug===h);return!y&&o.length>0&&!v&&!V?(console.log(`Flow with id ${h} not found`),null):(y==null?void 0:y.active)===!1&&!C?null:y}function q(h){var N,ne;if(!W(h))return[];let y=W(h).data;return y?(y=X(y),((ne=(N=dr(y))==null?void 0:N.data)!=null?ne:[]).map(Q=>{let De=R(Q);return j(b({handleSecondaryButtonClick:()=>{Q.skippable===!0&&ie(h,Q.id,{skipped:!0})}},Q),{complete:Pe(h,Q.id)===$e||De>=1,started:Pe(h,Q.id)===po||Pe(h,Q.id)===$e,currentlyActive:P==null?void 0:P.some(ht=>ht.flowId==h&&ht.lastStepId===Q.id),blocked:Ae(h,Q.id),hidden:be(h,Q.id),handlePrimaryButtonClick:()=>{(!Q.completionCriteria&&(Q.autoMarkCompleted||Q.autoMarkCompleted===void 0)||Q.completionCriteria&&Q.autoMarkCompleted===!0)&&ie(h,Q.id)},progress:De})}).filter(Q=>Q.hidden!==!0)):[]}function X(h){return h.replaceAll(/\${(.*?)}/g,(y,B)=>p[B]===void 0?"":String(p[B]).replace(/[\u00A0-\u9999<>\&]/g,function(N){return"&#"+N.charCodeAt(0)+";"}).replaceAll(/[\\]/g,"\\\\").replaceAll(/[\"]/g,'\\"').replaceAll(/[\/]/g,"\\/").replaceAll(/[\b]/g,"\\b").replaceAll(/[\f]/g,"\\f").replaceAll(/[\n]/g,"\\n").replaceAll(/[\r]/g,"\\r").replaceAll(/[\t]/g,"\\t"))}function ce(h){var B;if(!W(h))return[];let y=W(h).data;return y?(y=X(y),(B=JSON.parse(y))!=null?B:{}):[]}function H(h,y){d(B=>j(b({},B),{[h]:y}))}function ae(h){!v&&!V&&h&&JSON.stringify(p)!=JSON.stringify(b(b({},p),h))&&Object.keys(h).forEach(y=>{H(y,h[y])})}let fe=Pt((h,y,B)=>U(this,null,function*(){if(!x())return;let N={foreignUserId:n,foreignUserGroupId:r!=null?r:null,flowSlug:h,stepId:y,actionType:po,data:B!=null?B:{},createdAt:new Date,blocked:!1,hidden:!1};xe(N)&&(yield M(h,y,N),g(N))}),[n,r,P]),Te=Pt((h,y,B)=>U(this,null,function*(){if(!x())return;let N={foreignUserId:n,foreignUserGroupId:r!=null?r:null,flowSlug:h,stepId:y,actionType:nt,data:B!=null?B:{},createdAt:new Date,blocked:!1,hidden:!1};xe(N)&&(yield F(h,y,N),g(N))}),[n,r,P]),ie=Pt((h,y,B)=>U(this,null,function*(){if(!x())return;let N={foreignUserId:n,foreignUserGroupId:r!=null?r:null,flowSlug:h,stepId:y,actionType:$e,data:B!=null?B:{},createdAt:new Date,blocked:!1,hidden:!1};xe(N)&&(yield S(h,y,N),g(N))}),[n,r,P]),Z=Pt((h,y)=>U(this,null,function*(){if(!x()||me(h)===Ue)return;let B={foreignUserId:n,foreignUserGroupId:r!=null?r:null,flowSlug:h,stepId:"unknown",actionType:Ue,data:y!=null?y:{},createdAt:new Date,blocked:!1,hidden:!1};yield L(h),xe(B)&&g(B)}),[n,r,P]),he=Pt((h,y)=>U(this,null,function*(){if(!x())return;let B={foreignUserId:n,foreignUserGroupId:r!=null?r:null,flowSlug:h,stepId:"unknown",actionType:kt,data:y!=null?y:{},createdAt:new Date,blocked:!1,hidden:!1};xe(B)&&g(B)}),[n,r,P]),D=Pt((h,y)=>U(this,null,function*(){if(!x())return;let B={foreignUserId:n,foreignUserGroupId:r!=null?r:null,flowSlug:h,stepId:"unknown",actionType:ee,data:y!=null?y:{},createdAt:new Date,blocked:!1,hidden:!1};xe(B)&&(yield u(h),g(B))}),[n,r,P]),Se=Pt((h,y)=>U(this,null,function*(){if(!x())return;let B={foreignUserId:n,foreignUserGroupId:r!=null?r:null,flowSlug:h,stepId:"unknown",actionType:Oo,data:y!=null?y:{},createdAt:new Date,blocked:!1,hidden:!1};xe(B)&&(yield u(h),g(B))}),[n,r,P]);function xe(h){var y;if(P===void 0)return!1;if(P){let B=P.find(N=>N.flowId===h.flowSlug);if(h.actionType===nt&&(!(B!=null&&B.stepStates[h.stepId])||B.stepStates[h.stepId].actionType===nt))return!1;if(B&&((y=B.stepStates[h.stepId])==null?void 0:y.actionType)===h.actionType){if(h.actionType===$e&&(!h.data||JSON.stringify(h.data)===JSON.stringify({})))return!1;let N=Object.keys(B.stepStates).sort((ne,Q)=>{let De=new Date(B.stepStates[ne].createdAt),ht=new Date(B.stepStates[Q].createdAt);return De.getTime()-ht.getTime()});if(B.stepStates[N[N.length-1]].actionType===h.actionType&&h.stepId===N[N.length-1])return!1}if(B&&B.flowState===ee&&h.actionType===ee)return!1}return!0}function Pe(h,y){let B=_(h,y);return v?null:B?B.actionType:nt}function Ae(h,y){let B=_(h,y);return B?B.blocked:!1}function be(h,y){let B=_(h,y);return B?B.hidden:!1}function _(h,y){var N;if(v)return null;let B=P==null?void 0:P.find(ne=>ne.flowId===h);return!B||!B.stepStates[y]?null:(N=B.stepStates[y])!=null?N:null}function $(h){var B,N;if(v||!P)return null;if(me(h)===Ue)return(B=q(h)[0])!=null?B:null;let y=(N=P.find(ne=>ne.flowId===h))==null?void 0:N.lastStepId;return y?q(h).find(ne=>ne.id===y):null}function z(h){var N;let y=$(h);if(!y)return 0;let B=(N=q(h).findIndex(ne=>ne.id===y.id))!=null?N:0;return Pe(h,y.id)===$e&&B<q(h).length-1?B+1:B}function R(h){if(!h.completionCriteria)return;let y=mi(h.completionCriteria);if(y===null)return;let B=rt(y),N=it(y);return N===0?void 0:B/N}function me(h){let y=P==null?void 0:P.find(B=>B.flowId===h);return y?y.flowState:null}function rt(h){let y=q(h);return y.length===0?0:y.filter(N=>Pe(h,N.id)===$e).length}function it(h){return q(h).length}function Wt(h){let y=o.find(B=>B.slug===h);return y?dr(y.data):null}function Ke(h){if(C)return!1;if(v)return!0;if(h!=null&&h.targetingLogic&&P){let y=P.find(B=>B.flowId===h.slug);if(y)return y.shouldTrigger===!1}return!!(h!=null&&h.targetingLogic&&n&&n.startsWith("guest_"))}function gt(h){return!Ke(W(h))}function Je(){n&&k()}function zt(){return o}return{getAllFlows:zt,getFlow:W,getFlowData:Wt,isLoading:v||V,getStepStatus:Pe,getFlowSteps:q,getCurrentStepIndex:z,markStepStarted:fe,markStepCompleted:ie,markFlowNotStarted:Z,markFlowStarted:he,markFlowCompleted:D,markFlowAborted:Se,markStepNotStarted:Te,getFlowStatus:me,getNumberOfStepsCompleted:rt,getNumberOfSteps:it,targetingLogicShouldHideFlow:Ke,setCustomVariable:H,updateCustomVariables:ae,customVariables:p,getStepOptionalProgress:R,getFlowMetadata:ce,isStepBlocked:Ae,isStepHidden:be,hasActiveFullPageFlow:l,setHasActiveFullPageFlow:m,isFlowAvailableToUser:gt,refresh:Je}}import{useCallback as mr,useContext as wa,useEffect as Ta}from"react";var jt="guest_";function uo(){let{userId:e,organizationId:t,setUserId:o,setUserProperties:i,shouldGracefullyDegrade:n}=wa(Y),{config:r,apiUrl:s}=Xe(),{mutateUserFlowState:p}=We(),d=Ht(),{verifySDKInitiated:l}=Vt();function m(w){return`frigade-user-registered-${w}`}Ta(()=>{if(e&&!t){if(e.startsWith(jt))return;let w=m(e);localStorage.getItem(w)||(d(`${s}users`,j(b({},r),{method:"POST",body:JSON.stringify({foreignId:e})})),localStorage.setItem(w,"true"))}},[e,n,t]);let c=mr(w=>U(this,null,function*(){if(!l())return;let x={foreignId:e,properties:w};yield d(`${s}users`,j(b({},r),{method:"POST",body:JSON.stringify(x)})),i(g=>b(b({},g),w)),p()}),[e,r,n,p]),f=mr((w,x)=>U(this,null,function*(){if(!l())return;let A={foreignId:e,events:[{event:w,properties:x}]};yield d(`${s}users`,j(b({},r),{method:"POST",body:JSON.stringify(A)})),p()}),[e,r,p]),C=mr((w,x)=>U(this,null,function*(){if(l())if(x){let g=m(w);localStorage.setItem(g,"true"),o(w);let A={foreignId:w,properties:x};yield d(`${s}users`,j(b({},r),{method:"POST",body:JSON.stringify(A)})),i(T=>b(b({},T),x)),p()}else o(w)}),[r,n,p]);return{userId:e,setUserId:o,setUserIdWithProperties:C,addPropertiesToUser:c,trackEventForUser:f}}import{v4 as Zp}from"uuid";import et,{useEffect as hn,useState as Yp}from"react";import qe,{useEffect as hr,useState as Na}from"react";import $o from"styled-components";import Fa from"react";import ka from"styled-components";var ui="fr-",fo="cfr-";function a(e,t){let o=`${ui}${e}`;if(!t)return o;if(t.styleOverrides&&t.styleOverrides[e]){if(typeof t.styleOverrides[e]=="string")return o+" "+t.styleOverrides[e];if(typeof t.styleOverrides[e]=="object")return o+" "+fo+e}return o}function E(e){if(!e.className||e.className.indexOf(fo)!==-1)return"";let o=e.className.replace(/\s+/g," ").split(" ");return o.length==1&&o[0].startsWith(ui)?"":`:not(${o.map(i=>`.${i}`).join(", ")})`}function No(e){return e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()}function ve(e){return e!=null&&e.styleOverrides?Object.keys(e.styleOverrides).map(t=>`${No(t)}: ${e.styleOverrides[t]};`).join(" "):""}function Fe(...e){return e.filter(Boolean).join(" ")}function go(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Pa=ka.div`
|
|
2
|
+
var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnPropertyDescriptors;var Io=Object.getOwnPropertySymbols;var si=Object.prototype.hasOwnProperty,li=Object.prototype.propertyIsEnumerable;var ni=(e,t,o)=>t in e?ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,b=(e,t)=>{for(var o in t||(t={}))si.call(t,o)&&ni(e,o,t[o]);if(Io)for(var o of Io(t))li.call(t,o)&&ni(e,o,t[o]);return e},j=(e,t)=>na(e,sa(t));var ai=e=>typeof e=="symbol"?e:e+"",Le=(e,t)=>{var o={};for(var i in e)si.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(e!=null&&Io)for(var i of Io(e))t.indexOf(i)<0&&li.call(e,i)&&(o[i]=e[i]);return o};var U=(e,t,o)=>new Promise((i,n)=>{var r=d=>{try{p(o.next(d))}catch(l){n(l)}},s=d=>{try{p(o.throw(d))}catch(l){n(l)}},p=d=>d.done?i(d.value):Promise.resolve(d.value).then(r,s);p((o=o.apply(e,t)).next())});import Nt,{createContext as wd,useEffect as Ro,useState as Ke}from"react";import{ThemeProvider as Td}from"styled-components";import Ot,{useContext as Qp,useEffect as Zt,useState as To}from"react";import{useCallback as vt,useContext as ya,useEffect as Sa}from"react";import mr,{useMemo as di}from"react";var pi="1.37.3";var st="NOT_STARTED_STEP",R="COMPLETED_FLOW",Lo="ABORTED_FLOW",Pt="STARTED_FLOW",Ue="NOT_STARTED_FLOW",$e="COMPLETED_STEP",uo="STARTED_STEP";function Qe(){let{publicApiKey:e,userId:t,apiUrl:o}=mr.useContext(Y);return{config:di(()=>({headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json","X-Frigade-SDK-Version":pi,"X-Frigade-SDK-Platform":"React"}}),[e,t]),apiUrl:di(()=>`${o}/v1/public/`,[o])}}var la="frigade-last-call-at-",aa="frigade-last-call-data-";function Vt(){let{shouldGracefullyDegrade:e,readonly:t}=mr.useContext(Y);return(o,i)=>U(this,null,function*(){if(t&&(i.method==="POST"||i.method==="PUT"||i.method==="DELETE"))return Ht();if(e)return console.log(`Skipping ${o} call to Frigade due to error`),Ht();let n=la+o,r=aa+o;if(typeof window!="undefined"&&window.localStorage&&i&&i.body&&i.method==="POST"){let p=window.localStorage.getItem(n),d=window.localStorage.getItem(r);if(p&&d&&d==i.body){let l=new Date(p);if(new Date().getTime()-l.getTime()<1e3)return Ht()}typeof window!="undefined"&&(window.localStorage.setItem(n,new Date().toISOString()),window.localStorage.setItem(r,i.body))}let s;try{s=yield fetch(o,i)}catch(p){return Ht(p)}return s?s.ok?s:Ht(s.statusText):Ht()})}function Ht(e){return e&&console.log("Call to Frigade failed",e),{json:()=>({})}}function jt(){let{publicApiKey:e,shouldGracefullyDegrade:t}=mr.useContext(Y);function o(){return t?(console.error("Frigade hooks cannot be used when Frigade SDK has failed to initialize"),!1):e?!0:(console.error("Frigade hooks cannot be used outside the scope of FrigadeProvider"),!1)}return{verifySDKInitiated:o}}import{useContext as ha,useState as ci}from"react";import{useContext as da,useEffect as ca,useState as ma}from"react";import ua from"swr";import{useContext as pa}from"react";function Oe(){let{openFlowStates:e,setOpenFlowStates:t,hasActiveFullPageFlow:o,setCompletedFlowsToKeepOpenDuringSession:i,completedFlowsToKeepOpenDuringSession:n}=pa(Y);function r(c,f=!1){var C;return(C=e[c])!=null?C:f}function s(c,f){t(C=>j(b({},C),{[c]:f}))}function p(c){t(f=>{let x=f,{[c]:C}=x,w=Le(x,[ai(c)]);return b({},w)})}function d(c){n.includes(c)||i(f=>[...f,c])}function l(c){return n.includes(c)}function m(c){return Object.entries(e).some(([f,C])=>C&&f!=c)||o}return{getOpenFlowState:r,setOpenFlowState:s,resetOpenFlowState:p,hasOpenModals:m,setKeepCompletedFlowOpenDuringSession:d,shouldKeepCompletedFlowOpenDuringSession:l}}import fa from"swr/immutable";import fo from"core-js-pure/actual/structured-clone";function ur(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ce(...e){let t=e.shift(),o=e.length===1?e[0]:Ce(...e);if(!ur(t)||!ur(o))throw new Error("deepmerge can only merge Objects");let i=fo(t);return Object.entries(o).forEach(([n,r])=>{ur(r)?i[n]!==void 0?Object.assign(i,{[n]:Ce(i[n],fo(r))}):Object.assign(i,{[n]:fo(r)}):Array.isArray(r)?i[n]!==void 0?Object.assign(i,{[n]:[...i[n],...fo(r)]}):Object.assign(i,{[n]:fo(r)}):Object.assign(i,{[n]:r})}),i}var ga="unknown";function We(){let{config:e,apiUrl:t}=Qe(),{publicApiKey:o,userId:i,organizationId:n,flows:r,setShouldGracefullyDegrade:s,readonly:p}=da(Y),{resetOpenFlowState:d}=Oe(),[l,m]=ma(!1),c={data:r.map(S=>({flowId:S.id,flowState:R,lastStepId:null,userId:i,foreignUserId:i,stepStates:{},shouldTrigger:!1}))},f=S=>fetch(S,e).then(F=>{if(F.ok)return F.json();throw new Error("Failed to fetch user flow states")}).catch(F=>(console.log(`Error fetching ${S}: ${F}. Will gracefully degrade and hide Frigade`),s(!0),c)),C=o&&r&&i?`${t}userFlowStates?foreignUserId=${encodeURIComponent(i)}${n?`&foreignUserGroupId=${encodeURIComponent(n)}`:""}`:null,{data:w,isLoading:x,mutate:g,error:A}=p?fa(C,f):ua(C,f,{revalidateOnFocus:!0,revalidateIfStale:!0,keepPreviousData:!0,revalidateOnMount:!1,errorRetryInterval:1e4,errorRetryCount:3,onError:()=>c,onLoadingSlow:()=>c}),T=w==null?void 0:w.data;ca(()=>{!l&&!x&&T&&m(!0)},[T,l,x]);function k(S){return U(this,null,function*(){if(T&&!p){let F=T.find(M=>M.flowId===S);F&&F.flowState!==R&&(F.flowState=R),yield g(Promise.resolve(Ce(w,{data:T})),{optimisticData:Ce(w,{data:T}),revalidate:!1,rollbackOnError:!1})}})}function P(S,F,M){return U(this,null,function*(){if(T){let O=T.find(I=>I.flowId===S);O&&(O.stepStates[F]=M,O.flowState=Pt),yield g(Promise.resolve(Ce(w,{data:T})),{optimisticData:Ce(w,{data:T}),revalidate:!1,rollbackOnError:!1})}})}function v(S,F,M){return U(this,null,function*(){if(T){let O=T.find(I=>I.flowId===S);O&&(O.lastStepId=F,O.stepStates[F]=M,O.flowState=Pt),yield g(Ce(w,{data:T}),{optimisticData:Ce(w,{data:T}),revalidate:!1,rollbackOnError:!1})}})}function u(S){return U(this,null,function*(){if(T){let F=T.find(M=>M.flowId===S);F&&F.flowState!==Ue&&(F.flowState=Ue,F.lastStepId=ga,Object.keys(F.stepStates).forEach(M=>{F.stepStates[M].actionType=st,F.stepStates[M].createdAt=new Date().toISOString()}),yield g(Ce(w,{data:T}),{optimisticData:Ce(w,{data:T}),revalidate:!1,rollbackOnError:!1}),d(S))}})}function L(S,F,M){return U(this,null,function*(){if(T){let O=T.find(I=>I.flowId===S);O&&(O.stepStates[F]=M),yield g(Promise.resolve(Ce(w,{data:T})),{optimisticData:Ce(w,{data:T}),revalidate:!1,rollbackOnError:!1})}})}return{userFlowStatesData:T,isLoadingUserFlowStateData:!l,mutateUserFlowState:g,optimisticallyMarkFlowCompleted:k,optimisticallyMarkFlowNotStarted:u,optimisticallyMarkStepCompleted:P,optimisticallyMarkStepNotStarted:L,optimisticallyMarkStepStarted:v,error:A}}function go(){let{config:e,apiUrl:t}=Qe(),{userFlowStatesData:o,mutateUserFlowState:i}=We(),{failedFlowResponses:n,setFailedFlowResponses:r,flowResponses:s,setFlowResponses:p}=ha(Y),[d,l]=ci(new Set),[m,c]=ci(new Set),f=Vt();function C(g){let A=JSON.stringify(g);if(d.has(A))return null;d.add(A),l(d),m.add(g),c(m);let T=s==null?void 0:s.find(k=>k.flowSlug===g.flowSlug&&k.stepId===g.stepId&&k.actionType===g.actionType&&k.createdAt===g.createdAt);return f(`${t}flowResponses`,j(b({},e),{method:"POST",body:A})).then(k=>{k.status!==200&&k.status!==201?(console.log("Failed to send flow response for step "+g.stepId+". Will retry again later."),r([...n,g])):T||p(P=>[...P!=null?P:[],g])})}function w(g){return U(this,null,function*(){g.foreignUserId&&(g.actionType===Pt||g.actionType===Ue?yield C(g):g.actionType===R?yield C(g):g.actionType===uo?yield C(g):g.actionType===$e?yield C(g):g.actionType===Lo?yield C(g):g.actionType===st&&(yield C(g)))})}function x(){let g=[];return o==null||o.forEach(A=>{if(A&&A.stepStates&&Object.keys(A.stepStates).length!==0)for(let T in A.stepStates){let k=A.stepStates[T];g.push({foreignUserId:A.foreignUserId,flowSlug:A.flowId,stepId:k.stepId,actionType:k.actionType,data:{},createdAt:new Date(k.createdAt),blocked:k.blocked,hidden:k.hidden})}}),[...g,...s]}return{addResponse:w,setFlowResponses:p,getFlowResponses:x}}import ba from"swr";var xa=/user.flow\(([^\)]+)\) == '?COMPLETED_FLOW'?/gm,mi=e=>{let t=xa.exec(e);if(t===null)return null;let o=null;return t.forEach((i,n)=>{let r=Ca(i,"'","");r.startsWith("flow_")&&(o=r)}),o},Ca=function(e,t,o){return e.replace(new RegExp(t,"g"),o)};function $o(e){try{return JSON.parse(e)}catch(t){return console.error("Failed to parse Frigade config.yml to JSON",t),null}}var fr=(l=>(l.CHECKLIST="CHECKLIST",l.FORM="FORM",l.TOUR="TOUR",l.SUPPORT="SUPPORT",l.CUSTOM="CUSTOM",l.BANNER="BANNER",l.EMBEDDED_TIP="EMBEDDED_TIP",l.NPS_SURVEY="NPS_SURVEY",l.ANNOUNCEMENT="ANNOUNCEMENT",l))(fr||{});function J(){let{config:e,apiUrl:t}=Qe(),{flows:o,setFlows:i,userId:n,organizationId:r,publicApiKey:s,customVariables:p,setCustomVariables:d,hasActiveFullPageFlow:l,setHasActiveFullPageFlow:m,setFlowResponses:c,setShouldGracefullyDegrade:f,readonly:C}=ya(Y),w={data:[]},{verifySDKInitiated:x}=jt(),{addResponse:g,getFlowResponses:A}=go(),T=h=>fetch(h,e).then(y=>y.ok?y.json():(console.log(`Error fetching ${h} (${y.status}): ${y.statusText}. Will gracefully degrade and hide Frigade`),f(!0),w)).catch(y=>(console.log(`Error fetching ${h}: ${y}. Will gracefully degrade and hide Frigade`),f(!0),w)),{mutateUserFlowState:k,userFlowStatesData:P,isLoadingUserFlowStateData:v,optimisticallyMarkFlowCompleted:u,optimisticallyMarkFlowNotStarted:L,optimisticallyMarkStepCompleted:S,optimisticallyMarkStepNotStarted:F,optimisticallyMarkStepStarted:M}=We(),{data:O,error:I,isLoading:V}=ba(s?`${t}flows${C?"?readonly=true":""}`:null,T,{keepPreviousData:!0});Sa(()=>{if(I){console.error(I);return}O&&O.data&&i(O.data)},[O,I]);function W(h){if(V)return null;let y=o.find(B=>B.slug===h);return!y&&o.length>0&&!v&&!V?(console.log(`Flow with id ${h} not found`),null):(y==null?void 0:y.active)===!1&&!C?null:y}function q(h){var N,ie,je,De,xt;if(!W(h))return[];let y=(N=W(h))==null?void 0:N.data;return y?(y=X(y),((xt=(De=(ie=$o(y))==null?void 0:ie.data)!=null?De:(je=$o(y))==null?void 0:je.steps)!=null?xt:[]).map(me=>{let co=Z(me);return j(b({handleSecondaryButtonClick:()=>{me.skippable===!0&&re(h,me.id,{skipped:!0})}},me),{complete:Pe(h,me.id)===$e||co>=1,started:Pe(h,me.id)===uo||Pe(h,me.id)===$e,currentlyActive:P==null?void 0:P.some(mo=>mo.flowId==h&&mo.lastStepId===me.id),blocked:Ae(h,me.id),hidden:be(h,me.id),handlePrimaryButtonClick:()=>{(!me.completionCriteria&&(me.autoMarkCompleted||me.autoMarkCompleted===void 0)||me.completionCriteria&&me.autoMarkCompleted===!0)&&re(h,me.id)},progress:co})}).filter(me=>me.hidden!==!0)):[]}function X(h){return h.replaceAll(/\${(.*?)}/g,(y,B)=>p[B]===void 0?"":String(p[B]).replace(/[\u00A0-\u9999<>\&]/g,function(N){return"&#"+N.charCodeAt(0)+";"}).replaceAll(/[\\]/g,"\\\\").replaceAll(/[\"]/g,'\\"').replaceAll(/[\/]/g,"\\/").replaceAll(/[\b]/g,"\\b").replaceAll(/[\f]/g,"\\f").replaceAll(/[\n]/g,"\\n").replaceAll(/[\r]/g,"\\r").replaceAll(/[\t]/g,"\\t"))}function de(h){var B;if(!W(h))return[];let y=W(h).data;return y?(y=X(y),(B=JSON.parse(y))!=null?B:{}):[]}function H(h,y){d(B=>j(b({},B),{[h]:y}))}function le(h){!v&&!V&&h&&JSON.stringify(p)!=JSON.stringify(b(b({},p),h))&&Object.keys(h).forEach(y=>{H(y,h[y])})}let fe=vt((h,y,B)=>U(this,null,function*(){if(!x())return;let N={foreignUserId:n,foreignUserGroupId:r!=null?r:null,flowSlug:h,stepId:y,actionType:uo,data:B!=null?B:{},createdAt:new Date,blocked:!1,hidden:!1};xe(N)&&(yield M(h,y,N),g(N))}),[n,r,P]),Te=vt((h,y,B)=>U(this,null,function*(){if(!x())return;let N={foreignUserId:n,foreignUserGroupId:r!=null?r:null,flowSlug:h,stepId:y,actionType:st,data:B!=null?B:{},createdAt:new Date,blocked:!1,hidden:!1};xe(N)&&(yield F(h,y,N),g(N))}),[n,r,P]),re=vt((h,y,B)=>U(this,null,function*(){if(!x())return;let N={foreignUserId:n,foreignUserGroupId:r!=null?r:null,flowSlug:h,stepId:y,actionType:$e,data:B!=null?B:{},createdAt:new Date,blocked:!1,hidden:!1};xe(N)&&(yield S(h,y,N),g(N))}),[n,r,P]),Q=vt((h,y)=>U(this,null,function*(){if(!x()||ce(h)===Ue)return;let B={foreignUserId:n,foreignUserGroupId:r!=null?r:null,flowSlug:h,stepId:"unknown",actionType:Ue,data:y!=null?y:{},createdAt:new Date,blocked:!1,hidden:!1};yield L(h),xe(B)&&g(B)}),[n,r,P]),he=vt((h,y)=>U(this,null,function*(){if(!x())return;let B={foreignUserId:n,foreignUserGroupId:r!=null?r:null,flowSlug:h,stepId:"unknown",actionType:Pt,data:y!=null?y:{},createdAt:new Date,blocked:!1,hidden:!1};xe(B)&&g(B)}),[n,r,P]),D=vt((h,y)=>U(this,null,function*(){if(!x())return;let B={foreignUserId:n,foreignUserGroupId:r!=null?r:null,flowSlug:h,stepId:"unknown",actionType:R,data:y!=null?y:{},createdAt:new Date,blocked:!1,hidden:!1};xe(B)&&(yield u(h),g(B))}),[n,r,P]),Se=vt((h,y)=>U(this,null,function*(){if(!x())return;let B={foreignUserId:n,foreignUserGroupId:r!=null?r:null,flowSlug:h,stepId:"unknown",actionType:Lo,data:y!=null?y:{},createdAt:new Date,blocked:!1,hidden:!1};xe(B)&&(yield u(h),g(B))}),[n,r,P]);function xe(h){var y;if(P===void 0)return!1;if(P){let B=P.find(N=>N.flowId===h.flowSlug);if(h.actionType===st&&(!(B!=null&&B.stepStates[h.stepId])||B.stepStates[h.stepId].actionType===st))return!1;if(B&&((y=B.stepStates[h.stepId])==null?void 0:y.actionType)===h.actionType){if(h.actionType===$e&&(!h.data||JSON.stringify(h.data)===JSON.stringify({})))return!1;let N=Object.keys(B.stepStates).sort((ie,je)=>{let De=new Date(B.stepStates[ie].createdAt),xt=new Date(B.stepStates[je].createdAt);return De.getTime()-xt.getTime()});if(B.stepStates[N[N.length-1]].actionType===h.actionType&&h.stepId===N[N.length-1])return!1}if(B&&B.flowState===R&&h.actionType===R)return!1}return!0}function Pe(h,y){let B=_(h,y);return v?null:B?B.actionType:st}function Ae(h,y){let B=_(h,y);return B?B.blocked:!1}function be(h,y){let B=_(h,y);return B?B.hidden:!1}function _(h,y){var N;if(v)return null;let B=P==null?void 0:P.find(ie=>ie.flowId===h);return!B||!B.stepStates[y]?null:(N=B.stepStates[y])!=null?N:null}function $(h){var B,N;if(v||!P)return null;if(ce(h)===Ue)return(B=q(h)[0])!=null?B:null;let y=(N=P.find(ie=>ie.flowId===h))==null?void 0:N.lastStepId;return y?q(h).find(ie=>ie.id===y):null}function z(h){var N;let y=$(h);if(!y)return 0;let B=(N=q(h).findIndex(ie=>ie.id===y.id))!=null?N:0;return Pe(h,y.id)===$e&&B<q(h).length-1?B+1:B}function Z(h){if(!h.completionCriteria)return;let y=mi(h.completionCriteria);if(y===null)return;let B=it(y),N=nt(y);return N===0?void 0:B/N}function ce(h){let y=P==null?void 0:P.find(B=>B.flowId===h);return y?y.flowState:null}function it(h){let y=q(h);return y.length===0?0:y.filter(N=>Pe(h,N.id)===$e).length}function nt(h){return q(h).length}function zt(h){let y=o.find(B=>B.slug===h);return y?$o(y.data):null}function qe(h){if(C)return!1;if(v)return!0;if(h!=null&&h.targetingLogic&&P){let y=P.find(B=>B.flowId===h.slug);if(y)return y.shouldTrigger===!1}return!!(h!=null&&h.targetingLogic&&n&&n.startsWith("guest_"))}function ht(h){return!qe(W(h))}function Xe(){n&&k()}function _t(){return o}return{getAllFlows:_t,getFlow:W,getFlowData:zt,isLoading:v||V,getStepStatus:Pe,getFlowSteps:q,getCurrentStepIndex:z,markStepStarted:fe,markStepCompleted:re,markFlowNotStarted:Q,markFlowStarted:he,markFlowCompleted:D,markFlowAborted:Se,markStepNotStarted:Te,getFlowStatus:ce,getNumberOfStepsCompleted:it,getNumberOfSteps:nt,targetingLogicShouldHideFlow:qe,setCustomVariable:H,updateCustomVariables:le,customVariables:p,getStepOptionalProgress:Z,getFlowMetadata:de,isStepBlocked:Ae,isStepHidden:be,hasActiveFullPageFlow:l,setHasActiveFullPageFlow:m,isFlowAvailableToUser:ht,refresh:Xe}}import{useCallback as gr,useContext as wa,useEffect as Ta}from"react";var Gt="guest_";function ho(){let{userId:e,organizationId:t,setUserId:o,setUserProperties:i,shouldGracefullyDegrade:n}=wa(Y),{config:r,apiUrl:s}=Qe(),{mutateUserFlowState:p}=We(),d=Vt(),{verifySDKInitiated:l}=jt();function m(w){return`frigade-user-registered-${w}`}Ta(()=>{if(e&&!t){if(e.startsWith(Gt))return;let w=m(e);localStorage.getItem(w)||(d(`${s}users`,j(b({},r),{method:"POST",body:JSON.stringify({foreignId:e})})),localStorage.setItem(w,"true"))}},[e,n,t]);let c=gr(w=>U(this,null,function*(){if(!l())return;let x={foreignId:e,properties:w};yield d(`${s}users`,j(b({},r),{method:"POST",body:JSON.stringify(x)})),i(g=>b(b({},g),w)),p()}),[e,r,n,p]),f=gr((w,x)=>U(this,null,function*(){if(!l())return;let A={foreignId:e,events:[{event:w,properties:x}]};yield d(`${s}users`,j(b({},r),{method:"POST",body:JSON.stringify(A)})),p()}),[e,r,p]),C=gr((w,x)=>U(this,null,function*(){if(l())if(x){let g=m(w);localStorage.setItem(g,"true"),o(w);let A={foreignId:w,properties:x};yield d(`${s}users`,j(b({},r),{method:"POST",body:JSON.stringify(A)})),i(T=>b(b({},T),x)),p()}else o(w)}),[r,n,p]);return{userId:e,setUserId:o,setUserIdWithProperties:C,addPropertiesToUser:c,trackEventForUser:f}}import{v4 as Zp}from"uuid";import tt,{useEffect as hn,useState as Yp}from"react";import Ye,{useEffect as yr,useState as Na}from"react";import Wo from"styled-components";import Fa from"react";import ka from"styled-components";var ui="fr-",xo="cfr-";function a(e,t){let o=`${ui}${e}`;if(!t)return o;if(t.styleOverrides&&t.styleOverrides[e]){if(typeof t.styleOverrides[e]=="string")return o+" "+t.styleOverrides[e];if(typeof t.styleOverrides[e]=="object")return o+" "+xo+e}return o}function E(e){if(!e.className||e.className.indexOf(xo)!==-1)return"";let o=e.className.replace(/\s+/g," ").split(" ");return o.length==1&&o[0].startsWith(ui)?"":`:not(${o.map(i=>`.${i}`).join(", ")})`}function Mo(e){return e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()}function ve(e){return e!=null&&e.styleOverrides?Object.keys(e.styleOverrides).map(t=>`${Mo(t)}: ${e.styleOverrides[t]};`).join(" "):""}function Fe(...e){return e.filter(Boolean).join(" ")}function Co(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Pa=ka.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
position: fixed;
|
|
@@ -23,11 +23,11 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
23
23
|
opacity: 1;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
`,fi=({onClose:e,appearance:t})=>Fa.createElement(Pa,{className:a("modalBackground",t),onClick:()=>e()});import
|
|
26
|
+
`,fi=({onClose:e,appearance:t})=>Fa.createElement(Pa,{className:a("modalBackground",t),onClick:()=>e()});import hr from"react";import va from"styled-components";var Ba=va.div`
|
|
27
27
|
:hover {
|
|
28
28
|
opacity: 0.8;
|
|
29
29
|
}
|
|
30
|
-
`,Ne=()=>
|
|
30
|
+
`,Ne=()=>hr.createElement(Ba,null,hr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},hr.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M5 15L15 5M5 5l10 10"})));import{Portal as Ia}from"react-portal";import vi from"react";import xr from"react";function Ea({style:e,className:t}){return xr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"54",height:"14",fill:"none",viewBox:"0 0 54 14",style:e,className:t},xr.createElement("path",{fill:"currentColor",d:"M16.293 3.476v1.036h1.593v1.256h-1.593v5.098h-1.41V5.768H14V4.512h.883V3.244c0-.67.294-1.744 1.777-1.744.515 0 .969.049 1.361.146l-.233 1.232a5.939 5.939 0 00-.833-.073c-.442 0-.662.22-.662.67zm6.534.975V5.83c-.846 0-1.63.159-2.342.476v4.56h-1.41V4.513h1.263l.086.61c.846-.451 1.655-.67 2.403-.67zm2.505-.951c-.331.33-.944.33-1.287 0a.93.93 0 01-.246-.659c0-.268.086-.487.246-.646.343-.33.956-.33 1.287 0 .343.33.343.964 0 1.305zm.061 7.366h-1.41V4.512h1.41v6.354zm6.928-5.756c.246.146.368.402.368.756v4.976c0 1.804-.858 2.658-2.672 2.658-.92 0-1.753-.146-2.514-.439l.417-1.073c.674.22 1.336.33 1.974.33.98 0 1.385-.379 1.385-1.403v-.171c-.588.134-1.09.207-1.52.207-.907 0-1.655-.305-2.231-.902-.576-.598-.87-1.39-.87-2.354 0-.963.294-1.756.87-2.354.576-.61 1.324-.914 2.231-.914 1.005 0 1.864.232 2.562.683zm-2.488 4.634a5.15 5.15 0 001.446-.22V5.951a3.695 3.695 0 00-1.446-.292c-1.08 0-1.778.841-1.778 2.048 0 1.22.699 2.037 1.778 2.037zm7.34-5.317c1.52 0 2.28.878 2.28 2.634v3.805h-1.275l-.073-.524c-.601.414-1.288.621-2.084.621-1.263 0-2.06-.658-2.06-1.731 0-1.269 1.25-2.025 3.408-2.025.135 0 .503.013.662.013v-.171c0-1.012-.343-1.451-1.115-1.451-.675 0-1.435.158-2.256.475l-.466-1.012c1.017-.427 2.01-.634 2.979-.634zm-1.839 4.756c0 .427.343.695 1.017.695.528 0 1.251-.22 1.68-.512V8.22h-.441c-1.508 0-2.256.317-2.256.963zm9.953-4.549v-2.83h1.41v7.72c0 .354-.123.598-.368.757-.71.45-1.57.67-2.562.67-.907 0-1.655-.305-2.231-.902-.577-.61-.87-1.39-.87-2.354 0-.963.293-1.756.87-2.354.576-.61 1.324-.914 2.23-.914.43 0 .933.073 1.521.207zM43.84 9.72c.503 0 .981-.098 1.447-.293V5.854a5.15 5.15 0 00-1.447-.22c-1.078 0-1.777.817-1.777 2.037s.699 2.049 1.777 2.049zM54 7.866v.439h-4.573c.184.963.858 1.512 1.827 1.512.613 0 1.275-.146 1.986-.451l.466 1.024c-.87.378-1.729.573-2.575.573-.931 0-1.692-.304-2.268-.902-.576-.61-.87-1.402-.87-2.366 0-.975.294-1.768.87-2.366.576-.597 1.324-.902 2.244-.902.968 0 1.691.33 2.17.975.478.647.723 1.464.723 2.464zm-4.61-.586h3.298c-.086-1.073-.613-1.731-1.581-1.731-.969 0-1.582.695-1.717 1.731z"}),xr.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M1.196 1.229A4.009 4.009 0 014.08 0l4.092.027C9.183.027 10 .867 10 1.904c0 .6-.273 1.133-.7 1.478-.31.25-.7.399-1.126.4h-.001l-4.09-.027h-.002a4.804 4.804 0 00-2.614.77A4.986 4.986 0 000 5.974v-1.78C0 3.036.456 1.988 1.196 1.23zm4.525 4.65a4.282 4.282 0 00-1.184 2.513l3.637.023c.131 0 .259-.015.382-.042h.002c.81-.178 1.42-.908 1.44-1.788v-.046a1.9 1.9 0 00-.533-1.328 1.813 1.813 0 00-.908-.508h-.002l-.002-.001a1.68 1.68 0 00-.366-.042A4.084 4.084 0 005.72 5.88zm-4.525-.016A4.235 4.235 0 000 8.829C0 10.997 1.601 12.78 3.654 13V9.265h-.005l.005-.439v-.437h.023a5.175 5.175 0 011.439-3.13 5.05 5.05 0 01.72-.614l-1.754-.011H4.08c-.787 0-1.521.229-2.144.625a4.11 4.11 0 00-.74.603z",clipRule:"evenodd"}))}var gi=Ea;import Cr from"styled-components";import lt from"styled-components";var Do=lt.div`
|
|
31
31
|
${e=>E(e)} {
|
|
32
32
|
background: ${e=>e.appearance.theme.colorBackground};
|
|
33
33
|
}
|
|
@@ -57,11 +57,11 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
57
57
|
position: absolute;
|
|
58
58
|
top: 12px;
|
|
59
59
|
right: 12px;
|
|
60
|
-
`,hi=
|
|
60
|
+
`,hi=lt.div`
|
|
61
61
|
${e=>E(e)} {
|
|
62
62
|
${e=>e.hasImage?Aa:Oa};
|
|
63
63
|
}
|
|
64
|
-
`,xi=
|
|
64
|
+
`,xi=lt.img`
|
|
65
65
|
${e=>E(e)} {
|
|
66
66
|
display: block;
|
|
67
67
|
width: 100%;
|
|
@@ -69,7 +69,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
69
69
|
min-height: 200px;
|
|
70
70
|
object-fit: cover;
|
|
71
71
|
}
|
|
72
|
-
`,Ci=
|
|
72
|
+
`,Ci=lt.div`
|
|
73
73
|
${e=>E(e)} {
|
|
74
74
|
display: block;
|
|
75
75
|
width: 100%;
|
|
@@ -77,19 +77,19 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
77
77
|
margin-top: ${e=>e.dismissible?"24px":"0px"};
|
|
78
78
|
object-fit: cover;
|
|
79
79
|
}
|
|
80
|
-
`,yi=
|
|
80
|
+
`,yi=lt.div`
|
|
81
81
|
display: flex;
|
|
82
82
|
flex-direction: row;
|
|
83
83
|
justify-content: space-between;
|
|
84
84
|
align-content: center;
|
|
85
|
-
`,Si=
|
|
85
|
+
`,Si=lt.div`
|
|
86
86
|
padding: 22px 22px 12px;
|
|
87
|
-
`,bi=
|
|
87
|
+
`,bi=lt.div`
|
|
88
88
|
display: flex;
|
|
89
89
|
flex: 1;
|
|
90
90
|
flex-direction: column;
|
|
91
91
|
justify-content: center;
|
|
92
|
-
`,wi=
|
|
92
|
+
`,wi=lt.div`
|
|
93
93
|
display: flex;
|
|
94
94
|
flex: 2;
|
|
95
95
|
flex-shrink: 1;
|
|
@@ -101,7 +101,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
101
101
|
align-content: center;
|
|
102
102
|
align-items: center;
|
|
103
103
|
}
|
|
104
|
-
`,Ti=
|
|
104
|
+
`,Ti=lt.p`
|
|
105
105
|
${e=>E(e)} {
|
|
106
106
|
font-style: normal;
|
|
107
107
|
font-weight: 600;
|
|
@@ -110,7 +110,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
110
110
|
color: #808080;
|
|
111
111
|
}
|
|
112
112
|
margin: 0;
|
|
113
|
-
`;var Fi=
|
|
113
|
+
`;var Fi=Cr.div`
|
|
114
114
|
background-color: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.colorBackground}};
|
|
115
115
|
position: absolute;
|
|
116
116
|
bottom: -47px;
|
|
@@ -121,7 +121,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
121
121
|
align-items: center;
|
|
122
122
|
justify-content: center;
|
|
123
123
|
border-radius: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.borderRadius}}px;
|
|
124
|
-
`,ki=
|
|
124
|
+
`,ki=Cr(Do)`
|
|
125
125
|
background-color: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.colorBackground}};
|
|
126
126
|
position: absolute;
|
|
127
127
|
bottom: -60px;
|
|
@@ -134,7 +134,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
134
134
|
border-radius: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.borderRadius}}px;
|
|
135
135
|
padding: 0;
|
|
136
136
|
z-index: ${e=>e.zIndex};
|
|
137
|
-
`,Pi=
|
|
137
|
+
`,Pi=Cr.div`
|
|
138
138
|
display: flex;
|
|
139
139
|
justify-content: center;
|
|
140
140
|
align-items: center;
|
|
@@ -143,7 +143,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
143
143
|
font-size: 12px;
|
|
144
144
|
line-height: 18px;
|
|
145
145
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
|
|
146
|
-
`;function
|
|
146
|
+
`;function Uo({appearance:e}){return vi.createElement(Pi,{className:a("poweredByFrigadeContainer",e),appearance:e},"Powered by \xA0",vi.createElement(gi,null))}var La=Wo.div`
|
|
147
147
|
${e=>E(e)} {
|
|
148
148
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
149
149
|
background-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
|
|
@@ -185,10 +185,10 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
185
185
|
opacity: 1;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
`,$a
|
|
188
|
+
`,$a=Wo.div`
|
|
189
189
|
position: relative;
|
|
190
190
|
flex: 0 1 auto;
|
|
191
|
-
`,Ma
|
|
191
|
+
`,Ma=Wo.div`
|
|
192
192
|
position: absolute;
|
|
193
193
|
top: 16px;
|
|
194
194
|
right: 16px;
|
|
@@ -198,14 +198,14 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
198
198
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
199
199
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
200
200
|
}
|
|
201
|
-
`,Da
|
|
201
|
+
`,Da=Wo.div`
|
|
202
202
|
overflow: scroll;
|
|
203
203
|
flex: 1 1;
|
|
204
204
|
display: flex;
|
|
205
205
|
::-webkit-scrollbar {
|
|
206
206
|
display: none;
|
|
207
207
|
}
|
|
208
|
-
`,
|
|
208
|
+
`,Ze=({onClose:e,visible:t,headerContent:o=null,style:i=null,children:n,appearance:r,dismissible:s=!0,showFrigadeBranding:p=!1})=>{let[d,l]=Na("");return yr(()=>{let m=getComputedStyle(document.body).getPropertyValue("overflow");l(m)},[]),yr(()=>{let m=c=>{c.key==="Escape"&&e()};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[e]),yr(()=>{let m=document.body.style;return t?m.setProperty("overflow","hidden"):m.setProperty("overflow",d),()=>{m.setProperty("overflow",d)}},[t]),t?Ye.createElement(Ia,null,Ye.createElement(fi,{appearance:r,onClose:()=>{s&&e()}}),Ye.createElement(La,{appearance:r,className:a("modalContainer",r),styleOverrides:i},s&&Ye.createElement(Ma,{className:a("modalClose",r),onClick:()=>e(),appearance:r},Ye.createElement(Ne,null)),o&&Ye.createElement($a,null,o),Ye.createElement(Da,null,n),p&&Ye.createElement(Fi,{appearance:r,className:a("poweredByFrigadeRibbon",r)},Ye.createElement(Uo,{appearance:r})))):Ye.createElement(Ye.Fragment,null)};import yt,{useEffect as Sr,useState as Ua}from"react";import zo from"styled-components";import{Portal as Wa}from"react-portal";function za(e){switch(e){case"top-left":return`
|
|
209
209
|
top: 0;
|
|
210
210
|
left: 0;
|
|
211
211
|
`;case"top-right":return`
|
|
@@ -214,7 +214,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
214
214
|
`;case"bottom-left":return`
|
|
215
215
|
bottom: 0;
|
|
216
216
|
left: 0;
|
|
217
|
-
`}return"right: 0; bottom: 0;"}var _a=
|
|
217
|
+
`}return"right: 0; bottom: 0;"}var _a=zo.div`
|
|
218
218
|
${e=>E(e)} {
|
|
219
219
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
220
220
|
background: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
|
|
@@ -230,10 +230,10 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
230
230
|
}
|
|
231
231
|
${e=>za(e.modalPosition)}
|
|
232
232
|
margin: 28px;
|
|
233
|
-
`,Ha=
|
|
233
|
+
`,Ha=zo.div`
|
|
234
234
|
position: relative;
|
|
235
235
|
flex: 1;
|
|
236
|
-
`,Va=
|
|
236
|
+
`,Va=zo.div`
|
|
237
237
|
position: absolute;
|
|
238
238
|
top: 16px;
|
|
239
239
|
right: 16px;
|
|
@@ -243,13 +243,13 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
243
243
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
244
244
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
245
245
|
}
|
|
246
|
-
`,ja=
|
|
246
|
+
`,ja=zo.div`
|
|
247
247
|
overflow: scroll;
|
|
248
248
|
flex: 5;
|
|
249
249
|
::-webkit-scrollbar {
|
|
250
250
|
display: none;
|
|
251
251
|
}
|
|
252
|
-
`,
|
|
252
|
+
`,_o=({onClose:e,visible:t,headerContent:o=null,children:i,appearance:n,modalPosition:r="bottom-right",dismissible:s=!0})=>{let[p,d]=Ua("");return Sr(()=>{let l=getComputedStyle(document.body).getPropertyValue("overflow");d(l)},[]),Sr(()=>{let l=m=>{m.key==="Escape"&&e()};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l)}},[e]),Sr(()=>{let l=document.body.style;return t?l.setProperty("overflow","hidden"):l.setProperty("overflow",p),()=>{l.setProperty("overflow",p)}},[t]),t?yt.createElement(Wa,null,yt.createElement(_a,{appearance:n,className:a("cornerModalContainer",n),modalPosition:r},s&&yt.createElement(Va,{className:a("cornerModalClose",n),onClick:()=>e()},yt.createElement(Ne,null)),o&&yt.createElement(Ha,null,o),yt.createElement(ja,null,i))):yt.createElement(yt.Fragment,null)};import{useContext as Ga}from"react";function ee(){let{defaultAppearance:e}=Ga(Y);function t(o){var n,r,s;let i=JSON.parse(JSON.stringify(e));return o?{styleOverrides:Object.assign((n=i.styleOverrides)!=null?n:{},(r=o.styleOverrides)!=null?r:{}),theme:Object.assign(i.theme,(s=o.theme)!=null?s:{})}:i}return{mergeAppearanceWithDefault:t}}import Bt,{useContext as up,useEffect as ji,useState as Ar}from"react";import Ko from"styled-components";import jo,{useEffect as Ii,useState as Tr}from"react";import Fr from"styled-components";import Ho from"styled-components";var Bi=Ho.label`
|
|
253
253
|
${e=>E(e)} {
|
|
254
254
|
font-size: 12px;
|
|
255
255
|
line-height: 18px;
|
|
@@ -260,14 +260,14 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
260
260
|
letter-spacing: 0.24px;
|
|
261
261
|
}
|
|
262
262
|
display: flex;
|
|
263
|
-
`,Ei=
|
|
263
|
+
`,Ei=Ho.label`
|
|
264
264
|
${e=>E(e)} {
|
|
265
265
|
font-size: 12px;
|
|
266
266
|
line-height: 20px;
|
|
267
267
|
margin-bottom: 5px;
|
|
268
268
|
}
|
|
269
269
|
display: flex;
|
|
270
|
-
`,Ai=
|
|
270
|
+
`,Ai=Ho.span`
|
|
271
271
|
font-weight: 400;
|
|
272
272
|
font-size: 14px;
|
|
273
273
|
line-height: 22px;
|
|
@@ -275,16 +275,16 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
275
275
|
display: flex;
|
|
276
276
|
margin-right: 5px;
|
|
277
277
|
margin-top: 10px;
|
|
278
|
-
`,
|
|
278
|
+
`,Vo=Ho.div`
|
|
279
279
|
display: flex;
|
|
280
280
|
align-items: flex-start;
|
|
281
281
|
justify-content: left;
|
|
282
282
|
margin-bottom: 10px;
|
|
283
|
-
`;import
|
|
283
|
+
`;import br from"react";var at={theme:{colorPrimary:"#0171F8",colorSecondary:"#2E343D",colorText:"#0F1114",colorBackground:"#ffffff",colorBackgroundSecondary:"#d2d2d2",colorTextOnPrimaryBackground:"#ffffff",colorTextSecondary:"#2E343D",colorTextDisabled:"#5A6472",colorBorder:"#E5E5E5",colorTextError:"#c00000",colorTextSuccess:"#00D149",borderRadius:10}};function St({title:e,required:t,appearance:o=at}){return e?br.createElement(Vo,{className:a("formLabelWrapper",o)},t?br.createElement(Ai,{className:a("formLabelRequired",o),appearance:o},"*"):null,br.createElement(Bi,{className:a("formLabel",o)},e)):null}import Oi from"react";function Kt({title:e,appearance:t}){return e?Oi.createElement(Vo,null,Oi.createElement(Ei,{className:a("formSubLabel",t)},e)):null}import{z as wr}from"zod";function Ni(e,t){var o,i,n,r,s,p,d;try{if(t){if(t.type=="number"){let l=wr.number();if(t.props)for(let m of t.props)m.requirement=="min"?l=l.min(Number(m.value),(o=m.message)!=null?o:"Value is too small"):m.requirement=="max"?l=l.max(Number(m.value),(i=m.message)!=null?i:"Value is too large"):m.requirement=="positive"?l=l.positive((n=m.message)!=null?n:"Value must be positive"):m.requirement=="negative"&&(l=l.nonpositive((r=m.message)!=null?r:"Value must be negative"));l.parse(Number(e))}if(t.type=="string"){let l=wr.string();if(t.props)for(let m of t.props)m.requirement=="min"?l=l.min(Number(m.value),(s=m.message)!=null?s:"Value is too short"):m.requirement=="max"?l=l.max(Number(m.value),(p=m.message)!=null?p:"Value is too long"):m.requirement=="regex"&&(l=l.regex(new RegExp(String(m.value)),(d=m.message)!=null?d:"Value does not match requirements"));l.parse(e)}return}}catch(l){if(l instanceof wr.ZodError)return l.issues&&l.issues.length>0?l.issues[0].message:null;console.error("Frigade Form validation failed for rule ",t,l)}return null}var Ka=Fr.div`
|
|
284
284
|
display: flex;
|
|
285
285
|
flex-direction: column;
|
|
286
286
|
width: 100%;
|
|
287
|
-
`,
|
|
287
|
+
`,kr=Fr.input`
|
|
288
288
|
${e=>E(e)} {
|
|
289
289
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
290
290
|
border: 1px solid ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
|
|
@@ -300,7 +300,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
300
300
|
box-sizing: border-box;
|
|
301
301
|
padding: 0 10px;
|
|
302
302
|
margin-bottom: 10px;
|
|
303
|
-
`,qa=
|
|
303
|
+
`,qa=Fr.textarea`
|
|
304
304
|
${e=>E(e)} {
|
|
305
305
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
306
306
|
border: 1px solid ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
|
|
@@ -317,7 +317,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
317
317
|
box-sizing: border-box;
|
|
318
318
|
margin-bottom: 10px;
|
|
319
319
|
resize: none;
|
|
320
|
-
`;function
|
|
320
|
+
`;function Pr({formInput:e,customFormTypeProps:t,onSaveInputData:o,setFormValidationErrors:i,inputData:n}){let r=e,[s,p]=Tr((n==null?void 0:n.text)||""),[d,l]=Tr(!1),[m,c]=Tr(!1),f=kr;Ii(()=>{s===""&&!d&&(l(!0),C(""))},[]),Ii(()=>{if(m){C(s);return}},[m]);function C(x){var A;if(p(x),o({text:x}),r.required===!0&&x.trim()===""){i([{id:r.id,message:`${(A=r.title)!=null?A:"Field"} is required`,hidden:!m}]);return}let g=Ni(x,r.validation);if(g&&(x.trim()!==""||r.required===!0)){i([{id:r.id,message:g,hidden:!m}]);return}i([])}r.multiline&&(f=qa);function w(){var x;switch((x=r==null?void 0:r.validation)==null?void 0:x.type){case"email":return"email";case"number":return"number";case"password":return"password"}return null}return jo.createElement(Ka,null,jo.createElement(St,{title:r.title,required:r.required,appearance:t.appearance}),jo.createElement(f,{className:a("inputComponent",t.appearance),value:s,onChange:x=>{C(x.target.value)},appearance:t.appearance,placeholder:r.placeholder,type:w(),onBlur:()=>{c(!0)}}),jo.createElement(Kt,{title:r.subtitle,appearance:t.appearance}))}import Re,{useEffect as Li,useState as $i}from"react";import Mi from"styled-components";var vr="",Ya=Mi.div`
|
|
321
321
|
display: flex;
|
|
322
322
|
flex-direction: column;
|
|
323
323
|
width: 100%;
|
|
@@ -344,9 +344,9 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
344
344
|
background-repeat: no-repeat;
|
|
345
345
|
background-size: 1.5em 1.5em;
|
|
346
346
|
-webkit-print-color-adjust: exact;
|
|
347
|
-
`;function Di({formInput:e,customFormTypeProps:t,onSaveInputData:o,inputData:i,setFormValidationErrors:n}){var m,c,f,C,w,x,g,A,T;let r=e,[s,p]=$i(!1),[d,l]=$i(!1);return Li(()=>{var k,P,v,u;if(!((k=i==null?void 0:i.choice)!=null&&k[0])&&!s){if(p(!0),r.requireSelection){o({choice:[
|
|
347
|
+
`;function Di({formInput:e,customFormTypeProps:t,onSaveInputData:o,inputData:i,setFormValidationErrors:n}){var m,c,f,C,w,x,g,A,T;let r=e,[s,p]=$i(!1),[d,l]=$i(!1);return Li(()=>{var k,P,v,u;if(!((k=i==null?void 0:i.choice)!=null&&k[0])&&!s){if(p(!0),r.requireSelection){o({choice:[vr]});return}if(r.defaultValue&&((P=r.props.options)!=null&&P.find(L=>L.id===r.defaultValue))){let L=(v=r.props.options)==null?void 0:v.find(S=>S.id===r.defaultValue);o({choice:[L.id]})}else o({choice:[((u=r.props.options)==null?void 0:u[0].id)||""]})}},[]),Li(()=>{var k;d&&(r.requireSelection&&((k=i==null?void 0:i.choice)==null?void 0:k[0])===vr?n([{message:"Please select an option",id:r.id}]):n([]))},[(m=i==null?void 0:i.choice)==null?void 0:m[0],d]),Re.createElement(Ya,null,Re.createElement(St,{title:r.title,required:!1,appearance:t.appearance}),Re.createElement(Ja,{value:(c=i==null?void 0:i.choice)==null?void 0:c[0],onChange:k=>{l(!0),o({choice:[k.target.value]})},placeholder:r.placeholder,appearance:t.appearance,className:a("multipleChoiceSelect",t.appearance)},r.requireSelection&&Re.createElement("option",{key:"null-value",value:vr,disabled:!0},(f=r.placeholder)!=null?f:"Select an option"),(C=r.props.options)==null?void 0:C.map(k=>Re.createElement("option",{key:k.id,value:k.id},k.title))),((x=(w=r.props.options)==null?void 0:w.find(k=>{var P;return k.id===((P=i==null?void 0:i.choice)==null?void 0:P[0])}))==null?void 0:x.isOpenEnded)&&Re.createElement(Re.Fragment,null,Re.createElement(St,{title:(T=(A=(g=r.props.options)==null?void 0:g.find(k=>{var P;return k.id===((P=i==null?void 0:i.choice)==null?void 0:P[0])}))==null?void 0:A.openEndedLabel)!=null?T:"Please specify",required:!1,appearance:t.appearance}),Re.createElement(kr,{type:"text",placeholder:"Enter your answer here",onChange:k=>{o({choice:[k.target.value]})},appearance:t.appearance})),Re.createElement(Kt,{title:r.subtitle,appearance:t.appearance}))}import bo,{useEffect as Br,useState as Wi}from"react";import zi from"styled-components";import So from"react";import yo from"react";var Ui=({color:e,percentage:t,size:o})=>{let i=o*.5-2,n=2*Math.PI*i,r=(1-t)*n;return yo.createElement("circle",{r:i,cx:o*.5,cy:o*.5,fill:"transparent",stroke:r!==n?e:"",strokeWidth:"3px",strokeDasharray:n,strokeDashoffset:t?r:0})},Xa=({fillColor:e,size:t,percentage:o,children:i,bgColor:n="#D9D9D9",className:r,style:s})=>yo.createElement("svg",{style:s,className:r,width:t,height:t,overflow:"visible"},yo.createElement("g",{transform:`rotate(-90 ${`${t*.5} ${t*.5}`})`},yo.createElement(Ui,{color:n,size:t}),yo.createElement(Ui,{color:e,percentage:Math.max(o,.1),size:t})),i),qt=Xa;import Qa from"styled-components";var Za=({color:e="#FFFFFF"})=>So.createElement("svg",{width:10,height:8,viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},So.createElement("path",{d:"M1 4.34815L3.4618 7L3.4459 6.98287L9 1",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),Ra={width:"22px",height:"22px",borderRadius:"8px",display:"flex",justifyContent:"center",alignItems:"center"},ep={width:"22px",height:"22px",borderRadius:"40px",display:"flex",justifyContent:"center",alignItems:"center"},tp={border:"1px solid #000000",color:"#FFFFFF"},op={border:"1px solid #C5CBD3"},rp={color:"#FFFFFF"},ip={border:"1px solid #C5CBD3"},np=e=>e==="square"?Ra:ep,sp=(e,t)=>e==="square"?t?tp:op:t?rp:ip,lp=Qa.div`
|
|
348
348
|
${e=>ve(e)}
|
|
349
|
-
`,
|
|
349
|
+
`,pt=({value:e,type:t="round",primaryColor:o="#000000",progress:i,appearance:n=at,style:r,className:s})=>{let p=np(t),d=sp(t,e);return e===!0?p=j(b(b({},p),d),{backgroundColor:n.theme.colorTextSuccess,borderColor:t==="square"?o:"none"}):p=b(b({},p),d),e!==!0&&t==="round"&&i!==void 0&&i!==1?So.createElement(qt,{fillColor:o,percentage:i,size:22}):So.createElement(lp,{styleOverrides:p,style:r,role:"checkbox",className:Fe(a("checkIconContainer",n),a(e?"checkIconContainerChecked":"checkIconContainerUnchecked",n),e?"checkIconContainerChecked":"checkIconContainerUnchecked",s)},e&&So.createElement(Za,{color:"#FFFFFF"}))};var ap=zi.div`
|
|
350
350
|
display: flex;
|
|
351
351
|
flex-direction: column;
|
|
352
352
|
width: 100%;
|
|
@@ -377,7 +377,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
377
377
|
height: 48px;
|
|
378
378
|
padding: 0 18px;
|
|
379
379
|
margin-bottom: 10px;
|
|
380
|
-
`;function _i({formInput:e,customFormTypeProps:t,onSaveInputData:o,inputData:i,setFormValidationErrors:n}){var m;let r=e,[s,p]=Wi((i==null?void 0:i.choice)||[]),[d,l]=Wi(!1);return
|
|
380
|
+
`;function _i({formInput:e,customFormTypeProps:t,onSaveInputData:o,inputData:i,setFormValidationErrors:n}){var m;let r=e,[s,p]=Wi((i==null?void 0:i.choice)||[]),[d,l]=Wi(!1);return Br(()=>{s.length==0&&!d&&(l(!0),o({choice:[]}))},[]),Br(()=>{o({choice:s})},[s]),Br(()=>{r.required&&(s.length<r.props.minChoices||s.length>r.props.maxChoices)?n([{message:"",id:r.id}]):n([])},[s]),bo.createElement(ap,null,bo.createElement(St,{title:r.title,required:r.required,appearance:t.appearance}),(m=r.props.options)==null?void 0:m.map(c=>bo.createElement(pp,{appearance:t.appearance,className:a(s.includes(c.id)?"multipleChoiceListItemSelected":"multipleChoiceListItem",t.appearance),key:c.id,value:c.id,"data-selected":s.includes(c.id),onClick:()=>{if(s.includes(c.id)){p(s.filter(f=>f!==c.id));return}s.length<r.props.maxChoices?p([...s,c.id]):s.length==1&&r.props.maxChoices==1&&p([c.id])}},c.title,bo.createElement(pt,{type:"round",primaryColor:t.appearance.theme.colorPrimary,value:s.includes(c.id),appearance:t.appearance}))),bo.createElement(Kt,{title:r.subtitle,appearance:t.appearance}))}import Go from"react";import Hi from"styled-components";import dp from"dompurify";function ae(e){return{__html:dp.sanitize(e,{ALLOWED_TAGS:["b","i","a","span","div","p","pre","u","br","img","code","li","ul","table","tbody","thead","tr","td","th","h1","h2","h3","h4"],ALLOWED_ATTR:["style","class","target","id","href","alt","src"]})}}var cp=Hi.h1`
|
|
381
381
|
${e=>E(e)} {
|
|
382
382
|
font-style: normal;
|
|
383
383
|
font-weight: 700;
|
|
@@ -398,38 +398,38 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
398
398
|
letter-spacing: 0.28px;
|
|
399
399
|
color: ${e=>e.appearance.theme.colorTextSecondary};
|
|
400
400
|
}
|
|
401
|
-
`;function Ie({appearance:e,title:t,subtitle:o,size:i="medium",classPrefix:n=""}){return
|
|
401
|
+
`;function Ie({appearance:e,title:t,subtitle:o,size:i="medium",classPrefix:n=""}){return Go.createElement(Go.Fragment,null,Go.createElement(cp,{appearance:e,className:a(`${n}${n?Co(i):i}Title`,e),dangerouslySetInnerHTML:ae(t),size:i}),o&&Go.createElement(mp,{appearance:e,className:a(`${n}${n?Co(i):i}Subtitle`,e),dangerouslySetInnerHTML:ae(o),size:i}))}import*as Er from"react";var Vi=e=>Er.createElement("svg",b({xmlns:"http://www.w3.org/2000/svg",width:12,height:12,"aria-hidden":"true",viewBox:"0 0 16 16"},e),Er.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.115 1.308 5.635 11.269A2.365 2.365 0 0 1 13.634 16H2.365A2.365 2.365 0 0 1 .25 12.577L5.884 1.308a2.365 2.365 0 0 1 4.231 0zM8 10.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zM8 9c.552 0 1-.32 1-.714V4.714C9 4.32 8.552 4 8 4s-1 .32-1 .714v3.572C7 8.68 7.448 9 8 9z"}));var fp=Ko.div`
|
|
402
402
|
display: flex;
|
|
403
403
|
flex-direction: column;
|
|
404
404
|
justify-content: flex-end;
|
|
405
405
|
overflow: visible;
|
|
406
406
|
padding-top: 14px;
|
|
407
|
-
`,gp=
|
|
407
|
+
`,gp=Ko.div`
|
|
408
408
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextError}};
|
|
409
409
|
font-size: 12px;
|
|
410
410
|
margin-bottom: 12px;
|
|
411
411
|
display: flex;
|
|
412
412
|
align-items: center;
|
|
413
|
-
`,hp=
|
|
413
|
+
`,hp=Ko.div`
|
|
414
414
|
margin-right: 4px;
|
|
415
415
|
display: inline-flex;
|
|
416
|
-
`,xp=
|
|
416
|
+
`,xp=Ko.div`
|
|
417
417
|
padding-left: 1px;
|
|
418
418
|
padding-right: 1px;
|
|
419
|
-
`,Cp={text:
|
|
419
|
+
`,Cp={text:Pr,multipleChoice:Di,multipleChoiceList:_i},Or="frigade-multiInputStepTypeData";function Gi({flowId:e,stepData:t,canContinue:o,setCanContinue:i,onSaveData:n,appearance:r,customFormElements:s,prefillData:p}){var v;let d=t.props,[l,m]=Ar([]),[c,f]=Ar([]),{userId:C}=ho(),[w,x]=Ar(k()||(p?p[t.id]:null)||{}),{readonly:g}=up(Y),A=b(b({},Cp),s);ji(()=>{i(l.length===0)},[l,i]),ji(()=>{n(w)},[w]);function T(u,L){x(S=>{let F=j(b({},S),{[u.id]:L});return typeof window!="undefined"&&window.localStorage&&!g&&window.localStorage.setItem(P(),JSON.stringify(F)),F})}function k(){if(typeof window!="undefined"&&window.localStorage){let u=window.localStorage.getItem(P());if(u)return JSON.parse(u)}return null}function P(){return`${Or}-${e}-${t.id}-${C}`}return Bt.createElement(xp,{className:a("multiInput",r)},Bt.createElement(Ie,{appearance:r,title:t.title,subtitle:t.subtitle}),Bt.createElement(fp,{className:a("multiInputContainer",r)},(v=d==null?void 0:d.data)==null?void 0:v.map(u=>{let L=l.reverse().find(S=>S.id===u.id);return A[u.type]?Bt.createElement("span",{key:u.id,"data-field-id":u.id,className:a("multiInputField",r)},A[u.type]({formInput:u,customFormTypeProps:{flowId:e,stepData:t,canContinue:o,setCanContinue:i,onSaveData:n,appearance:r},onSaveInputData:S=>{!c.includes(u.id)&&S&&(S==null?void 0:S.text)!==""&&f(F=>[...F,u.id]),T(u,S)},inputData:w[u.id],setFormValidationErrors:S=>{S.length===0&&l.length===0||m(F=>S.length===0?F.filter(M=>M.id!==u.id):[...F,...S])}}),L&&L.message&&c.includes(u.id)&&L.hidden!==!0&&Bt.createElement(gp,{key:u.id,style:{overflow:"hidden"},appearance:r,className:a("multiInputValidationError",r)},Bt.createElement(hp,{appearance:r,className:a("multiInputValidationErrorIcon",r)},Bt.createElement(Vi,null)),L.message)):null})))}import Yt from"styled-components";var Ki=Yt.div`
|
|
420
420
|
align-items: center;
|
|
421
421
|
display: flex;
|
|
422
422
|
justify-content: ${e=>e.showBackButton?"space-between":"flex-end"};
|
|
423
423
|
padding-top: 14px;
|
|
424
|
-
`,qi=
|
|
424
|
+
`,qi=Yt.div`
|
|
425
425
|
color: ${e=>e.appearance.theme.colorTextError};
|
|
426
426
|
font-size: 12px;
|
|
427
|
-
`,Yi=
|
|
427
|
+
`,Yi=Yt.div`
|
|
428
428
|
display: flex;
|
|
429
429
|
gap: 12px;
|
|
430
430
|
width: 100%;
|
|
431
431
|
justify-content: flex-end;
|
|
432
|
-
`,Ji=
|
|
432
|
+
`,Ji=Yt.div`
|
|
433
433
|
display: flex;
|
|
434
434
|
// If type is set to large-modal, use padding 60px horizontal, 80px vertical
|
|
435
435
|
// Otherwise, use 4px padding
|
|
@@ -437,11 +437,11 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
437
437
|
flex-grow: 1;
|
|
438
438
|
flex-basis: 0;
|
|
439
439
|
position: relative;
|
|
440
|
-
`,Xi=
|
|
440
|
+
`,Xi=Yt.div`
|
|
441
441
|
padding: ${e=>e.type==="large-modal"?"50px":"0px"};
|
|
442
442
|
position: relative;
|
|
443
443
|
overflow-y: auto;
|
|
444
|
-
`,Qi=
|
|
444
|
+
`,Qi=Yt.div`
|
|
445
445
|
display: flex;
|
|
446
446
|
align-self: stretch;
|
|
447
447
|
flex-grow: 1;
|
|
@@ -453,7 +453,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
453
453
|
background-position: center;
|
|
454
454
|
border-top-right-radius: ${e=>e.appearance.theme.borderRadius}px;
|
|
455
455
|
border-bottom-right-radius: ${e=>e.appearance.theme.borderRadius}px;
|
|
456
|
-
`;import
|
|
456
|
+
`;import bt from"react";import Ri from"react";import en from"styled-components";import yp from"styled-components";var Zi=yp.div`
|
|
457
457
|
width: 24px;
|
|
458
458
|
height: 24px;
|
|
459
459
|
border: 3px solid rgba(255, 255, 255, 0.25);
|
|
@@ -504,7 +504,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
504
504
|
opacity: ${e=>e.loading=="true"?"1.0":"0.3"};
|
|
505
505
|
cursor: not-allowed;
|
|
506
506
|
}
|
|
507
|
-
`,
|
|
507
|
+
`,qo=en.div`
|
|
508
508
|
${e=>E(e)} {
|
|
509
509
|
display: flex;
|
|
510
510
|
flex-direction: row;
|
|
@@ -515,14 +515,14 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
515
515
|
margin-right: 8px;
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
`,
|
|
518
|
+
`,te=({onClick:e,title:t,style:o,disabled:i,type:n="inline",size:r="medium",secondary:s=!1,appearance:p,withMargin:d=!0,classPrefix:l="",loading:m=!1})=>{var f;function c(){let C=s?"buttonSecondary":"button";return l===""?C:`${l}${Co(C)}`}return Ri.createElement(Sp,{secondary:s,appearance:p,disabled:i||m,loading:(f=m==null?void 0:m.toString())!=null?f:"",onClick:e,styleOverrides:o,type:n,withMargin:d,size:r,className:a(c(),p)},m?Ri.createElement(Zi,{className:a("buttonLoader",p)}):t!=null?t:"Continue")};var tn=({step:e,canContinue:t,appearance:o,onPrimaryClick:i,onSecondaryClick:n,selectedStep:r,steps:s,onBack:p,allowBackNavigation:d,errorMessage:l,isSaving:m})=>{var C;let c=s.length>1&&r!=0&&d,f=e.primaryButtonTitle&&e.secondaryButtonTitle||c?"inline":"full-width";return bt.createElement(bt.Fragment,null,l!==null&&l!=null&&bt.createElement(qi,{appearance:o,className:a("formCTAError",o)},l),bt.createElement(Ki,{showBackButton:c,className:a("formCTAContainer",o)},c&&bt.createElement(te,{title:(C=e.backButtonTitle)!=null?C:"Back",onClick:p,secondary:!0,withMargin:!1,type:f,appearance:o,style:{width:"90px",maxWidth:"90px"},classPrefix:"back"}),bt.createElement(Yi,{className:a("ctaWrapper",o)},e.secondaryButtonTitle?bt.createElement(te,{title:e.secondaryButtonTitle,onClick:n,secondary:!0,withMargin:!1,type:f,appearance:o,disabled:m}):null," ",e.primaryButtonTitle?bt.createElement(te,{disabled:!t,withMargin:!1,title:e.primaryButtonTitle,onClick:i,type:f,appearance:o,loading:m}):null)))};import Nr from"react";import bp from"styled-components";var wp=bp.div`
|
|
519
519
|
text-align: center;
|
|
520
|
-
`,on=({stepCount:e=0,currentStep:t=0,className:o,appearance:i})=>{let{theme:n}=
|
|
520
|
+
`,on=({stepCount:e=0,currentStep:t=0,className:o,appearance:i})=>{let{theme:n}=ee().mergeAppearanceWithDefault(i);return Nr.createElement(wp,{className:o},Nr.createElement("svg",{width:16*e-8,height:8,viewBox:`0 0 ${16*e-8} 8`,fill:"none"},Array(e).fill(null).map((r,s)=>Nr.createElement("rect",{key:s,x:16*s,y:0,width:8,height:8,rx:4,fill:t===s?n.colorPrimary:"#E6E6E6"}))))};import Et from"react";import Jt from"styled-components";import{useContext as Tp}from"react";function pe(){let e=Tp(Y);function t(n){i(n.primaryButtonUri,n.primaryButtonUriTarget)}function o(n){i(n.secondaryButtonUri,n.secondaryButtonUriTarget)}function i(n,r){if(!n)return;let s=n.startsWith("http")?"_blank":"_self";r&&r!=="_blank"&&(s="_self"),e.navigate(n,s)}return{primaryCTAClickSideEffects:t,secondaryCTAClickSideEffects:o,handleUrl:i}}var Fp=Jt.div`
|
|
521
521
|
display: flex;
|
|
522
522
|
flex-wrap: wrap;
|
|
523
523
|
align-content: center;
|
|
524
524
|
justify-content: center;
|
|
525
|
-
`,kp=
|
|
525
|
+
`,kp=Jt.div`
|
|
526
526
|
align-content: center;
|
|
527
527
|
align-items: center;
|
|
528
528
|
display: flex;
|
|
@@ -536,10 +536,10 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
536
536
|
flex-basis: 255px;
|
|
537
537
|
flex-grow: 0;
|
|
538
538
|
flex-shrink: 0;
|
|
539
|
-
`,Pp=
|
|
539
|
+
`,Pp=Jt.img`
|
|
540
540
|
width: 78px;
|
|
541
541
|
height: auto;
|
|
542
|
-
`,vp=
|
|
542
|
+
`,vp=Jt.button`
|
|
543
543
|
font-style: normal;
|
|
544
544
|
font-weight: 600;
|
|
545
545
|
font-size: 13px;
|
|
@@ -552,11 +552,11 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
552
552
|
border-radius: 100px;
|
|
553
553
|
padding: 8px 12px;
|
|
554
554
|
margin-top: 16px;
|
|
555
|
-
`,Bp=
|
|
555
|
+
`,Bp=Jt.h1`
|
|
556
556
|
font-weight: 700;
|
|
557
557
|
font-size: 28px;
|
|
558
558
|
line-height: 34px;
|
|
559
|
-
`,Ep=
|
|
559
|
+
`,Ep=Jt.h2`
|
|
560
560
|
font-style: normal;
|
|
561
561
|
font-weight: 400;
|
|
562
562
|
font-size: 16px;
|
|
@@ -565,7 +565,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
565
565
|
margin-top: 12px;
|
|
566
566
|
margin-bottom: 16px;
|
|
567
567
|
max-width: 70%;
|
|
568
|
-
`;function rn({stepData:e,appearance:t}){var i,n;let{handleUrl:o}=
|
|
568
|
+
`;function rn({stepData:e,appearance:t}){var i,n;let{handleUrl:o}=pe();return Et.createElement("div",null,Et.createElement(Bp,null,e.title),Et.createElement(Ep,null,e.subtitle),Et.createElement(Fp,null,(n=(i=e.props)==null?void 0:i.links)==null?void 0:n.map(r=>Et.createElement(kp,{key:r.title},Et.createElement(Pp,{src:r.imageUri}),Et.createElement(vp,{style:{borderColor:t.theme.colorPrimary,color:t.theme.colorPrimary},onClick:()=>{var s;r.uri&&o(r.uri,(s=r.uriTarget)!=null?s:"_blank")}},r.title)))))}import Qt,{useEffect as Up}from"react";import Jo from"styled-components";import Ir from"react";var Yo=({style:e,className:t})=>Ir.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,style:e},Ir.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),Ir.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.91 11.672a.375.375 0 010 .656l-5.603 3.113a.375.375 0 01-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112z"}));import At,{useRef as Ap,useState as Op}from"react";import Xt from"styled-components";var Np=Xt.div`
|
|
569
569
|
display: flex;
|
|
570
570
|
align-items: center;
|
|
571
571
|
justify-content: flex-start;
|
|
@@ -573,7 +573,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
573
573
|
width: 100%;
|
|
574
574
|
height: 100%;
|
|
575
575
|
position: relative;
|
|
576
|
-
`,Ip=
|
|
576
|
+
`,Ip=Xt.div`
|
|
577
577
|
position: absolute;
|
|
578
578
|
display: flex;
|
|
579
579
|
align-items: center;
|
|
@@ -592,66 +592,66 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
592
592
|
box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.06);
|
|
593
593
|
border-radius: 50%;
|
|
594
594
|
}
|
|
595
|
-
`,Lp=
|
|
595
|
+
`,Lp=Xt.video`
|
|
596
596
|
width: 100%;
|
|
597
597
|
height: 100%;
|
|
598
598
|
border-radius: ${e=>e.appearance.theme.borderRadius}px;
|
|
599
|
-
`,$p=
|
|
599
|
+
`,$p=Xt.iframe`
|
|
600
600
|
width: 100%;
|
|
601
601
|
height: 100%;
|
|
602
602
|
min-height: 260px;
|
|
603
603
|
border-radius: ${e=>e.appearance.theme.borderRadius}px;
|
|
604
|
-
`,Mp=
|
|
604
|
+
`,Mp=Xt.iframe`
|
|
605
605
|
width: 100%;
|
|
606
606
|
height: 100%;
|
|
607
607
|
min-height: 400px;
|
|
608
608
|
border-radius: ${e=>e.appearance.theme.borderRadius}px;
|
|
609
|
-
}`,Dp=
|
|
609
|
+
}`,Dp=Xt.iframe`
|
|
610
610
|
width: 100%;
|
|
611
611
|
height: 100%;
|
|
612
612
|
min-height: 400px;
|
|
613
613
|
border-radius: ${e=>e.appearance.theme.borderRadius}px;
|
|
614
|
-
`;function
|
|
614
|
+
`;function et({appearance:e,videoUri:t}){let o=Ap(),[i,n]=Op(!1);if(t.includes("youtube")){let r=t.split("v=")[1],s=r.indexOf("&");return s!==-1&&(r=r.substring(0,s)),At.createElement($p,{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${r}`,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,appearance:e,className:a("youtubePlayer",e)})}if(t.includes("vimeo")){let r=t.split("vimeo.com/")[1],s=r.indexOf("&");return s!==-1&&(r=r.substring(0,s)),At.createElement(Mp,{width:"100%",height:"100%",src:`https://player.vimeo.com/video/${r}`,frameBorder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0,appearance:e,className:a("vimeoPlayer",e)})}if(t.includes("wistia")){let r=t.split("wistia.com/medias/")[1],s=r.indexOf("&");return s!==-1&&(r=r.substring(0,s)),At.createElement(Dp,{width:"100%",height:"100%",src:`https://fast.wistia.net/embed/iframe/${r}`,frameBorder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0,appearance:e,className:a("wistiaPlayer",e)})}return At.createElement(Np,{className:a("videoPlayerWrapper",e),appearance:e},!i&&At.createElement(Ip,{onClick:()=>{n(!0),o.current.play()},appearance:e},At.createElement(Yo,null)),At.createElement(Lp,{appearance:e,controls:i,ref:o,play:i,src:t}))}var Wp=Jo.div`
|
|
615
615
|
${e=>E(e)} {
|
|
616
616
|
display: flex;
|
|
617
617
|
flex-direction: column;
|
|
618
618
|
justify-content: center;
|
|
619
619
|
}
|
|
620
|
-
`,zp=
|
|
620
|
+
`,zp=Jo.img`
|
|
621
621
|
${e=>E(e)} {
|
|
622
622
|
width: 100%;
|
|
623
623
|
height: auto;
|
|
624
624
|
max-height: 250px;
|
|
625
625
|
margin-bottom: 24px;
|
|
626
626
|
}
|
|
627
|
-
`,_p=
|
|
627
|
+
`,_p=Jo.div`
|
|
628
628
|
${e=>E(e)} {
|
|
629
629
|
margin-bottom: 24px;
|
|
630
630
|
}
|
|
631
|
-
`,Hp=
|
|
631
|
+
`,Hp=Jo.div`
|
|
632
632
|
${e=>E(e)} {
|
|
633
633
|
width: 100%;
|
|
634
634
|
height: auto;
|
|
635
635
|
max-height: 250px;
|
|
636
636
|
margin-bottom: 24px;
|
|
637
637
|
}
|
|
638
|
-
`;function nn({stepData:e,appearance:t,setCanContinue:o}){return Up(()=>{o(!0)},[]),
|
|
638
|
+
`;function nn({stepData:e,appearance:t,setCanContinue:o}){return Up(()=>{o(!0)},[]),Qt.createElement(Wp,{className:a("callToActionContainer",t)},Qt.createElement(_p,{className:a("callToActionTextContainer",t)},Qt.createElement(Ie,{appearance:t,title:e.title,subtitle:e.subtitle})),e.imageUri&&Qt.createElement(zp,{className:a("callToActionImage",t),src:e.imageUri}),!e.imageUri&&e.videoUri&&Qt.createElement(Hp,{appearance:t,className:a("callToActionVideo",t)},Qt.createElement(et,{appearance:t,videoUri:e.videoUri})))}import dt,{useEffect as Lr,useState as $r}from"react";import wt from"styled-components";var sn=wt.div`
|
|
639
639
|
width: auto;
|
|
640
640
|
display: flex;
|
|
641
641
|
flex-direction: column;
|
|
642
642
|
justify-content: center;
|
|
643
643
|
align-items: center;
|
|
644
644
|
padding: 4px;
|
|
645
|
-
`,ln=
|
|
645
|
+
`,ln=wt.div`
|
|
646
646
|
width: 100%;
|
|
647
647
|
text-align: left;
|
|
648
|
-
`,an=
|
|
648
|
+
`,an=wt.h1`
|
|
649
649
|
font-style: normal;
|
|
650
650
|
font-weight: 700;
|
|
651
651
|
font-size: 32px;
|
|
652
652
|
line-height: 38px;
|
|
653
653
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
654
|
-
`,pn=
|
|
654
|
+
`,pn=wt.h1`
|
|
655
655
|
font-style: normal;
|
|
656
656
|
font-weight: 400;
|
|
657
657
|
font-size: 16px;
|
|
@@ -659,7 +659,7 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
659
659
|
margin-top: 16px;
|
|
660
660
|
margin-bottom: 16px;
|
|
661
661
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
|
|
662
|
-
`,dn=
|
|
662
|
+
`,dn=wt.div`
|
|
663
663
|
padding-top: 12px;
|
|
664
664
|
padding-bottom: 12px;
|
|
665
665
|
flex-direction: row;
|
|
@@ -670,17 +670,17 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
670
670
|
cursor: pointer;
|
|
671
671
|
border-bottom: ${e=>e.hideBottomBorder?"none":"1px solid #D8D8D8"};
|
|
672
672
|
width: 100%;
|
|
673
|
-
`,cn=
|
|
673
|
+
`,cn=wt.div`
|
|
674
674
|
padding-top: 10px;
|
|
675
675
|
padding-bottom: 10px;
|
|
676
676
|
flex-direction: row;
|
|
677
677
|
display: flex;
|
|
678
678
|
justify-content: flex-start;
|
|
679
|
-
`,mn=
|
|
679
|
+
`,mn=wt.img`
|
|
680
680
|
width: 42px;
|
|
681
681
|
height: 42px;
|
|
682
682
|
margin-right: 12px;
|
|
683
|
-
`,un=
|
|
683
|
+
`,un=wt.p`
|
|
684
684
|
font-style: normal;
|
|
685
685
|
font-weight: 500;
|
|
686
686
|
font-size: 17px;
|
|
@@ -688,8 +688,8 @@ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnProp
|
|
|
688
688
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
689
689
|
display: flex;
|
|
690
690
|
align-self: center;
|
|
691
|
-
`;var fn=({stepData:e,setCanContinue:t,onSaveData:o,appearance:i})=>{let n=e.props,[r,s]
|
|
692
|
-
${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map(([i,n])=>typeof n=="object"?`${i} { ${Object.entries(n).map(([s,p])=>`${No(s)}: ${p};`).join(" ")} }`:`${No(i)}: ${n};`).join(" ")} }`).join(" ")}`;function se({appearance:e}){if(!e||!e.styleOverrides)return yo.createElement(yo.Fragment,null);let t=Object.entries(e.styleOverrides).filter(([o,i])=>typeof i=="object");return t.length===0?yo.createElement(yo.Fragment,null):yo.createElement(Gp,{inlineStyles:t})}import{useEffect as Kp,useState as qp}from"react";function je(e,t=!0){let[o,i]=qp(!1),{markStepStarted:n,isLoading:r,getFlowStatus:s,getFlowSteps:p,getCurrentStepIndex:d,targetingLogicShouldHideFlow:l,getFlow:m}=J(),c=p(e);function f(){return U(this,null,function*(){!o&&!r&&s(e)===Ue&&l(m(e))===!1&&t&&(i(!0),yield n(e,c[d(e)].id))})}return Kp(()=>{f()},[r,e,t]),{}}var xn=({flowId:e,customStepTypes:t={},type:o="inline",visible:i,setVisible:n,customVariables:r,customFormElements:s,onComplete:p,appearance:d,hideOnFlowCompletion:l=!0,onStepCompletion:m,onButtonClick:c,dismissible:f=!0,endFlowOnDismiss:C=!1,modalPosition:w="center",repeatable:x=!1,onDismiss:g,showPagination:A=!1,allowBackNavigation:T=!1,validationHandler:k,showFrigadeBranding:P=!1,onFormDataChange:v,showFooter:u=!0,prefillData:L={},updateUrlOnPageChange:S=!1})=>{let{getFlow:F,getFlowSteps:M,isLoading:O,targetingLogicShouldHideFlow:I,getFlowStatus:V,getCurrentStepIndex:W,markFlowCompleted:q,markFlowNotStarted:X,markStepStarted:ce}=J(),H=W(e),{mergeAppearanceWithDefault:ae}=te(),[fe,Te]=Yp(null),{setOpenFlowState:ie,getOpenFlowState:Z,hasOpenModals:he}=Oe();je(e,i);let D=M(e);d=ae(d);let[Se,xe]=i!==void 0&&n!==void 0?[i,n]:[Z(e,!0),_=>ie(e,_)],Pe=typeof window!="undefined"?window.location.hash:null;if(hn(()=>{var _;if(D&&D.length>0&&T){let $=typeof window!="undefined"&&((_=window==null?void 0:window.location)!=null&&_.hash)?window.location.hash.replace("#",""):"";if(D&&(D==null?void 0:D.length)>0){let z=-1;if($){let R=$;z=D.findIndex(me=>me.id===R),fe===$&&(z=-1)}z!==-1&&(Te($),ce(e,D[z].id))}}},[Pe]),hn(()=>{!O&&D&&D.length&&typeof window!="undefined"&&T&&(Te(D[H].id),window.location.hash=D[H].id)},[O,H,D]),O)return null;let Ae=F(e);if(!Ae||I(Ae)||!D||i!==void 0&&i===!1||V(e)===ee&&l&&!x||(o=="modal"||o=="corner-modal")&&he(e))return null;let be=()=>{xe(!1),g&&g(),C===!0&&q(e)};if(w=="center"&&o==="modal"||o==="large-modal"){let _={padding:"24px"};return o==="large-modal"?(_.width="85%",_.height="90%",_.maxHeight="800px",_.minHeight="500px",_.padding="0"):_.width="400px",et.createElement(Qe,{appearance:d,onClose:be,visible:Se,style:_,dismissible:f,showFrigadeBranding:P},et.createElement(se,{appearance:d}),et.createElement(qo,{appearance:d,steps:D,selectedStep:H,customStepTypes:t,customVariables:r,onButtonClick:c,onStepCompletion:m,flowId:e,type:o,hideOnFlowCompletion:l,onComplete:p,setVisible:n,setShowModal:xe,onDismiss:g,showPagination:A,customFormElements:s,allowBackNavigation:T,validationHandler:k,onFormDataChange:v,showFooter:u,prefillData:L,updateUrlOnPageChange:S,repeatable:x}))}return o==="modal"&&w!=="center"?et.createElement(Do,{appearance:d,onClose:be,visible:Se,modalPosition:w},et.createElement(se,{appearance:d}),et.createElement(qo,{appearance:d,steps:D,selectedStep:H,customStepTypes:t,customVariables:r,onButtonClick:c,onStepCompletion:m,flowId:e,type:o,hideOnFlowCompletion:l,onComplete:p,setVisible:n,setShowModal:xe,onDismiss:g,showPagination:A,customFormElements:s,allowBackNavigation:T,validationHandler:k,onFormDataChange:v,showFooter:u,prefillData:L,updateUrlOnPageChange:S,repeatable:x})):et.createElement(et.Fragment,null,et.createElement(se,{appearance:d}),et.createElement(qo,{appearance:d,steps:D,selectedStep:H,customStepTypes:t,customVariables:r,onButtonClick:c,onStepCompletion:m,flowId:e,type:o,hideOnFlowCompletion:l,onComplete:p,setVisible:n,setShowModal:xe,onDismiss:g,showPagination:A,customFormElements:s,allowBackNavigation:T,validationHandler:k,onFormDataChange:v,showFooter:u,prefillData:L,updateUrlOnPageChange:S,repeatable:x}))},Cn=xn;import{useCallback as Ir,useContext as Jp,useEffect as Xp}from"react";function Lr(){let{organizationId:e,userId:t,setOrganizationId:o}=Jp(Y),{mutateUserFlowState:i}=We(),{config:n,apiUrl:r}=Xe(),s=Ht(),{verifySDKInitiated:p}=Vt();function d(f,C){return`frigade-user-group-registered-${f}-${C}`}Xp(()=>{if(t&&e){if(t.startsWith(jt))return;let f=d(t,e);localStorage.getItem(f)||(s(`${r}userGroups`,j(b({},n),{method:"POST",body:JSON.stringify({foreignUserId:t,foreignUserGroupId:e})})),localStorage.setItem(f,"true"))}},[t,e]);let l=Ir(f=>U(this,null,function*(){if(!p())return;if(!e||!t){console.error("Cannot add properties to organization: Organization ID and User ID must both be set.",{organizationIdInternal:e,userId:t});return}let C={foreignUserId:t,foreignUserGroupId:e,properties:f};yield s(`${r}userGroups`,j(b({},n),{method:"POST",body:JSON.stringify(C)})),i()}),[e,t,n,i]),m=Ir((f,C)=>U(this,null,function*(){if(!p())return;if(!e||!t){console.error("Cannot track event for organization: Organization ID and User ID must both be set.",{organizationIdInternal:e,userId:t});return}let x={foreignUserId:t,foreignUserGroupId:e,events:[{event:f,properties:C}]};yield s(`${r}userGroups`,j(b({},n),{method:"POST",body:JSON.stringify(x)})),i()}),[e,t,n,i]),c=Ir((f,C)=>U(this,null,function*(){if(p())if(C){let w=d(t,f);localStorage.setItem(w,"true"),o(f);let x={foreignUserId:t,foreignUserGroupId:f,properties:C};yield s(`${r}userGroups`,j(b({},n),{method:"POST",body:JSON.stringify(x)})),i()}else o(f)}),[t,n,i]);return{organizationId:e,setOrganizationId:o,setOrganizationIdWithProperties:c,addPropertiesToOrganization:l,trackEventForOrganization:m}}var yn="frigade-xFrigade_guestUserId",bo="frigade-xFrigade_userId",Sn=({})=>{let{setFlowResponses:e}=mo(),{userFlowStatesData:t,isLoadingUserFlowStateData:o,mutateUserFlowState:i}=We(),{userId:n,setUserId:r}=uo(),[s,p]=So(n),{getFlowStatus:d}=J(),{flows:l,userProperties:m,setIsNewGuestUser:c,flowResponses:f}=Qp(Y),[C,w]=So([]),[x,g]=So([]),{organizationId:A}=Lr(),[T,k]=So(A),[P,v]=So(!1);Qt(()=>{if(!o&&t)for(let F=0;F<t.length;F++){let M=t[F],O=l.find(I=>I.slug===(M==null?void 0:M.flowId));if(O&&M&&M.shouldTrigger===!0&&O.type=="FORM"&&O.triggerType==="AUTOMATIC"&&!x.includes(O.slug)){setTimeout(()=>{u(M.flowId)},500);break}}},[o,t]),Qt(()=>{f.length>0&&i()},[f]),Qt(()=>{P||(v(!0),i())},[o,v]);function u(F){let M=l.find(O=>O.slug===F);M&&M.triggerType==="AUTOMATIC"&&!x.includes(M.slug)&&(g([...x,M.slug]),w([M]))}function L(){if(!n){let F=localStorage.getItem(bo);if(F){r(F);return}let M=localStorage.getItem(yn);if(M){r(M);return}c(!0);let O=jt+Zp();try{localStorage.setItem(yn,O)}catch(I){console.log("Failed to save guest user id locally: Local storage unavailable",I)}r(I=>I||O)}}Qt(()=>{try{if(l){let F=[];l.forEach(M=>{if(M.data){let O=M.data.match(/"imageUri":"(.*?)"/g);O&&O.forEach(I=>{let V=I.replace('"imageUri":"',"").replace('"',"");if(F.includes(V))return;let W=new Image;W.src=V,F.push(V)})}})}}catch(F){}},[l]),Qt(()=>{if(n!==s&&(e([]),i()),p(n),n&&!n.startsWith(jt))try{localStorage.setItem(bo,n)}catch(F){console.log("Failed to save user id locally: Local storage available",F)}n===null&&setTimeout(()=>{n===null&&L()},50)},[n,l,m]),Qt(()=>{A!=T&&(k(A),e([]),i())},[A,T,k]);function S(){return At.createElement(At.Fragment,null,C.map(F=>d(F.slug)!==Ue?null:At.createElement("span",{key:F.slug},At.createElement(Cn,{flowId:F.slug,type:"modal",modalPosition:"center",endFlowOnDismiss:!0}))))}return At.createElement(At.Fragment,null,At.createElement(S,null))};import{ErrorBoundary as Fd}from"react-error-boundary";var bn={colorPrimary:"colors.primary.background",colorText:"colors.neutral.foreground",colorBackground:"colors.neutral.background",colorBackgroundSecondary:"colors.secondary.background",colorTextOnPrimaryBackground:"colors.primary.foreground",colorTextSecondary:"colors.secondary.foreground",colorTextDisabled:"colors.gray700",colorBorder:"colors.gray800",colorTextError:"colors.negative.foreground",borderRadius:"radii.lg"};function Rp(e){if(!e)return;let t={};return Object.entries(e).forEach(([o,i])=>{if(bn[o]){let n=bn[o].split("."),r=t;n.forEach((s,p)=>{r[s]||(r[s]=p===n.length-1?i:{}),r=r[s]})}}),t}function ed(e){if(!e)return;let t=Ce({},e),o={};return Object.keys(t).forEach(i=>{let n=`.fr-${i}`;o[n]=t[i]}),o}function wn(e){let{theme:t,styleOverrides:o}=e,i=Rp(t),n=ed(o);return{overrides:i,css:n}}import fd from"styled-components";import{compose as gd,variant as Fn}from"styled-system";import Tn from"react";import td,{ThemeProvider as od,useTheme as rd}from"styled-components";import{border as id,color as nd,compose as sd,get as ld,shadow as ad,space as pd,system as dd,typography as cd}from"styled-system";var md={width:{property:"width",scale:"sizes",transform:(e,t)=>ld(t,e,!(typeof e=="number"&&!isNaN(e))||e>1?e:e*100+"%")},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},ud=td("div")(({css:e})=>e,sd(id,nd,ad,pd,cd,dd(md))),wo=n=>{var r=n,{as:e,children:t,overrides:o}=r,i=Le(r,["as","children","overrides"]);let s=rd(),p={border:"none",boxSizing:"border-box",m:0,p:0},d=()=>Tn.createElement(ud,b(b({as:e},p),i),t);if(o!==void 0){let l=Ce(s,o);return Tn.createElement(od,{theme:l},d())}return d()};var To={Primary:{backgroundColor:"primary.background",color:"primary.foreground","&:hover":{backgroundColor:"blue400"}},Secondary:{backgroundColor:"white",border:"1px solid",borderColor:"gray800",color:"neutral.foreground","&:hover":{backgroundColor:"blue900"}},Link:{backgroundColor:"transparent",color:"primary.inverted"},Plain:{backgroundColor:"transparent",color:"neutral.foreground"}},hd={sm:{paddingX:4,paddingY:1},md:{paddingX:6,paddingY:2}},kn=fd(wo)(()=>({whiteSpace:"nowrap"}),gd(Fn({scale:"components.Button",variants:"components.Button"}),Fn({prop:"size",variants:hd})));import xd from"styled-components";import{variant as Cd,system as yd}from"styled-system";var Yo={Display1:{fontSize:"5xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"4xl"},Display2:{fontSize:"4xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"3xl"},H1:{fontSize:"3xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"2xl"},H2:{fontSize:"2xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"xl"},H3:{fontSize:"xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"lg"},H4:{fontSize:"lg",fontWeight:"bold",letterSpacing:"md",lineHeight:"md"},Body1:{fontSize:"md",fontWeight:"regular",letterSpacing:"md",lineHeight:"md"},Body2:{fontSize:"sm",fontWeight:"regular",letterSpacing:"md",lineHeight:"md"},Caption:{fontSize:"xs",fontWeight:"regular",letterSpacing:"md",lineHeight:"sm"}};var Pn=xd(wo)(Cd({scale:"components.Text",variants:"components.Text"}),yd({fontWeight:{property:"fontWeight",scale:"fontWeights"}}));var vn=4,Bn="px",Sd=20,bd=Object.fromEntries(Array.from(Array(Sd+1),(e,t)=>t===0?[.5,`${.5*vn}${Bn}`]:[t,`${t*vn}${Bn}`])),Zt={black:"#000000",gray100:"#14161A",gray200:"#181B20",gray300:"#1F2329",gray400:"#2E343D",gray500:"#4C5766",gray600:"#5A6472",gray700:"#C5CBD3",gray800:"#E2E5E9",gray900:"#F1F2F4",white:"#ffffff",blue400:"#015AC6",blue500:"#0171F8",blue800:"#DBECFF",blue900:"#F5F9FF",green400:"#009E37",green500:"#00D149",green800:"#DBFFE8",transparent:"#FFFFFF00",red500:"#c00000"},$r={colors:j(b({},Zt),{neutral:{foreground:Zt.gray300},primary:{background:Zt.blue500,foreground:Zt.white,inverted:Zt.blue500},negative:{foreground:Zt.red500}}),fonts:{default:"TT Interphases Pro, sans-serif"},fontSizes:{xs:"12px",sm:"14px",md:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},fontWeights:{regular:400,semibold:500,bold:700},letterSpacings:{md:"0.02em"},lineHeights:{xs:"18px",sm:"22px",md:"24px",lg:"26px",xl:"30px","2xl":"38px","3xl":"46px","4xl":"60px"},radii:{md:"8px",lg:"20px",round:"50%"},shadows:{md:"0px 4px 20px rgba(0, 0, 0, 0.06)"},space:bd,components:{Button:To,Text:Yo}};var En="https://api.frigade.com",Y=wd({publicApiKey:"",setUserId:()=>{},flows:[],setFlows:()=>{},failedFlowResponses:[],setFailedFlowResponses:()=>{},flowResponses:[],setFlowResponses:()=>{},userProperties:{},setUserProperties:()=>{},openFlowStates:{},setOpenFlowStates:()=>{},completedFlowsToKeepOpenDuringSession:[],setCompletedFlowsToKeepOpenDuringSession:()=>{},customVariables:{},setCustomVariables:()=>{},isNewGuestUser:!1,setIsNewGuestUser:()=>{},hasActiveFullPageFlow:!1,setHasActiveFullPageFlow:()=>{},organizationId:"",setOrganizationId:()=>{},navigate:()=>{},defaultAppearance:lt,shouldGracefullyDegrade:!1,setShouldGracefullyDegrade:()=>{},apiUrl:En,readonly:!1,debug:!1});function kd(){Object.keys(localStorage).forEach(e=>{e.startsWith("frigade-")&&localStorage.removeItem(e)})}var Pd=({publicApiKey:e,userId:t,organizationId:o,config:i,children:n})=>{var H,ae,fe,Te,ie;let[r,s]=Ge(t||null),[p,d]=Ge(o||null),[l,m]=Ge([]),[c,f]=Ge([]),[C,w]=Ge([]),[x,g]=Ge({}),[A,T]=Ge({}),[k,P]=Ge([]),[v,u]=Ge({}),[L,S]=Ge(!1),[F,M]=Ge(!1),[O,I]=Ge(!q(e)),V=(Z,he)=>{if(he==="_blank"){window.open(Z,"_blank");return}setTimeout(()=>{window.location.href=Z},50)},W={theme:b(b({},lt.theme),(ae=(H=i==null?void 0:i.defaultAppearance)==null?void 0:H.theme)!=null?ae:{}),styleOverrides:b(b({},lt.styleOverrides),(Te=(fe=i==null?void 0:i.defaultAppearance)==null?void 0:fe.styleOverrides)!=null?Te:{})};function q(Z){return!!(Z&&Z.length>10&&Z.substring(0,10)==="api_public")}Jo(()=>{t&&s(t)},[t]),Jo(()=>{r&&typeof window!="undefined"&&window.localStorage&&window.localStorage.getItem(bo)&&window.localStorage.getItem(bo)!==r&&kd()},[r]),Jo(()=>{o&&d(o)},[o]),Jo(()=>{if(q(e))I(!1);else{console.error("Frigade SDK failed to initialize. API key provided is either missing or valid."),I(!0);return}},[e,I]);let X={publicApiKey:e,userId:r,setUserId:s,setFlows:m,flows:l,failedFlowResponses:c,setFailedFlowResponses:f,flowResponses:C,setFlowResponses:w,userProperties:x,setUserProperties:g,openFlowStates:A,setOpenFlowStates:T,completedFlowsToKeepOpenDuringSession:k,setCompletedFlowsToKeepOpenDuringSession:P,customVariables:v,setCustomVariables:u,isNewGuestUser:L,setIsNewGuestUser:S,hasActiveFullPageFlow:F,setHasActiveFullPageFlow:M,organizationId:p,setOrganizationId:d,navigate:i&&i.navigate?i.navigate:V,defaultAppearance:W,shouldGracefullyDegrade:O,setShouldGracefullyDegrade:I,apiUrl:i&&i.apiUrl?i.apiUrl:En,readonly:i&&i.readonly?i.readonly:!1,debug:i&&i.debug?i.debug:!1};if(O)return Ot.createElement(Y.Provider,{value:X},n);let{overrides:ce}=wn(W);return Ot.createElement(Fd,{fallback:Ot.createElement(Ot.Fragment,null,n)},Ot.createElement(Y.Provider,{value:X},Ot.createElement(Td,{theme:Ce(W.theme,$r,ce!=null?ce:{},(ie=i==null?void 0:i.theme)!=null?ie:{})},n,Ot.createElement(Sn,null))))};import gc from"react";import ye,{useEffect as ir,useState as rl}from"react";import Ye,{useState as jd}from"react";import Lt from"styled-components";import Zo from"react";import Nt from"react";import On from"styled-components";var An=On.span`
|
|
691
|
+
`;var fn=({stepData:e,setCanContinue:t,onSaveData:o,appearance:i})=>{let n=e.props,[r,s]=$r([]),[p,d]=$r(!1),[l,m]=$r(e.id);return Lr(()=>{r.length==0&&!p&&(d(!0),o({choice:[]}))},[p]),Lr(()=>{l!==e.id&&(m(e.id),s([]))},[e]),Lr(()=>{o({choice:r}),r.length>=n.minChoices?t(!0):t(!1)},[r]),dt.createElement(sn,{className:a("selectListContainer",i)},dt.createElement(ln,null,dt.createElement(an,{className:a("selectListTitle",i)},e.title),dt.createElement(pn,{appearance:i,className:a("selectListSubtitle",i)},e.subtitle)),n.options.map((c,f)=>{let C=r.includes(c.id);return dt.createElement(dn,{key:`select-item-${f}`,onClick:()=>{if(r.includes(c.id)){s(r.filter(w=>w!==c.id));return}r.length<n.maxChoices?s([...r,c.id]):r.length==1&&n.maxChoices==1&&s([c.id])},hideBottomBorder:f===n.options.length-1,className:a("selectListSelectItem",i)},dt.createElement(cn,{className:a("selectListItemImage",i)},c.imageUri&&dt.createElement(mn,{src:c.imageUri,alt:`select-icon-${f}`}),dt.createElement(un,{appearance:i,className:a("selectListSelectItemText",i)},c.title)),dt.createElement(pt,{appearance:i,value:C,primaryColor:i.theme.colorPrimary}))}))};import ze,{useEffect as gn,useState as Xo}from"react";var Vp=({children:e,id:t,shouldWrap:o=!1})=>ze.createElement(ze.Fragment,null,o?ze.createElement("div",{key:t,style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:1,overflowY:"auto"}},e):e),Qo=({appearance:e,steps:t,selectedStep:o,customStepTypes:i,customVariables:n,onButtonClick:r,onStepCompletion:s,flowId:p,type:d,hideOnFlowCompletion:l,onComplete:m,setVisible:c,setShowModal:f,onDismiss:C,showPagination:w=!1,customFormElements:x,allowBackNavigation:g,validationHandler:A,onFormDataChange:T,showFooter:k,prefillData:P,updateUrlOnPageChange:v,repeatable:u})=>{var be;let S=b(b({},{linkCollection:rn,multiInput:Gi,callToAction:nn,selectList:fn}),i),{primaryCTAClickSideEffects:F,secondaryCTAClickSideEffects:M}=pe(),[O,I]=Xo(!1),[V,W]=Xo({}),[q,X]=Xo(!1),[de,H]=Xo(null),le=(be=t[o])!=null?be:null,{markStepCompleted:fe,markStepStarted:Te,isLoading:re,updateCustomVariables:Q,markFlowCompleted:he}=J();gn(()=>{Q(n)},[n,re]),gn(()=>{T&&T(V,D(),t[o],o)},[V]);function D(){var $;return{data:($=V[t[o].id])!=null?$:{},stepId:t[o].id,customVariables:n}}function Se(_,$,z){let Z=o+1<t.length?t[o+1]:null;return s&&s(_,z,Z,V,D()),r?r(_,o,$,Z):!0}function xe(_,$){W(z=>{let Z={};return Z[_.id]=$,b(b({},z),Z)})}function Pe(_){return _.selectedStep.imageUri?ze.createElement(Qi,{image:_.selectedStep.imageUri,appearance:e,className:a("formContainerSidebarImage",e)}):null}let Ae=k&&ze.createElement(tn,{step:t[o],canContinue:O&&!q,formType:d,selectedStep:o,appearance:e,onPrimaryClick:()=>U(void 0,null,function*(){if(X(!0),A){let z=yield A(t[o],o,t[o+1],V,D());if(z!==!0){H(typeof z=="string"?z:null),X(!1);return}else H(null)}let _=b({},D());yield fe(p,t[o].id,_),o+1<t.length&&!g&&(yield Te(p,t[o+1].id));let $=Se(t[o],"primary",o);if(o+1>=t.length&&(m&&m(),C&&C(),l&&$&&(c&&c(!1),f(!1)),yield he(p),u&&(yield Te(p,t[0].id),typeof window!="undefined"&&window.localStorage&&Object.keys(window.localStorage).forEach(Z=>{Z.startsWith(Or)&&window.localStorage.removeItem(Z)}))),F(t[o]),X(!1),typeof window!="undefined"&&!g&&v&&o+1<t.length){let z=new URL(window.location.href);z.searchParams.set("p",t[o+1].id),window.history.pushState({},"",z.toString())}}),onSecondaryClick:()=>{Se(t[o],"secondary",o),M(t[o])},onBack:()=>U(void 0,null,function*(){o-1>=0&&(X(!0),yield Te(p,t[o-1].id),X(!1))}),steps:t,allowBackNavigation:g,errorMessage:de,isSaving:q});return ze.createElement(ze.Fragment,null,ze.createElement(Ji,{className:a("formContainer",e)},ze.createElement(Vp,{id:o,shouldWrap:d==="large-modal"},ze.createElement(Xi,{key:le.id,type:d,className:a("formContent",e)},t.map(_=>{var z;let $=S[(z=_.type)!=null?z:"multiInput"];return le.id!==_.id?null:typeof $!="function"?$:ze.createElement($,{key:_.id,stepData:_,canContinue:O,setCanContinue:I,onSaveData:Z=>{xe(_,Z)},appearance:e,customFormElements:x,flowId:p,prefillData:P})}),w&&ze.createElement(on,{className:a("formPagination",e),appearance:e,stepCount:t.length,currentStep:o}),Ae)),d=="large-modal"&&ze.createElement(Pe,{selectedStep:t[o]})))};import wo from"react";import{createGlobalStyle as jp}from"styled-components";var Gp=jp`
|
|
692
|
+
${e=>e.inlineStyles.map(([t,o])=>`.${xo}${t}.${xo}${t} { ${Object.entries(o).map(([i,n])=>typeof n=="object"?`${i} { ${Object.entries(n).map(([s,p])=>`${Mo(s)}: ${p};`).join(" ")} }`:`${Mo(i)}: ${n};`).join(" ")} }`).join(" ")}`;function ne({appearance:e}){if(!e||!e.styleOverrides)return wo.createElement(wo.Fragment,null);let t=Object.entries(e.styleOverrides).filter(([o,i])=>typeof i=="object");return t.length===0?wo.createElement(wo.Fragment,null):wo.createElement(Gp,{inlineStyles:t})}import{useEffect as Kp,useState as qp}from"react";function Ge(e,t=!0){let[o,i]=qp(!1),{markStepStarted:n,isLoading:r,getFlowStatus:s,getFlowSteps:p,getCurrentStepIndex:d,targetingLogicShouldHideFlow:l,getFlow:m}=J(),c=p(e);function f(){return U(this,null,function*(){!o&&!r&&s(e)===Ue&&l(m(e))===!1&&t&&(i(!0),yield n(e,c[d(e)].id))})}return Kp(()=>{f()},[r,e,t]),{}}var xn=({flowId:e,customStepTypes:t={},type:o="inline",visible:i,setVisible:n,customVariables:r,customFormElements:s,onComplete:p,appearance:d,hideOnFlowCompletion:l=!0,onStepCompletion:m,onButtonClick:c,dismissible:f=!0,endFlowOnDismiss:C=!1,modalPosition:w="center",repeatable:x=!1,onDismiss:g,showPagination:A=!1,allowBackNavigation:T=!1,validationHandler:k,showFrigadeBranding:P=!1,onFormDataChange:v,showFooter:u=!0,prefillData:L={},updateUrlOnPageChange:S=!1})=>{let{getFlow:F,getFlowSteps:M,isLoading:O,targetingLogicShouldHideFlow:I,getFlowStatus:V,getCurrentStepIndex:W,markFlowCompleted:q,markFlowNotStarted:X,markStepStarted:de}=J(),H=W(e),{mergeAppearanceWithDefault:le}=ee(),[fe,Te]=Yp(null),{setOpenFlowState:re,getOpenFlowState:Q,hasOpenModals:he}=Oe();Ge(e,i);let D=M(e);d=le(d);let[Se,xe]=i!==void 0&&n!==void 0?[i,n]:[Q(e,!0),_=>re(e,_)],Pe=typeof window!="undefined"?window.location.hash:null;if(hn(()=>{var _;if(D&&D.length>0&&T){let $=typeof window!="undefined"&&((_=window==null?void 0:window.location)!=null&&_.hash)?window.location.hash.replace("#",""):"";if(D&&(D==null?void 0:D.length)>0){let z=-1;if($){let Z=$;z=D.findIndex(ce=>ce.id===Z),fe===$&&(z=-1)}z!==-1&&(Te($),de(e,D[z].id))}}},[Pe]),hn(()=>{!O&&D&&D.length&&typeof window!="undefined"&&T&&(Te(D[H].id),window.location.hash=D[H].id)},[O,H,D]),O)return null;let Ae=F(e);if(!Ae||I(Ae)||!D||i!==void 0&&i===!1||V(e)===R&&l&&!x||(o=="modal"||o=="corner-modal")&&he(e))return null;let be=()=>{xe(!1),g&&g(),C===!0&&q(e)};if(w=="center"&&o==="modal"||o==="large-modal"){let _={padding:"24px"};return o==="large-modal"?(_.width="85%",_.height="90%",_.maxHeight="800px",_.minHeight="500px",_.padding="0"):_.width="400px",tt.createElement(Ze,{appearance:d,onClose:be,visible:Se,style:_,dismissible:f,showFrigadeBranding:P},tt.createElement(ne,{appearance:d}),tt.createElement(Qo,{appearance:d,steps:D,selectedStep:H,customStepTypes:t,customVariables:r,onButtonClick:c,onStepCompletion:m,flowId:e,type:o,hideOnFlowCompletion:l,onComplete:p,setVisible:n,setShowModal:xe,onDismiss:g,showPagination:A,customFormElements:s,allowBackNavigation:T,validationHandler:k,onFormDataChange:v,showFooter:u,prefillData:L,updateUrlOnPageChange:S,repeatable:x}))}return o==="modal"&&w!=="center"?tt.createElement(_o,{appearance:d,onClose:be,visible:Se,modalPosition:w},tt.createElement(ne,{appearance:d}),tt.createElement(Qo,{appearance:d,steps:D,selectedStep:H,customStepTypes:t,customVariables:r,onButtonClick:c,onStepCompletion:m,flowId:e,type:o,hideOnFlowCompletion:l,onComplete:p,setVisible:n,setShowModal:xe,onDismiss:g,showPagination:A,customFormElements:s,allowBackNavigation:T,validationHandler:k,onFormDataChange:v,showFooter:u,prefillData:L,updateUrlOnPageChange:S,repeatable:x})):tt.createElement(tt.Fragment,null,tt.createElement(ne,{appearance:d}),tt.createElement(Qo,{appearance:d,steps:D,selectedStep:H,customStepTypes:t,customVariables:r,onButtonClick:c,onStepCompletion:m,flowId:e,type:o,hideOnFlowCompletion:l,onComplete:p,setVisible:n,setShowModal:xe,onDismiss:g,showPagination:A,customFormElements:s,allowBackNavigation:T,validationHandler:k,onFormDataChange:v,showFooter:u,prefillData:L,updateUrlOnPageChange:S,repeatable:x}))},Cn=xn;import{useCallback as Mr,useContext as Jp,useEffect as Xp}from"react";function Dr(){let{organizationId:e,userId:t,setOrganizationId:o}=Jp(Y),{mutateUserFlowState:i}=We(),{config:n,apiUrl:r}=Qe(),s=Vt(),{verifySDKInitiated:p}=jt();function d(f,C){return`frigade-user-group-registered-${f}-${C}`}Xp(()=>{if(t&&e){if(t.startsWith(Gt))return;let f=d(t,e);localStorage.getItem(f)||(s(`${r}userGroups`,j(b({},n),{method:"POST",body:JSON.stringify({foreignUserId:t,foreignUserGroupId:e})})),localStorage.setItem(f,"true"))}},[t,e]);let l=Mr(f=>U(this,null,function*(){if(!p())return;if(!e||!t){console.error("Cannot add properties to organization: Organization ID and User ID must both be set.",{organizationIdInternal:e,userId:t});return}let C={foreignUserId:t,foreignUserGroupId:e,properties:f};yield s(`${r}userGroups`,j(b({},n),{method:"POST",body:JSON.stringify(C)})),i()}),[e,t,n,i]),m=Mr((f,C)=>U(this,null,function*(){if(!p())return;if(!e||!t){console.error("Cannot track event for organization: Organization ID and User ID must both be set.",{organizationIdInternal:e,userId:t});return}let x={foreignUserId:t,foreignUserGroupId:e,events:[{event:f,properties:C}]};yield s(`${r}userGroups`,j(b({},n),{method:"POST",body:JSON.stringify(x)})),i()}),[e,t,n,i]),c=Mr((f,C)=>U(this,null,function*(){if(p())if(C){let w=d(t,f);localStorage.setItem(w,"true"),o(f);let x={foreignUserId:t,foreignUserGroupId:f,properties:C};yield s(`${r}userGroups`,j(b({},n),{method:"POST",body:JSON.stringify(x)})),i()}else o(f)}),[t,n,i]);return{organizationId:e,setOrganizationId:o,setOrganizationIdWithProperties:c,addPropertiesToOrganization:l,trackEventForOrganization:m}}var yn="frigade-xFrigade_guestUserId",Fo="frigade-xFrigade_userId",Sn=({})=>{let{setFlowResponses:e}=go(),{userFlowStatesData:t,isLoadingUserFlowStateData:o,mutateUserFlowState:i}=We(),{userId:n,setUserId:r}=ho(),[s,p]=To(n),{getFlowStatus:d}=J(),{flows:l,userProperties:m,setIsNewGuestUser:c,flowResponses:f}=Qp(Y),[C,w]=To([]),[x,g]=To([]),{organizationId:A}=Dr(),[T,k]=To(A),[P,v]=To(!1);Zt(()=>{if(!o&&t)for(let F=0;F<t.length;F++){let M=t[F],O=l.find(I=>I.slug===(M==null?void 0:M.flowId));if(O&&M&&M.shouldTrigger===!0&&O.type=="FORM"&&O.triggerType==="AUTOMATIC"&&!x.includes(O.slug)){setTimeout(()=>{u(M.flowId)},500);break}}},[o,t]),Zt(()=>{f.length>0&&i()},[f]),Zt(()=>{P||(v(!0),i())},[o,v]);function u(F){let M=l.find(O=>O.slug===F);M&&M.triggerType==="AUTOMATIC"&&!x.includes(M.slug)&&(g([...x,M.slug]),w([M]))}function L(){if(!n){let F=localStorage.getItem(Fo);if(F){r(F);return}let M=localStorage.getItem(yn);if(M){r(M);return}c(!0);let O=Gt+Zp();try{localStorage.setItem(yn,O)}catch(I){console.log("Failed to save guest user id locally: Local storage unavailable",I)}r(I=>I||O)}}Zt(()=>{try{if(l){let F=[];l.forEach(M=>{if(M.data){let O=M.data.match(/"imageUri":"(.*?)"/g);O&&O.forEach(I=>{let V=I.replace('"imageUri":"',"").replace('"',"");if(F.includes(V))return;let W=new Image;W.src=V,F.push(V)})}})}}catch(F){}},[l]),Zt(()=>{if(n!==s&&(e([]),i()),p(n),n&&!n.startsWith(Gt))try{localStorage.setItem(Fo,n)}catch(F){console.log("Failed to save user id locally: Local storage available",F)}n===null&&setTimeout(()=>{n===null&&L()},50)},[n,l,m]),Zt(()=>{A!=T&&(k(A),e([]),i())},[A,T,k]);function S(){return Ot.createElement(Ot.Fragment,null,C.map(F=>d(F.slug)!==Ue?null:Ot.createElement("span",{key:F.slug},Ot.createElement(Cn,{flowId:F.slug,type:"modal",modalPosition:"center",endFlowOnDismiss:!0}))))}return Ot.createElement(Ot.Fragment,null,Ot.createElement(S,null))};import{ErrorBoundary as Fd}from"react-error-boundary";var bn={colorPrimary:"colors.primary.background",colorText:"colors.neutral.foreground",colorBackground:"colors.neutral.background",colorBackgroundSecondary:"colors.secondary.background",colorTextOnPrimaryBackground:"colors.primary.foreground",colorTextSecondary:"colors.secondary.foreground",colorTextDisabled:"colors.gray700",colorBorder:"colors.gray800",colorTextError:"colors.negative.foreground",borderRadius:"radii.lg"};function Rp(e){if(!e)return;let t={};return Object.entries(e).forEach(([o,i])=>{if(bn[o]){let n=bn[o].split("."),r=t;n.forEach((s,p)=>{r[s]||(r[s]=p===n.length-1?i:{}),r=r[s]})}}),t}function ed(e){if(!e)return;let t=Ce({},e),o={};return Object.keys(t).forEach(i=>{let n=`.fr-${i}`;o[n]=t[i]}),o}function wn(e){let{theme:t,styleOverrides:o}=e,i=Rp(t),n=ed(o);return{overrides:i,css:n}}import fd from"styled-components";import{compose as gd,variant as Fn}from"styled-system";import Tn from"react";import td,{ThemeProvider as od,useTheme as rd}from"styled-components";import{border as id,color as nd,compose as sd,get as ld,shadow as ad,space as pd,system as dd,typography as cd}from"styled-system";var md={width:{property:"width",scale:"sizes",transform:(e,t)=>ld(t,e,!(typeof e=="number"&&!isNaN(e))||e>1?e:e*100+"%")},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},ud=td("div")(({css:e})=>e,sd(id,nd,ad,pd,cd,dd(md))),ko=n=>{var r=n,{as:e,children:t,overrides:o}=r,i=Le(r,["as","children","overrides"]);let s=rd(),p={border:"none",boxSizing:"border-box",m:0,p:0},d=()=>Tn.createElement(ud,b(b({as:e},p),i),t);if(o!==void 0){let l=Ce(s,o);return Tn.createElement(od,{theme:l},d())}return d()};var Po={Primary:{backgroundColor:"primary.background",color:"primary.foreground","&:hover":{backgroundColor:"blue400"}},Secondary:{backgroundColor:"white",border:"1px solid",borderColor:"gray800",color:"neutral.foreground","&:hover":{backgroundColor:"blue900"}},Link:{backgroundColor:"transparent",color:"primary.inverted"},Plain:{backgroundColor:"transparent",color:"neutral.foreground"}},hd={sm:{paddingX:4,paddingY:1},md:{paddingX:6,paddingY:2}},kn=fd(ko)(()=>({whiteSpace:"nowrap"}),gd(Fn({scale:"components.Button",variants:"components.Button"}),Fn({prop:"size",variants:hd})));import xd from"styled-components";import{variant as Cd,system as yd}from"styled-system";var Zo={Display1:{fontSize:"5xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"4xl"},Display2:{fontSize:"4xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"3xl"},H1:{fontSize:"3xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"2xl"},H2:{fontSize:"2xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"xl"},H3:{fontSize:"xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"lg"},H4:{fontSize:"lg",fontWeight:"bold",letterSpacing:"md",lineHeight:"md"},Body1:{fontSize:"md",fontWeight:"regular",letterSpacing:"md",lineHeight:"md"},Body2:{fontSize:"sm",fontWeight:"regular",letterSpacing:"md",lineHeight:"md"},Caption:{fontSize:"xs",fontWeight:"regular",letterSpacing:"md",lineHeight:"sm"}};var Pn=xd(ko)(Cd({scale:"components.Text",variants:"components.Text"}),yd({fontWeight:{property:"fontWeight",scale:"fontWeights"}}));var vn=4,Bn="px",Sd=20,bd=Object.fromEntries(Array.from(Array(Sd+1),(e,t)=>t===0?[.5,`${.5*vn}${Bn}`]:[t,`${t*vn}${Bn}`])),Rt={black:"#000000",gray100:"#14161A",gray200:"#181B20",gray300:"#1F2329",gray400:"#2E343D",gray500:"#4C5766",gray600:"#5A6472",gray700:"#C5CBD3",gray800:"#E2E5E9",gray900:"#F1F2F4",white:"#ffffff",blue400:"#015AC6",blue500:"#0171F8",blue800:"#DBECFF",blue900:"#F5F9FF",green400:"#009E37",green500:"#00D149",green800:"#DBFFE8",transparent:"#FFFFFF00",red500:"#c00000"},Ur={colors:j(b({},Rt),{neutral:{foreground:Rt.gray300},primary:{background:Rt.blue500,foreground:Rt.white,inverted:Rt.blue500},negative:{foreground:Rt.red500}}),fonts:{default:"TT Interphases Pro, sans-serif"},fontSizes:{xs:"12px",sm:"14px",md:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},fontWeights:{regular:400,semibold:500,bold:700},letterSpacings:{md:"0.02em"},lineHeights:{xs:"18px",sm:"22px",md:"24px",lg:"26px",xl:"30px","2xl":"38px","3xl":"46px","4xl":"60px"},radii:{md:"8px",lg:"20px",round:"50%"},shadows:{md:"0px 4px 20px rgba(0, 0, 0, 0.06)"},space:bd,components:{Button:Po,Text:Zo}};var En="https://api.frigade.com",Y=wd({publicApiKey:"",setUserId:()=>{},flows:[],setFlows:()=>{},failedFlowResponses:[],setFailedFlowResponses:()=>{},flowResponses:[],setFlowResponses:()=>{},userProperties:{},setUserProperties:()=>{},openFlowStates:{},setOpenFlowStates:()=>{},completedFlowsToKeepOpenDuringSession:[],setCompletedFlowsToKeepOpenDuringSession:()=>{},customVariables:{},setCustomVariables:()=>{},isNewGuestUser:!1,setIsNewGuestUser:()=>{},hasActiveFullPageFlow:!1,setHasActiveFullPageFlow:()=>{},organizationId:"",setOrganizationId:()=>{},navigate:()=>{},defaultAppearance:at,shouldGracefullyDegrade:!1,setShouldGracefullyDegrade:()=>{},apiUrl:En,readonly:!1,debug:!1});function kd(){Object.keys(localStorage).forEach(e=>{e.startsWith("frigade-")&&localStorage.removeItem(e)})}var Pd=({publicApiKey:e,userId:t,organizationId:o,config:i,children:n})=>{var H,le,fe,Te,re;let[r,s]=Ke(t||null),[p,d]=Ke(o||null),[l,m]=Ke([]),[c,f]=Ke([]),[C,w]=Ke([]),[x,g]=Ke({}),[A,T]=Ke({}),[k,P]=Ke([]),[v,u]=Ke({}),[L,S]=Ke(!1),[F,M]=Ke(!1),[O,I]=Ke(!q(e)),V=(Q,he)=>{if(he==="_blank"){window.open(Q,"_blank");return}setTimeout(()=>{window.location.href=Q},50)},W={theme:b(b({},at.theme),(le=(H=i==null?void 0:i.defaultAppearance)==null?void 0:H.theme)!=null?le:{}),styleOverrides:b(b({},at.styleOverrides),(Te=(fe=i==null?void 0:i.defaultAppearance)==null?void 0:fe.styleOverrides)!=null?Te:{})};function q(Q){return!!(Q&&Q.length>10&&Q.substring(0,10)==="api_public")}Ro(()=>{t&&s(t)},[t]),Ro(()=>{r&&typeof window!="undefined"&&window.localStorage&&window.localStorage.getItem(Fo)&&window.localStorage.getItem(Fo)!==r&&kd()},[r]),Ro(()=>{o&&d(o)},[o]),Ro(()=>{if(q(e))I(!1);else{console.error("Frigade SDK failed to initialize. API key provided is either missing or valid."),I(!0);return}},[e,I]);let X={publicApiKey:e,userId:r,setUserId:s,setFlows:m,flows:l,failedFlowResponses:c,setFailedFlowResponses:f,flowResponses:C,setFlowResponses:w,userProperties:x,setUserProperties:g,openFlowStates:A,setOpenFlowStates:T,completedFlowsToKeepOpenDuringSession:k,setCompletedFlowsToKeepOpenDuringSession:P,customVariables:v,setCustomVariables:u,isNewGuestUser:L,setIsNewGuestUser:S,hasActiveFullPageFlow:F,setHasActiveFullPageFlow:M,organizationId:p,setOrganizationId:d,navigate:i&&i.navigate?i.navigate:V,defaultAppearance:W,shouldGracefullyDegrade:O,setShouldGracefullyDegrade:I,apiUrl:i&&i.apiUrl?i.apiUrl:En,readonly:i&&i.readonly?i.readonly:!1,debug:i&&i.debug?i.debug:!1};if(O)return Nt.createElement(Y.Provider,{value:X},n);let{overrides:de}=wn(W);return Nt.createElement(Fd,{fallback:Nt.createElement(Nt.Fragment,null,n)},Nt.createElement(Y.Provider,{value:X},Nt.createElement(Td,{theme:Ce(W.theme,Ur,de!=null?de:{},(re=i==null?void 0:i.theme)!=null?re:{})},n,Nt.createElement(Sn,null))))};import gc from"react";import ye,{useEffect as ar,useState as rl}from"react";import Je,{useState as jd}from"react";import $t from"styled-components";import or from"react";import It from"react";import On from"styled-components";var An=On.span`
|
|
693
693
|
font-weight: 600;
|
|
694
694
|
font-size: 14px;
|
|
695
695
|
font-style: normal;
|
|
@@ -710,11 +710,11 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
710
710
|
padding-right: 8px;
|
|
711
711
|
width: 100%;
|
|
712
712
|
${e=>ve(e)}
|
|
713
|
-
`,
|
|
713
|
+
`,er=({label:e,value:t,labelStyle:o={},labelPosition:i="right",style:n,primaryColor:r="#000000",checkBoxType:s="round",appearance:p})=>It.createElement(It.Fragment,null,It.createElement(vd,{className:a("checklistStepsContainer",p),appearance:p,styleOverrides:b({},n)},i==="left"&&e&&It.createElement(An,{className:a("checklistStepLabel",p),styleOverrides:o,appearnace:p},e),It.createElement(pt,{appearance:p,value:t,type:s,primaryColor:r}),i==="right"&&e&&It.createElement(An,{className:a("checklistStepLabel",p),styleOverrides:o,appearance:p},e)),It.createElement(ne,{appearance:p}));import vo from"styled-components";var Nn=vo.div`
|
|
714
714
|
font-weight: 700;
|
|
715
715
|
font-size: 18px;
|
|
716
716
|
line-height: 22px;
|
|
717
|
-
`,In=
|
|
717
|
+
`,In=vo.p`
|
|
718
718
|
font-weight: 600;
|
|
719
719
|
font-size: 16px;
|
|
720
720
|
line-height: 24px;
|
|
@@ -722,7 +722,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
722
722
|
letter-spacing: 0.32px;
|
|
723
723
|
font-style: normal;
|
|
724
724
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
725
|
-
`,Ln=
|
|
725
|
+
`,Ln=vo.p`
|
|
726
726
|
font-weight: 400;
|
|
727
727
|
font-size: 14px;
|
|
728
728
|
font-style: normal;
|
|
@@ -731,26 +731,26 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
731
731
|
letter-spacing: 0.28px;
|
|
732
732
|
margin: 8px 0px 0px 0px;
|
|
733
733
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
|
|
734
|
-
`,
|
|
734
|
+
`,tr=vo.div`
|
|
735
735
|
width: 6px;
|
|
736
736
|
position: absolute;
|
|
737
737
|
left: 0;
|
|
738
738
|
height: 100%;
|
|
739
739
|
border-top-right-radius: 4px;
|
|
740
740
|
border-bottom-right-radius: 4px;
|
|
741
|
-
`,$n=
|
|
741
|
+
`,$n=vo.div`
|
|
742
742
|
flex-direction: row;
|
|
743
743
|
justify-content: flex-start;
|
|
744
744
|
border-bottom: 1px solid ${e=>e.theme.colorBorder};
|
|
745
745
|
padding-right: 16px;
|
|
746
|
-
`;var Mn=({data:e,index:t,isSelected:o,primaryColor:i,style:n,onClick:r,appearance:s})=>{var p,d,l,m,c;return
|
|
746
|
+
`;var Mn=({data:e,index:t,isSelected:o,primaryColor:i,style:n,onClick:r,appearance:s})=>{var p,d,l,m,c;return or.createElement("div",{style:{position:"relative",paddingLeft:"0px"},onClick:()=>{r()}},o&&or.createElement(tr,{className:a("checklistStepItemSelectedIndicator",s),layoutId:"checklis-step-selected",style:{backgroundColor:(d=(p=s==null?void 0:s.theme)==null?void 0:p.colorPrimary)!=null?d:i}}),or.createElement($n,{className:a("checklistStepItem",s),key:`hero-checklist-step-${t}`,appearance:s,role:"listitem"},or.createElement(er,{value:e.complete,labelPosition:"left",label:(l=e.stepName)!=null?l:e.title,style:n,primaryColor:(c=(m=s==null?void 0:s.theme)==null?void 0:m.colorPrimary)!=null?c:i,appearance:s})))};import Lt from"react";import Wr from"styled-components";import rr from"styled-components";var uC=rr.h1`
|
|
747
747
|
display: flex;
|
|
748
748
|
margin: 0;
|
|
749
749
|
font-size: 18px;
|
|
750
|
-
`,fC=
|
|
750
|
+
`,fC=rr.h2`
|
|
751
751
|
font-size: 15px;
|
|
752
752
|
color: #4d4d4d;
|
|
753
|
-
`,Dn=
|
|
753
|
+
`,Dn=rr.div`
|
|
754
754
|
position: absolute;
|
|
755
755
|
left: 0;
|
|
756
756
|
top: 0;
|
|
@@ -759,7 +759,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
759
759
|
border-radius: 20px;
|
|
760
760
|
background-color: ${e=>e.theme.colorPrimary};
|
|
761
761
|
transition: width 0.5s;
|
|
762
|
-
`,Un=
|
|
762
|
+
`,Un=rr.div`
|
|
763
763
|
position: relative;
|
|
764
764
|
left: 0;
|
|
765
765
|
top: 0;
|
|
@@ -769,7 +769,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
769
769
|
border-radius: 20px;
|
|
770
770
|
background-color: ${e=>e.theme.colorPrimary};
|
|
771
771
|
opacity: 0.12;
|
|
772
|
-
`;var Bd=
|
|
772
|
+
`;var Bd=Wr.div`
|
|
773
773
|
display: flex;
|
|
774
774
|
flex-direction: ${e=>e.textLocation=="top"?"column":"row"};
|
|
775
775
|
justify-content: flex-start;
|
|
@@ -777,25 +777,25 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
777
777
|
width: 100%;
|
|
778
778
|
|
|
779
779
|
${e=>ve(e)}
|
|
780
|
-
`,Ed=
|
|
780
|
+
`,Ed=Wr.div`
|
|
781
781
|
flex-grow: 1;
|
|
782
782
|
position: relative;
|
|
783
783
|
${e=>e.textLocation=="top"?"width: 100%;":""}
|
|
784
|
-
`,Ad=
|
|
784
|
+
`,Ad=Wr.span`
|
|
785
785
|
font-weight: 600;
|
|
786
786
|
font-size: 14px;
|
|
787
787
|
line-height: 18px;
|
|
788
788
|
padding-right: ${e=>e.padding};
|
|
789
789
|
margin-bottom: ${e=>e.textLocation=="top"?"8px":"0px"};
|
|
790
790
|
${e=>ve(e)}
|
|
791
|
-
`;var _e=({count:e,total:t,display:o="count",textLocation:i="left",style:n={},textStyle:r={},appearance:s})=>{var f;if(t===0)return
|
|
791
|
+
`;var _e=({count:e,total:t,display:o="count",textLocation:i="left",style:n={},textStyle:r={},appearance:s})=>{var f;if(t===0)return Lt.createElement(Lt.Fragment,null);Object.keys(r).length===0&&r.constructor===Object&&(r={color:(f=s==null?void 0:s.theme)==null?void 0:f.colorText});let p=e===0?"10px":`${e/t*100}%`,d=o==="compact"?"8px":"10px",l=Math.round(e/t*100),m=o==="compact"?"10px":"14px",c;return o==="count"||o==="compact"?c=`${e}/${t}`:o==="percent"&&(c=`${l}% complete`),i==="top"&&(m="0px"),Lt.createElement(Bd,{className:a("progressBarContainer",s),textLocation:i,styleOverrides:n},Lt.createElement(Ad,{className:a("progressBarStepText",s),styleOverrides:j(b({},r),{fontSize:o==="compact"?12:14,fontWeight:600}),appearance:s,padding:m,textLocation:i},c),Lt.createElement(Ed,{textLocation:i,className:a("progressBar",s)},Lt.createElement(Dn,{style:{zIndex:o=="compact"?1:5},fgWidth:p,barHeight:d,appearance:s,className:a("progressBarFill",s)}),Lt.createElement(Un,{className:a("progressBarBackground",s),barHeight:d,appearance:s})))};import Bo from"react";import Nd from"styled-components";import nr from"react";import ir from"react";var eo=({stepData:e,appearance:t})=>ir.createElement(ir.Fragment,null,ir.createElement(In,{appearance:t,className:a("checklistStepTitle",t),dangerouslySetInnerHTML:ae(e.title)}),ir.createElement(Ln,{appearance:t,className:a("checklistStepSubtitle",t),dangerouslySetInnerHTML:ae(e.subtitle)}));import zr from"react";var to=({stepData:e,appearance:t})=>{let o=()=>{e.handlePrimaryButtonClick&&e.handlePrimaryButtonClick()},i=()=>{e.handleSecondaryButtonClick&&e.handleSecondaryButtonClick()};return zr.createElement(qo,{className:a("ctaContainer",t)},zr.createElement(te,{appearance:t,title:e.primaryButtonTitle,onClick:o}),e.secondaryButtonTitle&&zr.createElement(te,{appearance:t,secondary:!0,title:e.secondaryButtonTitle,onClick:i,style:{width:"auto",marginRight:"12px"}}))};var oo=({stepData:e,appearance:t})=>nr.createElement(nr.Fragment,null,nr.createElement(eo,{stepData:e,appearance:t}),nr.createElement(to,{stepData:e,appearance:t}));import Od from"react";function Wn(e){return Od.createElement(et,{appearance:e.appearance,videoUri:e.videoUri})}var _r="default",Id=Nd.img`
|
|
792
792
|
border-radius: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.borderRadius}}px;
|
|
793
793
|
width: 100%;
|
|
794
794
|
height: auto;
|
|
795
795
|
min-height: 200px;
|
|
796
|
-
`,zn=({stepData:e,appearance:t})=>{if(e!=null&&e.StepContent){let o=e.StepContent;return
|
|
796
|
+
`,zn=({stepData:e,appearance:t})=>{if(e!=null&&e.StepContent){let o=e.StepContent;return Bo.createElement("div",null,o)}return Bo.createElement(Nn,{className:a("checklistStepContent",t)},e.imageUri?Bo.createElement(Id,{className:a("checklistStepImage",t),src:e.imageUri,style:e.imageStyle,appearance:t}):null,e.videoUri?Bo.createElement(Wn,{videoUri:e.videoUri,appearance:t}):null,Bo.createElement(oo,{stepData:e,appearance:t}))};import He,{useRef as Ld,useState as $d}from"react";import ro from"styled-components";var _n=ro.div`
|
|
797
797
|
display: block;
|
|
798
|
-
`,Md=
|
|
798
|
+
`,Md=ro.div`
|
|
799
799
|
display: flex;
|
|
800
800
|
flex-direction: row;
|
|
801
801
|
flex-wrap: wrap;
|
|
@@ -805,20 +805,20 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
805
805
|
align-content: center;
|
|
806
806
|
margin-top: 24px;
|
|
807
807
|
margin-bottom: 24px;
|
|
808
|
-
`,Dd=
|
|
808
|
+
`,Dd=ro.div`
|
|
809
809
|
display: flex;
|
|
810
810
|
align-items: center;
|
|
811
811
|
justify-content: flex-start;
|
|
812
812
|
flex-direction: column;
|
|
813
813
|
margin-right: 16px;
|
|
814
|
-
`,Ud=
|
|
814
|
+
`,Ud=ro.video`
|
|
815
815
|
width: 200px;
|
|
816
816
|
height: 120px;
|
|
817
|
-
`,Wd=
|
|
817
|
+
`,Wd=ro.div`
|
|
818
818
|
font-size: 14px;
|
|
819
819
|
line-height: 20px;
|
|
820
820
|
text-align: center;
|
|
821
|
-
`,zd=
|
|
821
|
+
`,zd=ro.div`
|
|
822
822
|
position: absolute;
|
|
823
823
|
width: 200px;
|
|
824
824
|
height: 120px;
|
|
@@ -838,9 +838,9 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
838
838
|
box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.06);
|
|
839
839
|
border-radius: 50%;
|
|
840
840
|
}
|
|
841
|
-
`,Hn="videoCarousel",Vn=({stepData:e,appearance:t})=>{var n;if(!((n=e.props)!=null&&n.videos))return He.createElement(_n,null,He.createElement(
|
|
841
|
+
`,Hn="videoCarousel",Vn=({stepData:e,appearance:t})=>{var n;if(!((n=e.props)!=null&&n.videos))return He.createElement(_n,null,He.createElement(oo,{stepData:e,appearance:t}));function o({video:r}){let s=Ld(),[p,d]=$d(!1);return He.createElement(Dd,null,!p&&He.createElement(zd,{onClick:()=>{d(!0),s.current.play()},appearance:t},He.createElement(Yo,null)),He.createElement(Ud,{controls:p,ref:s,play:p,src:r.uri}),He.createElement(Wd,null,r.title))}let i=e.props;return i.videos?He.createElement(_n,null,He.createElement(eo,{stepData:e,appearance:t}),He.createElement(Md,null,i.videos.map((r,s)=>He.createElement("span",{key:`${r.uri}-${s}`},He.createElement(o,{video:r})))),He.createElement(to,{stepData:e,appearance:t})):null};import ct from"react";import sr from"styled-components";var jn=sr.div`
|
|
842
842
|
display: block;
|
|
843
|
-
`,_d=
|
|
843
|
+
`,_d=sr.pre`
|
|
844
844
|
display: block;
|
|
845
845
|
background-color: #2a2a2a;
|
|
846
846
|
color: #f8f8f8;
|
|
@@ -856,14 +856,14 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
856
856
|
white-space: -o-pre-wrap; /* Opera 7 */
|
|
857
857
|
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
|
858
858
|
margin-bottom: 24px;
|
|
859
|
-
`,Hd=
|
|
859
|
+
`,Hd=sr.div`
|
|
860
860
|
font-size: 15px;
|
|
861
861
|
line-height: 20px;
|
|
862
862
|
margin-bottom: 12px;
|
|
863
863
|
margin-top: 12px;
|
|
864
|
-
`,Vd=
|
|
864
|
+
`,Vd=sr.div`
|
|
865
865
|
margin-top: 24px;
|
|
866
|
-
`,Gn="codeSnippet",Kn=({stepData:e,appearance:t})=>{var i;if(!((i=e.props)!=null&&i.codeSnippets))return
|
|
866
|
+
`,Gn="codeSnippet",Kn=({stepData:e,appearance:t})=>{var i;if(!((i=e.props)!=null&&i.codeSnippets))return ct.createElement(jn,null,ct.createElement(oo,{stepData:e,appearance:t}));let o=e.props;return o.codeSnippets?ct.createElement(jn,{className:a("codeSnippetContainer",t)},ct.createElement(eo,{stepData:e,appearance:t}),ct.createElement(Vd,null,o.codeSnippets.map((n,r)=>ct.createElement("div",{key:r},n.title?ct.createElement(Hd,{dangerouslySetInnerHTML:ae(n.title)}):null,n.code?ct.createElement(_d,null,n.code):null))),ct.createElement(to,{stepData:e,appearance:t})):null};var Gd=$t.div`
|
|
867
867
|
display: flex;
|
|
868
868
|
flex-direction: row;
|
|
869
869
|
overflow: hidden;
|
|
@@ -871,14 +871,14 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
871
871
|
background: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.colorBackground}};
|
|
872
872
|
border-radius: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.borderRadius}}px;
|
|
873
873
|
${e=>ve(e)}
|
|
874
|
-
`,Kd
|
|
874
|
+
`,Kd=$t.h1`
|
|
875
875
|
font-size: 18px;
|
|
876
876
|
font-style: normal;
|
|
877
877
|
font-weight: 700;
|
|
878
878
|
line-height: 24px;
|
|
879
879
|
letter-spacing: 0.36px;
|
|
880
880
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
881
|
-
`,qd
|
|
881
|
+
`,qd=$t.h2`
|
|
882
882
|
font-size: 14px;
|
|
883
883
|
font-style: normal;
|
|
884
884
|
font-weight: 400;
|
|
@@ -886,22 +886,22 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
886
886
|
letter-spacing: 0.28px;
|
|
887
887
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
|
|
888
888
|
margin: 10px 0px 0px 0px;
|
|
889
|
-
`,qn
|
|
889
|
+
`,qn=$t.div``,Yd=$t.div`
|
|
890
890
|
list-style: none;
|
|
891
891
|
padding: 0;
|
|
892
892
|
margin: 0;
|
|
893
893
|
cursor: pointer;
|
|
894
894
|
min-width: 300px;
|
|
895
|
-
`,Jd
|
|
895
|
+
`,Jd=$t.div`
|
|
896
896
|
width: 1px;
|
|
897
897
|
margin-right: 40px;
|
|
898
898
|
background: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
|
|
899
|
-
`,Xd
|
|
899
|
+
`,Xd=$t.div`
|
|
900
900
|
flex: 2;
|
|
901
901
|
padding: 40px 40px 40px 0px;
|
|
902
|
-
`,Qd=({title:e,subtitle:t,steps:o=[],style:i={},selectedStep:n,setSelectedStep:r,className:s="",customStepTypes:p=new Map,appearance:d,type:l})=>{let{mergeAppearanceWithDefault:m}=
|
|
902
|
+
`,Qd=({title:e,subtitle:t,steps:o=[],style:i={},selectedStep:n,setSelectedStep:r,className:s="",customStepTypes:p=new Map,appearance:d,type:l})=>{let{mergeAppearanceWithDefault:m}=ee();d=m(d);let c={[_r]:zn,[Hn]:Vn,[Gn]:Kn},f=b(b({},c),p),[C,w]=jd(0),x=n!=null?n:C,g=r!=null?r:w,A=o.filter(k=>k.complete===!0).length,T=()=>{var k;return!((k=o[x])!=null&&k.type)||!f[o[x].type]?f[_r]({stepData:o[x],appearance:d}):typeof f[o[x].type]!="function"?f[o[x].type]:f[o[x].type]({stepData:o[x],appearance:d})};return Je.createElement(Gd,{type:l,styleOverrides:i,className:s,appearance:d},Je.createElement(qn,{style:{flex:1}},Je.createElement(qn,{style:{padding:"28px 0px 28px 28px",borderBottom:"1px solid #E5E5E5"}},Je.createElement(Kd,{className:a("checklistTitle",d),appearance:d},e),Je.createElement(qd,{className:a("checklistSubtitle",d),appearance:d},t),Je.createElement(_e,{total:o.length,count:A,style:{marginTop:"24px",paddingRight:"40px"},appearance:d})),Je.createElement(Yd,{className:a("checklistStepsContainer",d)},o.map((k,P)=>Je.createElement(Mn,{data:k,index:P,key:P,listLength:o.length,isSelected:P===x,primaryColor:d.theme.colorPrimary,style:{justifyContent:"space-between"},onClick:()=>{g(P)},appearance:d})))),Je.createElement(Jd,{appearance:d,className:a("checklistDivider",d)}),Je.createElement(Xd,null,Je.createElement(T,null)))},Hr=Qd;import G,{useState as oc}from"react";import Yn from"react";import Zd from"styled-components";var Rd=Zd.svg`
|
|
903
903
|
transition: 'transform 0.35s ease-in-out';
|
|
904
|
-
`,
|
|
904
|
+
`,io=({style:e,className:t})=>Yn.createElement(Rd,{width:"7",height:"10",viewBox:"0 0 9 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e,className:t},Yn.createElement("path",{d:"M1 13L7.5 7L0.999999 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}));import we from"styled-components";var Vr={boxShadow:"0px 6px 25px rgba(0, 0, 0, 0.06)",padding:"32px",maxHeight:"700px",msOverflowStyle:"none",scrollbarWidth:"none",paddingBottom:"12px",minHeight:"610px"},Jn=we.div`
|
|
905
905
|
max-height: 350px;
|
|
906
906
|
padding-bottom: 40px;
|
|
907
907
|
`,Xn=we.div`
|
|
@@ -1037,7 +1037,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1037
1037
|
flex-direction: column;
|
|
1038
1038
|
justify-content: center;
|
|
1039
1039
|
display: flex;
|
|
1040
|
-
`;import
|
|
1040
|
+
`;import ut from"react";import mt from"styled-components";var fs=mt.div`
|
|
1041
1041
|
border: 1px solid #fafafa;
|
|
1042
1042
|
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
|
|
1043
1043
|
border-radius: 14px;
|
|
@@ -1045,13 +1045,13 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1045
1045
|
display: flex;
|
|
1046
1046
|
flex-direction: column;
|
|
1047
1047
|
overflow: hidden;
|
|
1048
|
-
`,gs=
|
|
1048
|
+
`,gs=mt.div`
|
|
1049
1049
|
display: flex;
|
|
1050
1050
|
flex-wrap: wrap;
|
|
1051
1051
|
justify-content: space-between;
|
|
1052
1052
|
overflow: hidden;
|
|
1053
1053
|
row-gap: 10px;
|
|
1054
|
-
`,hs=
|
|
1054
|
+
`,hs=mt.div`
|
|
1055
1055
|
${e=>E(e)} {
|
|
1056
1056
|
color: #595959;
|
|
1057
1057
|
}
|
|
@@ -1061,7 +1061,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1061
1061
|
line-height: 12px;
|
|
1062
1062
|
letter-spacing: 0.09em;
|
|
1063
1063
|
margin-bottom: 12px;
|
|
1064
|
-
`,xs=
|
|
1064
|
+
`,xs=mt.div`
|
|
1065
1065
|
${e=>E(e)} {
|
|
1066
1066
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
1067
1067
|
background: #ffffff;
|
|
@@ -1074,7 +1074,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1074
1074
|
|
|
1075
1075
|
max-width: 150px;
|
|
1076
1076
|
min-width: 200px;
|
|
1077
|
-
`,Cs=
|
|
1077
|
+
`,Cs=mt.div`
|
|
1078
1078
|
${e=>E(e)} {
|
|
1079
1079
|
background: radial-gradient(50% 50% at 50% 50%, #ffffff 0%, #f7f7f7 100%);
|
|
1080
1080
|
}
|
|
@@ -1086,13 +1086,13 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1086
1086
|
justify-content: center;
|
|
1087
1087
|
align-content: center;
|
|
1088
1088
|
align-items: center;
|
|
1089
|
-
`,ys=
|
|
1089
|
+
`,ys=mt.div`
|
|
1090
1090
|
font-weight: 600;
|
|
1091
1091
|
font-size: 20px;
|
|
1092
1092
|
line-height: 24px;
|
|
1093
1093
|
width: 20px;
|
|
1094
1094
|
height: 20px;
|
|
1095
|
-
`,Ss=
|
|
1095
|
+
`,Ss=mt.div`
|
|
1096
1096
|
${e=>E(e)} {
|
|
1097
1097
|
color: #434343;
|
|
1098
1098
|
}
|
|
@@ -1101,20 +1101,20 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1101
1101
|
line-height: 17px;
|
|
1102
1102
|
margin-top: 12px;
|
|
1103
1103
|
margin-bottom: 8px;
|
|
1104
|
-
`,bs=
|
|
1104
|
+
`,bs=mt.div`
|
|
1105
1105
|
${e=>E(e)} {
|
|
1106
1106
|
color: #8c8c8c;
|
|
1107
1107
|
}
|
|
1108
1108
|
font-weight: 400;
|
|
1109
1109
|
font-size: 12px;
|
|
1110
1110
|
line-height: 14px;
|
|
1111
|
-
`,ws=
|
|
1111
|
+
`,ws=mt.a`
|
|
1112
1112
|
color: ${e=>e.color};
|
|
1113
1113
|
font-size: 12px;
|
|
1114
1114
|
line-height: 14px;
|
|
1115
1115
|
font-weight: 400;
|
|
1116
1116
|
cursor: pointer;
|
|
1117
|
-
`;var tc=({steps:e,style:t,title:o,primaryColor:i,appearance:n,onButtonClick:r})=>{let{primaryCTAClickSideEffects:s}=
|
|
1117
|
+
`;var tc=({steps:e,style:t,title:o,primaryColor:i,appearance:n,onButtonClick:r})=>{let{primaryCTAClickSideEffects:s}=pe();return ut.createElement(fs,{style:t,className:a("guideContainer",n)},ut.createElement(hs,{className:a("guideTitle",n)},o),ut.createElement(gs,{className:a("guideItemContainer",n)},e.map((p,d)=>{var l;return ut.createElement(xs,{key:`guide-${(l=p.id)!=null?l:d}`,className:a("guideItem",n)},p.icon&&ut.createElement(Cs,{className:a("guideIcon",n)},ut.createElement(ys,null,p.icon)),ut.createElement(Ss,{className:a("guideItemTitle",n),dangerouslySetInnerHTML:ae(p.title)}),ut.createElement(bs,{className:a("guideItemSubtitle",n),dangerouslySetInnerHTML:ae(p.subtitle)}),ut.createElement(ws,{className:a("guideItemLink",n),color:i,onClick:()=>{p.primaryButtonUri&&s(p),r&&r(p)}},p.primaryButtonTitle))})))},Eo=tc;var rc=({steps:e,title:t,subtitle:o,stepsTitle:i,visible:n,onClose:r,selectedStep:s,setSelectedStep:p,customStepTypes:d,appearance:l,guideData:m,guideTitle:c,onGuideButtonClick:f})=>{let C=({stepData:u,handleSecondaryCTAClick:L,handleCTAClick:S})=>u?G.createElement(is,{className:a("checklistStepContainer",l),"data-testid":"checklistStepContainer"},G.createElement(ns,{appearance:l,className:a("checklistStepTitle",l),dangerouslySetInnerHTML:ae(u.title)}),G.createElement(ss,{appearance:l,className:a("checklistStepSubtitle",l),dangerouslySetInnerHTML:ae(u.subtitle)}),G.createElement(ls,{className:a("checklistCTAContainer",l)},u.secondaryButtonTitle&&G.createElement(te,{title:u.secondaryButtonTitle,onClick:L,appearance:l,secondary:!0}),G.createElement(te,{title:u.primaryButtonTitle,onClick:S,appearance:l}))):G.createElement(G.Fragment,null),x=b(b({},{default:u=>{var M;if((M=e[T])!=null&&M.StepContent){let O=e[T].StepContent;return G.createElement("div",null,O)}let L=e[T];return G.createElement(C,{stepData:u,handleCTAClick:()=>{L.handlePrimaryButtonClick&&L.handlePrimaryButtonClick()},handleSecondaryCTAClick:()=>{L.handleSecondaryButtonClick&&L.handleSecondaryButtonClick()}})}}),d),[g,A]=oc(0),T=s!=null?s:g,k=p!=null?p:A,P=()=>{var u;return e?!((u=e[T])!=null&&u.type)||!x[e[T].type]?x.default(e[T]):typeof x[e[T].type]!="function"?x[e[T].type]:x[e[T].type]({stepData:e[T],primaryColor:l.theme.colorPrimary}):G.createElement(G.Fragment,null)},v=e.filter(u=>u.complete).length;return n?(l.theme.modalContainer||(l.theme.borderRadius&&(Vr.borderRadius=l.theme.borderRadius+"px"),l.theme.modalContainer=Vr),G.createElement(Ze,{onClose:r,visible:n,appearance:l},G.createElement(ms,null,G.createElement(Xn,null,G.createElement(Qn,{appearance:l,className:a("checklistTitle",l)},t),G.createElement(Zn,{appearance:l,className:a("checklistSubtitle",l)},o)),G.createElement(Jn,null,e&&e.length>0&&G.createElement(Rn,{className:a("stepsContainer",l)},G.createElement(es,null,G.createElement("div",{style:{flex:3}},G.createElement(ts,{className:a("stepsTitle",l)},i)),G.createElement(cs,null,G.createElement(_e,{style:{width:"100%"},count:v,total:e.length,appearance:l}))),G.createElement(os,null,G.createElement(rs,{className:a("checklistStepListContainer",l),appearance:l},e.map((u,L)=>{var F;let S=T===L;return G.createElement(as,{selected:S,className:a(`checklistStepListItem${S?"Selected":""}`,l),key:`checklist-guide-step-${(F=u.id)!=null?F:L}`,disabled:u.blocked,onClick:()=>{u.blocked||k(L)},title:u.blocked?"Finish remaining steps to continue":void 0},S&&G.createElement(tr,{className:a("checklistStepItemSelectedIndicator",l),layoutId:"checklist-step-selected",style:{backgroundColor:l.theme.colorPrimary,borderRadius:0,height:"100%",top:"0%",width:"2px"}}),G.createElement(ps,{selected:S,className:a(`checklistStepListStepName${S?"Selected":""}`,l)},u.stepName),G.createElement(ds,null,G.createElement(pt,{value:u.complete,type:"round",primaryColor:l.theme.colorPrimary,progress:u.progress,appearance:l}),G.createElement(us,null,G.createElement(io,{style:{marginLeft:"10px"},color:l.theme.colorBackgroundSecondary}))))})),G.createElement(P,null))),m&&m.length>0&&G.createElement(Eo,{steps:m,title:c,primaryColor:l.theme.colorPrimary,style:{border:"none",boxShadow:"none"},appearance:l,onButtonClick:u=>(f&&f(u),!0)}))))):G.createElement(G.Fragment,null)},jr=rc;import Me,{useEffect as lr,useState as ic}from"react";import ke from"react";import ft from"styled-components";var Ts=ft.div`
|
|
1118
1118
|
background-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
|
|
1119
1119
|
border: 1px solid;
|
|
1120
1120
|
border-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
|
|
@@ -1126,19 +1126,19 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1126
1126
|
display: flex;
|
|
1127
1127
|
flex-direction: column;
|
|
1128
1128
|
transition: max-height 0.25s;
|
|
1129
|
-
`,Fs=
|
|
1129
|
+
`,Fs=ft.div`
|
|
1130
1130
|
display: flex;
|
|
1131
1131
|
margin-bottom: 20px;
|
|
1132
|
-
`,ks=
|
|
1132
|
+
`,ks=ft.img`
|
|
1133
1133
|
border-radius: 4px;
|
|
1134
1134
|
max-height: 260px;
|
|
1135
1135
|
min-height: 200px;
|
|
1136
|
-
`,Ps=
|
|
1136
|
+
`,Ps=ft.div`
|
|
1137
1137
|
display: flex;
|
|
1138
1138
|
flex-direction: row;
|
|
1139
1139
|
justify-content: space-between;
|
|
1140
1140
|
align-items: center;
|
|
1141
|
-
`,vs=
|
|
1141
|
+
`,vs=ft.p`
|
|
1142
1142
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
1143
1143
|
font-style: normal;
|
|
1144
1144
|
font-weight: 500;
|
|
@@ -1149,23 +1149,23 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1149
1149
|
:hover {
|
|
1150
1150
|
opacity: 0.8;
|
|
1151
1151
|
}
|
|
1152
|
-
`,Bs=
|
|
1152
|
+
`,Bs=ft.div`
|
|
1153
1153
|
cursor: pointer;
|
|
1154
1154
|
color: ${e=>e.appearance.theme.colorTextSecondary};
|
|
1155
1155
|
:hover {
|
|
1156
1156
|
opacity: 0.8;
|
|
1157
1157
|
}
|
|
1158
|
-
`,m0=
|
|
1158
|
+
`,m0=ft.div``,Es=ft.p`
|
|
1159
1159
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
1160
1160
|
font-weight: 400;
|
|
1161
1161
|
font-size: 14px;
|
|
1162
1162
|
line-height: 22px;
|
|
1163
|
-
`,As=
|
|
1163
|
+
`,As=ft.div`
|
|
1164
1164
|
display: flex;
|
|
1165
1165
|
flex-direction: row;
|
|
1166
1166
|
justify-content: flex-start;
|
|
1167
1167
|
align-items: center;
|
|
1168
|
-
`;var Os=({stepData:e,collapsed:t,onClick:o,onPrimaryButtonClick:i,onSecondaryButtonClick:n,appearance:r,customStepTypes:s})=>{var c,f;let p=t?{}:{transform:"rotate(90deg)"},d=t?{overflow:"hidden",maxHeight:"0px",transition:"max-height 0.35s ease-out"}:{overflow:"hidden",maxHeight:"1000px",transition:"max-height 0.7s ease-out"};function l(){var C;return ke.createElement(ke.Fragment,null,e.imageUri||e.videoUri?ke.createElement(Fs,{className:a("stepMediaContainer",r)},e.imageUri?ke.createElement(ks,{className:a("stepImage",r),src:e.imageUri,style:e.imageStyle}):null,e.videoUri?ke.createElement(
|
|
1168
|
+
`;var Os=({stepData:e,collapsed:t,onClick:o,onPrimaryButtonClick:i,onSecondaryButtonClick:n,appearance:r,customStepTypes:s})=>{var c,f;let p=t?{}:{transform:"rotate(90deg)"},d=t?{overflow:"hidden",maxHeight:"0px",transition:"max-height 0.35s ease-out"}:{overflow:"hidden",maxHeight:"1000px",transition:"max-height 0.7s ease-out"};function l(){var C;return ke.createElement(ke.Fragment,null,e.imageUri||e.videoUri?ke.createElement(Fs,{className:a("stepMediaContainer",r)},e.imageUri?ke.createElement(ks,{className:a("stepImage",r),src:e.imageUri,style:e.imageStyle}):null,e.videoUri?ke.createElement(et,{appearance:r,videoUri:e.videoUri}):null):null,ke.createElement(Es,{className:a("stepSubtitle",r),appearance:r,dangerouslySetInnerHTML:ae(e.subtitle)}),ke.createElement(qo,{className:a("checklistCTAContainer",r)},e.secondaryButtonTitle?ke.createElement(te,{secondary:!0,title:e.secondaryButtonTitle,onClick:()=>n(),appearance:r}):null,ke.createElement(te,{title:(C=e.primaryButtonTitle)!=null?C:"Continue",onClick:()=>i(),appearance:r})))}function m(){if(!s)return null;let C=s[e.type];return C?typeof C!="function"?C:C(e,r):null}return ke.createElement(Ts,{"data-testid":`step-${e.id}`,className:a("checklistStepContainer",r),appearance:r},ke.createElement(Ps,{className:a("stepHeader",r)},ke.createElement(As,null,ke.createElement(er,{value:e.complete,style:{width:"auto",borderTop:0},primaryColor:(c=r==null?void 0:r.theme)==null?void 0:c.colorPrimary,appearance:r}),ke.createElement(vs,{appearance:r,className:a("stepTitle",r),dangerouslySetInnerHTML:ae(e.title),onClick:()=>o()})),ke.createElement(Bs,{className:a("stepChevronContainer",r),onClick:()=>o(),appearance:r},ke.createElement(io,{style:j(b({},p),{transition:"transform 0.2s ease-in-out"})}))),ke.createElement("div",{key:e.id,style:b({},d)},(f=m())!=null?f:l()))};import no from"styled-components";var P0=no.div`
|
|
1169
1169
|
background: #ffffff;
|
|
1170
1170
|
box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.06);
|
|
1171
1171
|
border-radius: 6px;
|
|
@@ -1179,26 +1179,26 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1179
1179
|
|
|
1180
1180
|
max-width: 800px;
|
|
1181
1181
|
min-width: 350px;
|
|
1182
|
-
`,Ns=
|
|
1182
|
+
`,Ns=no.div`
|
|
1183
1183
|
display: flex;
|
|
1184
1184
|
flex-direction: column;
|
|
1185
|
-
`,Is=
|
|
1185
|
+
`,Is=no.h1`
|
|
1186
1186
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
1187
1187
|
font-style: normal;
|
|
1188
1188
|
font-weight: 700;
|
|
1189
1189
|
font-size: 20px;
|
|
1190
1190
|
line-height: 24px;
|
|
1191
1191
|
margin-bottom: 8px;
|
|
1192
|
-
`,Ls=
|
|
1192
|
+
`,Ls=no.h2`
|
|
1193
1193
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
|
|
1194
1194
|
font-weight: 400;
|
|
1195
1195
|
font-size: 14px;
|
|
1196
1196
|
line-height: 23px;
|
|
1197
1197
|
margin: 2px 0 0 0;
|
|
1198
|
-
`,$s=
|
|
1198
|
+
`,$s=no.div`
|
|
1199
1199
|
display: block;
|
|
1200
1200
|
width: 100%;
|
|
1201
|
-
`,Ms=
|
|
1201
|
+
`,Ms=no.div`
|
|
1202
1202
|
display: flex;
|
|
1203
1203
|
width: 100%;
|
|
1204
1204
|
flex-direction: column;
|
|
@@ -1206,7 +1206,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1206
1206
|
padding: 24px;
|
|
1207
1207
|
border-radius: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.borderRadius}}px;
|
|
1208
1208
|
background-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
|
|
1209
|
-
`;var nc=({title:e,subtitle:t,steps:o,onClose:i,visible:n,autoExpandFirstIncompleteStep:r=!0,autoCollapse:s=!0,autoExpandNextStep:p=!0,selectedStep:d,setSelectedStep:l,appearance:m,type:c,className:f,customStepTypes:C,style:w})=>{let x=o.filter(v=>v.complete).length,[g,A]=ic(Array(o.length).fill(!0));
|
|
1209
|
+
`;var nc=({title:e,subtitle:t,steps:o,onClose:i,visible:n,autoExpandFirstIncompleteStep:r=!0,autoCollapse:s=!0,autoExpandNextStep:p=!0,selectedStep:d,setSelectedStep:l,appearance:m,type:c,className:f,customStepTypes:C,style:w})=>{let x=o.filter(v=>v.complete).length,[g,A]=ic(Array(o.length).fill(!0));lr(()=>{let v=[...g];if(r){for(let u=0;u<o.length;u++)if(!o[u].complete){v[u]=!1;break}A(v)}},[]),lr(()=>{r&&T(d)},[d]),lr(()=>{p&&g[d]&&T(d)},[d]),lr(()=>{},[o]);let T=v=>{let u=[...g];if(s)for(let L=0;L<g.length;++L)L!=v&&u[v]&&(u[L]=!0);u[v]=!g[v],A(u)};if(!n&&c=="modal")return Me.createElement(Me.Fragment,null);let k=Me.createElement(Me.Fragment,null,Me.createElement(Ns,null,Me.createElement(Is,{appearance:m,className:a("checklistTitle",m),dangerouslySetInnerHTML:ae(e)}),Me.createElement(Ls,{appearance:m,className:a("checklistSubtitle",m),dangerouslySetInnerHTML:ae(t)})),Me.createElement(_e,{display:"percent",count:x,total:o.length,style:{margin:"14px 0px 8px 0px"},appearance:m})),P=Me.createElement($s,{className:Fe(a("checklistContainer",m),f)},o.map((v,u)=>{var S;let L=g[u];return Me.createElement(Os,{appearance:m,stepData:v,collapsed:L,key:`modal-checklist-${(S=v.id)!=null?S:u}`,onClick:()=>{d==u?T(u):l(u)},onPrimaryButtonClick:()=>{p&&u<o.length-1&&l(u+1),v.handlePrimaryButtonClick&&v.handlePrimaryButtonClick()},onSecondaryButtonClick:()=>{v.handleSecondaryButtonClick&&v.handleSecondaryButtonClick()},customStepTypes:C})}));return c==="inline"?Me.createElement(Ms,{appearance:m,className:Fe(a("checklistInlineContainer",m),f),style:w},k,P):Me.createElement(Me.Fragment,null,Me.createElement(Ze,{onClose:i,visible:n,appearance:m,style:{maxWidth:"600px"},headerContent:k},P))},Gr=nc;import ue,{useEffect as Kr,useRef as uc,useState as Mt}from"react";import{useEffect as sc,useState as lc}from"react";var Ds=()=>{let e={isSmall:"(max-width: 480px)",isMedium:"(min-width: 481px) AND (max-width: 1023px)",isLarge:"(min-width: 1025px)"},t=Object.fromEntries(Object.entries(e).map(([p])=>[p,!1])),[o,i]=lc(t),n=null,r=()=>{n!==null?clearTimeout(n):s(),n=setTimeout(()=>{s()},16)},s=()=>{let p=Object.fromEntries(Object.entries(e).map(([d,l])=>{if(!window)return[d,!1];let m=window.matchMedia(l);return m.addEventListener("change",r),[d,m.matches]}));i(p)};return sc(()=>{s()},[]),o};import so from"react";import ge,{css as Us,keyframes as Ws}from"styled-components";var zs=Us`
|
|
1210
1210
|
border: 1px solid ${({theme:e})=>e.colorBorder};
|
|
1211
1211
|
`,ac=Us`
|
|
1212
1212
|
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.06);
|
|
@@ -1330,7 +1330,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1330
1330
|
margin-bottom: 4px;
|
|
1331
1331
|
${e=>e.blocked||e.complete?"opacity: 0.4;":`
|
|
1332
1332
|
`}
|
|
1333
|
-
`,
|
|
1333
|
+
`,Tt=ge.p`
|
|
1334
1334
|
color: ${({theme:e})=>e.colorText};
|
|
1335
1335
|
font-weight: normal;
|
|
1336
1336
|
font-size: 14px;
|
|
@@ -1342,13 +1342,13 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1342
1342
|
font-size: 12px;
|
|
1343
1343
|
line-height: 16px;
|
|
1344
1344
|
margin: 0;
|
|
1345
|
-
`;
|
|
1345
|
+
`;Tt.Loud=ge(Tt)`
|
|
1346
1346
|
font-weight: 600;
|
|
1347
|
-
`;
|
|
1347
|
+
`;Tt.Quiet=ge(Tt)`
|
|
1348
1348
|
color: ${({theme:e})=>e.colorTextSecondary};
|
|
1349
1349
|
${e=>e.blocked||e.complete?"opacity: 0.4;":`
|
|
1350
1350
|
`}
|
|
1351
|
-
`;var el=({stepData:e,style:t={},appearance:o})=>{let{mergeAppearanceWithDefault:i}=
|
|
1351
|
+
`;var el=({stepData:e,style:t={},appearance:o})=>{let{mergeAppearanceWithDefault:i}=ee(),{primaryCTAClickSideEffects:n}=pe();o=i(o);let{imageUri:r=null,subtitle:s=null,title:p=null,complete:d=!1,blocked:l=!1}=e,m=e.primaryButtonTitle||e.secondaryButtonTitle,c=()=>{n(e)};return so.createElement(Ks,{className:a("carouselCard",o),onClick:l?null:c,style:t,blocked:l,complete:d},r&&so.createElement(qs,{className:a("carouselCardImage",o),src:r,alt:p,style:{opacity:d||l?.4:1}}),d&&so.createElement(Js,{className:a("carouselCompletedPill",o)},so.createElement(Rs,{style:{color:"#108E0B"}},"Complete")),p&&so.createElement(Zs,{blocked:l,complete:d,className:a("carouselCardTitle",o)},p),s&&so.createElement(Tt.Quiet,{blocked:l,complete:d,className:a("carouselCardSubtitle",o)},s))};var fc=()=>ue.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ue.createElement("path",{d:"M14 6L20 12",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),ue.createElement("path",{d:"M14 18L20 12",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),ue.createElement("path",{d:"M4 12H20",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})),tl=({side:e="left",show:t=!1,onClick:o=()=>{}})=>{let[i,n]=Mt(!1),[r,s]=Mt(!1);Kr(()=>{t===!0&&i===!1?n(!0):t===!1&&i===!0&&s(!0)},[t]);let p=()=>{n(!1),s(!1)},d=e=="left"?{top:0,bottom:0,left:-20,transform:"rotate(180deg)"}:{top:0,bottom:0,right:-20};return i?ue.createElement(Vs,{style:d,reversed:r,onAnimationEnd:r?p:null},ue.createElement(js,{onClick:()=>o(),style:{right:16,top:"calc(50% - 24px)"}},ue.createElement(fc,null))):null},ol=({flowId:e,appearance:t,customVariables:o,className:i})=>{let n=uc(null),[r,s]=Mt(!1),[p,d]=Mt(!1),[l,m]=Mt(null),[c,f]=Mt([]),[C,w]=Mt(0),{isSmall:x}=Ds(),g=x?1:3,{getFlowMetadata:A,getFlowSteps:T,getNumberOfStepsCompleted:k,updateCustomVariables:P,isLoading:v}=J();Kr(()=>{P(o)},[o,v]),Kr(()=>{if(v)return;let O=A(e),I=k(e),V=T(e);m(O),(O.data!==null||O.steps!==null)&&(f(V.sort((W,q)=>Number(W.complete)-Number(q.complete))),d(V.length>g),w(I))},[v]);let u=[];for(let O=0;O<c.length;O+=g)u.push(c.slice(O,O+g));let L=O=>{let I=O.target,V=I.scrollWidth-I.clientWidth,W=Math.ceil(I.scrollLeft);W>0&&r===!1&&s(!0),W===0&&r===!0&&s(!1),W<V&&p===!1&&d(!0),W===V&&p===!0&&d(!1)},S=(O=!0)=>{let I=O?1:-1;n.current!==null&&n.current.scrollBy({left:n.current.clientWidth*I,behavior:"smooth"})},F=null,M=O=>{F!==null?clearTimeout(F):L(O),F=setTimeout(()=>{L(O)},16)};return v?null:ue.createElement(Ys,{className:Fe(a("carouselContainer",t),i)},ue.createElement("div",{style:{display:"flex",justifyContent:x?"center":"space-between",marginBottom:20,flexWrap:x?"wrap":"nowrap",gap:x?16:20}},ue.createElement("div",null,ue.createElement(Xs,{className:a("carouselTitle",t)},l==null?void 0:l.title),ue.createElement(Tt.Quiet,{className:a("carouselSubtitle",t)},l==null?void 0:l.subtitle)),ue.createElement(Qs,{className:a("progressWrapper",t)},ue.createElement(_e,{count:C,total:c.length,appearance:t}))),ue.createElement("div",{style:{position:"relative"}},ue.createElement(tl,{show:r,onClick:()=>S(!1)}),ue.createElement(tl,{side:"right",show:p,onClick:S}),ue.createElement(_s,{ref:n,onScroll:M},u.map((O,I)=>ue.createElement(Hs,{key:I,style:{flex:`0 0 calc(100% - ${c.length>g?36:0}px)`}},O.map((V,W)=>ue.createElement(el,{key:W,stepData:V,style:{flex:c.length>g?`0 1 calc(100% / ${g} - 16px * 2 / ${g})`:1},appearance:t})))))),ue.createElement(ne,{appearance:t}))};var qr=P=>{var v=P,{flowId:e,title:t,subtitle:o,style:i,initialSelectedStep:n,className:r,type:s="inline",onDismiss:p,visible:d,customVariables:l,onStepCompletion:m,onButtonClick:c,appearance:f,hideOnFlowCompletion:C,setVisible:w,customStepTypes:x,checklistStyle:g="default",autoExpandFirstIncompleteStep:A,autoExpandNextStep:T}=v,k=Le(v,["flowId","title","subtitle","style","initialSelectedStep","className","type","onDismiss","visible","customVariables","onStepCompletion","onButtonClick","appearance","hideOnFlowCompletion","setVisible","customStepTypes","checklistStyle","autoExpandFirstIncompleteStep","autoExpandNextStep"]);let{getFlow:u,getFlowSteps:L,markStepCompleted:S,getStepStatus:F,getNumberOfStepsCompleted:M,isLoading:O,targetingLogicShouldHideFlow:I,updateCustomVariables:V,getFlowMetadata:W,isStepBlocked:q,getFlowStatus:X,hasActiveFullPageFlow:de,setHasActiveFullPageFlow:H,markStepStarted:le,getCurrentStepIndex:fe}=J(),{primaryCTAClickSideEffects:Te,secondaryCTAClickSideEffects:re}=pe(),{getOpenFlowState:Q,setOpenFlowState:he}=Oe(),[D,Se]=rl(n||0),[xe,Pe]=rl(!1),Ae=d===void 0?Q(e):d,be=s==="modal",{mergeAppearanceWithDefault:_}=ee();Ge(e,d);let $=L(e),z=fe(e);if(f=_(f),ar(()=>{V(l)},[l,O]),ar(()=>{d!==void 0&&(be&&d===!0?H(!0):be&&d===!1&&H(!1))},[d,w,de]),ar(()=>{!O&&$&&$[D]&&F(e,$[D].id)&&F(e,$[D].id)!==$e&&le(e,$[D].id)},[D]),ar(()=>{D!==z&&Se(z)},[z]),O)return null;let Z=u(e);if(!Z||I(Z)||!$||C===!0&&X(e)===R)return null;let ce=W(e);if(ce!=null&&ce.title&&(t=ce.title),ce!=null&&ce.subtitle&&(o=ce.subtitle),!xe&&n===void 0&&M(e)>0){let N=$.findIndex(ie=>ie.complete===!1);Se(N>-1?N:$.length-1),Pe(!0)}function it(){if(D+1>=$.length){be&&he(e,!1);return}q(e,$[D+1].id)||Se(D+1)}function nt(N,ie,je){let De=D+1<$.length?$[D+1]:null;c&&c(N,D,ie,De)===!0&&be&&Xe(),m&&m(N,je,De),!m&&!c&&(N.primaryButtonUri||N.secondaryButtonUri)&&be&&Xe()}function zt(){return $.map((N,ie)=>j(b({},N),{handleSecondaryButtonClick:()=>{it(),re(N),N.skippable===!0&&S(e,N.id,{skipped:!0}),nt(N,"secondary",ie)},handlePrimaryButtonClick:()=>{(!N.completionCriteria&&(N.autoMarkCompleted||N.autoMarkCompleted===void 0)||N.completionCriteria&&N.autoMarkCompleted===!0)&&(S(e,N.id),it()),nt(N,"primary",ie),Te(N),F(e,N.id)===$e&&it()}}))}function qe(){return ye.createElement(ne,{appearance:f})}let ht={steps:zt(),title:t,subtitle:o,primaryColor:f.theme.colorPrimary,appearance:f,customStepTypes:x,type:s,className:r,autoExpandFirstIncompleteStep:A,autoExpandNextStep:T};function Xe(){he(e,!1),p&&p(),w&&w(!1)}function _t(){return ye.createElement(ye.Fragment,null,ye.createElement(qe,null),ye.createElement(ol,{flowId:e,appearance:f,customVariables:l,className:r}))}function h(){return ye.createElement(ye.Fragment,null,ye.createElement(qe,null),ye.createElement(Gr,b({visible:Ae,onClose:()=>{Xe()},selectedStep:D,setSelectedStep:Se,autoExpandNextStep:!0,appearance:f},ht)))}function y(){var je;let N=k.guideFlowId,ie;return N&&u(N)&&(ie=L(N)),ye.createElement(ye.Fragment,null,ye.createElement(qe,null),ye.createElement(jr,b({visible:Ae,stepsTitle:ce.stepsTitle?ce.stepsTitle:"Your quick start guide",onClose:()=>{Xe()},selectedStep:D,setSelectedStep:Se,guideData:ie,guideTitle:(je=k.guideTitle)!=null?je:"Guide",appearance:f,title:t,subtitle:o,onGuideButtonClick:De=>{nt(De,"link",0)},customStepTypes:x},ht)))}function B(){let N=ye.createElement(Hr,b({flowId:e,style:i,selectedStep:D,setSelectedStep:Se,appearance:f,type:s},ht));return be?ye.createElement(Ze,{onClose:()=>{Xe()},visible:Ae,appearance:f,style:{paddingTop:"0px",padding:"12px",paddingLeft:0}},ye.createElement(qe,null),N):ye.createElement(ye.Fragment,null,ye.createElement(qe,null),N)}switch(g){case"condensed":return h();case"with-guide":return y();case"default":return B();case"carousel":return _t();default:return B()}};var hc=e=>gc.createElement(qr,b({type:"inline"},e));import kt,{useEffect as xc}from"react";import ot from"react";import pr from"styled-components";var il=pr.div`
|
|
1352
1352
|
border: 1px solid ${e=>e.appearance.theme.colorBorder};
|
|
1353
1353
|
border-radius: ${e=>e.appearance.theme.borderRadius}px;
|
|
1354
1354
|
padding: 10px 12px 10px 12px;
|
|
@@ -1360,27 +1360,27 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1360
1360
|
&:hover {
|
|
1361
1361
|
filter: brightness(.99);
|
|
1362
1362
|
}
|
|
1363
|
-
`,nl=
|
|
1363
|
+
`,nl=pr.div`
|
|
1364
1364
|
display: flex;
|
|
1365
1365
|
flex-direction: row;
|
|
1366
1366
|
justify-content: space-between;
|
|
1367
1367
|
align-items: center;
|
|
1368
1368
|
margin-bottom: ${e=>e.type==="condensed"?"0":"6px"};
|
|
1369
1369
|
flex-grow: 2;
|
|
1370
|
-
`,sl=
|
|
1370
|
+
`,sl=pr.div`
|
|
1371
1371
|
text-overflow: ellipsis;
|
|
1372
1372
|
font-weight: 600;
|
|
1373
1373
|
font-size: 14px;
|
|
1374
1374
|
line-height: 16px;
|
|
1375
1375
|
margin-right: ${e=>e.type==="condensed"?"8px":"0"};
|
|
1376
1376
|
text-align: ${e=>e.type==="condensed"?"left":"right"};
|
|
1377
|
-
`,ll=
|
|
1377
|
+
`,ll=pr.div`
|
|
1378
1378
|
width: 20px;
|
|
1379
1379
|
margin-right: 8px;
|
|
1380
1380
|
display: flex;
|
|
1381
1381
|
height: 100%;
|
|
1382
1382
|
align-items: center;
|
|
1383
|
-
`;var al=({title:e,count:t,total:o,onClick:i,style:n={},className:r,appearance:s,type:p="default"})=>
|
|
1383
|
+
`;var al=({title:e,count:t,total:o,onClick:i,style:n={},className:r,appearance:s,type:p="default"})=>ot.createElement(ot.Fragment,null,ot.createElement(ne,{appearance:s}),ot.createElement(il,{onClick:()=>i!==void 0&&i(),styleOverrides:b(b({},p=="condensed"?{display:"flex",justifyContent:"space-between"}:{}),n),className:Fe(r!=null?r:"",a("progressBadgeContainer",s)),appearance:s},p=="condensed"&&o&&o!==0&&ot.createElement(ll,{className:a("progressRingContainer",s)},ot.createElement(qt,{size:19,percentage:t/o,fillColor:s.theme.colorPrimary,bgColor:s.theme.colorBackgroundSecondary})),ot.createElement(nl,{type:p,className:a("badgeTitleContainer",s)},ot.createElement(sl,{type:p,appearance:s,className:a("badgeTitle",s)},e),i!==void 0&&ot.createElement(io,{className:a("badgeChevron",s),color:s.theme.colorPrimary})),p=="default"&&o&&o!==0&&ot.createElement(_e,{display:"compact",count:t,total:o,bgColor:s.theme.colorBackgroundSecondary,style:{width:"100%"},appearance:s,textStyle:{color:"#818898"}})));import Ft from"react";import Ao from"styled-components";var pl=Ao.div`
|
|
1384
1384
|
display: flex;
|
|
1385
1385
|
flex-direction: row;
|
|
1386
1386
|
width: 100%;
|
|
@@ -1390,25 +1390,25 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1390
1390
|
background-color: ${e=>e.appearance.theme.colorBackground};
|
|
1391
1391
|
border: 1px solid ${e=>e.appearance.theme.colorBorder};
|
|
1392
1392
|
border-radius: ${e=>e.appearance.theme.borderRadius}px;
|
|
1393
|
-
`,dl=
|
|
1393
|
+
`,dl=Ao.div`
|
|
1394
1394
|
${e=>E(e)} {
|
|
1395
1395
|
display: flex;
|
|
1396
1396
|
justify-content: center;
|
|
1397
1397
|
align-items: center;
|
|
1398
1398
|
margin-right: 16px;
|
|
1399
1399
|
}
|
|
1400
|
-
`,cl=
|
|
1400
|
+
`,cl=Ao.div`
|
|
1401
1401
|
display: flex;
|
|
1402
1402
|
flex-direction: column;
|
|
1403
1403
|
flex: 1;
|
|
1404
1404
|
margin-top: 0;
|
|
1405
|
-
`,ml=
|
|
1405
|
+
`,ml=Ao.div`
|
|
1406
1406
|
display: flex;
|
|
1407
1407
|
flex-direction: column;
|
|
1408
1408
|
justify-content: center;
|
|
1409
1409
|
margin-left: 16px;
|
|
1410
1410
|
min-width: 200px;
|
|
1411
|
-
`,KS=
|
|
1411
|
+
`,KS=Ao.div`
|
|
1412
1412
|
display: flex;
|
|
1413
1413
|
justify-content: center;
|
|
1414
1414
|
align-items: flex-end;
|
|
@@ -1417,7 +1417,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1417
1417
|
:hover {
|
|
1418
1418
|
opacity: 0.8;
|
|
1419
1419
|
}
|
|
1420
|
-
`;var ul=({title:e,subtitle:t,icon:o,appearance:i,count:n,total:r,className:s,style:p})=>
|
|
1420
|
+
`;var ul=({title:e,subtitle:t,icon:o,appearance:i,count:n,total:r,className:s,style:p})=>Ft.createElement(Ft.Fragment,null,Ft.createElement(pl,{appearance:i,className:Fe(a("fullWidthProgressBadgeContainer",i),s!=null?s:""),style:p},o&&Ft.createElement(dl,{className:a("fullWidthProgressBadgeIcon",i)},o),Ft.createElement(cl,null,Ft.createElement(Ie,{size:"small",appearance:i,title:e,subtitle:t})),Ft.createElement(ml,{className:a("fullWidthProgressBadgeProgressContainer",i)},Ft.createElement(_e,{count:n,total:r,display:"percent",textLocation:"top"}))));var Cc=({flowId:e,title:t,subtitle:o,icon:i,style:n,onClick:r,className:s,customVariables:p,hideOnFlowCompletion:d,appearance:l,type:m="default"})=>{let{getFlow:c,getFlowSteps:f,getFlowStatus:C,getNumberOfStepsCompleted:w,isLoading:x,targetingLogicShouldHideFlow:g,updateCustomVariables:A}=J(),{mergeAppearanceWithDefault:T}=ee();l=T(l);let{setOpenFlowState:k,getOpenFlowState:P}=Oe();if(xc(()=>{A(p)},[p,x]),x)return null;let v=c(e);if(!v||g(v)||d===!0&&C(e)===R)return null;let u=f(e),L=w(e);return m==="full-width"?kt.createElement(kt.Fragment,null,kt.createElement(ne,{appearance:l}),kt.createElement(ul,{title:t,subtitle:o,count:L,total:u.length,style:n,className:s,appearance:l,icon:i,onClick:()=>{}})):kt.createElement(kt.Fragment,null,kt.createElement(ne,{appearance:l}),kt.createElement(al,{count:L,total:u.length,title:t,style:n,onClick:()=>{k(e,!0),r&&r()},type:m,className:s,appearance:l}))};import yc from"react";var Sc=n=>{var r=n,{flowId:e,style:t,appearance:o}=r,i=Le(r,["flowId","style","appearance"]);let{getFlow:s,targetingLogicShouldHideFlow:p,getFlowSteps:d}=J(),{mergeAppearanceWithDefault:l}=ee();o=l(o);let m=s(e);if(!m||p(m))return null;let c=d(e);return yc.createElement(Eo,b({steps:c,style:t,appearance:o},i))};import Dt,{useContext as Ic,useEffect as Lc}from"react";import K,{useEffect as Oo,useLayoutEffect as hl,useRef as Pc,useState as lo}from"react";import No from"styled-components";import{useCallback as bc,useEffect as wc,useState as Tc}from"react";var Yr=(e,t,o,i={x:20,y:20},n)=>{let r=n=="fixed"?0:window.scrollY,s=n=="fixed"?0:window.scrollX;return t==="left"?{x:e.left-o+i.x+s,y:e.top-i.y+r}:t==="right"?{x:e.left+e.width+i.x+s,y:e.top-i.y+r}:{x:0,y:0}};function fl(e,t){let o="DOMRect"in globalThis?new DOMRect:{height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}},[i,n]=Tc(o),r=bc(()=>{e&&n(e.getBoundingClientRect())},[e]);return wc(()=>(r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)),[e,t]),i}import{useContext as Fc,useState as kc}from"react";function gl(){let{debug:e}=Fc(Y),[t,o]=kc([]);function i(r){e&&(t.find(s=>s===r)||(o([...t,r]),console.log(r)))}function n(r){e&&(t.find(s=>s===r)||(o([...t,r]),console.warn(r)))}return{logIfDebugMode:i,logErrorIfDebugMode:n}}var xl=300,Cl=100,vc=500,ao=12,Bc=No.div`
|
|
1421
1421
|
width: 100%;
|
|
1422
1422
|
height: 100%;
|
|
1423
1423
|
border-radius: 9999px;
|
|
@@ -1440,25 +1440,25 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1440
1440
|
opacity: 0;
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
|
-
`,Ec=
|
|
1444
|
-
width: ${
|
|
1445
|
-
height: ${
|
|
1443
|
+
`,Ec=No.div`
|
|
1444
|
+
width: ${ao}px;
|
|
1445
|
+
height: ${ao}px;
|
|
1446
1446
|
border-radius: 100px;
|
|
1447
1447
|
background-color: ${e=>e.primaryColor};
|
|
1448
1448
|
z-index: 20;
|
|
1449
1449
|
opacity: 1;
|
|
1450
|
-
`,Ac=
|
|
1450
|
+
`,Ac=No.div`
|
|
1451
1451
|
pointer-events: all;
|
|
1452
|
-
`,yl=
|
|
1452
|
+
`,yl=No.div`
|
|
1453
1453
|
display: flex;
|
|
1454
1454
|
align-content: center;
|
|
1455
1455
|
justify-content: center;
|
|
1456
1456
|
align-items: center;
|
|
1457
1457
|
z-index: ${e=>e.zIndex?e.zIndex:90};
|
|
1458
|
-
`,Oc=
|
|
1459
|
-
width: ${
|
|
1460
|
-
height: ${
|
|
1461
|
-
`,Nc=({steps:e=[],onDismiss:t,onComplete:o=()=>{},tooltipPosition:i="auto",showHighlight:n=!0,primaryColor:r="#000000",offset:s={x:0,y:0},visible:p=!0,containerStyle:d={},selectedStep:l=0,customStepTypes:m,appearance:c,dismissible:f=!1,showHighlightOnly:C,showStepCount:w=!0,completedStepsCount:x=0,showFrigadeBranding:g=!1,cssPosition:A="absolute",onViewTooltip:T})=>{var
|
|
1458
|
+
`,Oc=No(yl)`
|
|
1459
|
+
width: ${ao+12}px;
|
|
1460
|
+
height: ${ao+12}px;
|
|
1461
|
+
`,Nc=({steps:e=[],onDismiss:t,onComplete:o=()=>{},tooltipPosition:i="auto",showHighlight:n=!0,primaryColor:r="#000000",offset:s={x:0,y:0},visible:p=!0,containerStyle:d={},selectedStep:l=0,customStepTypes:m,appearance:c,dismissible:f=!1,showHighlightOnly:C,showStepCount:w=!0,completedStepsCount:x=0,showFrigadeBranding:g=!1,cssPosition:A="absolute",onViewTooltip:T})=>{var nt,zt,qe,ht,Xe,_t,h,y,B,N,ie,je,De,xt,me,co,mo,ri,ii;let{logErrorIfDebugMode:k}=gl(),[P,v]=lo(),[u,L]=lo(new Date),S=Pc(null),[F,M]=lo(document.querySelector(e[l].selector)),O=fl(F,u),[I,V]=lo(),[W,q]=lo(!C),X=(zt=(nt=e[l])==null?void 0:nt.props)!=null&&zt.position?e[l].props.position:A,de=(Xe=(ht=(qe=e[l])==null?void 0:qe.props)==null?void 0:ht.zIndex)!=null?Xe:90,H=(_t=P==null?void 0:P.width)!=null?_t:xl,le=(h=P==null?void 0:P.height)!=null?h:Cl,[fe,Te]=lo(new Date().getTime());s=(N=(B=(y=e[l])==null?void 0:y.props)==null?void 0:B.offset)!=null?N:s;let re=window.location.pathname.split("/").pop();hl(()=>{S.current&&v({width:S.current.clientWidth,height:S.current.clientHeight})},[l,u,X]),Oo(()=>{C||q(!0)},[l]),Oo(()=>{p&&W&&T(l)},[W]);let Q=()=>{let se=document.querySelector(e[l].selector);if(!se){V(void 0),M(null),k(`FrigadeTour: Could not find element with selector "${e[l].selector}" for step ${e[l].id}`);return}I&&I===JSON.stringify(se==null?void 0:se.getBoundingClientRect())||(M(se),L(new Date),se&&V(JSON.stringify(se.getBoundingClientRect())))};if(Oo(()=>{let se=new MutationObserver(Q);return se.observe(document.body,{subtree:!0,childList:!0}),()=>se.disconnect()},[Q]),Oo(()=>{let se=new MutationObserver(Q);return se.observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["style","class"]}),()=>se.disconnect()},[Q]),Oo(()=>{let se=setInterval(()=>{Q()},10);return()=>clearInterval(se)},[Q]),hl(()=>{setTimeout(()=>{Q()},vc),Q()},[l,re]),F===null||!p)return null;let he=i==="auto"?"right":i,D=Yr(O,he,H,s,X),Se=O.right+H>(window.innerWidth||document.documentElement.clientWidth),xe=O.bottom+Cl>(window.innerHeight||document.documentElement.clientHeight);Se&&i==="auto"&&(D=Yr(O,"left",H,s,X),he="left"),(je=(ie=e[l])==null?void 0:ie.props)!=null&&je.tooltipPosition&&((xt=(De=e[l])==null?void 0:De.props)==null?void 0:xt.tooltipPosition)!=="auto"&&(((co=(me=e[l])==null?void 0:me.props)==null?void 0:co.tooltipPosition)==="left"||((ri=(mo=e[l])==null?void 0:mo.props)==null?void 0:ri.tooltipPosition)==="right")&&(he=e[l].props.tooltipPosition);let Pe=()=>{let se=()=>{if(e[l].handlePrimaryButtonClick&&(e[l].handlePrimaryButtonClick(),q(!1),setTimeout(()=>{Q()},30)),x===e.length-1)return o()},Ct=()=>{e[l].handleSecondaryButtonClick&&(e[l].handleSecondaryButtonClick(),C&&!e[l].secondaryButtonUri&&q(!1))};return K.createElement(K.Fragment,null,w&&e.length>1&&K.createElement(bi,null,K.createElement(Ti,{className:a("tooltipStepCounter",c)},l+1," of ",e.length)),(e[l].primaryButtonTitle||e[l].secondaryButtonTitle)&&K.createElement(wi,{showStepCount:w,className:a("tooltipCTAContainer",c)},e[l].secondaryButtonTitle&&K.createElement(te,{title:e[l].secondaryButtonTitle,appearance:c,onClick:Ct,size:"small",withMargin:!1,secondary:!0}),e[l].primaryButtonTitle&&K.createElement(te,{title:e[l].primaryButtonTitle,appearance:c,onClick:se,withMargin:!1,size:"small"})))},Ae=()=>K.createElement(K.Fragment,null,f&&K.createElement(hi,{"data-testid":"tooltip-dismiss",onClick:()=>{t&&t()},className:a("tooltipClose",c),hasImage:!!e[l].imageUri||!!e[l].videoUri},K.createElement(Ne,null)),e[l].imageUri&&K.createElement(xi,{dismissible:f,appearance:c,src:e[l].imageUri,className:a("tooltipImageContainer",c)}),e[l].videoUri&&!e[l].imageUri&&K.createElement(Ci,{dismissible:f,appearance:c,className:a("tooltipVideoContainer",c)},K.createElement(et,{appearance:c,videoUri:e[l].videoUri})),K.createElement(Si,{className:a("tooltipContentContainer",c)},K.createElement(Ie,{appearance:c,title:e[l].title,subtitle:e[l].subtitle,size:"small"}),K.createElement(yi,{className:a("tooltipFooter",c)},K.createElement(Pe,null)))),_=b(b({},{default:se=>{var Ct;if((Ct=e[l])!=null&&Ct.StepContent){let ra=e[l].StepContent;return K.createElement("div",null,ra)}return K.createElement(Ae,null)}}),m),$=()=>{var se;return e?!((se=e[l])!=null&&se.type)||!_[e[l].type]?_.default(e[l]):_[e[l].type]({stepData:e[l],primaryColor:r}):K.createElement(K.Fragment,null)};if(e[l].complete===!0||D.x==0&&D.y==0&&new Date().getTime()-fe<100)return null;let z={top:(D==null?void 0:D.y)-ao,left:(ii=he=="left"?O.x+s.x:(D==null?void 0:D.x)-ao)!=null?ii:0,cursor:C?"pointer":"default",position:X},Z=()=>{let Ct=z.left+(he=="left"?-H:24);return Math.min(Math.max(Ct,20),window.innerWidth-H-20)},ce=()=>{if(X==="fixed")return z.top;let se=z.top+le,Ct=20;return se>window.innerHeight-Ct?z.top+-le:z.top},it=()=>{C&&(L(new Date),q(!W))};return K.createElement(Ac,null,K.createElement(Oc,{style:z,zIndex:de,className:a("tourHighlightContainer",c)},n&&e[l].showHighlight!==!1&&A!=="static"&&K.createElement(K.Fragment,null,K.createElement(Ec,{style:{position:X},onClick:it,primaryColor:c.theme.colorPrimary,className:a("tourHighlightInnerCircle",c)}),K.createElement(Bc,{style:{position:"absolute"},onClick:it,primaryColor:c.theme.colorPrimary,className:a("tourHighlightOuterCircle",c)}))),K.createElement(yl,{style:j(b({},z),{left:Z(),top:ce()}),zIndex:de+1,className:a("tooltipContainerWrapper",c)},W&&K.createElement(K.Fragment,null,K.createElement(Do,{ref:S,layoutId:"tooltip-container",style:b({position:"relative",width:"max-content",right:0,top:A!=="static"?12:0},d),appearance:c,className:a("tooltipContainer",c),maxWidth:xl,zIndex:de+10},K.createElement($,null)),g&&K.createElement(ki,{className:a("poweredByFrigadeTooltipRibbon",c),appearance:c,zIndex:de+10},K.createElement(Uo,{appearance:c})))))},Jr=Nc;import{Portal as $c}from"react-portal";var Mc=x=>{var g=x,{flowId:e,customVariables:t,appearance:o,onStepCompletion:i,onButtonClick:n,showTooltipsSimultaneously:r=!1,onDismiss:s,dismissible:p,tooltipPosition:d="auto",showHighlightOnly:l=!1,dismissBehavior:m="complete-flow",onComplete:c,skipIfNotFound:f=!1,cssPosition:C="absolute"}=g,w=Le(g,["flowId","customVariables","appearance","onStepCompletion","onButtonClick","showTooltipsSimultaneously","onDismiss","dismissible","tooltipPosition","showHighlightOnly","dismissBehavior","onComplete","skipIfNotFound","cssPosition"]);let{getFlow:A,getFlowSteps:T,isLoading:k,targetingLogicShouldHideFlow:P,markStepCompleted:v,markStepStarted:u,markFlowCompleted:L,updateCustomVariables:S,getCurrentStepIndex:F,getStepStatus:M,isStepBlocked:O,getFlowStatus:I,getNumberOfStepsCompleted:V}=J(),{isLoadingUserFlowStateData:W}=We(),{primaryCTAClickSideEffects:q,secondaryCTAClickSideEffects:X}=pe(),{hasOpenModals:de}=Oe(),H=F(e),{openFlowStates:le}=Ic(Y),{mergeAppearanceWithDefault:fe}=ee();if(o=fe(o),Lc(()=>{S(t)},[t,k]),W)return null;let Te=A(e);if(!Te||P(Te)||I(e)==R||de())return null;let re=T(e);if(Object.keys(le).length>0){let $=Object.keys(le).find(z=>le[z]===!0);if($!==void 0&&$!==e)return Dt.createElement(Dt.Fragment,null)}function Q($){return U(this,null,function*(){if(yield v(e,$.id),re.map(z=>M(e,z.id)).every(z=>z===$e)){yield L(e);return}!l&&H+1<re.length&&!r&&O(e,re[H+1].id)})}function he($,z,Z){let ce=H+1<re.length?re[H+1]:null;n&&n($,H,z,ce),i&&i($,Z,ce)}function D(){return re.map($=>j(b({},$),{handleSecondaryButtonClick:()=>U(this,null,function*(){X($),$.skippable===!0&&(yield v(e,$.id,{skipped:!0})),he($,"secondary",H)}),handlePrimaryButtonClick:()=>U(this,null,function*(){(!$.completionCriteria&&($.autoMarkCompleted||$.autoMarkCompleted===void 0)||$.completionCriteria&&$.autoMarkCompleted===!0)&&(yield Q($)),he($,"primary",H),q($)})}))}function Se($){return U(this,null,function*(){s&&s(),m==="complete-flow"?yield L(e):yield v(e,$.id)})}function xe(){c&&c()}function Pe($){return U(this,null,function*(){yield u(e,re[$].id)})}let Ae=!document.querySelector(re[H].selector);function be(){let $=re.findIndex(z=>!!document.querySelector(z.selector));return re.map((z,Z)=>Ae&&!r&&Z!==$&&f||!r&&Z!==H?null:Dt.createElement(Jr,b({key:z.id,appearance:o,steps:D(),selectedStep:Z,showTooltipsSimultaneously:r,dismissible:p,onDismiss:()=>Se(z),tooltipPosition:d,showHighlightOnly:l,completedStepsCount:V(e),onComplete:xe,cssPosition:C,onViewTooltip:Pe},w)))}function _(){return Dt.createElement(Dt.Fragment,null,Dt.createElement(ne,{appearance:o}),be())}return C==="static"?_():Dt.createElement($c,null,_())};import Ve,{useEffect as Dc,useRef as Uc,useState as Wc}from"react";import{Portal as zc}from"react-portal";import Ut from"styled-components";var Sl=Ut.button`
|
|
1462
1462
|
${e=>E(e)} {
|
|
1463
1463
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
1464
1464
|
|
|
@@ -1476,17 +1476,17 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1476
1476
|
opacity: 0.8;
|
|
1477
1477
|
}
|
|
1478
1478
|
}
|
|
1479
|
-
`,bl=
|
|
1479
|
+
`,bl=Ut.span`
|
|
1480
1480
|
${e=>E(e)} {
|
|
1481
1481
|
font-size: 12px;
|
|
1482
1482
|
display: inline-block;
|
|
1483
1483
|
}
|
|
1484
|
-
`,wl=
|
|
1484
|
+
`,wl=Ut.span`
|
|
1485
1485
|
${e=>E(e)} {
|
|
1486
1486
|
font-size: 12px;
|
|
1487
1487
|
display: inline-block;
|
|
1488
1488
|
}
|
|
1489
|
-
`,Tl=
|
|
1489
|
+
`,Tl=Ut.div`
|
|
1490
1490
|
position: fixed;
|
|
1491
1491
|
right: 0;
|
|
1492
1492
|
bottom: 0;
|
|
@@ -1496,7 +1496,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1496
1496
|
flex-direction: column;
|
|
1497
1497
|
align-items: flex-end;
|
|
1498
1498
|
z-index: 50;
|
|
1499
|
-
`,Fl=
|
|
1499
|
+
`,Fl=Ut.button`
|
|
1500
1500
|
${e=>E(e)} {
|
|
1501
1501
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
1502
1502
|
background-color: #ffffff;
|
|
@@ -1512,7 +1512,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1512
1512
|
0px 3px 6px -4px rgba(0, 0, 0, 0.12);
|
|
1513
1513
|
border-radius: 45px;
|
|
1514
1514
|
cursor: pointer;
|
|
1515
|
-
`,kl=
|
|
1515
|
+
`,kl=Ut.div`
|
|
1516
1516
|
${e=>E(e)} {
|
|
1517
1517
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
1518
1518
|
background: #ffffff;
|
|
@@ -1529,7 +1529,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1529
1529
|
position: ${e=>e.type=="inline"?"absolute":"relative"};
|
|
1530
1530
|
top: ${e=>e.type=="inline"?"68px":0};
|
|
1531
1531
|
margin-left: ${e=>e.type=="inline"?"-127px":0};
|
|
1532
|
-
`,Pl=
|
|
1532
|
+
`,Pl=Ut.button`
|
|
1533
1533
|
${e=>E(e)} {
|
|
1534
1534
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
1535
1535
|
color: #434343;
|
|
@@ -1546,7 +1546,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1546
1546
|
font-size: 14px;
|
|
1547
1547
|
|
|
1548
1548
|
padding: 8px 12px;
|
|
1549
|
-
`;import vl from"react";var Bl=({style:e,className:t})=>vl.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",style:e,className:t},vl.createElement("path",{fill:"currentColor",d:"M13.43 4.938a4.494 4.494 0 00-1.043-1.435A4.955 4.955 0 009 2.197c-1.276 0-2.48.464-3.387 1.305A4.502 4.502 0 004.57 4.938a4.242 4.242 0 00-.386 1.773v.475c0 .109.087.197.196.197h.95a.197.197 0 00.197-.197V6.71c0-1.749 1.557-3.17 3.473-3.17s3.473 1.421 3.473 3.17c0 .718-.254 1.393-.738 1.955a3.537 3.537 0 01-1.9 1.125 1.928 1.928 0 00-1.085.682c-.271.343-.42.768-.42 1.206v.552c0 .109.088.197.197.197h.95a.197.197 0 00.196-.197v-.552c0-.276.192-.519.457-.578a4.904 4.904 0 002.625-1.56c.335-.392.597-.828.778-1.3a4.256 4.256 0 00-.103-3.303zM9 13.834a.985.985 0 10.001 1.97.985.985 0 00-.001-1.97z"}));import El from"react";var Al=({style:e,className:t})=>El.createElement("svg",{style:e,className:t,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor"},El.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"}));var _c=({flowId:e,style:t,onStepCompletion:o,visible:i=!0,type:n="inline",title:r="Help",appearance:s})=>{let{getFlow:p,getFlowSteps:d,markStepCompleted:l,getStepStatus:m,getNumberOfStepsCompleted:c,isLoading:f,targetingLogicShouldHideFlow:C}=J(),{primaryCTAClickSideEffects:w}=
|
|
1549
|
+
`;import vl from"react";var Bl=({style:e,className:t})=>vl.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",style:e,className:t},vl.createElement("path",{fill:"currentColor",d:"M13.43 4.938a4.494 4.494 0 00-1.043-1.435A4.955 4.955 0 009 2.197c-1.276 0-2.48.464-3.387 1.305A4.502 4.502 0 004.57 4.938a4.242 4.242 0 00-.386 1.773v.475c0 .109.087.197.196.197h.95a.197.197 0 00.197-.197V6.71c0-1.749 1.557-3.17 3.473-3.17s3.473 1.421 3.473 3.17c0 .718-.254 1.393-.738 1.955a3.537 3.537 0 01-1.9 1.125 1.928 1.928 0 00-1.085.682c-.271.343-.42.768-.42 1.206v.552c0 .109.088.197.197.197h.95a.197.197 0 00.196-.197v-.552c0-.276.192-.519.457-.578a4.904 4.904 0 002.625-1.56c.335-.392.597-.828.778-1.3a4.256 4.256 0 00-.103-3.303zM9 13.834a.985.985 0 10.001 1.97.985.985 0 00-.001-1.97z"}));import El from"react";var Al=({style:e,className:t})=>El.createElement("svg",{style:e,className:t,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor"},El.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"}));var _c=({flowId:e,style:t,onStepCompletion:o,visible:i=!0,type:n="inline",title:r="Help",appearance:s})=>{let{getFlow:p,getFlowSteps:d,markStepCompleted:l,getStepStatus:m,getNumberOfStepsCompleted:c,isLoading:f,targetingLogicShouldHideFlow:C}=J(),{primaryCTAClickSideEffects:w}=pe(),x=Uc(null),[g,A]=Wc(!1),{mergeAppearanceWithDefault:T}=ee();s=T(s),Dc(()=>(document.addEventListener("click",k,!1),()=>{document.removeEventListener("click",k,!1)}),[]);let k=S=>{x.current&&!x.current.contains(S.target)&&A(!1)};if(f)return null;let P=p(e);if(!P||C(P))return null;let v=d(e);if(!v||!i)return null;function u(S,F){!S.completionCriteria&&(S.autoMarkCompleted||S.autoMarkCompleted===void 0)&&l(e,S.id),w(S),o&&o(S,F),A(!1)}function L(){return g&&Ve.createElement(kl,{className:a("floatingWidgetMenu",s),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1},type:n},v.map((S,F)=>Ve.createElement(Pl,{className:a("floatingWidgetMenuItem",s),key:F,onClick:()=>u(S,F)},S.title)))}return n=="inline"?Ve.createElement("span",{ref:x},Ve.createElement(Sl,{style:t,onClick:()=>{A(!g)},className:a("supportButton",s)},Ve.createElement(wl,{className:a("supportIconContainer",s)},Ve.createElement(Al,{className:a("supportIcon",s),style:{width:"18px",height:"18px"}})),Ve.createElement(bl,{className:a("supportButtonTitle",s)},r)),Ve.createElement(L,null)):Ve.createElement(zc,null,Ve.createElement(Tl,{style:t,ref:x},Ve.createElement(L,null),Ve.createElement(Fl,{onClick:()=>{A(!g)},whileHover:{scale:1.1},className:a("floatingWidgetButton",s)},Ve.createElement(Bl,{className:a("floatingWidgetButtonIcon",s),style:{display:"flex",width:"20px",height:"20px"}}))))};import rt,{useEffect as Hc}from"react";import dr from"styled-components";var Ol=dr.div`
|
|
1550
1550
|
${e=>E(e)} {
|
|
1551
1551
|
display: flex;
|
|
1552
1552
|
flex-direction: column;
|
|
@@ -1561,17 +1561,17 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1561
1561
|
border-radius: 12px;
|
|
1562
1562
|
position: relative;
|
|
1563
1563
|
}
|
|
1564
|
-
`,Nl=
|
|
1564
|
+
`,Nl=dr.div`
|
|
1565
1565
|
display: flex;
|
|
1566
1566
|
flex-direction: column;
|
|
1567
1567
|
flex: 1;
|
|
1568
|
-
`,Il=
|
|
1568
|
+
`,Il=dr.div`
|
|
1569
1569
|
display: flex;
|
|
1570
1570
|
flex-direction: column;
|
|
1571
1571
|
justify-content: center;
|
|
1572
1572
|
align-items: flex-start;
|
|
1573
1573
|
margin-top: 16px;
|
|
1574
|
-
`,Ll=
|
|
1574
|
+
`,Ll=dr.div`
|
|
1575
1575
|
${e=>E(e)} {
|
|
1576
1576
|
position: absolute;
|
|
1577
1577
|
top: 16px;
|
|
@@ -1582,7 +1582,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1582
1582
|
opacity: 0.8;
|
|
1583
1583
|
}
|
|
1584
1584
|
}
|
|
1585
|
-
`;var Vc=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:i,appearance:n,className:r,style:s,dismissible:p})=>{let{getFlow:d,markFlowCompleted:l,markStepCompleted:m,isLoading:c,targetingLogicShouldHideFlow:f,updateCustomVariables:C,getFlowSteps:w,getFlowStatus:x,getCurrentStepIndex:g}=J(),{primaryCTAClickSideEffects:A}=
|
|
1585
|
+
`;var Vc=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:i,appearance:n,className:r,style:s,dismissible:p})=>{let{getFlow:d,markFlowCompleted:l,markStepCompleted:m,isLoading:c,targetingLogicShouldHideFlow:f,updateCustomVariables:C,getFlowSteps:w,getFlowStatus:x,getCurrentStepIndex:g}=J(),{primaryCTAClickSideEffects:A}=pe(),{mergeAppearanceWithDefault:T}=ee();if(Ge(e),n=T(n),Hc(()=>{C(o)},[o,c]),c)return null;let k=d(e);if(!k||f(k)||x(e)===R)return null;let v=w(e)[g(e)];return rt.createElement(rt.Fragment,null,rt.createElement(ne,{appearance:n}),rt.createElement(Ol,{appearance:n,className:Fe(a("embeddedTipContainer",n),r),style:s},(p===!0||v.dismissible)&&rt.createElement(Ll,{onClick:()=>U(void 0,null,function*(){yield l(e),t&&t()}),className:a("embeddedTipDismissButton",n)},rt.createElement(Ne,null)),rt.createElement(Nl,null,rt.createElement(Ie,{size:"small",appearance:n,title:v.title,subtitle:v.subtitle})),v.primaryButtonTitle&&rt.createElement(Il,{className:a("embeddedTipCallToActionContainer",n)},rt.createElement(te,{classPrefix:"embeddedTip",title:v.primaryButtonTitle,appearance:n,withMargin:!1,size:"medium",type:"inline",onClick:()=>U(void 0,null,function*(){v.handlePrimaryButtonClick(),A(v),!(i&&i(v,g(e),"primary")===!1)&&(yield m(e,v.id),yield l(e))})}))))};import Be,{useEffect as jc}from"react";import po from"styled-components";var $l=po.div`
|
|
1586
1586
|
// use the :not annotation
|
|
1587
1587
|
${e=>E(e)} {
|
|
1588
1588
|
display: flex;
|
|
@@ -1594,24 +1594,24 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1594
1594
|
background-color: ${e=>e.appearance.theme.colorBackground};
|
|
1595
1595
|
border-radius: 12px;
|
|
1596
1596
|
}
|
|
1597
|
-
`,Ml=
|
|
1597
|
+
`,Ml=po.div`
|
|
1598
1598
|
${e=>E(e)} {
|
|
1599
1599
|
display: flex;
|
|
1600
1600
|
width: 46px;
|
|
1601
1601
|
height: 46px;
|
|
1602
1602
|
}
|
|
1603
|
-
`,Dl=
|
|
1603
|
+
`,Dl=po.div`
|
|
1604
1604
|
display: flex;
|
|
1605
1605
|
flex-direction: column;
|
|
1606
1606
|
flex: 1;
|
|
1607
1607
|
margin-left: ${e=>e.type==="square"?"0px":"16px"};
|
|
1608
1608
|
margin-top: ${e=>e.type==="square"?"12px":"0"};
|
|
1609
|
-
`,Ul=
|
|
1609
|
+
`,Ul=po.div`
|
|
1610
1610
|
display: flex;
|
|
1611
1611
|
flex-direction: column;
|
|
1612
1612
|
justify-content: center;
|
|
1613
1613
|
margin-left: ${e=>e.type==="square"?"0px":"16px"};
|
|
1614
|
-
`,
|
|
1614
|
+
`,Xr=po.div`
|
|
1615
1615
|
display: flex;
|
|
1616
1616
|
justify-content: ${e=>e.type==="square"?"flex-end":"center"};
|
|
1617
1617
|
align-items: flex-end;
|
|
@@ -1619,12 +1619,12 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1619
1619
|
:hover {
|
|
1620
1620
|
opacity: 0.8;
|
|
1621
1621
|
}
|
|
1622
|
-
`,
|
|
1622
|
+
`,Qr=po.div`
|
|
1623
1623
|
display: flex;
|
|
1624
1624
|
justify-content: ${e=>e.type==="square"?"flex-end":"center"};
|
|
1625
1625
|
align-items: flex-end;
|
|
1626
1626
|
margin-left: ${e=>e.type==="square"?"0px":"16px"};
|
|
1627
|
-
`;import
|
|
1627
|
+
`;import Zr from"react";var Wl=({style:e,className:t})=>Zr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"46",height:"46",fill:"none",viewBox:"0 0 46 46",style:e,className:t},Zr.createElement("circle",{cx:"23",cy:"23",r:"23",fill:"#E6F1FF"}),Zr.createElement("path",{stroke:"#0171F8",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M32 18.5l-2.25-1.313M32 18.5v2.25m0-2.25l-2.25 1.313M14 18.5l2.25-1.313M14 18.5l2.25 1.313M14 18.5v2.25m9 3l2.25-1.313M23 23.75l-2.25-1.313M23 23.75V26m0 6.75l2.25-1.313M23 32.75V30.5m0 2.25l-2.25-1.313m0-16.875L23 13.25l2.25 1.313M32 25.25v2.25l-2.25 1.313m-13.5 0L14 27.5v-2.25"}));var Gc=({flowId:e,title:t,subtitle:o,onDismiss:i,customVariables:n,onButtonClick:r,appearance:s,type:p="full-width",icon:d})=>{let{getFlow:l,markFlowCompleted:m,isLoading:c,targetingLogicShouldHideFlow:f,updateCustomVariables:C,getFlowMetadata:w,getFlowStatus:x,getFlowSteps:g,getCurrentStepIndex:A}=J(),{primaryCTAClickSideEffects:T}=pe(),{mergeAppearanceWithDefault:k}=ee();if(Ge(e),s=k(s),jc(()=>{C(n)},[n,c]),c)return null;let P=l(e);if(!P||f(P)||x(e)===R)return null;let v=g(e),u=v.length>0?v[A(e)]:w(e);return u!=null&&u.title&&(t=u.title),u!=null&&u.subtitle&&(o=u.subtitle),Be.createElement(Be.Fragment,null,Be.createElement(ne,{appearance:s}),Be.createElement($l,{type:p,appearance:s,className:a("bannerContainer",s)},p!="square"&&Be.createElement(Ml,{className:a("bannerIconContainer",s)},d||Be.createElement(Wl,null)),p==="square"&&u.dismissible&&Be.createElement(Qr,{type:p,className:a("bannerDismissButtonContainer",s)},Be.createElement(Xr,{type:p,onClick:()=>U(void 0,null,function*(){yield m(e),i&&i()}),className:a("bannerDismissButton",s)},Be.createElement(Ne,null))),Be.createElement(Dl,{type:p},Be.createElement(Ie,{appearance:s,title:t,subtitle:o,classPrefix:"banner"})),(u==null?void 0:u.primaryButtonTitle)&&Be.createElement(Ul,{type:p,className:a("bannerCallToActionContainer",s)},Be.createElement(te,{title:u==null?void 0:u.primaryButtonTitle,appearance:s,onClick:()=>{T(u),r&&r(u,0,"primary")},classPrefix:"banner"})),p!=="square"&&u.dismissible&&Be.createElement(Qr,{type:p,className:a("bannerDismissButtonContainer",s)},Be.createElement(Xr,{type:p,onClick:()=>U(void 0,null,function*(){yield m(e),i&&i()}),className:a("bannerDismissButton",s)},Be.createElement(Ne,null)))))};import oe,{useEffect as Kc}from"react";import{Portal as qc}from"react-portal";import gt from"styled-components";var zl=gt.div`
|
|
1628
1628
|
display: flex;
|
|
1629
1629
|
flex-direction: column;
|
|
1630
1630
|
width: 100%;
|
|
@@ -1646,7 +1646,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1646
1646
|
border-width: 1px;
|
|
1647
1647
|
border-color: ${t=>t.appearance.theme.colorBorder};
|
|
1648
1648
|
border-radius: ${t=>t.appearance.theme.borderRadius}px;`:""}
|
|
1649
|
-
`,_l=
|
|
1649
|
+
`,_l=gt.button`
|
|
1650
1650
|
border: 1px solid ${e=>e.appearance.theme.colorBorder};
|
|
1651
1651
|
border-radius: 8px;
|
|
1652
1652
|
// If selected make border color primary and text color color priamry
|
|
@@ -1667,33 +1667,33 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1667
1667
|
display: flex;
|
|
1668
1668
|
justify-content: center;
|
|
1669
1669
|
align-items: center;
|
|
1670
|
-
`,
|
|
1670
|
+
`,Rr=gt.div`
|
|
1671
1671
|
display: flex;
|
|
1672
1672
|
justify-content: space-between;
|
|
1673
1673
|
margin-top: 16px;
|
|
1674
1674
|
gap: 8px;
|
|
1675
|
-
`,Hl=
|
|
1675
|
+
`,Hl=gt.div`
|
|
1676
1676
|
display: flex;
|
|
1677
1677
|
justify-content: space-between;
|
|
1678
1678
|
margin-top: 8px;
|
|
1679
|
-
`,
|
|
1679
|
+
`,ei=gt.div`
|
|
1680
1680
|
font-size: 12px;
|
|
1681
1681
|
line-height: 18px;
|
|
1682
1682
|
color: ${e=>e.appearance.theme.colorTextDisabled};
|
|
1683
1683
|
font-style: normal;
|
|
1684
1684
|
font-weight: 400;
|
|
1685
1685
|
letter-spacing: 0.24px;
|
|
1686
|
-
`,
|
|
1686
|
+
`,ti=gt.div`
|
|
1687
1687
|
display: flex;
|
|
1688
1688
|
flex-direction: column;
|
|
1689
1689
|
flex: 1;
|
|
1690
|
-
`,uw=
|
|
1690
|
+
`,uw=gt.div`
|
|
1691
1691
|
display: flex;
|
|
1692
1692
|
flex-direction: column;
|
|
1693
1693
|
justify-content: center;
|
|
1694
1694
|
align-items: flex-start;
|
|
1695
1695
|
margin-top: 16px;
|
|
1696
|
-
`,Vl=
|
|
1696
|
+
`,Vl=gt.textarea`
|
|
1697
1697
|
${e=>E(e)} {
|
|
1698
1698
|
color: ${e=>e.appearance.theme.colorText};
|
|
1699
1699
|
margin-top: 16px;
|
|
@@ -1706,7 +1706,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1706
1706
|
height: 100px;
|
|
1707
1707
|
resize: none;
|
|
1708
1708
|
}
|
|
1709
|
-
`,jl=
|
|
1709
|
+
`,jl=gt.div`
|
|
1710
1710
|
${e=>E(e)} {
|
|
1711
1711
|
position: absolute;
|
|
1712
1712
|
top: 16px;
|
|
@@ -1717,7 +1717,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1717
1717
|
opacity: 0.8;
|
|
1718
1718
|
}
|
|
1719
1719
|
}
|
|
1720
|
-
`;var Yc=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:i,appearance:n,className:r,style:s,type:p="modal"})=>{let{getFlow:d,markFlowCompleted:l,markStepCompleted:m,getNumberOfStepsCompleted:c,isLoading:f,targetingLogicShouldHideFlow:C,updateCustomVariables:w,getFlowSteps:x,getFlowStatus:g,getFlowMetadata:A}=J(),{primaryCTAClickSideEffects:T}=
|
|
1720
|
+
`;var Yc=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:i,appearance:n,className:r,style:s,type:p="modal"})=>{let{getFlow:d,markFlowCompleted:l,markStepCompleted:m,getNumberOfStepsCompleted:c,isLoading:f,targetingLogicShouldHideFlow:C,updateCustomVariables:w,getFlowSteps:x,getFlowStatus:g,getFlowMetadata:A}=J(),{primaryCTAClickSideEffects:T}=pe(),{mergeAppearanceWithDefault:k}=ee(),[P,v]=oe.useState(null),[u,L]=oe.useState(""),S=A(e),{hasOpenModals:F,setKeepCompletedFlowOpenDuringSession:M,shouldKeepCompletedFlowOpenDuringSession:O}=Oe();if(Ge(e),n=k(n),Kc(()=>{w(o)},[o,f]),f)return null;let I=d(e);if(!I||C(I)||g(e)===R||c(e)===1&&!O(e)||F())return null;let W=x(e)[c(e)];function q(){var H,le;return oe.createElement(oe.Fragment,null,oe.createElement(ti,null,oe.createElement(Ie,{size:"large",appearance:n,title:W.title,subtitle:W.subtitle})),oe.createElement(Rr,{className:a("npsNumberButtonContainer",n),appearance:n},Array.from(Array(10).keys()).map(fe=>oe.createElement(_l,{className:a("npsNumberButton",n),selected:P===fe+1,key:fe,onClick:()=>U(this,null,function*(){M(e),v(fe+1),yield m(e,W.id,{score:fe+1})}),appearance:n},fe+1))),oe.createElement(Hl,{appearance:n},oe.createElement(ei,{appearance:n},(H=S==null?void 0:S.negativeLabel)!=null?H:"Not likely at all"),oe.createElement(ei,{appearance:n},(le=S==null?void 0:S.positiveLabel)!=null?le:"Extremely likely")))}function X(){var H;return oe.createElement(oe.Fragment,null,oe.createElement(ti,null,oe.createElement(Ie,{appearance:n,title:(H=W.title)!=null?H:"Why did you choose this score?",size:"large"})),oe.createElement(Vl,{appearance:n,value:u,onChange:le=>{L(le.target.value)},placeholder:"Add your optional feedback here..."}),oe.createElement(Rr,{appearance:n,className:a("npsNumberButtonContainer",n)},oe.createElement(te,{size:"large",withMargin:!1,onClick:()=>U(this,null,function*(){yield l(e),i&&i(W,1,"primary")}),appearance:n,title:W.secondaryButtonTitle||"Skip",secondary:!0}),oe.createElement(te,{size:"large",withMargin:!1,onClick:()=>U(this,null,function*(){yield m(e,W.id,{feedbackText:u}),yield l(e),i&&i(W,1,"primary")}),appearance:n,title:W.primaryButtonTitle||"Submit"})))}function de(){return c(e)>=2?null:oe.createElement(oe.Fragment,null,oe.createElement(ne,{appearance:n}),oe.createElement(zl,{appearance:n,className:Fe(a("npsSurveyContainer",n),r),style:s,type:p},oe.createElement(jl,{onClick:()=>U(this,null,function*(){yield l(e),t&&t()}),className:a("npsSurveyDismissButton",n)},oe.createElement(Ne,null)),c(e)==0&&q(),c(e)==1&&X()))}return p==="inline"?de():oe.createElement(qc,null,de())};import Ee,{useEffect as Qc}from"react";import Wt from"styled-components";var Gl=Wt.div`
|
|
1721
1721
|
${e=>E(e)} {
|
|
1722
1722
|
display: flex;
|
|
1723
1723
|
flex-direction: column;
|
|
@@ -1728,21 +1728,21 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1728
1728
|
background-color: ${e=>e.appearance.theme.colorBackground};
|
|
1729
1729
|
position: relative;
|
|
1730
1730
|
}
|
|
1731
|
-
`,Kl=
|
|
1731
|
+
`,Kl=Wt.div`
|
|
1732
1732
|
display: flex;
|
|
1733
1733
|
flex-direction: column;
|
|
1734
1734
|
flex: 1;
|
|
1735
|
-
`,ql=
|
|
1735
|
+
`,ql=Wt.div`
|
|
1736
1736
|
display: flex;
|
|
1737
1737
|
flex-direction: row;
|
|
1738
1738
|
justify-content: center;
|
|
1739
1739
|
align-items: stretch;
|
|
1740
1740
|
gap: 16px;
|
|
1741
1741
|
margin-top: 8px;
|
|
1742
|
-
`,Yl=
|
|
1742
|
+
`,Yl=Wt.div`
|
|
1743
1743
|
margin-top: 16px;
|
|
1744
1744
|
margin-bottom: 16px;
|
|
1745
|
-
`,Jl=
|
|
1745
|
+
`,Jl=Wt.div`
|
|
1746
1746
|
${e=>E(e)} {
|
|
1747
1747
|
position: absolute;
|
|
1748
1748
|
top: -16px;
|
|
@@ -1753,7 +1753,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1753
1753
|
opacity: 0.8;
|
|
1754
1754
|
}
|
|
1755
1755
|
}
|
|
1756
|
-
`,Xl=
|
|
1756
|
+
`,Xl=Wt.h1`
|
|
1757
1757
|
${e=>E(e)} {
|
|
1758
1758
|
font-style: normal;
|
|
1759
1759
|
justify-content: center;
|
|
@@ -1767,7 +1767,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1767
1767
|
color: ${e=>e.appearance.theme.colorText};
|
|
1768
1768
|
margin-bottom: 8px;
|
|
1769
1769
|
}
|
|
1770
|
-
`,Ql=
|
|
1770
|
+
`,Ql=Wt.h2`
|
|
1771
1771
|
${e=>E(e)} {
|
|
1772
1772
|
font-style: normal;
|
|
1773
1773
|
justify-content: center;
|
|
@@ -1784,5 +1784,5 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${fo}${t}.${fo}${t} { ${Object.entries(o).map
|
|
|
1784
1784
|
height: 100%;
|
|
1785
1785
|
min-height: 200px;
|
|
1786
1786
|
border-radius: ${e=>e.appearance.theme.borderRadius}px;
|
|
1787
|
-
`;function Rl({stepData:e,appearance:t,classPrefix:o=""}){return e.videoUri?Zl.createElement(
|
|
1787
|
+
`;function Rl({stepData:e,appearance:t,classPrefix:o=""}){return e.videoUri?Zl.createElement(et,{appearance:t,videoUri:e.videoUri}):e.imageUri?Zl.createElement(Xc,{className:a(`${o}image`,t),appearance:t,src:e.imageUri}):null}var Zc=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:i,appearance:n,className:r,style:s,dismissible:p=!0,modalPosition:d="center"})=>{let{getFlow:l,markFlowCompleted:m,markStepCompleted:c,isLoading:f,targetingLogicShouldHideFlow:C,updateCustomVariables:w,getFlowSteps:x,getFlowStatus:g,getCurrentStepIndex:A}=J(),{primaryCTAClickSideEffects:T,secondaryCTAClickSideEffects:k}=pe(),{mergeAppearanceWithDefault:P}=ee(),{setOpenFlowState:v,getOpenFlowState:u,hasOpenModals:L}=Oe();Ge(e);let[S,F]=[u(e,!0),X=>v(e,X)];if(n=P(n),Qc(()=>{w(o)},[o,f]),f)return null;let M=l(e);if(!M||C(M)||g(e)===R||L())return null;let I=x(e)[A(e)],V=()=>{F(!1),t&&t(),m(e)};function W(){return Ee.createElement(Ee.Fragment,null,Ee.createElement(ne,{appearance:n}),Ee.createElement(Gl,{appearance:n,className:Fe(a("announcementContainer",n),r),style:s},(p===!0||I.dismissible)&&d=="inline"&&Ee.createElement(Jl,{onClick:()=>U(this,null,function*(){yield m(e),t&&t()}),className:a("announcementDismissButton",n)},Ee.createElement(Ne,null)),Ee.createElement(Kl,null,Ee.createElement(Xl,{appearance:n,className:a("announcementTitle",n),dangerouslySetInnerHTML:ae(I.title)}),I.subtitle&&Ee.createElement(Ql,{appearance:n,className:a("announcementSubtitle",n),dangerouslySetInnerHTML:ae(I.subtitle)})),(I.imageUri||I.videoUri)&&Ee.createElement(Yl,{className:a("announcementMediaContainer",n)},Ee.createElement(Rl,{appearance:n,stepData:I})),(I.primaryButtonTitle||I.secondaryButtonTitle)&&Ee.createElement(ql,{className:a("announcementCTAContainer",n)},I.secondaryButtonTitle&&Ee.createElement(te,{classPrefix:"announcement",title:I.secondaryButtonTitle,appearance:n,withMargin:!1,size:"small",type:"full-width",onClick:()=>U(this,null,function*(){I.handleSecondaryButtonClick(),k(I),i&&i(I,A(e),"secondary")}),secondary:!0}),I.primaryButtonTitle&&Ee.createElement(te,{classPrefix:"announcement",title:I.primaryButtonTitle,appearance:n,withMargin:!1,size:"small",type:"full-width",onClick:()=>U(this,null,function*(){I.handlePrimaryButtonClick(),T(I),!(i&&i(I,A(e),"primary")===!1)&&(yield c(e,I.id),yield m(e))})}))))}let q={padding:"24px",maxWidth:"400px"};return d==="inline"?W():d!=="center"?Ee.createElement(_o,{modalPosition:d,onClose:V,visible:S,dismissible:p,appearance:n},W()):Ee.createElement(Ze,{appearance:n,onClose:V,visible:S,style:q,dismissible:p},W())};import*as cr from"react";import ea from"react";var ta=n=>{var r=n,{as:e="span",children:t,variant:o="Body1"}=r,i=Le(r,["as","children","variant"]);return ea.createElement(Pn,b({color:"neutral.foreground",fontFamily:"default",forwardedAs:e,variant:o},i),t)},Rc=Object.fromEntries(Object.keys(Zo).map(e=>{let t=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():void 0,o=i=>ea.createElement(ta,j(b({as:t},i),{variant:e}),i.children);return o.displayName=`Text.${e}`,[e,o]})),oi=Object.assign(ta,Rc);var oa=s=>{var p=s,{as:e="button",className:t,size:o="md",title:i,variant:n="Primary"}=p,r=Le(p,["as","className","size","title","variant"]);var d;return cr.createElement(kn,b({className:`fr-button-${n.toLowerCase()}${t?` ${t}`:""}`,forwardedAs:e,variant:n,size:o,borderRadius:"md"},r),cr.createElement(oi,{color:(d=Po[n])==null?void 0:d.color,fontWeight:"semibold"},i))},em=Object.fromEntries(Object.keys(Po).map(e=>{let t=o=>cr.createElement(oa,j(b({},o),{variant:e}));return t.displayName=`Button.${e}`,[e,t]})),tm=Object.assign(oa,em);export{ko as Box,tm as Button,pt as CheckBox,fr as FlowType,St as FormLabel,Pr as FormTextField,Zc as FrigadeAnnouncement,Gc as FrigadeBanner,qr as FrigadeChecklist,at as FrigadeDefaultAppearance,Vc as FrigadeEmbeddedTip,xn as FrigadeForm,Sc as FrigadeGuide,hc as FrigadeHeroChecklist,Yc as FrigadeNPSSurvey,Cc as FrigadeProgressBadge,Pd as FrigadeProvider,_c as FrigadeSupportWidget,Mc as FrigadeTour,_e as ProgressBar,qt as ProgressRing,oi as Text,Ur as tokens,Oe as useFlowOpens,go as useFlowResponses,J as useFlows,Dr as useOrganization,ho as useUser,We as useUserFlowStates};
|
|
1788
1788
|
//# sourceMappingURL=index.mjs.map
|