@useaward/embed-predictions 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web.js +870 -0
- package/package.json +49 -0
- package/src/api/client.ts +107 -0
- package/src/assets/index.css +15 -0
- package/src/components/ButtonBar.tsx +52 -0
- package/src/components/CorrectValueStep.tsx +80 -0
- package/src/components/EmailInput.tsx +38 -0
- package/src/components/Game.tsx +365 -0
- package/src/components/GameLayout.tsx +29 -0
- package/src/components/GamePlay.tsx +77 -0
- package/src/components/LanguageSwitcher.tsx +40 -0
- package/src/components/ScoreGameStep.tsx +113 -0
- package/src/components/StepRenderer.tsx +41 -0
- package/src/components/SuccessScreen.tsx +24 -0
- package/src/components/WelcomeScreen.tsx +43 -0
- package/src/components/ui/button.tsx +64 -0
- package/src/components/ui/spinner.tsx +18 -0
- package/src/constants.ts +27 -0
- package/src/context/GameContext.tsx +43 -0
- package/src/context/locale-context.tsx +32 -0
- package/src/features/standard/StandardGameEmbed.tsx +57 -0
- package/src/global.d.ts +1 -0
- package/src/locale/en.ts +24 -0
- package/src/locale/lv.ts +24 -0
- package/src/register.ts +13 -0
- package/src/stores/gameStore.ts +101 -0
- package/src/types/style.ts +9 -0
- package/src/types/translations.ts +8 -0
- package/src/utils/cn.ts +7 -0
- package/src/utils/fetch-locale.ts +8 -0
- package/src/utils/inject-font.ts +23 -0
- package/src/utils/set-css-variables.ts +83 -0
- package/src/web.ts +12 -0
- package/src/window.ts +33 -0
package/dist/web.js
ADDED
|
@@ -0,0 +1,870 @@
|
|
|
1
|
+
// v0.1.0
|
|
2
|
+
var wn=Object.defineProperty;var Tt=(e,t)=>{for(var r in t)wn(e,r,{get:t[r],enumerable:!0})};function vn(e){return Object.keys(e).reduce((r,n)=>{let o=e[n];return r[n]=Object.assign({},o),It(o.value)&&!Tn(o.value)&&!Array.isArray(o.value)&&(r[n].value=Object.assign({},o.value)),Array.isArray(o.value)&&(r[n].value=o.value.slice(0)),r},{})}function Cn(e){return e?Object.keys(e).reduce((r,n)=>{let o=e[n];return r[n]=It(o)&&"value"in o?o:{value:o},r[n].attribute||(r[n].attribute=kn(n)),r[n].parse="parse"in r[n]?r[n].parse:typeof r[n].value!="string",r},{}):{}}function Sn(e){return Object.keys(e).reduce((r,n)=>(r[n]=e[n].value,r),{})}function Pn(e,t){let r=vn(t);return Object.keys(t).forEach(o=>{let i=r[o],a=e.getAttribute(i.attribute),s=e[o];a!=null&&(i.value=i.parse?At(a):a),s!=null&&(i.value=Array.isArray(s)?s.slice(0):s),i.reflect&&Et(e,i.attribute,i.value,!!i.parse),Object.defineProperty(e,o,{get(){return i.value},set(l){let u=i.value;i.value=l,i.reflect&&Et(this,i.attribute,i.value,!!i.parse);for(let d=0,c=this.__propertyChangedCallbacks.length;d<c;d++)this.__propertyChangedCallbacks[d](o,l,u)},enumerable:!0,configurable:!0})}),r}function At(e){if(e)try{return JSON.parse(e)}catch{return e}}function Et(e,t,r,n){if(r==null||r===!1)return e.removeAttribute(t);let o=n?JSON.stringify(r):r;e.__updating[t]=!0,o==="true"&&(o=""),e.setAttribute(t,o),Promise.resolve().then(()=>delete e.__updating[t])}function kn(e){return e.replace(/\.?([A-Z]+)/g,(t,r)=>"-"+r.toLowerCase()).replace("_","-").replace(/^-/,"")}function It(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function Tn(e){return Object.prototype.toString.call(e)==="[object Function]"}function En(e){return typeof e=="function"&&e.toString().indexOf("class")===0}var nt;function An(e,t){let r=Object.keys(t);return class extends e{static get observedAttributes(){return r.map(o=>t[o].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={};for(let o of r)this[o]=void 0}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=Pn(this,t);let o=Sn(this.props),i=this.Component,a=nt;try{nt=this,this.__initialized=!0,En(i)?new i(o,{element:this}):i(o,{element:this})}finally{nt=a}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let o=null;for(;o=this.__releaseCallbacks.pop();)o(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(o,i,a){if(this.__initialized&&!this.__updating[o]&&(o=this.lookupProp(o),o in t)){if(a==null&&!this[o])return;this[o]=t[o].parse?At(a):a}}lookupProp(o){if(t)return r.find(i=>o===i||o===t[i].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(o){this.__releaseCallbacks.push(o)}addPropertyChangedCallback(o){this.__propertyChangedCallbacks.push(o)}}}function _t(e,t={},r={}){let{BaseElement:n=HTMLElement,extension:o,customElements:i=window.customElements}=r;return a=>{if(!e)throw new Error("tag is required to register a Component");let s=i.get(e);return s?(s.prototype.Component=a,s):(s=An(n,Cn(t)),s.prototype.Component=a,s.prototype.registeredTag=e,i.define(e,s,o),s)}}var w={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Ot(this.context.count)},getNextContextId(){return Ot(this.context.count++)}};function Ot(e){let t=String(e),r=t.length-1;return w.context.id+(r?String.fromCharCode(96+r):"")+t}function ae(e){w.context=e}function In(){return{...w.context,id:w.getNextContextId(),count:0}}var _n=!1,On=(e,t)=>e===t,Y=Symbol("solid-proxy"),Lt=typeof Proxy=="function",Ve=Symbol("solid-track");var Ne={equals:On},Dt=null,Vt=zt,B=1,ke=2,Gt={owned:null,cleanups:null,context:null,owner:null},ot={},x=null,f=null,me=null,fe=null,k=null,F=null,N=null,Ge=0;function se(e,t){let r=k,n=x,o=e.length===0,i=t===void 0?n:t,a=o?Gt:{owned:null,cleanups:null,context:i?i.context:null,owner:i},s=o?e:()=>e(()=>j(()=>te(a)));x=a,k=null;try{return W(s,!0)}finally{k=r,x=n}}function M(e,t){t=t?Object.assign({},Ne,t):Ne;let r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=o=>(typeof o=="function"&&(f&&f.running&&f.sources.has(r)?o=o(r.tValue):o=o(r.value)),Yt(r,o));return[Ht.bind(r),n]}function Rt(e,t,r){let n=We(e,t,!0,B);me&&f&&f.running?F.push(n):pe(n)}function I(e,t,r){let n=We(e,t,!1,B);me&&f&&f.running?F.push(n):pe(n)}function Ee(e,t,r){Vt=Vn;let n=We(e,t,!1,B),o=le&&Q(le);o&&(n.suspense=o),(!r||!r.render)&&(n.user=!0),N?N.push(n):pe(n)}function G(e,t,r){r=r?Object.assign({},Ne,r):Ne;let n=We(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,me&&f&&f.running?(n.tState=B,F.push(n)):pe(n),Ht.bind(n)}function Dn(e){return e&&typeof e=="object"&&"then"in e}function jt(e,t,r){let n,o,i;typeof t=="function"?(n=e,o=t,i=r||{}):(n=!0,o=e,i=t||{});let a=null,s=ot,l=null,u=!1,d=!1,c="initialValue"in i,g=typeof n=="function"&&G(n),C=new Set,[S,P]=(i.storage||M)(i.initialValue),[h,m]=M(void 0),[v,A]=M(void 0,{equals:!1}),[_,$]=M(c?"ready":"unresolved");w.context&&(l=w.getNextContextId(),i.ssrLoadFrom==="initial"?s=i.initialValue:w.load&&w.has(l)&&(s=w.load(l)));function X(O,R,U,V){return a===O&&(a=null,V!==void 0&&(c=!0),(O===s||R===s)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(V,{value:R})),s=ot,f&&O&&u?(f.promises.delete(O),u=!1,W(()=>{f.running=!0,Pt(R,U)},!1)):Pt(R,U)),R}function Pt(O,R){W(()=>{R===void 0&&P(()=>O),$(R!==void 0?"errored":c?"ready":"unresolved"),m(R);for(let U of C.keys())U.decrement();C.clear()},!1)}function tt(){let O=le&&Q(le),R=S(),U=h();if(U!==void 0&&!a)throw U;return k&&!k.user&&O&&Rt(()=>{v(),a&&(O.resolved&&f&&u?f.promises.add(a):C.has(O)||(O.increment(),C.add(O)))}),R}function rt(O=!0){if(O!==!1&&d)return;d=!1;let R=g?g():n;if(u=f&&f.running,R==null||R===!1){X(a,j(S));return}f&&a&&f.promises.delete(a);let U,V=s!==ot?s:j(()=>{try{return o(R,{value:S(),refetching:O})}catch(Pe){U=Pe}});if(U!==void 0){X(a,void 0,Fe(U),R);return}else if(!Dn(V))return X(a,V,void 0,R),V;return a=V,"v"in V?(V.s===1?X(a,V.v,void 0,R):X(a,void 0,Fe(V.v),R),V):(d=!0,queueMicrotask(()=>d=!1),W(()=>{$(c?"refreshing":"pending"),A()},!1),V.then(Pe=>X(V,Pe,void 0,R),Pe=>X(V,void 0,Fe(Pe),R)))}Object.defineProperties(tt,{state:{get:()=>_()},error:{get:()=>h()},loading:{get(){let O=_();return O==="pending"||O==="refreshing"}},latest:{get(){if(!c)return tt();let O=h();if(O&&!a)throw O;return S()}}});let kt=x;return g?Rt(()=>(kt=x,rt(!1))):rt(!1),[tt,{refetch:O=>Bt(kt,()=>rt(O)),mutate:P}]}function Wt(e){return W(e,!1)}function j(e){if(!fe&&k===null)return e();let t=k;k=null;try{return fe?fe.untrack(e):e()}finally{k=t}}function qt(e){Ee(()=>j(e))}function re(e){return x===null||(x.cleanups===null?x.cleanups=[e]:x.cleanups.push(e)),e}function je(){return k}function lt(){return x}function Bt(e,t){let r=x,n=k;x=e,k=null;try{return W(t,!0)}catch(o){qe(o)}finally{x=r,k=n}}function Rn(e){if(f&&f.running)return e(),f.done;let t=k,r=x;return Promise.resolve().then(()=>{k=t,x=r;let n;return(me||le)&&(n=f||(f={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),n.done||(n.done=new Promise(o=>n.resolve=o)),n.running=!0),W(e,!1),k=x=null,n?n.done:void 0})}var[da,Mt]=M(!1);function Mn(e){N.push.apply(N,e),e.length=0}function ne(e,t){let r=Symbol("context");return{id:r,Provider:Gn(r),defaultValue:e}}function Q(e){let t;return x&&x.context&&(t=x.context[e.id])!==void 0?t:e.defaultValue}function $n(e){let t=G(e),r=G(()=>at(t()));return r.toArray=()=>{let n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}var le;function Fn(){return le||(le=ne())}function Ht(){let e=f&&f.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===B)pe(this);else{let t=F;F=null,W(()=>Le(this),!1),F=t}if(k){let t=this.observers?this.observers.length:0;k.sources?(k.sources.push(this),k.sourceSlots.push(t)):(k.sources=[this],k.sourceSlots=[t]),this.observers?(this.observers.push(k),this.observerSlots.push(k.sources.length-1)):(this.observers=[k],this.observerSlots=[k.sources.length-1])}return e&&f.sources.has(this)?this.tValue:this.value}function Yt(e,t,r){let n=f&&f.running&&f.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(n,t)){if(f){let o=f.running;(o||!r&&f.sources.has(e))&&(f.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&W(()=>{for(let o=0;o<e.observers.length;o+=1){let i=e.observers[o],a=f&&f.running;a&&f.disposed.has(i)||((a?!i.tState:!i.state)&&(i.pure?F.push(i):N.push(i),i.observers&&Ut(i)),a?i.tState=B:i.state=B)}if(F.length>1e6)throw F=[],new Error},!1)}return t}function pe(e){if(!e.fn)return;te(e);let t=Ge;$t(e,f&&f.running&&f.sources.has(e)?e.tValue:e.value,t),f&&!f.running&&f.sources.has(e)&&queueMicrotask(()=>{W(()=>{f&&(f.running=!0),k=x=e,$t(e,e.tValue,t),k=x=null},!1)})}function $t(e,t,r){let n,o=x,i=k;k=x=e;try{n=e.fn(t)}catch(a){return e.pure&&(f&&f.running?(e.tState=B,e.tOwned&&e.tOwned.forEach(te),e.tOwned=void 0):(e.state=B,e.owned&&e.owned.forEach(te),e.owned=null)),e.updatedAt=r+1,qe(a)}finally{k=i,x=o}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?Yt(e,n,!0):f&&f.running&&e.pure?(f.sources.add(e),e.tValue=n):e.value=n,e.updatedAt=r)}function We(e,t,r,n=B,o){let i={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:x,context:x?x.context:null,pure:r};if(f&&f.running&&(i.state=0,i.tState=n),x===null||x!==Gt&&(f&&f.running&&x.pure?x.tOwned?x.tOwned.push(i):x.tOwned=[i]:x.owned?x.owned.push(i):x.owned=[i]),fe&&i.fn){let[a,s]=M(void 0,{equals:!1}),l=fe.factory(i.fn,s);re(()=>l.dispose());let u=()=>Rn(s).then(()=>d.dispose()),d=fe.factory(i.fn,u);i.fn=c=>(a(),f&&f.running?d.track(c):l.track(c))}return i}function Te(e){let t=f&&f.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===ke)return Le(e);if(e.suspense&&j(e.suspense.inFallback))return e.suspense.effects.push(e);let r=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Ge);){if(t&&f.disposed.has(e))return;(t?e.tState:e.state)&&r.push(e)}for(let n=r.length-1;n>=0;n--){if(e=r[n],t){let o=e,i=r[n+1];for(;(o=o.owner)&&o!==i;)if(f.disposed.has(o))return}if((t?e.tState:e.state)===B)pe(e);else if((t?e.tState:e.state)===ke){let o=F;F=null,W(()=>Le(e,r[0]),!1),F=o}}}function W(e,t){if(F)return e();let r=!1;t||(F=[]),N?r=!0:N=[],Ge++;try{let n=e();return Nn(r),n}catch(n){r||(N=null),F=null,qe(n)}}function Nn(e){if(F&&(me&&f&&f.running?Ln(F):zt(F),F=null),e)return;let t;if(f){if(!f.promises.size&&!f.queue.size){let n=f.sources,o=f.disposed;N.push.apply(N,f.effects),t=f.resolve;for(let i of N)"tState"in i&&(i.state=i.tState),delete i.tState;f=null,W(()=>{for(let i of o)te(i);for(let i of n){if(i.value=i.tValue,i.owned)for(let a=0,s=i.owned.length;a<s;a++)te(i.owned[a]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}Mt(!1)},!1)}else if(f.running){f.running=!1,f.effects.push.apply(f.effects,N),N=null,Mt(!0);return}}let r=N;N=null,r.length&&W(()=>Vt(r),!1),t&&t()}function zt(e){for(let t=0;t<e.length;t++)Te(e[t])}function Ln(e){for(let t=0;t<e.length;t++){let r=e[t],n=f.queue;n.has(r)||(n.add(r),me(()=>{n.delete(r),W(()=>{f.running=!0,Te(r)},!1),f&&(f.running=!1)}))}}function Vn(e){let t,r=0;for(t=0;t<e.length;t++){let n=e[t];n.user?e[r++]=n:Te(n)}if(w.context){if(w.count){w.effects||(w.effects=[]),w.effects.push(...e.slice(0,r));return}ae()}for(w.effects&&(w.done||!w.count)&&(e=[...w.effects,...e],r+=w.effects.length,delete w.effects),t=0;t<r;t++)Te(e[t])}function Le(e,t){let r=f&&f.running;r?e.tState=0:e.state=0;for(let n=0;n<e.sources.length;n+=1){let o=e.sources[n];if(o.sources){let i=r?o.tState:o.state;i===B?o!==t&&(!o.updatedAt||o.updatedAt<Ge)&&Te(o):i===ke&&Le(o,t)}}}function Ut(e){let t=f&&f.running;for(let r=0;r<e.observers.length;r+=1){let n=e.observers[r];(t?!n.tState:!n.state)&&(t?n.tState=ke:n.state=ke,n.pure?F.push(n):N.push(n),n.observers&&Ut(n))}}function te(e){let t;if(e.sources)for(;e.sources.length;){let r=e.sources.pop(),n=e.sourceSlots.pop(),o=r.observers;if(o&&o.length){let i=o.pop(),a=r.observerSlots.pop();n<o.length&&(i.sourceSlots[a]=n,o[n]=i,r.observerSlots[n]=a)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)te(e.tOwned[t]);delete e.tOwned}if(f&&f.running&&e.pure)Kt(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)te(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}f&&f.running?e.tState=0:e.state=0}function Kt(e,t){if(t||(e.tState=0,f.disposed.add(e)),e.owned)for(let r=0;r<e.owned.length;r++)Kt(e.owned[r])}function Fe(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Ft(e,t,r){try{for(let n of t)n(e)}catch(n){qe(n,r&&r.owner||null)}}function qe(e,t=x){let r=Dt&&t&&t.context&&t.context[Dt],n=Fe(e);if(!r)throw n;N?N.push({fn(){Ft(n,r,t)},state:B}):Ft(n,r,t)}function at(e){if(typeof e=="function"&&!e.length)return at(e());if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=at(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function Gn(e,t){return function(n){let o;return I(()=>o=j(()=>(x.context={...x.context,[e]:n.value},$n(()=>n.children))),void 0),o}}var jn=Symbol("fallback");function Nt(e){for(let t=0;t<e.length;t++)e[t]()}function Wn(e,t,r={}){let n=[],o=[],i=[],a=0,s=t.length>1?[]:null;return re(()=>Nt(i)),()=>{let l=e()||[],u=l.length,d,c;return l[Ve],j(()=>{let C,S,P,h,m,v,A,_,$;if(u===0)a!==0&&(Nt(i),i=[],n=[],o=[],a=0,s&&(s=[])),r.fallback&&(n=[jn],o[0]=se(X=>(i[0]=X,r.fallback())),a=1);else if(a===0){for(o=new Array(u),c=0;c<u;c++)n[c]=l[c],o[c]=se(g);a=u}else{for(P=new Array(u),h=new Array(u),s&&(m=new Array(u)),v=0,A=Math.min(a,u);v<A&&n[v]===l[v];v++);for(A=a-1,_=u-1;A>=v&&_>=v&&n[A]===l[_];A--,_--)P[_]=o[A],h[_]=i[A],s&&(m[_]=s[A]);for(C=new Map,S=new Array(_+1),c=_;c>=v;c--)$=l[c],d=C.get($),S[c]=d===void 0?-1:d,C.set($,c);for(d=v;d<=A;d++)$=n[d],c=C.get($),c!==void 0&&c!==-1?(P[c]=o[d],h[c]=i[d],s&&(m[c]=s[d]),c=S[c],C.set($,c)):i[d]();for(c=v;c<u;c++)c in P?(o[c]=P[c],i[c]=h[c],s&&(s[c]=m[c],s[c](c))):o[c]=se(g);o=o.slice(0,a=u),n=l.slice(0)}return o});function g(C){if(i[c]=C,s){let[S,P]=M(c);return s[c]=P,t(l[c],S)}return t(l[c])}}}var qn=!1;function p(e,t){if(qn&&w.context){let r=w.context;ae(In());let n=j(()=>e(t||{}));return ae(r),n}return j(()=>e(t||{}))}function $e(){return!0}var st={get(e,t,r){return t===Y?r:e.get(t)},has(e,t){return t===Y?!0:e.has(t)},set:$e,deleteProperty:$e,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:$e,deleteProperty:$e}},ownKeys(e){return e.keys()}};function it(e){return(e=typeof e=="function"?e():e)?e:{}}function Bn(){for(let e=0,t=this.length;e<t;++e){let r=this[e]();if(r!==void 0)return r}}function Ae(...e){let t=!1;for(let a=0;a<e.length;a++){let s=e[a];t=t||!!s&&Y in s,e[a]=typeof s=="function"?(t=!0,G(s)):s}if(Lt&&t)return new Proxy({get(a){for(let s=e.length-1;s>=0;s--){let l=it(e[s])[a];if(l!==void 0)return l}},has(a){for(let s=e.length-1;s>=0;s--)if(a in it(e[s]))return!0;return!1},keys(){let a=[];for(let s=0;s<e.length;s++)a.push(...Object.keys(it(e[s])));return[...new Set(a)]}},st);let r={},n=Object.create(null);for(let a=e.length-1;a>=0;a--){let s=e[a];if(!s)continue;let l=Object.getOwnPropertyNames(s);for(let u=l.length-1;u>=0;u--){let d=l[u];if(d==="__proto__"||d==="constructor")continue;let c=Object.getOwnPropertyDescriptor(s,d);if(!n[d])n[d]=c.get?{enumerable:!0,configurable:!0,get:Bn.bind(r[d]=[c.get.bind(s)])}:c.value!==void 0?c:void 0;else{let g=r[d];g&&(c.get?g.push(c.get.bind(s)):c.value!==void 0&&g.push(()=>c.value))}}}let o={},i=Object.keys(n);for(let a=i.length-1;a>=0;a--){let s=i[a],l=n[s];l&&l.get?Object.defineProperty(o,s,l):o[s]=l?l.value:void 0}return o}function ct(e,...t){let r=t.length;if(Lt&&Y in e){let o=r>1?t.flat():t[0],i=t.map(a=>new Proxy({get(s){return a.includes(s)?e[s]:void 0},has(s){return a.includes(s)&&s in e},keys(){return a.filter(s=>s in e)}},st));return i.push(new Proxy({get(a){return o.includes(a)?void 0:e[a]},has(a){return o.includes(a)?!1:a in e},keys(){return Object.keys(e).filter(a=>!o.includes(a))}},st)),i}let n=[];for(let o=0;o<=r;o++)n[o]={};for(let o of Object.getOwnPropertyNames(e)){let i=r;for(let l=0;l<t.length;l++)if(t[l].includes(o)){i=l;break}let a=Object.getOwnPropertyDescriptor(e,o);!a.get&&!a.set&&a.enumerable&&a.writable&&a.configurable?n[i][o]=a.value:Object.defineProperty(n[i],o,a)}return n}var Hn=e=>`Stale read from <${e}>.`;function ut(e){let t="fallback"in e&&{fallback:()=>e.fallback};return G(Wn(()=>e.each,e.children,t||void 0))}function E(e){let t=e.keyed,r=G(()=>e.when,void 0,void 0),n=t?r:G(r,void 0,{equals:(o,i)=>!o==!i});return G(()=>{let o=n();if(o){let i=e.children;return typeof i=="function"&&i.length>0?j(()=>i(t?o:()=>{if(!j(n))throw Hn("Show");return r()})):i}return e.fallback},void 0,void 0)}var Yn=ne();function dt(e){let t=0,r,n,o,i,a,[s,l]=M(!1),u=Fn(),d={increment:()=>{++t===1&&l(!0)},decrement:()=>{--t===0&&l(!1)},inFallback:s,effects:[],resolved:!1},c=lt();if(w.context&&w.load){let S=w.getContextId(),P=w.load(S);if(P&&(typeof P!="object"||P.s!==1?o=P:w.gather(S)),o&&o!=="$$f"){let[h,m]=M(void 0,{equals:!1});i=h,o.then(()=>{if(w.done)return m();w.gather(S),ae(n),m(),ae()},v=>{a=v,m()})}}let g=Q(Yn);g&&(r=g.register(d.inFallback));let C;return re(()=>C&&C()),p(u.Provider,{value:d,get children(){return G(()=>{if(a)throw a;if(n=w.context,i)return i(),i=void 0;n&&o==="$$f"&&ae();let S=G(()=>e.children);return G(P=>{let h=d.inFallback(),{showContent:m=!0,showFallback:v=!0}=r?r():{};if((!h||o&&o!=="$$f")&&m)return d.resolved=!0,C&&C(),C=n=o=void 0,Mn(d.effects),S();if(v)return C?P:se(A=>(C=A,n&&(ae({id:n.id+"F",count:0}),n=void 0),e.fallback),c)})})}})}var zn=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],Un=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...zn]),Kn=new Set(["innerHTML","textContent","innerText","children"]),Xn=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Qn=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function Jn(e,t){let r=Qn[e];return typeof r=="object"?r[t]?r.$:void 0:r}var Zn=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]);var eo={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};var L=e=>G(()=>e());function to(e,t,r){let n=r.length,o=t.length,i=n,a=0,s=0,l=t[o-1].nextSibling,u=null;for(;a<o||s<i;){if(t[a]===r[s]){a++,s++;continue}for(;t[o-1]===r[i-1];)o--,i--;if(o===a){let d=i<n?s?r[s-1].nextSibling:r[i-s]:l;for(;s<i;)e.insertBefore(r[s++],d)}else if(i===s)for(;a<o;)(!u||!u.has(t[a]))&&t[a].remove(),a++;else if(t[a]===r[i-1]&&r[s]===t[o-1]){let d=t[--o].nextSibling;e.insertBefore(r[s++],t[a++].nextSibling),e.insertBefore(r[--i],d),t[o]=r[i]}else{if(!u){u=new Map;let c=s;for(;c<i;)u.set(r[c],c++)}let d=u.get(t[a]);if(d!=null)if(s<d&&d<i){let c=a,g=1,C;for(;++c<o&&c<i&&!((C=u.get(t[c]))==null||C!==d+g);)g++;if(g>d-s){let S=t[a];for(;s<d;)e.insertBefore(r[s++],S)}else e.replaceChild(r[s++],t[a++])}else a++;else t[a++].remove()}}}var Xt="_$DX_DELEGATE";function y(e,t,r,n){let o,i=()=>{let s=n?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return s.innerHTML=e,r?s.content.firstChild.firstChild:n?s.firstChild:s.content.firstChild},a=t?()=>j(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return a.cloneNode=a,a}function ce(e,t=window.document){let r=t[Xt]||(t[Xt]=new Set);for(let n=0,o=e.length;n<o;n++){let i=e[n];r.has(i)||(r.add(i),t.addEventListener(i,co))}}function H(e,t,r){be(e)||(r==null?e.removeAttribute(t):e.setAttribute(t,r))}function ro(e,t,r,n){be(e)||(n==null?e.removeAttributeNS(t,r):e.setAttributeNS(t,r,n))}function no(e,t,r){be(e)||(r?e.setAttribute(t,""):e.removeAttribute(t))}function Ie(e,t){be(e)||(t==null?e.removeAttribute("class"):e.className=t)}function oo(e,t,r,n){if(n)Array.isArray(r)?(e[`$$${t}`]=r[0],e[`$$${t}Data`]=r[1]):e[`$$${t}`]=r;else if(Array.isArray(r)){let o=r[0];e.addEventListener(t,r[0]=i=>o.call(e,r[1],i))}else e.addEventListener(t,r,typeof r!="function"&&r)}function io(e,t,r={}){let n=Object.keys(t||{}),o=Object.keys(r),i,a;for(i=0,a=o.length;i<a;i++){let s=o[i];!s||s==="undefined"||t[s]||(Qt(e,s,!1),delete r[s])}for(i=0,a=n.length;i<a;i++){let s=n[i],l=!!t[s];!s||s==="undefined"||r[s]===l||!l||(Qt(e,s,!0),r[s]=l)}return r}function ao(e,t,r){if(!t)return r?H(e,"style"):t;let n=e.style;if(typeof t=="string")return n.cssText=t;typeof r=="string"&&(n.cssText=r=void 0),r||(r={}),t||(t={});let o,i;for(i in r)t[i]==null&&n.removeProperty(i),delete r[i];for(i in t)o=t[i],o!==r[i]&&(n.setProperty(i,o),r[i]=o);return r}function K(e,t,r){r!=null?e.style.setProperty(t,r):e.style.removeProperty(t)}function er(e,t={},r,n){let o={};return n||I(()=>o.children=he(e,t.children,o.children)),I(()=>typeof t.ref=="function"&&_e(t.ref,e)),I(()=>so(e,t,r,!0,o,!0)),o}function _e(e,t,r){return j(()=>e(t,r))}function b(e,t,r,n){if(r!==void 0&&!n&&(n=[]),typeof t!="function")return he(e,t,n,r);I(o=>he(e,t(),o,r),n)}function so(e,t,r,n,o={},i=!1){t||(t={});for(let a in o)if(!(a in t)){if(a==="children")continue;o[a]=Jt(e,a,null,o[a],r,i,t)}for(let a in t){if(a==="children"){n||he(e,t.children);continue}let s=t[a];o[a]=Jt(e,a,s,o[a],r,i,t)}}function be(e){return!!w.context&&!w.done&&(!e||e.isConnected)}function lo(e){return e.toLowerCase().replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function Qt(e,t,r){let n=t.trim().split(/\s+/);for(let o=0,i=n.length;o<i;o++)e.classList.toggle(n[o],r)}function Jt(e,t,r,n,o,i,a){let s,l,u,d,c;if(t==="style")return ao(e,r,n);if(t==="classList")return io(e,r,n);if(r===n)return n;if(t==="ref")i||r(e);else if(t.slice(0,3)==="on:"){let g=t.slice(3);n&&e.removeEventListener(g,n,typeof n!="function"&&n),r&&e.addEventListener(g,r,typeof r!="function"&&r)}else if(t.slice(0,10)==="oncapture:"){let g=t.slice(10);n&&e.removeEventListener(g,n,!0),r&&e.addEventListener(g,r,!0)}else if(t.slice(0,2)==="on"){let g=t.slice(2).toLowerCase(),C=Zn.has(g);if(!C&&n){let S=Array.isArray(n)?n[0]:n;e.removeEventListener(g,S)}(C||r)&&(oo(e,g,r,C),C&&ce([g]))}else if(t.slice(0,5)==="attr:")H(e,t.slice(5),r);else if(t.slice(0,5)==="bool:")no(e,t.slice(5),r);else if((c=t.slice(0,5)==="prop:")||(u=Kn.has(t))||!o&&((d=Jn(t,e.tagName))||(l=Un.has(t)))||(s=e.nodeName.includes("-")||"is"in a)){if(c)t=t.slice(5),l=!0;else if(be(e))return r;t==="class"||t==="className"?Ie(e,r):s&&!l&&!u?e[lo(t)]=r:e[d||t]=r}else{let g=o&&t.indexOf(":")>-1&&eo[t.split(":")[0]];g?ro(e,g,t,r):H(e,Xn[t]||t,r)}return r}function co(e){if(w.registry&&w.events&&w.events.find(([l,u])=>u===e))return;let t=e.target,r=`$$${e.type}`,n=e.target,o=e.currentTarget,i=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),a=()=>{let l=t[r];if(l&&!t.disabled){let u=t[`${r}Data`];if(u!==void 0?l.call(t,u,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},s=()=>{for(;a()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),w.registry&&!w.done&&(w.done=_$HY.done=!0),e.composedPath){let l=e.composedPath();i(l[0]);for(let u=0;u<l.length-2&&(t=l[u],!!a());u++){if(t._$host){t=t._$host,s();break}if(t.parentNode===o)break}}else s();i(n)}function he(e,t,r,n,o){let i=be(e);if(i){!r&&(r=[...e.childNodes]);let l=[];for(let u=0;u<r.length;u++){let d=r[u];d.nodeType===8&&d.data.slice(0,2)==="!$"?d.remove():l.push(d)}r=l}for(;typeof r=="function";)r=r();if(t===r)return r;let a=typeof t,s=n!==void 0;if(e=s&&r[0]&&r[0].parentNode||e,a==="string"||a==="number"){if(i||a==="number"&&(t=t.toString(),t===r))return r;if(s){let l=r[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),r=ge(e,r,n,l)}else r!==""&&typeof r=="string"?r=e.firstChild.data=t:r=e.textContent=t}else if(t==null||a==="boolean"){if(i)return r;r=ge(e,r,n)}else{if(a==="function")return I(()=>{let l=t();for(;typeof l=="function";)l=l();r=he(e,l,r,n)}),()=>r;if(Array.isArray(t)){let l=[],u=r&&Array.isArray(r);if(ft(l,t,r,o))return I(()=>r=he(e,l,r,n,!0)),()=>r;if(i){if(!l.length)return r;if(n===void 0)return r=[...e.childNodes];let d=l[0];if(d.parentNode!==e)return r;let c=[d];for(;(d=d.nextSibling)!==n;)c.push(d);return r=c}if(l.length===0){if(r=ge(e,r,n),s)return r}else u?r.length===0?Zt(e,l,n):to(e,r,l):(r&&ge(e),Zt(e,l));r=l}else if(t.nodeType){if(i&&t.parentNode)return r=s?[t]:t;if(Array.isArray(r)){if(s)return r=ge(e,r,n,t);ge(e,r,null,t)}else r==null||r===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);r=t}}return r}function ft(e,t,r,n){let o=!1;for(let i=0,a=t.length;i<a;i++){let s=t[i],l=r&&r[e.length],u;if(!(s==null||s===!0||s===!1))if((u=typeof s)=="object"&&s.nodeType)e.push(s);else if(Array.isArray(s))o=ft(e,s,l)||o;else if(u==="function")if(n){for(;typeof s=="function";)s=s();o=ft(e,Array.isArray(s)?s:[s],Array.isArray(l)?l:[l])||o}else e.push(s),o=!0;else{let d=String(s);l&&l.nodeType===3&&l.data===d?e.push(l):e.push(document.createTextNode(d))}}return o}function Zt(e,t,r=null){for(let n=0,o=t.length;n<o;n++)e.insertBefore(t[n],r)}function ge(e,t,r,n){if(r===void 0)return e.textContent="";let o=n||document.createTextNode("");if(t.length){let i=!1;for(let a=t.length-1;a>=0;a--){let s=t[a];if(o!==s){let l=s.parentNode===e;!i&&!a?l?e.replaceChild(o,s):e.insertBefore(o,r):l&&s.remove()}else i=!0}}else e.insertBefore(o,r);return[o]}function uo(e){let t=Object.keys(e),r={};for(let n=0;n<t.length;n++){let[o,i]=M(e[t[n]]);Object.defineProperty(r,t[n],{get:o,set(a){i(()=>a)}})}return r}function fo(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function mo(e){return(t,r)=>{let{element:n}=r;return se(o=>{let i=uo(t);n.addPropertyChangedCallback((s,l)=>i[s]=l),n.addReleaseCallback(()=>{n.renderRoot.textContent="",o()});let a=e(i,r);return b(n.renderRoot,a)},fo(n))}}function tr(e,t,r){return arguments.length===2&&(r=t,t={}),_t(e,t)(mo(r))}var mt={};Tt(mt,{dict:()=>po});var po={predictionGame:{predictionGame:"Prediction Game",welcomeText:"Predict and win prizes",playNow:"Play now",confirmResult:"Confirm result",submit:"Submit prediction",predictionsSubmitted:"Thank you for playing!",predictionsSubmittedDescription:"Points will be credited to your profile immediately after the game ends.",contestRules:"Contest rules",predictionsNotOpenYet:"Prediction game is not open yet",predictionsNotOpenYetDescription:"This prediction game will open soon. Please check back later.",predictionsClosed:"Prediction game is closed",predictionsClosedDescription:"This prediction game is no longer accepting submissions. Please check back later.",error:{prediction:{required:"Please select a prediction"}}}};var gt={};Tt(gt,{dict:()=>pt});var pt={predictionGame:{predictionGame:"Progno\u017Eu sp\u0113le",welcomeText:"Prognoz\u0113 un laim\u0113 balvas",playNow:"Sp\u0113l\u0113t tagad",confirmResult:"Apstiprin\u0101t rezult\u0101tu",submit:"Iesniegt prognozi",predictionsSubmitted:"Paldies par sp\u0113li!",predictionsSubmittedDescription:"Punkti tiks ieskait\u012Bti J\u016Bsu profil\u0101 uzreiz p\u0113c sp\u0113les beig\u0101m.",contestRules:"Konkursa noteikumi",predictionsNotOpenYet:"Progno\u017Eu sp\u0113le v\u0113l nav pieejama",predictionsNotOpenYetDescription:"\u0160\u012B sp\u0113le b\u016Bs pieejama dr\u012Bzum\u0101. L\u016Bdzu, p\u0101rbaudiet v\u0113l\u0101k.",predictionsClosed:"Progno\u017Eu sp\u0113le ir sl\u0113gta",predictionsClosedDescription:"\u0160\u012B progno\u017Eu sp\u0113le ir beigusies un vairs nepie\u0146em jaunas prognozes.",error:{prediction:{required:"L\u016Bdzu, izv\u0113lieties prognozi"}}}};var rr={predictionGameId:void 0,apiBaseUrl:"http://localhost:3000",email:void 0},Be="Inter",nr={en:mt,lv:gt},oe={general:{fontFamily:"--useaward-font-family",backgroundColor:"--useaward-background-color"},embed:{questionTextColor:"--useaward-question-color",buttonBackground:"--useaward-button-color",buttonTextColor:"--useaward-button-text-color",selectionBackground:"--useaward-selection-background-color",selectionTextColor:"--useaward-selection-text-color"}};var or=e=>typeof e=="function";var ir=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var go=Function.prototype.toString,Ea=go.call(Object);var{floor:Aa,abs:Ia,round:_a,min:Oa,max:Da,pow:Ra,sign:Ma}=Math;var ho;ho=new WeakMap;function bo(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ar(e={}){let{strict:t=!0,hookName:r="useContext",providerName:n="Provider",errorMessage:o,defaultValue:i}=e,a=ne(i);function s(){let l=Q(a);if(!l&&t){let u=new Error(o??bo(r,n));throw u.name="ContextError",ir(Error,"captureStackTrace")&&or(Error.captureStackTrace)&&Error.captureStackTrace(u,s),u}return l}return[a.Provider,s,a]}var He=e=>typeof e=="object"&&e!==null;var yo=1,xo=9,wo=11,vo=e=>He(e)&&e.nodeType===yo&&typeof e.nodeName=="string",sr=e=>He(e)&&e.nodeType===xo,Co=e=>He(e)&&e===e.window;var So=e=>He(e)&&e.nodeType!==void 0,Po=e=>So(e)&&e.nodeType===wo&&"host"in e;function lr(e){return sr(e)?e:Co(e)?e.document:e?.ownerDocument??document}function ht(e){return Po(e)?ht(e.host):sr(e)?e.defaultView??window:vo(e)?e.ownerDocument?.defaultView??window:window}var ko=e=>typeof e=="function",cr=(e,...t)=>ko(e)?e(...t):e;var[To,Eo]=ar({hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})}),Ao=y("<span hidden>"),bt=e=>{let[t,r]=M(),n=()=>cr(e.value)??t()?.getRootNode()??document,o=G(()=>({getRootNode:n,getDocument:()=>lr(n()),getWindow:()=>ht(n())}));return p(To,{value:o,get children(){return[L(()=>e.children),p(E,{get when(){return!e.value},get children(){var i=Ao();return _e(r,i),i}})]}})};var ur=`/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */
|
|
3
|
+
@layer properties;
|
|
4
|
+
@layer theme, base, components, utilities;
|
|
5
|
+
@layer theme {
|
|
6
|
+
:root, :host {
|
|
7
|
+
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
|
|
8
|
+
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
9
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
|
10
|
+
"Courier New", monospace;
|
|
11
|
+
--color-red-50: oklch(97.1% 0.013 17.38);
|
|
12
|
+
--color-red-200: oklch(88.5% 0.062 18.334);
|
|
13
|
+
--color-red-500: oklch(63.7% 0.237 25.331);
|
|
14
|
+
--color-red-600: oklch(57.7% 0.245 27.325);
|
|
15
|
+
--color-red-700: oklch(50.5% 0.213 27.518);
|
|
16
|
+
--color-blue-100: oklch(93.2% 0.032 255.585);
|
|
17
|
+
--color-blue-500: oklch(62.3% 0.214 259.815);
|
|
18
|
+
--color-gray-100: oklch(96.7% 0.003 264.542);
|
|
19
|
+
--color-gray-200: oklch(92.8% 0.006 264.531);
|
|
20
|
+
--color-gray-300: oklch(87.2% 0.01 258.338);
|
|
21
|
+
--color-gray-400: oklch(70.7% 0.022 261.325);
|
|
22
|
+
--color-gray-600: oklch(44.6% 0.03 256.802);
|
|
23
|
+
--color-gray-800: oklch(27.8% 0.033 256.848);
|
|
24
|
+
--color-gray-900: oklch(21% 0.034 264.665);
|
|
25
|
+
--color-black: #000;
|
|
26
|
+
--color-white: #fff;
|
|
27
|
+
--spacing: 0.25rem;
|
|
28
|
+
--text-xs: 0.75rem;
|
|
29
|
+
--text-xs--line-height: calc(1 / 0.75);
|
|
30
|
+
--text-sm: 0.875rem;
|
|
31
|
+
--text-sm--line-height: calc(1.25 / 0.875);
|
|
32
|
+
--text-base: 1rem;
|
|
33
|
+
--text-base--line-height: calc(1.5 / 1);
|
|
34
|
+
--text-lg: 1.125rem;
|
|
35
|
+
--text-lg--line-height: calc(1.75 / 1.125);
|
|
36
|
+
--text-xl: 1.25rem;
|
|
37
|
+
--text-xl--line-height: calc(1.75 / 1.25);
|
|
38
|
+
--text-2xl: 1.5rem;
|
|
39
|
+
--text-2xl--line-height: calc(2 / 1.5);
|
|
40
|
+
--font-weight-medium: 500;
|
|
41
|
+
--font-weight-semibold: 600;
|
|
42
|
+
--font-weight-bold: 700;
|
|
43
|
+
--leading-tight: 1.25;
|
|
44
|
+
--radius-md: 0.375rem;
|
|
45
|
+
--radius-lg: 0.5rem;
|
|
46
|
+
--animate-spin: spin 1s linear infinite;
|
|
47
|
+
--default-transition-duration: 150ms;
|
|
48
|
+
--default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
49
|
+
--default-font-family: var(--font-sans);
|
|
50
|
+
--default-mono-font-family: var(--font-mono);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
@layer base {
|
|
54
|
+
*, ::after, ::before, ::backdrop, ::file-selector-button {
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
margin: 0;
|
|
57
|
+
padding: 0;
|
|
58
|
+
border: 0 solid;
|
|
59
|
+
}
|
|
60
|
+
html, :host {
|
|
61
|
+
line-height: 1.5;
|
|
62
|
+
-webkit-text-size-adjust: 100%;
|
|
63
|
+
tab-size: 4;
|
|
64
|
+
font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
|
|
65
|
+
font-feature-settings: var(--default-font-feature-settings, normal);
|
|
66
|
+
font-variation-settings: var(--default-font-variation-settings, normal);
|
|
67
|
+
-webkit-tap-highlight-color: transparent;
|
|
68
|
+
}
|
|
69
|
+
hr {
|
|
70
|
+
height: 0;
|
|
71
|
+
color: inherit;
|
|
72
|
+
border-top-width: 1px;
|
|
73
|
+
}
|
|
74
|
+
abbr:where([title]) {
|
|
75
|
+
-webkit-text-decoration: underline dotted;
|
|
76
|
+
text-decoration: underline dotted;
|
|
77
|
+
}
|
|
78
|
+
h1, h2, h3, h4, h5, h6 {
|
|
79
|
+
font-size: inherit;
|
|
80
|
+
font-weight: inherit;
|
|
81
|
+
}
|
|
82
|
+
a {
|
|
83
|
+
color: inherit;
|
|
84
|
+
-webkit-text-decoration: inherit;
|
|
85
|
+
text-decoration: inherit;
|
|
86
|
+
}
|
|
87
|
+
b, strong {
|
|
88
|
+
font-weight: bolder;
|
|
89
|
+
}
|
|
90
|
+
code, kbd, samp, pre {
|
|
91
|
+
font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
|
|
92
|
+
font-feature-settings: var(--default-mono-font-feature-settings, normal);
|
|
93
|
+
font-variation-settings: var(--default-mono-font-variation-settings, normal);
|
|
94
|
+
font-size: 1em;
|
|
95
|
+
}
|
|
96
|
+
small {
|
|
97
|
+
font-size: 80%;
|
|
98
|
+
}
|
|
99
|
+
sub, sup {
|
|
100
|
+
font-size: 75%;
|
|
101
|
+
line-height: 0;
|
|
102
|
+
position: relative;
|
|
103
|
+
vertical-align: baseline;
|
|
104
|
+
}
|
|
105
|
+
sub {
|
|
106
|
+
bottom: -0.25em;
|
|
107
|
+
}
|
|
108
|
+
sup {
|
|
109
|
+
top: -0.5em;
|
|
110
|
+
}
|
|
111
|
+
table {
|
|
112
|
+
text-indent: 0;
|
|
113
|
+
border-color: inherit;
|
|
114
|
+
border-collapse: collapse;
|
|
115
|
+
}
|
|
116
|
+
:-moz-focusring {
|
|
117
|
+
outline: auto;
|
|
118
|
+
}
|
|
119
|
+
progress {
|
|
120
|
+
vertical-align: baseline;
|
|
121
|
+
}
|
|
122
|
+
summary {
|
|
123
|
+
display: list-item;
|
|
124
|
+
}
|
|
125
|
+
ol, ul, menu {
|
|
126
|
+
list-style: none;
|
|
127
|
+
}
|
|
128
|
+
img, svg, video, canvas, audio, iframe, embed, object {
|
|
129
|
+
display: block;
|
|
130
|
+
vertical-align: middle;
|
|
131
|
+
}
|
|
132
|
+
img, video {
|
|
133
|
+
max-width: 100%;
|
|
134
|
+
height: auto;
|
|
135
|
+
}
|
|
136
|
+
button, input, select, optgroup, textarea, ::file-selector-button {
|
|
137
|
+
font: inherit;
|
|
138
|
+
font-feature-settings: inherit;
|
|
139
|
+
font-variation-settings: inherit;
|
|
140
|
+
letter-spacing: inherit;
|
|
141
|
+
color: inherit;
|
|
142
|
+
border-radius: 0;
|
|
143
|
+
background-color: transparent;
|
|
144
|
+
opacity: 1;
|
|
145
|
+
}
|
|
146
|
+
:where(select:is([multiple], [size])) optgroup {
|
|
147
|
+
font-weight: bolder;
|
|
148
|
+
}
|
|
149
|
+
:where(select:is([multiple], [size])) optgroup option {
|
|
150
|
+
padding-inline-start: 20px;
|
|
151
|
+
}
|
|
152
|
+
::file-selector-button {
|
|
153
|
+
margin-inline-end: 4px;
|
|
154
|
+
}
|
|
155
|
+
::placeholder {
|
|
156
|
+
opacity: 1;
|
|
157
|
+
}
|
|
158
|
+
@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
|
|
159
|
+
::placeholder {
|
|
160
|
+
color: currentcolor;
|
|
161
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
162
|
+
color: color-mix(in oklab, currentcolor 50%, transparent);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
textarea {
|
|
167
|
+
resize: vertical;
|
|
168
|
+
}
|
|
169
|
+
::-webkit-search-decoration {
|
|
170
|
+
-webkit-appearance: none;
|
|
171
|
+
}
|
|
172
|
+
::-webkit-date-and-time-value {
|
|
173
|
+
min-height: 1lh;
|
|
174
|
+
text-align: inherit;
|
|
175
|
+
}
|
|
176
|
+
::-webkit-datetime-edit {
|
|
177
|
+
display: inline-flex;
|
|
178
|
+
}
|
|
179
|
+
::-webkit-datetime-edit-fields-wrapper {
|
|
180
|
+
padding: 0;
|
|
181
|
+
}
|
|
182
|
+
::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
|
|
183
|
+
padding-block: 0;
|
|
184
|
+
}
|
|
185
|
+
::-webkit-calendar-picker-indicator {
|
|
186
|
+
line-height: 1;
|
|
187
|
+
}
|
|
188
|
+
:-moz-ui-invalid {
|
|
189
|
+
box-shadow: none;
|
|
190
|
+
}
|
|
191
|
+
button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
|
|
192
|
+
appearance: button;
|
|
193
|
+
}
|
|
194
|
+
::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
|
|
195
|
+
height: auto;
|
|
196
|
+
}
|
|
197
|
+
[hidden]:where(:not([hidden="until-found"])) {
|
|
198
|
+
display: none !important;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
@layer utilities {
|
|
202
|
+
.static {
|
|
203
|
+
position: static;
|
|
204
|
+
}
|
|
205
|
+
.container {
|
|
206
|
+
width: 100%;
|
|
207
|
+
@media (width >= 40rem) {
|
|
208
|
+
max-width: 40rem;
|
|
209
|
+
}
|
|
210
|
+
@media (width >= 48rem) {
|
|
211
|
+
max-width: 48rem;
|
|
212
|
+
}
|
|
213
|
+
@media (width >= 64rem) {
|
|
214
|
+
max-width: 64rem;
|
|
215
|
+
}
|
|
216
|
+
@media (width >= 80rem) {
|
|
217
|
+
max-width: 80rem;
|
|
218
|
+
}
|
|
219
|
+
@media (width >= 96rem) {
|
|
220
|
+
max-width: 96rem;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
.mt-1 {
|
|
224
|
+
margin-top: calc(var(--spacing) * 1);
|
|
225
|
+
}
|
|
226
|
+
.mt-3 {
|
|
227
|
+
margin-top: calc(var(--spacing) * 3);
|
|
228
|
+
}
|
|
229
|
+
.mt-4 {
|
|
230
|
+
margin-top: calc(var(--spacing) * 4);
|
|
231
|
+
}
|
|
232
|
+
.mb-1 {
|
|
233
|
+
margin-bottom: calc(var(--spacing) * 1);
|
|
234
|
+
}
|
|
235
|
+
.mb-2 {
|
|
236
|
+
margin-bottom: calc(var(--spacing) * 2);
|
|
237
|
+
}
|
|
238
|
+
.mb-3 {
|
|
239
|
+
margin-bottom: calc(var(--spacing) * 3);
|
|
240
|
+
}
|
|
241
|
+
.mb-4 {
|
|
242
|
+
margin-bottom: calc(var(--spacing) * 4);
|
|
243
|
+
}
|
|
244
|
+
.mb-6 {
|
|
245
|
+
margin-bottom: calc(var(--spacing) * 6);
|
|
246
|
+
}
|
|
247
|
+
.block {
|
|
248
|
+
display: block;
|
|
249
|
+
}
|
|
250
|
+
.flex {
|
|
251
|
+
display: flex;
|
|
252
|
+
}
|
|
253
|
+
.hidden {
|
|
254
|
+
display: none;
|
|
255
|
+
}
|
|
256
|
+
.inline-block {
|
|
257
|
+
display: inline-block;
|
|
258
|
+
}
|
|
259
|
+
.inline-flex {
|
|
260
|
+
display: inline-flex;
|
|
261
|
+
}
|
|
262
|
+
.table {
|
|
263
|
+
display: table;
|
|
264
|
+
}
|
|
265
|
+
.size-4 {
|
|
266
|
+
width: calc(var(--spacing) * 4);
|
|
267
|
+
height: calc(var(--spacing) * 4);
|
|
268
|
+
}
|
|
269
|
+
.h-5 {
|
|
270
|
+
height: calc(var(--spacing) * 5);
|
|
271
|
+
}
|
|
272
|
+
.h-8 {
|
|
273
|
+
height: calc(var(--spacing) * 8);
|
|
274
|
+
}
|
|
275
|
+
.h-10 {
|
|
276
|
+
height: calc(var(--spacing) * 10);
|
|
277
|
+
}
|
|
278
|
+
.h-12 {
|
|
279
|
+
height: calc(var(--spacing) * 12);
|
|
280
|
+
}
|
|
281
|
+
.h-20 {
|
|
282
|
+
height: calc(var(--spacing) * 20);
|
|
283
|
+
}
|
|
284
|
+
.h-full {
|
|
285
|
+
height: 100%;
|
|
286
|
+
}
|
|
287
|
+
.w-5 {
|
|
288
|
+
width: calc(var(--spacing) * 5);
|
|
289
|
+
}
|
|
290
|
+
.w-8 {
|
|
291
|
+
width: calc(var(--spacing) * 8);
|
|
292
|
+
}
|
|
293
|
+
.w-10 {
|
|
294
|
+
width: calc(var(--spacing) * 10);
|
|
295
|
+
}
|
|
296
|
+
.w-12 {
|
|
297
|
+
width: calc(var(--spacing) * 12);
|
|
298
|
+
}
|
|
299
|
+
.w-20 {
|
|
300
|
+
width: calc(var(--spacing) * 20);
|
|
301
|
+
}
|
|
302
|
+
.w-auto {
|
|
303
|
+
width: auto;
|
|
304
|
+
}
|
|
305
|
+
.w-full {
|
|
306
|
+
width: 100%;
|
|
307
|
+
}
|
|
308
|
+
.max-w-\\[120px\\] {
|
|
309
|
+
max-width: 120px;
|
|
310
|
+
}
|
|
311
|
+
.flex-1 {
|
|
312
|
+
flex: 1;
|
|
313
|
+
}
|
|
314
|
+
.flex-shrink {
|
|
315
|
+
flex-shrink: 1;
|
|
316
|
+
}
|
|
317
|
+
.shrink-0 {
|
|
318
|
+
flex-shrink: 0;
|
|
319
|
+
}
|
|
320
|
+
.border-collapse {
|
|
321
|
+
border-collapse: collapse;
|
|
322
|
+
}
|
|
323
|
+
.transform {
|
|
324
|
+
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
|
|
325
|
+
}
|
|
326
|
+
.animate-spin {
|
|
327
|
+
animation: var(--animate-spin);
|
|
328
|
+
}
|
|
329
|
+
.cursor-pointer {
|
|
330
|
+
cursor: pointer;
|
|
331
|
+
}
|
|
332
|
+
.resize {
|
|
333
|
+
resize: both;
|
|
334
|
+
}
|
|
335
|
+
.flex-col {
|
|
336
|
+
flex-direction: column;
|
|
337
|
+
}
|
|
338
|
+
.flex-row {
|
|
339
|
+
flex-direction: row;
|
|
340
|
+
}
|
|
341
|
+
.flex-row-reverse {
|
|
342
|
+
flex-direction: row-reverse;
|
|
343
|
+
}
|
|
344
|
+
.items-center {
|
|
345
|
+
align-items: center;
|
|
346
|
+
}
|
|
347
|
+
.items-start {
|
|
348
|
+
align-items: flex-start;
|
|
349
|
+
}
|
|
350
|
+
.justify-between {
|
|
351
|
+
justify-content: space-between;
|
|
352
|
+
}
|
|
353
|
+
.justify-center {
|
|
354
|
+
justify-content: center;
|
|
355
|
+
}
|
|
356
|
+
.justify-end {
|
|
357
|
+
justify-content: flex-end;
|
|
358
|
+
}
|
|
359
|
+
.justify-start {
|
|
360
|
+
justify-content: flex-start;
|
|
361
|
+
}
|
|
362
|
+
.gap-1 {
|
|
363
|
+
gap: calc(var(--spacing) * 1);
|
|
364
|
+
}
|
|
365
|
+
.gap-2 {
|
|
366
|
+
gap: calc(var(--spacing) * 2);
|
|
367
|
+
}
|
|
368
|
+
.gap-3 {
|
|
369
|
+
gap: calc(var(--spacing) * 3);
|
|
370
|
+
}
|
|
371
|
+
.gap-4 {
|
|
372
|
+
gap: calc(var(--spacing) * 4);
|
|
373
|
+
}
|
|
374
|
+
.gap-6 {
|
|
375
|
+
gap: calc(var(--spacing) * 6);
|
|
376
|
+
}
|
|
377
|
+
.space-y-3 {
|
|
378
|
+
:where(& > :not(:last-child)) {
|
|
379
|
+
--tw-space-y-reverse: 0;
|
|
380
|
+
margin-block-start: calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));
|
|
381
|
+
margin-block-end: calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
.rounded {
|
|
385
|
+
border-radius: 0.25rem;
|
|
386
|
+
}
|
|
387
|
+
.rounded-full {
|
|
388
|
+
border-radius: calc(infinity * 1px);
|
|
389
|
+
}
|
|
390
|
+
.rounded-lg {
|
|
391
|
+
border-radius: var(--radius-lg);
|
|
392
|
+
}
|
|
393
|
+
.rounded-md {
|
|
394
|
+
border-radius: var(--radius-md);
|
|
395
|
+
}
|
|
396
|
+
.border {
|
|
397
|
+
border-style: var(--tw-border-style);
|
|
398
|
+
border-width: 1px;
|
|
399
|
+
}
|
|
400
|
+
.border-2 {
|
|
401
|
+
border-style: var(--tw-border-style);
|
|
402
|
+
border-width: 2px;
|
|
403
|
+
}
|
|
404
|
+
.border-4 {
|
|
405
|
+
border-style: var(--tw-border-style);
|
|
406
|
+
border-width: 4px;
|
|
407
|
+
}
|
|
408
|
+
.border-solid {
|
|
409
|
+
--tw-border-style: solid;
|
|
410
|
+
border-style: solid;
|
|
411
|
+
}
|
|
412
|
+
.border-current {
|
|
413
|
+
border-color: currentcolor;
|
|
414
|
+
}
|
|
415
|
+
.border-gray-200 {
|
|
416
|
+
border-color: var(--color-gray-200);
|
|
417
|
+
}
|
|
418
|
+
.border-gray-300 {
|
|
419
|
+
border-color: var(--color-gray-300);
|
|
420
|
+
}
|
|
421
|
+
.border-red-200 {
|
|
422
|
+
border-color: var(--color-red-200);
|
|
423
|
+
}
|
|
424
|
+
.border-red-500 {
|
|
425
|
+
border-color: var(--color-red-500);
|
|
426
|
+
}
|
|
427
|
+
.border-r-transparent {
|
|
428
|
+
border-right-color: transparent;
|
|
429
|
+
}
|
|
430
|
+
.bg-\\(--useaward-button-color\\) {
|
|
431
|
+
background-color: var(--useaward-button-color);
|
|
432
|
+
}
|
|
433
|
+
.bg-black {
|
|
434
|
+
background-color: var(--color-black);
|
|
435
|
+
}
|
|
436
|
+
.bg-blue-100 {
|
|
437
|
+
background-color: var(--color-blue-100);
|
|
438
|
+
}
|
|
439
|
+
.bg-gray-100 {
|
|
440
|
+
background-color: var(--color-gray-100);
|
|
441
|
+
}
|
|
442
|
+
.bg-gray-200 {
|
|
443
|
+
background-color: var(--color-gray-200);
|
|
444
|
+
}
|
|
445
|
+
.bg-gray-300 {
|
|
446
|
+
background-color: var(--color-gray-300);
|
|
447
|
+
}
|
|
448
|
+
.bg-red-50 {
|
|
449
|
+
background-color: var(--color-red-50);
|
|
450
|
+
}
|
|
451
|
+
.bg-white {
|
|
452
|
+
background-color: var(--color-white);
|
|
453
|
+
}
|
|
454
|
+
.object-contain {
|
|
455
|
+
object-fit: contain;
|
|
456
|
+
}
|
|
457
|
+
.p-3 {
|
|
458
|
+
padding: calc(var(--spacing) * 3);
|
|
459
|
+
}
|
|
460
|
+
.p-4 {
|
|
461
|
+
padding: calc(var(--spacing) * 4);
|
|
462
|
+
}
|
|
463
|
+
.p-6 {
|
|
464
|
+
padding: calc(var(--spacing) * 6);
|
|
465
|
+
}
|
|
466
|
+
.p-8 {
|
|
467
|
+
padding: calc(var(--spacing) * 8);
|
|
468
|
+
}
|
|
469
|
+
.px-1 {
|
|
470
|
+
padding-inline: calc(var(--spacing) * 1);
|
|
471
|
+
}
|
|
472
|
+
.px-1\\.5 {
|
|
473
|
+
padding-inline: calc(var(--spacing) * 1.5);
|
|
474
|
+
}
|
|
475
|
+
.px-2 {
|
|
476
|
+
padding-inline: calc(var(--spacing) * 2);
|
|
477
|
+
}
|
|
478
|
+
.px-3 {
|
|
479
|
+
padding-inline: calc(var(--spacing) * 3);
|
|
480
|
+
}
|
|
481
|
+
.px-4 {
|
|
482
|
+
padding-inline: calc(var(--spacing) * 4);
|
|
483
|
+
}
|
|
484
|
+
.px-8 {
|
|
485
|
+
padding-inline: calc(var(--spacing) * 8);
|
|
486
|
+
}
|
|
487
|
+
.py-0 {
|
|
488
|
+
padding-block: calc(var(--spacing) * 0);
|
|
489
|
+
}
|
|
490
|
+
.py-0\\.5 {
|
|
491
|
+
padding-block: calc(var(--spacing) * 0.5);
|
|
492
|
+
}
|
|
493
|
+
.py-1 {
|
|
494
|
+
padding-block: calc(var(--spacing) * 1);
|
|
495
|
+
}
|
|
496
|
+
.py-2 {
|
|
497
|
+
padding-block: calc(var(--spacing) * 2);
|
|
498
|
+
}
|
|
499
|
+
.py-3 {
|
|
500
|
+
padding-block: calc(var(--spacing) * 3);
|
|
501
|
+
}
|
|
502
|
+
.text-center {
|
|
503
|
+
text-align: center;
|
|
504
|
+
}
|
|
505
|
+
.text-left {
|
|
506
|
+
text-align: left;
|
|
507
|
+
}
|
|
508
|
+
.text-2xl {
|
|
509
|
+
font-size: var(--text-2xl);
|
|
510
|
+
line-height: var(--tw-leading, var(--text-2xl--line-height));
|
|
511
|
+
}
|
|
512
|
+
.text-base {
|
|
513
|
+
font-size: var(--text-base);
|
|
514
|
+
line-height: var(--tw-leading, var(--text-base--line-height));
|
|
515
|
+
}
|
|
516
|
+
.text-lg {
|
|
517
|
+
font-size: var(--text-lg);
|
|
518
|
+
line-height: var(--tw-leading, var(--text-lg--line-height));
|
|
519
|
+
}
|
|
520
|
+
.text-sm {
|
|
521
|
+
font-size: var(--text-sm);
|
|
522
|
+
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
523
|
+
}
|
|
524
|
+
.text-xl {
|
|
525
|
+
font-size: var(--text-xl);
|
|
526
|
+
line-height: var(--tw-leading, var(--text-xl--line-height));
|
|
527
|
+
}
|
|
528
|
+
.text-xs {
|
|
529
|
+
font-size: var(--text-xs);
|
|
530
|
+
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
531
|
+
}
|
|
532
|
+
.leading-none {
|
|
533
|
+
--tw-leading: 1;
|
|
534
|
+
line-height: 1;
|
|
535
|
+
}
|
|
536
|
+
.leading-tight {
|
|
537
|
+
--tw-leading: var(--leading-tight);
|
|
538
|
+
line-height: var(--leading-tight);
|
|
539
|
+
}
|
|
540
|
+
.font-bold {
|
|
541
|
+
--tw-font-weight: var(--font-weight-bold);
|
|
542
|
+
font-weight: var(--font-weight-bold);
|
|
543
|
+
}
|
|
544
|
+
.font-medium {
|
|
545
|
+
--tw-font-weight: var(--font-weight-medium);
|
|
546
|
+
font-weight: var(--font-weight-medium);
|
|
547
|
+
}
|
|
548
|
+
.font-semibold {
|
|
549
|
+
--tw-font-weight: var(--font-weight-semibold);
|
|
550
|
+
font-weight: var(--font-weight-semibold);
|
|
551
|
+
}
|
|
552
|
+
.whitespace-nowrap {
|
|
553
|
+
white-space: nowrap;
|
|
554
|
+
}
|
|
555
|
+
.text-\\(--useaward-button-text-color\\) {
|
|
556
|
+
color: var(--useaward-button-text-color);
|
|
557
|
+
}
|
|
558
|
+
.text-gray-300 {
|
|
559
|
+
color: var(--color-gray-300);
|
|
560
|
+
}
|
|
561
|
+
.text-gray-400 {
|
|
562
|
+
color: var(--color-gray-400);
|
|
563
|
+
}
|
|
564
|
+
.text-gray-600 {
|
|
565
|
+
color: var(--color-gray-600);
|
|
566
|
+
}
|
|
567
|
+
.text-gray-900 {
|
|
568
|
+
color: var(--color-gray-900);
|
|
569
|
+
}
|
|
570
|
+
.text-red-600 {
|
|
571
|
+
color: var(--color-red-600);
|
|
572
|
+
}
|
|
573
|
+
.text-red-700 {
|
|
574
|
+
color: var(--color-red-700);
|
|
575
|
+
}
|
|
576
|
+
.text-white {
|
|
577
|
+
color: var(--color-white);
|
|
578
|
+
}
|
|
579
|
+
.uppercase {
|
|
580
|
+
text-transform: uppercase;
|
|
581
|
+
}
|
|
582
|
+
.underline {
|
|
583
|
+
text-decoration-line: underline;
|
|
584
|
+
}
|
|
585
|
+
.antialiased {
|
|
586
|
+
-webkit-font-smoothing: antialiased;
|
|
587
|
+
-moz-osx-font-smoothing: grayscale;
|
|
588
|
+
}
|
|
589
|
+
.opacity-25 {
|
|
590
|
+
opacity: 25%;
|
|
591
|
+
}
|
|
592
|
+
.opacity-75 {
|
|
593
|
+
opacity: 75%;
|
|
594
|
+
}
|
|
595
|
+
.opacity-90 {
|
|
596
|
+
opacity: 90%;
|
|
597
|
+
}
|
|
598
|
+
.outline {
|
|
599
|
+
outline-style: var(--tw-outline-style);
|
|
600
|
+
outline-width: 1px;
|
|
601
|
+
}
|
|
602
|
+
.transition-all {
|
|
603
|
+
transition-property: all;
|
|
604
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
605
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
606
|
+
}
|
|
607
|
+
.transition-colors {
|
|
608
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
|
|
609
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
610
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
611
|
+
}
|
|
612
|
+
.outline-none {
|
|
613
|
+
--tw-outline-style: none;
|
|
614
|
+
outline-style: none;
|
|
615
|
+
}
|
|
616
|
+
.select-none {
|
|
617
|
+
-webkit-user-select: none;
|
|
618
|
+
user-select: none;
|
|
619
|
+
}
|
|
620
|
+
.hover\\:bg-gray-100 {
|
|
621
|
+
&:hover {
|
|
622
|
+
@media (hover: hover) {
|
|
623
|
+
background-color: var(--color-gray-100);
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
.hover\\:bg-gray-200 {
|
|
628
|
+
&:hover {
|
|
629
|
+
@media (hover: hover) {
|
|
630
|
+
background-color: var(--color-gray-200);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
.hover\\:text-gray-600 {
|
|
635
|
+
&:hover {
|
|
636
|
+
@media (hover: hover) {
|
|
637
|
+
color: var(--color-gray-600);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
.hover\\:text-gray-800 {
|
|
642
|
+
&:hover {
|
|
643
|
+
@media (hover: hover) {
|
|
644
|
+
color: var(--color-gray-800);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
.hover\\:opacity-100 {
|
|
649
|
+
&:hover {
|
|
650
|
+
@media (hover: hover) {
|
|
651
|
+
opacity: 100%;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
.focus\\:ring-2 {
|
|
656
|
+
&:focus {
|
|
657
|
+
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
658
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
.focus\\:ring-blue-500 {
|
|
662
|
+
&:focus {
|
|
663
|
+
--tw-ring-color: var(--color-blue-500);
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
.focus\\:outline-none {
|
|
667
|
+
&:focus {
|
|
668
|
+
--tw-outline-style: none;
|
|
669
|
+
outline-style: none;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
.active\\:bg-gray-300 {
|
|
673
|
+
&:active {
|
|
674
|
+
background-color: var(--color-gray-300);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
.disabled\\:pointer-events-none {
|
|
678
|
+
&:disabled {
|
|
679
|
+
pointer-events: none;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
.disabled\\:cursor-not-allowed {
|
|
683
|
+
&:disabled {
|
|
684
|
+
cursor: not-allowed;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
.disabled\\:bg-gray-100 {
|
|
688
|
+
&:disabled {
|
|
689
|
+
background-color: var(--color-gray-100);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
.disabled\\:opacity-30 {
|
|
693
|
+
&:disabled {
|
|
694
|
+
opacity: 30%;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
.disabled\\:opacity-50 {
|
|
698
|
+
&:disabled {
|
|
699
|
+
opacity: 50%;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
.\\[\\&_svg\\]\\:pointer-events-none {
|
|
703
|
+
& svg {
|
|
704
|
+
pointer-events: none;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
.\\[\\&_svg\\]\\:shrink-0 {
|
|
708
|
+
& svg {
|
|
709
|
+
flex-shrink: 0;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
.scrollable-container::-webkit-scrollbar {
|
|
714
|
+
display: none;
|
|
715
|
+
}
|
|
716
|
+
@layer base;
|
|
717
|
+
@property --tw-rotate-x {
|
|
718
|
+
syntax: "*";
|
|
719
|
+
inherits: false;
|
|
720
|
+
}
|
|
721
|
+
@property --tw-rotate-y {
|
|
722
|
+
syntax: "*";
|
|
723
|
+
inherits: false;
|
|
724
|
+
}
|
|
725
|
+
@property --tw-rotate-z {
|
|
726
|
+
syntax: "*";
|
|
727
|
+
inherits: false;
|
|
728
|
+
}
|
|
729
|
+
@property --tw-skew-x {
|
|
730
|
+
syntax: "*";
|
|
731
|
+
inherits: false;
|
|
732
|
+
}
|
|
733
|
+
@property --tw-skew-y {
|
|
734
|
+
syntax: "*";
|
|
735
|
+
inherits: false;
|
|
736
|
+
}
|
|
737
|
+
@property --tw-space-y-reverse {
|
|
738
|
+
syntax: "*";
|
|
739
|
+
inherits: false;
|
|
740
|
+
initial-value: 0;
|
|
741
|
+
}
|
|
742
|
+
@property --tw-border-style {
|
|
743
|
+
syntax: "*";
|
|
744
|
+
inherits: false;
|
|
745
|
+
initial-value: solid;
|
|
746
|
+
}
|
|
747
|
+
@property --tw-leading {
|
|
748
|
+
syntax: "*";
|
|
749
|
+
inherits: false;
|
|
750
|
+
}
|
|
751
|
+
@property --tw-font-weight {
|
|
752
|
+
syntax: "*";
|
|
753
|
+
inherits: false;
|
|
754
|
+
}
|
|
755
|
+
@property --tw-outline-style {
|
|
756
|
+
syntax: "*";
|
|
757
|
+
inherits: false;
|
|
758
|
+
initial-value: solid;
|
|
759
|
+
}
|
|
760
|
+
@property --tw-shadow {
|
|
761
|
+
syntax: "*";
|
|
762
|
+
inherits: false;
|
|
763
|
+
initial-value: 0 0 #0000;
|
|
764
|
+
}
|
|
765
|
+
@property --tw-shadow-color {
|
|
766
|
+
syntax: "*";
|
|
767
|
+
inherits: false;
|
|
768
|
+
}
|
|
769
|
+
@property --tw-shadow-alpha {
|
|
770
|
+
syntax: "<percentage>";
|
|
771
|
+
inherits: false;
|
|
772
|
+
initial-value: 100%;
|
|
773
|
+
}
|
|
774
|
+
@property --tw-inset-shadow {
|
|
775
|
+
syntax: "*";
|
|
776
|
+
inherits: false;
|
|
777
|
+
initial-value: 0 0 #0000;
|
|
778
|
+
}
|
|
779
|
+
@property --tw-inset-shadow-color {
|
|
780
|
+
syntax: "*";
|
|
781
|
+
inherits: false;
|
|
782
|
+
}
|
|
783
|
+
@property --tw-inset-shadow-alpha {
|
|
784
|
+
syntax: "<percentage>";
|
|
785
|
+
inherits: false;
|
|
786
|
+
initial-value: 100%;
|
|
787
|
+
}
|
|
788
|
+
@property --tw-ring-color {
|
|
789
|
+
syntax: "*";
|
|
790
|
+
inherits: false;
|
|
791
|
+
}
|
|
792
|
+
@property --tw-ring-shadow {
|
|
793
|
+
syntax: "*";
|
|
794
|
+
inherits: false;
|
|
795
|
+
initial-value: 0 0 #0000;
|
|
796
|
+
}
|
|
797
|
+
@property --tw-inset-ring-color {
|
|
798
|
+
syntax: "*";
|
|
799
|
+
inherits: false;
|
|
800
|
+
}
|
|
801
|
+
@property --tw-inset-ring-shadow {
|
|
802
|
+
syntax: "*";
|
|
803
|
+
inherits: false;
|
|
804
|
+
initial-value: 0 0 #0000;
|
|
805
|
+
}
|
|
806
|
+
@property --tw-ring-inset {
|
|
807
|
+
syntax: "*";
|
|
808
|
+
inherits: false;
|
|
809
|
+
}
|
|
810
|
+
@property --tw-ring-offset-width {
|
|
811
|
+
syntax: "<length>";
|
|
812
|
+
inherits: false;
|
|
813
|
+
initial-value: 0px;
|
|
814
|
+
}
|
|
815
|
+
@property --tw-ring-offset-color {
|
|
816
|
+
syntax: "*";
|
|
817
|
+
inherits: false;
|
|
818
|
+
initial-value: #fff;
|
|
819
|
+
}
|
|
820
|
+
@property --tw-ring-offset-shadow {
|
|
821
|
+
syntax: "*";
|
|
822
|
+
inherits: false;
|
|
823
|
+
initial-value: 0 0 #0000;
|
|
824
|
+
}
|
|
825
|
+
@keyframes spin {
|
|
826
|
+
to {
|
|
827
|
+
transform: rotate(360deg);
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
@layer properties {
|
|
831
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
832
|
+
*, ::before, ::after, ::backdrop {
|
|
833
|
+
--tw-rotate-x: initial;
|
|
834
|
+
--tw-rotate-y: initial;
|
|
835
|
+
--tw-rotate-z: initial;
|
|
836
|
+
--tw-skew-x: initial;
|
|
837
|
+
--tw-skew-y: initial;
|
|
838
|
+
--tw-space-y-reverse: 0;
|
|
839
|
+
--tw-border-style: solid;
|
|
840
|
+
--tw-leading: initial;
|
|
841
|
+
--tw-font-weight: initial;
|
|
842
|
+
--tw-outline-style: solid;
|
|
843
|
+
--tw-shadow: 0 0 #0000;
|
|
844
|
+
--tw-shadow-color: initial;
|
|
845
|
+
--tw-shadow-alpha: 100%;
|
|
846
|
+
--tw-inset-shadow: 0 0 #0000;
|
|
847
|
+
--tw-inset-shadow-color: initial;
|
|
848
|
+
--tw-inset-shadow-alpha: 100%;
|
|
849
|
+
--tw-ring-color: initial;
|
|
850
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
851
|
+
--tw-inset-ring-color: initial;
|
|
852
|
+
--tw-inset-ring-shadow: 0 0 #0000;
|
|
853
|
+
--tw-ring-inset: initial;
|
|
854
|
+
--tw-ring-offset-width: 0px;
|
|
855
|
+
--tw-ring-offset-color: #fff;
|
|
856
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
`;var dr=ne();function fr(e){return p(dr.Provider,{get value(){return e.value},get children(){return e.children}})}function ye(){let e=Q(dr);if(!e)throw new Error("useLocaleContext must be used within a LocaleProvider");return e}import*as mr from"@solid-primitives/i18n";async function pr(e){let t=nr[e].dict;return mr.flatten(t)}var _o="https://fonts.bunny.net/css2",gr="useaward-font",hr=e=>{let t=document.getElementById(gr),r=e||Be;if(t?.getAttribute("href")?.includes(r))return;t?.remove();let n=document.createElement("link");n.href=`${_o}?family=${r}:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap`,n.rel="stylesheet",n.id=gr,document.head.appendChild(n)};var br=({theme:e,container:t})=>{if(!e)return;let r=t?.style;r&&(Oo({fontFamily:e.fontFamily??Be,documentStyle:r}),Do({theme:e,documentStyle:r}),Ro({theme:e,documentStyle:r}))},Oo=({fontFamily:e,documentStyle:t})=>{t.setProperty(oe.general.fontFamily,e)},Do=({theme:e,documentStyle:t})=>{t.setProperty(oe.general.backgroundColor,e?.backgroundColor??"#fff")},Ro=({theme:e,documentStyle:t})=>{t.setProperty(oe.embed.questionTextColor,e?.questionTextColor??"#000"),t.setProperty(oe.embed.buttonBackground,e?.buttonBackground??"#000"),t.setProperty(oe.embed.buttonTextColor,e?.buttonTextColor??"#fff"),t.setProperty(oe.embed.selectionBackground,e?.selectionBackground??"#000"),t.setProperty(oe.embed.selectionTextColor,e?.selectionTextColor??"#fff")};import*as Se from"@solid-primitives/i18n";var Oe=class{constructor(t){this.baseUrl=t}async getGame(t){let r=await fetch(`${this.baseUrl}/api/embed/prediction-game/${t}`);if(!r.ok){let n=await r.json().catch(()=>({}));throw new Error(n.error||"Failed to fetch game")}return r.json()}async submitPrediction(t,r,n){let o=await fetch(`${this.baseUrl}/api/embed/prediction-game/${t}/submit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r,submissions:n})});if(!o.ok){let i=await o.json().catch(()=>({}));throw new Error(i.error||"Failed to submit prediction")}return o.json()}};var yr=ne();function xr(e){return p(yr.Provider,{get value(){return e.value},get children(){return e.children}})}function z(){let e=Q(yr);if(!e)throw new Error("useGameContext must be used within a GameProvider");return e}var yt=Symbol("store-raw"),xe=Symbol("store-node"),J=Symbol("store-has"),wr=Symbol("store-self");function vr(e){let t=e[Y];if(!t&&(Object.defineProperty(e,Y,{value:t=new Proxy(e,Fo)}),!Array.isArray(e))){let r=Object.keys(e),n=Object.getOwnPropertyDescriptors(e);for(let o=0,i=r.length;o<i;o++){let a=r[o];n[a].get&&Object.defineProperty(e,a,{enumerable:n[a].enumerable,get:n[a].get.bind(t)})}}return t}function Ye(e){let t;return e!=null&&typeof e=="object"&&(e[Y]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Re(e,t=new Set){let r,n,o,i;if(r=e!=null&&e[yt])return r;if(!Ye(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let a=0,s=e.length;a<s;a++)o=e[a],(n=Re(o,t))!==o&&(e[a]=n)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let a=Object.keys(e),s=Object.getOwnPropertyDescriptors(e);for(let l=0,u=a.length;l<u;l++)i=a[l],!s[i].get&&(o=e[i],(n=Re(o,t))!==o&&(e[i]=n))}return e}function ze(e,t){let r=e[t];return r||Object.defineProperty(e,t,{value:r=Object.create(null)}),r}function Me(e,t,r){if(e[t])return e[t];let[n,o]=M(r,{equals:!1,internal:!0});return n.$=o,e[t]=n}function Mo(e,t){let r=Reflect.getOwnPropertyDescriptor(e,t);return!r||r.get||!r.configurable||t===Y||t===xe||(delete r.value,delete r.writable,r.get=()=>e[Y][t]),r}function Cr(e){je()&&Me(ze(e,xe),wr)()}function $o(e){return Cr(e),Reflect.ownKeys(e)}var Fo={get(e,t,r){if(t===yt)return e;if(t===Y)return r;if(t===Ve)return Cr(e),r;let n=ze(e,xe),o=n[t],i=o?o():e[t];if(t===xe||t===J||t==="__proto__")return i;if(!o){let a=Object.getOwnPropertyDescriptor(e,t);je()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(a&&a.get)&&(i=Me(n,t,i)())}return Ye(i)?vr(i):i},has(e,t){return t===yt||t===Y||t===Ve||t===xe||t===J||t==="__proto__"?!0:(je()&&Me(ze(e,J),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:$o,getOwnPropertyDescriptor:Mo};function Ue(e,t,r,n=!1){if(!n&&e[t]===r)return;let o=e[t],i=e.length;r===void 0?(delete e[t],e[J]&&e[J][t]&&o!==void 0&&e[J][t].$()):(e[t]=r,e[J]&&e[J][t]&&o===void 0&&e[J][t].$());let a=ze(e,xe),s;if((s=Me(a,t,o))&&s.$(()=>r),Array.isArray(e)&&e.length!==i){for(let l=e.length;l<i;l++)(s=a[l])&&s.$();(s=Me(a,"length",i))&&s.$(e.length)}(s=a[wr])&&s.$()}function Sr(e,t){let r=Object.keys(t);for(let n=0;n<r.length;n+=1){let o=r[n];Ue(e,o,t[o])}}function No(e,t){if(typeof t=="function"&&(t=t(e)),t=Re(t),Array.isArray(t)){if(e===t)return;let r=0,n=t.length;for(;r<n;r++){let o=t[r];e[r]!==o&&Ue(e,r,o)}Ue(e,"length",n)}else Sr(e,t)}function De(e,t,r=[]){let n,o=e;if(t.length>1){n=t.shift();let a=typeof n,s=Array.isArray(e);if(Array.isArray(n)){for(let l=0;l<n.length;l++)De(e,[n[l]].concat(t),r);return}else if(s&&a==="function"){for(let l=0;l<e.length;l++)n(e[l],l)&&De(e,[l].concat(t),r);return}else if(s&&a==="object"){let{from:l=0,to:u=e.length-1,by:d=1}=n;for(let c=l;c<=u;c+=d)De(e,[c].concat(t),r);return}else if(t.length>1){De(e[n],t,[n].concat(r));return}o=e[n],r=[n].concat(r)}let i=t[0];typeof i=="function"&&(i=i(o,r),i===o)||n===void 0&&i==null||(i=Re(i),n===void 0||Ye(o)&&Ye(i)&&!Array.isArray(i)?Sr(o,i):Ue(e,n,i))}function Pr(...[e,t]){let r=Re(e||{}),n=Array.isArray(r),o=vr(r);function i(...a){Wt(()=>{n&&a.length===1?No(r,a[0]):De(r,a)})}return[o,i]}var kr={gameData:null,loading:!0,error:null,customCss:"",hasStarted:!1,submitted:!1,email:"",emailError:"",currentStepIndex:0,predictions:{},submitting:!1,submitError:""};function Tr(e){let[t,r]=Pr({...kr,email:e||""});return{state:t,setGameData:m=>r("gameData",m),setLoading:m=>r("loading",m),setError:m=>r("error",m),setCustomCss:m=>r("customCss",m),setHasStarted:m=>r("hasStarted",m),setSubmitted:m=>r("submitted",m),setEmail:m=>r("email",m),setEmailError:m=>r("emailError",m),setCurrentStepIndex:m=>r("currentStepIndex",m),setPredictions:m=>r("predictions",m),updatePrediction:(m,v)=>{r("predictions",m,v)},setSubmitting:m=>r("submitting",m),setSubmitError:m=>r("submitError",m),reset:()=>{r(kr),r("email",e||"")}}}var Lo=y('<div class="flex justify-center"><img class="h-12 w-auto object-contain">'),Er=e=>{let{gameData:t}=z();return[p(E,{get when(){return t.image?.publicUrl},children:r=>(()=>{var n=Lo(),o=n.firstChild;return I(i=>{var a=r(),s=t.name;return a!==i.e&&H(o,"src",i.e=a),s!==i.t&&H(o,"alt",i.t=s),i},{e:void 0,t:void 0}),n})()}),L(()=>e.children)]};var Vo=Math.pow(10,8)*24*60*60*1e3,vs=-Vo,Ke=6048e5,Ar=864e5;var Go=3600;var Ir=Go*24,Cs=Ir*7,jo=Ir*365.2425,Wo=jo/12,Ss=Wo*3,xt=Symbol.for("constructDateFrom");function q(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&xt in e?e[xt](t):e instanceof Date?new e.constructor(t):new Date(t)}function D(e,t){return q(t||e,e)}var qo={};function ie(){return qo}function Z(e,t){let r=ie(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=D(e,t?.in),i=o.getDay(),a=(i<n?7:0)+i-n;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function ue(e,t){return Z(e,{...t,weekStartsOn:1})}function Xe(e,t){let r=D(e,t?.in),n=r.getFullYear(),o=q(r,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);let i=ue(o),a=q(r,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);let s=ue(a);return r.getTime()>=i.getTime()?n+1:r.getTime()>=s.getTime()?n:n-1}function wt(e){let t=D(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function _r(e,...t){let r=q.bind(null,e||t.find(n=>typeof n=="object"));return t.map(r)}function vt(e,t){let r=D(e,t?.in);return r.setHours(0,0,0,0),r}function Or(e,t,r){let[n,o]=_r(r?.in,e,t),i=vt(n),a=vt(o),s=+i-wt(i),l=+a-wt(a);return Math.round((s-l)/Ar)}function Dr(e,t){let r=Xe(e,t),n=q(t?.in||e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),ue(n)}function Rr(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Mr(e){return!(!Rr(e)&&typeof e!="number"||isNaN(+D(e)))}function $r(e,t){let r=D(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var Bo={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Fr=(e,t,r)=>{let n,o=Bo[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Qe(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var Ho={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Yo={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zo={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Nr={date:Qe({formats:Ho,defaultWidth:"full"}),time:Qe({formats:Yo,defaultWidth:"full"}),dateTime:Qe({formats:zo,defaultWidth:"full"})};var Uo={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Lr=(e,t,r,n)=>Uo[e];function we(e){return(t,r)=>{let n=r?.context?String(r.context):"standalone",o;if(n==="formatting"&&e.formattingValues){let a=e.defaultFormattingWidth||e.defaultWidth,s=r?.width?String(r.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{let a=e.defaultWidth,s=r?.width?String(r.width):e.defaultWidth;o=e.values[s]||e.values[a]}let i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}var Ko={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Xo={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Qo={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Jo={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Zo={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ei={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ti=(e,t)=>{let r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Vr={ordinalNumber:ti,era:we({values:Ko,defaultWidth:"wide"}),quarter:we({values:Xo,defaultWidth:"wide",argumentCallback:e=>e-1}),month:we({values:Qo,defaultWidth:"wide"}),day:we({values:Jo,defaultWidth:"wide"}),dayPeriod:we({values:Zo,defaultWidth:"wide",formattingValues:ei,defaultFormattingWidth:"wide"})};function ve(e){return(t,r={})=>{let n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;let a=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?ni(s,c=>c.test(a)):ri(s,c=>c.test(a)),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;let d=t.slice(a.length);return{value:u,rest:d}}}function ri(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function ni(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Gr(e){return(t,r={})=>{let n=t.match(e.matchPattern);if(!n)return null;let o=n[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=r.valueCallback?r.valueCallback(a):a;let s=t.slice(o.length);return{value:a,rest:s}}}var oi=/^(\d+)(th|st|nd|rd)?/i,ii=/\d+/i,ai={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},si={any:[/^b/i,/^(a|c)/i]},li={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ci={any:[/1/i,/2/i,/3/i,/4/i]},ui={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},di={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},fi={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},mi={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},pi={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},gi={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},jr={ordinalNumber:Gr({matchPattern:oi,parsePattern:ii,valueCallback:e=>parseInt(e,10)}),era:ve({matchPatterns:ai,defaultMatchWidth:"wide",parsePatterns:si,defaultParseWidth:"any"}),quarter:ve({matchPatterns:li,defaultMatchWidth:"wide",parsePatterns:ci,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ve({matchPatterns:ui,defaultMatchWidth:"wide",parsePatterns:di,defaultParseWidth:"any"}),day:ve({matchPatterns:fi,defaultMatchWidth:"wide",parsePatterns:mi,defaultParseWidth:"any"}),dayPeriod:ve({matchPatterns:pi,defaultMatchWidth:"any",parsePatterns:gi,defaultParseWidth:"any"})};var Ct={code:"en-US",formatDistance:Fr,formatLong:Nr,formatRelative:Lr,localize:Vr,match:jr,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Wr(e,t){let r=D(e,t?.in);return Or(r,$r(r))+1}function qr(e,t){let r=D(e,t?.in),n=+ue(r)-+Dr(r);return Math.round(n/Ke)+1}function Je(e,t){let r=D(e,t?.in),n=r.getFullYear(),o=ie(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=q(t?.in||e,0);a.setFullYear(n+1,0,i),a.setHours(0,0,0,0);let s=Z(a,t),l=q(t?.in||e,0);l.setFullYear(n,0,i),l.setHours(0,0,0,0);let u=Z(l,t);return+r>=+s?n+1:+r>=+u?n:n-1}function Br(e,t){let r=ie(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=Je(e,t),i=q(t?.in||e,0);return i.setFullYear(o,0,n),i.setHours(0,0,0,0),Z(i,t)}function Hr(e,t){let r=D(e,t?.in),n=+Z(r,t)-+Br(r,t);return Math.round(n/Ke)+1}function T(e,t){let r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}var ee={y(e,t){let r=e.getFullYear(),n=r>0?r:1-r;return T(t==="yy"?n%100:n,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):T(r+1,2)},d(e,t){return T(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return T(e.getHours()%12||12,t.length)},H(e,t){return T(e.getHours(),t.length)},m(e,t){return T(e.getMinutes(),t.length)},s(e,t){return T(e.getSeconds(),t.length)},S(e,t){let r=t.length,n=e.getMilliseconds(),o=Math.trunc(n*Math.pow(10,r-3));return T(o,t.length)}};var Ce={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},St={G:function(e,t,r){let n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let n=e.getFullYear(),o=n>0?n:1-n;return r.ordinalNumber(o,{unit:"year"})}return ee.y(e,t)},Y:function(e,t,r,n){let o=Je(e,n),i=o>0?o:1-o;if(t==="YY"){let a=i%100;return T(a,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):T(i,t.length)},R:function(e,t){let r=Xe(e);return T(r,t.length)},u:function(e,t){let r=e.getFullYear();return T(r,t.length)},Q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return T(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return T(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){let n=e.getMonth();switch(t){case"M":case"MM":return ee.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){let n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return T(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){let o=Hr(e,n);return t==="wo"?r.ordinalNumber(o,{unit:"week"}):T(o,t.length)},I:function(e,t,r){let n=qr(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):T(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):ee.d(e,t)},D:function(e,t,r){let n=Wr(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):T(n,t.length)},E:function(e,t,r){let n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){let o=e.getDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return T(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){let o=e.getDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return T(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){let n=e.getDay(),o=n===0?7:n;switch(t){case"i":return String(o);case"ii":return T(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){let o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,r){let n=e.getHours(),o;switch(n===12?o=Ce.noon:n===0?o=Ce.midnight:o=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){let n=e.getHours(),o;switch(n>=17?o=Ce.evening:n>=12?o=Ce.afternoon:n>=4?o=Ce.morning:o=Ce.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return ee.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):ee.H(e,t)},K:function(e,t,r){let n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):T(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):T(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):ee.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):ee.s(e,t)},S:function(e,t){return ee.S(e,t)},X:function(e,t,r){let n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return zr(n);case"XXXX":case"XX":return de(n);case"XXXXX":case"XXX":default:return de(n,":")}},x:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"x":return zr(n);case"xxxx":case"xx":return de(n);case"xxxxx":case"xxx":default:return de(n,":")}},O:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Yr(n,":");case"OOOO":default:return"GMT"+de(n,":")}},z:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Yr(n,":");case"zzzz":default:return"GMT"+de(n,":")}},t:function(e,t,r){let n=Math.trunc(+e/1e3);return T(n,t.length)},T:function(e,t,r){return T(+e,t.length)}};function Yr(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),i=n%60;return i===0?r+String(o):r+String(o)+t+T(i,2)}function zr(e,t){return e%60===0?(e>0?"-":"+")+T(Math.abs(e)/60,2):de(e,t)}function de(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),o=T(Math.trunc(n/60),2),i=T(n%60,2);return r+o+t+i}var Ur=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Kr=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},hi=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return Ur(e,t);let i;switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Ur(n,t)).replace("{{time}}",Kr(o,t))},Xr={p:Kr,P:hi};var bi=/^D+$/,yi=/^Y+$/,xi=["D","DD","YY","YYYY"];function Qr(e){return bi.test(e)}function Jr(e){return yi.test(e)}function Zr(e,t,r){let n=wi(e,t,r);if(console.warn(n),xi.includes(e))throw new RangeError(n)}function wi(e,t,r){let n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var vi=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ci=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Si=/^'([^]*?)'?$/,Pi=/''/g,ki=/[a-zA-Z]/;function en(e,t,r){let n=ie(),o=r?.locale??n.locale??Ct,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=D(e,r?.in);if(!Mr(s))throw new RangeError("Invalid time value");let l=t.match(Ci).map(d=>{let c=d[0];if(c==="p"||c==="P"){let g=Xr[c];return g(d,o.formatLong)}return d}).join("").match(vi).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let c=d[0];if(c==="'")return{isToken:!1,value:Ti(d)};if(St[c])return{isToken:!0,value:d};if(c.match(ki))throw new RangeError("Format string contains an unescaped latin alphabet character `"+c+"`");return{isToken:!1,value:d}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));let u={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(d=>{if(!d.isToken)return d.value;let c=d.value;(!r?.useAdditionalWeekYearTokens&&Jr(c)||!r?.useAdditionalDayOfYearTokens&&Qr(c))&&Zr(c,t,String(e));let g=St[c[0]];return g(s,c,o.localize,u)}).join("")}function Ti(e){let t=e.match(Si);return t?t[1].replace(Pi,"'"):e}import{clsx as Ei}from"clsx";import{twMerge as Ai}from"tailwind-merge";function Ze(...e){return Ai(Ei(e))}import{clsx as Ii}from"clsx";var tn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,rn=Ii,nn=(e,t)=>r=>{var n;if(t?.variants==null)return rn(e,r?.class,r?.className);let{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(u=>{let d=r?.[u],c=i?.[u];if(d===null)return null;let g=tn(d)||tn(c);return o[u][g]}),s=r&&Object.entries(r).reduce((u,d)=>{let[c,g]=d;return g===void 0||(u[c]=g),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:c,className:g,...C}=d;return Object.entries(C).every(S=>{let[P,h]=S;return Array.isArray(h)?h.includes({...i,...s}[P]):{...i,...s}[P]===h})?[...u,c,g]:u},[]);return rn(e,a,l,r?.class,r?.className)};import{LoaderCircle as _i}from"lucide-solid";function on({class:e,...t}){return p(_i,Ae({role:"status","aria-label":"Loading",get class(){return Ze("size-4 animate-spin",e)}},t))}var Oi=y("<button data-slot=button>"),Di=nn("group/button z-button inline-flex shrink-0 cursor-pointer items-center justify-center rounded-lg bg-black font-bold whitespace-nowrap uppercase transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-(--useaward-button-color) text-(--useaward-button-text-color)"},size:{default:"px-4 py-3"}},defaultVariants:{variant:"default",size:"default"}}),et=e=>{let[t,r]=ct(e,["variant","size","class","fullWidth","loading","children"]);return(()=>{var n=Oi();return er(n,Ae({get class(){return Ze(Di({variant:t.variant,size:t.size}),t.class,t.fullWidth&&"w-full")}},r,{get disabled(){return t.loading||r.disabled}}),!1,!0),b(n,p(E,{get when(){return t.loading},get fallback(){return t.children},get children(){return p(on,{})}})),n})()};var Ri=y('<div class="mt-3 text-center"><a target=_blank rel="noopener noreferrer"class="text-sm text-gray-600 underline hover:text-gray-800">Terms and Conditions'),Mi=y('<div class=rounded-lg><div class="flex gap-3">'),an=()=>{let{gameData:e,store:t,totalSteps:r,handleNext:n,handleSubmit:o}=z(),{t:i}=ye(),a=()=>t.state.currentStepIndex===r()-1,s=()=>{a()?o():n()};return(()=>{var l=Mi(),u=l.firstChild;return b(u,p(et,{fullWidth:!0,onClick:s,get loading(){return t.state.submitting},get children(){return p(E,{get when(){return a()},get fallback(){return i("predictionGame.confirmResult")},get children(){return i("predictionGame.submit")}})}})),b(l,p(E,{get when(){return e.settings.termsUrl},get children(){var d=Ri(),c=d.firstChild;return I(()=>H(c,"href",e.settings.termsUrl)),d}}),null),l})()};var $i=y("<div class=space-y-3>"),Fi=y('<button type=button class="flex w-full items-center justify-start rounded-lg border-2 px-4 py-3 text-left transition-all"><span class=font-medium>'),sn=e=>{let t=()=>[...e.step.stepValues].sort((r,n)=>r.order-n.order);return(()=>{var r=$i();return b(r,()=>t().map(n=>{let o=()=>e.prediction.selectedStepValueId===n.id;return(()=>{var i=Fi(),a=i.firstChild;return i.$$click=()=>e.onPredictionChange(n.id),b(a,()=>n.value.name),I(s=>{var l=o()?e.selectionBackgroundColor||"#f97316":"#ffffff",u=o()?e.selectionBackgroundColor||"#f97316":"#e5e7eb",d=o()?e.selectionTextColor||"#000000":e.questionTextColor||"#111827";return l!==s.e&&K(i,"background-color",s.e=l),u!==s.t&&K(i,"border-color",s.t=u),d!==s.a&&K(a,"color",s.a=d),s},{e:void 0,t:void 0,a:void 0}),i})()})),r})()};ce(["click"]);var Ni=y('<div class="flex items-start justify-center gap-2">'),Li=y('<div><div class="flex flex-col items-center"><div class="mb-3 max-w-[120px] text-center text-sm leading-tight font-semibold"></div></div><div class="flex flex-col items-center gap-2"><button type=button class="flex h-10 w-10 items-center justify-center rounded-md bg-gray-100 text-2xl leading-none font-bold hover:bg-gray-200 active:bg-gray-300">+</button><div class="flex h-12 w-12 items-center justify-center rounded-lg bg-blue-100 text-2xl font-bold"></div><button type=button class="flex h-10 w-10 items-center justify-center rounded-md bg-gray-100 text-2xl leading-none font-bold hover:bg-gray-200 active:bg-gray-300 disabled:cursor-not-allowed disabled:opacity-30">\u2212'),Vi=y('<img class="mb-3 h-20 w-20 object-contain">'),Gi=y('<div class="mb-3 flex h-20 w-20 items-center justify-center rounded-full bg-gray-300 text-2xl font-bold text-gray-600">'),ln=e=>{let t=o=>{let i=e.prediction[o]||0;e.onPredictionChange(o,i+1)},r=o=>{let i=e.prediction[o]||0;i>0&&e.onPredictionChange(o,i-1)},n=()=>[...e.step.stepValues].sort((o,i)=>o.order-i.order);return(()=>{var o=Ni();return b(o,()=>n().map((i,a)=>(()=>{var s=Li(),l=s.firstChild,u=l.firstChild,d=l.nextSibling,c=d.firstChild,g=c.nextSibling,C=g.nextSibling;return Ie(s,`flex items-center gap-6 ${a===1?"flex-row-reverse":"flex-row"}`),b(l,(()=>{var S=L(()=>!!i.value.image?.publicUrl);return()=>S()?(()=>{var P=Vi();return I(h=>{var m=i.value.image.publicUrl,v=i.value.name;return m!==h.e&&H(P,"src",h.e=m),v!==h.t&&H(P,"alt",h.t=v),h},{e:void 0,t:void 0}),P})():(()=>{var P=Gi();return b(P,()=>i.value.name.charAt(0).toUpperCase()),P})()})(),u),b(u,()=>i.value.name),c.$$click=()=>t(i.id),b(g,()=>e.prediction[i.id]||0),C.$$click=()=>r(i.id),I(S=>{var P=e.questionTextColor||"#000000",h=(e.prediction[i.id]||0)===0;return P!==S.e&&K(u,"color",S.e=P),h!==S.t&&(C.disabled=S.t=h),S},{e:void 0,t:void 0}),s})())),o})()};ce(["click"]);var cn=e=>{let{gameData:t}=z();return L(()=>L(()=>e.step.type==="scoreGame")()?p(ln,{get step(){return e.step},get prediction(){return e.prediction},onPredictionChange:(r,n)=>e.onScorePredictionChange(r,n),get questionTextColor(){return t.settings?.questionTextColor}}):p(sn,{get step(){return e.step},get prediction(){return e.prediction},onPredictionChange:r=>e.onCorrectValueChange(r),get questionTextColor(){return t.settings?.questionTextColor},get selectionBackgroundColor(){return t.settings?.selectionBackground},get selectionTextColor(){return t.settings?.selectionTextColor}}))};var ji=y('<div class="mt-4 rounded border border-red-200 bg-red-50 p-3"><p class="text-sm text-red-700">'),Wi=y('<div class="flex w-full flex-col justify-start gap-4"><div class="rounded-lg border border-solid border-gray-200 bg-white p-6">'),qi=y('<h3 class="text-left text-2xl font-semibold">'),Bi=y('<span class="rounded-lg bg-gray-100 px-2 py-1 text-lg font-medium">'),Hi=y('<div class="mb-2 flex items-center justify-between">'),Yi=y('<span class="text-xl text-gray-600">'),un=()=>{let{gameData:e,store:t,currentStep:r,handleScorePredictionChange:n,handleCorrectValueChange:o}=z();return(()=>{var i=Wi(),a=i.firstChild;return b(i,p(E,{get when(){return r()},keyed:!0,children:s=>(()=>{var l=qi();return b(l,()=>s.title),I(u=>K(l,"color",e.settings?.questionTextColor||"#000000")),l})()}),a),b(a,p(E,{get when(){return r()},keyed:!0,children:s=>(()=>{var l=Hi();return b(l,p(E,{get when(){return s.leagueIndicator},get children(){var u=Bi();return b(u,()=>s.leagueIndicator),u}}),null),b(l,p(E,{get when(){return s.dateTime},get children(){return L(()=>!!s.dateTime)()?(()=>{var u=Yi();return b(u,()=>en(s.dateTime,"dd.LL.yyyy '\xB7' k:mm")),u})():void 0}}),null),l})()}),null),b(a,p(E,{get when(){return r()},keyed:!0,children:s=>p(cn,{step:s,get prediction(){return t.state.predictions[s.id]||{}},onScorePredictionChange:(l,u)=>n(s.id,l,u),onCorrectValueChange:l=>o(s.id,l)})}),null),b(a,p(E,{get when(){return t.state.submitError},get children(){var s=ji(),l=s.firstChild;return b(l,()=>t.state.submitError),s}}),null),b(i,p(an,{}),null),i})()};var zi=y('<div class="flex items-center gap-1">'),Ui=y("<button type=button>"),Ki=y('<span class="text-xs text-gray-300">|'),Xi={lv:"LV",en:"EN"},dn=["lv","en"],fn=()=>{let{locale:e,setLocale:t}=ye();return(()=>{var r=zi();return b(r,p(ut,{each:dn,children:(n,o)=>[(()=>{var i=Ui();return i.$$click=()=>t(n),b(i,()=>Xi[n]),I(()=>Ie(i,`cursor-pointer rounded px-1.5 py-0.5 text-xs font-medium transition-colors ${e()===n?"bg-gray-200 text-gray-900":"text-gray-400 hover:text-gray-600"}`)),i})(),L(()=>L(()=>o()<dn.length-1)()&&Ki())]})),r})()};ce(["click"]);var Qi=y('<div class="flex flex-col p-4"><div class="p-8 text-center text-white"><h3 class="mb-4 text-2xl font-bold uppercase"></h3><p class="mb-6 text-sm opacity-90">Points will be added to your profile after the game ends</p><button type=button class="rounded-lg bg-white px-8 py-3 font-medium text-gray-900 uppercase hover:bg-gray-100">View Profile'),mn=()=>{let{gameData:e}=z();return(()=>{var t=Qi(),r=t.firstChild,n=r.firstChild;return b(n,()=>e.endDescription||"Thank you for playing!"),t})()};var Ji=y('<div class="flex w-full flex-col justify-start"><h2 class="text-left text-2xl font-bold uppercase"></h2><p class="text-base text-gray-400">'),Zi=y('<a target=_blank rel="noopener noreferrer"class="text-xs underline opacity-75 hover:opacity-100">'),pn=()=>{let{gameData:e,store:t}=z(),{t:r}=ye();return[(()=>{var n=Ji(),o=n.firstChild,i=o.nextSibling;return b(o,()=>e.name??r("predictionGame.predictionGame")),b(i,()=>e.description??r("predictionGame.welcomeText")),n})(),p(et,{class:"w-full",onClick:()=>t.setHasStarted(!0),get children(){return r("predictionGame.playNow")}}),p(E,{get when(){return e.settings?.termsUrl},children:n=>(()=>{var o=Zi();return b(o,()=>r("predictionGame.contestRules")),I(i=>{var a=n(),s=e.settings?.questionTextColor||"#666666";return a!==i.e&&H(o,"href",i.e=a),s!==i.t&&K(o,"color",i.t=s),i},{e:void 0,t:void 0}),o})()})]};var ea=y('<div class="flex items-center justify-center p-8"><div class=text-center><div class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent">'),ta=y('<div class="rounded border border-red-200 bg-red-50 p-4"><p class=text-red-700>'),ra=y("<style>"),na=y('<div class="w-full antialiased"><div class="flex flex-col items-center justify-center gap-4 rounded-lg bg-white p-4"><div class="flex w-full items-center justify-end">'),gn=e=>{let[t,r]=M(!1),n=Tr(e.email),o=async()=>{if(!e.predictionGameId){n.setError("Prediction game ID is required"),n.setLoading(!1);return}try{let i=e.apiBaseUrl||"http://localhost:3000",s=await new Oe(i).getGame(e.predictionGameId);n.setGameData(s);let l={};s.steps.sort((u,d)=>u.order-d.order).forEach(u=>{if(u.type==="scoreGame"){let d={};u.stepValues.forEach(c=>{d[c.id]=0}),l[u.id]=d}}),n.setPredictions(l),n.setLoading(!1),r(!0)}catch(i){console.error("[Embed] Failed to load game:",i),n.setError(i instanceof Error?i.message:"Failed to load prediction game"),n.setLoading(!1)}};return Ee(()=>{t()||o()}),re(()=>{r(!1)}),p(dt,{get children(){return[p(E,{get when(){return n.state.customCss},children:i=>(()=>{var a=ra();return b(a,i),a})()}),p(E,{get when(){return n.state.loading},get children(){return ea()}}),p(E,{get when(){return n.state.error},get children(){var i=ta(),a=i.firstChild;return b(a,()=>n.state.error),i}}),p(E,{get when(){return L(()=>!!(!n.state.loading&&!n.state.error&&n.state.gameData))()&&(e.email||!n.state.gameData.settings.requiresEmail)},get children(){return p(oa,{get gameData(){return n.state.gameData},store:n})}})]}})},oa=e=>{let t,[r,n]=M("lv"),[o]=jt(r,pr,{initialValue:Se.flatten(pt)}),i=()=>[...e.gameData.steps].sort((h,m)=>h.order-m.order),a=()=>i().length>=2,s=()=>a()?i().length:0,l=()=>i()[e.store.state.currentStepIndex],u=(h,m,v)=>{e.store.updatePrediction(h,{...e.store.state.predictions[h],[m]:v})},d=(h,m)=>{e.store.updatePrediction(h,{selectedStepValueId:m})},c=()=>{let h=l();if(!h)return!1;let m=e.store.state.predictions[h.id];if(h.type==="scoreGame"){let v=h.stepValues.map(_=>_.id);if(!m)return e.store.setSubmitError("Please complete your prediction"),!1;if(!v.every(_=>m[_]!==void 0&&typeof m[_]=="number"))return e.store.setSubmitError("Please enter all scores"),!1}else if(h.type==="correctValue"&&(!m||!m.selectedStepValueId))return e.store.setSubmitError("Please select an option"),!1;return e.store.setSubmitError(""),!0},g=()=>{let h=i();for(let m of h){let v=e.store.state.predictions[m.id];if(m.type==="scoreGame"){let A=m.stepValues.map($=>$.id);if(A.length!==2)return e.store.setSubmitError("Invalid game configuration"),!1;if(!v)return e.store.setSubmitError(`Please complete prediction for: ${m.title}`),!1;if(!A.every($=>v[$]!==void 0&&typeof v[$]=="number"))return e.store.setSubmitError(`Please enter scores for: ${m.title}`),!1}else if(m.type==="correctValue"&&(!v||!v.selectedStepValueId))return e.store.setSubmitError(`Please select an option for: ${m.title}`),!1}return e.store.setSubmitError(""),!0},C=()=>{c()&&(e.store.setSubmitError(""),e.store.state.currentStepIndex<s()-1&&e.store.setCurrentStepIndex(e.store.state.currentStepIndex+1))},S=async()=>{if(a()){if(!c())return}else if(!g())return;e.store.setSubmitting(!0),e.store.setSubmitError("");try{let h=e.gameData.id.includes("localhost")?"http://localhost:3000":"https://play.useaward.com",m=new Oe(h),v=e.gameData.steps.map(A=>{let _=e.store.state.predictions[A.id];return A.type==="scoreGame"?{stepId:A.id,values:A.stepValues.map($=>({stepValueId:$.id,predictedScore:_[$.id]||0}))}:{stepId:A.id,values:[{stepValueId:_.selectedStepValueId,isSelected:!0}]}});await m.submitPrediction(e.gameData.id,e.store.state.email,v),e.store.setSubmitted(!0)}catch(h){console.error("Submission error:",h),e.store.setSubmitError(h?.message||"Failed to submit predictions. Please try again.")}finally{e.store.setSubmitting(!1)}},P={gameData:e.gameData,store:e.store,sortedSteps:i,currentStep:l,totalSteps:s,useStepByStep:a,handleNext:C,handleSubmit:S,handleScorePredictionChange:u,handleCorrectValueChange:d};return Ee(()=>{hr(e.gameData.settings.fontFamily),t&&br({theme:{questionTextColor:e.gameData.settings.questionTextColor,buttonBackground:e.gameData.settings.buttonBackground,buttonTextColor:e.gameData.settings.buttonTextColor,backgroundColor:e.gameData.settings.backgroundColor,selectionBackground:e.gameData.settings.selectionBackground,selectionTextColor:e.gameData.settings.selectionTextColor},container:t})}),p(E,{get when(){return o()},children:h=>{let m=Se.translator(h,Se.resolveTemplate);return p(fr,{value:{t:m,locale:r,setLocale:n},get children(){return p(xr,{value:P,get children(){var v=na(),A=v.firstChild,_=A.firstChild,$=t;return typeof $=="function"?_e($,v):t=v,b(_,p(fn,{})),b(A,p(Er,{get children(){return[p(E,{get when(){return L(()=>!e.store.state.hasStarted)()&&!e.store.state.submitted},get children(){return p(pn,{})}}),p(E,{get when(){return L(()=>!!e.store.state.hasStarted)()&&!e.store.state.submitted},get children(){return p(un,{})}}),p(E,{get when(){return e.store.state.submitted},get children(){return p(mn,{})}})]}}),null),v}})}})}})};var ia=y(`<style>
|
|
861
|
+
:host {
|
|
862
|
+
display: inline-block;
|
|
863
|
+
max-width: 100%;
|
|
864
|
+
width: 100%;
|
|
865
|
+
min-height: 220px;
|
|
866
|
+
overflow-y: hidden;
|
|
867
|
+
border: 2px solid black;
|
|
868
|
+
border-radius: 1rem;
|
|
869
|
+
}
|
|
870
|
+
`);var hn=(e,{element:t})=>{let[r,n]=M(!1),o=()=>{n(!0)},i=new IntersectionObserver(a=>{a.some(s=>s.isIntersecting)&&o()});return qt(()=>{i.observe(t)}),re(()=>{i.disconnect()}),p(bt,{get value(){return document.querySelector("useaward-prediction-game")?.shadowRoot},get children(){return[(()=>{var a=ia(),s=a.firstChild;return b(a,ur,s),a})(),p(E,{get when(){return r()},get children(){return p(gn,e)}})]}})};var bn=()=>{typeof window>"u"||tr("useaward-prediction-game",rr,hn)};var aa=e=>{let t=e.id?document.getElementById(e.id):document.querySelector("useaward-prediction-game");if(!t)throw new Error("<useaward-prediction-game> element not found.");Object.assign(t,e)},yn=()=>({initStandard:aa}),xn=e=>{typeof window>"u"||(window.UseawardPredictionGame={...e})};bn();var sa=yn();xn(sa);
|