UNPKG

@platformos/pos-cli

Version:
5 lines (4 loc) 15.1 kB
var vt=Object.defineProperty;var Et=(t,e,n)=>e in t?vt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var y=(t,e,n)=>Et(t,typeof e!="symbol"?e+"":e,n);function x(){}const it=t=>t;function At(t,e){for(const n in e)t[n]=e[n];return t}function Xt(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function rt(t){return t()}function Z(){return Object.create(null)}function C(t){t.forEach(rt)}function L(t){return typeof t=="function"}function Yt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let O;function Zt(t,e){return t===e?!0:(O||(O=document.createElement("a")),O.href=e,t===O.href)}function Nt(t){return Object.keys(t).length===0}function Tt(t,...e){if(t==null){for(const i of e)i(void 0);return x}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function te(t,e,n){t.$$.on_destroy.push(Tt(e,n))}function ee(t,e,n,i){if(t){const r=st(t,e,n,i);return t[0](r)}}function st(t,e,n,i){return t[1]&&i?At(n.ctx.slice(),t[1](i(e))):n.ctx}function ne(t,e,n,i){if(t[2]&&i){const r=t[2](i(n));if(e.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(e.dirty.length,r.length);for(let c=0;c<o;c+=1)s[c]=e.dirty[c]|r[c];return s}return e.dirty|r}return e.dirty}function ie(t,e,n,i,r,s){if(r){const o=st(e,n,i,s);t.p(o,r)}}function re(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let i=0;i<n;i++)e[i]=-1;return e}return-1}function se(t){return t??""}function oe(t,e,n){return t.set(n),e}function ce(t){return t&&L(t.destroy)?t.destroy:x}const ot=typeof window<"u";let ct=ot?()=>window.performance.now():()=>Date.now(),X=ot?t=>requestAnimationFrame(t):x;const N=new Set;function at(t){N.forEach(e=>{e.c(t)||(N.delete(e),e.f())}),N.size!==0&&X(at)}function lt(t){let e;return N.size===0&&X(at),{promise:new Promise(n=>{N.add(e={c:t,f:n})}),abort(){N.delete(e)}}}let I=!1;function kt(){I=!0}function Ct(){I=!1}function St(t,e,n,i){for(;t<e;){const r=t+(e-t>>1);n(r)<=i?t=r+1:e=r}return t}function Mt(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if(t.nodeName==="HEAD"){const a=[];for(let l=0;l<e.length;l++){const d=e[l];d.claim_order!==void 0&&a.push(d)}e=a}const n=new Int32Array(e.length+1),i=new Int32Array(e.length);n[0]=-1;let r=0;for(let a=0;a<e.length;a++){const l=e[a].claim_order,d=(r>0&&e[n[r]].claim_order<=l?r+1:St(1,r,m=>e[n[m]].claim_order,l))-1;i[a]=n[d]+1;const u=d+1;n[u]=a,r=Math.max(u,r)}const s=[],o=[];let c=e.length-1;for(let a=n[r]+1;a!=0;a=i[a-1]){for(s.push(e[a-1]);c>=a;c--)o.push(e[c]);c--}for(;c>=0;c--)o.push(e[c]);s.reverse(),o.sort((a,l)=>a.claim_order-l.claim_order);for(let a=0,l=0;a<o.length;a++){for(;l<s.length&&o[a].claim_order>=s[l].claim_order;)l++;const d=l<s.length?s[l]:null;t.insertBefore(o[a],d)}}function ut(t,e){t.appendChild(e)}function ft(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Dt(t){const e=F("style");return e.textContent="/* empty */",jt(ft(t),e),e.sheet}function jt(t,e){return ut(t.head||t,e),e.sheet}function Ht(t,e){if(I){for(Mt(t),(t.actual_end_child===void 0||t.actual_end_child!==null&&t.actual_end_child.parentNode!==t)&&(t.actual_end_child=t.firstChild);t.actual_end_child!==null&&t.actual_end_child.claim_order===void 0;)t.actual_end_child=t.actual_end_child.nextSibling;e!==t.actual_end_child?(e.claim_order!==void 0||e.parentNode!==t)&&t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling}else(e.parentNode!==t||e.nextSibling!==null)&&t.appendChild(e)}function Pt(t,e,n){t.insertBefore(e,n||null)}function Lt(t,e,n){I&&!n?Ht(t,e):(e.parentNode!==t||e.nextSibling!=n)&&t.insertBefore(e,n||null)}function k(t){t.parentNode&&t.parentNode.removeChild(t)}function ae(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function F(t){return document.createElement(t)}function dt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Y(t){return document.createTextNode(t)}function le(){return Y(" ")}function ue(){return Y("")}function tt(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function fe(t){return function(e){return e.preventDefault(),t.call(this,e)}}function de(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function _e(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function he(t){return t.dataset.svelteH}function me(t,e,n){const i=new Set;for(let r=0;r<t.length;r+=1)t[r].checked&&i.add(t[r].__value);return n||i.delete(e),Array.from(i)}function pe(t){let e;return{p(...n){e=n,e.forEach(i=>t.push(i))},r(){e.forEach(n=>t.splice(t.indexOf(n),1))}}}function ge(t){return t===""?null:+t}function zt(t){return Array.from(t.childNodes)}function _t(t){t.claim_info===void 0&&(t.claim_info={last_index:0,total_claimed:0})}function ht(t,e,n,i,r=!1){_t(t);const s=(()=>{for(let o=t.claim_info.last_index;o<t.length;o++){const c=t[o];if(e(c)){const a=n(c);return a===void 0?t.splice(o,1):t[o]=a,r||(t.claim_info.last_index=o),c}}for(let o=t.claim_info.last_index-1;o>=0;o--){const c=t[o];if(e(c)){const a=n(c);return a===void 0?t.splice(o,1):t[o]=a,r?a===void 0&&t.claim_info.last_index--:t.claim_info.last_index=o,c}}return i()})();return s.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,s}function mt(t,e,n,i){return ht(t,r=>r.nodeName===e,r=>{const s=[];for(let o=0;o<r.attributes.length;o++){const c=r.attributes[o];n[c.name]||s.push(c.name)}s.forEach(o=>r.removeAttribute(o))},()=>i(e))}function ye(t,e,n){return mt(t,e,n,F)}function $e(t,e,n){return mt(t,e,n,dt)}function Ot(t,e){return ht(t,n=>n.nodeType===3,n=>{const i=""+e;if(n.data.startsWith(i)){if(n.data.length!==i.length)return n.splitText(i.length)}else n.data=i},()=>Y(e),!0)}function be(t){return Ot(t," ")}function et(t,e,n){for(let i=n;i<t.length;i+=1){const r=t[i];if(r.nodeType===8&&r.textContent.trim()===e)return i}return-1}function xe(t,e){const n=et(t,"HTML_TAG_START",0),i=et(t,"HTML_TAG_END",n+1);if(n===-1||i===-1)return new G(e);_t(t);const r=t.splice(n,i-n+1);k(r[0]),k(r[r.length-1]);const s=r.slice(1,r.length-1);if(s.length===0)return new G(e);for(const o of s)o.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1;return new G(e,s)}function we(t,e){e=""+e,t.data!==e&&(t.data=e)}function ve(t,e){t.value=e??""}function Ee(t,e,n,i){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,"")}function Ae(t,e,n){for(let i=0;i<t.options.length;i+=1){const r=t.options[i];if(r.__value===e){r.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function Ne(t){const e=t.querySelector(":checked");return e&&e.__value}let R;function Rt(){if(R===void 0){R=!1;try{typeof window<"u"&&window.parent&&window.parent.document}catch{R=!0}}return R}function Te(t,e){getComputedStyle(t).position==="static"&&(t.style.position="relative");const i=F("iframe");i.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),i.setAttribute("aria-hidden","true"),i.tabIndex=-1;const r=Rt();let s;return r?(i.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=tt(window,"message",o=>{o.source===i.contentWindow&&e()})):(i.src="about:blank",i.onload=()=>{s=tt(i.contentWindow,"resize",e),e()}),ut(t,i),()=>{(r||s&&i.contentWindow)&&s(),k(i)}}function ke(t,e,n){t.classList.toggle(e,!!n)}function pt(t,e,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:i})}function Ce(t,e){const n=[];let i=0;for(const r of e.childNodes)if(r.nodeType===8){const s=r.textContent.trim();s===`HEAD_${t}_END`?(i-=1,n.push(r)):s===`HEAD_${t}_START`&&(i+=1,n.push(r))}else i>0&&n.push(r);return n}class qt{constructor(e=!1){y(this,"is_svg",!1);y(this,"e");y(this,"n");y(this,"t");y(this,"a");this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,n,i=null){this.e||(this.is_svg?this.e=dt(n.nodeName):this.e=F(n.nodeType===11?"TEMPLATE":n.nodeName),this.t=n.tagName!=="TEMPLATE"?n:n.content,this.c(e)),this.i(i)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let n=0;n<this.n.length;n+=1)Pt(this.t,this.n[n],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(k)}}class G extends qt{constructor(n=!1,i){super(n);y(this,"l");this.e=this.n=null,this.l=i}c(n){this.l?this.n=this.l:super.c(n)}i(n){for(let i=0;i<this.n.length;i+=1)Lt(this.t,this.n[i],n)}}function Se(t,e){return new t(e)}const B=new Map;let W=0;function Bt(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function Wt(t,e){const n={stylesheet:Dt(e),rules:{}};return B.set(t,n),n}function J(t,e,n,i,r,s,o,c=0){const a=16.666/i;let l=`{ `;for(let h=0;h<=1;h+=a){const g=e+(n-e)*s(h);l+=h*100+`%{${o(g,1-g)}} `}const d=l+`100% {${o(n,1-n)}} }`,u=`__svelte_${Bt(d)}_${c}`,m=ft(t),{stylesheet:p,rules:f}=B.get(m)||Wt(m,t);f[u]||(f[u]=!0,p.insertRule(`@keyframes ${u} ${d}`,p.cssRules.length));const _=t.style.animation||"";return t.style.animation=`${_?`${_}, `:""}${u} ${i}ms linear ${r}ms 1 both`,W+=1,u}function K(t,e){const n=(t.style.animation||"").split(", "),i=n.filter(e?s=>s.indexOf(e)<0:s=>s.indexOf("__svelte")===-1),r=n.length-i.length;r&&(t.style.animation=i.join(", "),W-=r,W||It())}function It(){X(()=>{W||(B.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&k(e)}),B.clear())})}let H;function D(t){H=t}function b(){if(!H)throw new Error("Function called outside component initialization");return H}function Me(t){b().$$.before_update.push(t)}function De(t){b().$$.on_mount.push(t)}function je(t){b().$$.after_update.push(t)}function He(t){b().$$.on_destroy.push(t)}function Pe(){const t=b();return(e,n,{cancelable:i=!1}={})=>{const r=t.$$.callbacks[e];if(r){const s=pt(e,n,{cancelable:i});return r.slice().forEach(o=>{o.call(t,s)}),!s.defaultPrevented}return!0}}function Le(t,e){return b().$$.context.set(t,e),e}function ze(t){return b().$$.context.get(t)}function Oe(){return b().$$.context}function Re(t){return b().$$.context.has(t)}function qe(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(i=>i.call(this,e))}const A=[],nt=[];let T=[];const Q=[],gt=Promise.resolve();let V=!1;function yt(){V||(V=!0,gt.then($t))}function Be(){return yt(),gt}function P(t){T.push(t)}function We(t){Q.push(t)}const U=new Set;let E=0;function $t(){if(E!==0)return;const t=H;do{try{for(;E<A.length;){const e=A[E];E++,D(e),Ft(e.$$)}}catch(e){throw A.length=0,E=0,e}for(D(null),A.length=0,E=0;nt.length;)nt.pop()();for(let e=0;e<T.length;e+=1){const n=T[e];U.has(n)||(U.add(n),n())}T.length=0}while(A.length);for(;Q.length;)Q.pop()();V=!1,U.clear(),D(t)}function Ft(t){if(t.fragment!==null){t.update(),C(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(P)}}function Gt(t){const e=[],n=[];T.forEach(i=>t.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),T=e}let M;function bt(){return M||(M=Promise.resolve(),M.then(()=>{M=null})),M}function j(t,e,n){t.dispatchEvent(pt(`${e?"intro":"outro"}${n}`))}const q=new Set;let $;function Ie(){$={r:0,c:[],p:$}}function Fe(){$.r||C($.c),$=$.p}function Ut(t,e){t&&t.i&&(q.delete(t),t.i(e))}function Ge(t,e,n,i){if(t&&t.o){if(q.has(t))return;q.add(t),$.c.push(()=>{q.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}const xt={duration:0};function Ue(t,e,n){const i={direction:"in"};let r=e(t,n,i),s=!1,o,c,a=0;function l(){o&&K(t,o)}function d(){const{delay:m=0,duration:p=300,easing:f=it,tick:_=x,css:h}=r||xt;h&&(o=J(t,0,1,p,m,f,h,a++)),_(0,1);const g=ct()+m,S=g+p;c&&c.abort(),s=!0,P(()=>j(t,!0,"start")),c=lt(w=>{if(s){if(w>=S)return _(1,0),j(t,!0,"end"),l(),s=!1;if(w>=g){const v=f((w-g)/p);_(v,1-v)}}return s})}let u=!1;return{start(){u||(u=!0,K(t),L(r)?(r=r(i),bt().then(d)):d())},invalidate(){u=!1},end(){s&&(l(),s=!1)}}}function Je(t,e,n,i){let s=e(t,n,{direction:"both"}),o=i?0:1,c=null,a=null,l=null,d;function u(){l&&K(t,l)}function m(f,_){const h=f.b-o;return _*=Math.abs(h),{a:o,b:f.b,d:h,duration:_,start:f.start,end:f.start+_,group:f.group}}function p(f){const{delay:_=0,duration:h=300,easing:g=it,tick:S=x,css:w}=s||xt,v={start:ct()+_,b:f};f||(v.group=$,$.r+=1),"inert"in t&&(f?d!==void 0&&(t.inert=d):(d=t.inert,t.inert=!0)),c||a?a=v:(w&&(u(),l=J(t,o,f,h,_,g,w)),f&&S(0,1),c=m(v,h),P(()=>j(t,f,"start")),lt(z=>{if(a&&z>a.start&&(c=m(a,h),a=null,j(t,c.b,"start"),w&&(u(),l=J(t,o,c.b,c.duration,0,g,s.css))),c){if(z>=c.end)S(o=c.b,1-o),j(t,c.b,"end"),a||(c.b?u():--c.group.r||C(c.group.c)),c=null;else if(z>=c.start){const wt=z-c.start;o=c.a+c.d*g(wt/c.duration),S(o,1-o)}}return!!(c||a)}))}return{run(f){L(s)?bt().then(()=>{s=s({direction:f?"in":"out"}),p(f)}):p(f)},end(){u(),c=a=null}}}function Ke(t,e,n){const i=t.$$.props[e];i!==void 0&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function Qe(t){t&&t.c()}function Ve(t,e){t&&t.l(e)}function Jt(t,e,n){const{fragment:i,after_update:r}=t.$$;i&&i.m(e,n),P(()=>{const s=t.$$.on_mount.map(rt).filter(L);t.$$.on_destroy?t.$$.on_destroy.push(...s):C(s),t.$$.on_mount=[]}),r.forEach(P)}function Kt(t,e){const n=t.$$;n.fragment!==null&&(Gt(n.after_update),C(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Qt(t,e){t.$$.dirty[0]===-1&&(A.push(t),yt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Xe(t,e,n,i,r,s,o=null,c=[-1]){const a=H;D(t);const l=t.$$={fragment:null,ctx:[],props:s,update:x,not_equal:r,bound:Z(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(a?a.$$.context:[])),callbacks:Z(),dirty:c,skip_bound:!1,root:e.target||a.$$.root};o&&o(l.root);let d=!1;if(l.ctx=n?n(t,e.props||{},(u,m,...p)=>{const f=p.length?p[0]:m;return l.ctx&&r(l.ctx[u],l.ctx[u]=f)&&(!l.skip_bound&&l.bound[u]&&l.bound[u](f),d&&Qt(t,u)),m}):[],l.update(),d=!0,C(l.before_update),l.fragment=i?i(l.ctx):!1,e.target){if(e.hydrate){kt();const u=zt(e.target);l.fragment&&l.fragment.l(u),u.forEach(k)}else l.fragment&&l.fragment.c();e.intro&&Ut(t.$$.fragment),Jt(t,e.target,e.anchor),Ct(),$t()}D(a)}class Ye{constructor(){y(this,"$$");y(this,"$$set")}$destroy(){Kt(this,1),this.$destroy=x}$on(e,n){if(!L(n))return x;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!Nt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}export{Xt as $,$e as A,dt as B,nt as C,Ke as D,Kt as E,ve as F,We as G,Fe as H,Jt as I,tt as J,he as K,Ve as L,Qe as M,oe as N,ae as O,Be as P,ke as Q,Ie as R,Ye as S,Ee as T,ge as U,fe as V,Pe as W,P as X,Je as Y,xe as Z,G as _,we as a,b as a0,D as a1,$t as a2,Ue as a3,qe as a4,De as a5,Me as a6,je as a7,Se as a8,ce as a9,me as aa,pe as ab,L as ac,Zt as ad,Ae as ae,He as af,Ne as ag,Te as ah,se as ai,ze as aj,Le as ak,Tt as al,de as am,At as an,Oe as ao,Re as ap,Lt as b,Ht as c,k as d,ye as e,zt as f,Ot as g,be as h,Xe as i,F as j,le as k,te as l,ee as m,x as n,Ge as o,Ut as p,re as q,ne as r,Yt as s,Y as t,ie as u,Ce as v,it as w,C as x,ue as y,_e as z};