UNPKG

12.9 kBJavaScriptView Raw
1let t,e,l=!1,n=!1,o=!1,s=0,r=!1;const i="undefined"!=typeof window?window:{},c=i.CSS,a=i.document||{head:{}},u={t:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,l,n)=>t.addEventListener(e,l,n),rel:(t,e,l,n)=>t.removeEventListener(e,l,n)},f=t=>Promise.resolve(t),$=(()=>{try{return new CSSStyleSheet,!0}catch(t){}return!1})(),d=new WeakMap,m=t=>"sc-"+t.o,p={},h=t=>"object"==(t=typeof t)||"function"===t,y=(t,e,...l)=>{let n=null,o=null,s=!1,r=!1,i=[];const c=e=>{for(let l=0;l<e.length;l++)n=e[l],Array.isArray(n)?c(n):null!=n&&"boolean"!=typeof n&&((s="function"!=typeof t&&!h(n))&&(n+=""),s&&r?i[i.length-1].s+=n:i.push(s?b(null,n):n),r=s)};if(c(l),e){e.name&&(o=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter(e=>t[e]).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,i,v);const a=b(t,null);return a.u=e,i.length>0&&(a.$=i),a.p=o,a},b=(t,e)=>({t:0,h:t,s:e,v:null,$:null,u:null,p:null}),w={},v={forEach:(t,e)=>t.map(_).forEach(e),map:(t,e)=>t.map(_).map(e).map(g)},_=t=>({vattrs:t.u,vchildren:t.$,vkey:t._,vname:t.p,vtag:t.h,vtext:t.s}),g=t=>{const e=b(t.vtag,t.vtext);return e.u=t.vattrs,e.$=t.vchildren,e._=t.vkey,e.p=t.vname,e},j=(t,e,l,n,o,s)=>{if(l!==n){let c=nt(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,o=M(l),s=M(n);e.remove(...o.filter(t=>t&&!s.includes(t))),e.add(...s.filter(t=>t&&!o.includes(t)))}else if(c||"o"!==e[0]||"n"!==e[1]){const i=h(n);if((c||i&&null!==n)&&!o)try{if(t.tagName.includes("-"))t[e]=n;else{let o=null==n?"":n;"list"===e?c=!1:null!=l&&t[e]==o||(t[e]=o)}}catch(r){}null==n||!1===n?t.removeAttribute(e):(!c||4&s||o)&&!i&&t.setAttribute(e,n=!0===n?"":n)}else e="-"===e[2]?e.slice(3):nt(i,a)?a.slice(2):a[2]+e.slice(3),l&&u.rel(t,e,l,!1),n&&u.ael(t,e,n,!1)}},k=/\s/,M=t=>t?t.split(k):[],R=(t,e,l,n)=>{const o=11===e.v.nodeType&&e.v.host?e.v.host:e.v,s=t&&t.u||p,r=e.u||p;for(n in s)n in r||j(o,n,s[n],void 0,l,e.t);for(n in r)j(o,n,s[n],r[n],l,e.t)},S=(n,s,r)=>{let i,c,u,f=s.$[r],$=0;if(l||(o=!0,"slot"===f.h&&(f.t|=f.$?2:1)),null!==f.s)i=f.v=a.createTextNode(f.s);else if(1&f.t)i=f.v=a.createTextNode("");else if(i=f.v=a.createElement(2&f.t?"slot-fb":f.h),R(null,f,!1),f.$)for($=0;$<f.$.length;++$)c=S(n,f,$),c&&i.appendChild(c);return i["s-hn"]=e,3&f.t&&(i["s-sr"]=!0,i["s-cr"]=t,i["s-sn"]=f.p||"",u=n&&n.$&&n.$[r],u&&u.h===f.h&&n.v&&x(n.v,!1)),i},x=(t,l)=>{u.t|=1;const n=t.childNodes;for(let s=n.length-1;s>=0;s--){const t=n[s];t["s-hn"]!==e&&t["s-ol"]&&(P(t).insertBefore(t,C(t)),t["s-ol"].remove(),t["s-ol"]=void 0,o=!0),l&&x(t,l)}u.t&=-2},U=(t,e,l,n,o,s)=>{let r,i=t["s-cr"]&&t["s-cr"].parentNode||t;for(;o<=s;++o)n[o]&&(r=S(null,l,o),r&&(n[o].v=r,i.insertBefore(r,C(e))))},L=(t,e,l,o,s)=>{for(;e<=l;++e)(o=t[e])&&(n=!0,(s=o.v)["s-ol"]?s["s-ol"].remove():x(s,!0),s.remove())},O=(t,e)=>t.h===e.h&&("slot"!==t.h||t.p===e.p),C=t=>t&&t["s-ol"]||t,P=t=>(t["s-ol"]?t["s-ol"]:t).parentNode,T=(t,e)=>{const l=e.v=t.v,n=t.$,o=e.$,s=e.s;let r;null===s?("slot"===e.h||R(t,e,!1),null!==n&&null!==o?((t,e,l,n)=>{let o,s=0,r=0,i=e.length-1,c=e[0],a=e[i],u=n.length-1,f=n[0],$=n[u];for(;s<=i&&r<=u;)null==c?c=e[++s]:null==a?a=e[--i]:null==f?f=n[++r]:null==$?$=n[--u]:O(c,f)?(T(c,f),c=e[++s],f=n[++r]):O(a,$)?(T(a,$),a=e[--i],$=n[--u]):O(c,$)?("slot"!==c.h&&"slot"!==$.h||x(c.v.parentNode,!1),T(c,$),t.insertBefore(c.v,a.v.nextSibling),c=e[++s],$=n[--u]):O(a,f)?("slot"!==c.h&&"slot"!==$.h||x(a.v.parentNode,!1),T(a,f),t.insertBefore(a.v,c.v),a=e[--i],f=n[++r]):(o=S(e&&e[r],l,r),f=n[++r],o&&P(c.v).insertBefore(o,C(c.v)));s>i?U(t,null==n[u+1]?null:n[u+1].v,l,n,r,u):r>u&&L(e,s,i)})(l,n,e,o):null!==o?(null!==t.s&&(l.textContent=""),U(l,null,e,o,0,o.length-1)):null!==n&&L(n,0,n.length-1)):(r=l["s-cr"])?r.parentNode.textContent=s:t.s!==s&&(l.data=s)},E=t=>{let e,l,n,o,s,r,i=t.childNodes;for(l=0,n=i.length;l<n;l++)if(e=i[l],1===e.nodeType){if(e["s-sr"])for(s=e["s-sn"],e.hidden=!1,o=0;o<n;o++)if(i[o]["s-hn"]!==e["s-hn"])if(r=i[o].nodeType,""!==s){if(1===r&&s===i[o].getAttribute("slot")){e.hidden=!0;break}}else if(1===r||3===r&&""!==i[o].textContent.trim()){e.hidden=!0;break}E(e)}},I=[],A=t=>{let e,l,o,s,r,i,c=0,a=t.childNodes,u=a.length;for(;c<u;c++){if(e=a[c],e["s-sr"]&&(l=e["s-cr"]))for(o=l.parentNode.childNodes,s=e["s-sn"],i=o.length-1;i>=0;i--)l=o[i],l["s-cn"]||l["s-nr"]||l["s-hn"]===e["s-hn"]||(F(l,s)?(r=I.find(t=>t.g===l),n=!0,l["s-sn"]=l["s-sn"]||s,r?r.j=e:I.push({j:e,g:l}),l["s-sr"]&&I.map(t=>{F(t.g,l["s-sn"])&&(r=I.find(t=>t.g===l),r&&!t.j&&(t.j=r.j))})):I.some(t=>t.g===l)||I.push({g:l}));1===e.nodeType&&A(e)}},F=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,H=(t,e)=>{e&&!t.k&&e["s-p"]&&e["s-p"].push(new Promise(e=>t.k=e))},N=(t,e)=>{if(t.t|=16,!(4&t.t))return H(t,t.M),pt(()=>W(t,e));t.t|=512},W=(t,e)=>{const l=t.R;return D(void 0,()=>q(t,l,e))},q=(s,r,i)=>{const c=s.S,f=c["s-rc"];i&&(t=>{const e=t.U;((t,e)=>{let l=m(e),n=it.get(l);if(t=11===t.nodeType?t:a,n)if("string"==typeof n){let e,o=d.get(t=t.head||t);o||d.set(t,o=new Set),o.has(l)||(t.host&&(e=t.querySelector(`[sty-id="${l}"]`))?e.innerHTML=n:(e=a.createElement("style"),e.innerHTML=n,t.insertBefore(e,t.querySelector("link"))),o&&o.add(l))}else t.adoptedStyleSheets.includes(n)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,n])})(t.S.getRootNode(),e)})(s),((s,r)=>{const i=s.S,c=s.U,f=s.L||b(null,null),$=(t=>t&&t.h===w)(r)?r:y(null,null,r);if(e=i.tagName,c.O&&($.u=$.u||{},c.O.map(([t,e])=>$.u[e]=i[t])),$.h=null,$.t|=4,s.L=$,$.v=f.v=i,t=i["s-cr"],l=0!=(1&c.t),n=!1,T(f,$),u.t|=1,o){let t,e,l,n,o,s;A($.v);let r=0;for(;r<I.length;r++)t=I[r],e=t.g,e["s-ol"]||(l=a.createTextNode(""),l["s-nr"]=e,e.parentNode.insertBefore(e["s-ol"]=l,e));for(r=0;r<I.length;r++)if(t=I[r],e=t.g,t.j){for(n=t.j.parentNode,o=t.j.nextSibling,l=e["s-ol"];l=l.previousSibling;)if(s=l["s-nr"],s&&s["s-sn"]===e["s-sn"]&&n===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&n!==e.parentNode||e.nextSibling!==o)&&e!==o&&(!e["s-hn"]&&e["s-ol"]&&(e["s-hn"]=e["s-ol"].parentNode.nodeName),n.insertBefore(e,o))}else 1===e.nodeType&&(e.hidden=!0)}n&&E($.v),u.t&=-2,I.length=0})(s,B(s,r)),f&&(f.map(t=>t()),c["s-rc"]=void 0);{const t=c["s-p"],e=()=>V(s);0===t.length?e():(Promise.all(t).then(e),s.t|=4,t.length=0)}},B=(t,e)=>{try{e=e.render(),t.t&=-17,t.t|=2}catch(l){ot(l)}return e},V=t=>{const e=t.S,l=t.M;64&t.t||(t.t|=64,G(e),t.C(e),l||z()),t.k&&(t.k(),t.k=void 0),512&t.t&&mt(()=>N(t,!1)),t.t&=-517},z=()=>{G(a.documentElement),u.t|=2,mt(()=>(t=>{const e=new CustomEvent("appload",{detail:{namespace:"bulmil"}});return t.dispatchEvent(e),e})(i))},D=(t,e)=>t&&t.then?t.then(e):e(),G=t=>t.classList.add("hydrated"),J=(t,e,l,n,o,s,r)=>{let i,c,a,u;if(1===s.nodeType){for(i=s.getAttribute("c-id"),i&&(c=i.split("."),c[0]!==r&&"0"!==c[0]||(a={t:0,P:c[0],T:c[1],I:c[2],A:c[3],h:s.tagName.toLowerCase(),v:s,u:null,$:null,_:null,p:null,s:null},e.push(a),s.removeAttribute("c-id"),t.$||(t.$=[]),t.$[a.A]=a,t=a,n&&"0"===a.I&&(n[a.A]=a.v))),u=s.childNodes.length-1;u>=0;u--)J(t,e,l,n,o,s.childNodes[u],r);if(s.shadowRoot)for(u=s.shadowRoot.childNodes.length-1;u>=0;u--)J(t,e,l,n,o,s.shadowRoot.childNodes[u],r)}else if(8===s.nodeType)c=s.nodeValue.split("."),c[1]!==r&&"0"!==c[1]||(i=c[0],a={t:0,P:c[1],T:c[2],I:c[3],A:c[4],v:s,u:null,$:null,_:null,p:null,h:null,s:null},"t"===i?(a.v=s.nextSibling,a.v&&3===a.v.nodeType&&(a.s=a.v.textContent,e.push(a),s.remove(),t.$||(t.$=[]),t.$[a.A]=a,n&&"0"===a.I&&(n[a.A]=a.v))):a.P===r&&("s"===i?(a.h="slot",s["s-sn"]=c[5]?a.p=c[5]:"",s["s-sr"]=!0,l.push(a),t.$||(t.$=[]),t.$[a.A]=a):"r"===i&&(o["s-cr"]=s,s["s-cn"]=!0)));else if(t&&"style"===t.h){const e=b(null,s.textContent);e.v=s,e.A="0",t.$=[e]}},K=(t,e)=>{if(1===t.nodeType){let l=0;for(;l<t.childNodes.length;l++)K(t.childNodes[l],e);if(t.shadowRoot)for(l=0;l<t.shadowRoot.childNodes.length;l++)K(t.shadowRoot.childNodes[l],e)}else if(8===t.nodeType){const l=t.nodeValue.split(".");"o"===l[0]&&(e.set(l[1]+"."+l[2],t),t.nodeValue="",t["s-en"]=l[3])}},Q=(t,e,l)=>{if(e.F){const n=Object.entries(e.F),o=t.prototype;if(n.map(([t,[n]])=>{(31&n||2&l&&32&n)&&Object.defineProperty(o,t,{get(){return((t,e)=>tt(this).H.get(e))(0,t)},set(l){((t,e,l,n)=>{const o=tt(this),s=o.H.get(e),r=o.t,i=o.R;l=((t,e)=>null==t||h(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(l,n.F[e][0]),8&r&&void 0!==s||l===s||(o.H.set(e,l),i&&2==(18&r)&&N(o,!1))})(0,t,l,e)},configurable:!0,enumerable:!0})}),1&l){const l=new Map;o.attributeChangedCallback=function(t,e,n){u.jmp(()=>{const e=l.get(t);this[e]=(null!==n||"boolean"!=typeof this[e])&&n})},t.observedAttributes=n.filter(([t,e])=>15&e[0]).map(([t,n])=>{const o=n[1]||t;return l.set(o,t),512&n[0]&&e.O.push([t,o]),o})}}return t},X=t=>{const e=t["s-cr"]=a.createComment("");e["s-cn"]=!0,t.insertBefore(e,t.firstChild)},Y=(t,e={})=>{const l=[],n=e.exclude||[],o=i.customElements,s=a.head,r=s.querySelector("meta[charset]"),c=a.createElement("style"),f=[];let d,p=!0;Object.assign(u,e),u.l=new URL(e.resourcesUrl||"./",a.baseURI).href,e.syncQueue&&(u.t|=4),u.t|=2,t.map(t=>t[1].map(e=>{const s={t:e[0],o:e[1],F:e[2],N:e[3]};s.F=e[2],s.O=[];const r=s.o,i=class extends HTMLElement{constructor(t){super(t),lt(t=this,s)}connectedCallback(){d&&(clearTimeout(d),d=null),p?f.push(this):u.jmp(()=>(t=>{if(0==(1&u.t)){const e=tt(t),l=e.U,n=()=>{};if(!(1&e.t)){let n;e.t|=1,n=t.getAttribute("s-id"),n&&((t,e,l,n)=>{const o=t.shadowRoot,s=[],r=n.L=b(e,null);u.W||K(a.body,u.W=new Map),t["s-id"]=l,t.removeAttribute("s-id"),J(r,s,[],null,t,t,l),s.map(t=>{const l=t.P+"."+t.T,n=u.W.get(l),s=t.v;n&&""===n["s-en"]&&n.parentNode.insertBefore(s,n.nextSibling),o||(s["s-hn"]=e,n&&(s["s-ol"]=n,s["s-ol"]["s-nr"]=s)),u.W.delete(l)})})(t,l.o,n,e),n||12&l.t&&X(t);{let l=t;for(;l=l.parentNode||l.host;)if(1===l.nodeType&&l.hasAttribute("s-id")&&l["s-p"]||l["s-p"]){H(e,e.M=l);break}}l.F&&Object.entries(l.F).map(([e,[l]])=>{if(31&l&&t.hasOwnProperty(e)){const l=t[e];delete t[e],t[e]=l}}),mt(()=>(async(t,e,l,n,o)=>{if(0==(32&e.t)){e.t|=32;{if((o=rt(l)).then){const t=()=>{};o=await o,t()}o.isProxied||(Q(o,l,2),o.isProxied=!0);const t=()=>{};e.t|=8;try{new o(e)}catch(i){ot(i)}e.t&=-9,t()}const t=m(l);if(!it.has(t)&&o.style){const e=()=>{};((t,e,l)=>{let n=it.get(t);$&&l?(n=n||new CSSStyleSheet,n.replace(e)):n=e,it.set(t,n)})(t,o.style,!!(1&l.t)),e()}}const s=e.M,r=()=>N(e,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(0,e,l))}n()}})(this))}disconnectedCallback(){u.jmp(()=>{})}forceUpdate(){(()=>{{const t=tt(this);t.S.isConnected&&2==(18&t.t)&&N(t,!1)}})()}componentOnReady(){return tt(this).q}};s.B=t[0],n.includes(r)||o.get(r)||(l.push(r),o.define(r,Q(i,s,1)))})),c.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",c.setAttribute("data-styles",""),s.insertBefore(c,r?r.nextSibling:s.firstChild),p=!1,f.length?f.map(t=>t.connectedCallback()):u.jmp(()=>d=setTimeout(z,30))},Z=new WeakMap,tt=t=>Z.get(t),et=(t,e)=>Z.set(e.R=t,e),lt=(t,e)=>{const l={t:0,S:t,U:e,H:new Map};return l.q=new Promise(t=>l.C=t),t["s-p"]=[],t["s-rc"]=[],Z.set(t,l)},nt=(t,e)=>e in t,ot=t=>console.error(t),st=new Map,rt=t=>{const e=t.o.replace(/-/g,"_"),l=t.B,n=st.get(l);return n?n[e]:__sc_import_bulmil(`./${l}.entry.js`).then(t=>(st.set(l,t),t[e]),ot)},it=new Map,ct=[],at=[],ut=[],ft=(t,e)=>l=>{t.push(l),r||(r=!0,e&&4&u.t?mt(dt):u.raf(dt))},$t=(t,e)=>{let l=0,n=0;for(;l<t.length&&(n=performance.now())<e;)try{t[l++](n)}catch(o){ot(o)}l===t.length?t.length=0:0!==l&&t.splice(0,l)},dt=()=>{s++,(t=>{for(let l=0;l<t.length;l++)try{t[l](performance.now())}catch(e){ot(e)}t.length=0})(ct);{const t=2==(6&u.t)?performance.now()+14*Math.ceil(.1*s):1/0;$t(at,t),$t(ut,t),at.length>0&&(ut.push(...at),at.length=0),(r=ct.length+at.length+ut.length>0)?u.raf(dt):s=0}},mt=t=>f().then(t),pt=ft(at,!0),ht=()=>c&&c.supports&&c.supports("color","var(--c)")?f():__sc_import_bulmil("./p-1b2d9a2e.js").then(()=>(u.V=i.__cssshim)?(!1).i():0),yt=()=>{u.V=i.__cssshim;const t=Array.from(a.querySelectorAll("script")).find(t=>/\/bulmil(\.esm)?\.js($|\?|#)/.test(t.src)||"bulmil"===t.getAttribute("data-stencil-namespace")),e=t["data-opts"]||{};return"onbeforeload"in t&&!history.scrollRestoration?{then(){}}:(e.resourcesUrl=new URL(".",new URL(t.getAttribute("data-resources-url")||t.src,i.location.href)).href,bt(e.resourcesUrl,t),i.customElements?f(e):__sc_import_bulmil("./p-2e1bb10c.js").then(()=>e))},bt=(t,e)=>{try{i.__sc_import_bulmil=Function("w","return import(w);//"+Math.random())}catch(l){const n=new Map;i.__sc_import_bulmil=l=>{const o=new URL(l,t).href;let s=n.get(o);if(!s){const t=a.createElement("script");t.type="module",t.crossOrigin=e.crossOrigin,t.src=URL.createObjectURL(new Blob([`import * as m from '${o}'; window.__sc_import_bulmil.m = m;`],{type:"application/javascript"})),s=new Promise(e=>{t.onload=()=>{e(i.__sc_import_bulmil.m),t.remove()}}),n.set(o,s),a.head.appendChild(t)}return s}}};export{w as H,ht as a,Y as b,y as h,yt as p,et as r}
\No newline at end of file