@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.
@@ -1 +1 @@
1
- import{NixComponent as e,signal as t,watch as n}from"@deijose/nix-js";import"@ionic/core/css/core.css";import"@ionic/core/css/normalize.css";import"@ionic/core/css/structure.css";import"@ionic/core/css/typography.css";import"@ionic/core/css/padding.css";import"@ionic/core/css/flex-utils.css";import"@ionic/core/css/display.css";import{initialize as r}from"@ionic/core/components";import{defineCustomElement as i}from"@ionic/core/components/ion-app.js";import{defineCustomElement as a}from"@ionic/core/components/ion-header.js";import{defineCustomElement as o}from"@ionic/core/components/ion-toolbar.js";import{defineCustomElement as s}from"@ionic/core/components/ion-title.js";import{defineCustomElement as c}from"@ionic/core/components/ion-content.js";import{defineCustomElement as l}from"@ionic/core/components/ion-buttons.js";import{defineCustomElement as u}from"@ionic/core/components/ion-note.js";import{defineCustomElement as d}from"@ionic/core/components/ion-spinner.js";import{defineCustomElement as f}from"@ionic/core/components/ion-list.js";import{defineCustomElement as p}from"@ionic/core/components/ion-item.js";import{defineCustomElement as m}from"@ionic/core/components/ion-label.js";import{defineCustomElement as h}from"@ionic/core/components/ion-card.js";import{defineCustomElement as g}from"@ionic/core/components/ion-card-header.js";import{defineCustomElement as ee}from"@ionic/core/components/ion-card-title.js";import{defineCustomElement as te}from"@ionic/core/components/ion-card-subtitle.js";import{defineCustomElement as ne}from"@ionic/core/components/ion-card-content.js";import{defineCustomElement as re}from"@ionic/core/components/ion-ripple-effect.js";import{defineCustomElement as ie}from"@ionic/core/components/ion-router.js";import{defineCustomElement as ae}from"@ionic/core/components/ion-route.js";import{defineCustomElement as oe}from"@ionic/core/components/ion-router-outlet.js";import{defineCustomElement as se}from"@ionic/core/components/ion-back-button.js";function ce(){return{willEnter:t(0),didEnter:t(0),willLeave:t(0),didLeave:t(0)}}var le=class extends e{__lc;constructor(e){super(),this.__lc=e}onInit(){let e=this.__lc;this.ionViewWillEnter&&n(e.willEnter,this.ionViewWillEnter.bind(this)),this.ionViewDidEnter&&n(e.didEnter,this.ionViewDidEnter.bind(this)),this.ionViewWillLeave&&n(e.willLeave,this.ionViewWillLeave.bind(this)),this.ionViewDidLeave&&n(e.didLeave,this.ionViewDidLeave.bind(this))}};function ue(e,t){n(e.willEnter,t)}function de(e,t){n(e.didEnter,t)}function fe(e,t){n(e.willLeave,t)}function pe(e,t){n(e.didLeave,t)}var me="ionicons",_={hydratedSelectorName:"hydrated",lazyLoad:!1,updatable:!0},he=Object.defineProperty,ge=(e,t)=>{for(var o in t)he(e,o,{get:t[o],enumerable:!0})},v=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},_e=(e,t)=>{let o={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};o.$onReadyPromise$=new Promise(e=>o.$onReadyResolve$=e),e["s-p"]=[],e["s-rc"]=[];let n=o;return e.__stencil__getHostRef=()=>n,n},y=(e,t)=>t in e,b=(e,t)=>(0,console.error)(e,t),x=new Map,ve="slot-fb{display:contents}slot-fb[hidden]{display:none}",S="http://www.w3.org/1999/xlink",C=typeof window<"u"?window:{},ye=C.HTMLElement||class{},w={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,o,n)=>e.addEventListener(t,o,n),rel:(e,t,o,n)=>e.removeEventListener(t,o,n),ce:(e,t)=>new CustomEvent(e,t)},be=e=>Promise.resolve(e),T=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch{}return!1})(),E=!1,xe=[],Se=[],Ce=(e,t)=>o=>{e.push(o),E||(E=!0,t&&4&w.$flags$?k(O):w.raf(O))},D=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){b(e)}e.length=0},O=()=>{D(xe),D(Se),(E=xe.length>0)&&w.raf(O)},k=e=>be().then(e),we=Ce(Se,!0),Te=e=>{let t=new URL(e,w.$resourcesUrl$);return t.origin===C.location.origin?t.pathname:t.href},A=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,"\\$&");ge({},{err:()=>Oe,map:()=>ke,ok:()=>j,unwrap:()=>Ae,unwrapErr:()=>je});var j=e=>({isOk:!0,isErr:!1,value:e}),Oe=e=>({isOk:!1,isErr:!0,value:e});function ke(e,t){if(e.isOk){let o=t(e.value);return o instanceof Promise?o.then(e=>j(e)):j(o)}if(e.isErr){let t=e.value;return Oe(t)}throw"should never get here"}var M,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===M&&(M=null),M&&t.adoptedStyleSheets.push(M)}var N=(e,t="")=>()=>{},P=new WeakMap,Ne=(e,t,o)=>{let n=x.get(e);T&&o?(n||=new CSSStyleSheet,"string"==typeof n?n=t:n.replaceSync(t)):n=t,x.set(e,n)},Pe=(e,t,o)=>{let n=F(t),i=x.get(n);if(!C.document)return n;if(e=11===e.nodeType?e:C.document,i)if("string"==typeof i){e=e.head||e;let o,r=P.get(e);if(r||P.set(e,r=new Set),!r.has(n)){{o=C.document.createElement("style"),o.innerHTML=i;let n=w.$nonce$??Ee(C.document);if(null!=n&&o.setAttribute("nonce",n),!(1&t.$flags$))if("HEAD"===e.nodeName){let t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(o,n?.parentNode===e?n:null)}else if("host"in e)if(T){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(o)}else e.append(o);1&t.$flags$&&e.insertBefore(o,null)}4&t.$flags$&&(o.innerHTML+=ve),r&&r.add(n)}}else e.adoptedStyleSheets.includes(i)||e.adoptedStyleSheets.push(i);return n},Fe=e=>{let t=e.$cmpMeta$,o=e.$hostElement$,n=t.$flags$,i=N("attachStyles",t.$tagName$),r=Pe(o.shadowRoot?o.shadowRoot:o.getRootNode(),t);10&n&&(o["s-sc"]=r,o.classList.add(r+"-h")),i()},F=(e,t)=>"sc-"+e.$tagName$,I=(e,t,...o)=>{let n=null,i=null,r=!1,s=!1,l=[],a=t=>{for(let o=0;o<t.length;o++)n=t[o],Array.isArray(n)?a(n):null!=n&&"boolean"!=typeof n&&((r="function"!=typeof e&&!A(n))&&(n=String(n)),r&&s?l[l.length-1].$text$+=n:l.push(r?L(null,n):n),s=r)};if(a(o),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 o={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null,$attrs$:null,$key$:null};return o},R={},Ie=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 B=(e,t,o)=>null==e||A(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?String(e):e,Le=(e,t,o)=>{let n=w.ce(t,o);return e.dispatchEvent(n),n},Re=(e,t,o,n,i,r,s)=>{if(o===n)return;let l=y(e,t),a=t.toLowerCase();if("class"===t){let t=e.classList,i=Be(o),r=Be(n);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 o)(!n||null==n[t])&&(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(let t in n)(!o||n[t]!==o[t])&&(t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if("key"!==t)if("ref"===t)n&&n(e);else if(e.__lookupSetter__(t)||"o"!==t[0]||"n"!==t[1]){let s=A(n);if(l||s&&null!==n)try{if(e.tagName.includes("-"))e[t]!==n&&(e[t]=n);else{let i=n??"";"list"===t?l=!1:(null==o||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==n||!1===n?(!1!==n||""===e.getAttribute(t))&&(c?e.removeAttributeNS(S,t):e.removeAttribute(t)):(!l||4&r||i)&&!s&&1===e.nodeType&&(n=!0===n?"":n,c?e.setAttributeNS(S,t,n):e.setAttribute(t,n))}else if(t="-"===t[2]?t.slice(3):y(C,a)?a.slice(2):a[2]+t.slice(3),o||n){let i=t.endsWith(Ve);t=t.replace(He,""),o&&w.rel(e,t,o,i),n&&w.ael(e,t,n,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,o,n)=>{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,o,t.$flags$);for(let e of We(Object.keys(s)))Re(i,e,r[e],s[e],o,t.$flags$)};function We(e){return e.includes("ref")?[...e.filter(e=>"ref"!==e),"ref"]:e}var V,J,Tt,Ge=!1,H=(e,t,o)=>{let n,i,r=t.$children$[o],s=0;if(null!==r.$text$)n=r.$elm$=C.document.createTextNode(r.$text$);else{if(!C.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(n=r.$elm$=C.document.createElement(r.$tag$),Ue(null,r,Ge),r.$children$)for(s=0;s<r.$children$.length;++s)i=H(e,r,s),i&&n.appendChild(i)}return n["s-hn"]=V,n},Ke=(e,t,o,n,i,r)=>{let s,l=e;for(l.shadowRoot&&l.tagName===V&&(l=l.shadowRoot);i<=r;++i)n[i]&&(s=H(null,o,i),s&&(n[i].$elm$=s,G(l,s,t)))},qe=(e,t,o)=>{for(let n=t;n<=o;++n){let t=e[n];if(t){let e=t.$elm$;Ye(t),e&&e.remove()}}},Je=(e,t,o,n,i=!1)=>{let r,s,l=0,a=0,c=0,d=0,m=t.length-1,u=t[0],$=t[m],h=n.length-1,f=n[0],p=n[h];for(;l<=m&&a<=h;)if(null==u)u=t[++l];else if(null==$)$=t[--m];else if(null==f)f=n[++a];else if(null==p)p=n[--h];else if(U(u,f,i))W(u,f,i),u=t[++l],f=n[++a];else if(U($,p,i))W($,p,i),$=t[--m],p=n[--h];else if(U(u,p,i))W(u,p,i),G(e,u.$elm$,$.$elm$.nextSibling),u=t[++l],p=n[--h];else if(U($,f,i))W($,f,i),G(e,$.$elm$,u.$elm$),$=t[--m],f=n[++a];else{for(c=-1,d=l;d<=m;++d)if(t[d]&&null!==t[d].$key$&&t[d].$key$===f.$key$){c=d;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],o,c),f=n[++a]):(r=H(t&&t[a],o,a),f=n[++a]),r&&G(u.$elm$.parentNode,r,u.$elm$)}l>m?Ke(e,null==n[h+1]?null:n[h+1].$elm$,o,n,a,h):a>h&&qe(t,l,m)},U=(e,t,o=!1)=>e.$tag$===t.$tag$&&(o?(o&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$),W=(e,t,o=!1)=>{let n=t.$elm$=e.$elm$,i=e.$children$,r=t.$children$,s=t.$text$;null===s?(Ue(e,t,Ge),null!==i&&null!==r?Je(n,i,t,r,o):null===r?!o&&_.updatable&&null!==i&&qe(i,0,i.length-1):(null!==e.$text$&&(n.textContent=""),Ke(n,null,t,r,0,r.length-1))):e.$text$!==s&&(n.data=s)},Ye=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(Ye)},G=(e,t,o)=>e?.insertBefore(t,o),Xe=(e,t,o=!1)=>{let n=e.$hostElement$,i=e.$cmpMeta$,r=e.$vnode$||L(null,null),s=Ie(t)?t:I(null,null,t);if(V=n.tagName,i.$attrsToReflect$&&(s.$attrs$=s.$attrs$||{},i.$attrsToReflect$.map(([e,t])=>s.$attrs$[t]=n[e])),o&&s.$attrs$)for(let e of Object.keys(s.$attrs$))n.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(s.$attrs$[e]=n[e]);s.$tag$=null,s.$flags$|=4,e.$vnode$=s,s.$elm$=r.$elm$=n.shadowRoot||n,W(r,s,o)},Ze=(e,t)=>{if(t&&!e.$onRenderResolve$&&t["s-p"]){let o=t["s-p"].push(new Promise(n=>e.$onRenderResolve$=()=>{t["s-p"].splice(o-1,1),n()}))}},K=(e,t)=>{if(e.$flags$|=16,!(4&e.$flags$))return Ze(e,e.$ancestorComponent$),we(()=>Qe(e,t));e.$flags$|=512},Qe=(e,t)=>{let o,n=e.$hostElement$,i=N("scheduleUpdate",e.$cmpMeta$.$tagName$),r=n;if(!r)throw Error(`Can't render component <${n.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 o=q(r,t?"componentWillLoad":"componentWillUpdate",void 0,n),o=$e(o,()=>q(r,"componentWillRender",void 0,n)),i(),$e(o,()=>tt(e,r,t))},$e=(e,t)=>et(e)?e.then(t).catch(e=>{console.error(e),t()}):t(),et=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,tt=async(e,t,o)=>{let n=e.$hostElement$,i=N("update",e.$cmpMeta$.$tagName$),r=n["s-rc"];o&&Fe(e);let s=N("render",e.$cmpMeta$.$tagName$);nt(e,t,n,o),r&&(r.map(e=>e()),n["s-rc"]=void 0),s(),i();{let t=n["s-p"]??[],o=()=>rt(e);0===t.length?o():(Promise.all(t).then(o),e.$flags$|=4,t.length=0)}},nt=(e,t,o,n)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,Xe(e,t,n)}catch(t){b(t,e.$hostElement$)}return null},rt=e=>{let t=e.$cmpMeta$.$tagName$,o=e.$hostElement$,n=N("postUpdate",t),i=o,r=e.$ancestorComponent$;q(i,"componentDidRender",void 0,o),64&e.$flags$?(q(i,"componentDidUpdate",void 0,o),n()):(e.$flags$|=64,at(o),q(i,"componentDidLoad",void 0,o),n(),e.$onReadyResolve$(o),r||it()),e.$onRenderResolve$&&=void e.$onRenderResolve$(),512&e.$flags$&&k(()=>K(e,!1)),e.$flags$&=-517},it=e=>{k(()=>Le(C,"appload",{detail:{namespace:me}}))},q=(e,t,o,n)=>{if(e&&e[t])try{return e[t](o)}catch(e){b(e,n)}},at=e=>e.classList.add(_.hydratedSelectorName??"hydrated"),ot=(e,t)=>v(e).$instanceValues$.get(t),st=(e,t,o,n)=>{let i=v(e),r=e,s=i.$instanceValues$.get(t),l=i.$flags$,a=r;if(!((o=B(o,n.$members$[t][0]))===s||Number.isNaN(s)&&Number.isNaN(o))){if(i.$instanceValues$.set(t,o),n.$watchers$&&128&l){let e=n.$watchers$[t];e&&e.map(e=>{try{a[e](o,s,t)}catch(e){b(e,r)}})}if(2==(18&l)){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(o,s,t))return;K(i,!1)}}},ct=(e,t,o)=>{let n=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);let o=Object.entries(t.$members$??{});o.map(([e,[o]])=>{if(31&o||32&o){let{get:i,set:r}=Object.getOwnPropertyDescriptor(n,e)||{};i&&(t.$members$[e][0]|=2048),r&&(t.$members$[e][0]|=4096),Object.defineProperty(n,e,{get(){return i?i.apply(this):ot(this,e)},configurable:!0,enumerable:!0}),Object.defineProperty(n,e,{set(n){let i=v(this);if(r){let s=32&o?this[e]:i.$hostElement$[e];return void 0===s&&i.$instanceValues$.get(e)?n=i.$instanceValues$.get(e):!i.$instanceValues$.get(e)&&s&&i.$instanceValues$.set(e,s),r.apply(this,[B(n,o)]),n=32&o?this[e]:i.$hostElement$[e],void st(this,e,n,t)}st(this,e,n,t)}})}});{let i=new Map;n.attributeChangedCallback=function(e,o,r){w.jmp(()=>{let s=i.get(e);if(!this.hasOwnProperty(s)||!_.lazyLoad){if(n.hasOwnProperty(s)&&"number"==typeof this[s]&&this[s]==r)return;if(null==s){let n=v(this)?.$flags$;if(n&&!(8&n)&&128&n&&r!==o){let n=this;(t.$watchers$?.[e])?.forEach(t=>{null!=n[t]&&n[t].call(n,r,o,e)})}return}}let l=Object.getOwnPropertyDescriptor(n,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$??{}),...o.filter(([e,t])=>15&t[0]).map(([e,o])=>{var n;let r=o[1]||e;return i.set(r,e),512&o[0]&&(null==(n=t.$attrsToReflect$)||n.push([e,r])),r})]))}}return e},lt=async(e,t,o,n)=>{let i;if(!(32&t.$flags$)){t.$flags$|=32;{i=e.constructor;let o=e.localName;customElements.whenDefined(o).then(()=>t.$flags$|=128)}if(i&&i.style){let e;"string"==typeof i.style&&(e=i.style);let t=F(o);if(!x.has(t)){let n=N("registerStyles",o.$tagName$);Ne(t,e,!!(1&o.$flags$)),n()}}}let r=t.$ancestorComponent$,s=()=>K(t,!0);r&&r["s-rc"]?r["s-rc"].push(s):s()},ut=e=>{if(!(1&w.$flags$)){let t=v(e),o=t.$cmpMeta$,n=N("connectedCallback",o.$tagName$);if(1&t.$flags$)t?.$lazyInstance$||t?.$onReadyPromise$&&t.$onReadyPromise$.then(()=>{});else{t.$flags$|=1;{let o=e;for(;o=o.parentNode||o.host;)if(o["s-p"]){Ze(t,t.$ancestorComponent$=o);break}}o.$members$&&Object.entries(o.$members$).map(([t,[o]])=>{if(31&o&&e.hasOwnProperty(t)){let o=e[t];delete e[t],e[t]=o}}),_.initializeNextTick?k(()=>lt(e,t,o)):lt(e,t,o)}n()}},dt=async e=>{1&w.$flags$||v(e),P.has(e)&&P.delete(e),e.shadowRoot&&P.has(e.shadowRoot)&&P.delete(e.shadowRoot)},ft=(e,t)=>{let o={$flags$:t[0],$tagName$:t[1]};o.$members$=t[2],o.$watchers$=e.$watchers$,o.$attrsToReflect$=[];let n=e.prototype.connectedCallback,i=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){_e(this,o)},connectedCallback(){this.__hasHostListenerAttached||=(v(this),!0),ut(this),n&&n.call(this)},disconnectedCallback(){dt(this),i&&i.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else Me.call(this,o)}}),e.is=o.$tagName$,ct(e,o)},pt=()=>{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},mt=e=>{let t=Y(e.src);return t||(t=gt(e.name,e.icon,e.mode,e.ios,e.md),t?ht(t,e):e.icon&&(t=Y(e.icon),t||(t=Y(e.icon[e.mode]),t))?t:null)},ht=(e,t)=>{let o=pt().get(e);if(o)return o;try{return Te(`svg/${e}.svg`)}catch(o){console.log("e",o),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)}},gt=(e,t,o,n,i)=>(o="ios"===(o&&Z(o))?"ios":"md",n&&"ios"===o?e=Z(n):i&&"md"===o?e=Z(i):(!e&&t&&!_t(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(),_t(e))?e:null,_t=e=>e.length>0&&/(\/|\.)/.test(e),X=e=>"string"==typeof e,Z=e=>e.toLowerCase(),vt=(e,t=[])=>{let o={};return t.forEach(t=>{e.hasAttribute(t)&&(null!==e.getAttribute(t)&&(o[t]=e.getAttribute(t)),e.removeAttribute(t))}),o},yt=e=>e&&""!==e.dir?"rtl"===e.dir.toLowerCase():"rtl"===(null==document?void 0:document.dir.toLowerCase()),bt=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 o=t.firstElementChild;if(o&&"svg"===o.nodeName.toLowerCase()){let e=o.getAttribute("class")||"";if(o.setAttribute("class",(e+" s-ion-icon").trim()),xt(o))return t.innerHTML}return""},xt=e=>{if(1===e.nodeType){if("script"===e.nodeName.toLowerCase())return!1;for(let t=0;t<e.attributes.length;t++){let o=e.attributes[t].name;if(X(o)&&0===o.toLowerCase().indexOf("on"))return!1}for(let t=0;t<e.childNodes.length;t++)if(!xt(e.childNodes[t]))return!1}return!0},St=e=>e.startsWith("data:image/svg+xml"),Ct=e=>-1!==e.indexOf(";utf8,"),Q=new Map,wt=new Map;function $(e){return Q.set(e,""),""}var Et=(e,t)=>wt.get(e)||(typeof fetch<"u"&&typeof document<"u"?St(e)&&Ct(e)?Promise.resolve(Dt(e)):Ot(e,t):Promise.resolve($(e)));function Dt(e){Tt||=new DOMParser;let t=Tt.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 Ot(e,t){let o=fetch(e).then(o=>o.text().then(o=>{o&&!1!==t&&(o=bt(o));let n=o||"";return Q.set(e,n),n}).catch(()=>$(e))).catch(()=>$(e));return wt.set(e,o),o}var kt=":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)}",At=ft(class extends ye{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.iconName=null,this.inheritedAttributes={},this.didLoadIcon=!1,this.isVisible=!1,this.mode=jt(),this.lazy=!1,this.sanitize=!0}componentWillLoad(){this.inheritedAttributes=vt(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,o){if(!(this.lazy&&typeof window<"u"&&window.IntersectionObserver))return o();let n=this.io=new window.IntersectionObserver(e=>{e[0].isIntersecting&&(n.disconnect(),this.io=void 0,o())},{rootMargin:t});n.observe(e)}loadIcon(){if(this.isVisible){let e=mt(this);e&&(Q.has(e)?this.svgContent=Q.get(e):Et(e,this.sanitize).then(()=>this.svgContent=Q.get(e)),this.didLoadIcon=!0)}this.iconName=gt(this.name,this.icon,this.mode,this.ios,this.md)}render(){let{flipRtl:e,iconName:t,inheritedAttributes:o,el:n}=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},Mt(this.color)),{[`icon-${this.size}`]:!!this.size,"flip-rtl":s,"icon-rtl":s&&yt(n)})},o),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 kt}},[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"]}]),jt=()=>typeof document<"u"&&document.documentElement.getAttribute("mode")||"md",Mt=e=>e?{"ion-color":!0,[`ion-color-${e}`]:!0}:null;function Nt(){typeof customElements>"u"||["ion-icon"].forEach(e=>{if("ion-icon"===e)customElements.get(e)||customElements.define(e,At)})}var Pt=Nt,Ft=!1;function It(){Ft||=(r(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g(),ee(),te(),ne(),re(),Pt(),ie(),ae(),oe(),se(),!0)}function Lt(){return{navigate:(e,t="forward")=>{let o=document.querySelector("ion-router");o&&"function"==typeof o.push&&o.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 Rt(e="/"){return{__isNixTemplate:!0,mount(e){let t="string"==typeof e?document.querySelector(e):e;return{unmount:this._render(t,null)}},_render(t,o){let n=document.createElement("ion-back-button");return e&&n.setAttribute("default-href",e),t.insertBefore(n,o),()=>n.remove()}}}var zt=class extends e{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,o){let n=document.createElement("ion-router");n.setAttribute("use-hash","false"),e.routes.filter(e=>"*"!==e.path).forEach(t=>{let o=document.createElement("ion-route");o.setAttribute("url",t.path),o.setAttribute("component",e._pathToRouteId(t.path)),n.appendChild(o)});let i=document.createElement("ion-router-outlet");return i.delegate={attachViewToDom:async(t,o,n,i)=>{let r=e.routes.find(t=>e._pathToRouteId(t.path)===o),s=document.createElement("ion-page");s.classList.add("ion-page"),i&&i.length&&s.classList.add(...i);let l=ce();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=n||{},t=r.component({lc:l,params:e});if("render"in t&&"function"==typeof t.render){let e=t;e.onInit?.();let o=e.render()._render(s,null),n=e.onMount?.();s._nixCleanup=()=>{e.onUnmount?.(),"function"==typeof n&&n(),o()}}else s._nixCleanup=t._render(s,null)}return t.appendChild(s),s},removeViewFromDom:async(e,t)=>{t._nixCleanup&&t._nixCleanup(),t.remove()}},t.insertBefore(n,o),t.insertBefore(i,o),()=>{n.remove(),i.remove()}}}}};export{Rt as IonBackButton,le as IonPage,zt as IonRouterOutlet,ce as createPageLifecycle,It as setupNixIonic,de as useIonViewDidEnter,pe as useIonViewDidLeave,ue as useIonViewWillEnter,fe as useIonViewWillLeave,Lt as useRouter};
1
+ import{NixComponent as e,signal as t,watch as n}from"@deijose/nix-js";import"@ionic/core/css/core.css";import"@ionic/core/css/normalize.css";import"@ionic/core/css/structure.css";import"@ionic/core/css/typography.css";import"@ionic/core/css/padding.css";import"@ionic/core/css/flex-utils.css";import"@ionic/core/css/display.css";import{initialize as r}from"@ionic/core/components";import{defineCustomElement as i}from"@ionic/core/components/ion-app.js";import{defineCustomElement as a}from"@ionic/core/components/ion-header.js";import{defineCustomElement as o}from"@ionic/core/components/ion-toolbar.js";import{defineCustomElement as s}from"@ionic/core/components/ion-title.js";import{defineCustomElement as c}from"@ionic/core/components/ion-content.js";import{defineCustomElement as l}from"@ionic/core/components/ion-buttons.js";import{defineCustomElement as u}from"@ionic/core/components/ion-note.js";import{defineCustomElement as d}from"@ionic/core/components/ion-spinner.js";import{defineCustomElement as f}from"@ionic/core/components/ion-list.js";import{defineCustomElement as p}from"@ionic/core/components/ion-item.js";import{defineCustomElement as m}from"@ionic/core/components/ion-label.js";import{defineCustomElement as h}from"@ionic/core/components/ion-card.js";import{defineCustomElement as g}from"@ionic/core/components/ion-card-header.js";import{defineCustomElement as ee}from"@ionic/core/components/ion-card-title.js";import{defineCustomElement as te}from"@ionic/core/components/ion-card-subtitle.js";import{defineCustomElement as ne}from"@ionic/core/components/ion-card-content.js";import{defineCustomElement as re}from"@ionic/core/components/ion-ripple-effect.js";import{defineCustomElement as ie}from"@ionic/core/components/ion-router.js";import{defineCustomElement as ae}from"@ionic/core/components/ion-route.js";import{defineCustomElement as oe}from"@ionic/core/components/ion-router-outlet.js";import{defineCustomElement as se}from"@ionic/core/components/ion-back-button.js";import{defineCustomElement as ce}from"@ionic/core/components/ion-input.js";function _(){return{willEnter:t(0),didEnter:t(0),willLeave:t(0),didLeave:t(0)}}var le=class extends e{__lc;constructor(e){super(),this.__lc=e}onInit(){let e=this.__lc;this.ionViewWillEnter&&n(e.willEnter,this.ionViewWillEnter.bind(this)),this.ionViewDidEnter&&n(e.didEnter,this.ionViewDidEnter.bind(this)),this.ionViewWillLeave&&n(e.willLeave,this.ionViewWillLeave.bind(this)),this.ionViewDidLeave&&n(e.didLeave,this.ionViewDidLeave.bind(this))}};function ue(e,t){n(e.willEnter,t)}function de(e,t){n(e.didEnter,t)}function fe(e,t){n(e.willLeave,t)}function pe(e,t){n(e.didLeave,t)}var me="ionicons",v={hydratedSelectorName:"hydrated",lazyLoad:!1,updatable:!0},he=Object.defineProperty,ge=(e,t)=>{for(var o in t)he(e,o,{get:t[o],enumerable:!0})},y=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},_e=(e,t)=>{let o={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};o.$onReadyPromise$=new Promise(e=>o.$onReadyResolve$=e),e["s-p"]=[],e["s-rc"]=[];let n=o;return e.__stencil__getHostRef=()=>n,n},ve=(e,t)=>t in e,b=(e,t)=>(0,console.error)(e,t),x=new Map,ye="slot-fb{display:contents}slot-fb[hidden]{display:none}",be="http://www.w3.org/1999/xlink",S=typeof window<"u"?window:{},xe=S.HTMLElement||class{},C={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,o,n)=>e.addEventListener(t,o,n),rel:(e,t,o,n)=>e.removeEventListener(t,o,n),ce:(e,t)=>new CustomEvent(e,t)},Se=e=>Promise.resolve(e),Ce=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch{}return!1})(),w=!1,T=[],E=[],we=(e,t)=>o=>{e.push(o),w||(w=!0,t&&4&C.$flags$?k(O):C.raf(O))},D=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){b(e)}e.length=0},O=()=>{D(T),D(E),(w=T.length>0)&&C.raf(O)},k=e=>Se().then(e),Te=we(E,!0),Ee=e=>{let t=new URL(e,C.$resourcesUrl$);return t.origin===S.location.origin?t.pathname:t.href},A=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,"\\$&");ge({},{err:()=>M,map:()=>ke,ok:()=>j,unwrap:()=>Ae,unwrapErr:()=>je});var j=e=>({isOk:!0,isErr:!1,value:e}),M=e=>({isOk:!1,isErr:!0,value:e});function ke(e,t){if(e.isOk){let o=t(e.value);return o instanceof Promise?o.then(e=>j(e)):j(o)}if(e.isErr){let t=e.value;return M(t)}throw"should never get here"}var N,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===N&&(N=null),N&&t.adoptedStyleSheets.push(N)}var P=(e,t="")=>()=>{},F=new WeakMap,Ne=(e,t,o)=>{let n=x.get(e);Ce&&o?(n||=new CSSStyleSheet,"string"==typeof n?n=t:n.replaceSync(t)):n=t,x.set(e,n)},Pe=(e,t,o)=>{let n=I(t),i=x.get(n);if(!S.document)return n;if(e=11===e.nodeType?e:S.document,i)if("string"==typeof i){e=e.head||e;let o,r=F.get(e);if(r||F.set(e,r=new Set),!r.has(n)){{o=S.document.createElement("style"),o.innerHTML=i;let n=C.$nonce$??De(S.document);if(null!=n&&o.setAttribute("nonce",n),!(1&t.$flags$))if("HEAD"===e.nodeName){let t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(o,n?.parentNode===e?n:null)}else if("host"in e)if(Ce){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(o)}else e.append(o);1&t.$flags$&&e.insertBefore(o,null)}4&t.$flags$&&(o.innerHTML+=ye),r&&r.add(n)}}else e.adoptedStyleSheets.includes(i)||e.adoptedStyleSheets.push(i);return n},Fe=e=>{let t=e.$cmpMeta$,o=e.$hostElement$,n=t.$flags$,i=P("attachStyles",t.$tagName$),r=Pe(o.shadowRoot?o.shadowRoot:o.getRootNode(),t);10&n&&(o["s-sc"]=r,o.classList.add(r+"-h")),i()},I=(e,t)=>"sc-"+e.$tagName$,L=(e,t,...o)=>{let n=null,i=null,r=!1,s=!1,l=[],a=t=>{for(let o=0;o<t.length;o++)n=t[o],Array.isArray(n)?a(n):null!=n&&"boolean"!=typeof n&&((r="function"!=typeof e&&!A(n))&&(n=String(n)),r&&s?l[l.length-1].$text$+=n:l.push(r?R(null,n):n),s=r)};if(a(o),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=R(e,null);return c.$attrs$=t,l.length>0&&(c.$children$=l),c.$key$=i,c},R=(e,t)=>{let o={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null,$attrs$:null,$key$:null};return o},Ie={},Le=e=>e&&e.$tag$===Ie,z=e=>{let t=Oe(e);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`,"g")};z("::slotted"),z(":host"),z(":host-context");var Re=(e,t,o)=>null==e||A(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?String(e):e,ze=(e,t,o)=>{let n=C.ce(t,o);return e.dispatchEvent(n),n},B=(e,t,o,n,i,r,s)=>{if(o===n)return;let l=ve(e,t),a=t.toLowerCase();if("class"===t){let t=e.classList,i=Ve(o),r=Ve(n);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 o)(!n||null==n[t])&&(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(let t in n)(!o||n[t]!==o[t])&&(t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if("key"!==t)if("ref"===t)n&&n(e);else if(e.__lookupSetter__(t)||"o"!==t[0]||"n"!==t[1]){let s=A(n);if(l||s&&null!==n)try{if(e.tagName.includes("-"))e[t]!==n&&(e[t]=n);else{let i=n??"";"list"===t?l=!1:(null==o||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==n||!1===n?(!1!==n||""===e.getAttribute(t))&&(c?e.removeAttributeNS(be,t):e.removeAttribute(t)):(!l||4&r||i)&&!s&&1===e.nodeType&&(n=!0===n?"":n,c?e.setAttributeNS(be,t,n):e.setAttribute(t,n))}else if(t="-"===t[2]?t.slice(3):ve(S,a)?a.slice(2):a[2]+t.slice(3),o||n){let i=t.endsWith(He);t=t.replace(Ue,""),o&&C.rel(e,t,o,i),n&&C.ael(e,t,n,i)}},Be=/\s/,Ve=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(Be):[]),He="Capture",Ue=RegExp(He+"$"),We=(e,t,o,n)=>{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 Ge(Object.keys(r)))e in s||B(i,e,r[e],void 0,o,t.$flags$);for(let e of Ge(Object.keys(s)))B(i,e,r[e],s[e],o,t.$flags$)};function Ge(e){return e.includes("ref")?[...e.filter(e=>"ref"!==e),"ref"]:e}var V,J,Et,Ke=!1,H=(e,t,o)=>{let n,i,r=t.$children$[o],s=0;if(null!==r.$text$)n=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(n=r.$elm$=S.document.createElement(r.$tag$),We(null,r,Ke),r.$children$)for(s=0;s<r.$children$.length;++s)i=H(e,r,s),i&&n.appendChild(i)}return n["s-hn"]=V,n},qe=(e,t,o,n,i,r)=>{let s,l=e;for(l.shadowRoot&&l.tagName===V&&(l=l.shadowRoot);i<=r;++i)n[i]&&(s=H(null,o,i),s&&(n[i].$elm$=s,G(l,s,t)))},Je=(e,t,o)=>{for(let n=t;n<=o;++n){let t=e[n];if(t){let e=t.$elm$;Xe(t),e&&e.remove()}}},Ye=(e,t,o,n,i=!1)=>{let r,s,l=0,a=0,c=0,d=0,m=t.length-1,u=t[0],$=t[m],h=n.length-1,f=n[0],p=n[h];for(;l<=m&&a<=h;)if(null==u)u=t[++l];else if(null==$)$=t[--m];else if(null==f)f=n[++a];else if(null==p)p=n[--h];else if(U(u,f,i))W(u,f,i),u=t[++l],f=n[++a];else if(U($,p,i))W($,p,i),$=t[--m],p=n[--h];else if(U(u,p,i))W(u,p,i),G(e,u.$elm$,$.$elm$.nextSibling),u=t[++l],p=n[--h];else if(U($,f,i))W($,f,i),G(e,$.$elm$,u.$elm$),$=t[--m],f=n[++a];else{for(c=-1,d=l;d<=m;++d)if(t[d]&&null!==t[d].$key$&&t[d].$key$===f.$key$){c=d;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],o,c),f=n[++a]):(r=H(t&&t[a],o,a),f=n[++a]),r&&G(u.$elm$.parentNode,r,u.$elm$)}l>m?qe(e,null==n[h+1]?null:n[h+1].$elm$,o,n,a,h):a>h&&Je(t,l,m)},U=(e,t,o=!1)=>e.$tag$===t.$tag$&&(o?(o&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$),W=(e,t,o=!1)=>{let n=t.$elm$=e.$elm$,i=e.$children$,r=t.$children$,s=t.$text$;null===s?(We(e,t,Ke),null!==i&&null!==r?Ye(n,i,t,r,o):null===r?!o&&v.updatable&&null!==i&&Je(i,0,i.length-1):(null!==e.$text$&&(n.textContent=""),qe(n,null,t,r,0,r.length-1))):e.$text$!==s&&(n.data=s)},Xe=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(Xe)},G=(e,t,o)=>e?.insertBefore(t,o),Ze=(e,t,o=!1)=>{let n=e.$hostElement$,i=e.$cmpMeta$,r=e.$vnode$||R(null,null),s=Le(t)?t:L(null,null,t);if(V=n.tagName,i.$attrsToReflect$&&(s.$attrs$=s.$attrs$||{},i.$attrsToReflect$.map(([e,t])=>s.$attrs$[t]=n[e])),o&&s.$attrs$)for(let e of Object.keys(s.$attrs$))n.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(s.$attrs$[e]=n[e]);s.$tag$=null,s.$flags$|=4,e.$vnode$=s,s.$elm$=r.$elm$=n.shadowRoot||n,W(r,s,o)},Qe=(e,t)=>{if(t&&!e.$onRenderResolve$&&t["s-p"]){let o=t["s-p"].push(new Promise(n=>e.$onRenderResolve$=()=>{t["s-p"].splice(o-1,1),n()}))}},K=(e,t)=>{if(e.$flags$|=16,!(4&e.$flags$))return Qe(e,e.$ancestorComponent$),Te(()=>$e(e,t));e.$flags$|=512},$e=(e,t)=>{let o,n=e.$hostElement$,i=P("scheduleUpdate",e.$cmpMeta$.$tagName$),r=n;if(!r)throw Error(`Can't render component <${n.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 o=q(r,t?"componentWillLoad":"componentWillUpdate",void 0,n),o=et(o,()=>q(r,"componentWillRender",void 0,n)),i(),et(o,()=>nt(e,r,t))},et=(e,t)=>tt(e)?e.then(t).catch(e=>{console.error(e),t()}):t(),tt=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,nt=async(e,t,o)=>{let n=e.$hostElement$,i=P("update",e.$cmpMeta$.$tagName$),r=n["s-rc"];o&&Fe(e);let s=P("render",e.$cmpMeta$.$tagName$);rt(e,t,n,o),r&&(r.map(e=>e()),n["s-rc"]=void 0),s(),i();{let t=n["s-p"]??[],o=()=>it(e);0===t.length?o():(Promise.all(t).then(o),e.$flags$|=4,t.length=0)}},rt=(e,t,o,n)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,Ze(e,t,n)}catch(t){b(t,e.$hostElement$)}return null},it=e=>{let t=e.$cmpMeta$.$tagName$,o=e.$hostElement$,n=P("postUpdate",t),i=o,r=e.$ancestorComponent$;q(i,"componentDidRender",void 0,o),64&e.$flags$?(q(i,"componentDidUpdate",void 0,o),n()):(e.$flags$|=64,ot(o),q(i,"componentDidLoad",void 0,o),n(),e.$onReadyResolve$(o),r||at()),e.$onRenderResolve$&&=void e.$onRenderResolve$(),512&e.$flags$&&k(()=>K(e,!1)),e.$flags$&=-517},at=e=>{k(()=>ze(S,"appload",{detail:{namespace:me}}))},q=(e,t,o,n)=>{if(e&&e[t])try{return e[t](o)}catch(e){b(e,n)}},ot=e=>e.classList.add(v.hydratedSelectorName??"hydrated"),st=(e,t)=>y(e).$instanceValues$.get(t),ct=(e,t,o,n)=>{let i=y(e),r=e,s=i.$instanceValues$.get(t),l=i.$flags$,a=r;if(!((o=Re(o,n.$members$[t][0]))===s||Number.isNaN(s)&&Number.isNaN(o))){if(i.$instanceValues$.set(t,o),n.$watchers$&&128&l){let e=n.$watchers$[t];e&&e.map(e=>{try{a[e](o,s,t)}catch(e){b(e,r)}})}if(2==(18&l)){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(o,s,t))return;K(i,!1)}}},lt=(e,t,o)=>{let n=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);let o=Object.entries(t.$members$??{});o.map(([e,[o]])=>{if(31&o||32&o){let{get:i,set:r}=Object.getOwnPropertyDescriptor(n,e)||{};i&&(t.$members$[e][0]|=2048),r&&(t.$members$[e][0]|=4096),Object.defineProperty(n,e,{get(){return i?i.apply(this):st(this,e)},configurable:!0,enumerable:!0}),Object.defineProperty(n,e,{set(n){let i=y(this);if(r){let s=32&o?this[e]:i.$hostElement$[e];return void 0===s&&i.$instanceValues$.get(e)?n=i.$instanceValues$.get(e):!i.$instanceValues$.get(e)&&s&&i.$instanceValues$.set(e,s),r.apply(this,[Re(n,o)]),n=32&o?this[e]:i.$hostElement$[e],void ct(this,e,n,t)}ct(this,e,n,t)}})}});{let i=new Map;n.attributeChangedCallback=function(e,o,r){C.jmp(()=>{let s=i.get(e);if(!this.hasOwnProperty(s)||!v.lazyLoad){if(n.hasOwnProperty(s)&&"number"==typeof this[s]&&this[s]==r)return;if(null==s){let n=y(this)?.$flags$;if(n&&!(8&n)&&128&n&&r!==o){let n=this;(t.$watchers$?.[e])?.forEach(t=>{null!=n[t]&&n[t].call(n,r,o,e)})}return}}let l=Object.getOwnPropertyDescriptor(n,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$??{}),...o.filter(([e,t])=>15&t[0]).map(([e,o])=>{var n;let r=o[1]||e;return i.set(r,e),512&o[0]&&(null==(n=t.$attrsToReflect$)||n.push([e,r])),r})]))}}return e},ut=async(e,t,o,n)=>{let i;if(!(32&t.$flags$)){t.$flags$|=32;{i=e.constructor;let o=e.localName;customElements.whenDefined(o).then(()=>t.$flags$|=128)}if(i&&i.style){let e;"string"==typeof i.style&&(e=i.style);let t=I(o);if(!x.has(t)){let n=P("registerStyles",o.$tagName$);Ne(t,e,!!(1&o.$flags$)),n()}}}let r=t.$ancestorComponent$,s=()=>K(t,!0);r&&r["s-rc"]?r["s-rc"].push(s):s()},dt=e=>{if(!(1&C.$flags$)){let t=y(e),o=t.$cmpMeta$,n=P("connectedCallback",o.$tagName$);if(1&t.$flags$)t?.$lazyInstance$||t?.$onReadyPromise$&&t.$onReadyPromise$.then(()=>{});else{t.$flags$|=1;{let o=e;for(;o=o.parentNode||o.host;)if(o["s-p"]){Qe(t,t.$ancestorComponent$=o);break}}o.$members$&&Object.entries(o.$members$).map(([t,[o]])=>{if(31&o&&e.hasOwnProperty(t)){let o=e[t];delete e[t],e[t]=o}}),v.initializeNextTick?k(()=>ut(e,t,o)):ut(e,t,o)}n()}},ft=async e=>{1&C.$flags$||y(e),F.has(e)&&F.delete(e),e.shadowRoot&&F.has(e.shadowRoot)&&F.delete(e.shadowRoot)},pt=(e,t)=>{let o={$flags$:t[0],$tagName$:t[1]};o.$members$=t[2],o.$watchers$=e.$watchers$,o.$attrsToReflect$=[];let n=e.prototype.connectedCallback,i=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){_e(this,o)},connectedCallback(){this.__hasHostListenerAttached||=(y(this),!0),dt(this),n&&n.call(this)},disconnectedCallback(){ft(this),i&&i.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else Me.call(this,o)}}),e.is=o.$tagName$,lt(e,o)},mt=()=>{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},ht=e=>{let t=Y(e.src);return t||(t=_t(e.name,e.icon,e.mode,e.ios,e.md),t?gt(t,e):e.icon&&(t=Y(e.icon),t||(t=Y(e.icon[e.mode]),t))?t:null)},gt=(e,t)=>{let o=mt().get(e);if(o)return o;try{return Ee(`svg/${e}.svg`)}catch(o){console.log("e",o),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)}},_t=(e,t,o,n,i)=>(o="ios"===(o&&Z(o))?"ios":"md",n&&"ios"===o?e=Z(n):i&&"md"===o?e=Z(i):(!e&&t&&!vt(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(),vt(e))?e:null,vt=e=>e.length>0&&/(\/|\.)/.test(e),X=e=>"string"==typeof e,Z=e=>e.toLowerCase(),yt=(e,t=[])=>{let o={};return t.forEach(t=>{e.hasAttribute(t)&&(null!==e.getAttribute(t)&&(o[t]=e.getAttribute(t)),e.removeAttribute(t))}),o},bt=e=>e&&""!==e.dir?"rtl"===e.dir.toLowerCase():"rtl"===(null==document?void 0:document.dir.toLowerCase()),xt=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 o=t.firstElementChild;if(o&&"svg"===o.nodeName.toLowerCase()){let e=o.getAttribute("class")||"";if(o.setAttribute("class",(e+" s-ion-icon").trim()),St(o))return t.innerHTML}return""},St=e=>{if(1===e.nodeType){if("script"===e.nodeName.toLowerCase())return!1;for(let t=0;t<e.attributes.length;t++){let o=e.attributes[t].name;if(X(o)&&0===o.toLowerCase().indexOf("on"))return!1}for(let t=0;t<e.childNodes.length;t++)if(!St(e.childNodes[t]))return!1}return!0},Ct=e=>e.startsWith("data:image/svg+xml"),wt=e=>-1!==e.indexOf(";utf8,"),Q=new Map,Tt=new Map;function $(e){return Q.set(e,""),""}var Dt=(e,t)=>Tt.get(e)||(typeof fetch<"u"&&typeof document<"u"?Ct(e)&&wt(e)?Promise.resolve(Ot(e)):kt(e,t):Promise.resolve($(e)));function Ot(e){Et||=new DOMParser;let t=Et.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 kt(e,t){let o=fetch(e).then(o=>o.text().then(o=>{o&&!1!==t&&(o=xt(o));let n=o||"";return Q.set(e,n),n}).catch(()=>$(e))).catch(()=>$(e));return Tt.set(e,o),o}var At=":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)}",jt=pt(class extends xe{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.iconName=null,this.inheritedAttributes={},this.didLoadIcon=!1,this.isVisible=!1,this.mode=Mt(),this.lazy=!1,this.sanitize=!0}componentWillLoad(){this.inheritedAttributes=yt(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,o){if(!(this.lazy&&typeof window<"u"&&window.IntersectionObserver))return o();let n=this.io=new window.IntersectionObserver(e=>{e[0].isIntersecting&&(n.disconnect(),this.io=void 0,o())},{rootMargin:t});n.observe(e)}loadIcon(){if(this.isVisible){let e=ht(this);e&&(Q.has(e)?this.svgContent=Q.get(e):Dt(e,this.sanitize).then(()=>this.svgContent=Q.get(e)),this.didLoadIcon=!0)}this.iconName=_t(this.name,this.icon,this.mode,this.ios,this.md)}render(){let{flipRtl:e,iconName:t,inheritedAttributes:o,el:n}=this,i=this.mode||"md",r=!!t&&((t.includes("arrow")||t.includes("chevron"))&&!1!==e),s=e||r;return L(Ie,Object.assign({key:"0578c899781ca145dd8205acd9670af39b57cf2e",role:"img",class:Object.assign(Object.assign({[i]:!0},Nt(this.color)),{[`icon-${this.size}`]:!!this.size,"flip-rtl":s,"icon-rtl":s&&bt(n)})},o),this.svgContent?L("div",{class:"icon-inner",innerHTML:this.svgContent}):L("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 At}},[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"]}]),Mt=()=>typeof document<"u"&&document.documentElement.getAttribute("mode")||"md",Nt=e=>e?{"ion-color":!0,[`ion-color-${e}`]:!0}:null;function Pt(){typeof customElements>"u"||["ion-icon"].forEach(e=>{if("ion-icon"===e)customElements.get(e)||customElements.define(e,jt)})}var Ft=Pt,It=!1;function Lt(){It||=(r(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g(),ee(),te(),ne(),re(),Ft(),ie(),ae(),oe(),se(),ce(),!0)}function Rt(){return{navigate:(e,t="forward")=>{let o=document.querySelector("ion-router");o&&"function"==typeof o.push&&o.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 zt(e="/"){return{__isNixTemplate:!0,mount(e){let t="string"==typeof e?document.querySelector(e):e;return{unmount:this._render(t,null)}},_render(t,o){let n=document.createElement("ion-back-button");return e&&n.setAttribute("default-href",e),t.insertBefore(n,o),()=>n.remove()}}}var Bt=class extends e{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,o){let n=document.createElement("ion-router");n.setAttribute("use-hash","false"),e.routes.filter(e=>"*"!==e.path).forEach(t=>{let o=document.createElement("ion-route");o.setAttribute("url",t.path),o.setAttribute("component",e._pathToRouteId(t.path)),n.appendChild(o)});let i=document.createElement("ion-router-outlet");return i.delegate={attachViewToDom:async(t,o,n,i)=>{let r=e.routes.find(t=>e._pathToRouteId(t.path)===o),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=n||{},t=r.component({lc:l,params:e});if("render"in t&&"function"==typeof t.render){let e=t;e.onInit?.();let o=e.render()._render(s,null),n=e.onMount?.();s._nixCleanup=()=>{e.onUnmount?.(),"function"==typeof n&&n(),o()}}else s._nixCleanup=t._render(s,null)}return t.appendChild(s),s},removeViewFromDom:async(e,t)=>{t._nixCleanup&&t._nixCleanup(),t.remove()}},t.insertBefore(n,o),t.insertBefore(i,o),()=>{n.remove(),i.remove()}}}}};export{zt as IonBackButton,le as IonPage,Bt as IonRouterOutlet,_ as createPageLifecycle,Lt as setupNixIonic,de as useIonViewDidEnter,pe as useIonViewDidLeave,ue as useIonViewWillEnter,fe as useIonViewWillLeave,Rt as useRouter};