@frak-labs/components 1.0.8-beta.1f203cc0 → 1.0.8

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.
Files changed (34) hide show
  1. package/cdn/Banner.CcOWT4lZ.js +178 -0
  2. package/cdn/{ButtonShare.sH7UeE5a.js → ButtonShare.D9-F0jJJ.js} +1 -1
  3. package/cdn/{ButtonWallet.Cm8Qzz45.js → ButtonWallet.B0buPR_z.js} +1 -1
  4. package/cdn/{GiftIcon.DnSW4dJQ.js → GiftIcon.eRNTGQ_r.js} +1 -1
  5. package/cdn/{OpenInAppButton.CTBE114K.js → OpenInAppButton.Dgb-qhM8.js} +1 -1
  6. package/cdn/PostPurchase.BYxnAEyn.js +89 -0
  7. package/cdn/components.js +1 -1
  8. package/cdn/embeddedWallet.BS-9u4Be.js +1 -0
  9. package/cdn/{formatReward.Cmg_Q___.js → formatReward.B1ZyoceC.js} +1 -1
  10. package/cdn/loader.js +1 -1
  11. package/cdn/replay-V6FXES7X.BoL9fAjx.js +1 -0
  12. package/cdn/{useGlobalComponents.pjgSwLk9.js → useGlobalComponents.TG9kIYSc.js} +1 -1
  13. package/cdn/{useLightDomStyles.2RQE6Iby.js → useLightDomStyles.tjNBKcOr.js} +1 -1
  14. package/cdn/usePlacement.BgMXY5CX.js +58 -0
  15. package/cdn/{useReward.cZ7bx5ND.js → useReward.BtBpuMwt.js} +1 -1
  16. package/dist/{GiftIcon-WEWSJ8kV.js → GiftIcon-BIp9FTJs.js} +1 -1
  17. package/dist/banner.d.ts +2 -1
  18. package/dist/banner.js +3 -3
  19. package/dist/buttonShare.d.ts +2 -1
  20. package/dist/buttonShare.js +2 -2
  21. package/dist/buttonWallet.d.ts +2 -1
  22. package/dist/buttonWallet.js +1 -1
  23. package/dist/openInApp.d.ts +3 -1
  24. package/dist/openInApp.js +2 -2
  25. package/dist/postPurchase.d.ts +2 -1
  26. package/dist/postPurchase.js +3 -3
  27. package/dist/{useLightDomStyles-Xi52h2yV.js → useLightDomStyles-C8giLInY.js} +1 -1
  28. package/dist/{usePlacement-SHVjZ5IW.js → usePlacement-5kbU3BKj.js} +18 -55
  29. package/package.json +3 -3
  30. package/cdn/Banner.L6HcKGUv.js +0 -178
  31. package/cdn/PostPurchase.fx6VasmG.js +0 -89
  32. package/cdn/embeddedWallet.CDUxjdX2.js +0 -1
  33. package/cdn/replay-V6FXES7X.CNozpSRg.js +0 -1
  34. package/cdn/usePlacement.CRfzWKVY.js +0 -58
