@deijose/nix-ionic 0.1.8-beta.7 → 0.1.8-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib/nix-ionic.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let e=require("@deijose/nix-js");require("@ionic/core/css/core.css"),require("@ionic/core/css/normalize.css"),require("@ionic/core/css/structure.css"),require("@ionic/core/css/typography.css"),require("@ionic/core/css/padding.css"),require("@ionic/core/css/flex-utils.css"),require("@ionic/core/css/display.css");let t=require("@ionic/core/components"),n=require("@ionic/core/components/ion-app.js"),r=require("@ionic/core/components/ion-header.js"),i=require("@ionic/core/components/ion-toolbar.js"),a=require("@ionic/core/components/ion-title.js"),o=require("@ionic/core/components/ion-content.js"),s=require("@ionic/core/components/ion-buttons.js"),c=require("@ionic/core/components/ion-note.js"),l=require("@ionic/core/components/ion-spinner.js"),u=require("@ionic/core/components/ion-list.js"),d=require("@ionic/core/components/ion-item.js"),f=require("@ionic/core/components/ion-label.js"),p=require("@ionic/core/components/ion-card.js"),m=require("@ionic/core/components/ion-card-header.js"),h=require("@ionic/core/components/ion-card-title.js"),g=require("@ionic/core/components/ion-card-subtitle.js"),ee=require("@ionic/core/components/ion-card-content.js"),te=require("@ionic/core/components/ion-ripple-effect.js"),ne=require("@ionic/core/components/ion-router.js"),re=require("@ionic/core/components/ion-route.js"),ie=require("@ionic/core/components/ion-router-outlet.js"),ae=require("@ionic/core/components/ion-back-button.js");function oe(){return{willEnter:(0,e.signal)(0),didEnter:(0,e.signal)(0),willLeave:(0,e.signal)(0),didLeave:(0,e.signal)(0)}}var se=class extends e.NixComponent{__lc;constructor(e){super(),this.__lc=e}onInit(){let t=this.__lc;this.ionViewWillEnter&&(0,e.watch)(t.willEnter,this.ionViewWillEnter.bind(this)),this.ionViewDidEnter&&(0,e.watch)(t.didEnter,this.ionViewDidEnter.bind(this)),this.ionViewWillLeave&&(0,e.watch)(t.willLeave,this.ionViewWillLeave.bind(this)),this.ionViewDidLeave&&(0,e.watch)(t.didLeave,this.ionViewDidLeave.bind(this))}};function ce(t,n){(0,e.watch)(t.willEnter,n)}function le(t,n){(0,e.watch)(t.didEnter,n)}function ue(t,n){(0,e.watch)(t.willLeave,n)}function de(t,n){(0,e.watch)(t.didLeave,n)}var fe="ionicons",_={hydratedSelectorName:"hydrated",lazyLoad:!1,updatable:!0},pe=Object.defineProperty,me=(e,t)=>{for(var n in t)pe(e,n,{get:t[n],enumerable:!0})},v=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},he=(e,t)=>{let n={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};n.$onReadyPromise$=new Promise(e=>n.$onReadyResolve$=e),e["s-p"]=[],e["s-rc"]=[];let o=n;return e.__stencil__getHostRef=()=>o,o},ge=(e,t)=>t in e,y=(e,t)=>(0,console.error)(e,t),b=new Map,_e="slot-fb{display:contents}slot-fb[hidden]{display:none}",ve="http://www.w3.org/1999/xlink",x=typeof window<"u"?window:{},ye=x.HTMLElement||class{},S={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},be=e=>Promise.resolve(e),xe=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch{}return!1})(),C=!1,Se=[],Ce=[],we=(e,t)=>n=>{e.push(n),C||(C=!0,t&&4&S.$flags$?E(T):S.raf(T))},w=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){y(e)}e.length=0},T=()=>{w(Se),w(Ce),(C=Se.length>0)&&S.raf(T)},E=e=>be().then(e),Te=we(Ce,!0),Ee=e=>{let t=new URL(e,S.$resourcesUrl$);return t.origin===x.location.origin?t.pathname:t.href},D=e=>"object"===(e=typeof e)||"function"===e;function De(e){return(e.head?.querySelector('meta[name="csp-nonce"]'))?.getAttribute("content")??void 0}var Oe=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");me({},{err:()=>k,map:()=>ke,ok:()=>O,unwrap:()=>Ae,unwrapErr:()=>je});var O=e=>({isOk:!0,isErr:!1,value:e}),k=e=>({isOk:!1,isErr:!0,value:e});function ke(e,t){if(e.isOk){let n=t(e.value);return n instanceof Promise?n.then(e=>O(e)):O(n)}if(e.isErr){let t=e.value;return k(t)}throw"should never get here"}var A,Ae=e=>{if(e.isOk)return e.value;throw e.value},je=e=>{if(e.isErr)return e.value;throw e.value};function Me(e){let t=this.attachShadow({mode:"open"});void 0===A&&(A=null),A&&t.adoptedStyleSheets.push(A)}var j=(e,t="")=>()=>{},M=new WeakMap,Ne=(e,t,n)=>{let o=b.get(e);xe&&n?(o||=new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,b.set(e,o)},Pe=(e,t,n)=>{let o=N(t),i=b.get(o);if(!x.document)return o;if(e=11===e.nodeType?e:x.document,i)if("string"==typeof i){e=e.head||e;let n,r=M.get(e);if(r||M.set(e,r=new Set),!r.has(o)){{n=x.document.createElement("style"),n.innerHTML=i;let o=S.$nonce$??De(x.document);if(null!=o&&n.setAttribute("nonce",o),!(1&t.$flags$))if("HEAD"===e.nodeName){let t=e.querySelectorAll("link[rel=preconnect]"),o=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(n,o?.parentNode===e?o:null)}else if("host"in e)if(xe){let t=new CSSStyleSheet;t.replaceSync(i),e.adoptedStyleSheets.unshift(t)}else{let t=e.querySelector("style");t?t.innerHTML=i+t.innerHTML:e.prepend(n)}else e.append(n);1&t.$flags$&&e.insertBefore(n,null)}4&t.$flags$&&(n.innerHTML+=_e),r&&r.add(o)}}else e.adoptedStyleSheets.includes(i)||e.adoptedStyleSheets.push(i);return o},Fe=e=>{let t=e.$cmpMeta$,n=e.$hostElement$,o=t.$flags$,i=j("attachStyles",t.$tagName$),r=Pe(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&o&&(n["s-sc"]=r,n.classList.add(r+"-h")),i()},N=(e,t)=>"sc-"+e.$tagName$,P=(e,t,...n)=>{let o=null,i=null,r=!1,s=!1,l=[],a=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?a(o):null!=o&&"boolean"!=typeof o&&((r="function"!=typeof e&&!D(o))&&(o=String(o)),r&&s?l[l.length-1].$text$+=o:l.push(r?F(null,o):o),s=r)};if(a(n),t){t.key&&(i=t.key);{let e=t.className||t.class;e&&(t.class="object"==typeof e?Object.keys(e).filter(t=>e[t]).join(" "):e)}}let c=F(e,null);return c.$attrs$=t,l.length>0&&(c.$children$=l),c.$key$=i,c},F=(e,t)=>{let n={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null,$attrs$:null,$key$:null};return n},I={},Ie=e=>e&&e.$tag$===I,L=e=>{let t=Oe(e);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`,"g")};L("::slotted"),L(":host"),L(":host-context");var R=(e,t,n)=>null==e||D(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?String(e):e,Le=(e,t,n)=>{let o=S.ce(t,n);return e.dispatchEvent(o),o},z=(e,t,n,o,i,r,s)=>{if(n===o)return;let l=ge(e,t),a=t.toLowerCase();if("class"===t){let t=e.classList,i=ze(n),r=ze(o);t.remove(...i.filter(e=>e&&!r.includes(e))),t.add(...r.filter(e=>e&&!i.includes(e)))}else if("style"===t){for(let t in n)(!o||null==o[t])&&(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(let t in o)(!n||o[t]!==n[t])&&(t.includes("-")?e.style.setProperty(t,o[t]):e.style[t]=o[t])}else if("key"!==t)if("ref"===t)o&&o(e);else if(e.__lookupSetter__(t)||"o"!==t[0]||"n"!==t[1]){let s=D(o);if(l||s&&null!==o)try{if(e.tagName.includes("-"))e[t]!==o&&(e[t]=o);else{let i=o??"";"list"===t?l=!1:(null==n||e[t]!=i)&&("function"==typeof e.__lookupSetter__(t)?e[t]=i:e.setAttribute(t,i))}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),null==o||!1===o?(!1!==o||""===e.getAttribute(t))&&(c?e.removeAttributeNS(ve,t):e.removeAttribute(t)):(!l||4&r||i)&&!s&&1===e.nodeType&&(o=!0===o?"":o,c?e.setAttributeNS(ve,t,o):e.setAttribute(t,o))}else if(t="-"===t[2]?t.slice(3):ge(x,a)?a.slice(2):a[2]+t.slice(3),n||o){let i=t.endsWith(B);t=t.replace(Be,""),n&&S.rel(e,t,n,i),o&&S.ael(e,t,o,i)}},Re=/\s/,ze=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(Re):[]),B="Capture",Be=RegExp(B+"$"),Ve=(e,t,n,o)=>{let i=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,r=e&&e.$attrs$||{},s=t.$attrs$||{};for(let e of He(Object.keys(r)))e in s||z(i,e,r[e],void 0,n,t.$flags$);for(let e of He(Object.keys(s)))z(i,e,r[e],s[e],n,t.$flags$)};function He(e){return e.includes("ref")?[...e.filter(e=>"ref"!==e),"ref"]:e}var V,J,Ct,Ue=!1,H=(e,t,n)=>{let o,i,r=t.$children$[n],s=0;if(null!==r.$text$)o=r.$elm$=x.document.createTextNode(r.$text$);else{if(!x.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(o=r.$elm$=x.document.createElement(r.$tag$),Ve(null,r,Ue),r.$children$)for(s=0;s<r.$children$.length;++s)i=H(e,r,s),i&&o.appendChild(i)}return o["s-hn"]=V,o},We=(e,t,n,o,i,r)=>{let s,l=e;for(l.shadowRoot&&l.tagName===V&&(l=l.shadowRoot);i<=r;++i)o[i]&&(s=H(null,n,i),s&&(o[i].$elm$=s,G(l,s,t)))},Ge=(e,t,n)=>{for(let o=t;o<=n;++o){let t=e[o];if(t){let e=t.$elm$;qe(t),e&&e.remove()}}},Ke=(e,t,n,o,i=!1)=>{let r,s,l=0,a=0,c=0,u=0,d=t.length-1,$=t[0],m=t[d],h=o.length-1,f=o[0],p=o[h];for(;l<=d&&a<=h;)if(null==$)$=t[++l];else if(null==m)m=t[--d];else if(null==f)f=o[++a];else if(null==p)p=o[--h];else if(U($,f,i))W($,f,i),$=t[++l],f=o[++a];else if(U(m,p,i))W(m,p,i),m=t[--d],p=o[--h];else if(U($,p,i))W($,p,i),G(e,$.$elm$,m.$elm$.nextSibling),$=t[++l],p=o[--h];else if(U(m,f,i))W(m,f,i),G(e,m.$elm$,$.$elm$),m=t[--d],f=o[++a];else{for(c=-1,u=l;u<=d;++u)if(t[u]&&null!==t[u].$key$&&t[u].$key$===f.$key$){c=u;break}c>=0?(s=t[c],s.$tag$===f.$tag$?(W(s,f,i),t[c]=void 0,r=s.$elm$):r=H(t&&t[a],n,c),f=o[++a]):(r=H(t&&t[a],n,a),f=o[++a]),r&&G($.$elm$.parentNode,r,$.$elm$)}l>d?We(e,null==o[h+1]?null:o[h+1].$elm$,n,o,a,h):a>h&&Ge(t,l,d)},U=(e,t,n=!1)=>e.$tag$===t.$tag$&&(n?(n&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$),W=(e,t,n=!1)=>{let o=t.$elm$=e.$elm$,i=e.$children$,r=t.$children$,s=t.$text$;null===s?(Ve(e,t,Ue),null!==i&&null!==r?Ke(o,i,t,r,n):null===r?!n&&_.updatable&&null!==i&&Ge(i,0,i.length-1):(null!==e.$text$&&(o.textContent=""),We(o,null,t,r,0,r.length-1))):e.$text$!==s&&(o.data=s)},qe=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(qe)},G=(e,t,n)=>e?.insertBefore(t,n),Je=(e,t,n=!1)=>{let o=e.$hostElement$,i=e.$cmpMeta$,r=e.$vnode$||F(null,null),s=Ie(t)?t:P(null,null,t);if(V=o.tagName,i.$attrsToReflect$&&(s.$attrs$=s.$attrs$||{},i.$attrsToReflect$.map(([e,t])=>s.$attrs$[t]=o[e])),n&&s.$attrs$)for(let e of Object.keys(s.$attrs$))o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(s.$attrs$[e]=o[e]);s.$tag$=null,s.$flags$|=4,e.$vnode$=s,s.$elm$=r.$elm$=o.shadowRoot||o,W(r,s,n)},Ye=(e,t)=>{if(t&&!e.$onRenderResolve$&&t["s-p"]){let n=t["s-p"].push(new Promise(o=>e.$onRenderResolve$=()=>{t["s-p"].splice(n-1,1),o()}))}},K=(e,t)=>{if(e.$flags$|=16,!(4&e.$flags$))return Ye(e,e.$ancestorComponent$),Te(()=>Xe(e,t));e.$flags$|=512},Xe=(e,t)=>{let n,o=e.$hostElement$,i=j("scheduleUpdate",e.$cmpMeta$.$tagName$),r=o;if(!r)throw Error(`Can't render component <${o.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);return n=q(r,t?"componentWillLoad":"componentWillUpdate",void 0,o),n=Ze(n,()=>q(r,"componentWillRender",void 0,o)),i(),Ze(n,()=>$e(e,r,t))},Ze=(e,t)=>Qe(e)?e.then(t).catch(e=>{console.error(e),t()}):t(),Qe=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,$e=async(e,t,n)=>{let o=e.$hostElement$,i=j("update",e.$cmpMeta$.$tagName$),r=o["s-rc"];n&&Fe(e);let s=j("render",e.$cmpMeta$.$tagName$);et(e,t,o,n),r&&(r.map(e=>e()),o["s-rc"]=void 0),s(),i();{let t=o["s-p"]??[],n=()=>tt(e);0===t.length?n():(Promise.all(t).then(n),e.$flags$|=4,t.length=0)}},et=(e,t,n,o)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,Je(e,t,o)}catch(t){y(t,e.$hostElement$)}return null},tt=e=>{let t=e.$cmpMeta$.$tagName$,n=e.$hostElement$,o=j("postUpdate",t),i=n,r=e.$ancestorComponent$;q(i,"componentDidRender",void 0,n),64&e.$flags$?(q(i,"componentDidUpdate",void 0,n),o()):(e.$flags$|=64,rt(n),q(i,"componentDidLoad",void 0,n),o(),e.$onReadyResolve$(n),r||nt()),e.$onRenderResolve$&&=void e.$onRenderResolve$(),512&e.$flags$&&E(()=>K(e,!1)),e.$flags$&=-517},nt=e=>{E(()=>Le(x,"appload",{detail:{namespace:fe}}))},q=(e,t,n,o)=>{if(e&&e[t])try{return e[t](n)}catch(e){y(e,o)}},rt=e=>e.classList.add(_.hydratedSelectorName??"hydrated"),it=(e,t)=>v(e).$instanceValues$.get(t),at=(e,t,n,o)=>{let i=v(e),r=e,s=i.$instanceValues$.get(t),l=i.$flags$,a=r;if(!((n=R(n,o.$members$[t][0]))===s||Number.isNaN(s)&&Number.isNaN(n))){if(i.$instanceValues$.set(t,n),o.$watchers$&&128&l){let e=o.$watchers$[t];e&&e.map(e=>{try{a[e](n,s,t)}catch(e){y(e,r)}})}if(2==(18&l)){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(n,s,t))return;K(i,!1)}}},ot=(e,t,n)=>{let o=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);let n=Object.entries(t.$members$??{});n.map(([e,[n]])=>{if(31&n||32&n){let{get:i,set:r}=Object.getOwnPropertyDescriptor(o,e)||{};i&&(t.$members$[e][0]|=2048),r&&(t.$members$[e][0]|=4096),Object.defineProperty(o,e,{get(){return i?i.apply(this):it(this,e)},configurable:!0,enumerable:!0}),Object.defineProperty(o,e,{set(o){let i=v(this);if(r){let s=32&n?this[e]:i.$hostElement$[e];return void 0===s&&i.$instanceValues$.get(e)?o=i.$instanceValues$.get(e):!i.$instanceValues$.get(e)&&s&&i.$instanceValues$.set(e,s),r.apply(this,[R(o,n)]),o=32&n?this[e]:i.$hostElement$[e],void at(this,e,o,t)}at(this,e,o,t)}})}});{let i=new Map;o.attributeChangedCallback=function(e,n,r){S.jmp(()=>{let s=i.get(e);if(!this.hasOwnProperty(s)||!_.lazyLoad){if(o.hasOwnProperty(s)&&"number"==typeof this[s]&&this[s]==r)return;if(null==s){let o=v(this)?.$flags$;if(o&&!(8&o)&&128&o&&r!==n){let o=this;(t.$watchers$?.[e])?.forEach(t=>{null!=o[t]&&o[t].call(o,r,n,e)})}return}}let l=Object.getOwnPropertyDescriptor(o,s);(r=(null!==r||"boolean"!=typeof this[s])&&r)!==this[s]&&(!l.get||l.set)&&(this[s]=r)})},e.observedAttributes=Array.from(new Set([...Object.keys(t.$watchers$??{}),...n.filter(([e,t])=>15&t[0]).map(([e,n])=>{var o;let r=n[1]||e;return i.set(r,e),512&n[0]&&(null==(o=t.$attrsToReflect$)||o.push([e,r])),r})]))}}return e},st=async(e,t,n,o)=>{let i;if(!(32&t.$flags$)){t.$flags$|=32;{i=e.constructor;let n=e.localName;customElements.whenDefined(n).then(()=>t.$flags$|=128)}if(i&&i.style){let e;"string"==typeof i.style&&(e=i.style);let t=N(n);if(!b.has(t)){let o=j("registerStyles",n.$tagName$);Ne(t,e,!!(1&n.$flags$)),o()}}}let r=t.$ancestorComponent$,s=()=>K(t,!0);r&&r["s-rc"]?r["s-rc"].push(s):s()},ct=e=>{if(!(1&S.$flags$)){let t=v(e),n=t.$cmpMeta$,o=j("connectedCallback",n.$tagName$);if(1&t.$flags$)t?.$lazyInstance$||t?.$onReadyPromise$&&t.$onReadyPromise$.then(()=>{});else{t.$flags$|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Ye(t,t.$ancestorComponent$=n);break}}n.$members$&&Object.entries(n.$members$).map(([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){let n=e[t];delete e[t],e[t]=n}}),_.initializeNextTick?E(()=>st(e,t,n)):st(e,t,n)}o()}},lt=async e=>{1&S.$flags$||v(e),M.has(e)&&M.delete(e),e.shadowRoot&&M.has(e.shadowRoot)&&M.delete(e.shadowRoot)},ut=(e,t)=>{let n={$flags$:t[0],$tagName$:t[1]};n.$members$=t[2],n.$watchers$=e.$watchers$,n.$attrsToReflect$=[];let o=e.prototype.connectedCallback,i=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){he(this,n)},connectedCallback(){this.__hasHostListenerAttached||=(v(this),!0),ct(this),o&&o.call(this)},disconnectedCallback(){lt(this),i&&i.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${n.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else Me.call(this,n)}}),e.is=n.$tagName$,ot(e,n)},dt=()=>{if(typeof window>"u")return new Map;if(!J){let e=window;e.Ionicons=e.Ionicons||{},J=e.Ionicons.map=e.Ionicons.map||new Map}return J},ft=e=>{let t=Y(e.src);return t||(t=mt(e.name,e.icon,e.mode,e.ios,e.md),t?pt(t,e):e.icon&&(t=Y(e.icon),t||(t=Y(e.icon[e.mode]),t))?t:null)},pt=(e,t)=>{let n=dt().get(e);if(n)return n;try{return Ee(`svg/${e}.svg`)}catch(n){console.log("e",n),console.warn(`[Ionicons Warning]: Could not load icon with name "${e}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`,t)}},mt=(e,t,n,o,i)=>(n="ios"===(n&&Z(n))?"ios":"md",o&&"ios"===n?e=Z(o):i&&"md"===n?e=Z(i):(!e&&t&&!ht(t)&&(e=t),X(e)&&(e=Z(e))),X(e)&&""!==e.trim()&&""===e.replace(/[a-z]|-|\d/gi,"")?e:null),Y=e=>X(e)&&(e=e.trim(),ht(e))?e:null,ht=e=>e.length>0&&/(\/|\.)/.test(e),X=e=>"string"==typeof e,Z=e=>e.toLowerCase(),gt=(e,t=[])=>{let n={};return t.forEach(t=>{e.hasAttribute(t)&&(null!==e.getAttribute(t)&&(n[t]=e.getAttribute(t)),e.removeAttribute(t))}),n},_t=e=>e&&""!==e.dir?"rtl"===e.dir.toLowerCase():"rtl"===(null==document?void 0:document.dir.toLowerCase()),vt=e=>{let t=document.createElement("div");t.innerHTML=e;for(let e=t.childNodes.length-1;e>=0;e--)"svg"!==t.childNodes[e].nodeName.toLowerCase()&&t.removeChild(t.childNodes[e]);let n=t.firstElementChild;if(n&&"svg"===n.nodeName.toLowerCase()){let e=n.getAttribute("class")||"";if(n.setAttribute("class",(e+" s-ion-icon").trim()),yt(n))return t.innerHTML}return""},yt=e=>{if(1===e.nodeType){if("script"===e.nodeName.toLowerCase())return!1;for(let t=0;t<e.attributes.length;t++){let n=e.attributes[t].name;if(X(n)&&0===n.toLowerCase().indexOf("on"))return!1}for(let t=0;t<e.childNodes.length;t++)if(!yt(e.childNodes[t]))return!1}return!0},bt=e=>e.startsWith("data:image/svg+xml"),xt=e=>-1!==e.indexOf(";utf8,"),Q=new Map,St=new Map;function $(e){return Q.set(e,""),""}var wt=(e,t)=>St.get(e)||(typeof fetch<"u"&&typeof document<"u"?bt(e)&&xt(e)?Promise.resolve(Tt(e)):Et(e,t):Promise.resolve($(e)));function Tt(e){Ct||=new DOMParser;let t=Ct.parseFromString(e,"text/html").querySelector("svg");if(t)return Q.set(e,t.outerHTML),t.outerHTML;throw Error(`Could not parse svg from ${e}`)}function Et(e,t){let n=fetch(e).then(n=>n.text().then(n=>{n&&!1!==t&&(n=vt(n));let o=n||"";return Q.set(e,o),o}).catch(()=>$(e))).catch(()=>$(e));return St.set(e,n),n}var Dt=":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}",Ot=ut(class extends ye{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.iconName=null,this.inheritedAttributes={},this.didLoadIcon=!1,this.isVisible=!1,this.mode=kt(),this.lazy=!1,this.sanitize=!0}componentWillLoad(){this.inheritedAttributes=gt(this.el,["aria-label"])}connectedCallback(){this.waitUntilVisible(this.el,"50px",()=>{this.isVisible=!0,this.loadIcon()})}componentDidLoad(){this.didLoadIcon||this.loadIcon()}disconnectedCallback(){this.io&&=void this.io.disconnect()}waitUntilVisible(e,t,n){if(!(this.lazy&&typeof window<"u"&&window.IntersectionObserver))return n();let o=this.io=new window.IntersectionObserver(e=>{e[0].isIntersecting&&(o.disconnect(),this.io=void 0,n())},{rootMargin:t});o.observe(e)}loadIcon(){if(this.isVisible){let e=ft(this);e&&(Q.has(e)?this.svgContent=Q.get(e):wt(e,this.sanitize).then(()=>this.svgContent=Q.get(e)),this.didLoadIcon=!0)}this.iconName=mt(this.name,this.icon,this.mode,this.ios,this.md)}render(){let{flipRtl:e,iconName:t,inheritedAttributes:n,el:o}=this,i=this.mode||"md",r=!!t&&((t.includes("arrow")||t.includes("chevron"))&&!1!==e),s=e||r;return P(I,Object.assign({key:"0578c899781ca145dd8205acd9670af39b57cf2e",role:"img",class:Object.assign(Object.assign({[i]:!0},At(this.color)),{[`icon-${this.size}`]:!!this.size,"flip-rtl":s,"icon-rtl":s&&_t(o)})},n),this.svgContent?P("div",{class:"icon-inner",innerHTML:this.svgContent}):P("div",{class:"icon-inner"}))}static get assetsDirs(){return["svg"]}get el(){return this}static get watchers(){return{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"],ios:["loadIcon"],md:["loadIcon"]}}static get style(){return Dt}},[1,"ion-icon",{mode:[1025],color:[1],ios:[1],md:[1],flipRtl:[4,"flip-rtl"],name:[513],src:[1],icon:[8],size:[1],lazy:[4],sanitize:[4],svgContent:[32],isVisible:[32]},void 0,{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"],ios:["loadIcon"],md:["loadIcon"]}]),kt=()=>typeof document<"u"&&document.documentElement.getAttribute("mode")||"md",At=e=>e?{"ion-color":!0,[`ion-color-${e}`]:!0}:null;function jt(){typeof customElements>"u"||["ion-icon"].forEach(e=>{if("ion-icon"===e)customElements.get(e)||customElements.define(e,Ot)})}var Mt=jt,Nt=!1;function Pt(){Nt||=((0,t.initialize)(),(0,n.defineCustomElement)(),(0,r.defineCustomElement)(),(0,i.defineCustomElement)(),(0,a.defineCustomElement)(),(0,o.defineCustomElement)(),(0,s.defineCustomElement)(),(0,c.defineCustomElement)(),(0,l.defineCustomElement)(),(0,u.defineCustomElement)(),(0,d.defineCustomElement)(),(0,f.defineCustomElement)(),(0,p.defineCustomElement)(),(0,m.defineCustomElement)(),(0,h.defineCustomElement)(),(0,g.defineCustomElement)(),(0,ee.defineCustomElement)(),(0,te.defineCustomElement)(),Mt(),(0,ne.defineCustomElement)(),(0,re.defineCustomElement)(),(0,ie.defineCustomElement)(),(0,ae.defineCustomElement)(),!0)}function Ft(){return{navigate:(e,t="forward")=>{let n=document.querySelector("ion-router");n&&"function"==typeof n.push&&n.push(e,t)},replace:e=>{let t=document.querySelector("ion-router");t&&"function"==typeof t.push&&t.push(e,"root")},back:()=>{let e=document.querySelector("ion-router");e&&"function"==typeof e.back&&e.back()}}}function It(e="/"){return{__isNixTemplate:!0,mount(e){let t="string"==typeof e?document.querySelector(e):e;return{unmount:this._render(t,null)}},_render(t,n){let o=document.createElement("ion-back-button");return e&&o.setAttribute("default-href",e),t.insertBefore(o,n),()=>o.remove()}}}var Lt=class extends e.NixComponent{routes;constructor(e){super(),this.routes=e}_pathToRouteId(e){return e&&"/"!==e?`nix-route-${e.replace(/\/:?[^/]+/g,e=>"-"+e.replace(/\//g,"").replace(/:/g,"")).replace(/^\//,"").replace(/\//g,"-")}`:"nix-route-home"}render(){let e=this;return{__isNixTemplate:!0,mount(e){let t="string"==typeof e?document.querySelector(e):e;return{unmount:this._render(t,null)}},_render(t,n){let o=document.createElement("ion-router");o.setAttribute("use-hash","false"),e.routes.filter(e=>"*"!==e.path).forEach(t=>{let n=document.createElement("ion-route");n.setAttribute("url",t.path),n.setAttribute("component",e._pathToRouteId(t.path)),o.appendChild(n)});let i=document.createElement("ion-router-outlet");return i.delegate={attachViewToDom:async(t,n,o,i)=>{let r=e.routes.find(t=>e._pathToRouteId(t.path)===n),s=document.createElement("ion-page");s.classList.add("ion-page"),i&&i.length&&s.classList.add(...i);let l=oe();if(s.addEventListener("ionViewWillEnter",()=>l.willEnter.update(e=>e+1)),s.addEventListener("ionViewDidEnter",()=>l.didEnter.update(e=>e+1)),s.addEventListener("ionViewWillLeave",()=>l.willLeave.update(e=>e+1)),s.addEventListener("ionViewDidLeave",()=>l.didLeave.update(e=>e+1)),r){let e=o||{},t=r.component({lc:l,params:e});if("render"in t&&"function"==typeof t.render){let e=t;e.onInit?.();let n=e.render()._render(s,null),o=e.onMount?.();s._nixCleanup=()=>{e.onUnmount?.(),"function"==typeof o&&o(),n()}}else s._nixCleanup=t._render(s,null)}return t.appendChild(s),s},removeViewFromDom:async(e,t)=>{t._nixCleanup&&t._nixCleanup(),t.remove()}},t.insertBefore(o,n),t.insertBefore(i,n),()=>{o.remove(),i.remove()}}}}};exports.IonBackButton=It,exports.IonPage=se,exports.IonRouterOutlet=Lt,exports.createPageLifecycle=oe,exports.setupNixIonic=Pt,exports.useIonViewDidEnter=le,exports.useIonViewDidLeave=de,exports.useIonViewWillEnter=ce,exports.useIonViewWillLeave=ue,exports.useRouter=Ft;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let e=require("@deijose/nix-js");require("@ionic/core/css/core.css"),require("@ionic/core/css/normalize.css"),require("@ionic/core/css/structure.css"),require("@ionic/core/css/typography.css"),require("@ionic/core/css/padding.css"),require("@ionic/core/css/flex-utils.css"),require("@ionic/core/css/display.css");let t=require("@ionic/core/components"),n=require("@ionic/core/components/ion-app.js"),r=require("@ionic/core/components/ion-header.js"),i=require("@ionic/core/components/ion-toolbar.js"),a=require("@ionic/core/components/ion-title.js"),o=require("@ionic/core/components/ion-content.js"),s=require("@ionic/core/components/ion-buttons.js"),c=require("@ionic/core/components/ion-note.js"),l=require("@ionic/core/components/ion-spinner.js"),u=require("@ionic/core/components/ion-list.js"),d=require("@ionic/core/components/ion-item.js"),f=require("@ionic/core/components/ion-label.js"),p=require("@ionic/core/components/ion-card.js"),m=require("@ionic/core/components/ion-card-header.js"),h=require("@ionic/core/components/ion-card-title.js"),g=require("@ionic/core/components/ion-card-subtitle.js"),ee=require("@ionic/core/components/ion-card-content.js"),te=require("@ionic/core/components/ion-ripple-effect.js"),ne=require("@ionic/core/components/ion-router.js"),re=require("@ionic/core/components/ion-route.js"),ie=require("@ionic/core/components/ion-router-outlet.js"),ae=require("@ionic/core/components/ion-back-button.js"),oe=require("@ionic/core/components/ion-input.js");function _(){return{willEnter:(0,e.signal)(0),didEnter:(0,e.signal)(0),willLeave:(0,e.signal)(0),didLeave:(0,e.signal)(0)}}var se=class extends e.NixComponent{__lc;constructor(e){super(),this.__lc=e}onInit(){let t=this.__lc;this.ionViewWillEnter&&(0,e.watch)(t.willEnter,this.ionViewWillEnter.bind(this)),this.ionViewDidEnter&&(0,e.watch)(t.didEnter,this.ionViewDidEnter.bind(this)),this.ionViewWillLeave&&(0,e.watch)(t.willLeave,this.ionViewWillLeave.bind(this)),this.ionViewDidLeave&&(0,e.watch)(t.didLeave,this.ionViewDidLeave.bind(this))}};function ce(t,n){(0,e.watch)(t.willEnter,n)}function le(t,n){(0,e.watch)(t.didEnter,n)}function ue(t,n){(0,e.watch)(t.willLeave,n)}function de(t,n){(0,e.watch)(t.didLeave,n)}var fe="ionicons",v={hydratedSelectorName:"hydrated",lazyLoad:!1,updatable:!0},pe=Object.defineProperty,me=(e,t)=>{for(var n in t)pe(e,n,{get:t[n],enumerable:!0})},y=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},he=(e,t)=>{let n={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};n.$onReadyPromise$=new Promise(e=>n.$onReadyResolve$=e),e["s-p"]=[],e["s-rc"]=[];let o=n;return e.__stencil__getHostRef=()=>o,o},ge=(e,t)=>t in e,b=(e,t)=>(0,console.error)(e,t),x=new Map,_e="slot-fb{display:contents}slot-fb[hidden]{display:none}",ve="http://www.w3.org/1999/xlink",S=typeof window<"u"?window:{},ye=S.HTMLElement||class{},C={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},be=e=>Promise.resolve(e),xe=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch{}return!1})(),w=!1,T=[],Se=[],Ce=(e,t)=>n=>{e.push(n),w||(w=!0,t&&4&C.$flags$?O(D):C.raf(D))},E=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){b(e)}e.length=0},D=()=>{E(T),E(Se),(w=T.length>0)&&C.raf(D)},O=e=>be().then(e),we=Ce(Se,!0),Te=e=>{let t=new URL(e,C.$resourcesUrl$);return t.origin===S.location.origin?t.pathname:t.href},k=e=>"object"===(e=typeof e)||"function"===e;function Ee(e){return(e.head?.querySelector('meta[name="csp-nonce"]'))?.getAttribute("content")??void 0}var De=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");me({},{err:()=>j,map:()=>Oe,ok:()=>A,unwrap:()=>ke,unwrapErr:()=>Ae});var A=e=>({isOk:!0,isErr:!1,value:e}),j=e=>({isOk:!1,isErr:!0,value:e});function Oe(e,t){if(e.isOk){let n=t(e.value);return n instanceof Promise?n.then(e=>A(e)):A(n)}if(e.isErr){let t=e.value;return j(t)}throw"should never get here"}var M,ke=e=>{if(e.isOk)return e.value;throw e.value},Ae=e=>{if(e.isErr)return e.value;throw e.value};function je(e){let t=this.attachShadow({mode:"open"});void 0===M&&(M=null),M&&t.adoptedStyleSheets.push(M)}var N=(e,t="")=>()=>{},P=new WeakMap,Me=(e,t,n)=>{let o=x.get(e);xe&&n?(o||=new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,x.set(e,o)},Ne=(e,t,n)=>{let o=F(t),i=x.get(o);if(!S.document)return o;if(e=11===e.nodeType?e:S.document,i)if("string"==typeof i){e=e.head||e;let n,r=P.get(e);if(r||P.set(e,r=new Set),!r.has(o)){{n=S.document.createElement("style"),n.innerHTML=i;let o=C.$nonce$??Ee(S.document);if(null!=o&&n.setAttribute("nonce",o),!(1&t.$flags$))if("HEAD"===e.nodeName){let t=e.querySelectorAll("link[rel=preconnect]"),o=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(n,o?.parentNode===e?o:null)}else if("host"in e)if(xe){let t=new CSSStyleSheet;t.replaceSync(i),e.adoptedStyleSheets.unshift(t)}else{let t=e.querySelector("style");t?t.innerHTML=i+t.innerHTML:e.prepend(n)}else e.append(n);1&t.$flags$&&e.insertBefore(n,null)}4&t.$flags$&&(n.innerHTML+=_e),r&&r.add(o)}}else e.adoptedStyleSheets.includes(i)||e.adoptedStyleSheets.push(i);return o},Pe=e=>{let t=e.$cmpMeta$,n=e.$hostElement$,o=t.$flags$,i=N("attachStyles",t.$tagName$),r=Ne(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&o&&(n["s-sc"]=r,n.classList.add(r+"-h")),i()},F=(e,t)=>"sc-"+e.$tagName$,I=(e,t,...n)=>{let o=null,i=null,r=!1,s=!1,l=[],a=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?a(o):null!=o&&"boolean"!=typeof o&&((r="function"!=typeof e&&!k(o))&&(o=String(o)),r&&s?l[l.length-1].$text$+=o:l.push(r?L(null,o):o),s=r)};if(a(n),t){t.key&&(i=t.key);{let e=t.className||t.class;e&&(t.class="object"==typeof e?Object.keys(e).filter(t=>e[t]).join(" "):e)}}let c=L(e,null);return c.$attrs$=t,l.length>0&&(c.$children$=l),c.$key$=i,c},L=(e,t)=>{let n={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null,$attrs$:null,$key$:null};return n},R={},Fe=e=>e&&e.$tag$===R,z=e=>{let t=De(e);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`,"g")};z("::slotted"),z(":host"),z(":host-context");var Ie=(e,t,n)=>null==e||k(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?String(e):e,Le=(e,t,n)=>{let o=C.ce(t,n);return e.dispatchEvent(o),o},Re=(e,t,n,o,i,r,s)=>{if(n===o)return;let l=ge(e,t),a=t.toLowerCase();if("class"===t){let t=e.classList,i=Be(n),r=Be(o);t.remove(...i.filter(e=>e&&!r.includes(e))),t.add(...r.filter(e=>e&&!i.includes(e)))}else if("style"===t){for(let t in n)(!o||null==o[t])&&(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(let t in o)(!n||o[t]!==n[t])&&(t.includes("-")?e.style.setProperty(t,o[t]):e.style[t]=o[t])}else if("key"!==t)if("ref"===t)o&&o(e);else if(e.__lookupSetter__(t)||"o"!==t[0]||"n"!==t[1]){let s=k(o);if(l||s&&null!==o)try{if(e.tagName.includes("-"))e[t]!==o&&(e[t]=o);else{let i=o??"";"list"===t?l=!1:(null==n||e[t]!=i)&&("function"==typeof e.__lookupSetter__(t)?e[t]=i:e.setAttribute(t,i))}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),null==o||!1===o?(!1!==o||""===e.getAttribute(t))&&(c?e.removeAttributeNS(ve,t):e.removeAttribute(t)):(!l||4&r||i)&&!s&&1===e.nodeType&&(o=!0===o?"":o,c?e.setAttributeNS(ve,t,o):e.setAttribute(t,o))}else if(t="-"===t[2]?t.slice(3):ge(S,a)?a.slice(2):a[2]+t.slice(3),n||o){let i=t.endsWith(Ve);t=t.replace(He,""),n&&C.rel(e,t,n,i),o&&C.ael(e,t,o,i)}},ze=/\s/,Be=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(ze):[]),Ve="Capture",He=RegExp(Ve+"$"),Ue=(e,t,n,o)=>{let i=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,r=e&&e.$attrs$||{},s=t.$attrs$||{};for(let e of We(Object.keys(r)))e in s||Re(i,e,r[e],void 0,n,t.$flags$);for(let e of We(Object.keys(s)))Re(i,e,r[e],s[e],n,t.$flags$)};function We(e){return e.includes("ref")?[...e.filter(e=>"ref"!==e),"ref"]:e}var B,J,wt,V=!1,H=(e,t,n)=>{let o,i,r=t.$children$[n],s=0;if(null!==r.$text$)o=r.$elm$=S.document.createTextNode(r.$text$);else{if(!S.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(o=r.$elm$=S.document.createElement(r.$tag$),Ue(null,r,V),r.$children$)for(s=0;s<r.$children$.length;++s)i=H(e,r,s),i&&o.appendChild(i)}return o["s-hn"]=B,o},Ge=(e,t,n,o,i,r)=>{let s,l=e;for(l.shadowRoot&&l.tagName===B&&(l=l.shadowRoot);i<=r;++i)o[i]&&(s=H(null,n,i),s&&(o[i].$elm$=s,G(l,s,t)))},Ke=(e,t,n)=>{for(let o=t;o<=n;++o){let t=e[o];if(t){let e=t.$elm$;Je(t),e&&e.remove()}}},qe=(e,t,n,o,i=!1)=>{let r,s,l=0,a=0,c=0,u=0,d=t.length-1,$=t[0],m=t[d],h=o.length-1,f=o[0],p=o[h];for(;l<=d&&a<=h;)if(null==$)$=t[++l];else if(null==m)m=t[--d];else if(null==f)f=o[++a];else if(null==p)p=o[--h];else if(U($,f,i))W($,f,i),$=t[++l],f=o[++a];else if(U(m,p,i))W(m,p,i),m=t[--d],p=o[--h];else if(U($,p,i))W($,p,i),G(e,$.$elm$,m.$elm$.nextSibling),$=t[++l],p=o[--h];else if(U(m,f,i))W(m,f,i),G(e,m.$elm$,$.$elm$),m=t[--d],f=o[++a];else{for(c=-1,u=l;u<=d;++u)if(t[u]&&null!==t[u].$key$&&t[u].$key$===f.$key$){c=u;break}c>=0?(s=t[c],s.$tag$===f.$tag$?(W(s,f,i),t[c]=void 0,r=s.$elm$):r=H(t&&t[a],n,c),f=o[++a]):(r=H(t&&t[a],n,a),f=o[++a]),r&&G($.$elm$.parentNode,r,$.$elm$)}l>d?Ge(e,null==o[h+1]?null:o[h+1].$elm$,n,o,a,h):a>h&&Ke(t,l,d)},U=(e,t,n=!1)=>e.$tag$===t.$tag$&&(n?(n&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$),W=(e,t,n=!1)=>{let o=t.$elm$=e.$elm$,i=e.$children$,r=t.$children$,s=t.$text$;null===s?(Ue(e,t,V),null!==i&&null!==r?qe(o,i,t,r,n):null===r?!n&&v.updatable&&null!==i&&Ke(i,0,i.length-1):(null!==e.$text$&&(o.textContent=""),Ge(o,null,t,r,0,r.length-1))):e.$text$!==s&&(o.data=s)},Je=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(Je)},G=(e,t,n)=>e?.insertBefore(t,n),Ye=(e,t,n=!1)=>{let o=e.$hostElement$,i=e.$cmpMeta$,r=e.$vnode$||L(null,null),s=Fe(t)?t:I(null,null,t);if(B=o.tagName,i.$attrsToReflect$&&(s.$attrs$=s.$attrs$||{},i.$attrsToReflect$.map(([e,t])=>s.$attrs$[t]=o[e])),n&&s.$attrs$)for(let e of Object.keys(s.$attrs$))o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(s.$attrs$[e]=o[e]);s.$tag$=null,s.$flags$|=4,e.$vnode$=s,s.$elm$=r.$elm$=o.shadowRoot||o,W(r,s,n)},Xe=(e,t)=>{if(t&&!e.$onRenderResolve$&&t["s-p"]){let n=t["s-p"].push(new Promise(o=>e.$onRenderResolve$=()=>{t["s-p"].splice(n-1,1),o()}))}},K=(e,t)=>{if(e.$flags$|=16,!(4&e.$flags$))return Xe(e,e.$ancestorComponent$),we(()=>Ze(e,t));e.$flags$|=512},Ze=(e,t)=>{let n,o=e.$hostElement$,i=N("scheduleUpdate",e.$cmpMeta$.$tagName$),r=o;if(!r)throw Error(`Can't render component <${o.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);return n=q(r,t?"componentWillLoad":"componentWillUpdate",void 0,o),n=Qe(n,()=>q(r,"componentWillRender",void 0,o)),i(),Qe(n,()=>et(e,r,t))},Qe=(e,t)=>$e(e)?e.then(t).catch(e=>{console.error(e),t()}):t(),$e=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,et=async(e,t,n)=>{let o=e.$hostElement$,i=N("update",e.$cmpMeta$.$tagName$),r=o["s-rc"];n&&Pe(e);let s=N("render",e.$cmpMeta$.$tagName$);tt(e,t,o,n),r&&(r.map(e=>e()),o["s-rc"]=void 0),s(),i();{let t=o["s-p"]??[],n=()=>nt(e);0===t.length?n():(Promise.all(t).then(n),e.$flags$|=4,t.length=0)}},tt=(e,t,n,o)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,Ye(e,t,o)}catch(t){b(t,e.$hostElement$)}return null},nt=e=>{let t=e.$cmpMeta$.$tagName$,n=e.$hostElement$,o=N("postUpdate",t),i=n,r=e.$ancestorComponent$;q(i,"componentDidRender",void 0,n),64&e.$flags$?(q(i,"componentDidUpdate",void 0,n),o()):(e.$flags$|=64,it(n),q(i,"componentDidLoad",void 0,n),o(),e.$onReadyResolve$(n),r||rt()),e.$onRenderResolve$&&=void e.$onRenderResolve$(),512&e.$flags$&&O(()=>K(e,!1)),e.$flags$&=-517},rt=e=>{O(()=>Le(S,"appload",{detail:{namespace:fe}}))},q=(e,t,n,o)=>{if(e&&e[t])try{return e[t](n)}catch(e){b(e,o)}},it=e=>e.classList.add(v.hydratedSelectorName??"hydrated"),at=(e,t)=>y(e).$instanceValues$.get(t),ot=(e,t,n,o)=>{let i=y(e),r=e,s=i.$instanceValues$.get(t),l=i.$flags$,a=r;if(!((n=Ie(n,o.$members$[t][0]))===s||Number.isNaN(s)&&Number.isNaN(n))){if(i.$instanceValues$.set(t,n),o.$watchers$&&128&l){let e=o.$watchers$[t];e&&e.map(e=>{try{a[e](n,s,t)}catch(e){b(e,r)}})}if(2==(18&l)){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(n,s,t))return;K(i,!1)}}},st=(e,t,n)=>{let o=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);let n=Object.entries(t.$members$??{});n.map(([e,[n]])=>{if(31&n||32&n){let{get:i,set:r}=Object.getOwnPropertyDescriptor(o,e)||{};i&&(t.$members$[e][0]|=2048),r&&(t.$members$[e][0]|=4096),Object.defineProperty(o,e,{get(){return i?i.apply(this):at(this,e)},configurable:!0,enumerable:!0}),Object.defineProperty(o,e,{set(o){let i=y(this);if(r){let s=32&n?this[e]:i.$hostElement$[e];return void 0===s&&i.$instanceValues$.get(e)?o=i.$instanceValues$.get(e):!i.$instanceValues$.get(e)&&s&&i.$instanceValues$.set(e,s),r.apply(this,[Ie(o,n)]),o=32&n?this[e]:i.$hostElement$[e],void ot(this,e,o,t)}ot(this,e,o,t)}})}});{let i=new Map;o.attributeChangedCallback=function(e,n,r){C.jmp(()=>{let s=i.get(e);if(!this.hasOwnProperty(s)||!v.lazyLoad){if(o.hasOwnProperty(s)&&"number"==typeof this[s]&&this[s]==r)return;if(null==s){let o=y(this)?.$flags$;if(o&&!(8&o)&&128&o&&r!==n){let o=this;(t.$watchers$?.[e])?.forEach(t=>{null!=o[t]&&o[t].call(o,r,n,e)})}return}}let l=Object.getOwnPropertyDescriptor(o,s);(r=(null!==r||"boolean"!=typeof this[s])&&r)!==this[s]&&(!l.get||l.set)&&(this[s]=r)})},e.observedAttributes=Array.from(new Set([...Object.keys(t.$watchers$??{}),...n.filter(([e,t])=>15&t[0]).map(([e,n])=>{var o;let r=n[1]||e;return i.set(r,e),512&n[0]&&(null==(o=t.$attrsToReflect$)||o.push([e,r])),r})]))}}return e},ct=async(e,t,n,o)=>{let i;if(!(32&t.$flags$)){t.$flags$|=32;{i=e.constructor;let n=e.localName;customElements.whenDefined(n).then(()=>t.$flags$|=128)}if(i&&i.style){let e;"string"==typeof i.style&&(e=i.style);let t=F(n);if(!x.has(t)){let o=N("registerStyles",n.$tagName$);Me(t,e,!!(1&n.$flags$)),o()}}}let r=t.$ancestorComponent$,s=()=>K(t,!0);r&&r["s-rc"]?r["s-rc"].push(s):s()},lt=e=>{if(!(1&C.$flags$)){let t=y(e),n=t.$cmpMeta$,o=N("connectedCallback",n.$tagName$);if(1&t.$flags$)t?.$lazyInstance$||t?.$onReadyPromise$&&t.$onReadyPromise$.then(()=>{});else{t.$flags$|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Xe(t,t.$ancestorComponent$=n);break}}n.$members$&&Object.entries(n.$members$).map(([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){let n=e[t];delete e[t],e[t]=n}}),v.initializeNextTick?O(()=>ct(e,t,n)):ct(e,t,n)}o()}},ut=async e=>{1&C.$flags$||y(e),P.has(e)&&P.delete(e),e.shadowRoot&&P.has(e.shadowRoot)&&P.delete(e.shadowRoot)},dt=(e,t)=>{let n={$flags$:t[0],$tagName$:t[1]};n.$members$=t[2],n.$watchers$=e.$watchers$,n.$attrsToReflect$=[];let o=e.prototype.connectedCallback,i=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){he(this,n)},connectedCallback(){this.__hasHostListenerAttached||=(y(this),!0),lt(this),o&&o.call(this)},disconnectedCallback(){ut(this),i&&i.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${n.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else je.call(this,n)}}),e.is=n.$tagName$,st(e,n)},ft=()=>{if(typeof window>"u")return new Map;if(!J){let e=window;e.Ionicons=e.Ionicons||{},J=e.Ionicons.map=e.Ionicons.map||new Map}return J},pt=e=>{let t=Y(e.src);return t||(t=ht(e.name,e.icon,e.mode,e.ios,e.md),t?mt(t,e):e.icon&&(t=Y(e.icon),t||(t=Y(e.icon[e.mode]),t))?t:null)},mt=(e,t)=>{let n=ft().get(e);if(n)return n;try{return Te(`svg/${e}.svg`)}catch(n){console.log("e",n),console.warn(`[Ionicons Warning]: Could not load icon with name "${e}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`,t)}},ht=(e,t,n,o,i)=>(n="ios"===(n&&Z(n))?"ios":"md",o&&"ios"===n?e=Z(o):i&&"md"===n?e=Z(i):(!e&&t&&!gt(t)&&(e=t),X(e)&&(e=Z(e))),X(e)&&""!==e.trim()&&""===e.replace(/[a-z]|-|\d/gi,"")?e:null),Y=e=>X(e)&&(e=e.trim(),gt(e))?e:null,gt=e=>e.length>0&&/(\/|\.)/.test(e),X=e=>"string"==typeof e,Z=e=>e.toLowerCase(),_t=(e,t=[])=>{let n={};return t.forEach(t=>{e.hasAttribute(t)&&(null!==e.getAttribute(t)&&(n[t]=e.getAttribute(t)),e.removeAttribute(t))}),n},vt=e=>e&&""!==e.dir?"rtl"===e.dir.toLowerCase():"rtl"===(null==document?void 0:document.dir.toLowerCase()),yt=e=>{let t=document.createElement("div");t.innerHTML=e;for(let e=t.childNodes.length-1;e>=0;e--)"svg"!==t.childNodes[e].nodeName.toLowerCase()&&t.removeChild(t.childNodes[e]);let n=t.firstElementChild;if(n&&"svg"===n.nodeName.toLowerCase()){let e=n.getAttribute("class")||"";if(n.setAttribute("class",(e+" s-ion-icon").trim()),bt(n))return t.innerHTML}return""},bt=e=>{if(1===e.nodeType){if("script"===e.nodeName.toLowerCase())return!1;for(let t=0;t<e.attributes.length;t++){let n=e.attributes[t].name;if(X(n)&&0===n.toLowerCase().indexOf("on"))return!1}for(let t=0;t<e.childNodes.length;t++)if(!bt(e.childNodes[t]))return!1}return!0},xt=e=>e.startsWith("data:image/svg+xml"),St=e=>-1!==e.indexOf(";utf8,"),Q=new Map,Ct=new Map;function $(e){return Q.set(e,""),""}var Tt=(e,t)=>Ct.get(e)||(typeof fetch<"u"&&typeof document<"u"?xt(e)&&St(e)?Promise.resolve(Et(e)):Dt(e,t):Promise.resolve($(e)));function Et(e){wt||=new DOMParser;let t=wt.parseFromString(e,"text/html").querySelector("svg");if(t)return Q.set(e,t.outerHTML),t.outerHTML;throw Error(`Could not parse svg from ${e}`)}function Dt(e,t){let n=fetch(e).then(n=>n.text().then(n=>{n&&!1!==t&&(n=yt(n));let o=n||"";return Q.set(e,o),o}).catch(()=>$(e))).catch(()=>$(e));return Ct.set(e,n),n}var Ot=":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}",kt=dt(class extends ye{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.iconName=null,this.inheritedAttributes={},this.didLoadIcon=!1,this.isVisible=!1,this.mode=At(),this.lazy=!1,this.sanitize=!0}componentWillLoad(){this.inheritedAttributes=_t(this.el,["aria-label"])}connectedCallback(){this.waitUntilVisible(this.el,"50px",()=>{this.isVisible=!0,this.loadIcon()})}componentDidLoad(){this.didLoadIcon||this.loadIcon()}disconnectedCallback(){this.io&&=void this.io.disconnect()}waitUntilVisible(e,t,n){if(!(this.lazy&&typeof window<"u"&&window.IntersectionObserver))return n();let o=this.io=new window.IntersectionObserver(e=>{e[0].isIntersecting&&(o.disconnect(),this.io=void 0,n())},{rootMargin:t});o.observe(e)}loadIcon(){if(this.isVisible){let e=pt(this);e&&(Q.has(e)?this.svgContent=Q.get(e):Tt(e,this.sanitize).then(()=>this.svgContent=Q.get(e)),this.didLoadIcon=!0)}this.iconName=ht(this.name,this.icon,this.mode,this.ios,this.md)}render(){let{flipRtl:e,iconName:t,inheritedAttributes:n,el:o}=this,i=this.mode||"md",r=!!t&&((t.includes("arrow")||t.includes("chevron"))&&!1!==e),s=e||r;return I(R,Object.assign({key:"0578c899781ca145dd8205acd9670af39b57cf2e",role:"img",class:Object.assign(Object.assign({[i]:!0},jt(this.color)),{[`icon-${this.size}`]:!!this.size,"flip-rtl":s,"icon-rtl":s&&vt(o)})},n),this.svgContent?I("div",{class:"icon-inner",innerHTML:this.svgContent}):I("div",{class:"icon-inner"}))}static get assetsDirs(){return["svg"]}get el(){return this}static get watchers(){return{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"],ios:["loadIcon"],md:["loadIcon"]}}static get style(){return Ot}},[1,"ion-icon",{mode:[1025],color:[1],ios:[1],md:[1],flipRtl:[4,"flip-rtl"],name:[513],src:[1],icon:[8],size:[1],lazy:[4],sanitize:[4],svgContent:[32],isVisible:[32]},void 0,{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"],ios:["loadIcon"],md:["loadIcon"]}]),At=()=>typeof document<"u"&&document.documentElement.getAttribute("mode")||"md",jt=e=>e?{"ion-color":!0,[`ion-color-${e}`]:!0}:null;function Mt(){typeof customElements>"u"||["ion-icon"].forEach(e=>{if("ion-icon"===e)customElements.get(e)||customElements.define(e,kt)})}var Nt=Mt,Pt=!1;function Ft(){Pt||=((0,t.initialize)(),(0,n.defineCustomElement)(),(0,r.defineCustomElement)(),(0,i.defineCustomElement)(),(0,a.defineCustomElement)(),(0,o.defineCustomElement)(),(0,s.defineCustomElement)(),(0,c.defineCustomElement)(),(0,l.defineCustomElement)(),(0,u.defineCustomElement)(),(0,d.defineCustomElement)(),(0,f.defineCustomElement)(),(0,p.defineCustomElement)(),(0,m.defineCustomElement)(),(0,h.defineCustomElement)(),(0,g.defineCustomElement)(),(0,ee.defineCustomElement)(),(0,te.defineCustomElement)(),Nt(),(0,ne.defineCustomElement)(),(0,re.defineCustomElement)(),(0,ie.defineCustomElement)(),(0,ae.defineCustomElement)(),(0,oe.defineCustomElement)(),!0)}function It(){return{navigate:(e,t="forward")=>{let n=document.querySelector("ion-router");n&&"function"==typeof n.push&&n.push(e,t)},replace:e=>{let t=document.querySelector("ion-router");t&&"function"==typeof t.push&&t.push(e,"root")},back:()=>{let e=document.querySelector("ion-router");e&&"function"==typeof e.back&&e.back()}}}function Lt(e="/"){return{__isNixTemplate:!0,mount(e){let t="string"==typeof e?document.querySelector(e):e;return{unmount:this._render(t,null)}},_render(t,n){let o=document.createElement("ion-back-button");return e&&o.setAttribute("default-href",e),t.insertBefore(o,n),()=>o.remove()}}}var Rt=class extends e.NixComponent{routes;constructor(e){super(),this.routes=e}_pathToRouteId(e){return e&&"/"!==e?`nix-route-${e.replace(/\/:?[^/]+/g,e=>"-"+e.replace(/\//g,"").replace(/:/g,"")).replace(/^\//,"").replace(/\//g,"-")}`:"nix-route-home"}render(){let e=this;return{__isNixTemplate:!0,mount(e){let t="string"==typeof e?document.querySelector(e):e;return{unmount:this._render(t,null)}},_render(t,n){let o=document.createElement("ion-router");o.setAttribute("use-hash","false"),e.routes.filter(e=>"*"!==e.path).forEach(t=>{let n=document.createElement("ion-route");n.setAttribute("url",t.path),n.setAttribute("component",e._pathToRouteId(t.path)),o.appendChild(n)});let i=document.createElement("ion-router-outlet");return i.delegate={attachViewToDom:async(t,n,o,i)=>{let r=e.routes.find(t=>e._pathToRouteId(t.path)===n),s=document.createElement("ion-page");s.classList.add("ion-page"),i&&i.length&&s.classList.add(...i);let l=_();if(s.addEventListener("ionViewWillEnter",()=>l.willEnter.update(e=>e+1)),s.addEventListener("ionViewDidEnter",()=>l.didEnter.update(e=>e+1)),s.addEventListener("ionViewWillLeave",()=>l.willLeave.update(e=>e+1)),s.addEventListener("ionViewDidLeave",()=>l.didLeave.update(e=>e+1)),r){let e=o||{},t=r.component({lc:l,params:e});if("render"in t&&"function"==typeof t.render){let e=t;e.onInit?.();let n=e.render()._render(s,null),o=e.onMount?.();s._nixCleanup=()=>{e.onUnmount?.(),"function"==typeof o&&o(),n()}}else s._nixCleanup=t._render(s,null)}return t.appendChild(s),s},removeViewFromDom:async(e,t)=>{t._nixCleanup&&t._nixCleanup(),t.remove()}},t.insertBefore(o,n),t.insertBefore(i,n),()=>{o.remove(),i.remove()}}}}};exports.IonBackButton=Lt,exports.IonPage=se,exports.IonRouterOutlet=Rt,exports.createPageLifecycle=_,exports.setupNixIonic=Ft,exports.useIonViewDidEnter=le,exports.useIonViewDidLeave=de,exports.useIonViewWillEnter=ce,exports.useIonViewWillLeave=ue,exports.useRouter=It;
|