PageSourceSearch

https://www.libertyvi.com/8970.685e3f0e165397d8.js

js libertyvi.com collected 2026-09-26 09:25:22 UTC 11,876 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkubc_consumer_main=self.webpackChunkubc_consumer_main||[]).push([[8970],{38970:(x,C,g)=>{g.r(C),g.d(C,{ion_route:()=>D,ion_route_redirect:()=>h,ion_router:()=>tt,ion_router_link:()=>nt});var f=g(74523),d=g(96317),R=g(92486),_=g(8736),E=g(80333),L=g(12508);const D=class{constructor(t){(0,d.r)(this,t),this.ionRouteDataChanged=(0,d.c)(this,"ionRouteDataChanged",7),this.url="",this.component=void 0,this.componentProps=void 0,this.beforeLeave=void 0,this.beforeEnter=void 0}onUpdate(t){this.ionRouteDataChanged.emit(t)}onComponentProps(t,e){if(t===e)return;const n=t?Object.keys(t):[],r=e?Object.keys(e):[];if(n.length===r.length){for(const o of n)if(t[o]!==e[o])return void this.onUpdate(t)}else this.onUpdate(t)}connectedCallback(){this.ionRouteDataChanged.emit()}static get watchers(){return{url:["onUpdate"],component:["onUpdate"],componentProps:["onComponentProps"]}}},h=class{constructor(t){(0,d.r)(this,t),this.ionRouteRedirectChanged=(0,d.c)(this,"ionRouteRedirectChanged",7),this.from=void 0,this.to=void 0}propDidChange(){this.ionRouteRedirectChanged.emit()}connectedCallback(){this.ionRouteRedirectChanged.emit()}static get watchers(){return{from:["propDidChange"],to:["propDidChange"]}}},l="root",m="forward",b=t=>"/"+t.filter(n=>n.length>0).join("/"),p=t=>{let n,e=[""];if(null!=t){const r=t.indexOf("?");r>-1&&(n=t.substring(r+1),t=t.substring(0,r)),e=t.split("/").map(o=>o.trim()).filter(o=>o.length>0),0===e.length&&(e=[""])}return{segments:e,queryString:n}},A=function(){var t=(0,f.A)(function*(e,n,r,o,s=!1,i){try{const a=k(e);if(o>=n.length||!a)return s;yield new Promise(v=>(0,R.c)(a,v));const u=n[o],c=yield a.setRouteId(u.id,u.params,r,i);return c.changed&&(r=l,s=!0),s=yield A(c.element,n,r,o+1,s,i),c.markVisible&&(yield c.markVisible()),s}catch(a){return(0,_.d)("[ion-router] - Exception in writeNavState:",a),!1}});return function(n,r,o,s){return t.apply(this,arguments)}}(),F=function(){var t=(0,f.A)(function*(e){const n=[];let r,o=e;for(;r=k(o);){const s=yield r.getRouteId();if(!s)break;o=s.element,s.element=void 0,n.push(s)}return{ids:n,outlet:r}});return function(n){return t.apply(this,arguments)}}(),T=":not([no-router]) ion-nav, :not([no-router]) ion-tabs, :not([no-router]) ion-router-outlet",k=t=>{if(t)return t.matches(T)?t:t.querySelector(T)??void 0},U=(t,e)=>e.find(n=>((t,e)=>{const{from:n,to:r}=e;if(void 0===r||n.length>t.length)return!1;for(let o=0;o<n.length;o++){const s=n[o];if("*"===s)return!0;if(s!==t[o])return!1}return n.length===t.length})(t,n)),Q=(t,e)=>{const n=Math.min(t.length,e.length);let r=0;for(let o=0;o<n;o++){const s=t[o],i=e[o];if(s.id.toLowerCase()!==i.id)break;if(s.params){const a=Object.keys(s.params);if(a.length===i.segments.length){const u=a.map(c=>`:${c}`);for(let c=0;c<u.length&&u[c].toLowerCase()===i.segments[c];c++)r++}}r++}return r},X=(t,e)=>{const n=new q(t);let o,r=!1;for(let i=0;i<e.length;i++){const a=e[i].segments;if(""===a[0])r=!0;else{for(const u of a){const c=n.next();if(":"===u[0]){if(""===c)return null;o=o||[],(o[i]||(o[i]={}))[u.slice(1)]=c}else if(c!==u)return null}r=!1}}return r&&r!==(""===n.next())?null:o?e.map((i,a)=>({id:i.id,segments:i.segments,params:j(i.params,o[a]),beforeEnter:i.beforeEnter,beforeLeave:i.beforeLeave})):e},j=(t,e)=>t||e?Object.assign(Object.assign({},t),e):void 0,N=(t,e)=>{let n=null,r=0;for(const o of e){const s=X(t,o);if(null!==s){const i=Z(s);i>r&&(r=i,n=s)}}return n},Z=t=>{let e=1,n=1;for(const r of t)for(const o of r.segments)":"===o[0]?e+=Math.pow(1,n):""!==o&&(e+=Math.pow(2,n)),n++;return e};class q{constructor(e){this.segments=e.slice()}next(){return this.segments.length>0?this.segments.shift():""}}const w=(t,e)=>e in t?t[e]:t.hasAttribute(e)?t.getAttribute(e):null,O=t=>Array.from(t.children).filter(e=>"ION-ROUTE-REDIRECT"===e.tagName).map(e=>{const n=w(e,"to");return{from:p(w(e,"from")).segments,to:null==n?void 0:p(n)}}),P=t=>V(I(t)),I=t=>Array.from(t.children).filter(e=>"ION-ROUTE"===e.tagName&&e.component).map(e=>{const n=w(e,"component");return{segments:p(w(e,"url")).segments,id:n.toLowerCase(),params:e.componentProps,beforeLeave:e.beforeLeave,beforeEnter:e.beforeEnter,children:I(e)}}),V=t=>{const e=[];for(const n of t)M([],e,n);return e},M=(t,e,n)=>{if(t=[...t,{id:n.id,segments:n.segments,params:n.params,beforeLeave:n.beforeLeave,beforeEnter:n.beforeEnter}],0!==n.children.length)for(const r of n.children)M(t,e,r);else e.push(t)},tt=class{constructor(t){(0,d.r)(this,t),this.ionRouteWillChange=(0,d.c)(this,"ionRouteWillChange",7),this.ionRouteDidChange=(0,d.c)(this,"ionRouteDidChange",7),this.previousPath=null,this.busy=!1,this.state=0,this.lastState=0,this.root="/",this.useHash=!0}componentWillLoad(){var t=this;return(0,f.A)(function*(){yield k(document.body)?Promise.resolve():new Promise(t=>{window.addEventListener("ionNavWillLoad",()=>t(),{once:!0})});const e=yield t.runGuards(t.getSegments());if(!0!==e){if("object"==typeof e){const{redirect:n}=e,r=p(n);t.setSegments(r.segments,l,r.queryString),yield t.writeNavStateRoot(r.segments,l)}}else yield t.onRoutesChanged()})()}componentDidLoad(){window.addEventListener("ionRouteRedirectChanged",(0,R.p)(this.onRedirectChanged.bind(this),10)),window.addEventListener("ionRouteDataChanged",(0,R.p)(this.onRoutesChanged.bind(this),100))}onPopState(){var t=this;return(0,f.A)(function*(){const e=t.historyDirection();let n=t.getSegments();const r=yield t.runGuards(n);if(!0!==r){if("object"!=typeof r)return!1;n=p(r.redirect).segments}return t.writeNavStateRoot(n,e)})()}onBackButton(t){t.detail.register(0,e=>{this.back(),e()})}canTransition(){var t=this;return(0,f.A)(function*(){const e=yield t.runGuards();return!0===e||"object"==typeof e&&e.redirect})()}push(t,e="forward",n){var r=this;return(0,f.A)(function*(){var o;if(t.startsWith(".")){const a=null!==(o=r.previousPath)&&void 0!==o?o:"/",u=new URL(t,`https://host/${a}`);t=u.pathname+u.search}let s=p(t);const i=yield r.runGuards(s.segments);if(!0!==i){if("object"!=typeof i)return!1;s=p(i.redirect)}return r.setSegments(s.segments,e,s.queryString),r.writeNavStateRoot(s.segments,e,n)})()}back(){return window.history.back(),Promise.resolve(this.waitPromise)}printDebug(){var t=this;return(0,f.A)(function*(){(t=>{console.group(`[ion-core] ROUTES[${t.length}]`);for(const e of t){const n=[];e.forEach(o=>n.push(...o.segments));const r=e.map(o=>o.id);console.debug(`%c ${b(n)}`,"font-weight: bold; padding-left: 20px","=>\t",`(${r.join(", ")})`)}console.groupEnd()})(P(t.el)),(t=>{console.group(`[ion-core] REDIRECTS[${t.length}]`);for(const e of t)e.to&&console.debug("FROM: ",`$c ${b(e.from)}`,"font-weight: bold"," TO: ",`$c ${b(e.to.segments)}`,"font-weight: bold");console.groupEnd()})(O(t.el))})()}navChanged(t){var e=this;
1return(0,f.A)(function*(){if(e.busy)return(0,_.p)("[ion-router] - Router is busy, navChanged was cancelled."),!1;const{ids:n,outlet:r}=yield F(window.document.body),s=((t,e)=>{let n=null,r=0;for(const o of e){const s=Q(t,o);s>r&&(n=o,r=s)}return n?n.map((o,s)=>{var i;return{id:o.id,segments:o.segments,params:j(o.params,null===(i=t[s])||void 0===i?void 0:i.params)}}):null})(n,P(e.el));if(!s)return(0,_.p)("[ion-router] - No matching URL for",n.map(a=>a.id)),!1;const i=(t=>{const e=[];for(const n of t)for(const r of n.segments)if(":"===r[0]){const o=n.params&&n.params[r.slice(1)];if(!o)return null;e.push(o)}else""!==r&&e.push(r);return e})(s);return i?(e.setSegments(i,t),yield e.safeWriteNavState(r,s,l,i,null,n.length),!0):((0,_.p)("[ion-router] - Router could not match path because some required param is missing."),!1)})()}onRedirectChanged(){const t=this.getSegments();t&&U(t,O(this.el))&&this.writeNavStateRoot(t,l)}onRoutesChanged(){return this.writeNavStateRoot(this.getSegments(),l)}historyDirection(){var t;const e=window;null===e.history.state&&(this.state++,e.history.replaceState(this.state,e.document.title,null===(t=e.document.location)||void 0===t?void 0:t.href));const n=e.history.state,r=this.lastState;return this.lastState=n,n>r||n>=r&&r>0?m:n<r?"back":l}writeNavStateRoot(t,e,n){var r=this;return(0,f.A)(function*(){if(!t)return(0,_.d)("[ion-router] - URL is not part of the routing set."),!1;const o=O(r.el),s=U(t,o);let i=null;if(s){const{segments:c,queryString:v}=s.to;r.setSegments(c,e,v),i=s.from,t=c}const a=P(r.el),u=N(t,a);return u?r.safeWriteNavState(document.body,u,e,t,i,0,n):((0,_.d)("[ion-router] - The path does not match any route."),!1)})()}safeWriteNavState(t,e,n,r,o,s=0,i){var a=this;return(0,f.A)(function*(){const u=yield a.lock();let c=!1;try{c=yield a.writeNavState(t,e,n,r,o,s,i)}catch(v){(0,_.d)("[ion-router] - Exception in safeWriteNavState:",v)}return u(),c})()}lock(){var t=this;return(0,f.A)(function*(){const e=t.waitPromise;let n;return t.waitPromise=new Promise(r=>n=r),void 0!==e&&(yield e),n})()}runGuards(t=this.getSegments(),e){var n=this;return(0,f.A)(function*(){if(void 0===e&&(e=p(n.previousPath).segments),!t||!e)return!0;const r=P(n.el),o=N(e,r),s=o&&o[o.length-1].beforeLeave,i=!s||(yield s());if(!1===i||"object"==typeof i)return i;const a=N(t,r),u=a&&a[a.length-1].beforeEnter;return!u||u()})()}writeNavState(t,e,n,r,o,s=0,i){var a=this;
1return(0,f.A)(function*(){if(a.busy)return(0,_.p)("[ion-router] - Router is busy, transition was cancelled."),!1;a.busy=!0;const u=a.routeChangeEvent(r,o);u&&a.ionRouteWillChange.emit(u);const c=yield A(t,e,n,s,!1,i);return a.busy=!1,u&&a.ionRouteDidChange.emit(u),c})()}setSegments(t,e,n){this.state++,((t,e,n,r,o,s,i)=>{const a=((t,e,n)=>{let r=b(t);return e&&(r="#"+r),void 0!==n&&(r+="?"+n),r})([...p(e).segments,...r],n,i);o===m?t.pushState(s,"",a):t.replaceState(s,"",a)})(window.history,this.root,this.useHash,t,e,this.state,n)}getSegments(){return((t,e,n)=>{const r=p(this.root).segments,o=n?t.hash.slice(1):t.pathname;return((t,e)=>{if(t.length>e.length)return null;if(t.length<=1&&""===t[0])return e;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return null;return e.length===t.length?[""]:e.slice(t.length)})(r,p(o).segments)})(window.location,0,this.useHash)}routeChangeEvent(t,e){const n=this.previousPath,r=b(t);return this.previousPath=r,r===n?null:{from:n,redirectedFrom:e?b(e):null,to:r}}get el(){return(0,d.f)(this)}},nt=(()=>{let t=class{constructor(e){(0,d.r)(this,e),this.onClick=n=>{(0,E.o)(this.href,n,this.routerDirection,this.routerAnimation)},this.color=void 0,this.href=void 0,this.rel=void 0,this.routerDirection="forward",this.routerAnimation=void 0,this.target=void 0}render(){const e=(0,L.b)(this),n={href:this.href,rel:this.rel,target:this.target};return(0,d.h)(d.e,{key:"11183264fb6ae0db9a7a47c71b6862d60001b834",onClick:this.onClick,class:(0,E.c)(this.color,{[e]:!0,"ion-activatable":!0})},(0,d.h)("a",Object.assign({key:"3e0e5242161cb0df593d6d573e51b8ba750065a1"},n),(0,d.h)("slot",{key:"5bd808e98a4627bb1236f0d955f4b32971355417"})))}};return t.style=":host{--background:transparent;--color:var(--ion-color-primary, #0054e9);background:var(--background);color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}a{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit}",t})()},80333:(x,C,g)=>{g.d(C,{c:()=>R,g:()=>E,h:()=>d,o:()=>D});var f=g(74523);const d=(h,l)=>null!==l.closest(h),R=(h,l)=>"string"==typeof h&&h.length>0?Object.assign({"ion-color":!0,[`ion-color-${h}`]:!0},l):l,E=h=>{const l={};return(h=>void 0!==h?(Array.isArray(h)?h:h.split(" ")).filter(m=>null!=m).map(m=>m.trim()).filter(m=>""!==m):[])(h).forEach(m=>l[m]=!0),l},L=/^[a-z][a-z0-9+\-.]*:/,D=function(){var h=(0,f.A)(function*(l,m,S,b){if(null!=l&&"#"!==l[0]&&!L.test(l)){const y=document.querySelector("ion-router");if(y)return m?.preventDefault(),y.push(l,S,b)}return!1});return function(m,S,b,y){return h.apply(this,arguments)}}()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.