@onside/install-widget 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";const b=require("react/jsx-runtime"),k=require("react");function ct(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const H=ct(k);function We(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=We(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Ke(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=We(e))&&(r&&(r+=" "),r+=t);return r}const xe="-",dt=e=>{const t=pt(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const p=i.split(xe);return p[0]===""&&p.length!==1&&p.shift(),$e(p,t)||ut(i)},getConflictingClassGroupIds:(i,p)=>{const u=o[i]||[];return p&&r[i]?[...u,...r[i]]:u}}},$e=(e,t)=>{if(e.length===0)return t.classGroupId;const o=e[0],r=t.nextPart.get(o),n=r?$e(e.slice(1),r):void 0;if(n)return n;if(t.validators.length===0)return;const s=e.join(xe);return t.validators.find(({validator:i})=>i(s))?.classGroupId},Te=/^\[(.+)\]$/,ut=e=>{if(Te.test(e)){const t=Te.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},pt=e=>{const{theme:t,classGroups:o}=e,r={nextPart:new Map,validators:[]};for(const n in o)be(o[n],r,n,t);return r},be=(e,t,o,r)=>{e.forEach(n=>{if(typeof n=="string"){const s=n===""?t:Me(t,n);s.classGroupId=o;return}if(typeof n=="function"){if(mt(n)){be(n(r),t,o,r);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([s,i])=>{be(i,Me(t,s),o,r)})})},Me=(e,t)=>{let o=e;return t.split(xe).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},mt=e=>e.isThemeGetter,ft=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map;const n=(s,i)=>{o.set(s,i),t++,t>e&&(t=0,r=o,o=new Map)};return{get(s){let i=o.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return n(s,i),i},set(s,i){o.has(s)?o.set(s,i):n(s,i)}}},ge="!",he=":",bt=he.length,gt=e=>{const{prefix:t,experimentalParseClassName:o}=e;let r=n=>{const s=[];let i=0,p=0,u=0,m;for(let S=0;S<n.length;S++){let w=n[S];if(i===0&&p===0){if(w===he){s.push(n.slice(u,S)),u=S+bt;continue}if(w==="/"){m=S;continue}}w==="["?i++:w==="]"?i--:w==="("?p++:w===")"&&p--}const h=s.length===0?n:n.substring(u),y=ht(h),I=y!==h,O=m&&m>u?m-u:void 0;return{modifiers:s,hasImportantModifier:I,baseClassName:y,maybePostfixModifierPosition:O}};if(t){const n=t+he,s=r;r=i=>i.startsWith(n)?s(i.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(o){const n=r;r=s=>o({className:s,parseClassName:n})}return r},ht=e=>e.endsWith(ge)?e.substring(0,e.length-1):e.startsWith(ge)?e.substring(1):e,wt=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const n=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(n.push(...s.sort(),i),s=[]):s.push(i)}),n.push(...s.sort()),n}},xt=e=>({cache:ft(e.cacheSize),parseClassName:gt(e),sortModifiers:wt(e),...dt(e)}),kt=/\s+/,yt=(e,t)=>{const{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n,sortModifiers:s}=t,i=[],p=e.trim().split(kt);let u="";for(let m=p.length-1;m>=0;m-=1){const h=p[m],{isExternal:y,modifiers:I,hasImportantModifier:O,baseClassName:S,maybePostfixModifierPosition:w}=o(h);if(y){u=h+(u.length>0?" "+u:u);continue}let E=!!w,T=r(E?S.substring(0,w):S);if(!T){if(!E){u=h+(u.length>0?" "+u:u);continue}if(T=r(S),!T){u=h+(u.length>0?" "+u:u);continue}E=!1}const G=s(I).join(":"),M=O?G+ge:G,R=M+T;if(i.includes(R))continue;i.push(R);const P=n(T,E);for(let A=0;A<P.length;++A){const F=P[A];i.push(M+F)}u=h+(u.length>0?" "+u:u)}return u};function vt(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=He(t))&&(r&&(r+=" "),r+=o);return r}const He=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=He(e[r]))&&(o&&(o+=" "),o+=t);return o};function St(e,...t){let o,r,n,s=i;function i(u){const m=t.reduce((h,y)=>y(h),e());return o=xt(m),r=o.cache.get,n=o.cache.set,s=p,p(u)}function p(u){const m=r(u);if(m)return m;const h=yt(u,o);return n(u,h),h}return function(){return s(vt.apply(null,arguments))}}const x=e=>{const t=o=>o[e]||[];return t.isThemeGetter=!0,t},Xe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ye=/^\((?:(\w[\w-]*):)?(.+)\)$/i,It=/^\d+\/\d+$/,Ot=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_t=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Et=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,At=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ct=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,K=e=>It.test(e),f=e=>!!e&&!Number.isNaN(Number(e)),j=e=>!!e&&Number.isInteger(Number(e)),ue=e=>e.endsWith("%")&&f(e.slice(0,-1)),L=e=>Ot.test(e),Tt=()=>!0,Mt=e=>_t.test(e)&&!Et.test(e),qe=()=>!1,Rt=e=>At.test(e),Pt=e=>Ct.test(e),Nt=e=>!a(e)&&!l(e),zt=e=>X(e,Qe,qe),a=e=>Xe.test(e),U=e=>X(e,et,Mt),pe=e=>X(e,jt,f),Re=e=>X(e,Je,qe),Lt=e=>X(e,Ze,Pt),ne=e=>X(e,tt,Rt),l=e=>Ye.test(e),q=e=>Y(e,et),Dt=e=>Y(e,Vt),Pe=e=>Y(e,Je),Gt=e=>Y(e,Qe),Ft=e=>Y(e,Ze),se=e=>Y(e,tt,!0),X=(e,t,o)=>{const r=Xe.exec(e);return r?r[1]?t(r[1]):o(r[2]):!1},Y=(e,t,o=!1)=>{const r=Ye.exec(e);return r?r[1]?t(r[1]):o:!1},Je=e=>e==="position"||e==="percentage",Ze=e=>e==="image"||e==="url",Qe=e=>e==="length"||e==="size"||e==="bg-size",et=e=>e==="length",jt=e=>e==="number",Vt=e=>e==="family-name",tt=e=>e==="shadow",Ut=()=>{const e=x("color"),t=x("font"),o=x("text"),r=x("font-weight"),n=x("tracking"),s=x("leading"),i=x("breakpoint"),p=x("container"),u=x("spacing"),m=x("radius"),h=x("shadow"),y=x("inset-shadow"),I=x("text-shadow"),O=x("drop-shadow"),S=x("blur"),w=x("perspective"),E=x("aspect"),T=x("ease"),G=x("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...R(),l,a],A=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],c=()=>[l,a,u],N=()=>[K,"full","auto",...c()],ve=()=>[j,"none","subgrid",l,a],Se=()=>["auto",{span:["full",j,l,a]},j,l,a],Q=()=>[j,"auto",l,a],Ie=()=>["auto","min","max","fr",l,a],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...c()],V=()=>[K,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...c()],d=()=>[e,l,a],Oe=()=>[...R(),Pe,Re,{position:[l,a]}],_e=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ee=()=>["auto","cover","contain",Gt,zt,{size:[l,a]}],ce=()=>[ue,q,U],_=()=>["","none","full",m,l,a],C=()=>["",f,q,U],ee=()=>["solid","dashed","dotted","double"],Ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],v=()=>[f,ue,Pe,Re],Ce=()=>["","none",S,l,a],te=()=>["none",f,l,a],oe=()=>["none",f,l,a],de=()=>[f,l,a],re=()=>[K,"full",...c()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[L],breakpoint:[L],color:[Tt],container:[L],"drop-shadow":[L],ease:["in","out","in-out"],font:[Nt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[L],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[L],shadow:[L],spacing:["px",f],text:[L],"text-shadow":[L],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",K,a,l,E]}],container:["container"],columns:[{columns:[f,a,l,p]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[j,"auto",l,a]}],basis:[{basis:[K,"full","auto",p,...c()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[f,K,"auto","initial","none",a]}],grow:[{grow:["",f,l,a]}],shrink:[{shrink:["",f,l,a]}],order:[{order:[j,"first","last","none",l,a]}],"grid-cols":[{"grid-cols":ve()}],"col-start-end":[{col:Se()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":ve()}],"row-start-end":[{row:Se()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ie()}],"auto-rows":[{"auto-rows":Ie()}],gap:[{gap:c()}],"gap-x":[{"gap-x":c()}],"gap-y":[{"gap-y":c()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:c()}],px:[{px:c()}],py:[{py:c()}],ps:[{ps:c()}],pe:[{pe:c()}],pt:[{pt:c()}],pr:[{pr:c()}],pb:[{pb:c()}],pl:[{pl:c()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":c()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":c()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[p,"screen",...V()]}],"min-w":[{"min-w":[p,"screen","none",...V()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[i]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",o,q,U]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,l,pe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ue,a]}],"font-family":[{font:[Dt,a,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,l,a]}],"line-clamp":[{"line-clamp":[f,"none",l,pe]}],leading:[{leading:[s,...c()]}],"list-image":[{"list-image":["none",l,a]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",l,a]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:d()}],"text-color":[{text:d()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[f,"from-font","auto",l,U]}],"text-decoration-color":[{decoration:d()}],"underline-offset":[{"underline-offset":[f,"auto",l,a]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:c()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",l,a]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",l,a]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Oe()}],"bg-repeat":[{bg:_e()}],"bg-size":[{bg:Ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},j,l,a],radial:["",l,a],conic:[j,l,a]},Ft,Lt]}],"bg-color":[{bg:d()}],"gradient-from-pos":[{from:ce()}],"gradient-via-pos":[{via:ce()}],"gradient-to-pos":[{to:ce()}],"gradient-from":[{from:d()}],"gradient-via":[{via:d()}],"gradient-to":[{to:d()}],rounded:[{rounded:_()}],"rounded-s":[{"rounded-s":_()}],"rounded-e":[{"rounded-e":_()}],"rounded-t":[{"rounded-t":_()}],"rounded-r":[{"rounded-r":_()}],"rounded-b":[{"rounded-b":_()}],"rounded-l":[{"rounded-l":_()}],"rounded-ss":[{"rounded-ss":_()}],"rounded-se":[{"rounded-se":_()}],"rounded-ee":[{"rounded-ee":_()}],"rounded-es":[{"rounded-es":_()}],"rounded-tl":[{"rounded-tl":_()}],"rounded-tr":[{"rounded-tr":_()}],"rounded-br":[{"rounded-br":_()}],"rounded-bl":[{"rounded-bl":_()}],"border-w":[{border:C()}],"border-w-x":[{"border-x":C()}],"border-w-y":[{"border-y":C()}],"border-w-s":[{"border-s":C()}],"border-w-e":[{"border-e":C()}],"border-w-t":[{"border-t":C()}],"border-w-r":[{"border-r":C()}],"border-w-b":[{"border-b":C()}],"border-w-l":[{"border-l":C()}],"divide-x":[{"divide-x":C()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":C()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:d()}],"border-color-x":[{"border-x":d()}],"border-color-y":[{"border-y":d()}],"border-color-s":[{"border-s":d()}],"border-color-e":[{"border-e":d()}],"border-color-t":[{"border-t":d()}],"border-color-r":[{"border-r":d()}],"border-color-b":[{"border-b":d()}],"border-color-l":[{"border-l":d()}],"divide-color":[{divide:d()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[f,l,a]}],"outline-w":[{outline:["",f,q,U]}],"outline-color":[{outline:d()}],shadow:[{shadow:["","none",h,se,ne]}],"shadow-color":[{shadow:d()}],"inset-shadow":[{"inset-shadow":["none",y,se,ne]}],"inset-shadow-color":[{"inset-shadow":d()}],"ring-w":[{ring:C()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:d()}],"ring-offset-w":[{"ring-offset":[f,U]}],"ring-offset-color":[{"ring-offset":d()}],"inset-ring-w":[{"inset-ring":C()}],"inset-ring-color":[{"inset-ring":d()}],"text-shadow":[{"text-shadow":["none",I,se,ne]}],"text-shadow-color":[{"text-shadow":d()}],opacity:[{opacity:[f,l,a]}],"mix-blend":[{"mix-blend":[...Ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ae()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[f]}],"mask-image-linear-from-pos":[{"mask-linear-from":v()}],"mask-image-linear-to-pos":[{"mask-linear-to":v()}],"mask-image-linear-from-color":[{"mask-linear-from":d()}],"mask-image-linear-to-color":[{"mask-linear-to":d()}],"mask-image-t-from-pos":[{"mask-t-from":v()}],"mask-image-t-to-pos":[{"mask-t-to":v()}],"mask-image-t-from-color":[{"mask-t-from":d()}],"mask-image-t-to-color":[{"mask-t-to":d()}],"mask-image-r-from-pos":[{"mask-r-from":v()}],"mask-image-r-to-pos":[{"mask-r-to":v()}],"mask-image-r-from-color":[{"mask-r-from":d()}],"mask-image-r-to-color":[{"mask-r-to":d()}],"mask-image-b-from-pos":[{"mask-b-from":v()}],"mask-image-b-to-pos":[{"mask-b-to":v()}],"mask-image-b-from-color":[{"mask-b-from":d()}],"mask-image-b-to-color":[{"mask-b-to":d()}],"mask-image-l-from-pos":[{"mask-l-from":v()}],"mask-image-l-to-pos":[{"mask-l-to":v()}],"mask-image-l-from-color":[{"mask-l-from":d()}],"mask-image-l-to-color":[{"mask-l-to":d()}],"mask-image-x-from-pos":[{"mask-x-from":v()}],"mask-image-x-to-pos":[{"mask-x-to":v()}],"mask-image-x-from-color":[{"mask-x-from":d()}],"mask-image-x-to-color":[{"mask-x-to":d()}],"mask-image-y-from-pos":[{"mask-y-from":v()}],"mask-image-y-to-pos":[{"mask-y-to":v()}],"mask-image-y-from-color":[{"mask-y-from":d()}],"mask-image-y-to-color":[{"mask-y-to":d()}],"mask-image-radial":[{"mask-radial":[l,a]}],"mask-image-radial-from-pos":[{"mask-radial-from":v()}],"mask-image-radial-to-pos":[{"mask-radial-to":v()}],"mask-image-radial-from-color":[{"mask-radial-from":d()}],"mask-image-radial-to-color":[{"mask-radial-to":d()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[f]}],"mask-image-conic-from-pos":[{"mask-conic-from":v()}],"mask-image-conic-to-pos":[{"mask-conic-to":v()}],"mask-image-conic-from-color":[{"mask-conic-from":d()}],"mask-image-conic-to-color":[{"mask-conic-to":d()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Oe()}],"mask-repeat":[{mask:_e()}],"mask-size":[{mask:Ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",l,a]}],filter:[{filter:["","none",l,a]}],blur:[{blur:Ce()}],brightness:[{brightness:[f,l,a]}],contrast:[{contrast:[f,l,a]}],"drop-shadow":[{"drop-shadow":["","none",O,se,ne]}],"drop-shadow-color":[{"drop-shadow":d()}],grayscale:[{grayscale:["",f,l,a]}],"hue-rotate":[{"hue-rotate":[f,l,a]}],invert:[{invert:["",f,l,a]}],saturate:[{saturate:[f,l,a]}],sepia:[{sepia:["",f,l,a]}],"backdrop-filter":[{"backdrop-filter":["","none",l,a]}],"backdrop-blur":[{"backdrop-blur":Ce()}],"backdrop-brightness":[{"backdrop-brightness":[f,l,a]}],"backdrop-contrast":[{"backdrop-contrast":[f,l,a]}],"backdrop-grayscale":[{"backdrop-grayscale":["",f,l,a]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f,l,a]}],"backdrop-invert":[{"backdrop-invert":["",f,l,a]}],"backdrop-opacity":[{"backdrop-opacity":[f,l,a]}],"backdrop-saturate":[{"backdrop-saturate":[f,l,a]}],"backdrop-sepia":[{"backdrop-sepia":["",f,l,a]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":c()}],"border-spacing-x":[{"border-spacing-x":c()}],"border-spacing-y":[{"border-spacing-y":c()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",l,a]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[f,"initial",l,a]}],ease:[{ease:["linear","initial",T,l,a]}],delay:[{delay:[f,l,a]}],animate:[{animate:["none",G,l,a]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,l,a]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[l,a,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:d()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:d()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",l,a]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":c()}],"scroll-mx":[{"scroll-mx":c()}],"scroll-my":[{"scroll-my":c()}],"scroll-ms":[{"scroll-ms":c()}],"scroll-me":[{"scroll-me":c()}],"scroll-mt":[{"scroll-mt":c()}],"scroll-mr":[{"scroll-mr":c()}],"scroll-mb":[{"scroll-mb":c()}],"scroll-ml":[{"scroll-ml":c()}],"scroll-p":[{"scroll-p":c()}],"scroll-px":[{"scroll-px":c()}],"scroll-py":[{"scroll-py":c()}],"scroll-ps":[{"scroll-ps":c()}],"scroll-pe":[{"scroll-pe":c()}],"scroll-pt":[{"scroll-pt":c()}],"scroll-pr":[{"scroll-pr":c()}],"scroll-pb":[{"scroll-pb":c()}],"scroll-pl":[{"scroll-pl":c()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",l,a]}],fill:[{fill:["none",...d()]}],"stroke-w":[{stroke:[f,q,U,pe]}],stroke:[{stroke:["none",...d()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Bt=St(Ut);function D(...e){return Bt(Ke(e))}const Wt={primary:"rounded-[var(--onside-btn-radius,9999px)] whitespace-nowrap leading-none !font-medium transition-bg duration-300 flex items-center justify-center text-center",secondary:"rounded-[var(--onside-btn-radius,9999px)] whitespace-nowrap leading-none !font-medium bg-transparent border transition-bg transition-color duration-300 flex items-center justify-center text-center",text:"whitespace-nowrap leading-none !font-medium transition-colors duration-300 flex items-center justify-center text-center",transparent:"rounded-[var(--onside-btn-radius,9999px)] whitespace-nowrap leading-none !font-medium transition-opacity duration-300 flex items-center justify-center text-center"},Kt={primary:{blue:"bg-[var(--onside-btn-bg,#0A5EFF)] text-[color:var(--onside-btn-text,#FFFFFF)] hover:bg-[var(--onside-btn-bg-hover,#337AFF)] focus:bg-[var(--onside-btn-bg,#0A5EFF)] disabled:bg-[var(--onside-btn-disabled-bg,rgba(10,94,255,0.2))]",lightBlue:"bg-[#e2eaf8] text-blue hover:opacity-60 focus:opacity-100",white:"bg-white text-blue hover:opacity-90 focus:opacity-100 disabled:opacity-50"},secondary:{blue:"border-blue text-blue hover:bg-blue hover:text-white focus:bg-blue focus:text-white",lightBlue:"border-[#e2eaf8] text-[#e2eaf8] hover:bg-[#e2eaf8] hover:text-white focus:bg-[#e2eaf8] focus:text-white",white:"border-white text-white hover:bg-white hover:text-blue focus:bg-white focus:text-blue"},text:{blue:"bg-transparent text-blue hover:underline focus:underline",lightBlue:"bg-transparent text-[#e2eaf8] hover:underline focus:underline",white:"bg-transparent text-white hover:underline focus:underline"},transparent:{blue:"bg-transparent text-blue hover:opacity-75",lightBlue:"bg-transparent text-[#e2eaf8] hover:opacity-75",white:"bg-transparent text-white hover:opacity-75"}},$t={lg:"py-[var(--onside-btn-py,1rem)] px-[var(--onside-btn-px,2rem)] text-[length:var(--onside-btn-font-size,1.125rem)] font-medium",md:"py-[var(--onside-btn-py,0.75rem)] px-[var(--onside-btn-px,1.25rem)] text-[length:var(--onside-btn-font-size,1rem)] font-medium"};function Z({className:e,...t}){const o=t.variant??"primary",r=t.color??"blue",n=t.size??"md",s=D(Wt[o],$t[o!=="text"?n:"md"],Kt[o][r],e);if(typeof t.href>"u"){const u=t;return b.jsx("button",{className:s,...u})}const i=t,p=("rel"in i?i.rel:void 0)??(i.target==="_blank"?"noopener noreferrer":void 0);return b.jsx("a",{className:s,rel:p,...i})}const Ht="https://onside.io/web-api/v1/marketplace/install",ke=1e3,Xt=7*ke,Yt=7*ke,ot=2*ke,we="onside_token_data",Ne=15552e3,ae={IOS:/iPhone|iPad|iPod/i,IPAD:/iPad/i,ANDROID:/Android/i,INTEL_MAC:/Intel Mac/i},g={IOS_CHROME:/CriOS/i,IOS_FIREFOX:/FxiOS/i,IOS_EDGE:/EdgiOS/i,IOS_OPERA:/OPiOS/i,IOS_OPERA_NEW:/OPT\//i,IOS_BRAVE:/Brave\//i,IOS_DUCKDUCKGO:/Ddg\//i,IOS_GOOGLE_APP:/GSA/i,SAFARI:/Safari/i,CHROME:/Chrome|CriOS/i,FIREFOX:/Firefox|FxiOS/i,EDGE:/Edge|Edg/i,OPERA:/Opera|OPiOS|OPT\/|OPR\/|OPX\//i},ie={IOS_VERSION:/Version\/(\d+[_.\d]*)/,IOS_OS:/(?:iPhone|iPad|iPod).*?OS (\d+[_.\d]*)/i,ANDROID_VERSION:/Android\s+(\d+[.\d]*)/,MACOS_VERSION:/Mac OS X (\d+[_.\d]*)/i},ze={MOBILE:/Mobile/i,ANDROID_TABLET_KEYWORDS:/Tablet|SM-T|SM-P|GT-P|SCH-I|SCH-T/i},$={IOS_INSTAGRAM:/\bInstagram\b/i,IOS_FACEBOOK:/\bFBAN\/FBIOS\b|\bFBAV\b/i,IOS_LINKEDIN:/LinkedInApp/i,IOS_DISCORD:/\bDiscord\b/i,IOS_TWITTER:/Twitter for iPhone/i,IOS_TIKTOK:/\bTikTok\b/i},qt=768,Jt=()=>typeof window<"u"&&("ontouchstart"in window||window.navigator?.maxTouchPoints>0||window.navigator?.msMaxTouchPoints>0),Zt=()=>typeof window>"u"?"":window.navigator.userAgent,Qt=e=>{if(ae.IOS.test(e)){const t=ae.IPAD.test(e);return{platform:"ios",isMobile:!t,isTablet:t,isDesktop:!1}}if(ae.ANDROID.test(e)){const t=ze.MOBILE.test(e)&&(window.innerWidth>=qt||ze.ANDROID_TABLET_KEYWORDS.test(e));return{platform:"android",isMobile:!t,isTablet:t,isDesktop:!1}}return eo(e)?{platform:"ios",isMobile:!1,isTablet:!0,isDesktop:!1}:g.IOS_GOOGLE_APP.test(e)?{platform:"ios",isMobile:!0,isTablet:!1,isDesktop:!1}:{platform:"desktop",isMobile:!1,isTablet:!1,isDesktop:!0}},eo=e=>g.SAFARI.test(e)&&ae.INTEL_MAC.test(e)&&!g.CHROME.test(e)&&!g.FIREFOX.test(e)&&!g.OPERA.test(e)?Jt():!1,Le=()=>typeof window?.TelegramWebviewProxy<"u",to=e=>{const t=(...o)=>o.some(r=>r.test(e));return t(g.IOS_EDGE,g.EDGE)?"edge":t(g.IOS_OPERA,g.IOS_OPERA_NEW,g.OPERA)?"opera":t(g.IOS_BRAVE)?"brave":t(g.IOS_DUCKDUCKGO)?"duckduckgo":t(g.IOS_CHROME,g.CHROME)?"chrome":t(g.IOS_GOOGLE_APP)?"google":t(g.IOS_FIREFOX,g.FIREFOX)?"firefox":g.SAFARI.test(e)&&!g.CHROME.test(e)&&!g.FIREFOX.test(e)&&!g.OPERA.test(e)&&!g.IOS_BRAVE.test(e)&&!g.IOS_DUCKDUCKGO.test(e)&&!g.IOS_GOOGLE_APP.test(e)&&!Le()?"safari":t($.IOS_INSTAGRAM,$.IOS_FACEBOOK,$.IOS_LINKEDIN,$.IOS_DISCORD,$.IOS_TWITTER,$.IOS_TIKTOK)||Le()?"in-app":"unknown"},oo=(e,t)=>{switch(t){case"ios":{let o=e.match(ie.IOS_OS);if(o||(o=e.match(ie.IOS_VERSION)),o){const r=o[1].replace(/_/g,".");return parseFloat(r)}return}case"android":{const o=e.match(ie.ANDROID_VERSION);return o?parseFloat(o[1]):void 0}case"desktop":{const o=e.match(ie.MACOS_VERSION);if(o){const r=o[1].replace(/_/g,".");return parseFloat(r)}return}default:return}},ro={platform:"unknown",browser:"unknown",isMobile:!1,isTablet:!1,isDesktop:!1,version:void 0,userAgent:""};let me=null,De=null,Ge=null;function ye(){if(typeof window>"u")return ro;const e=Zt(),t=window.innerWidth;if(me&&De===e&&Ge===t)return me;const o=Qt(e),r=to(e),n=oo(e,o.platform),s={...o,browser:r,version:n,userAgent:e};return me=s,De=e,Ge=t,s}const Fe=17.6,no=18.6,so=["safari","chrome","edge","brave","duckduckgo"];function io(e){return e.platform==="ios"&&(e.isMobile||e.isTablet)?so.includes(e.browser):!1}function ao(e){return!!(e.platform==="ios"&&e.version&&e.version>=no)}const lo=()=>{const e=ye(),t=io(e),o=!!(e.platform==="ios"&&e.version&&e.version>=Fe),r=!!(e.platform==="ios"&&e.version&&e.version<Fe),n=e.platform==="ios"&&(e.isMobile||e.isTablet)&&!r&&!t,s=ao(e),i=o&&t,p=e.platform==="android";return{canInstall:i,shouldGoToSafari:n,shouldUpdateIOS:r,isIOS186PlusVersion:s,isAndroid:p}},je=e=>{let t;const o=new Set,r=(m,h)=>{const y=typeof m=="function"?m(t):m;if(!Object.is(y,t)){const I=t;t=h??(typeof y!="object"||y===null)?y:Object.assign({},t,y),o.forEach(O=>O(t,I))}},n=()=>t,p={setState:r,getState:n,getInitialState:()=>u,subscribe:m=>(o.add(m),()=>o.delete(m))},u=t=e(r,n,p);return p},co=(e=>e?je(e):je),uo=e=>e;function po(e,t=uo){const o=k.useSyncExternalStore(e.subscribe,k.useCallback(()=>t(e.getState()),[e,t]),k.useCallback(()=>t(e.getInitialState()),[e,t]));return k.useDebugValue(o),o}const Ve=e=>{const t=co(e),o=r=>po(t,r);return Object.assign(o,t),o},rt=(e=>e?Ve(e):Ve),nt=rt(e=>({activeModal:null,openModal:t=>e({activeModal:t}),closeModal:()=>e({activeModal:null})})),mo=e=>{if(typeof document>"u")return null;const t=document.cookie.split("; ").find(r=>r.startsWith(`${e}=`));if(!t)return null;const o=t.indexOf("=");return o!==-1?t.slice(o+1):null},Ue=(e,t,o)=>{if(typeof document>"u")return;const r=new Date(Date.now()+o*1e3),n=typeof window<"u"&&window.location?.protocol==="https:"?"; Secure":"";document.cookie=`${e}=${t}; expires=${r.toUTCString()}; path=/; SameSite=Lax${n}`},fo=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("Secure random UUID generation is not available");const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=Array.from(e,o=>o.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`},st=()=>{const e=mo(we);if(!e)return null;try{return JSON.parse(decodeURIComponent(e)).token}catch{return null}},bo=()=>{const e=st();if(e){const r={token:e,createdAt:Date.now()};return Ue(we,encodeURIComponent(JSON.stringify(r)),Ne),e}const t=fo(),o={token:t,createdAt:Date.now()};return Ue(we,encodeURIComponent(JSON.stringify(o)),Ne),t},go=async e=>{const t=await fetch(Ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({referer_url:window.location.href,onside_token:e})});if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);const o=await t.json();if(!o.url||!o.attribution_token||!o.exp)throw new Error("Invalid response format");return o},ho=async()=>{const t=st()||bo(),o=await go(t),r=o.exp<1e12?o.exp*1e3:o.exp;return{installUrl:o.url,attribution_token:o.attribution_token,is_eligible:o.is_eligible,onside_token:t,install_expires_at:r}},Be=3,wo=e=>Math.min(1e3*2**e,3e4),fe={installUrl:null,attribution_token:null,isEligible:null,onside_token:null,installExpiresAt:null,isLoading:!1,error:null};let J=null;const xo=e=>e?Date.now()<e:!1,B=rt((e,t)=>({...fe,fetchInstallData:async()=>{const o=t();if(!(o.installUrl&&xo(o.installExpiresAt))){if(J){await J;return}if(!o.isLoading){e({isLoading:!0,error:null}),J=(async()=>{let r=null;for(let n=0;n<Be;n++)try{const s=await ho();e({...fe,installUrl:s.installUrl,attribution_token:s.attribution_token,isEligible:s.is_eligible,onside_token:s.onside_token,installExpiresAt:s.install_expires_at,isLoading:!1,error:null});return}catch(s){r=s instanceof Error?s:new Error(String(s)),n<Be-1&&await new Promise(i=>setTimeout(i,wo(n)))}e({isLoading:!1,error:r})})();try{await J}finally{J=null}}}},reset:()=>e(fe)})),ko=(e=!0)=>{const t=B(m=>m.installUrl),o=B(m=>m.attribution_token),r=B(m=>m.isEligible),n=B(m=>m.onside_token),s=B(m=>m.isLoading),i=B(m=>m.error),p=B(m=>m.fetchInstallData),u=k.useRef(!1);return k.useEffect(()=>{e&&!u.current&&(u.current=!0,p())},[e,p]),{installUrl:t,attribution_token:o,isEligible:r,onside_token:n,isLoading:s,error:i,fetchInstallData:p}};function yo(){return typeof window>"u"?!1:localStorage.getItem("onside_analytics_logging")==="true"}function it(e,t={},o){try{if(typeof window>"u")return null;window.dataLayer||(window.dataLayer=[]);const r={...t,...ye()},n={event:"amplitude_event",event_name:e,event_properties:{timestamp:Date.now(),...r},...o?{user_properties:o}:{},url:window.location.href};return window.dataLayer.push({event:n.event,event_name:n.event_name,event_properties:n.event_properties,...n.user_properties?{user_properties:n.user_properties}:{}}),yo()&&console.log("🎯 Analytics Event:",{event_name:n.event_name,event_properties:n.event_properties,user_properties:n.user_properties,url:n.url}),n}catch(r){return console.error("Analytics error:",r),null}}function at(e,t,o,r={}){const n=`${e}.${t}`,s={modal_name:e,event_type:t,...r};return o&&(s.action=o),it(n,s)}const vo={INSTALL_BUTTON_CLICK:"install_button_click"},So=(e={},t)=>({trackInstallEvent:n=>{const s=it(vo.INSTALL_BUTTON_CLICK,{...e,event_type:n});s&&t?.onEvent?.(s)},trackOpenModalEvent:n=>{const s=at(n,"opened","install_button",{...e});s&&t?.onEvent?.(s)}}),Io=e=>{const{id:t,location:o="hero",customAnalytics:r,handleCustomStep:n,pathname:s}=e,i=lo(),{installUrl:p,error:u,onside_token:m,attribution_token:h,isEligible:y}=ko(i.canInstall),{openModal:I}=nt(),[O,S]=k.useState(!1),{trackOpenModalEvent:w,trackInstallEvent:E}=So({page:s,location:o,button_id:t??void 0,onside_token:m??void 0,attribution_token:h??void 0},r),T=k.useCallback(()=>{S(!0);const A=setTimeout(()=>{S(!1),clearTimeout(A)},ot)},[]),G=k.useCallback(A=>{if(!p){A.preventDefault();return}if(n){n();return}E(i.isIOS186PlusVersion?"ios_18_6_plus":"install_click"),window.location.href=p},[p,n,i.isIOS186PlusVersion,E]),M=k.useCallback(()=>{if(i.shouldGoToSafari){w("go_to_safari"),I("goToSafari");return}if(i.shouldUpdateIOS){w("update_ios"),I("updateIOS");return}T(),E("no_condition_matched")},[i.shouldGoToSafari,i.shouldUpdateIOS,I,T,E,w]),R=k.useCallback(()=>{w("is_android"),I("isAndroid")},[I,w]);return{viewMode:i.isAndroid?"android":O?"loading":p&&i.canInstall?"link":"button",installUrl:p,error:u,isEligible:y,conditions:i,handleInstallClick:G,handleModalFlowClick:M,handleAndroidClick:R}},Oo=e=>H.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},H.createElement("path",{d:"M12.1268 5.74646C11.3368 5.74646 10.1139 4.84824 8.82613 4.88071C7.12708 4.90235 5.56872 5.8655 4.69214 7.39139C2.92817 10.454 4.23762 14.9776 5.95831 17.4667C6.80243 18.6787 7.79805 20.0423 9.11832 19.999C10.3845 19.9449 10.8607 19.1765 12.3974 19.1765C13.9233 19.1765 14.3562 19.999 15.6981 19.9665C17.0617 19.9449 17.9274 18.7328 18.7607 17.5099C19.7239 16.1031 20.1243 14.7395 20.1459 14.6638C20.1134 14.653 17.4945 13.6465 17.4621 10.6164C17.4404 8.084 19.5291 6.87195 19.6265 6.81784C18.436 5.0755 16.6071 4.88071 15.9686 4.83742C14.3021 4.70755 12.906 5.74646 12.1268 5.74646ZM14.9406 3.19248C15.644 2.34837 16.1093 1.16877 15.9795 0C14.973 0.0432878 13.761 0.670965 13.0359 1.51508C12.3866 2.26179 11.8238 3.46303 11.9753 4.61016C13.09 4.69673 14.2371 4.03659 14.9406 3.19248Z",fill:"currentColor"})),_o=({className:e,onClick:t,children:o,id:r,androidClassName:n,androidTextClassName:s})=>b.jsx(Z,{id:r,className:D("bg-white px-7",e,n),variant:"secondary",size:"lg",onClick:t,children:b.jsxs("span",{className:"flex flex-row items-center gap-1",children:[b.jsx(Oo,{className:s?"text-[#FF465D]":void 0}),b.jsx("span",{className:D("flex-1",s),children:o})]})}),Eo=({href:e,onClick:t,children:o,className:r,id:n})=>b.jsx(Z,{id:n,href:e,size:"lg",onClick:t,className:r,children:o}),Ao=e=>H.createElement("svg",{stroke:"customColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},H.createElement("style",null,".spinner_V8m1{transform-origin:center;animation:spinner_zKoa 2s linear infinite}.spinner_V8m1 circle{stroke-linecap:round;animation:spinner_YpZS 1.5s ease-in-out infinite}@keyframes spinner_zKoa{100%{transform:rotate(360deg)}}@keyframes spinner_YpZS{0%{stroke-dasharray:0 150;stroke-dashoffset:0}47.5%{stroke-dasharray:42 150;stroke-dashoffset:-16}95%,100%{stroke-dasharray:42 150;stroke-dashoffset:-59}}"),H.createElement("g",{className:"spinner_V8m1"},H.createElement("circle",{cx:12,cy:12,r:9.5,fill:"none",strokeWidth:3}))),Co=e=>{const{id:t,className:o,children:r="Loading...",showLoaderOnly:n}=e;return b.jsx(Z,{id:t,className:D("px-8 py-4",o),disabled:!0,children:b.jsxs("span",{className:"flex items-center gap-2",children:[b.jsx(Ao,{className:"size-5 animate-spin stroke-blue"}),!n&&r]})})},To=()=>b.jsx("p",{className:"mt-2 text-center text-sm text-red-600",children:"Unable to load install link. Please try again."}),lt=k.createContext(!1),Mo=e=>{const{className:t,children:o="Install Onside",handleCustomStep:r,location:n="hero",caption:s,captionClassName:i,showCaption:p=!0,showLoaderOnly:u=!1,androidClassName:m,androidTextClassName:h,customAnalytics:y,styleVars:I,id:O}=e,S=typeof window<"u"?window.location.pathname:"",w=k.useContext(lt),{viewMode:E,installUrl:T,error:G,isEligible:M,handleInstallClick:R,handleModalFlowClick:P,handleAndroidClick:A}=Io({id:O,location:n,customAnalytics:y,handleCustomStep:r,pathname:S});k.useEffect(()=>{},[w]);const F=p&&(!M||s)&&b.jsx("div",{className:D("text-2xs font-mono opacity-60 [color:var(--onside-caption-color,rgba(30,28,31,0.6))] [font-size:var(--onside-caption-size,var(--text-2xs))] [line-height:var(--onside-caption-line-height,var(--text-2xs--line-height))]",i),children:M?s:"Only available in the EU. Install from an eligible region."}),c={"data-provider-widget-host":"",style:I};switch(E){case"android":return b.jsx("div",{...c,children:b.jsx(_o,{id:O,className:t,androidClassName:m,androidTextClassName:h,onClick:A,children:"Onside is for iPhone and iPad"})});case"loading":return b.jsx("div",{...c,children:b.jsx(Co,{showLoaderOnly:u,id:O,className:D("bg-buttonHover!",t)})});case"link":return b.jsxs("div",{...c,children:[b.jsxs(Eo,{id:O,className:D(t,"flex-col gap-1"),href:T??"",onClick:R,children:[o,F]}),G&&b.jsx(To,{})]});default:return b.jsx("div",{...c,children:b.jsxs(Z,{id:O,className:D(t,"flex-col gap-1"),size:"lg",onClick:P,children:[o,F]})})}},Ro=k.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./AndroidPlatformModal-BNghy_S2.cjs"))).AndroidPlatformModal})),Po=k.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./GoToSafariModal-DJDoZzSN.cjs"))).GoToSafariModal})),No=k.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./UpdateIOSModal-Cd2FI2Dl.cjs"))).UpdateIOSModal})),zo=()=>{const{activeModal:e,closeModal:t}=nt();return b.jsxs(k.Suspense,{fallback:null,children:[b.jsx(Po,{open:e==="goToSafari",onClose:t}),b.jsx(No,{open:e==="updateIOS",onClose:t}),b.jsx(Ro,{open:e==="isAndroid",onClose:t})]})},Lo=({children:e})=>b.jsxs(lt.Provider,{value:!0,children:[e,b.jsx(zo,{})]});exports.AVERAGE_CHECK_TIME=Yt;exports.AVERAGE_INSTALL_TIME=Xt;exports.AVERAGE_LOADING_TIME=ot;exports.Button=Z;exports.InstallAppButton=Mo;exports.InstallWidgetProvider=Lo;exports.clsx=Ke;exports.cn=D;exports.getDeviceInfo=ye;exports.trackModalEvent=at;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),V=require("react"),et=require("zustand");function tt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const H=tt(V);function ze(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=ze(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function ot(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=ze(e))&&(r&&(r+=" "),r+=t);return r}const we="-",rt=e=>{const t=st(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const p=l.split(we);return p[0]===""&&p.length!==1&&p.shift(),De(p,t)||nt(l)},getConflictingClassGroupIds:(l,p)=>{const u=o[l]||[];return p&&r[l]?[...u,...r[l]]:u}}},De=(e,t)=>{if(e.length===0)return t.classGroupId;const o=e[0],r=t.nextPart.get(o),n=r?De(e.slice(1),r):void 0;if(n)return n;if(t.validators.length===0)return;const a=e.join(we);return t.validators.find(({validator:l})=>l(a))?.classGroupId},_e=/^\[(.+)\]$/,nt=e=>{if(_e.test(e)){const t=_e.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},st=e=>{const{theme:t,classGroups:o}=e,r={nextPart:new Map,validators:[]};for(const n in o)fe(o[n],r,n,t);return r},fe=(e,t,o,r)=>{e.forEach(n=>{if(typeof n=="string"){const a=n===""?t:Ee(t,n);a.classGroupId=o;return}if(typeof n=="function"){if(it(n)){fe(n(r),t,o,r);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([a,l])=>{fe(l,Ee(t,a),o,r)})})},Ee=(e,t)=>{let o=e;return t.split(we).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},it=e=>e.isThemeGetter,at=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map;const n=(a,l)=>{o.set(a,l),t++,t>e&&(t=0,r=o,o=new Map)};return{get(a){let l=o.get(a);if(l!==void 0)return l;if((l=r.get(a))!==void 0)return n(a,l),l},set(a,l){o.has(a)?o.set(a,l):n(a,l)}}},be="!",ge=":",lt=ge.length,ct=e=>{const{prefix:t,experimentalParseClassName:o}=e;let r=n=>{const a=[];let l=0,p=0,u=0,g;for(let v=0;v<n.length;v++){let I=n[v];if(l===0&&p===0){if(I===ge){a.push(n.slice(u,v)),u=v+lt;continue}if(I==="/"){g=v;continue}}I==="["?l++:I==="]"?l--:I==="("?p++:I===")"&&p--}const b=a.length===0?n:n.substring(u),C=dt(b),k=C!==b,_=g&&g>u?g-u:void 0;return{modifiers:a,hasImportantModifier:k,baseClassName:C,maybePostfixModifierPosition:_}};if(t){const n=t+ge,a=r;r=l=>l.startsWith(n)?a(l.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(o){const n=r;r=a=>o({className:a,parseClassName:n})}return r},dt=e=>e.endsWith(be)?e.substring(0,e.length-1):e.startsWith(be)?e.substring(1):e,ut=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const n=[];let a=[];return r.forEach(l=>{l[0]==="["||t[l]?(n.push(...a.sort(),l),a=[]):a.push(l)}),n.push(...a.sort()),n}},mt=e=>({cache:at(e.cacheSize),parseClassName:ct(e),sortModifiers:ut(e),...rt(e)}),pt=/\s+/,ft=(e,t)=>{const{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n,sortModifiers:a}=t,l=[],p=e.trim().split(pt);let u="";for(let g=p.length-1;g>=0;g-=1){const b=p[g],{isExternal:C,modifiers:k,hasImportantModifier:_,baseClassName:v,maybePostfixModifierPosition:I}=o(b);if(C){u=b+(u.length>0?" "+u:u);continue}let z=!!I,T=r(z?v.substring(0,I):v);if(!T){if(!z){u=b+(u.length>0?" "+u:u);continue}if(T=r(v),!T){u=b+(u.length>0?" "+u:u);continue}z=!1}const B=a(k).join(":"),D=_?B+be:B,N=D+T;if(l.includes(N))continue;l.push(N);const E=n(T,z);for(let S=0;S<E.length;++S){const R=E[S];l.push(D+R)}u=b+(u.length>0?" "+u:u)}return u};function bt(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Ge(t))&&(r&&(r+=" "),r+=o);return r}const Ge=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Ge(e[r]))&&(o&&(o+=" "),o+=t);return o};function gt(e,...t){let o,r,n,a=l;function l(u){const g=t.reduce((b,C)=>C(b),e());return o=mt(g),r=o.cache.get,n=o.cache.set,a=p,p(u)}function p(u){const g=r(u);if(g)return g;const b=ft(u,o);return n(u,b),b}return function(){return a(bt.apply(null,arguments))}}const h=e=>{const t=o=>o[e]||[];return t.isThemeGetter=!0,t},Ve=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ue=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ht=/^\d+\/\d+$/,wt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,W=e=>ht.test(e),m=e=>!!e&&!Number.isNaN(Number(e)),G=e=>!!e&&Number.isInteger(Number(e)),ue=e=>e.endsWith("%")&&m(e.slice(0,-1)),L=e=>wt.test(e),It=()=>!0,St=e=>xt.test(e)&&!kt.test(e),Fe=()=>!1,Ot=e=>yt.test(e),_t=e=>vt.test(e),Et=e=>!s(e)&&!i(e),At=e=>X(e,Ke,Fe),s=e=>Ve.test(e),F=e=>X(e,We,St),me=e=>X(e,Nt,m),Ae=e=>X(e,je,Fe),Ct=e=>X(e,Be,_t),re=e=>X(e,$e,Ot),i=e=>Ue.test(e),J=e=>Y(e,We),Tt=e=>Y(e,Pt),Ce=e=>Y(e,je),Rt=e=>Y(e,Ke),Mt=e=>Y(e,Be),ne=e=>Y(e,$e,!0),X=(e,t,o)=>{const r=Ve.exec(e);return r?r[1]?t(r[1]):o(r[2]):!1},Y=(e,t,o=!1)=>{const r=Ue.exec(e);return r?r[1]?t(r[1]):o:!1},je=e=>e==="position"||e==="percentage",Be=e=>e==="image"||e==="url",Ke=e=>e==="length"||e==="size"||e==="bg-size",We=e=>e==="length",Nt=e=>e==="number",Pt=e=>e==="family-name",$e=e=>e==="shadow",Lt=()=>{const e=h("color"),t=h("font"),o=h("text"),r=h("font-weight"),n=h("tracking"),a=h("leading"),l=h("breakpoint"),p=h("container"),u=h("spacing"),g=h("radius"),b=h("shadow"),C=h("inset-shadow"),k=h("text-shadow"),_=h("drop-shadow"),v=h("blur"),I=h("perspective"),z=h("aspect"),T=h("ease"),B=h("animate"),D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...N(),i,s],S=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],d=()=>[i,s,u],A=()=>[W,"full","auto",...d()],Z=()=>[G,"none","subgrid",i,s],q=()=>["auto",{span:["full",G,i,s]},G,i,s],M=()=>[G,"auto",i,s],ke=()=>["auto","min","max","fr",i,s],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...d()],U=()=>[W,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...d()],c=()=>[e,i,s],ye=()=>[...N(),Ce,Ae,{position:[i,s]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ie=()=>["auto","cover","contain",Rt,At,{size:[i,s]}],ce=()=>[ue,J,F],y=()=>["","none","full",g,i,s],O=()=>["",m,J,F],Q=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],x=()=>[m,ue,Ce,Ae],Oe=()=>["","none",v,i,s],ee=()=>["none",m,i,s],te=()=>["none",m,i,s],de=()=>[m,i,s],oe=()=>[W,"full",...d()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[L],breakpoint:[L],color:[It],container:[L],"drop-shadow":[L],ease:["in","out","in-out"],font:[Et],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[L],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[L],shadow:[L],spacing:["px",m],text:[L],"text-shadow":[L],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",W,s,i,z]}],container:["container"],columns:[{columns:[m,s,i,p]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[G,"auto",i,s]}],basis:[{basis:[W,"full","auto",p,...d()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[m,W,"auto","initial","none",s]}],grow:[{grow:["",m,i,s]}],shrink:[{shrink:["",m,i,s]}],order:[{order:[G,"first","last","none",i,s]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ke()}],"auto-rows":[{"auto-rows":ke()}],gap:[{gap:d()}],"gap-x":[{"gap-x":d()}],"gap-y":[{"gap-y":d()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:d()}],px:[{px:d()}],py:[{py:d()}],ps:[{ps:d()}],pe:[{pe:d()}],pt:[{pt:d()}],pr:[{pr:d()}],pb:[{pb:d()}],pl:[{pl:d()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":d()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":d()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[p,"screen",...U()]}],"min-w":[{"min-w":[p,"screen","none",...U()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[l]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",o,J,F]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,i,me]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ue,s]}],"font-family":[{font:[Tt,s,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,i,s]}],"line-clamp":[{"line-clamp":[m,"none",i,me]}],leading:[{leading:[a,...d()]}],"list-image":[{"list-image":["none",i,s]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",i,s]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:c()}],"text-color":[{text:c()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[m,"from-font","auto",i,F]}],"text-decoration-color":[{decoration:c()}],"underline-offset":[{"underline-offset":[m,"auto",i,s]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:d()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",i,s]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",i,s]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ye()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:Ie()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},G,i,s],radial:["",i,s],conic:[G,i,s]},Mt,Ct]}],"bg-color":[{bg:c()}],"gradient-from-pos":[{from:ce()}],"gradient-via-pos":[{via:ce()}],"gradient-to-pos":[{to:ce()}],"gradient-from":[{from:c()}],"gradient-via":[{via:c()}],"gradient-to":[{to:c()}],rounded:[{rounded:y()}],"rounded-s":[{"rounded-s":y()}],"rounded-e":[{"rounded-e":y()}],"rounded-t":[{"rounded-t":y()}],"rounded-r":[{"rounded-r":y()}],"rounded-b":[{"rounded-b":y()}],"rounded-l":[{"rounded-l":y()}],"rounded-ss":[{"rounded-ss":y()}],"rounded-se":[{"rounded-se":y()}],"rounded-ee":[{"rounded-ee":y()}],"rounded-es":[{"rounded-es":y()}],"rounded-tl":[{"rounded-tl":y()}],"rounded-tr":[{"rounded-tr":y()}],"rounded-br":[{"rounded-br":y()}],"rounded-bl":[{"rounded-bl":y()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":O()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:c()}],"border-color-x":[{"border-x":c()}],"border-color-y":[{"border-y":c()}],"border-color-s":[{"border-s":c()}],"border-color-e":[{"border-e":c()}],"border-color-t":[{"border-t":c()}],"border-color-r":[{"border-r":c()}],"border-color-b":[{"border-b":c()}],"border-color-l":[{"border-l":c()}],"divide-color":[{divide:c()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[m,i,s]}],"outline-w":[{outline:["",m,J,F]}],"outline-color":[{outline:c()}],shadow:[{shadow:["","none",b,ne,re]}],"shadow-color":[{shadow:c()}],"inset-shadow":[{"inset-shadow":["none",C,ne,re]}],"inset-shadow-color":[{"inset-shadow":c()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:c()}],"ring-offset-w":[{"ring-offset":[m,F]}],"ring-offset-color":[{"ring-offset":c()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":c()}],"text-shadow":[{"text-shadow":["none",k,ne,re]}],"text-shadow-color":[{"text-shadow":c()}],opacity:[{opacity:[m,i,s]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[m]}],"mask-image-linear-from-pos":[{"mask-linear-from":x()}],"mask-image-linear-to-pos":[{"mask-linear-to":x()}],"mask-image-linear-from-color":[{"mask-linear-from":c()}],"mask-image-linear-to-color":[{"mask-linear-to":c()}],"mask-image-t-from-pos":[{"mask-t-from":x()}],"mask-image-t-to-pos":[{"mask-t-to":x()}],"mask-image-t-from-color":[{"mask-t-from":c()}],"mask-image-t-to-color":[{"mask-t-to":c()}],"mask-image-r-from-pos":[{"mask-r-from":x()}],"mask-image-r-to-pos":[{"mask-r-to":x()}],"mask-image-r-from-color":[{"mask-r-from":c()}],"mask-image-r-to-color":[{"mask-r-to":c()}],"mask-image-b-from-pos":[{"mask-b-from":x()}],"mask-image-b-to-pos":[{"mask-b-to":x()}],"mask-image-b-from-color":[{"mask-b-from":c()}],"mask-image-b-to-color":[{"mask-b-to":c()}],"mask-image-l-from-pos":[{"mask-l-from":x()}],"mask-image-l-to-pos":[{"mask-l-to":x()}],"mask-image-l-from-color":[{"mask-l-from":c()}],"mask-image-l-to-color":[{"mask-l-to":c()}],"mask-image-x-from-pos":[{"mask-x-from":x()}],"mask-image-x-to-pos":[{"mask-x-to":x()}],"mask-image-x-from-color":[{"mask-x-from":c()}],"mask-image-x-to-color":[{"mask-x-to":c()}],"mask-image-y-from-pos":[{"mask-y-from":x()}],"mask-image-y-to-pos":[{"mask-y-to":x()}],"mask-image-y-from-color":[{"mask-y-from":c()}],"mask-image-y-to-color":[{"mask-y-to":c()}],"mask-image-radial":[{"mask-radial":[i,s]}],"mask-image-radial-from-pos":[{"mask-radial-from":x()}],"mask-image-radial-to-pos":[{"mask-radial-to":x()}],"mask-image-radial-from-color":[{"mask-radial-from":c()}],"mask-image-radial-to-color":[{"mask-radial-to":c()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[m]}],"mask-image-conic-from-pos":[{"mask-conic-from":x()}],"mask-image-conic-to-pos":[{"mask-conic-to":x()}],"mask-image-conic-from-color":[{"mask-conic-from":c()}],"mask-image-conic-to-color":[{"mask-conic-to":c()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ye()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:Ie()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",i,s]}],filter:[{filter:["","none",i,s]}],blur:[{blur:Oe()}],brightness:[{brightness:[m,i,s]}],contrast:[{contrast:[m,i,s]}],"drop-shadow":[{"drop-shadow":["","none",_,ne,re]}],"drop-shadow-color":[{"drop-shadow":c()}],grayscale:[{grayscale:["",m,i,s]}],"hue-rotate":[{"hue-rotate":[m,i,s]}],invert:[{invert:["",m,i,s]}],saturate:[{saturate:[m,i,s]}],sepia:[{sepia:["",m,i,s]}],"backdrop-filter":[{"backdrop-filter":["","none",i,s]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[m,i,s]}],"backdrop-contrast":[{"backdrop-contrast":[m,i,s]}],"backdrop-grayscale":[{"backdrop-grayscale":["",m,i,s]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m,i,s]}],"backdrop-invert":[{"backdrop-invert":["",m,i,s]}],"backdrop-opacity":[{"backdrop-opacity":[m,i,s]}],"backdrop-saturate":[{"backdrop-saturate":[m,i,s]}],"backdrop-sepia":[{"backdrop-sepia":["",m,i,s]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":d()}],"border-spacing-x":[{"border-spacing-x":d()}],"border-spacing-y":[{"border-spacing-y":d()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",i,s]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[m,"initial",i,s]}],ease:[{ease:["linear","initial",T,i,s]}],delay:[{delay:[m,i,s]}],animate:[{animate:["none",B,i,s]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[I,i,s]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[i,s,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":["translate-none"],accent:[{accent:c()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:c()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",i,s]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":d()}],"scroll-mx":[{"scroll-mx":d()}],"scroll-my":[{"scroll-my":d()}],"scroll-ms":[{"scroll-ms":d()}],"scroll-me":[{"scroll-me":d()}],"scroll-mt":[{"scroll-mt":d()}],"scroll-mr":[{"scroll-mr":d()}],"scroll-mb":[{"scroll-mb":d()}],"scroll-ml":[{"scroll-ml":d()}],"scroll-p":[{"scroll-p":d()}],"scroll-px":[{"scroll-px":d()}],"scroll-py":[{"scroll-py":d()}],"scroll-ps":[{"scroll-ps":d()}],"scroll-pe":[{"scroll-pe":d()}],"scroll-pt":[{"scroll-pt":d()}],"scroll-pr":[{"scroll-pr":d()}],"scroll-pb":[{"scroll-pb":d()}],"scroll-pl":[{"scroll-pl":d()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",i,s]}],fill:[{fill:["none",...c()]}],"stroke-w":[{stroke:[m,J,F,me]}],stroke:[{stroke:["none",...c()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},zt=gt(Lt);function j(...e){return zt(ot(e))}const Dt={primary:"rounded-full whitespace-nowrap leading-none !font-medium transition-bg duration-300 flex items-center justify-center text-center",secondary:"rounded-full whitespace-nowrap leading-none !font-medium bg-transparent border transition-bg transition-color duration-300 flex items-center justify-center text-center",text:"whitespace-nowrap leading-none !font-medium transition-colors duration-300 flex items-center justify-center text-center",transparent:"rounded-full whitespace-nowrap leading-none !font-medium transition-opacity duration-300 flex items-center justify-center text-center"},Gt={primary:{blue:"bg-blue text-white hover:bg-buttonHover focus:bg-blue disabled:bg-buttonDisabled",lightBlue:"bg-[#e2eaf8] text-blue hover:opacity-60 focus:opacity-100",white:"bg-white text-blue hover:opacity-90 focus:opacity-100 disabled:opacity-50"},secondary:{blue:"border-blue text-blue hover:bg-blue hover:text-white focus:bg-blue focus:text-white",lightBlue:"border-[#e2eaf8] text-[#e2eaf8] hover:bg-[#e2eaf8] hover:text-white focus:bg-[#e2eaf8] focus:text-white",white:"border-white text-white hover:bg-white hover:text-blue focus:bg-white focus:text-blue"},text:{blue:"bg-transparent text-blue hover:underline focus:underline",lightBlue:"bg-transparent text-[#e2eaf8] hover:underline focus:underline",white:"bg-transparent text-white hover:underline focus:underline"},transparent:{blue:"bg-transparent text-blue hover:opacity-75",lightBlue:"bg-transparent text-[#e2eaf8] hover:opacity-75",white:"bg-transparent text-white hover:opacity-75"}},Vt={lg:"py-4 px-8 text-button-l",md:"py-3 px-5 text-button-m"};function ae({className:e,...t}){const o=t.variant??"primary",r=t.color??"blue",n=t.size??"md",a=j(Dt[o],Vt[o!=="text"?n:"md"],Gt[o][r],e);if(typeof t.href>"u"){const g=t;return w.jsx("button",{className:a,...g})}const{purelink:l,...p}=t,u=("rel"in p?p.rel:void 0)??(p.target==="_blank"?"noopener noreferrer":void 0);return w.jsx("a",{className:a,rel:u,...p})}const Ut="https://onside.io/web-api/v1/marketplace/install",xe=1e3,Ft=e=>{if(typeof document>"u")return null;const t=document.cookie.split("; ").find(r=>r.startsWith(`${e}=`));if(!t)return null;const o=t.indexOf("=");return o!==-1?t.slice(o+1):null},Te=(e,t,o)=>{if(typeof document>"u")return;const r=new Date(Date.now()+o*1e3),n=typeof window<"u"&&window.location?.protocol==="https:"?"; Secure":"";document.cookie=`${e}=${t}; expires=${r.toUTCString()}; path=/; SameSite=Lax${n}`},jt=7*xe,Bt=7*xe,He=2*xe,he="onside_token_data",Re=15552e3,Kt=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("Secure random UUID generation is not available");const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=Array.from(e,o=>o.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`},Xe=()=>{const e=Ft(he);if(!e)return null;try{return JSON.parse(decodeURIComponent(e)).token}catch{return null}},Wt=()=>{const e=Xe();if(e){const r={token:e,createdAt:Date.now()};return Te(he,encodeURIComponent(JSON.stringify(r)),Re),e}const t=Kt(),o={token:t,createdAt:Date.now()};return Te(he,encodeURIComponent(JSON.stringify(o)),Re),t},$t=async e=>{const t=await fetch(Ut,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({referer_url:window.location.href,onside_token:e})});if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);const o=await t.json();if(!o.url||!o.attribution_token||!o.exp)throw new Error("Invalid response format");return o},Ht=async()=>{const t=Xe()||Wt(),o=await $t(t);return{installUrl:o.url,attribution_token:o.attribution_token,is_eligible:o.is_eligible,onside_token:t}},Me=3,Xt=e=>Math.min(1e3*2**e,3e4),pe={installUrl:null,attribution_token:null,isEligible:null,onside_token:null,isLoading:!1,error:null},Yt=et.create((e,t)=>({...pe,fetchInstallData:async()=>{if(t().isLoading)return;e({isLoading:!0,error:null});let o=null;for(let r=0;r<Me;r++)try{const n=await Ht();e({...pe,installUrl:n.installUrl,attribution_token:n.attribution_token,isEligible:n.is_eligible,onside_token:n.onside_token,isLoading:!1,error:null});return}catch(n){o=n instanceof Error?n:new Error(String(n)),r<Me-1&&await new Promise(a=>setTimeout(a,Xt(r)))}e({isLoading:!1,error:o})},reset:()=>e(pe)})),Ye=(e=!0)=>{const{installUrl:t,attribution_token:o,isEligible:r,onside_token:n,isLoading:a,error:l,fetchInstallData:p}=Yt(),u=V.useRef(!1);return V.useEffect(()=>{e&&!u.current&&(u.current=!0,p())},[e,p]),{installUrl:t,attribution_token:o,isEligible:r,onside_token:n,isLoading:a,error:l,fetchInstallData:p}},ie={IOS:/iPhone|iPad|iPod/i,IPAD:/iPad/i,ANDROID:/Android/i,INTEL_MAC:/Intel Mac/i},f={IOS_CHROME:/CriOS/i,IOS_FIREFOX:/FxiOS/i,IOS_EDGE:/EdgiOS/i,IOS_OPERA:/OPiOS/i,IOS_OPERA_NEW:/OPT\//i,IOS_BRAVE:/Brave\//i,IOS_DUCKDUCKGO:/Ddg\//i,IOS_GOOGLE_APP:/GSA/i,SAFARI:/Safari/i,CHROME:/Chrome|CriOS/i,FIREFOX:/Firefox|FxiOS/i,EDGE:/Edge|Edg/i,OPERA:/Opera|OPiOS|OPT\/|OPR\/|OPX\//i},se={IOS_VERSION:/Version\/(\d+[_\.\d]*)/,IOS_OS:/(?:iPhone|iPad|iPod).*?OS (\d+[_\.\d]*)/i,ANDROID_VERSION:/Android\s+(\d+[\.\d]*)/,MACOS_VERSION:/Mac OS X (\d+[_\.\d]*)/i},Ne={MOBILE:/Mobile/i,ANDROID_TABLET_KEYWORDS:/Tablet|SM-T|SM-P|GT-P|SCH-I|SCH-T/i},$={IOS_INSTAGRAM:/\bInstagram\b/i,IOS_FACEBOOK:/\bFBAN\/FBIOS\b|\bFBAV\b/i,IOS_LINKEDIN:/LinkedInApp/i,IOS_DISCORD:/\bDiscord\b/i,IOS_TWITTER:/Twitter for iPhone/i,IOS_TIKTOK:/\bTikTok\b/i},qt=768,Jt=()=>typeof window<"u"&&("ontouchstart"in window||window.navigator?.maxTouchPoints>0||window.navigator?.msMaxTouchPoints>0),Zt=()=>typeof window>"u"?"":window.navigator.userAgent,Qt=e=>{if(ie.IOS.test(e)){const t=ie.IPAD.test(e);return{platform:"ios",isMobile:!t,isTablet:t,isDesktop:!1}}if(ie.ANDROID.test(e)){const t=Ne.MOBILE.test(e)&&(window.innerWidth>=qt||Ne.ANDROID_TABLET_KEYWORDS.test(e));return{platform:"android",isMobile:!t,isTablet:t,isDesktop:!1}}return eo(e)?{platform:"ios",isMobile:!1,isTablet:!0,isDesktop:!1}:f.IOS_GOOGLE_APP.test(e)?{platform:"ios",isMobile:!0,isTablet:!1,isDesktop:!1}:{platform:"desktop",isMobile:!1,isTablet:!1,isDesktop:!0}},eo=e=>f.SAFARI.test(e)&&ie.INTEL_MAC.test(e)&&!f.CHROME.test(e)&&!f.FIREFOX.test(e)&&!f.OPERA.test(e)?Jt():!1,Pe=()=>typeof window?.TelegramWebviewProxy<"u",to=e=>{const t=(...o)=>o.some(r=>r.test(e));return t(f.IOS_EDGE,f.EDGE)?"edge":t(f.IOS_OPERA,f.IOS_OPERA_NEW,f.OPERA)?"opera":t(f.IOS_BRAVE)?"brave":t(f.IOS_DUCKDUCKGO)?"duckduckgo":t(f.IOS_CHROME,f.CHROME)?"chrome":t(f.IOS_GOOGLE_APP)?"google":t(f.IOS_FIREFOX,f.FIREFOX)?"firefox":f.SAFARI.test(e)&&!f.CHROME.test(e)&&!f.FIREFOX.test(e)&&!f.OPERA.test(e)&&!f.IOS_BRAVE.test(e)&&!f.IOS_DUCKDUCKGO.test(e)&&!f.IOS_GOOGLE_APP.test(e)&&!Pe()?"safari":t($.IOS_INSTAGRAM,$.IOS_FACEBOOK,$.IOS_LINKEDIN,$.IOS_DISCORD,$.IOS_TWITTER,$.IOS_TIKTOK)||Pe()?"in-app":"unknown"},oo=(e,t)=>{switch(t){case"ios":{let o=e.match(se.IOS_OS);if(o||(o=e.match(se.IOS_VERSION)),o){const r=o[1].replace(/_/g,".");return parseFloat(r)}return}case"android":{const o=e.match(se.ANDROID_VERSION);return o?parseFloat(o[1]):void 0}case"desktop":{const o=e.match(se.MACOS_VERSION);if(o){const r=o[1].replace(/_/g,".");return parseFloat(r)}return}default:return}},ro={platform:"unknown",browser:"unknown",isMobile:!1,isTablet:!1,isDesktop:!1,version:void 0,userAgent:""};function qe(){if(typeof window>"u")return ro;const e=Zt(),t=Qt(e),o=to(e),r=oo(e,t.platform);return{...t,browser:o,version:r,userAgent:e}}const Le=17.6,no=18.6,so=["safari","chrome","edge","brave","duckduckgo"];function io(e){return e.platform==="ios"&&(e.isMobile||e.isTablet)?so.includes(e.browser):!1}function ao(e){return!!(e.platform==="ios"&&e.version&&e.version>=no)}const Je=()=>{const e=qe(),t=io(e),o=!!(e.platform==="ios"&&e.version&&e.version>=Le),r=!!(e.platform==="ios"&&e.version&&e.version<Le),n=e.platform==="ios"&&(e.isMobile||e.isTablet)&&!r&&!t,a=ao(e),l=o&&t,p=e.platform==="android";return{canInstall:l,shouldGoToSafari:n,shouldUpdateIOS:r,isIOS186PlusVersion:a,isAndroid:p}};function Ze(e,t={},o){try{if(typeof window>"u")return;window.dataLayer||(window.dataLayer=[]);const r={...t,...qe()};window.dataLayer.push({event:"amplitude_event",event_name:e,event_properties:{timestamp:Date.now(),...r},...o?{user_properties:o}:{}}),console.log("🎯 Analytics Event:",{event_name:e,event_properties:{timestamp:new Date().toISOString(),...r},user_properties:o,url:window.location.href})}catch(r){console.error("Analytics error:",r)}}function lo(e,t,o,r={}){const n=`${e}.${t}`,a={modal_name:e,event_type:t,...r};a.action=o,Ze(n,a)}const co={INSTALL_BUTTON_CLICK:"install_button_click"},Qe=(e={})=>({trackInstallEvent:r=>{Ze(co.INSTALL_BUTTON_CLICK,{...e,event_type:r})},trackOpenModalEvent:r=>{lo(r,"opened","install_button",{...e})}}),uo=e=>H.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},H.createElement("path",{d:"M12.1268 5.74646C11.3368 5.74646 10.1139 4.84824 8.82613 4.88071C7.12708 4.90235 5.56872 5.8655 4.69214 7.39139C2.92817 10.454 4.23762 14.9776 5.95831 17.4667C6.80243 18.6787 7.79805 20.0423 9.11832 19.999C10.3845 19.9449 10.8607 19.1765 12.3974 19.1765C13.9233 19.1765 14.3562 19.999 15.6981 19.9665C17.0617 19.9449 17.9274 18.7328 18.7607 17.5099C19.7239 16.1031 20.1243 14.7395 20.1459 14.6638C20.1134 14.653 17.4945 13.6465 17.4621 10.6164C17.4404 8.084 19.5291 6.87195 19.6265 6.81784C18.436 5.0755 16.6071 4.88071 15.9686 4.83742C14.3021 4.70755 12.906 5.74646 12.1268 5.74646ZM14.9406 3.19248C15.644 2.34837 16.1093 1.16877 15.9795 0C14.973 0.0432878 13.761 0.670965 13.0359 1.51508C12.3866 2.26179 11.8238 3.46303 11.9753 4.61016C13.09 4.69673 14.2371 4.03659 14.9406 3.19248Z",fill:"currentColor"})),mo=({className:e,onClick:t,children:o,id:r,androidClassName:n,androidTextClassName:a})=>w.jsx(ae,{id:r,className:j("bg-white px-7",e,n),variant:"secondary",size:"lg",onClick:t,children:w.jsxs("span",{className:"flex flex-row items-center gap-1",children:[w.jsx(uo,{className:a?"text-[#FF465D]":void 0}),w.jsx("span",{className:j("flex-1",a),children:o})]})}),po=({href:e,onClick:t,children:o,className:r,id:n})=>w.jsx(ae,{id:n,href:e,purelink:!0,size:"lg",onClick:t,className:r,children:o}),fo=e=>H.createElement("svg",{stroke:"customColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},H.createElement("style",null,".spinner_V8m1{transform-origin:center;animation:spinner_zKoa 2s linear infinite}.spinner_V8m1 circle{stroke-linecap:round;animation:spinner_YpZS 1.5s ease-in-out infinite}@keyframes spinner_zKoa{100%{transform:rotate(360deg)}}@keyframes spinner_YpZS{0%{stroke-dasharray:0 150;stroke-dashoffset:0}47.5%{stroke-dasharray:42 150;stroke-dashoffset:-16}95%,100%{stroke-dasharray:42 150;stroke-dashoffset:-59}}"),H.createElement("g",{className:"spinner_V8m1"},H.createElement("circle",{cx:12,cy:12,r:9.5,fill:"none",strokeWidth:3}))),bo=e=>{const{id:t,className:o,children:r="Loading...",showLoaderOnly:n}=e;return w.jsx(ae,{id:t,className:j("px-8 py-4",o),disabled:!0,children:w.jsxs("span",{className:"flex items-center gap-2",children:[w.jsx(fo,{className:"size-5 animate-spin stroke-blue"}),!n&&r]})})},go=()=>w.jsx("p",{className:"mt-2 text-center text-sm text-red-600",children:"Unable to load install link. Please try again."}),ho=e=>{const{className:t,children:o="Install Onside",handleCustomStep:r,location:n="hero",caption:a,showCaption:l=!0,showLoaderOnly:p=!1,androidClassName:u,androidTextClassName:g,id:b}=e,C=typeof window<"u"?window.location.pathname:"",k=Je();console.log("conditions",k);const{installUrl:_,error:v,onside_token:I,attribution_token:z,isEligible:T}=Ye(k.canInstall);console.log("installUrl",_);const[B,D]=V.useState(!1),N=V.useCallback(()=>{D(!0);const M=setTimeout(()=>{D(!1),clearTimeout(M)},He)},[]),E=M=>{console.log("openModal",M)},{trackOpenModalEvent:S,trackInstallEvent:R}=Qe({page:C,location:n,onside_token:I??void 0,attribution_token:z??void 0}),d=V.useCallback(M=>{if(!_){M.preventDefault();return}if(r){r();return}R(k.isIOS186PlusVersion?"ios_18_6_plus":"install_click"),window.location.href=_},[_,r,k.isIOS186PlusVersion,R]),A=V.useCallback(()=>{if(N(),k.shouldGoToSafari){S("go_to_safari"),E("goToSafari");return}if(k.shouldUpdateIOS){S("update_ios"),E("updateIOS");return}R("no_condition_matched")},[N,k.shouldGoToSafari,k.shouldUpdateIOS,S,E,R]),Z=V.useCallback(()=>{S("is_android"),E("isAndroid")},[E,S]),q=l&&(!T||a)&&w.jsx("div",{className:"text-2xs font-mono opacity-60",children:T?a:"Only available in the EU. Install from an eligible region."});return k.isAndroid?w.jsx(mo,{id:b,className:t,androidClassName:u,androidTextClassName:g,onClick:Z,children:"Onside is for iPhone and iPad"}):B?w.jsx(bo,{showLoaderOnly:p,id:b,className:j("bg-buttonHover!",t)}):_&&k.canInstall?w.jsxs(w.Fragment,{children:[w.jsxs(po,{id:b,className:j(t,"flex-col gap-1"),href:_,onClick:d,children:[o,q]}),v&&w.jsx(go,{})]}):w.jsxs(ae,{id:b,className:j(t,"flex-col gap-1"),size:"lg",onClick:A,children:[o,q]})};exports.AVERAGE_CHECK_TIME=Bt;exports.AVERAGE_INSTALL_TIME=jt;exports.AVERAGE_LOADING_TIME=He;exports.InstallAppButton=ho;exports.createInstallAnalyticsHandler=Qe;exports.useInstallConditions=Je;exports.useInstallUrl=Ye;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./install-package-q3ncGygt.cjs");exports.AVERAGE_CHECK_TIME=E.AVERAGE_CHECK_TIME;exports.AVERAGE_INSTALL_TIME=E.AVERAGE_INSTALL_TIME;exports.AVERAGE_LOADING_TIME=E.AVERAGE_LOADING_TIME;exports.InstallAppButton=E.InstallAppButton;exports.InstallWidgetProvider=E.InstallWidgetProvider;
@@ -1,5 +1,5 @@
1
+ import { CSSProperties } from 'react';
1
2
  import { JSX } from 'react/jsx-runtime';
2
- import { MouseEvent as MouseEvent_2 } from 'react';
3
3
  import { PropsWithChildren } from 'react';
4
4
 
5
5
  export declare const AVERAGE_CHECK_TIME: number;
@@ -10,10 +10,9 @@ export declare const AVERAGE_LOADING_TIME: number;
10
10
 
11
11
  declare type ButtonLocation = "hero" | "header" | "fixed_bottom" | "install_guide" | "get_approved" | "go_to_safari" | "update_ios" | "unavailable_outside_eu" | "debug";
12
12
 
13
- export declare const createInstallAnalyticsHandler: (analyticsProps?: Record<string, unknown>) => {
14
- trackInstallEvent: (eventType: string) => void;
15
- trackOpenModalEvent: (modalName: string) => void;
16
- };
13
+ export declare interface InstallAnalyticsCallbacks {
14
+ onEvent?: (payload: TrackedAnalyticsEvent) => void;
15
+ }
17
16
 
18
17
  export declare const InstallAppButton: (props: PropsWithChildren<InstallAppButtonProps>) => JSX.Element;
19
18
 
@@ -21,11 +20,13 @@ export declare interface InstallAppButtonProps {
21
20
  className?: string;
22
21
  androidClassName?: string;
23
22
  androidTextClassName?: string;
23
+ captionClassName?: string;
24
+ customAnalytics?: InstallAnalyticsCallbacks;
24
25
  handleCustomStep?: () => void;
25
- onClick?: (e: MouseEvent_2) => void;
26
26
  location?: ButtonLocation;
27
27
  caption?: string;
28
28
  showCaption?: boolean;
29
+ styleVars?: InstallWidgetStyleVars;
29
30
  id?: string;
30
31
  showLoaderOnly?: boolean;
31
32
  }
@@ -46,22 +47,28 @@ export declare interface InstallModalBaseProps {
46
47
  onClose: () => void;
47
48
  }
48
49
 
49
- export declare const useInstallConditions: () => {
50
- canInstall: boolean;
51
- shouldGoToSafari: boolean;
52
- shouldUpdateIOS: boolean;
53
- isIOS186PlusVersion: boolean;
54
- isAndroid: boolean;
55
- };
50
+ export declare const InstallWidgetProvider: ({ children }: PropsWithChildren) => JSX.Element;
56
51
 
57
- export declare const useInstallUrl: (isAvailable?: boolean) => {
58
- installUrl: string | null;
59
- attribution_token: string | null;
60
- isEligible: boolean | null;
61
- onside_token: string | null;
62
- isLoading: boolean;
63
- error: Error | null;
64
- fetchInstallData: () => Promise<void>;
52
+ declare type InstallWidgetStyleVars = CSSProperties & {
53
+ "--onside-btn-bg"?: string;
54
+ "--onside-btn-text"?: string;
55
+ "--onside-btn-bg-hover"?: string;
56
+ "--onside-btn-disabled-bg"?: string;
57
+ "--onside-btn-radius"?: string;
58
+ "--onside-btn-px"?: string;
59
+ "--onside-btn-py"?: string;
60
+ "--onside-btn-font-size"?: string;
61
+ "--onside-caption-color"?: string;
62
+ "--onside-caption-size"?: string;
63
+ "--onside-caption-line-height"?: string;
65
64
  };
66
65
 
66
+ declare interface TrackedAnalyticsEvent {
67
+ event: "amplitude_event";
68
+ event_name: string;
69
+ event_properties: Record<string, unknown>;
70
+ user_properties?: Record<string, unknown>;
71
+ url: string;
72
+ }
73
+
67
74
  export { }