@@ -1 +0,0 @@
1
- import{l as e}from"./loader.js";async function t(t,n){if(!window.FrakSetup?.client){console.error(`Frak client not found`);return}let r=window.FrakSetup?.modalWalletConfig??{};await e(window.FrakSetup.client,t?{...r,metadata:{...r.metadata,targetInteraction:t}}:r,n)}export{t};
@@ -1 +0,0 @@
1
- function e(){return()=>{}}var t=null;function n(n,r){if(typeof document>`u`||typeof window>`u`)return;t&&t();let i=n.maxEventsPerChunk??200,a=n.flushIntervalMs??1e4,o=n.maxPayloadBytes??1048576,s=[],c=0,l=null;function u(e){if(s.length===0)return;let t=JSON.stringify(s);if(new TextEncoder().encode(t).length>o){if(s.length>1){let t=Math.floor(s.length/2),n=s.slice(0,t),r=s.slice(t),i=e&&n.some(e=>e.type===2);s=n,u(i),s=r,u(!1);return}s=[];return}let n=s[0].timestamp,i=s[s.length-1].timestamp;try{r({chunk_index:c,events_count:s.length,is_full_snapshot:e,started_at:new Date(n).toISOString(),ended_at:new Date(i).toISOString(),payload:t}),c+=1,s=[]}catch(e){throw console.error(`[ReplayRecorder] sendChunk failed`,e),e}}function d(e){let t=e||s.some(e=>e.type===2);s.length>=i?u(t):e&&s.length>0&&u(!0)}let f=n.maskAllText!==!1,p=n.unmaskTextSelector,m=e({emit(e,t){s.push(e),d(!!t)},checkoutEveryNms:a,maskAllInputs:n.maskAllInputs??!0,maskTextSelector:f?`*`:`[data-openpanel-replay-mask]`,maskTextFn:f&&p?(e,t)=>t?.closest(p)?e:e.replace(/\S/g,`*`):void 0,blockSelector:n.blockSelector??`[data-openpanel-replay-block]`,blockClass:n.blockClass,ignoreSelector:n.ignoreSelector});l=setInterval(()=>{s.length>0&&u(s.some(e=>e.type===2))},a);function h(){document.visibilityState===`hidden`&&s.length>0&&u(s.some(e=>e.type===2))}function g(){s.length>0&&u(s.some(e=>e.type===2))}document.addEventListener(`visibilitychange`,h),window.addEventListener(`pagehide`,g),t=()=>{s.length>0&&u(s.some(e=>e.type===2)),l&&=(clearInterval(l),null),document.removeEventListener(`visibilitychange`,h),window.removeEventListener(`pagehide`,g),m?.(),t=null}}function r(){t&&t()}export{n as startReplayRecorder,r as stopReplayRecorder};
@@ -1,58 +0,0 @@
1
- import{C as e,n as t,t as n,y as r}from"./loader.js";var i,a,o,s,c,l,u,d,f,p,m,h,g,_,v={},y=[],b=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,x=Array.isArray;function S(e,t){for(var n in t)e[n]=t[n];return e}function C(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function w(e,t,n){var r,a,o,s={};for(o in t)o==`key`?r=t[o]:o==`ref`?a=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?i.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return T(e,s,r,a,null)}function T(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++o,__i:-1,__u:0};return i==null&&a.vnode!=null&&a.vnode(s),s}function E(e){return e.children}function D(e,t){this.props=e,this.context=t}function O(e,t){if(t==null)return e.__?O(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?O(e):null}function k(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],o=S({},t);o.__v=t.__v+1,a.vnode&&a.vnode(o),F(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??O(t),!!(32&t.__u),i),o.__v=t.__v,o.__.__k[o.__i]=o,oe(r,o,i),t.__e=t.__=null,o.__e!=n&&A(o)}}function A(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),A(e)}function j(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!M.__r++||c!=a.debounceRendering)&&((c=a.debounceRendering)||l)(M)}function M(){try{for(var e,t=1;s.length;)s.length>t&&s.sort(u),e=s.shift(),t=s.length,k(e)}finally{s.length=M.__r=0}}function ee(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,b=r&&r.__k||y,x=t.length;for(c=te(n,t,b,c,x),d=0;d<x;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&b[p.__i]||v,p.__i=d,g=F(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&L(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),(_=!!(4&p.__u))||f.__k===p.__k?(c=ne(p,c,e,_),_&&f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function te(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=T(null,o,null,null,null):x(o)?o=e.__k[a]=T(E,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=T(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=ie(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=O(s)),le(s,s));return r}function ne(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=ne(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=O(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function re(e,t){return t||=[],e==null||typeof e==`boolean`||(x(e)?e.some(function(e){re(e,t)}):t.push(e)),t}function ie(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function N(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||b.test(t)?n:n+`px`}function P(e,t,n,r,i){var a,o;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||N(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||N(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(m,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n[p]=r[p]:(n[p]=h,e.addEventListener(t,a?_:g,a)):e.removeEventListener(t,a?_:g,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function ae(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[f]==null)t[f]=h++;else if(t[f]<n[p])return;return n(a.event?a.event(t):t)}}}function F(e,t,n,r,i,o,s,c,l,u){var d,f,p,m,h,g,_,v,b,w,T,O,k,A,j,M=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[c=t.__e=n.__e]),(d=a.__b)&&d(t);n:if(typeof M==`function`)try{if(v=t.props,b=M.prototype&&M.prototype.render,w=(d=M.contextType)&&r[d.__c],T=d?w?w.props.value:d.__:r,n.__c?_=(f=t.__c=n.__c).__=f.__E:(b?t.__c=f=new M(v,T):(t.__c=f=new D(v,T),f.constructor=M,f.render=ue),w&&w.sub(f),f.state||={},f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),b&&f.__s==null&&(f.__s=f.state),b&&M.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=S({},f.__s)),S(f.__s,M.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)b&&M.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),b&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(b&&M.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,T),t.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,T)){t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),y.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&s.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,T),b&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=T,f.props=v,f.__P=e,f.__e=!1,O=a.__r,k=0,b)f.state=f.__s,f.__d=!1,O&&O(t),d=f.render(f.props,f.state,f.context),y.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,O&&O(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++k<25);f.state=f.__s,f.getChildContext!=null&&(r=S(S({},r),f.getChildContext())),b&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),A=d!=null&&d.type===E&&d.key==null?se(d.props.children):d,c=ee(e,x(A)?A:[A],t,n,r,i,o,s,c,l,u),f.base=t.__e,t.__u&=-161,f.__h.length&&s.push(f),_&&(f.__E=f.__=null)}catch(e){if(t.__v=null,l||o!=null)if(e.then){for(t.__u|=l?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,t.__e=c}else{for(j=o.length;j--;)C(o[j]);I(t)}else t.__e=n.__e,t.__k=n.__k,e.then||I(t);a.__e(e,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):c=t.__e=ce(n.__e,t,n,r,i,o,s,l,u);return(d=a.diffed)&&d(t),128&t.__u?void 0:c}function I(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(I))}function oe(e,t,n){for(var r=0;r<n.length;r++)L(n[r],n[++r],n[++r]);a.__c&&a.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){a.__e(e,t.__v)}})}function se(e){return typeof e!=`object`||!e||e.__b>0?e:x(e)?e.map(se):e.constructor===void 0?S({},e):null}function ce(e,t,n,r,o,s,c,l,u){var d,f,p,m,h,g,_,y=n.props||v,b=t.props,S=t.type;if(S==`svg`?o=`http://www.w3.org/2000/svg`:S==`math`?o=`http://www.w3.org/1998/Math/MathML`:o||=`http://www.w3.org/1999/xhtml`,s!=null){for(d=0;d<s.length;d++)if((h=s[d])&&`setAttribute`in h==!!S&&(S?h.localName==S:h.nodeType==3)){e=h,s[d]=null;break}}if(e==null){if(S==null)return document.createTextNode(b);e=document.createElementNS(o,S,b.is&&b),l&&=(a.__m&&a.__m(t,s),!1),s=null}if(S==null)y===b||l&&e.data==b||(e.data=b);else{if(s=S==`textarea`&&b.defaultValue!=null?null:s&&i.call(e.childNodes),!l&&s!=null)for(y={},d=0;d<e.attributes.length;d++)y[(h=e.attributes[d]).name]=h.value;for(d in y)h=y[d],d==`dangerouslySetInnerHTML`?p=h:d==`children`||d in b||d==`value`&&`defaultValue`in b||d==`checked`&&`defaultChecked`in b||P(e,d,null,h,o);for(d in b)h=b[d],d==`children`?m=h:d==`dangerouslySetInnerHTML`?f=h:d==`value`?g=h:d==`checked`?_=h:l&&typeof h!=`function`||y[d]===h||P(e,d,h,y[d],o);if(f)l||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=``),ee(t.type==`template`?e.content:e,x(m)?m:[m],t,n,r,S==`foreignObject`?`http://www.w3.org/1999/xhtml`:o,s,c,s?s[0]:n.__k&&O(n,0),l,u),s!=null)for(d=s.length;d--;)C(s[d]);l&&S!=`textarea`||(d=`value`,S==`progress`&&g==null?e.removeAttribute(`value`):g!=null&&(g!==e[d]||S==`progress`&&!g||S==`option`&&g!=y[d])&&P(e,d,g,y[d],o),d=`checked`,_!=null&&_!=e[d]&&P(e,d,_,y[d],o))}return e}function L(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){a.__e(e,n)}}function le(e,t,n){var r,i;if(a.unmount&&a.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||L(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){a.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&le(r[i],t,n||typeof e.type!=`function`);n||C(e.__e),e.__c=e.__=e.__e=void 0}function ue(e,t,n){return this.constructor(e,n)}function R(e,t,n){var r,o,s,c;t==document&&(t=document.documentElement),a.__&&a.__(e,t),o=(r=typeof n==`function`)?null:n&&n.__k||t.__k,s=[],c=[],F(t,e=(!r&&n||t).__k=w(E,null,[e]),o||v,v,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?i.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,c),oe(s,e,c)}function de(e,t){R(e,t,de)}function fe(e,t,n){var r,a,o,s,c=S({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o==`key`?r=t[o]:o==`ref`?a=t[o]:c[o]=t[o]===void 0&&s!=null?s[o]:t[o];return arguments.length>2&&(c.children=arguments.length>3?i.call(arguments,2):n),T(e.type,c,r||e.key,a||e.ref,null)}i=y.slice,a={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},o=0,D.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=S({},this.state);typeof e==`function`&&(e=e(S({},n),this.props)),e&&S(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),j(this))},D.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),j(this))},D.prototype.render=E,s=[],l=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},M.__r=0,d=Math.random().toString(8),f=`__d`+d,p=`__a`+d,m=/(PointerCapture)$|Capture$/i,h=0,g=ae(!1),_=ae(!0);function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(this,arguments)}function B(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}var pe=[`context`,`children`],me=[`useFragment`];function he(e,t,n,r){function i(){var t,n=Reflect.construct(HTMLElement,[],i);return n._vdomComponent=e,r&&r.shadow?(n._root=n.attachShadow({mode:r.mode||`open`,serializable:(t=r.serializable)!=null&&t}),r.adoptedStyleSheets&&(n._root.adoptedStyleSheets=r.adoptedStyleSheets)):n._root=n,n}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=function(){_e.call(this,r)},i.prototype.attributeChangedCallback=ve,i.prototype.disconnectedCallback=ye,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,e.formAssociated&&(i.formAssociated=!0),n.forEach(function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom?this._vdom.props[e]:this._props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||={},this._props[e]=t);var n=typeof t;t!=null&&n!==`string`&&n!==`boolean`&&n!==`number`||this.setAttribute(e,t)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i),i}function ge(e){this.getChildContext=function(){return e.context};var t=e.children;return fe(t,B(e,pe))}function _e(e){var t=new CustomEvent(`_preact`,{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=w(ge,z({},this._props,{context:t.detail.context}),xe(this,this._vdomComponent,e)),(this.hasAttribute(`hydrate`)?de:R)(this._vdom,this._root)}function V(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():``})}function ve(e,t,n){if(this._vdom){var r={};r[e]=n??=void 0,r[V(e)]=n,this._vdom=fe(this._vdom,r),R(this._vdom,this._root)}}function ye(){R(this._vdom=null,this._root)}function be(e,t){var n=this,r=e.useFragment,i=B(e,me);return w(r?E:`slot`,z({},i,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener(`_preact`,n._listener))):n.ref.removeEventListener(`_preact`,n._listener)}}))}function xe(e,t,n){if(e.nodeType===3)return e.data;if(e.nodeType!==1)return null;var r=[],i={},a=0,o=e.attributes,s=e.childNodes;for(a=o.length;a--;)o[a].name!==`slot`&&(i[o[a].name]=o[a].value,i[V(o[a].name)]=o[a].value);for(a=s.length;a--;){var c=xe(s[a],null,n),l=s[a].slot;l?i[l]=w(be,{name:l},c):r[a]=c}var u=!(!n||!n.shadow),d=t?w(be,{useFragment:!u},r):r;return!u&&t&&(e.innerHTML=``),w(t||e.nodeName.toLowerCase(),i,d)}function Se(t,r,i=[],a={shadow:!0}){typeof window<`u`&&(e(n),customElements.get(r)||he(t,r,i,a))}var Ce=0;Array.isArray;function we(e,t,n,r,i,o){t||={};var s,c,l=t;if(`ref`in l)for(c in l={},t)c==`ref`?s=t[c]:l[c]=t[c];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ce,__i:-1,__u:0,__source:i,__self:o};if(typeof e==`function`&&(s=e.defaultProps))for(c in s)l[c]===void 0&&(l[c]=s[c]);return a.vnode&&a.vnode(u),u}var H,U,W,Te,G=0,Ee=[],K=a,De=K.__b,Oe=K.__r,ke=K.diffed,Ae=K.__c,je=K.unmount,Me=K.__;function q(e,t){K.__h&&K.__h(U,e,G||t),G=0;var n=U.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function J(e){return G=1,Ne(ze,e)}function Ne(e,t,n){var r=q(H++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ze(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=U,!U.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};U.__f=!0;var a=U.shouldComponentUpdate,o=U.componentWillUpdate;U.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},U.shouldComponentUpdate=i}return r.__N||r.__}function Y(e,t){var n=q(H++,3);!K.__s&&Re(n.__H,t)&&(n.__=e,n.u=t,U.__H.__h.push(n))}function Pe(e){return G=5,X(function(){return{current:e}},[])}function X(e,t){var n=q(H++,7);return Re(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Fe(e,t){return G=8,X(function(){return e},t)}function Ie(){for(var e;e=Ee.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Q),t.__h.some($),t.__h=[]}catch(n){t.__h=[],K.__e(n,e.__v)}}}K.__b=function(e){U=null,De&&De(e)},K.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Me&&Me(e,t)},K.__r=function(e){Oe&&Oe(e),H=0;var t=(U=e.__c).__H;t&&(W===U?(t.__h=[],U.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Q),t.__h.some($),t.__h=[],H=0)),W=U},K.diffed=function(e){ke&&ke(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ee.push(t)!==1&&Te===K.requestAnimationFrame||((Te=K.requestAnimationFrame)||Le)(Ie)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),W=U=null},K.__c=function(e,t){t.some(function(e){try{e.__h.some(Q),e.__h=e.__h.filter(function(e){return!e.__||$(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],K.__e(n,e.__v)}}),Ae&&Ae(e,t)},K.unmount=function(e){je&&je(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{Q(e)}catch(e){t=e}}),n.__H=void 0,t&&K.__e(t,n.__v))};var Z=typeof requestAnimationFrame==`function`;function Le(e){var t,n=function(){clearTimeout(r),Z&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Z&&(t=requestAnimationFrame(n))}function Q(e){var t=U,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),U=t}function $(e){var t=U;e.__c=e.__(),U=t}function Re(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function ze(e,t){return typeof t==`function`?t(e):t}function Be(){let[e,n]=J(()=>window.FrakSetup?.config?.waitForBackendConfig===!1?!0:r.isResolved),[i,a]=J(()=>r.getConfig().hidden??!1),[o,s]=J(()=>!!window.FrakSetup?.client);return Y(()=>{let e=r.getConfig();e.isResolved&&(n(!0),a(e.hidden??!1)),window.FrakSetup?.client&&s(!0);let i=e=>{let t=e.detail;t.isResolved&&n(!0),a(t.hidden??!1)};window.addEventListener(`frak:config`,i);let o=()=>s(!0);return t(`add`,o),()=>{window.removeEventListener(`frak:config`,i),t(`remove`,o)}},[]),{shouldRender:e,isHidden:i,isClientReady:o}}const Ve=`
2
- :host {
3
- display: contents;
4
- }
5
-
6
- :host([hidden]) {
7
- display: none;
8
- }
9
-
10
- .button:disabled {
11
- opacity: 0.7;
12
- cursor: default;
13
- }
14
-
15
- .button__fadeIn {
16
- animation: frak-fadeIn 300ms ease-in;
17
- }
18
-
19
- @keyframes frak-fadeIn {
20
- from {
21
- opacity: 0;
22
- }
23
-
24
- to {
25
- opacity: 1;
26
- }
27
- }
28
- `;function He(e,t){return t?`${Ve}\n${e}\n${t}`:`${Ve}\n${e}`}const Ue=`
29
- :where(frak-button-share, frak-open-in-app) {
30
- display: contents;
31
- }
32
-
33
- :where(frak-button-share .button, frak-open-in-app .button) {
34
- display: flex;
35
- align-items: center;
36
- justify-content: center;
37
- gap: 10px;
38
- }
39
-
40
- :where(frak-button-share .button:disabled, frak-open-in-app .button:disabled) {
41
- opacity: 0.7;
42
- cursor: default;
43
- }
44
-
45
- :where(frak-button-share .button__fadeIn, frak-open-in-app .button__fadeIn) {
46
- animation: frak-fadeIn 300ms ease-in;
47
- }
48
-
49
- @keyframes frak-fadeIn {
50
- from {
51
- opacity: 0;
52
- }
53
-
54
- to {
55
- opacity: 1;
56
- }
57
- }
58
- `;function We(e){return r.getConfig().placements?.[e]}function Ge(e){let[t,n]=J(0);return Y(()=>{let e=e=>{n(e=>e+1)};return window.addEventListener(`frak:config`,e),n(e=>e+1),()=>window.removeEventListener(`frak:config`,e)},[]),X(()=>e?We(e):void 0,[e,t])}export{Pe as a,Fe as c,Se as d,D as f,a as g,w as h,Be as i,Y as l,E as m,He as n,X as o,re as p,Ue as r,J as s,Ge as t,we as u};