diff --git a/CHANGELOG.md b/CHANGELOG.md index 51a023d..65a0aba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Svelte Router changelog +## 1.0.12 +- Fixed package.json imports. Now saving as dev-dependencies non production packages. +- Removed date-fns as production package - not using removeExpiredKeys and addExpiredKeys +- Remove @rollup/plugin-replace as production package + ## 1.0.11 - (Component Not Defined Mandatory) - Now only throws an error when is going to load the component - Added route option forceReload diff --git a/docs/build/bundle.css b/docs/build/bundle.css index 01ff999..e01c0c3 100644 --- a/docs/build/bundle.css +++ b/docs/build/bundle.css @@ -1 +1 @@ -.scr-main-layout.svelte-lxpf7t{display:grid;grid-template-columns:1fr;justify-content:center;align-content:center;width:100%;min-height:1vh}.scr-header.svelte-lxpf7t{-webkit-box-shadow:0 5px 15px rgb(0 0 0 / 8%);-moz-box-shadow:0 5px 15px rgb(0 0 0 / 8%);box-shadow:0 5px 15px rgb(0 0 0 / 8%);border-radius:0.5rem;padding:1rem 0;background-color:#ff400013}.scr-main-layout__header.svelte-lxpf7t{text-align:center;color:#ff3e00;margin:0 auto;padding:0}.scr-main.svelte-lxpf7t{display:grid;grid-template-columns:3fr 10fr;padding:0.5rem;overflow-y:hidden;margin:0.5rem auto;justify-content:center;align-content:center;width:100%;column-gap:0.5rem}.scr-pages.svelte-lxpf7t{-webkit-box-shadow:0 5px 15px rgb(0 0 0 / 8%);-moz-box-shadow:0 5px 15px rgb(0 0 0 / 8%);box-shadow:0 5px 15px rgb(0 0 0 / 8%);padding:0 0.5rem;border-radius:0.5rem;border:1px solid rgba(255, 68, 0, 0.164)}.scr-footer.svelte-lxpf7t{display:grid;grid-template-columns:3fr 7fr;padding:0.5rem;overflow-y:hidden;margin:0.5rem auto;justify-content:center;align-content:center;width:100%;min-height:10vh;border-radius:0.5rem;text-align:center;background-color:#ff400013}@media only screen and (max-width: 600px){.scr-main.svelte-lxpf7t{grid-template-columns:1fr}}.scr-li.svelte-1kf261k{position:relative;text-transform:capitalize}.scr-menu.svelte-1gz3q5m{display:grid;grid-template-columns:1fr;justify-content:center;align-content:start;width:100%;min-height:85vh;border-radius:0.5rem;-webkit-box-shadow:0 5px 15px rgb(0 0 0 / 8%);-moz-box-shadow:0 5px 15px rgb(0 0 0 / 8%);box-shadow:0 5px 15px rgb(0 0 0 / 8%);padding:0.5rem;border:1px solid rgba(255, 68, 0, 0.164);min-width:15rem}.scr-menu-h4.svelte-1gz3q5m{margin:0.5rem 0;padding-left:1rem;color:#d43900}.scr-menu-item.svelte-1gz3q5m{display:grid;grid-template-columns:1fr;justify-content:left;align-content:center;width:100%;padding:0.5rem;background-color:#ff440009;border-radius:0.5rem;transition:all linear 0.2s;text-align:center;color:#a82d00;margin-bottom:0.5rem}.scr-menu-item.svelte-1gz3q5m:hover{background-color:#ff440018;cursor:pointer;font-weight:bolder;color:#d43900}.scr-footer.svelte-rxr6jj{margin:0 0.5rem}.scr-p.svelte-zj7cmj{color:#ff3e00;text-transform:uppercase;font-size:4rem;font-weight:100}.scr-p-small.svelte-zj7cmj{color:#ff3e00;text-transform:uppercase;font-size:2rem;font-weight:100}.scr-center.svelte-146mxqr.svelte-146mxqr{position:relative;height:100vh;display:grid;grid-template-columns:1fr;justify-content:center;align-content:center;text-align:center}.scr-h1.svelte-146mxqr.svelte-146mxqr{color:#579c34;animation:svelte-146mxqr-loading-text 1.5s linear infinite}.scr-lds-spinner.svelte-146mxqr.svelte-146mxqr{color:official;display:inline-block;position:relative;width:80px;height:80px;margin:0 auto}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr{transform-origin:40px 40px;animation:svelte-146mxqr-lds-spinner 1.2s linear infinite}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:after{content:" ";display:block;position:absolute;top:3px;left:37px;width:6px;height:18px;border-radius:20%;background:#579c34}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(1){transform:rotate(0deg);animation-delay:-1.1s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(3){transform:rotate(60deg);animation-delay:-0.9s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(4){transform:rotate(90deg);animation-delay:-0.8s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(5){transform:rotate(120deg);animation-delay:-0.7s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(6){transform:rotate(150deg);animation-delay:-0.6s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(7){transform:rotate(180deg);animation-delay:-0.5s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(8){transform:rotate(210deg);animation-delay:-0.4s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(9){transform:rotate(240deg);animation-delay:-0.3s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(10){transform:rotate(270deg);animation-delay:-0.2s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(11){transform:rotate(300deg);animation-delay:-0.1s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes svelte-146mxqr-lds-spinner{0%{opacity:1}100%{opacity:0}}@keyframes svelte-146mxqr-loading-text{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.scr-p.svelte-jhjhwz{color:#ff0000;text-transform:uppercase;font-size:4rem;font-weight:100}.scr-p-small.svelte-jhjhwz{color:#ff0000;text-transform:uppercase;font-size:2rem;font-weight:100}.scr-main-layout.svelte-1brx1pu{display:grid;grid-template-columns:1fr;justify-content:center;align-content:center;margin:1rem 0;padding:1rem 0;width:100%;min-height:1vh}.scr-main-layout__header.svelte-1brx1pu{text-align:center;color:#ff3e00;border-bottom:1px solid #000;padding:1rem 0} \ No newline at end of file +.scr-main-layout.svelte-lxpf7t{display:grid;grid-template-columns:1fr;justify-content:center;align-content:center;width:100%;min-height:1vh}.scr-header.svelte-lxpf7t{-webkit-box-shadow:0 5px 15px rgb(0 0 0 / 8%);-moz-box-shadow:0 5px 15px rgb(0 0 0 / 8%);box-shadow:0 5px 15px rgb(0 0 0 / 8%);border-radius:0.5rem;padding:1rem 0;background-color:#ff400013}.scr-main-layout__header.svelte-lxpf7t{text-align:center;color:#ff3e00;margin:0 auto;padding:0}.scr-main.svelte-lxpf7t{display:grid;grid-template-columns:3fr 10fr;padding:0.5rem;overflow-y:hidden;margin:0.5rem auto;justify-content:center;align-content:center;width:100%;column-gap:0.5rem}.scr-pages.svelte-lxpf7t{-webkit-box-shadow:0 5px 15px rgb(0 0 0 / 8%);-moz-box-shadow:0 5px 15px rgb(0 0 0 / 8%);box-shadow:0 5px 15px rgb(0 0 0 / 8%);padding:0 0.5rem;border-radius:0.5rem;border:1px solid rgba(255, 68, 0, 0.164)}.scr-footer.svelte-lxpf7t{display:grid;grid-template-columns:3fr 7fr;padding:0.5rem;overflow-y:hidden;margin:0.5rem auto;justify-content:center;align-content:center;width:100%;min-height:10vh;border-radius:0.5rem;text-align:center;background-color:#ff400013}@media only screen and (max-width: 600px){.scr-main.svelte-lxpf7t{grid-template-columns:1fr}}.scr-li.svelte-1kf261k{position:relative;text-transform:capitalize}.scr-menu.svelte-1gz3q5m{display:grid;grid-template-columns:1fr;justify-content:center;align-content:start;width:100%;min-height:85vh;border-radius:0.5rem;-webkit-box-shadow:0 5px 15px rgb(0 0 0 / 8%);-moz-box-shadow:0 5px 15px rgb(0 0 0 / 8%);box-shadow:0 5px 15px rgb(0 0 0 / 8%);padding:0.5rem;border:1px solid rgba(255, 68, 0, 0.164);min-width:15rem}.scr-menu-h4.svelte-1gz3q5m{margin:0.5rem 0;padding-left:1rem;color:#d43900}.scr-menu-item.svelte-1gz3q5m{display:grid;grid-template-columns:1fr;justify-content:left;align-content:center;width:100%;padding:0.5rem;background-color:#ff440009;border-radius:0.5rem;transition:all linear 0.2s;text-align:center;color:#a82d00;margin-bottom:0.5rem}.scr-menu-item.svelte-1gz3q5m:hover{background-color:#ff440018;cursor:pointer;font-weight:bolder;color:#d43900}.scr-footer.svelte-rxr6jj{margin:0 0.5rem}.scr-p.svelte-jhjhwz{color:#ff0000;text-transform:uppercase;font-size:4rem;font-weight:100}.scr-p-small.svelte-jhjhwz{color:#ff0000;text-transform:uppercase;font-size:2rem;font-weight:100}.scr-center.svelte-146mxqr.svelte-146mxqr{position:relative;height:100vh;display:grid;grid-template-columns:1fr;justify-content:center;align-content:center;text-align:center}.scr-h1.svelte-146mxqr.svelte-146mxqr{color:#579c34;animation:svelte-146mxqr-loading-text 1.5s linear infinite}.scr-lds-spinner.svelte-146mxqr.svelte-146mxqr{color:official;display:inline-block;position:relative;width:80px;height:80px;margin:0 auto}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr{transform-origin:40px 40px;animation:svelte-146mxqr-lds-spinner 1.2s linear infinite}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:after{content:" ";display:block;position:absolute;top:3px;left:37px;width:6px;height:18px;border-radius:20%;background:#579c34}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(1){transform:rotate(0deg);animation-delay:-1.1s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(3){transform:rotate(60deg);animation-delay:-0.9s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(4){transform:rotate(90deg);animation-delay:-0.8s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(5){transform:rotate(120deg);animation-delay:-0.7s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(6){transform:rotate(150deg);animation-delay:-0.6s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(7){transform:rotate(180deg);animation-delay:-0.5s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(8){transform:rotate(210deg);animation-delay:-0.4s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(9){transform:rotate(240deg);animation-delay:-0.3s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(10){transform:rotate(270deg);animation-delay:-0.2s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(11){transform:rotate(300deg);animation-delay:-0.1s}.scr-lds-spinner.svelte-146mxqr div.svelte-146mxqr:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes svelte-146mxqr-lds-spinner{0%{opacity:1}100%{opacity:0}}@keyframes svelte-146mxqr-loading-text{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.scr-p.svelte-zj7cmj{color:#ff3e00;text-transform:uppercase;font-size:4rem;font-weight:100}.scr-p-small.svelte-zj7cmj{color:#ff3e00;text-transform:uppercase;font-size:2rem;font-weight:100}.scr-main-layout.svelte-1brx1pu{display:grid;grid-template-columns:1fr;justify-content:center;align-content:center;margin:1rem 0;padding:1rem 0;width:100%;min-height:1vh}.scr-main-layout__header.svelte-1brx1pu{text-align:center;color:#ff3e00;border-bottom:1px solid #000;padding:1rem 0} \ No newline at end of file diff --git a/docs/build/bundle.js b/docs/build/bundle.js index 660c805..1225dc8 100644 --- a/docs/build/bundle.js +++ b/docs/build/bundle.js @@ -1,8 +1,8 @@ -var app=function(){"use strict";function t(){}const e=t=>t;function n(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function r(){return Object.create(null)}function s(t){t.forEach(o)}function a(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(e,n,o){e.$$.on_destroy.push(function(e,...n){if(null==e)return t;const o=e.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}(n,o))}function c(t,e,n,o){if(t){const r=u(t,e,n,o);return t[0](r)}}function u(t,e,o,r){return t[1]&&r?n(o.ctx.slice(),t[1](r(e))):o.ctx}function f(t,e,n,o,r,s,a){const i=function(t,e,n,o){if(t[2]&&o){const r=t[2](o(n));if(void 0===e.dirty)return r;if("object"==typeof r){const t=[],n=Math.max(e.dirty.length,r.length);for(let o=0;owindow.performance.now():()=>Date.now(),m=p?t=>requestAnimationFrame(t):t;const d=new Set;function b(t){d.forEach((e=>{e.c(t)||(d.delete(e),e.f())})),0!==d.size&&m(b)}function g(t){let e;return 0===d.size&&m(b),{promise:new Promise((n=>{d.add(e={c:t,f:n})})),abort(){d.delete(e)}}}function v(t,e){t.appendChild(e)}function y(t,e,n){t.insertBefore(e,n||null)}function $(t){t.parentNode.removeChild(t)}function R(t){return document.createElement(t)}function C(t){return document.createTextNode(t)}function x(){return C(" ")}function w(){return C("")}function _(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function S(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function T(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const o in e)null==e[o]?t.removeAttribute(o):"style"===o?t.style.cssText=e[o]:"__value"===o?t.value=t[o]=e[o]:n[o]&&n[o].set?t[o]=e[o]:S(t,o,e[o])}function E(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function O(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}const j=new Set;let L,q=0;function N(t,e,n,o,r,s,a,i=0){const l=16.666/o;let c="{\n";for(let t=0;t<=1;t+=l){const o=e+(n-e)*s(t);c+=100*t+`%{${a(o,1-o)}}\n`}const u=c+`100% {${a(n,1-n)}}\n}`,f=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${i}`,p=t.ownerDocument;j.add(p);const h=p.__svelte_stylesheet||(p.__svelte_stylesheet=p.head.appendChild(R("style")).sheet),m=p.__svelte_rules||(p.__svelte_rules={});m[f]||(m[f]=!0,h.insertRule(`@keyframes ${f} ${u}`,h.cssRules.length));const d=t.style.animation||"";return t.style.animation=`${d?`${d}, `:""}${f} ${o}ms linear ${r}ms 1 both`,q+=1,f}function I(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-o.length;r&&(t.style.animation=o.join(", "),q-=r,q||m((()=>{q||(j.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),j.clear())})))}function P(t){L=t}function F(){if(!L)throw new Error("Function called outside component initialization");return L}const M=[],A=[],B=[],k=[],H=Promise.resolve();let z=!1;function D(t){B.push(t)}let U=!1;const G=new Set;function W(){if(!U){U=!0;do{for(let t=0;t{V=null}))),V}function J(t,e,n){t.dispatchEvent(function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(`${e?"intro":"outro"}${n}`))}const X=new Set;let Q;function Z(){Q={r:0,c:[],p:Q}}function tt(){Q.r||s(Q.c),Q=Q.p}function et(t,e){t&&t.i&&(X.delete(t),t.i(e))}function nt(t,e,n,o){if(t&&t.o){if(X.has(t))return;X.add(t),Q.c.push((()=>{X.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const ot={duration:0};function rt(t,e){const n=e.token={};function o(t,o,r,s){if(e.token!==n)return;e.resolved=s;let a=e.ctx;void 0!==r&&(a=a.slice(),a[r]=s);const i=t&&(e.current=t)(a);let l=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(Z(),nt(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),tt())})):e.block.d(1),i.c(),et(i,1),i.m(e.mount(),e.anchor),l=!0),e.block=i,e.blocks&&(e.blocks[o]=i),l&&W()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=F();if(t.then((t=>{P(n),o(e.then,1,e.value,t),P(null)}),(t=>{if(P(n),o(e.catch,2,e.error,t),P(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var r}function st(t,e){const n={},o={},r={$$scope:1};let s=t.length;for(;s--;){const a=t[s],i=e[s];if(i){for(const t in a)t in i||(o[t]=1);for(const t in i)r[t]||(n[t]=i[t],r[t]=1);t[s]=i}else for(const t in a)r[t]=1}for(const t in o)t in n||(n[t]=void 0);return n}function at(t){return"object"==typeof t&&null!==t?t:{}}function it(t){t&&t.c()}function lt(t,e,n,r){const{fragment:i,on_mount:l,on_destroy:c,after_update:u}=t.$$;i&&i.m(e,n),r||D((()=>{const e=l.map(o).filter(a);c?c.push(...e):s(e),t.$$.on_mount=[]})),u.forEach(D)}function ct(t,e){const n=t.$$;null!==n.fragment&&(s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ut(t,e){-1===t.$$.dirty[0]&&(M.push(t),z||(z=!0,H.then(W)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const r=o.length?o[0]:n;return f.ctx&&i(f.ctx[t],f.ctx[t]=r)&&(!f.skip_bound&&f.bound[t]&&f.bound[t](r),p&&ut(e,t)),n})):[],f.update(),p=!0,s(f.before_update),f.fragment=!!a&&a(f.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);f.fragment&&f.fragment.l(t),t.forEach($)}else f.fragment&&f.fragment.c();n.intro&&et(e.$$.fragment),lt(e,n.target,n.anchor,n.customElement),W()}P(u)}class pt{$destroy(){ct(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}var ht=function(){this.__data__=[],this.size=0};var mt=function(t,e){return t===e||t!=t&&e!=e};var dt=function(t,e){for(var n=t.length;n--;)if(mt(t[n][0],e))return n;return-1},bt=Array.prototype.splice;var gt=function(t){var e=this.__data__,n=dt(e,t);return!(n<0)&&(n==e.length-1?e.pop():bt.call(e,n,1),--this.size,!0)};var vt=function(t){var e=this.__data__,n=dt(e,t);return n<0?void 0:e[n][1]};var yt=function(t){return dt(this.__data__,t)>-1};var $t=function(t,e){var n=this.__data__,o=dt(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this};function Rt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991},Ve={};Ve["[object Float32Array]"]=Ve["[object Float64Array]"]=Ve["[object Int8Array]"]=Ve["[object Int16Array]"]=Ve["[object Int32Array]"]=Ve["[object Uint8Array]"]=Ve["[object Uint8ClampedArray]"]=Ve["[object Uint16Array]"]=Ve["[object Uint32Array]"]=!0,Ve["[object Arguments]"]=Ve["[object Array]"]=Ve["[object ArrayBuffer]"]=Ve["[object Boolean]"]=Ve["[object DataView]"]=Ve["[object Date]"]=Ve["[object Error]"]=Ve["[object Function]"]=Ve["[object Map]"]=Ve["[object Number]"]=Ve["[object Object]"]=Ve["[object RegExp]"]=Ve["[object Set]"]=Ve["[object String]"]=Ve["[object WeakMap]"]=!1;var Ke=function(t){return Fe(t)&&Ye(t.length)&&!!Ve[zt(t)]};var Je=function(t){return function(e){return t(e)}},Xe=Et((function(t,e){var n=e&&!e.nodeType&&e,o=n&&t&&!t.nodeType&&t,r=o&&o.exports===n&&jt.process,s=function(){try{var t=o&&o.require&&o.require("util").types;return t||r&&r.binding&&r.binding("util")}catch(t){}}();t.exports=s})),Qe=Xe&&Xe.isTypedArray,Ze=Qe?Je(Qe):Ke,tn=Object.prototype.hasOwnProperty;var en=function(t,e){var n=ze(t),o=!n&&He(t),r=!n&&!o&&Ue(t),s=!n&&!o&&!r&&Ze(t),a=n||o||r||s,i=a?Pe(t.length,String):[],l=i.length;for(var c in t)!e&&!tn.call(t,c)||a&&("length"==c||r&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||We(c,l))||i.push(c);return i},nn=Object.prototype;var on=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||nn)};var rn=function(t,e){return function(n){return t(e(n))}},sn=rn(Object.keys,Object),an=Object.prototype.hasOwnProperty;var ln=function(t){if(!on(t))return sn(t);var e=[];for(var n in Object(t))an.call(t,n)&&"constructor"!=n&&e.push(n);return e};var cn=function(t){return null!=t&&Ye(t.length)&&!Gt(t)};var un=function(t){return cn(t)?en(t):ln(t)};var fn=function(t,e){return t&&Ie(e,un(e),t)};var pn=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},hn=Object.prototype.hasOwnProperty;var mn=function(t){if(!Dt(t))return pn(t);var e=on(t),n=[];for(var o in t)("constructor"!=o||!e&&hn.call(t,o))&&n.push(o);return n};var dn=function(t){return cn(t)?en(t,!0):mn(t)};var bn=function(t,e){return t&&Ie(e,dn(e),t)},gn=Et((function(t,e){var n=e&&!e.nodeType&&e,o=n&&t&&!t.nodeType&&t,r=o&&o.exports===n?qt.Buffer:void 0,s=r?r.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,o=s?s(n):new t.constructor(n);return t.copy(o),o}}));var vn=function(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++nObject.assign(Ro(t),Ro(e)),xo=(t,e)=>wo(t)[e],wo=t=>{let e;return t.subscribe((t=>{e=Array.isArray(t)?[...t]:Co({},t)}))(),e},_o=(t,e)=>{t.update((t=>Co(t,e)))};function So(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function To(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function Eo(t){To(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function Oo(t,e){To(2,arguments);var n=Eo(t).getTime(),o=So(e);return new Date(n+o)}function jo(t,e){To(2,arguments);var n=Eo(t),o=Eo(e);return n.getTime(){if(null==t||""===t.trim())return!1;null!=e?(Po(),n&&Number.isSafeInteger(n)&&Number.isInteger(n)&&n>0&&function(t,e){if(!Number.isInteger(e)||!Number.isSafeInteger(e))throw new Error("Time to add an expire key is not a safe integer");let n=Ao(Lo.getItem(qo));const o=Oo(new Date,e);null!=n?(n=n.filter((e=>e.key!==t)),n.push({key:t,liveUntil:o})):n=[{key:t,liveUntil:o}];Lo.setItem(qo,Mo(n))}(t,n),Lo.setItem(t,Mo(e))):Io([t])},Io=t=>{if(!Array.isArray(t)||0===t.length)return;t.map((t=>{Lo.getItem(t)&&(Lo.removeItem(t),function(t,e=!0){let n=Ao(Lo.getItem(qo));if(null==n)return;n=n.filter((e=>e.key!==t)),n.length>0?Lo.setItem(qo,Mo(n)):Lo.removeItem(qo);!e&&Lo.getItem(t)&&Lo.removeItem(t)}(t))}));let e=Ao(Lo.getItem(qo));null!=e&&(e=e.filter((e=>!t.includes(e.key))),e.length>0?Lo.setItem(qo,Mo(e)):Lo.removeItem(qo))},Po=()=>{let t=[],e=Ao(Lo.getItem(qo));return e&&e.length>0&&(e=e.filter((e=>{if(jo(new Date,new Date(e.liveUntil))&&Lo.getItem(e.key))return!0;Lo.removeItem(e.key),t.push(e.key)})),e.length>0?Lo.setItem(qo,Mo(e)):Lo.removeItem(qo)),t},Fo=(t,e)=>{const n=(t=>(Po(),Ao(Lo.getItem(t))))(e);n&&t((()=>Object.assign({},Ro(n))))};function Mo(t){return"object"==typeof t?JSON.stringify(t):t}function Ao(t){if(!t)return t;try{return JSON.parse(t)}catch(e){return t}} +var app=function(){"use strict";function t(){}const e=t=>t;function n(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function r(){return Object.create(null)}function s(t){t.forEach(o)}function a(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(e,n,o){e.$$.on_destroy.push(function(e,...n){if(null==e)return t;const o=e.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}(n,o))}function c(t,e,n,o){if(t){const r=u(t,e,n,o);return t[0](r)}}function u(t,e,o,r){return t[1]&&r?n(o.ctx.slice(),t[1](r(e))):o.ctx}function f(t,e,n,o,r,s,a){const i=function(t,e,n,o){if(t[2]&&o){const r=t[2](o(n));if(void 0===e.dirty)return r;if("object"==typeof r){const t=[],n=Math.max(e.dirty.length,r.length);for(let o=0;owindow.performance.now():()=>Date.now(),m=p?t=>requestAnimationFrame(t):t;const d=new Set;function b(t){d.forEach((e=>{e.c(t)||(d.delete(e),e.f())})),0!==d.size&&m(b)}function g(t){let e;return 0===d.size&&m(b),{promise:new Promise((n=>{d.add(e={c:t,f:n})})),abort(){d.delete(e)}}}function v(t,e){t.appendChild(e)}function y(t,e,n){t.insertBefore(e,n||null)}function $(t){t.parentNode.removeChild(t)}function R(t){return document.createElement(t)}function C(t){return document.createTextNode(t)}function x(){return C(" ")}function _(){return C("")}function w(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function S(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function T(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const o in e)null==e[o]?t.removeAttribute(o):"style"===o?t.style.cssText=e[o]:"__value"===o?t.value=t[o]=e[o]:n[o]&&n[o].set?t[o]=e[o]:S(t,o,e[o])}function E(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function O(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}const j=new Set;let L,q=0;function N(t,e,n,o,r,s,a,i=0){const l=16.666/o;let c="{\n";for(let t=0;t<=1;t+=l){const o=e+(n-e)*s(t);c+=100*t+`%{${a(o,1-o)}}\n`}const u=c+`100% {${a(n,1-n)}}\n}`,f=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${i}`,p=t.ownerDocument;j.add(p);const h=p.__svelte_stylesheet||(p.__svelte_stylesheet=p.head.appendChild(R("style")).sheet),m=p.__svelte_rules||(p.__svelte_rules={});m[f]||(m[f]=!0,h.insertRule(`@keyframes ${f} ${u}`,h.cssRules.length));const d=t.style.animation||"";return t.style.animation=`${d?`${d}, `:""}${f} ${o}ms linear ${r}ms 1 both`,q+=1,f}function I(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-o.length;r&&(t.style.animation=o.join(", "),q-=r,q||m((()=>{q||(j.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),j.clear())})))}function P(t){L=t}function F(){if(!L)throw new Error("Function called outside component initialization");return L}const M=[],A=[],B=[],k=[],H=Promise.resolve();let z=!1;function D(t){B.push(t)}let U=!1;const G=new Set;function W(){if(!U){U=!0;do{for(let t=0;t{V=null}))),V}function J(t,e,n){t.dispatchEvent(function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(`${e?"intro":"outro"}${n}`))}const X=new Set;let Q;function Z(){Q={r:0,c:[],p:Q}}function tt(){Q.r||s(Q.c),Q=Q.p}function et(t,e){t&&t.i&&(X.delete(t),t.i(e))}function nt(t,e,n,o){if(t&&t.o){if(X.has(t))return;X.add(t),Q.c.push((()=>{X.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const ot={duration:0};function rt(t,e){const n=e.token={};function o(t,o,r,s){if(e.token!==n)return;e.resolved=s;let a=e.ctx;void 0!==r&&(a=a.slice(),a[r]=s);const i=t&&(e.current=t)(a);let l=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(Z(),nt(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),tt())})):e.block.d(1),i.c(),et(i,1),i.m(e.mount(),e.anchor),l=!0),e.block=i,e.blocks&&(e.blocks[o]=i),l&&W()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=F();if(t.then((t=>{P(n),o(e.then,1,e.value,t),P(null)}),(t=>{if(P(n),o(e.catch,2,e.error,t),P(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var r}function st(t,e){const n={},o={},r={$$scope:1};let s=t.length;for(;s--;){const a=t[s],i=e[s];if(i){for(const t in a)t in i||(o[t]=1);for(const t in i)r[t]||(n[t]=i[t],r[t]=1);t[s]=i}else for(const t in a)r[t]=1}for(const t in o)t in n||(n[t]=void 0);return n}function at(t){return"object"==typeof t&&null!==t?t:{}}function it(t){t&&t.c()}function lt(t,e,n,r){const{fragment:i,on_mount:l,on_destroy:c,after_update:u}=t.$$;i&&i.m(e,n),r||D((()=>{const e=l.map(o).filter(a);c?c.push(...e):s(e),t.$$.on_mount=[]})),u.forEach(D)}function ct(t,e){const n=t.$$;null!==n.fragment&&(s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ut(t,e){-1===t.$$.dirty[0]&&(M.push(t),z||(z=!0,H.then(W)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const r=o.length?o[0]:n;return f.ctx&&i(f.ctx[t],f.ctx[t]=r)&&(!f.skip_bound&&f.bound[t]&&f.bound[t](r),p&&ut(e,t)),n})):[],f.update(),p=!0,s(f.before_update),f.fragment=!!a&&a(f.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);f.fragment&&f.fragment.l(t),t.forEach($)}else f.fragment&&f.fragment.c();n.intro&&et(e.$$.fragment),lt(e,n.target,n.anchor,n.customElement),W()}P(u)}class pt{$destroy(){ct(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}var ht=function(){this.__data__=[],this.size=0};var mt=function(t,e){return t===e||t!=t&&e!=e};var dt=function(t,e){for(var n=t.length;n--;)if(mt(t[n][0],e))return n;return-1},bt=Array.prototype.splice;var gt=function(t){var e=this.__data__,n=dt(e,t);return!(n<0)&&(n==e.length-1?e.pop():bt.call(e,n,1),--this.size,!0)};var vt=function(t){var e=this.__data__,n=dt(e,t);return n<0?void 0:e[n][1]};var yt=function(t){return dt(this.__data__,t)>-1};var $t=function(t,e){var n=this.__data__,o=dt(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this};function Rt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991},Ve={};Ve["[object Float32Array]"]=Ve["[object Float64Array]"]=Ve["[object Int8Array]"]=Ve["[object Int16Array]"]=Ve["[object Int32Array]"]=Ve["[object Uint8Array]"]=Ve["[object Uint8ClampedArray]"]=Ve["[object Uint16Array]"]=Ve["[object Uint32Array]"]=!0,Ve["[object Arguments]"]=Ve["[object Array]"]=Ve["[object ArrayBuffer]"]=Ve["[object Boolean]"]=Ve["[object DataView]"]=Ve["[object Date]"]=Ve["[object Error]"]=Ve["[object Function]"]=Ve["[object Map]"]=Ve["[object Number]"]=Ve["[object Object]"]=Ve["[object RegExp]"]=Ve["[object Set]"]=Ve["[object String]"]=Ve["[object WeakMap]"]=!1;var Ke=function(t){return Fe(t)&&Ye(t.length)&&!!Ve[zt(t)]};var Je=function(t){return function(e){return t(e)}},Xe=Et((function(t,e){var n=e&&!e.nodeType&&e,o=n&&t&&!t.nodeType&&t,r=o&&o.exports===n&&jt.process,s=function(){try{var t=o&&o.require&&o.require("util").types;return t||r&&r.binding&&r.binding("util")}catch(t){}}();t.exports=s})),Qe=Xe&&Xe.isTypedArray,Ze=Qe?Je(Qe):Ke,tn=Object.prototype.hasOwnProperty;var en=function(t,e){var n=ze(t),o=!n&&He(t),r=!n&&!o&&Ue(t),s=!n&&!o&&!r&&Ze(t),a=n||o||r||s,i=a?Pe(t.length,String):[],l=i.length;for(var c in t)!e&&!tn.call(t,c)||a&&("length"==c||r&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||We(c,l))||i.push(c);return i},nn=Object.prototype;var on=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||nn)};var rn=function(t,e){return function(n){return t(e(n))}},sn=rn(Object.keys,Object),an=Object.prototype.hasOwnProperty;var ln=function(t){if(!on(t))return sn(t);var e=[];for(var n in Object(t))an.call(t,n)&&"constructor"!=n&&e.push(n);return e};var cn=function(t){return null!=t&&Ye(t.length)&&!Gt(t)};var un=function(t){return cn(t)?en(t):ln(t)};var fn=function(t,e){return t&&Ie(e,un(e),t)};var pn=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},hn=Object.prototype.hasOwnProperty;var mn=function(t){if(!Dt(t))return pn(t);var e=on(t),n=[];for(var o in t)("constructor"!=o||!e&&hn.call(t,o))&&n.push(o);return n};var dn=function(t){return cn(t)?en(t,!0):mn(t)};var bn=function(t,e){return t&&Ie(e,dn(e),t)},gn=Et((function(t,e){var n=e&&!e.nodeType&&e,o=n&&t&&!t.nodeType&&t,r=o&&o.exports===n?qt.Buffer:void 0,s=r?r.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,o=s?s(n):new t.constructor(n);return t.copy(o),o}}));var vn=function(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++nObject.assign(Ro(t),Ro(e)),xo=(t,e)=>_o(t)[e],_o=t=>{let e;return t.subscribe((t=>{e=Array.isArray(t)?[...t]:Co({},t)}))(),e},wo=(t,e)=>{t.update((t=>Co(t,e)))},So=localStorage,To="SCR_ROUTER_EXPIRE_KEYS",Eo=t=>{if(!Array.isArray(t)||0===t.length)return;t.map((t=>{So.getItem(t)&&(So.removeItem(t),function(t,e=!0){let n=qo(So.getItem(To));if(null==n)return;n=n.filter((e=>e.key!==t)),n.length>0?So.setItem(To,Lo(n)):So.removeItem(To);!e&&So.getItem(t)&&So.removeItem(t)}(t))}));let e=qo(So.getItem(To));null!=e&&(e=e.filter((e=>!t.includes(e.key))),e.length>0?So.setItem(To,Lo(e)):So.removeItem(To))},Oo=(t,e,n,o=[])=>{t((t=>{for(let e of o)t[e]=void 0;((t,e,n)=>{if(null==t||""===t.trim())return!1;null!=e?So.setItem(t,Lo(e)):Eo([t])})(e,t)}))()},jo=(t,e)=>{const n=(t=>qo(So.getItem(t)))(e);n&&t((()=>Object.assign({},Ro(n))))};function Lo(t){return"object"==typeof t?JSON.stringify(t):t}function qo(t){if(!t)return t;try{return JSON.parse(t)}catch(e){return t}} /*! localForage -- Offline Storage, Improved Version 1.9.0 https://localforage.github.io/localForage (c) 2013-2017 Mozilla, Apache License 2.0 - */var Bo=Et((function(t,e){t.exports=function t(e,n,o){function r(a,i){if(!n[a]){if(!e[a]){if(!i&&Ot)return Ot(a);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,(function(t){var n=e[a][1][t];return r(n||t)}),c,c.exports,t,e,n,o)}return n[a].exports}for(var s=Ot,a=0;a=43)}})).catch((function(){return!1}))}function C(t){return"boolean"==typeof d?c.resolve(d):R(t).then((function(t){return d=t}))}function x(t){var e=b[t.name],n={};n.promise=new c((function(t,e){n.resolve=t,n.reject=e})),e.deferredOperations.push(n),e.dbReady?e.dbReady=e.dbReady.then((function(){return n.promise})):e.dbReady=n.promise}function w(t){var e=b[t.name].deferredOperations.pop();if(e)return e.resolve(),e.promise}function _(t,e){var n=b[t.name].deferredOperations.pop();if(n)return n.reject(e),n.promise}function S(t,e){return new c((function(n,o){if(b[t.name]=b[t.name]||F(),t.db){if(!e)return n(t.db);x(t),t.db.close()}var r=[t.name];e&&r.push(t.version);var s=a.open.apply(a,r);e&&(s.onupgradeneeded=function(e){var n=s.result;try{n.createObjectStore(t.storeName),e.oldVersion<=1&&n.createObjectStore(m)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+t.name+'" has been upgraded from version '+e.oldVersion+" to version "+e.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),s.onerror=function(t){t.preventDefault(),o(s.error)},s.onsuccess=function(){n(s.result),w(t)}}))}function T(t){return S(t,!1)}function E(t){return S(t,!0)}function O(t,e){if(!t.db)return!0;var n=!t.db.objectStoreNames.contains(t.storeName),o=t.versiont.db.version;if(o&&(t.version!==e&&console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),r||n){if(n){var s=t.db.version+1;s>t.version&&(t.version=s)}return!0}return!1}function j(t){return new c((function(e,n){var o=new FileReader;o.onerror=n,o.onloadend=function(n){var o=btoa(n.target.result||"");e({__local_forage_encoded_blob:!0,data:o,type:t.type})},o.readAsBinaryString(t)}))}function L(t){return l([$(atob(t.data))],{type:t.type})}function q(t){return t&&t.__local_forage_encoded_blob}function N(t){var e=this,n=e._initReady().then((function(){var t=b[e._dbInfo.name];if(t&&t.dbReady)return t.dbReady}));return f(n,t,t),n}function I(t){x(t);for(var e=b[t.name],n=e.forages,o=0;o0&&(!t.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return c.resolve().then((function(){if(!t.db||"NotFoundError"===r.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),E(t)})).then((function(){return I(t).then((function(){P(t,e,n,o-1)}))})).catch(n);n(r)}}function F(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function M(t){var e=this,n={db:null};if(t)for(var o in t)n[o]=t[o];var r=b[n.name];r||(r=F(),b[n.name]=r),r.forages.push(e),e._initReady||(e._initReady=e.ready,e.ready=N);var s=[];function a(){return c.resolve()}for(var i=0;i>4,u[l++]=(15&o)<<4|r>>2,u[l++]=(3&r)<<6|63&s;return c}function mt(t){var e,n=new Uint8Array(t),o="";for(e=0;e>2],o+=K[(3&n[e])<<4|n[e+1]>>4],o+=K[(15&n[e+1])<<2|n[e+2]>>6],o+=K[63&n[e+2]];return n.length%3==2?o=o.substring(0,o.length-1)+"=":n.length%3==1&&(o=o.substring(0,o.length-2)+"=="),o}function dt(t,e){var n="";if(t&&(n=pt.call(t)),t&&("[object ArrayBuffer]"===n||t.buffer&&"[object ArrayBuffer]"===pt.call(t.buffer))){var o,r=Q;t instanceof ArrayBuffer?(o=t,r+=tt):(o=t.buffer,"[object Int8Array]"===n?r+=nt:"[object Uint8Array]"===n?r+=ot:"[object Uint8ClampedArray]"===n?r+=rt:"[object Int16Array]"===n?r+=st:"[object Uint16Array]"===n?r+=it:"[object Int32Array]"===n?r+=at:"[object Uint32Array]"===n?r+=lt:"[object Float32Array]"===n?r+=ct:"[object Float64Array]"===n?r+=ut:e(new Error("Failed to get type for BinaryArray"))),e(r+mt(o))}else if("[object Blob]"===n){var s=new FileReader;s.onload=function(){var n=J+t.type+"~"+mt(this.result);e(Q+et+n)},s.readAsArrayBuffer(t)}else try{e(JSON.stringify(t))}catch(n){console.error("Couldn't convert value into a JSON string: ",t),e(null,n)}}function bt(t){if(t.substring(0,Z)!==Q)return JSON.parse(t);var e,n=t.substring(ft),o=t.substring(Z,ft);if(o===et&&X.test(n)){var r=n.match(X);e=r[1],n=n.substring(r[0].length)}var s=ht(n);switch(o){case tt:return s;case et:return l([s],{type:e});case nt:return new Int8Array(s);case ot:return new Uint8Array(s);case rt:return new Uint8ClampedArray(s);case st:return new Int16Array(s);case it:return new Uint16Array(s);case at:return new Int32Array(s);case lt:return new Uint32Array(s);case ct:return new Float32Array(s);case ut:return new Float64Array(s);default:throw new Error("Unkown type: "+o)}}var gt={serialize:dt,deserialize:bt,stringToBuffer:ht,bufferToString:mt};function vt(t,e,n,o){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,o)}function yt(t){var e=this,n={db:null};if(t)for(var o in t)n[o]="string"!=typeof t[o]?t[o].toString():t[o];var r=new c((function(t,o){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(t){return o(t)}n.db.transaction((function(r){vt(r,n,(function(){e._dbInfo=n,t()}),(function(t,e){o(e)}))}),o)}));return n.serializer=gt,r}function $t(t,e,n,o,r,s){t.executeSql(n,o,r,(function(t,a){a.code===a.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],(function(t,i){i.rows.length?s(t,a):vt(t,e,(function(){t.executeSql(n,o,r,s)}),s)}),s):s(t,a)}),s)}function Rt(t,e){var n=this;t=p(t);var o=new c((function(e,o){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){$t(n,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[t],(function(t,n){var o=n.rows.length?n.rows.item(0).value:null;o&&(o=r.serializer.deserialize(o)),e(o)}),(function(t,e){o(e)}))}))})).catch(o)}));return u(o,e),o}function Ct(t,e){var n=this,o=new c((function(e,o){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){$t(n,r,"SELECT * FROM "+r.storeName,[],(function(n,o){for(var s=o.rows,a=s.length,i=0;i0)return void s(xt.apply(r,[t,i,n,o-1]));a(e)}}))}))})).catch(a)}));return u(s,n),s}function wt(t,e,n){return xt.apply(this,[t,e,n,1])}function _t(t,e){var n=this;t=p(t);var o=new c((function(e,o){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){$t(n,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[t],(function(){e()}),(function(t,e){o(e)}))}))})).catch(o)}));return u(o,e),o}function St(t){var e=this,n=new c((function(t,n){e.ready().then((function(){var o=e._dbInfo;o.db.transaction((function(e){$t(e,o,"DELETE FROM "+o.storeName,[],(function(){t()}),(function(t,e){n(e)}))}))})).catch(n)}));return u(n,t),n}function Tt(t){var e=this,n=new c((function(t,n){e.ready().then((function(){var o=e._dbInfo;o.db.transaction((function(e){$t(e,o,"SELECT COUNT(key) as c FROM "+o.storeName,[],(function(e,n){var o=n.rows.item(0).c;t(o)}),(function(t,e){n(e)}))}))})).catch(n)}));return u(n,t),n}function Et(t,e){var n=this,o=new c((function(e,o){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){$t(n,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[t+1],(function(t,n){var o=n.rows.length?n.rows.item(0).key:null;e(o)}),(function(t,e){o(e)}))}))})).catch(o)}));return u(o,e),o}function Ot(t){var e=this,n=new c((function(t,n){e.ready().then((function(){var o=e._dbInfo;o.db.transaction((function(e){$t(e,o,"SELECT key FROM "+o.storeName,[],(function(e,n){for(var o=[],r=0;r '__WebKitDatabaseInfoTable__'",[],(function(n,o){for(var r=[],s=0;s0}function Mt(t){var e=this,n={};if(t)for(var o in t)n[o]=t[o];return n.keyPrefix=It(t,e._defaultConfig),Ft()?(e._dbInfo=n,n.serializer=gt,c.resolve()):c.reject()}function At(t){var e=this,n=e.ready().then((function(){for(var t=e._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var o=localStorage.key(n);0===o.indexOf(t)&&localStorage.removeItem(o)}}));return u(n,t),n}function Bt(t,e){var n=this;t=p(t);var o=n.ready().then((function(){var e=n._dbInfo,o=localStorage.getItem(e.keyPrefix+t);return o&&(o=e.serializer.deserialize(o)),o}));return u(o,e),o}function kt(t,e){var n=this,o=n.ready().then((function(){for(var e=n._dbInfo,o=e.keyPrefix,r=o.length,s=localStorage.length,a=1,i=0;i=0;e--){var n=localStorage.key(e);0===n.indexOf(t)&&localStorage.removeItem(n)}})):c.reject("Invalid arguments"),e),o}var Yt={_driver:"localStorageWrapper",_initStorage:Mt,_support:Nt(),iterate:kt,getItem:Bt,setItem:Gt,removeItem:Ut,clear:At,length:Dt,key:Ht,keys:zt,dropInstance:Wt},Vt=function(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)},Kt=function(t,e){for(var n=t.length,o=0;o{try{if(null==t||""===t.trim())return!1;if(null==e)return void await Do([t]);await Uo(),n&&Number.isSafeInteger(n)&&Number.isInteger(n)&&n>0&&await async function(t,e){try{if(!Number.isInteger(e)||!Number.isSafeInteger(e))throw new Error("Time to add an expire key is not a safe integer");let n=Yo(await Ho.getItem(ko));const o=Oo(new Date,e);null!=n?(n=n.filter((e=>e.key!==t)),n.push({key:t,liveUntil:o})):n=[{key:t,liveUntil:o}],await Ho.setItem(ko,Wo(n))}catch(t){throw t}}(t,n),await Ho.setItem(t,Wo(e))}catch(t){throw t}},Do=async t=>{try{if(!Array.isArray(t)||0===t.length)return;await t.map((async t=>{await Ho.getItem(t)&&(await Ho.removeItem(t),await async function(t,e=!0){try{let n=Yo(await Ho.getItem(ko));if(null==n)return;n=n.filter((e=>e.key!==t)),n.length>0?await Ho.setItem(ko,Wo(n)):await Ho.removeItem(ko),!e&&Ho.getItem(t)&&await Ho.removeItem(t)}catch(t){throw t}}(t))}));let e=Yo(await Ho.getItem(ko));if(null==e)return;e=e.filter((e=>!t.includes(e.key))),e.length>0?await Ho.setItem(ko,Wo(e)):await Ho.removeItem(ko)}catch(t){throw t}},Uo=async()=>{try{let t=[],e=Yo(await Ho.getItem(ko));return e&&e.length>0&&(e=await e.filter((async e=>{if(jo(new Date,new Date(e.liveUntil))&&await Ho.getItem(e.key))return!0;await Ho.removeItem(e.key),t.push(e.key)})),e.length>0?await Ho.setItem(ko,Wo(e)):await Ho.removeItem(ko)),t}catch(t){throw t}},Go=async(t,e)=>{try{const n=await(async t=>{try{return await Uo(),Yo(await Ho.getItem(t))}catch(t){throw t}})(e);if(!n)return;t((()=>Object.assign({},Ro(n))))}catch(t){throw t}};function Wo(t){return"object"==typeof t?JSON.stringify(t):t}function Yo(t){if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}const Vo=[];function Ko(e,n=t){let o;const r=[];function s(t){if(i(e,t)&&(e=t,o)){const t=!Vo.length;for(let t=0;t{const t=r.indexOf(l);-1!==t&&r.splice(t,1),0===r.length&&(o(),o=null)}}}}const Jo=["localstorage","indexeddb","none"],Xo=Ko(Co({},{hashMode:!1,navigationHistoryLimit:10,saveMode:"localstorage",notFoundRoute:"/notFound",errorRoute:"/error",consoleLogErrorMessages:!0,consoleLogStores:!0,usesRouteLayout:!0,considerTrailingSlashOnMatchingRoute:!0,useScroll:!1,scrollProps:{top:0,left:0,behavior:"smooth",timeout:10}}));let Qo,Zo;function tr(t){"boolean"==typeof t&&_o(Xo,{hashMode:t})}function er(t){"number"==typeof t&&_o(Xo,{navigationHistoryLimit:t})}function nr(t){Jo.includes(t)&&_o(Xo,{saveMode:t})}function or(t){"string"==typeof t&&t.includes("/")&&_o(Xo,{notFoundRoute:t})}function rr(t){"string"==typeof t&&t.includes("/")&&_o(Xo,{errorRoute:t})}function sr(t=!1){"boolean"==typeof t&&_o(Xo,{consoleLogErrorMessages:t})}function ar(t=!1){"boolean"==typeof t&&_o(Xo,{consoleLogStores:t})}function ir(t){"boolean"==typeof t&&_o(Xo,{usesRouteLayout:t})}function lr(t){0}function cr(t){"boolean"==typeof t&&_o(Xo,{useScroll:t})}function ur(t){t&&"function"==typeof t&&(Qo=t)}function fr(t){if(t&&("function"==typeof t||Array.isArray(t))){if(Array.isArray(t))for(let e of t)if("function"!=typeof e)return;Zo=t}}var pr={subscribe:Xo.subscribe,update:Xo.update,setConfig:function(t){tr(t.hashMode),er(t.navigationHistoryLimit),nr(t.saveMode),or(t.notFoundRoute),rr(t.errorRoute),sr(t.consoleLogErrorMessages),ar(t.consoleLogStores),ir(t.usesRouteLayout),setConsiderTrailingSlashOnMatchingRoute(t.considerTrailingSlashOnMatchingRoute),ur(t.onError),fr(t.beforeEnter),lr(t.scrollProps),cr(t.useScroll)},getConfig:function(){return wo(Xo)},setHashMode:tr,getHashMode:function(){return xo(Xo,"hashMode")},setNavigationHistoryLimit:er,getNavigationHistoryLimit:function(){return xo(Xo,"navigationHistoryLimit")},setSaveMode:nr,getSaveMode:function(){return xo(Xo,"saveMode")},setNotFoundRoute:or,getNotFoundRoute:function(){return xo(Xo,"notFoundRoute")},setErrorRoute:rr,getErrorRoute:function(){return xo(Xo,"errorRoute")},setConsoleLogErrorMessages:sr,getConsoleLogErrorMessages:function(){return xo(Xo,"consoleLogErrorMessages")},setConsoleLogStores:ar,getConsoleLogStores:function(){return xo(Xo,"consoleLogStores")},setUsesRouteLayout:ir,getUsesRouteLayout:function(){return xo(Xo,"usesRouteLayout")},setConsiderTrailingSlashOnMachingRoute:function(t){"boolean"==typeof t&&_o(Xo,{considerTrailingSlashOnMachingRoute:t})},getConsiderTrailingSlashOnMachingRoute:function(){return xo(Xo,"considerTrailingSlashOnMachingRoute")},setScrollProps:lr,getScrollProps:function(){return xo(Xo,"scrollProps")},setUseScroll:cr,getUseScroll:function(){return xo(Xo,"useScroll")},setOnError:ur,getOnError:function(){return Qo},setBeforeEnter:fr,getBeforeEnter:function(){return Zo}};const hr="SRC_ROUTER_STORE",mr=Ko(Co({},{routes:[],currentLocation:void 0,currentRoute:{name:void 0,pathname:void 0,params:[],hostname:void 0,protocol:void 0,port:void 0,origin:void 0,hash:void 0},fromRoute:{name:void 0,pathname:void 0,params:[],hostname:void 0,protocol:void 0,port:void 0,origin:void 0,hash:void 0},navigationHistory:[]}));async function dr(t){if("object"==typeof t){const e=gr();e.navigationHistoryLimit>0&&(t=t.slice(0,e.navigationHistoryLimit-1)),_o(mr,{navigationHistory:t}),await vr()}}function br(){return xo(mr,"navigationHistory")}function gr(){return pr.getConfig()}async function vr(){const t=gr();return!(!t||!t.saveMode||"none"==t.saveMode)&&("localstorage"===t.saveMode?await((t,e,n,o=[])=>{t((t=>{for(let e of o)t[e]=void 0;No(e,t,n)}))()})(mr.subscribe,hr):"indexeddb"===t.saveMode&&await(async(t,e,n,o=[])=>{try{t((async t=>{for(let e of o)t[e]=void 0;await zo(e,t,n)}))()}catch(t){throw t}})(mr.subscribe,hr),!1)}var yr={subscribe:mr.subscribe,update:mr.update,STORAGE_KEY:hr,setRoutes:async function(t=[]){Array.isArray(t)&&(_o(mr,{routes:t}),await vr())},getRoutes:function(){return xo(mr,"routes")},setCurrentRoute:async function(t){"object"==typeof t&&(_o(mr,{currentRoute:t}),await vr())},getCurrentRoute:function(){return xo(mr,"currentRoute")},setFromRoute:async function(t){"object"==typeof t&&(_o(mr,{fromRoute:t}),await vr())},getFromRoute:function(){return xo(mr,"fromRoute")},setNavigationHistory:dr,getNavigationHistory:br,pushNavigationHistory:async function(t){let e=br()||[];e=[t,...e],await dr(e)},popNavigationHistory:async function(){let t=br()||[];if(0==t.length)return!1;const e={...t[0]};return await dr(t.slice(1)),e},setCurrentLocation:async function(t){"string"==typeof t&&(_o(mr,{currentLocation:t}),await vr())},getCurrentLocation:function(){return xo(mr,"currentLocation")},getConfig:gr};const $r=Ko(Co({},{pushRoute:!1,params:{}}));let Rr;function Cr(t={}){_o($r,{params:t})}function xr(){const t=xo($r,"params");return Cr(),t}function wr(){return yr.getNavigationHistory()}var _r={subscribe:$r.subscribe,update:$r.update,pushRoute:function(t,e,n){if(!t){const e=new Error(`SCR_ROUTER - Route not defined - ${t}`);if("function"!=typeof n)throw e;n(e)}const o=yr.getRoutes();Rr=void 0,"string"==typeof t?Rr=o.find((e=>e.path===t)):t.path?Rr=o.find((e=>e.path===t.path)):t.name&&(Rr=o.find((e=>e.name===t.name))),Rr||(Rr={notFound:!0,path:"string"==typeof t?t:t.path||""}),n&&"function"==typeof n&&(Rr.onError=n),Cr(e),_o($r,{pushRoute:!0})},getPushRoute:function(){return xo($r,"pushRoute")},consumeRoutePushed:function(){const t=Co({},Rr);return Rr=void 0,_o($r,{pushRoute:!1}),t.params={...t.params,...xr()},t},backRoute:function(){let t;return wr().length>0&&(t=yr.popNavigationHistory()),window.history.back(),t},getNavigationHistory:wr,getConfig:function(){return pr.getConfig()},setParams:Cr,consumeParams:xr};function Sr(){this.resolveLoading=function(){this.resolveFunc&&(this.resolveFunc(!0),this.resolveFunc=void 0)},this.startLoading=function(){return this.callbackFunc=new Promise(((t,e)=>{this.resolveFunc=t})),this.callbackFunc}}function Tr(e){let n,o,r,s,a,i=(e[0].currentLocation||"='(")+"";return{c(){n=R("center"),o=R("p"),o.textContent="Not Found",r=x(),s=R("p"),a=C(i),S(o,"class","scr-p svelte-zj7cmj"),S(s,"class","scr-p-small svelte-zj7cmj")},m(t,e){y(t,n,e),v(n,o),v(n,r),v(n,s),v(s,a)},p(t,[e]){1&e&&i!==(i=(t[0].currentLocation||"='(")+"")&&E(a,i)},i:t,o:t,d(t){t&&$(n)}}}function Er(t,e,n){let o;return l(t,yr,(t=>n(0,o=t))),[o]}class Or extends pt{constructor(t){super(),ft(this,t,Er,Tr,i,{})}}function jr(e){let n,o,r,s,a;return{c(){n=R("center"),o=R("div"),o.innerHTML='
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
',r=x(),s=R("h1"),a=C(e[0]),S(o,"class","scr-lds-spinner svelte-146mxqr"),S(s,"class","scr-h1 svelte-146mxqr"),S(n,"class","scr-center svelte-146mxqr")},m(t,e){y(t,n,e),v(n,o),v(n,r),v(n,s),v(s,a)},p(t,[e]){1&e&&E(a,t[0])},i:t,o:t,d(t){t&&$(n)}}}function Lr(t,e,n){let{loadingText:o="Loading..."}=e;return t.$$set=t=>{"loadingText"in t&&n(0,o=t.loadingText)},[o]}class qr extends pt{constructor(t){super(),ft(this,t,Lr,jr,i,{loadingText:0})}}function Nr(e){let n,o,r,s,a;return{c(){n=R("center"),o=R("p"),o.textContent="Error",r=x(),s=R("p"),a=C(e[0]),S(o,"class","scr-p svelte-jhjhwz"),S(s,"class","scr-p-small svelte-jhjhwz")},m(t,e){y(t,n,e),v(n,o),v(n,r),v(n,s),v(s,a)},p(t,[e]){1&e&&E(a,t[0])},i:t,o:t,d(t){t&&$(n)}}}function Ir(t,e,n){let{errorMessage:o="An error has occured!"}=e;return t.$$set=t=>{"errorMessage"in t&&n(0,o=t.errorMessage)},[o]}class Pr extends pt{constructor(t){super(),ft(this,t,Ir,Nr,i,{errorMessage:0})}}const Fr=t=>({}),Mr=t=>({});function Ar(t){let e,n,o;const r=t[1].scr_header,s=c(r,t,t[0],Mr),a=s||function(t){let e;return{c(){e=R("h1"),e.textContent="Svelte Client Router - The Svelte SPA Router!",S(e,"class","scr-main-layout__header svelte-1brx1pu")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}(),i=t[1].default,l=c(i,t,t[0],null);return{c(){e=R("main"),a&&a.c(),n=x(),l&&l.c(),S(e,"class","scr-main-layout svelte-1brx1pu")},m(t,r){y(t,e,r),a&&a.m(e,null),v(e,n),l&&l.m(e,null),o=!0},p(t,[e]){s&&s.p&&1&e&&f(s,r,t,t[0],e,Fr,Mr),l&&l.p&&1&e&&f(l,i,t,t[0],e,null,null)},i(t){o||(et(a,t),et(l,t),o=!0)},o(t){nt(a,t),nt(l,t),o=!1},d(t){t&&$(e),a&&a.d(t),l&&l.d(t)}}}function Br(t,e,n){let{$$slots:o={},$$scope:r}=e;return t.$$set=t=>{"$$scope"in t&&n(0,r=t.$$scope)},[r,o]}class kr extends pt{constructor(t){super(),ft(this,t,Br,Ar,i,{})}}function Hr(e){return{c:t,m:t,p:t,i:t,o:t,d:t}}function zr(t){let e,n,o,r;const s=[Ur,Dr],a=[];function i(t,e){return t[1].usesRouteLayout&&"function"==typeof t[6]?0:1}return e=i(t),n=a[e]=s[e](t),{c(){n.c(),o=w()},m(t,n){a[e].m(t,n),y(t,o,n),r=!0},p(t,r){let l=e;e=i(t),e===l?a[e].p(t,r):(Z(),nt(a[l],1,1,(()=>{a[l]=null})),tt(),n=a[e],n?n.p(t,r):(n=a[e]=s[e](t),n.c()),et(n,1),n.m(o.parentNode,o))},i(t){r||(et(n),r=!0)},o(t){nt(n),r=!1},d(t){a[e].d(t),t&&$(o)}}}function Dr(t){let e,o,r;const s=[t[2]];var a=t[4];function i(t){let e={};for(let t=0;t{ct(t,1)})),tt()}a?(e=new a(i()),it(e.$$.fragment),et(e.$$.fragment,1),lt(e,o.parentNode,o)):e=null}else a&&e.$set(r)},i(t){r||(e&&et(e.$$.fragment,t),r=!0)},o(t){e&&nt(e.$$.fragment,t),r=!1},d(t){t&&$(o),e&&ct(e,t)}}}function Ur(t){let e,o,r;const s=[t[2]];var a=t[6];function i(t){let e={$$slots:{default:[Gr]},$$scope:{ctx:t}};for(let t=0;t{ct(t,1)})),tt()}a?(e=new a(i(t)),it(e.$$.fragment),et(e.$$.fragment,1),lt(e,o.parentNode,o)):e=null}else a&&e.$set(r)},i(t){r||(e&&et(e.$$.fragment,t),r=!0)},o(t){e&&nt(e.$$.fragment,t),r=!1},d(t){t&&$(o),e&&ct(e,t)}}}function Gr(t){let e,o,r;const s=[t[2]];var a=t[4];function i(t){let e={};for(let t=0;t{ct(t,1)})),tt()}a?(e=new a(i()),it(e.$$.fragment),et(e.$$.fragment,1),lt(e,o.parentNode,o)):e=null}else a&&e.$set(r)},i(t){r||(e&&et(e.$$.fragment,t),r=!0)},o(t){e&&nt(e.$$.fragment,t),r=!1},d(t){t&&$(o),e&&ct(e,t)}}}function Wr(t){let e,o,r;const s=[t[3],t[2]];var a=t[0];function i(t){let e={};for(let t=0;t{ct(t,1)})),tt()}a?(e=new a(i()),it(e.$$.fragment),et(e.$$.fragment,1),lt(e,o.parentNode,o)):e=null}else a&&e.$set(r)},i(t){r||(e&&et(e.$$.fragment,t),r=!0)},o(t){e&&nt(e.$$.fragment,t),r=!1},d(t){t&&$(o),e&&ct(e,t)}}}function Yr(t){let e,n,o,r={ctx:t,current:null,token:null,hasCatch:!1,pending:Wr,then:zr,catch:Hr,value:26,blocks:[,,,]};return rt(n=t[5],r),{c(){e=w(),r.block.c()},m(t,n){y(t,e,n),r.block.m(t,r.anchor=n),r.mount=()=>e.parentNode,r.anchor=e,o=!0},p(e,[o]){if(t=e,r.ctx=t,32&o&&n!==(n=t[5])&&rt(n,r));else{const e=t.slice();e[26]=r.resolved,r.block.p(e,o)}},i(t){o||(et(r.block),o=!0)},o(t){for(let t=0;t<3;t+=1){nt(r.blocks[t])}o=!1},d(t){t&&$(e),r.block.d(t),r.token=null,r=null}}}function Vr(t){return t?Array.isArray(t)?t:"function"==typeof t?[t]:[]:[]}function Kr(t){let e={};return t.replace(/[?&]+([^=&]+)=([^&]*)/gi,(function(t,n,o){e[n]=o})),e}function Jr(t,e,n){let o,r,s;l(t,pr,(t=>n(1,o=t))),l(t,yr,(t=>n(13,r=t))),l(t,_r,(t=>n(14,s=t)));let a,i,c,{routes:u}=e,{notFoundComponent:f=Or}=e,{errorComponent:p=Pr}=e,{defaultLayoutComponent:h=kr}=e,{loadingComponent:m=qr}=e,{allProps:d={}}=e,{allLoadingProps:b={}}=e,g={},v={},y=h,$=new Sr;function R(t,e=!0){const n=(o.hashMode?"#":"")+t;history.pushState?history.pushState(null,null,n):location.hash=n,e&&window.dispatchEvent(new Event("popstate"))}function C(t,e){return n(2,g={}),t&&t.params&&n(2,g={payload:t.payload,...t.params,...Co({},d)}),n(2,g={...g,...e,currentRoute:{...i,name:t.name,pathname:t.path},fromRoute:r.fromRoute}),g}function x(t,e,r){return n(4,a=p),C(r,{errorMessage:t}),e&&o.consoleLogErrorMessages&&console.error(e),R(o.errorRoute,!1)}function w(t,e){if(t.onError&&"function"==typeof t.onError)return t.onError(e,C(t)),x(`SCR_ROUTER - Caught an error: ${e}!`,e,t);throw`Error on route (${t.name} - ${t.path}) - ${e}!`}async function _(t,e=!0){try{if(function(){let t=location.pathname;o.hashMode&&location.hash&&(t=location.hash.slice(1)),i={pathname:t,params:Kr(location.href),hostname:location.hostname,protocol:location.protocol,port:location.port,origin:location.origin,hash:location.hash}}(),t&&!t.forceReload&&i.pathname===t.path)return;if(n(6,y=!1),i.pathname===o.errorRoute)return void n(4,a=p);if(t){if(t.notFound)return await yr.setCurrentLocation(t.path),R(o.notFoundRoute)}else t=r.routes.find((t=>t.path==i.pathname||o.considerTrailingSlashOnMatchingRoute&&t.path+"/"==i.pathname));if(!t)return n(4,a=f),i.pathname!=o.notFoundRoute&&(await yr.setCurrentLocation(i.pathname),R(o.notFoundRoute));n(5,c=$.startLoading()),n(3,v={...Co({},b)}),t.loadingProps&&n(3,v={...v,...t.loadingProps}),await yr.setCurrentLocation(i.pathname);const s=pr.getBeforeEnter();if(!t.beforeEnter&&(!s||t.ignoreGlobalBeforeFunction))return await T(t,e);const l=Vr(t.beforeEnter);if(t.ignoreGlobalBeforeFunction)await S(t,l,e);else{const n=Vr(s),o=t.executeRouteBEFBeforeGlobalBEF?[...l,...n]:[...n,...l];await S(t,o,e)}}catch(e){$.resolveLoading(),pr.getOnError()&&pr.getOnError()(e,C(t)),x(`SCR_ROUTER - ${e}!`,e,t)}finally{$.resolveLoading()}}async function S(t,e,n){const s=Co({},r.currentRoute),a=Co({name:t.name},i);let l,c;t.payload={};for(let n of e){if(!n||"function"!=typeof n)throw new Error(`SCR_ROUTER - Before Enter Function of route (${t.name} - ${t.path}) is not a function!`);if(l=await new Promise((async(e,r)=>{try{c=void 0,t.params&&(c={...t.params}),await n(e,s,a,c,t.payload),t.payload||(t.payload={},o.consoleLogErrorMessages&&console.warn("SCR_ROUTER - Payload property were redefined")),C(t)}catch(t){e({SCR_ROUTE_ERROR:!0,error:t})}})),!0!==l){if(!l)return R(r.currentRoute.pathname);if(l.SCR_ROUTE_ERROR)return w(t,l.error);if(l&&(l.redirect||l.path))return R(l.redirect||l.path);if(l&&l.name){const e=r.routes.find((t=>t.name===l.name));if(!e){let e=new Error(`Error not found route name (${l.name})`);return w(t,e)}return R(e.path)}return w(t,new Error("The resolve option was not able to understand the parameters passed!"))}}return await T(t,n)}async function T(t,e=!1){t.title&&(jt.document.title=t.title),await yr.setFromRoute(r.currentRoute),await yr.pushNavigationHistory(r.currentRoute),e?await yr.setCurrentRoute({...i,name:t.name}):await yr.setCurrentRoute({pathname:t.path,params:{...t.params},hostname:i.hostname,protocol:i.protocol,port:i.port,origin:i.origin,hash:i.hash,name:t.name});const s=C(t);if(t.afterBeforeEnter&&"function"==typeof t.afterBeforeEnter&&t.afterBeforeEnter(s),o.usesRouteLayout&&!t.ignoreLayout)if("function"==typeof t.lazyLoadLayoutComponent){const e=await t.lazyLoadLayoutComponent();if(!e||!e.default)throw new Error(`Lazy Load Layout Component defined for (${t.name} - ${t.path}) could not be loaded`);n(6,y=e.default)}else t.layoutComponent?n(6,y=t.layoutComponent):n(6,y=h);else n(6,y=!1);if(!t.component&&!t.lazyLoadComponent)throw new Error(`No component defined for (${t.name} - ${t.path})!`);if("function"==typeof t.lazyLoadComponent){const e=await t.lazyLoadComponent();if(!e||!e.default)throw new Error(`Lazy Load Component defined for (${t.name} - ${t.path}) could not be loaded`);n(4,a=e.default)}if($.resolveLoading(),o.useScroll&&!t.ignoreScroll){let e={top:o.scrollProps.top||0,left:o.scrollProps.left||0,behavior:o.scrollProps.behavior||"smooth",timeout:o.scrollProps.timeout||10};t.scrollProps&&(e.top=t.scrollProps.top,e.left=t.scrollProps.left,e.behavior=t.scrollProps.behavior,e.timeout=t.scrollProps.timeout),setTimeout((()=>window.scrollTo(e)),e.timeout)}return R(t.path,!1)}var E;return E=async()=>{if("localstorage"===o.saveMode?await Fo(yr.update,yr.STORAGE_KEY):"indexeddb"===o.saveMode&&await Go(yr.update,yr.STORAGE_KEY),u&&await yr.setRoutes(u),!r.routes||0==r.routes.length){const t=new Error("SCR_ROUTER - No routes were defined!");return pr.getOnError()?pr.getOnError()(t):x(`SCR_ROUTER - ${t}!`,t),n(4,a=p),t}await _()},F().$$.on_mount.push(E),window.addEventListener("popstate",(async t=>{await _()})),t.$$set=t=>{"routes"in t&&n(7,u=t.routes),"notFoundComponent"in t&&n(8,f=t.notFoundComponent),"errorComponent"in t&&n(9,p=t.errorComponent),"defaultLayoutComponent"in t&&n(10,h=t.defaultLayoutComponent),"loadingComponent"in t&&n(0,m=t.loadingComponent),"allProps"in t&&n(11,d=t.allProps),"allLoadingProps"in t&&n(12,b=t.allLoadingProps)},t.$$.update=()=>{8194&t.$$.dirty&&o.consoleLogStores&&r&&(console.log(" ----- SCR - Router Store ------------ "),console.log(r),console.log(" ------------------------------------- ")),2&t.$$.dirty&&o.consoleLogStores&&o&&(console.log(" ----- SCR - Configuration Store ----- "),console.log(o),console.log(" ------------------------------------- ")),16386&t.$$.dirty&&o.consoleLogStores&&s&&(console.log(" ----- SCR - Navigate Store ---------- "),console.log(s),console.log(" ------------------------------------- ")),16384&t.$$.dirty&&s.pushRoute&&_(_r.consumeRoutePushed(),!1)},[m,o,g,v,a,c,y,u,f,p,h,d,b,r,s]}function Xr(t){let e,o,r,s;const a=t[6].default,i=c(a,t,t[5],null);let l=[t[0]],u={};for(let t=0;t{"props"in t&&n(2,s=t.props),"onError"in t&&n(3,a=t.onError),"to"in t&&n(4,i=t.to),"elementProps"in t&&n(0,l=t.elementProps),"$$scope"in t&&n(5,r=t.$$scope)},[l,function(){i?_r.pushRoute(i,s,a):alert("SCR_ROUTERLINK Component\n- to property is not defined")},s,a,i,r,o]}const Zr=class extends pt{constructor(t){super(),ft(this,t,Jr,Yr,i,{routes:7,notFoundComponent:8,errorComponent:9,defaultLayoutComponent:10,loadingComponent:0,allProps:11,allLoadingProps:12})}},ts=class extends pt{constructor(t){super(),ft(this,t,Qr,Xr,i,{props:2,onError:3,to:4,elementProps:0})}},es=pr,ns=_r.pushRoute;function os(t){const e=t-1;return e*e*e+1}function rs(t,{delay:e=0,duration:n=400,easing:o=os,x:r=0,y:s=0,opacity:a=0}={}){const i=getComputedStyle(t),l=+i.opacity,c="none"===i.transform?"":i.transform,u=l*(1-a);return{delay:e,duration:n,easing:o,css:(t,e)=>`\n\t\t\ttransform: ${c} translate(${(1-t)*r}px, ${(1-t)*s}px);\n\t\t\topacity: ${l-u*e}`}}function ss(t){let e;return{c(){e=R("div"),e.textContent="Presentation",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function as(t){let e;return{c(){e=R("div"),e.textContent="Installation",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function is(t){let e;return{c(){e=R("div"),e.textContent="Getting Started",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function ls(t){let e;return{c(){e=R("div"),e.textContent="Configuration Options",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function cs(t){let e;return{c(){e=R("div"),e.textContent="Global Before Enter",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function us(t){let e;return{c(){e=R("div"),e.textContent="Global On Error",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function fs(t){let e;return{c(){e=R("div"),e.textContent="Properties",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function ps(t){let e;return{c(){e=R("div"),e.textContent="Before Enter",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function hs(t){let e;return{c(){e=R("div"),e.textContent="After Before Enter",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function ms(t){let e;return{c(){e=R("div"),e.textContent="On Error",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function ds(t){let e;return{c(){e=R("div"),e.textContent="Properties",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function bs(t){let e;return{c(){e=R("div"),e.textContent="Components",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function gs(t){let e;return{c(){e=R("div"),e.textContent="Routing",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function vs(t){let e;return{c(){e=R("div"),e.textContent="Store",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function ys(t){let e;return{c(){e=R("div"),e.textContent="Properties",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function $s(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,w,_,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H,z,D,U,G,W,Y,V,K;return r=new ts({props:{to:{name:"rootRoute"},$$slots:{default:[ss]},$$scope:{ctx:t}}}),a=new ts({props:{to:{name:"installationRoute"},$$slots:{default:[as]},$$scope:{ctx:t}}}),l=new ts({props:{to:{name:"gettingStartedRoute"},$$slots:{default:[is]},$$scope:{ctx:t}}}),p=new ts({props:{to:{name:"configurationOptionsRoute"},$$slots:{default:[ls]},$$scope:{ctx:t}}}),m=new ts({props:{to:{name:"configurationGlobalBeforeEnterOptionRoute"},$$slots:{default:[cs]},$$scope:{ctx:t}}}),b=new ts({props:{to:{name:"configurationOnErrorOptionRoute"},$$slots:{default:[us]},$$scope:{ctx:t}}}),_=new ts({props:{to:{name:"routeObjectOptionsRoute"},$$slots:{default:[fs]},$$scope:{ctx:t}}}),E=new ts({props:{to:{name:"routeObjectBeforeEnterRoute"},$$slots:{default:[ps]},$$scope:{ctx:t}}}),j=new ts({props:{to:{name:"routeObjectAfterBeforeEnterRoute"},$$slots:{default:[hs]},$$scope:{ctx:t}}}),q=new ts({props:{to:{name:"routeObjectOnErrorRoute"},$$slots:{default:[ms]},$$scope:{ctx:t}}}),F=new ts({props:{to:{name:"routeComponentPropertiesRoute"},$$slots:{default:[ds]},$$scope:{ctx:t}}}),A=new ts({props:{to:{name:"routeComponentComponentsRoute"},$$slots:{default:[bs]},$$scope:{ctx:t}}}),z=new ts({props:{to:{name:"navigationRoutingRoute"},$$slots:{default:[gs]},$$scope:{ctx:t}}}),U=new ts({props:{to:{name:"navigationStoreRoute"},$$slots:{default:[vs]},$$scope:{ctx:t}}}),V=new ts({props:{to:{name:"routerLinkPropertiesRoute"},$$slots:{default:[ys]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Introduction",o=x(),it(r.$$.fragment),s=x(),it(a.$$.fragment),i=x(),it(l.$$.fragment),c=x(),u=R("h4"),u.textContent="Configuration",f=x(),it(p.$$.fragment),h=x(),it(m.$$.fragment),d=x(),it(b.$$.fragment),g=x(),C=R("h4"),C.textContent="Route Object",w=x(),it(_.$$.fragment),T=x(),it(E.$$.fragment),O=x(),it(j.$$.fragment),L=x(),it(q.$$.fragment),N=x(),I=R("h4"),I.textContent="Route Component",P=x(),it(F.$$.fragment),M=x(),it(A.$$.fragment),B=x(),k=R("h4"),k.textContent="Navigation",H=x(),it(z.$$.fragment),D=x(),it(U.$$.fragment),G=x(),W=R("h4"),W.textContent="Route Link",Y=x(),it(V.$$.fragment),S(n,"class","scr-menu-h4 svelte-1gz3q5m"),S(u,"class","scr-menu-h4 svelte-1gz3q5m"),S(C,"class","scr-menu-h4 svelte-1gz3q5m"),S(I,"class","scr-menu-h4 svelte-1gz3q5m"),S(k,"class","scr-menu-h4 svelte-1gz3q5m"),S(W,"class","scr-menu-h4 svelte-1gz3q5m"),S(e,"class","scr-menu svelte-1gz3q5m")},m(t,$){y(t,e,$),v(e,n),v(e,o),lt(r,e,null),v(e,s),lt(a,e,null),v(e,i),lt(l,e,null),v(e,c),v(e,u),v(e,f),lt(p,e,null),v(e,h),lt(m,e,null),v(e,d),lt(b,e,null),v(e,g),v(e,C),v(e,w),lt(_,e,null),v(e,T),lt(E,e,null),v(e,O),lt(j,e,null),v(e,L),lt(q,e,null),v(e,N),v(e,I),v(e,P),lt(F,e,null),v(e,M),lt(A,e,null),v(e,B),v(e,k),v(e,H),lt(z,e,null),v(e,D),lt(U,e,null),v(e,G),v(e,W),v(e,Y),lt(V,e,null),K=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const o={};1&e&&(o.$$scope={dirty:e,ctx:t}),a.$set(o);const s={};1&e&&(s.$$scope={dirty:e,ctx:t}),l.$set(s);const i={};1&e&&(i.$$scope={dirty:e,ctx:t}),p.$set(i);const c={};1&e&&(c.$$scope={dirty:e,ctx:t}),m.$set(c);const u={};1&e&&(u.$$scope={dirty:e,ctx:t}),b.$set(u);const f={};1&e&&(f.$$scope={dirty:e,ctx:t}),_.$set(f);const h={};1&e&&(h.$$scope={dirty:e,ctx:t}),E.$set(h);const d={};1&e&&(d.$$scope={dirty:e,ctx:t}),j.$set(d);const g={};1&e&&(g.$$scope={dirty:e,ctx:t}),q.$set(g);const v={};1&e&&(v.$$scope={dirty:e,ctx:t}),F.$set(v);const y={};1&e&&(y.$$scope={dirty:e,ctx:t}),A.$set(y);const $={};1&e&&($.$$scope={dirty:e,ctx:t}),z.$set($);const R={};1&e&&(R.$$scope={dirty:e,ctx:t}),U.$set(R);const C={};1&e&&(C.$$scope={dirty:e,ctx:t}),V.$set(C)},i(t){K||(et(r.$$.fragment,t),et(a.$$.fragment,t),et(l.$$.fragment,t),et(p.$$.fragment,t),et(m.$$.fragment,t),et(b.$$.fragment,t),et(_.$$.fragment,t),et(E.$$.fragment,t),et(j.$$.fragment,t),et(q.$$.fragment,t),et(F.$$.fragment,t),et(A.$$.fragment,t),et(z.$$.fragment,t),et(U.$$.fragment,t),et(V.$$.fragment,t),K=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),nt(l.$$.fragment,t),nt(p.$$.fragment,t),nt(m.$$.fragment,t),nt(b.$$.fragment,t),nt(_.$$.fragment,t),nt(E.$$.fragment,t),nt(j.$$.fragment,t),nt(q.$$.fragment,t),nt(F.$$.fragment,t),nt(A.$$.fragment,t),nt(z.$$.fragment,t),nt(U.$$.fragment,t),nt(V.$$.fragment,t),K=!1},d(t){t&&$(e),ct(r),ct(a),ct(l),ct(p),ct(m),ct(b),ct(_),ct(E),ct(j),ct(q),ct(F),ct(A),ct(z),ct(U),ct(V)}}}class Rs extends pt{constructor(t){super(),ft(this,t,null,$s,i,{})}}const Cs=t=>({}),xs=t=>({});function ws(n){let o,r,i,l,u,p,m,d,b,C,w,_;const T=n[1].scr_header,E=c(T,n,n[0],xs),O=E||function(t){let e;return{c(){e=R("h2"),e.textContent="Svelte Client Router - The Svelte SPA Router!",S(e,"class","scr-main-layout__header svelte-lxpf7t")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}();u=new Rs({});const j=n[1].default,L=c(j,n,n[0],null);return{c(){o=R("div"),r=R("div"),O&&O.c(),i=x(),l=R("div"),it(u.$$.fragment),p=x(),m=R("div"),L&&L.c(),C=x(),w=R("div"),w.innerHTML=' \n ',S(r,"class","scr-header svelte-lxpf7t"),S(m,"class","scr-pages svelte-lxpf7t"),S(l,"class","scr-main svelte-lxpf7t"),S(w,"class","scr-footer svelte-lxpf7t"),S(o,"class","scr-main-layout svelte-lxpf7t")},m(t,e){y(t,o,e),v(o,r),O&&O.m(r,null),v(o,i),v(o,l),lt(u,l,null),v(l,p),v(l,m),L&&L.m(m,null),v(o,C),v(o,w),_=!0},p(t,[e]){E&&E.p&&1&e&&f(E,T,t,t[0],e,Cs,xs),L&&L.p&&1&e&&f(L,j,t,t[0],e,null,null)},i(n){_||(et(O,n),et(u.$$.fragment,n),et(L,n),D((()=>{b&&b.end(1),d||(d=function(n,o,r){let s,i,l=o(n,r),c=!1,u=0;function f(){s&&I(n,s)}function p(){const{delay:o=0,duration:r=300,easing:a=e,tick:p=t,css:m}=l||ot;m&&(s=N(n,0,1,r,o,a,m,u++)),p(0,1);const d=h()+o,b=d+r;i&&i.abort(),c=!0,D((()=>J(n,!0,"start"))),i=g((t=>{if(c){if(t>=b)return p(1,0),J(n,!0,"end"),f(),c=!1;if(t>=d){const e=a((t-d)/r);p(e,1-e)}}return c}))}let m=!1;return{start(){m||(I(n),a(l)?(l=l(),K().then(p)):p())},invalidate(){m=!1},end(){c&&(f(),c=!1)}}}(m,rs,{delay:201,x:300,duration:200,opacity:0})),d.start()})),_=!0)},o(n){nt(O,n),nt(u.$$.fragment,n),nt(L,n),d&&d.invalidate(),b=function(n,o,r){let i,l=o(n,r),c=!0;const u=Q;function f(){const{delay:o=0,duration:r=300,easing:a=e,tick:f=t,css:p}=l||ot;p&&(i=N(n,1,0,r,o,a,p));const m=h()+o,d=m+r;D((()=>J(n,!1,"start"))),g((t=>{if(c){if(t>=d)return f(0,1),J(n,!1,"end"),--u.r||s(u.c),!1;if(t>=m){const e=a((t-m)/r);f(1-e,e)}}return c}))}return u.r+=1,a(l)?K().then((()=>{l=l(),f()})):f(),{end(t){t&&l.tick&&l.tick(1,0),c&&(i&&I(n,i),c=!1)}}}(m,rs,{x:300,duration:200,opacity:0}),_=!1},d(t){t&&$(o),O&&O.d(t),ct(u),L&&L.d(t),t&&b&&b.end()}}}function _s(t,e,n){let{$$slots:o={},$$scope:r}=e;return t.$$set=t=>{"$$scope"in t&&n(0,r=t.$$scope)},[r,o]}class Ss extends pt{constructor(t){super(),ft(this,t,_s,ws,i,{})}}function Ts(t){let e,n,o;function r(e){t[1](e)}let s={defaultLayoutComponent:Ss};return void 0!==t[0]&&(s.routes=t[0]),e=new Zr({props:s}),A.push((()=>function(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}(e,"routes",r))),{c(){it(e.$$.fragment)},m(t,n){lt(e,t,n),o=!0},p(t,[o]){const r={};var s;!n&&1&o&&(n=!0,r.routes=t[0],s=()=>n=!1,k.push(s)),e.$set(r)},i(t){o||(et(e.$$.fragment,t),o=!0)},o(t){nt(e.$$.fragment,t),o=!1},d(t){ct(e,t)}}}function Es(t,e,n){es.setNotFoundRoute("/svelte-client-router/myCustomNotFoundRoute"),es.setErrorRoute("/svelte-client-router/myCustomErrorRoute"),es.setConsoleLogStores(!1),es.setNavigationHistoryLimit(10),es.setHashMode(!0),es.setUseScroll(!0),es.setScrollProps({top:0,left:0,behavior:"smooth",timeout:10}),es.setOnError(((t,e)=>{console.log("GLOBAL ERROR CONFIG",e)}));let o=[{name:"root",path:"/",beforeEnter:[(t,e,n,o,r)=>{t({redirect:"/svelte-client-router"})}]},{name:"rootRoute",path:"/svelte-client-router",lazyLoadComponent:()=>Promise.resolve().then((function(){return As})),title:"SCR - Presentation"},{name:"installationRoute",path:"/svelte-client-router/installation",lazyLoadComponent:()=>Promise.resolve().then((function(){return Hs})),title:"SCR - Installation"},{name:"gettingStartedRoute",path:"/svelte-client-router/gettingStarted",lazyLoadComponent:()=>Promise.resolve().then((function(){return Us})),title:"SCR - Getting Started"},{name:"configurationOptionsRoute",path:"/svelte-client-router/configurationOptions",lazyLoadComponent:()=>Promise.resolve().then((function(){return Ys})),title:"SCR - Configuration Options"},{name:"configurationGlobalBeforeEnterOptionRoute",path:"/svelte-client-router/configurationBeforeEnter",lazyLoadComponent:()=>Promise.resolve().then((function(){return Zs})),title:"SCR - Configuration - Before Enter"},{name:"configurationOnErrorOptionRoute",path:"/svelte-client-router/configurationOnError",lazyLoadComponent:()=>Promise.resolve().then((function(){return sa})),title:"SCR - Configuration - On Error"},{name:"routeObjectOptionsRoute",path:"/svelte-client-router/routeObjectOptions",lazyLoadComponent:()=>Promise.resolve().then((function(){return la})),title:"SCR - Route Object - Options"},{name:"routeObjectBeforeEnterRoute",path:"/svelte-client-router/routeObjectBeforeEnter",lazyLoadComponent:()=>Promise.resolve().then((function(){return pa})),title:"SCR - Route Object - Before Enter Functions"},{name:"routeObjectAfterBeforeEnterRoute",path:"/svelte-client-router/routeObjectAfterBeforeEnter",lazyLoadComponent:()=>Promise.resolve().then((function(){return da})),title:"SCR - Route Object - After Before Function"},{name:"routeObjectOnErrorRoute",path:"/svelte-client-router/routeObjectOnError",lazyLoadComponent:()=>Promise.resolve().then((function(){return ya})),title:"SCR - Route Object - On Error Function"},{name:"routeComponentPropertiesRoute",path:"/svelte-client-router/routeComponentProperties",lazyLoadComponent:()=>Promise.resolve().then((function(){return wa})),title:"SCR - Route Component - Properties"},{name:"routeComponentComponentsRoute",path:"/svelte-client-router/routeComponentComponents",lazyLoadComponent:()=>Promise.resolve().then((function(){return Ta})),title:"SCR - Route Component - Components"},{name:"navigationRoutingRoute",path:"/svelte-client-router/navigationRouting",lazyLoadComponent:()=>Promise.resolve().then((function(){return ja})),title:"SCR - Navigation - Routing"},{name:"navigationStoreRoute",path:"/svelte-client-router/navigationStore",lazyLoadComponent:()=>Promise.resolve().then((function(){return Na})),title:"SCR - Navigation - Store"},{name:"routerLinkPropertiesRoute",path:"/svelte-client-router/routerLinkProperties",lazyLoadComponent:()=>Promise.resolve().then((function(){return Fa})),title:"SCR - Route Link - Properties"}];return[o,function(t){o=t,n(0,o)}]}const Os=new class extends pt{constructor(t){super(),ft(this,t,Es,Ts,i,{})}}({target:document.body});function js(t){let e,n,o,r;const s=t[1].default,a=c(s,t,t[0],null);return{c(){e=R("div"),n=R("hr"),o=x(),a&&a.c(),S(n,"class","scr-hr"),S(e,"class","scr-footer svelte-rxr6jj")},m(t,s){y(t,e,s),v(e,n),v(e,o),a&&a.m(e,null),r=!0},p(t,[e]){a&&a.p&&1&e&&f(a,s,t,t[0],e,null,null)},i(t){r||(et(a,t),r=!0)},o(t){nt(a,t),r=!1},d(t){t&&$(e),a&&a.d(t)}}}function Ls(t,e,n){let{$$slots:o={},$$scope:r}=e;return t.$$set=t=>{"$$scope"in t&&n(0,r=t.$$scope)},[r,o]}class qs extends pt{constructor(t){super(),ft(this,t,Ls,js,i,{})}}function Ns(e){let n,o,r,s;return{c(){n=R("button"),o=C(e[0]),S(n,"title",e[2]),S(n,"style",e[1]),S(n,"type","button"),S(n,"class","btn scr-button")},m(t,a){y(t,n,a),v(n,o),r||(s=_(n,"click",e[3]),r=!0)},p(t,[e]){1&e&&E(o,t[0]),4&e&&S(n,"title",t[2]),2&e&&S(n,"style",t[1])},i:t,o:t,d(t){t&&$(n),r=!1,s()}}}function Is(t,e,n){let{routeName:o="rootRoute"}=e,{text:r="Button"}=e,{style:s=""}=e,{title:a}=e;return t.$$set=t=>{"routeName"in t&&n(4,o=t.routeName),"text"in t&&n(0,r=t.text),"style"in t&&n(1,s=t.style),"title"in t&&n(2,a=t.title)},[r,s,a,function(){ns({name:o})},o]}class Ps extends pt{constructor(t){super(),ft(this,t,Is,Ns,i,{routeName:4,text:0,style:1,title:2})}}function Fs(e){let n,o,r,s;return r=new Ps({props:{style:"float:right",text:"Next",routeName:"installationRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),s=!0},p:t,i(t){s||(et(r.$$.fragment,t),s=!0)},o(t){nt(r.$$.fragment,t),s=!1},d(t){t&&$(n),ct(r)}}}function Ms(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d;return m=new qs({props:{$$slots:{default:[Fs]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Presentation",o=x(),r=R("p"),r.innerHTML="Hi.. This is The Svelte Router - thought to be focused on controlling what\n happens before entering the route.\n
\n
\n The motivation to develop this router was that, until now, there isn't a nice\n router for svelte. When we think on routing what do we want? Did you stop do\n think about it?\n
\n
\n Let's see what we thought...",s=x(),a=R("ul"),a.innerHTML='
  • Lazy Load Components and Layouts
  • \n
  • Global and Per Route Layout
  • \n
  • Execute something Before Enter The Route
  • \n
  • Execute something Before Enter Each Route
  • \n
  • The possibility to ignore global before enter on a single route
  • \n
  • A Loading Component To Keep Our Users Waiting
  • \n
  • A Error Component To land when something goes wrong
  • \n
  • A Not Found Component To land when the user try to enter a not existing\n route
  • \n
  • Customize this routes and components at our will
  • \n
  • To set the title automatically
  • \n
  • To pass information between Before Enter Function and send to Route Loaded\n Components
  • \n
  • The possibility to use hash routing
  • ',i=x(),l=R("p"),l.innerHTML="Not only that is important but to control the overall behaviour when routing.\n Where to set the scroll position, reload the route everytime or just when I\n am not in the route - this may prevent some looping issues in your\n application.\n
    \n
    \n Anyway a lot of cool stuff when routing. So in each section it will be provided\n the configuration used to configure each route ok? See below the configuration\n for this first route. \n
    \n Pretty simple isn't it ?",c=x(),u=R("center"),u.innerHTML='The configuration for this route.',f=x(),p=R("pre"),p.textContent='{\n name: "rootRoute",\n path: "/svelte-client-router",\n lazyLoadComponent: () => import("./docs/pages/SCR_Presentation.svelte"),\n title: "SCR - Presentation",\n}',h=x(),it(m.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(l,"class","scr-text-justify"),S(u,"class","scr-center"),S(p,"class","scr-pre"),S(e,"class","scr-page")},m(t,b){y(t,e,b),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),lt(m,e,null),d=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),m.$set(n)},i(t){d||(et(m.$$.fragment,t),d=!0)},o(t){nt(m.$$.fragment,t),d=!1},d(t){t&&$(e),ct(m)}}}var As=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,Ms,i,{})}}});function Bs(e){let n,o,r,s,a,i;return r=new Ps({props:{style:"float:left",text:"Previous",routeName:"rootRoute"}}),a=new Ps({props:{style:"float:right",text:"Next",routeName:"gettingStartedRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function ks(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g;return b=new qs({props:{$$slots:{default:[Bs]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Installation",o=x(),r=R("h5"),r.textContent="Via npm:",s=x(),a=R("pre"),a.textContent="npm install svelte-client-router",i=x(),l=R("h5"),l.textContent="Importing in your code:",c=x(),u=R("pre"),u.innerHTML='// This is just an example of all possibilities exported by the package\nimport { \n SCR_ROUTER_COMPONENT,\n SCR_ROUTER_LINK,\n SCR_ROUTER_STORE,\n SCR_CONFIG_STORE,\n SCR_NAVIGATE_STORE,\n pushRoute,\n backRoute,\n} from "svelte-client-router"',f=x(),p=R("center"),p.innerHTML='The configuration for this route.',h=x(),m=R("pre"),m.innerHTML='// This is an example of one route declaration.\n// This object must go inside of an array.\n// See the next chapter for more info!\n{\n name: "installationRoute",\n path: "/svelte-client-router/installation",\n lazyLoadComponent: () => import("./docs/pages/SCR_Installation.svelte"),\n title: "SCR - Installation",\n}',d=x(),it(b.$$.fragment),S(n,"class","scr-h4"),S(a,"class","scr-pre"),S(u,"class","scr-pre"),S(p,"class","scr-center"),S(m,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),lt(b,e,null),g=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),b.$set(n)},i(t){g||(et(b.$$.fragment,t),g=!0)},o(t){nt(b.$$.fragment,t),g=!1},d(t){t&&$(e),ct(b)}}}var Hs=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,ks,i,{})}}});function zs(e){let n,o,r,s,a,i;return r=new Ps({props:{style:"float:left",text:"Previous",routeName:"installationRoute"}}),a=new Ps({props:{style:"float:right",text:"Next",routeName:"configurationOptionsRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function Ds(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,w,_,T,E,O,j,L,q,N,I,P,F,M,A,B;return A=new qs({props:{$$slots:{default:[zs]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Getting Started",o=x(),r=R("h5"),r.textContent="Loading The Svelte Client Router",s=x(),a=R("pre"),a.innerHTML='import { \n SCR_ROUTER_COMPONENT,\n SCR_ROUTER_LINK,\n SCR_ROUTER_STORE,\n SCR_CONFIG_STORE,\n SCR_NAVIGATE_STORE,\n pushRoute,\n backRoute,\n} from "svelte-client-router"\n\n// Make sure to declare the default slot "<slot />" inside of your layout component\n// For more info about Svelte Slots\nimport MY_LAYOUT from "./path/to/my/MY_LAYOUT.svelte";',i=x(),l=R("br"),c=x(),u=R("h5"),u.textContent="Declaring Routes",f=x(),p=R("pre"),p.textContent='const routes = [\n {\n name: "root",\n path: "/",\n beforeEnter: [\n (resolve, rFrom, rTo, params, payload) => {\n resolve({ redirect: "/svelte-client-router" } );\n } ,\n ],\n } ,\n {\n name: "rootRoute",\n path: "/svelte-client-router",\n lazyLoadComponent: () => import("./docs/pages/SCR_Presentation.svelte"),\n title: "SCR - Presentation",\n } ,\n {\n name: "installationRoute",\n path: "/svelte-client-router/installation",\n lazyLoadComponent: () => import("./docs/pages/SCR_Installation.svelte"),\n title: "SCR - Installation",\n } ,\n {\n name: "gettingStartedRoute",\n path: "/svelte-client-router/gettingStarted",\n lazyLoadComponent: () => import("./docs/pages/SCR_GettingStarted.svelte"),\n title: "SCR - Getting Started",\n } ,\n ];\n}',h=x(),m=R("br"),d=x(),b=R("h5"),b.textContent="Using The Component",g=x(),C=R("pre"),C.textContent="",w=x(),_=R("p"),_.innerHTML="That is it. We are ready to route our application.\n
    \n
    \n Of course this is a very basic configuration though. Go through the next sections\n to learn about more advanced settings.",T=x(),E=R("br"),O=x(),j=R("h5"),j.textContent="Full Example",L=x(),q=R("pre"),q.innerHTML='// Svelte Component\n<script>\n\n// Importing Svelte Client Router\nimport { \n SCR_ROUTER_COMPONENT,\n SCR_ROUTER_LINK,\n SCR_ROUTER_STORE,\n SCR_CONFIG_STORE,\n SCR_NAVIGATE_STORE,\n pushRoute,\n backRoute,\n} from "svelte-client-router"\n\n// Make sure to declare the default slot "<slot />" inside of your layout component\n// For more info about Svelte Slots\n// Importing My Very Nice Layout\nimport MY_LAYOUT from "./path/to/my/MY_LAYOUT.svelte";\n\n// Setting Routes\nconst routes = [\n {\n // Doesn't declare a component because it redirects only!\n name: "root",\n path: "/",\n beforeEnter: [\n (resolve, rFrom, rTo, params, payload) => {\n resolve({ redirect: "/svelte-client-router" } );\n } ,\n ],\n } ,\n {\n name: "rootRoute",\n path: "/svelte-client-router",\n lazyLoadComponent: () => import("./docs/pages/SCR_Presentation.svelte"),\n title: "SCR - Presentation",\n } ,\n {\n name: "installationRoute",\n path: "/svelte-client-router/installation",\n lazyLoadComponent: () => import("./docs/pages/SCR_Installation.svelte"),\n title: "SCR - Installation",\n } ,\n {\n name: "gettingStartedRoute",\n path: "/svelte-client-router/gettingStarted",\n lazyLoadComponent: () => import("./docs/pages/SCR_GettingStarted.svelte"),\n title: "SCR - Getting Started",\n } ,\n ];\n}\n\n<script> \n\n<!-- Using SCR Router Component - passing routes and my custom layout -->\n<SCR_ROUTER_COMPONENT bind:routes defaultLayoutComponent={MY_LAYOUT} />',N=x(),I=R("center"),I.innerHTML='The configuration for this route.',P=x(),F=R("pre"),F.textContent='{\n name: "gettingStartedRoute",\n path: "/svelte-client-router/gettingStarted",\n lazyLoadComponent: () => import("./docs/pages/SCR_GettingStarted.svelte"),\n title: "SCR - Getting Started",\n}',M=x(),it(A.$$.fragment),S(n,"class","scr-h4"),S(a,"class","scr-pre"),S(p,"class","scr-pre"),S(C,"class","scr-pre"),S(_,"class","scr-text-justify"),S(q,"class","scr-pre"),S(I,"class","scr-center"),S(F,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,C),v(e,w),v(e,_),v(e,T),v(e,E),v(e,O),v(e,j),v(e,L),v(e,q),v(e,N),v(e,I),v(e,P),v(e,F),v(e,M),lt(A,e,null),B=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),A.$set(n)},i(t){B||(et(A.$$.fragment,t),B=!0)},o(t){nt(A.$$.fragment,t),B=!1},d(t){t&&$(e),ct(A)}}}var Us=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,Ds,i,{})}}});function Gs(e){let n,o,r,s,a,i;return r=new Ps({props:{style:"float:left",text:"Previous",routeName:"gettingStartedRoute"}}),a=new Ps({props:{style:"float:right",text:"Next",routeName:"configurationGlobalBeforeEnterOptionRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function Ws(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,w,_,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H,z,D,U,G,W,Y,V,K,J,X,Q,Z,tt,ot,rt,st,at,ut,ft,pt,ht,mt,dt,bt,gt,vt,yt,$t,Rt,Ct,xt,wt,_t,St,Tt,Et,Ot,jt,Lt,qt,Nt,It,Pt,Ft,Mt,At,Bt,kt,Ht,zt,Dt,Ut,Gt,Wt,Yt,Vt,Kt,Jt,Xt,Qt,Zt,te,ee,ne,oe,re,se,ae,ie,le,ce,ue,fe,pe,he,me,de,be;return de=new qs({props:{$$slots:{default:[Gs]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Configuration Options",o=x(),r=R("p"),r.innerHTML='The configuration are managed in a Svelte Store.\n The Svelte Store are one of the cooliest things in Svelte. Is very reactive and\n helps us to make our router reactive too. You can change the behaviour at any\n point and will instantly react to it.',s=x(),a=R("h5"),a.textContent="Importing",i=x(),l=R("pre"),l.innerHTML='// Importing configuration store\nimport { SCR_CONFIG_STORE } from "svelte-client-router"',c=x(),u=R("p"),u.textContent="Next.. lets check out all the available properties.",f=x(),p=R("hr"),h=x(),m=R("h4"),m.textContent="Hash Mode",d=x(),b=R("p"),b.innerHTML="The hashMode option controls either if our router must check a hashed\n based route like this site or must NOT consider a hashed based route\n path where the hash char doesn't mean much.\n
    \n
    \n This website for example must be hashed based because Github Pages is not prepared\n to return the index.html page for each route request.",g=x(),C=R("pre"),C.innerHTML='// ## Hash Mode checks route using #/ before the location path\n// ## for example http://localhost:5000/pathAAA#/pathBBB\n// ## it will consider only pathBBB and ignore pathAAA as path!\n// ## Boolean \n// ## Default value: false\n{\n hashMode: false,\n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setHashMode(true);',w=x(),_=R("hr"),T=x(),E=R("h4"),E.textContent="Navigation History Limit",O=x(),j=R("p"),j.innerHTML="The navigationHistoryLimit option sets the size of the navigation\n history. Inside the router store we have an array that contains all the\n route objects where the first position is the last page visited and the last\n position is the first page visited.\n
    \n
    \n If is set 0 or less it will be considered unlimited.",L=x(),q=R("pre"),q.innerHTML='// ## Navigation History Limit is the amount of route history is added \n// ## in the route navigation history list \n// ## 0 or -1 equals to "no limit"\n// ## Integer\n// ## Default value: 10\n{\n navigationHistoryLimit: 10, \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setNavigationHistoryLimit(10);',N=x(),I=R("hr"),P=x(),F=R("h4"),F.textContent="Save Mode",M=x(),A=R("p"),A.innerHTML="The saveMode option has the following options:",B=x(),k=R("ul"),k.innerHTML="
  • localstorage: (default) Saves the router store in the localstorage.
  • \n
  • indexeddb: Saves the router store in the Index DB Storage.
  • \n
  • none: Doesn't save the store anywhere.
  • ",H=x(),z=R("p"),z.textContent="The implications are implicit. Saving the route object helps us to keep\n track all the user history if you need that information when reloading the\n page.",D=x(),U=R("pre"),U.innerHTML='// ## Save mode sets the type of saving history route and store\n// ## It can be set to one of this following values:\n// ## - localstorage: it saves route in the localstorage\n// ## - indexeddb: it saves route in the IndexedDb \n// ## - none: Doesn't save anything - meaning when reload it starts fresh all values!\n// ## String\n// ## Default value: localstorage\n{\n saveMode: localstorage, \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setSaveMode("localstorage");',G=x(),W=R("hr"),Y=x(),V=R("h4"),V.textContent="Not Found Route",K=x(),J=R("p"),J.innerHTML="The notFoundRoute option sets the route to redirect to when the user\n enter a non existent url path.\n
    \n
    \n OBS: It has to start with "/"",X=x(),Q=R("pre"),Q.innerHTML='// ## Not Found Route Path\n// ## is the path that should redirect when not found a path in the application\n// ## String - must include "/"\n// ## Default value: /notFound\n{\n notFound: "/notFound", \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setNotFoundRoute("/notFound");',Z=x(),tt=R("hr"),ot=x(),rt=R("h4"),rt.textContent="Error Route",st=x(),at=R("p"),at.innerHTML="The errorRoute option sets the route to redirect to when an error\n occurs.\n
    \n
    \n OBS: It has to start with "/"",ut=x(),ft=R("pre"),ft.innerHTML='// ## Error Route Path\n// ## is the path that should redirect when an error occurs in the application\n// ## String - must include "/"\n// ## Default value: /error\n{\n notFound: "/error", \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setErrorRoute("/error");',pt=x(),ht=R("hr"),mt=x(),dt=R("h4"),dt.textContent="Console Log Error Messages",bt=x(),gt=R("p"),gt.innerHTML="The consoleLogErrorMessages option enables SCR to log all possible\n errors in the console log.\n
    \n
    \n When something goes wrong it helps to see the stack trace and the error messages.",vt=x(),yt=R("pre"),yt.innerHTML='// ## Console Log Error Messages logs in the console \n// ## any error messages of the SCR for debugging purposes\n// ## Boolean\n// ## Default value: true\n{\n consoleLogStores: true, \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setConsoleLogErrorMessages(true);',$t=x(),Rt=R("hr"),Ct=x(),xt=R("h4"),xt.textContent="Console Log Stores",wt=x(),_t=R("p"),_t.innerHTML="The consoleLogStores option enables SCR to log all changes in the\n stores.\n
    \n
    \n This is great for debugging purposes.",St=x(),Tt=R("pre"),Tt.innerHTML='// ## Console Log Stores logs in the console \n// ## any changes in the Router Store for debugging purposes\n// ## Boolean\n// ## Default value: true\n{\n setConsoleLogStores: true, \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setConsoleLogStores(true);',Et=x(),Ot=R("hr"),jt=x(),Lt=R("h4"),Lt.textContent="Uses Route Layout",qt=x(),Nt=R("p"),Nt.innerHTML="The usesRouteLayout option tells the SCR that you are going to use a\n Global Layout.\n
    \n
    \n You can set a layout per route, but most common cases you want to set a global\n layout and if necessary set a different route layout.\n
    \n
    \n The SCR has a default simple layout that you probably not going to use, so if\n you do not want to use a custom layout it is better to set this option to false.",It=x(),Pt=R("pre"),Pt.innerHTML='// ## Uses Route Layout defines if you will be using layout \n// ## for each route or not - can be ignored in the route \n// ## Boolean\n// ## Default value: true\n{\n usesRouteLayout: true, \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setUsesRouteLayout(true);',Ft=x(),Mt=R("hr"),At=x(),Bt=R("h4"),Bt.textContent="Consider Trailing Slash On Matching Route",kt=x(),Ht=R("p"),Ht.innerHTML="The considerTrailingSlashOnMatchingRoute option speaks for itself. When\n searching for a matching route a trailing slash should be considered or not.",zt=x(),Dt=R("pre"),Dt.innerHTML='// ## Consider Trailing Slash On Matching Route\n// ## add an slash in the end of the route path to search in the route definitions\n// ## Boolean\n// ## Default value: true\n{\nconsiderTrailingSlashOnMatchingRoute: true, \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setConsiderTrailingSlashOnMatchingRoute(true);',Ut=x(),Gt=R("hr"),Wt=x(),Yt=R("h4"),Yt.textContent="Use Scroll",Vt=x(),Kt=R("p"),Kt.innerHTML="The useScroll option tell SCR that you will be using a scroll\n behaviour globally. That means SCR will apply the global scrollProps\n configuration for each route entered if the route do not specify a differente\n scrollProps\n configuration or the ignoreScroll property.",Jt=x(),Xt=R("pre"),Xt.innerHTML='// ## Use Scroll - enable or disables scrolling on entering the route\n// ## Boolean\n// ## Default value: true\n{\nuseScroll: true, \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setUseScroll(true);',Qt=x(),Zt=R("hr"),te=x(),ee=R("h4"),ee.textContent="Scroll Props",ne=x(),oe=R("p"),oe.innerHTML="The scrollProps option is the behaviour options when the scrolling is enabled.\n It has the following options:",re=x(),se=R("ul"),se.innerHTML="
  • top: The top position to scroll - Default is 0
  • \n
  • left: The left position to scroll - Default is 0
  • \n
  • behaviour: The behaviour when scrolling to position - Default is\n "smooth"
  • \n
  • timeout: This options sets a timeout to fire the scrolling. The\n minimum value accepted is 10 milliseconds. Default is 10 milliseconds.
  • ",ae=x(),ie=R("pre"),ie.innerHTML='// ## Scroll Props\n// ## The scrolling props on entering the route if enabled\n// ## Default Values: \n// ## scrollProps: {\n// ## top: 0,\n// ## left: 0,\n// ## behaviour: "smooth",\n// ## timeout: 10, // timeout must be greater than 10 milliseconds\n// ## },\n// ## Object\n// ## Default value: {\n top: 0,\n left: 0,\n behaviour: "smooth", \n timeout: 10, // timeout must be greater than 10 milliseconds\n}\n{\nscrollProps: {\n top: 0,\n left: 0,\n behaviour: "smooth",\n timeout: 10, // timeout must be greater than 10 milliseconds\n}, \n\n// How to set in the store\nSCR_CONFIG_STORE.setScrollProps({\n top: 0,\n left: 0,\n behaviour: "smooth",\n timeout: 10,\n});',le=x(),ce=R("p"),ce.textContent="So that is it for this section. But the configuration store is not over yet.\n The next properties has its own sections each. Click next to see more\n information.",ue=x(),fe=R("center"),fe.innerHTML='The configuration for this route.',pe=x(),he=R("pre"),he.textContent='{\n name: "configurationOptionsRoute",\n path: "/svelte-client-router/configurationOptions",\n lazyLoadComponent: () => import("./docs/pages/SCR_ConfigurationOptions.svelte"),\n title: "SCR - Configuration Options",\n}',me=x(),it(de.$$.fragment),S(n,"class","scr-h4"),S(l,"class","scr-pre"),S(p,"class","scr-hr"),S(m,"class","scr-h4"),S(b,"class","scr-text-justify"),S(C,"class","scr-pre"),S(_,"class","scr-hr"),S(E,"class","scr-h4"),S(j,"class","scr-text-justify"),S(q,"class","scr-pre"),S(I,"class","scr-hr"),S(F,"class","scr-h4"),S(A,"class","scr-text-justify"),S(U,"class","scr-pre"),S(W,"class","scr-hr"),S(V,"class","scr-h4"),S(J,"class","scr-text-justify"),S(Q,"class","scr-pre"),S(tt,"class","scr-hr"),S(rt,"class","scr-h4"),S(at,"class","scr-text-justify"),S(ft,"class","scr-pre"),S(ht,"class","scr-hr"),S(dt,"class","scr-h4"),S(gt,"class","scr-text-justify"),S(yt,"class","scr-pre"),S(Rt,"class","scr-hr"),S(xt,"class","scr-h4"),S(_t,"class","scr-text-justify"),S(Tt,"class","scr-pre"),S(Ot,"class","scr-hr"),S(Lt,"class","scr-h4"),S(Nt,"class","scr-text-justify"),S(Pt,"class","scr-pre"),S(Mt,"class","scr-hr"),S(Bt,"class","scr-h4"),S(Ht,"class","scr-text-justify"),S(Dt,"class","scr-pre"),S(Gt,"class","scr-hr"),S(Yt,"class","scr-h4"),S(Kt,"class","scr-text-justify"),S(Xt,"class","scr-pre"),S(Zt,"class","scr-hr"),S(ee,"class","scr-h4"),S(oe,"class","scr-text-justify"),S(ie,"class","scr-pre"),S(ce,"class","scr-text-justify"),S(fe,"class","scr-center"),S(he,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,C),v(e,w),v(e,_),v(e,T),v(e,E),v(e,O),v(e,j),v(e,L),v(e,q),v(e,N),v(e,I),v(e,P),v(e,F),v(e,M),v(e,A),v(e,B),v(e,k),v(e,H),v(e,z),v(e,D),v(e,U),v(e,G),v(e,W),v(e,Y),v(e,V),v(e,K),v(e,J),v(e,X),v(e,Q),v(e,Z),v(e,tt),v(e,ot),v(e,rt),v(e,st),v(e,at),v(e,ut),v(e,ft),v(e,pt),v(e,ht),v(e,mt),v(e,dt),v(e,bt),v(e,gt),v(e,vt),v(e,yt),v(e,$t),v(e,Rt),v(e,Ct),v(e,xt),v(e,wt),v(e,_t),v(e,St),v(e,Tt),v(e,Et),v(e,Ot),v(e,jt),v(e,Lt),v(e,qt),v(e,Nt),v(e,It),v(e,Pt),v(e,Ft),v(e,Mt),v(e,At),v(e,Bt),v(e,kt),v(e,Ht),v(e,zt),v(e,Dt),v(e,Ut),v(e,Gt),v(e,Wt),v(e,Yt),v(e,Vt),v(e,Kt),v(e,Jt),v(e,Xt),v(e,Qt),v(e,Zt),v(e,te),v(e,ee),v(e,ne),v(e,oe),v(e,re),v(e,se),v(e,ae),v(e,ie),v(e,le),v(e,ce),v(e,ue),v(e,fe),v(e,pe),v(e,he),v(e,me),lt(de,e,null),be=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),de.$set(n)},i(t){be||(et(de.$$.fragment,t),be=!0)},o(t){nt(de.$$.fragment,t),be=!1},d(t){t&&$(e),ct(de)}}}var Ys=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,Ws,i,{})}}});function Vs(e){let n,o,r,s,a,i,l,c,u;return{c(){n=R("h4"),n.textContent="Anatomy of the Before Enter Function",o=x(),r=R("p"),r.textContent="When declaring a Before Enter function it will be provided some cool\n parameters for you to play with. Lets check them in order of declaration:",s=x(),a=R("pre"),a.innerHTML='// Example of one before enter function declaration\n(resolve, routeFrom, routeTo, routeObjParams, payload) => { \n resolve(true); \n}',i=x(),l=R("ul"),l.innerHTML='
  • resolve: The first param is the a solvable function. When all the\n code has executed you must call this function to end it. Note that there\n isn't a reject call as one might expect.\n
    \n You always solve the Before Function with resolve! The resolve function can receive\n the following parameters:\n
    • true: When is everything ok and should continue execution. For example:\n resolve(true)
    • \n
    • false: When something went wrong and should stop execution. For example:\n resolve(false) or resolve()
    • \n
    • { redirect: "/somePath" }: To redirect to another\n route. This means that it will not continue executing the Before Enter\n sequence and just will redirect to the specified path.\n
      \n For example: resolve({ redirect: "/somePath" })\n
      \n
    • \n
    • { path: "/somePath" }: To redirect to another route.\n This means that it will not continue executing the Before Enter sequence\n and just will redirect to the specified path.\n
      \n For example: resolve({ path: "/somePath" })\n
      \n
    • \n
    • { name: "routeName" }: To redirect to another route by\n name. This means that it will not continue executing the Before Enter\n sequence and just will redirect to the specified route name.\n
      \n For example: resolve({ name: "someRouteName" })\n
      \n
  • \n
  • routeFrom: This is an object containing the values of the route which\n is coming from. This object has the following values:\n
    • name: The name of the route
    • \n
    • hash: The hash value of the route
    • \n
    • hostname: The hostname of the route. For example: "localhost"
    • \n
    • origin: The origin of the route. For example:\n "http://localhost:5000"
    • \n
    • params: The query params of the route. For example: {\n testParam: "someParamValue" }
    • \n
    • pathname: The path of the route. For example:\n "/svelte-client-router/configurationBeforeEnter"
    • \n
    • port: The port of the host. For example: "5000"
    • \n
    • protocol: The protocol used. For example: "http:"
  • \n
    \n
  • routeTo: This is an object containing the values of the route which\n is going to. This object has the following values:\n
    • name: The name of the route
    • \n
    • hash: The hash value of the route
    • \n
    • hostname: The hostname of the route. For example: "localhost"
    • \n
    • origin: The origin of the route. For example:\n "http://localhost:5000"
    • \n
    • params: The query params of the route. For example: {\n testParam: "someParamValue" }
    • \n
    • pathname: The path of the route. For example:\n "/svelte-client-router/configurationBeforeEnter"
    • \n
    • port: The port of the host. For example: "5000"
    • \n
    • protocol: The protocol used. For example: "http:"
  • \n
    \n
  • routeObjectParam: All the parameters passed to this route set in the\n route object definition until the execution of this before enter. Order of declaration matters.\n It will include any defined payload properties.
  • \n
    \n
  • payload: This is an special object. You can set parameters to pass\n forward down the chain of before enter funcions execution. This variable\n will be made available in all the component and layout components.\n
    \n OBS: DO NOT REDEFINE THIS OBJECT - because you will lose all previous\n properties set and it will reset the object not sending the new definition\n that you made for this object.
  • ',c=x(),u=R("p"),u.textContent="So that is it for this section. This is a powerfull feature enables us to\n control for each route necessary security of overall behaviour.",S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(a,"class","scr-pre"),S(u,"class","scr-text-justify")},m(t,e){y(t,n,e),y(t,o,e),y(t,r,e),y(t,s,e),y(t,a,e),y(t,i,e),y(t,l,e),y(t,c,e),y(t,u,e)},p:t,i:t,o:t,d(t){t&&$(n),t&&$(o),t&&$(r),t&&$(s),t&&$(a),t&&$(i),t&&$(l),t&&$(c),t&&$(u)}}}class Ks extends pt{constructor(t){super(),ft(this,t,null,Vs,i,{})}}function Js(t){let e;return{c(){e=R("a"),e.textContent="Route Object Properties",S(e,"href","/"),O(e,"pointer-events","none")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function Xs(e){let n,o,r,s,a,i;return r=new Ps({props:{style:"float:left",text:"Previous",routeName:"configurationOptionsRoute"}}),a=new Ps({props:{style:"float:right",text:"Next",routeName:"configurationOnErrorOptionRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function Qs(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,w,_,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H,z,D,U,G,W,Y,V,K;return L=new ts({props:{to:{name:"routeObjectOptionsRoute"},elementProps:{style:"display: inline; cursor: pointer;"},$$slots:{default:[Js]},$$scope:{ctx:t}}}),z=new Ks({}),V=new qs({props:{$$slots:{default:[Xs]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Configuration - Before Enter Function",o=x(),r=R("p"),s=C("The "),a=R("b"),a.textContent="beforeEnter",i=C(" option sets an array of functions or just a function\n that must be executed for before each route if the option\n "),l=R("b"),l.textContent="ignoreGlobalBeforeFunction",c=C("\n isn't set in the route definition object.\n "),u=R("br"),f=x(),p=R("br"),h=C("\n The default order of execution is first execute all Global Before Functions and\n then execute route object before enter functions. But for a particular route\n the behaviour maybe different. Maybe it is needed to execute the route before\n function before Global Before Functions.\n "),m=R("br"),d=x(),b=R("br"),g=C("\n If that is the case then you can set in the route object the option\n "),w=R("b"),w.textContent="executeRouteBEFBeforeGlobalBEF",_=C(" to true. When this option is enabled\n in the route definition object the default order of execution is overrided\n and executes route object before functions before Global Before Functions.\n "),T=R("br"),E=x(),O=R("br"),j=C("\n See the "),it(L.$$.fragment),q=C(" for more info.\n "),N=R("br"),I=x(),P=R("br"),F=C("\n See the next example of how to set this option:"),M=x(),A=R("pre"),A.innerHTML='// importing the SCR - The configuration store\nimport { SCR_CONFIG_STORE } from "svelte-client-router"\n\n// ------ SETTING A FUNCTION ------\n// Setting Global Before Enter Function\nSCR_CONFIG_STORE.setBeforeEnter((resolve) => { resolve(true); });\n\n// OR\n\n// ------ SETTING AN ARRAY OF FUNCTIONS ------\n// Setting Global Before Enter Functions\n// You can set as many Before Enter Functions as you want!\nSCR_CONFIG_STORE.setBeforeEnter([\n (resolve) => { resolve(true); },\n (resolve) => { resolve(true); },\n (resolve) => { resolve(true); },\n]);',B=x(),k=R("br"),H=x(),it(z.$$.fragment),D=x(),U=R("center"),U.innerHTML='The configuration for this route.',G=x(),W=R("pre"),W.textContent='{\n name: "configurationGlobalBeforeEnterOptionRoute",\n path: "/svelte-client-router/configurationBeforeEnter",\n lazyLoadComponent: () => import("./docs/pages/SCR_ConfigurationBeforeEnter.svelte"),\n title: "SCR - Configuration - Before Enter",\n}',Y=x(),it(V.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(A,"class","scr-pre"),S(U,"class","scr-center"),S(W,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(r,s),v(r,a),v(r,i),v(r,l),v(r,c),v(r,u),v(r,f),v(r,p),v(r,h),v(r,m),v(r,d),v(r,b),v(r,g),v(r,w),v(r,_),v(r,T),v(r,E),v(r,O),v(r,j),lt(L,r,null),v(r,q),v(r,N),v(r,I),v(r,P),v(r,F),v(e,M),v(e,A),v(e,B),v(e,k),v(e,H),lt(z,e,null),v(e,D),v(e,U),v(e,G),v(e,W),v(e,Y),lt(V,e,null),K=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),L.$set(n);const o={};1&e&&(o.$$scope={dirty:e,ctx:t}),V.$set(o)},i(t){K||(et(L.$$.fragment,t),et(z.$$.fragment,t),et(V.$$.fragment,t),K=!0)},o(t){nt(L.$$.fragment,t),nt(z.$$.fragment,t),nt(V.$$.fragment,t),K=!1},d(t){t&&$(e),ct(L),ct(z),ct(V)}}}var Zs=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,Qs,i,{})}}});function ta(e){let n,o,r,s,a,i,l;return{c(){n=R("h4"),n.textContent="Anatomy of the On Error Function",o=x(),r=R("p"),r.innerHTML="When declaring a On Error Function it will be provided some parameters for you\n to deal with the issue.\n
    \n Lets check them in order of declaration:",s=x(),a=R("pre"),a.innerHTML='// Example of On Error function declaration\n(err, routeObjParams) => { \n console.error(err);\n}',i=x(),l=R("ul"),l.innerHTML="
  • err: The error object containing the error information
  • \n
  • routeObjParams: All the parameters passed until that error has\n occurred.\n
    \n This is a composed object and it has the following parameters:\n
    • currentRoute: The current route object containing the\n information of the route that the user is trying to access. It is\n composed by the following params:\n
      • name: The name of the route
      • \n
      • hash: The hash value of the route
      • \n
      • hostname: The hostname of the route. For example: "localhost"
      • \n
      • origin: The origin of the route. For example:\n "http://localhost:5000"
      • \n
      • params: The query params of the route. For example: {\n testParam: "someParamValue" }
      • \n
      • pathname: The path of the route. For example:\n "/svelte-client-router/configurationBeforeEnter"
      • \n
      • port: The port of the host. For example: "5000"
      • \n
      • protocol: The protocol used. For example: "http:"
    • \n
      \n
    • fromRoute: The coming from route object containing the\n information of the route that the user is coming from. It is composed by\n the following params:\n
      • name: The name of the route
      • \n
      • hash: The hash value of the route
      • \n
      • hostname: The hostname of the route. For example: "localhost"
      • \n
      • origin: The origin of the route. For example:\n "http://localhost:5000"
      • \n
      • params: The query params of the route. For example: {\n testParam: "someParamValue" }
      • \n
      • pathname: The path of the route. For example:\n "/svelte-client-router/configurationBeforeEnter"
      • \n
      • port: The port of the host. For example: "5000"
      • \n
      • protocol: The protocol used. For example: "http:"
    • \n
      \n
    • routeObjParams: all the parameters passed until the moment of the\n error, including any defined payload properties.
  • ",S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(a,"class","scr-pre")},m(t,e){y(t,n,e),y(t,o,e),y(t,r,e),y(t,s,e),y(t,a,e),y(t,i,e),y(t,l,e)},p:t,i:t,o:t,d(t){t&&$(n),t&&$(o),t&&$(r),t&&$(s),t&&$(a),t&&$(i),t&&$(l)}}}class ea extends pt{constructor(t){super(),ft(this,t,null,ta,i,{})}}function na(t){let e;return{c(){e=R("a"),e.textContent="Route Component Components",S(e,"href","/"),O(e,"pointer-events","none")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function oa(e){let n,o,r,s,a,i;return r=new Ps({props:{style:"float:left",text:"Previous",routeName:"configurationGlobalBeforeEnterOptionRoute"}}),a=new Ps({props:{style:"float:right",text:"Next",routeName:"routeObjectOptionsRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function ra(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,w,_,T,E,O,j,L,q,N,I,P,F,M;return m=new ts({props:{to:{name:"routeComponentComponentsRoute"},elementProps:{style:"display: inline; cursor: pointer;"},$$slots:{default:[na]},$$scope:{ctx:t}}}),E=new ea({}),F=new qs({props:{$$slots:{default:[oa]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Configuration - On Error Function",o=x(),r=R("p"),s=C("The "),a=R("b"),a.textContent="onError",i=C(" option sets a function that is going to be executed for\n any route when something goes wrong.\n "),l=R("br"),c=x(),u=R("br"),f=C("\n When that happens the natural behaviour is to open the error page. In this context\n SCR has a very basic error component that comes with it. You can of course set\n you own error component and it is encouraged to do so.\n "),p=R("br"),h=C("\n See the "),it(m.$$.fragment),d=C(" for more info."),b=x(),g=R("pre"),g.innerHTML='// importing the SCR - The configuration store\nimport { SCR_CONFIG_STORE } from "svelte-client-router"\n\n// Setting Global On Error Function\nSCR_CONFIG_STORE.setOnError((err, routeObjParams) => { console.error(err) });',w=x(),_=R("br"),T=x(),it(E.$$.fragment),O=x(),j=R("p"),j.textContent="So that is it for this section. This feature enables us to handle any errors\n that may occur inside our routing definitions.",L=x(),q=R("center"),q.innerHTML='The configuration for this route.',N=x(),I=R("pre"),I.textContent='{\n name: "configurationOnErrorOptionRoute",\n path: "/svelte-client-router/configurationOnError",\n lazyLoadComponent: () => import("./docs/pages/SCR_ConfigurationOnError.svelte"),\n title: "SCR - Configuration - On Error",\n}',P=x(),it(F.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(g,"class","scr-pre"),S(j,"class","scr-text-justify"),S(q,"class","scr-center"),S(I,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(r,s),v(r,a),v(r,i),v(r,l),v(r,c),v(r,u),v(r,f),v(r,p),v(r,h),lt(m,r,null),v(r,d),v(e,b),v(e,g),v(e,w),v(e,_),v(e,T),lt(E,e,null),v(e,O),v(e,j),v(e,L),v(e,q),v(e,N),v(e,I),v(e,P),lt(F,e,null),M=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),m.$set(n);const o={};1&e&&(o.$$scope={dirty:e,ctx:t}),F.$set(o)},i(t){M||(et(m.$$.fragment,t),et(E.$$.fragment,t),et(F.$$.fragment,t),M=!0)},o(t){nt(m.$$.fragment,t),nt(E.$$.fragment,t),nt(F.$$.fragment,t),M=!1},d(t){t&&$(e),ct(m),ct(E),ct(F)}}}var sa=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,ra,i,{})}}});function aa(e){let n,o,r,s,a,i;return r=new Ps({props:{style:"float:left",text:"Previous",routeName:"configurationOnErrorOptionRoute"}}),a=new Ps({props:{style:"float:right",text:"Next",routeName:"routeObjectBeforeEnterRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function ia(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,w,_,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H,z,D,U,G,W,Y,V,K,J,X,Q,Z,tt,ot,rt,st,at,ut,ft,pt,ht,mt,dt,bt,gt,vt,yt,$t,Rt,Ct,xt,wt,_t,St,Tt,Et,Ot,jt,Lt,qt,Nt,It,Pt,Ft,Mt,At,Bt,kt,Ht,zt,Dt,Ut,Gt,Wt,Yt,Vt,Kt,Jt,Xt,Qt,Zt,te,ee,ne,oe,re,se,ae,ie,le,ce,ue,fe,pe,he,me,de,be,ge,ve,ye,$e,Re,Ce,xe,we,_e,Se,Te,Ee,Oe,je,Le,qe,Ne,Ie,Pe,Fe;return Pe=new qs({props:{$$slots:{default:[aa]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Route Object - Properties",o=x(),r=R("p"),r.innerHTML="This is where we can declare our routes. It has several option that\n modelates the route behaviour.\n
    \n There is some mandatory properties that configure a minimal route declaration.\n Lets check each option:",s=x(),a=R("hr"),i=x(),l=R("h4"),l.textContent="Name",c=x(),u=R("p"),u.innerHTML="The name option is mandatory. It an humam readable identification for\n this route.\n
    \n As it is an identification property must be unique. If some route is declared\n with the same name, it will always find the first route with that name and route\n to it.",f=x(),p=R("pre"),p.innerHTML='// ## Route Name\n// ## The name identifying this route\n// ## String - Obrigatory\n// ## Default value: none\n{\n name: "exampleOfRouteName",\n}',h=x(),m=R("hr"),d=x(),b=R("h4"),b.textContent="Path",g=x(),C=R("p"),C.innerHTML="The path is mandatory and it is the path to route to.\n
    \n
    \n As it is an identification property must be unique. If some route is declared\n with the same path, it will always find the first route with that path and route\n to it.",w=x(),_=R("pre"),_.innerHTML='// ## Route Path\n// ## The path identifying this route\n// ## String - Obrigatory\n// ## Default value: none\n{\n path: "/path/to/my/route",\n}',T=x(),E=R("hr"),O=x(),j=R("h4"),j.textContent="Component",L=x(),q=R("p"),q.innerHTML="The component is partially mandatory. This is because if the route\n only redirects, it will not use the loaded component.\n
    \n
    \n The component specified will be included inside the default slot of the Layout\n Component.",N=x(),I=R("pre"),I.innerHTML='// ## Component - the loaded component that is going to be used \n// for this route\n// ## Function - Imported component for this route\n// ## Default value: none\n\n// Import your component\nimport SCR_C1 from "./testComponents/SCR_C1.svelte";\n\n{\n // Setting your route component\n component: SCR_C1,\n}',P=x(),F=R("hr"),M=x(),A=R("h4"),A.textContent="Lazy Load Component",B=x(),k=R("p"),k.innerHTML="The lazyLoadComponent is partially mandatory. This is because if the\n route only redirects, it will not load any component.\n
    \n
    \n The component specified will be included inside the default slot of the Layout\n Component.",H=x(),z=R("pre"),z.innerHTML='// ## Lazy Load Component - the component that must be loaded to be used \n// ## for this route\n// ## Function - Function to load the component for this route\n// ## Default value: none\n\n{\n // Lazy loading your route component\n lazyLoadComponent: () => import("./testComponents/SCR_C1.svelte"),\n}',D=x(),U=R("hr"),G=x(),W=R("h4"),W.textContent="Layout Component",Y=x(),V=R("p"),V.innerHTML="The layoutComponent is a custom loaded layout to use with this\n specific route. When set it will override any global layout set for this\n route only.\n
    \n
    \n The layout component specified must have a default slot declared to include route\n component.",K=x(),J=R("pre"),J.innerHTML='// ## Layout Component - the layout component that is going to be used \n// ## for this route\n// ## Function - Imported layout component for this route\n// ## Default value: none\n\n// Import your component\nimport SRC_Layout from "./testComponents/SRC_Layout.svelte";\n\n{\n // Setting your route layout component\n layoutComponent: SRC_Layout,\n}',X=x(),Q=R("hr"),Z=x(),tt=R("h4"),tt.textContent="Lazy Load Layout Component",ot=x(),rt=R("p"),rt.innerHTML="The lazyLoadLayoutComponent is a custom layout to be loaded to use\n with this specific route. When set it will override any global layout set\n for this route only.\n
    \n
    \n The lazy layout component specified must have a default slot declared to include\n route component.",st=x(),at=R("pre"),at.innerHTML='// ## Lazy Load Layout Component - the layout component that must be loaded to be used \n// ## for this route\n// ## Function - Function to load the layout component for this route\n// ## Default value: none\n\n{\n // Lazy loading your route layout component\n lazyLoadLayoutComponent: () => import("./testComponents/SRC_Layout.svelte"),\n}',ut=x(),ft=R("hr"),pt=x(),ht=R("h4"),ht.textContent="Params",mt=x(),dt=R("p"),dt.innerHTML="The params option is an object that must be available on before enter\n functions or even the components.\n
    \n It will be available at any moment for you. Of course this is some fixed values.\n See the payload param in the before enter sections to pass some custom values\n between functions.",bt=x(),gt=R("pre"),gt.innerHTML='// ## Params - all the params the should be available\n// for this route on any Before Enter Execution or \n// After Before Enter Execution\n// ## Object\n// ## Default value: {}\n{\n params: { \n myParam: "My Custom Param", \n },\n}',vt=x(),yt=R("hr"),$t=x(),Rt=R("h4"),Rt.textContent="Loading Props",Ct=x(),xt=R("p"),xt.innerHTML="The loadingProps option is an object that will be available on\n loading component.\n
    \n When routing the user may be waiting for some request to return and for that\n SCR makes available a loading component. Of course you can override it and you\n are encouraged to do so.\n
    \n
    \n Any properties set here will be delivered to the loading component.",wt=x(),_t=R("pre"),_t.innerHTML='// ## Loading Props - all props that must be available to\n// loading component when it is triggered\n// ## Object\n// ## Default value: {}\n{\n loadingProps: { loadingText: "Carregando..." },\n}',St=x(),Tt=R("hr"),Et=x(),Ot=R("h4"),Ot.textContent="Ignore Layout",jt=x(),Lt=R("p"),Lt.innerHTML="The ignoreLayout option when set to true, ignores any layout defined to\n this specific route.",qt=x(),Nt=R("pre"),Nt.innerHTML='// ## Ignore Layout - if should ignore layout component\n// ## when you do not want to use global or local layout component\n// ## Boolean\n// ## Default value: false\n{\n ignoreLayout: false,\n}',It=x(),Pt=R("hr"),Ft=x(),Mt=R("h4"),Mt.textContent="Ignore Scroll",At=x(),Bt=R("p"),Bt.innerHTML="The ignoreScroll option when set to true, ignores any scroll behaviour\n defined.",kt=x(),Ht=R("pre"),Ht.innerHTML='// ## Ignore Scroll - if this route should ignore scrolling\n// ## Boolean\n// ## Default value: false\n{\n ignoreScroll: false,\n}',zt=x(),Dt=R("hr"),Ut=x(),Gt=R("h4"),Gt.textContent="Scroll Props",Wt=x(),Yt=R("p"),Yt.innerHTML="The scrollProps option overrides the store scrollProps configuration\n for this specific route.",Vt=x(),Kt=R("pre"),Kt.innerHTML='// ## Scroll Props\n// ## The scrolling props on entering the route if enabled\n// ## Default Values: \n// ## Object\n// ## Default value: configuration store\n{\n scrollProps: {\n top: 0,\n left: 0,\n behavior: "smooth",\n timeout: 10, // timeout must be greater than 10 milliseconds\n },\n}',Jt=x(),Xt=R("hr"),Qt=x(),Zt=R("h4"),Zt.textContent="Title",te=x(),ee=R("p"),ee.innerHTML="The title option sets when enters the route the page title.",ne=x(),oe=R("pre"),oe.innerHTML='// ## Title - it defines the route title\n// ## String\n// ## Default value: none\n{\n title: "Route Object - Options",\n}',re=x(),se=R("hr"),ae=x(),ie=R("h4"),ie.textContent="Ignore Global Before Function",le=x(),ce=R("p"),ce.innerHTML="The ignoreGlobalBeforeFunction option when is true will not execute any\n Global Before Enter functions for this specific route.",ue=x(),fe=R("pre"),fe.innerHTML='// ## Ignore Global Before Function - \n// ## if should ignore defined global before function \n// ## Boolean\n// ## Default value: false\n{\n ignoreGlobalBeforeFunction: false,\n}',pe=x(),he=R("hr"),me=x(),de=R("h4"),de.textContent="Execute Route BEF Before Global BEF",be=x(),ge=R("p"),ge.innerHTML="The executeRouteBEFBeforeGlobalBEF option when is true will modify\n the default behaviour of the SCR. The SCR always runs Global Before Enter\n Functions before Route Before Enter Functions, but is different when this\n option is true.\n
    \n When set to true it will execute Route Before Functions before Global Before\n Functions.",ve=x(),ye=R("pre"),ye.innerHTML='// ## Execute Route Before Enter Function Before Global Before Function \n// ## if should execute route before function sequence before \n// ## global before enter execution\n// ## Boolean \n// ## Default value: false\n{\n executeRouteBEFBeforeGlobalBEF: false,\n}',$e=x(),Re=R("hr"),Ce=x(),xe=R("h4"),xe.textContent="Force Reload",we=x(),_e=R("p"),_e.innerHTML="The forceReload option when is true will not reload the route when\n the route is already loaded. The user may click in a button that pushes to\n the current route. The default behaviour is just not to reload the route.\n
    \n
    \n But maybe this is a feature you want to execute.",Se=x(),Te=R("pre"),Te.innerHTML='// ## Force Reload - when in opened route try to push the same route\n// by using pushRoute function\n// When enabled it will reload the current route as if it was not opened\n// ## Boolean\n// ## Default value: false\n{\n forceReload: false,\n}',Ee=x(),Oe=R("p"),Oe.textContent="So that is it for this section. But it is not the end of the Route Options.\n See the next section to more info.",je=x(),Le=R("center"),Le.innerHTML='The configuration for this route.',qe=x(),Ne=R("pre"),Ne.textContent='{\n name: "routeObjectOptionsRoute",\n path: "/svelte-client-router/routeObjectOptions",\n lazyLoadComponent: () => import("./docs/pages/SCR_RouteObjectProperties.svelte"),\n title: "SCR - Route Object - Options",\n}',Ie=x(),it(Pe.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(a,"class","scr-hr"),S(l,"class","scr-h4"),S(u,"class","scr-text-justify"),S(p,"class","scr-pre"),S(m,"class","scr-hr"),S(b,"class","scr-h4"),S(C,"class","scr-text-justify"),S(_,"class","scr-pre"),S(E,"class","scr-hr"),S(j,"class","scr-h4"),S(q,"class","scr-text-justify"),S(I,"class","scr-pre"),S(F,"class","scr-hr"),S(A,"class","scr-h4"),S(k,"class","scr-text-justify"),S(z,"class","scr-pre"),S(U,"class","scr-hr"),S(W,"class","scr-h4"),S(V,"class","scr-text-justify"),S(J,"class","scr-pre"),S(Q,"class","scr-hr"),S(tt,"class","scr-h4"),S(rt,"class","scr-text-justify"),S(at,"class","scr-pre"),S(ft,"class","scr-hr"),S(ht,"class","scr-h4"),S(dt,"class","scr-text-justify"),S(gt,"class","scr-pre"),S(yt,"class","scr-hr"),S(Rt,"class","scr-h4"),S(xt,"class","scr-text-justify"),S(_t,"class","scr-pre"),S(Tt,"class","scr-hr"),S(Ot,"class","scr-h4"),S(Lt,"class","scr-text-justify"),S(Nt,"class","scr-pre"),S(Pt,"class","scr-hr"),S(Mt,"class","scr-h4"),S(Bt,"class","scr-text-justify"),S(Ht,"class","scr-pre"),S(Dt,"class","scr-hr"),S(Gt,"class","scr-h4"),S(Yt,"class","scr-text-justify"),S(Kt,"class","scr-pre"),S(Xt,"class","scr-hr"),S(Zt,"class","scr-h4"),S(ee,"class","scr-text-justify"),S(oe,"class","scr-pre"),S(se,"class","scr-hr"),S(ie,"class","scr-h4"),S(ce,"class","scr-text-justify"),S(fe,"class","scr-pre"),S(he,"class","scr-hr"),S(de,"class","scr-h4"),S(ge,"class","scr-text-justify"),S(ye,"class","scr-pre"),S(Re,"class","scr-hr"),S(xe,"class","scr-h4"),S(_e,"class","scr-text-justify"),S(Te,"class","scr-pre"),S(Oe,"class","scr-text-justify"),S(Le,"class","scr-center"),S(Ne,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,C),v(e,w),v(e,_),v(e,T),v(e,E),v(e,O),v(e,j),v(e,L),v(e,q),v(e,N),v(e,I),v(e,P),v(e,F),v(e,M),v(e,A),v(e,B),v(e,k),v(e,H),v(e,z),v(e,D),v(e,U),v(e,G),v(e,W),v(e,Y),v(e,V),v(e,K),v(e,J),v(e,X),v(e,Q),v(e,Z),v(e,tt),v(e,ot),v(e,rt),v(e,st),v(e,at),v(e,ut),v(e,ft),v(e,pt),v(e,ht),v(e,mt),v(e,dt),v(e,bt),v(e,gt),v(e,vt),v(e,yt),v(e,$t),v(e,Rt),v(e,Ct),v(e,xt),v(e,wt),v(e,_t),v(e,St),v(e,Tt),v(e,Et),v(e,Ot),v(e,jt),v(e,Lt),v(e,qt),v(e,Nt),v(e,It),v(e,Pt),v(e,Ft),v(e,Mt),v(e,At),v(e,Bt),v(e,kt),v(e,Ht),v(e,zt),v(e,Dt),v(e,Ut),v(e,Gt),v(e,Wt),v(e,Yt),v(e,Vt),v(e,Kt),v(e,Jt),v(e,Xt),v(e,Qt),v(e,Zt),v(e,te),v(e,ee),v(e,ne),v(e,oe),v(e,re),v(e,se),v(e,ae),v(e,ie),v(e,le),v(e,ce),v(e,ue),v(e,fe),v(e,pe),v(e,he),v(e,me),v(e,de),v(e,be),v(e,ge),v(e,ve),v(e,ye),v(e,$e),v(e,Re),v(e,Ce),v(e,xe),v(e,we),v(e,_e),v(e,Se),v(e,Te),v(e,Ee),v(e,Oe),v(e,je),v(e,Le),v(e,qe),v(e,Ne),v(e,Ie),lt(Pe,e,null),Fe=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),Pe.$set(n)},i(t){Fe||(et(Pe.$$.fragment,t),Fe=!0)},o(t){nt(Pe.$$.fragment,t),Fe=!1},d(t){t&&$(e),ct(Pe)}}}var la=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,ia,i,{})}}});function ca(t){let e;return{c(){e=R("a"),e.textContent="Route Object Properties",S(e,"href","/"),O(e,"pointer-events","none")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function ua(e){let n,o,r,s,a,i;return r=new Ps({props:{style:"float:left",text:"Previous",routeName:"routeObjectOptionsRoute"}}),a=new Ps({props:{style:"float:right",text:"Next",routeName:"routeObjectAfterBeforeEnterRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function fa(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,w,_,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H,z,D,U,G,W,Y;return L=new ts({props:{to:{name:"routeObjectOptionsRoute"},elementProps:{style:"display: inline; cursor: pointer;"},$$slots:{default:[ca]},$$scope:{ctx:t}}}),k=new Ks({}),W=new qs({props:{$$slots:{default:[ua]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Route Object - Before Enter Functions",o=x(),r=R("p"),s=C("The "),a=R("b"),a.textContent="beforeEnter",i=C(" option sets an array of functions or just a function\n that must be executed for before each route if the option\n "),l=R("b"),l.textContent="ignoreGlobalBeforeFunction",c=C("\n isn't set in the route definition object.\n "),u=R("br"),f=x(),p=R("br"),h=C("\n The default order of execution is first execute all Global Before Functions and\n then execute route object before enter functions. But for a particular route\n the behaviour maybe different. Maybe it is needed to execute the route before\n function before Global Before Functions.\n "),m=R("br"),d=x(),b=R("br"),g=C("\n If that is the case then you can set in the route object the option\n "),w=R("b"),w.textContent="executeRouteBEFBeforeGlobalBEF",_=C(" to true. When this option is enabled\n in the route definition object the default order of execution is overrided\n and executes route object before functions before Global Before Functions.\n "),T=R("br"),E=x(),O=R("br"),j=C("\n See the "),it(L.$$.fragment),q=C(" for more info.\n "),N=R("br"),I=x(),P=R("br"),F=C("\n See the next example of how to set this option:"),M=x(),A=R("pre"),A.innerHTML='// ------ SETTING A FUNCTION ------\n// Setting Route Before Enter Function\n{\n beforeEnter((resolve) => { resolve(true); });\n}\n// OR\n\n// ------ SETTING AN ARRAY OF FUNCTIONS ------\n// Setting Route Before Enter Functions\n// You can set as many Before Enter Functions as you want!\n{\n beforeEnter([\n (resolve) => { resolve(true); },\n (resolve) => { resolve(true); },\n (resolve) => { resolve(true); },\n ]);\n}',B=x(),it(k.$$.fragment),H=x(),z=R("center"),z.innerHTML='The configuration for this route.',D=x(),U=R("pre"),U.textContent='{\n name: "routeObjectBeforeEnterRoute",\n path: "/svelte-client-router/routeObjectBeforeEnter",\n lazyLoadComponent: () => import("./docs/pages/SCR_RouteObjectBeforeEnter.svelte"),\n title: "SCR - Route Object - Before Enter Functions",\n}',G=x(),it(W.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(A,"class","scr-pre"),S(z,"class","scr-center"),S(U,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(r,s),v(r,a),v(r,i),v(r,l),v(r,c),v(r,u),v(r,f),v(r,p),v(r,h),v(r,m),v(r,d),v(r,b),v(r,g),v(r,w),v(r,_),v(r,T),v(r,E),v(r,O),v(r,j),lt(L,r,null),v(r,q),v(r,N),v(r,I),v(r,P),v(r,F),v(e,M),v(e,A),v(e,B),lt(k,e,null),v(e,H),v(e,z),v(e,D),v(e,U),v(e,G),lt(W,e,null),Y=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),L.$set(n);const o={};1&e&&(o.$$scope={dirty:e,ctx:t}),W.$set(o)},i(t){Y||(et(L.$$.fragment,t),et(k.$$.fragment,t),et(W.$$.fragment,t),Y=!0)},o(t){nt(L.$$.fragment,t),nt(k.$$.fragment,t),nt(W.$$.fragment,t),Y=!1},d(t){t&&$(e),ct(L),ct(k),ct(W)}}}var pa=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,fa,i,{})}}});function ha(e){let n,o,r,s,a,i;return r=new Ps({props:{style:"float:left",text:"Previous",routeName:"routeObjectBeforeEnterRoute"}}),a=new Ps({props:{style:"float:right",text:"Next",routeName:"routeObjectOnErrorRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function ma(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,w,_,T,E,O;return E=new qs({props:{$$slots:{default:[ha]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Route Object - After Before Enter Function",o=x(),r=R("p"),r.innerHTML="The afterEnter option sets a function that must be executed for this\n specific route when finishing routing. This function will not redirect or\n avoid entering the route. The permission to enter has been granted already\n by passing all the before enter functions.\n
    \n
    \n So this function is more like a customization before enter. Here you can override\n the title of the route, can pass more parameters or execute important stuff before\n render the route.\n
    \n
    \n See the next example of how to set this option:",s=x(),a=R("pre"),a.innerHTML='// ------ SETTING A FUNCTION ------\n// Setting Route After Enter Function\n{\n afterEnter((routeObjParams) => { console.log(routeObjParams); });\n}',i=x(),l=R("br"),c=x(),u=R("h4"),u.textContent="Anatomy of the After Before Enter Function",f=x(),p=R("p"),p.innerHTML="When declaring a After Before Enter Function it will be provided a\n parameter.\n
    \n Lets check it:",h=x(),m=R("pre"),m.innerHTML='// Example of After Before Enter Function declaration\n(routeObjParams) => { \n console.log(routeObjParams);\n}',d=x(),b=R("ul"),b.innerHTML="
  • routeObjParams: All the parameters passed until that error has\n occurred.\n
    \n This is a composed object and it has the following parameters:\n
    • currentRoute: The current route object containing the\n information of the route that the user is trying to access. It is\n composed by the following params:\n
      • name: The name of the route
      • \n
      • hash: The hash value of the route
      • \n
      • hostname: The hostname of the route. For example:\n "localhost"
      • \n
      • origin: The origin of the route. For example:\n "http://localhost:5000"
      • \n
      • params: The query params of the route. For example: {\n testParam: "someParamValue" }
      • \n
      • pathname: The path of the route. For example:\n "/svelte-client-router/configurationBeforeEnter"
      • \n
      • port: The port of the host. For example: "5000"
      • \n
      • protocol: The protocol used. For example: "http:"
    • \n
      \n
    • fromRoute: The coming from route object containing the\n information of the route that the user is coming from. It is composed\n by the following params:\n
      • name: The name of the route
      • \n
      • hash: The hash value of the route
      • \n
      • hostname: The hostname of the route. For example:\n "localhost"
      • \n
      • origin: The origin of the route. For example:\n "http://localhost:5000"
      • \n
      • params: The query params of the route. For example: {\n testParam: "someParamValue" }
      • \n
      • pathname: The path of the route. For example:\n "/svelte-client-router/configurationBeforeEnter"
      • \n
      • port: The port of the host. For example: "5000"
      • \n
      • protocol: The protocol used. For example: "http:"
    • \n
      \n
    • routeObjParams: all the parameters passed down the before enter\n chain and route parameters, that includes payload as well.
  • ",g=x(),C=R("center"),C.innerHTML='The configuration for this route.',w=x(),_=R("pre"),_.textContent='{\n name: "routeObjectAfterBeforeEnterRoute",\n path: "/svelte-client-router/routeObjectAfterBeforeEnter",\n lazyLoadComponent: () => import("./docs/pages/SCR_RouteObjectAfterBeforeEnter.svelte"),\n title: "SCR - Route Object - After Before Function",\n}',T=x(),it(E.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(a,"class","scr-pre"),S(u,"class","scr-h4"),S(p,"class","scr-text-justify"),S(m,"class","scr-pre"),S(C,"class","scr-center"),S(_,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,C),v(e,w),v(e,_),v(e,T),lt(E,e,null),O=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),E.$set(n)},i(t){O||(et(E.$$.fragment,t),O=!0)},o(t){nt(E.$$.fragment,t),O=!1},d(t){t&&$(e),ct(E)}}}var da=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,ma,i,{})}}});function ba(t){let e;return{c(){e=R("a"),e.textContent="Route Component Components",S(e,"href","/"),O(e,"pointer-events","none")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function ga(e){let n,o,r,s,a,i;return r=new Ps({props:{style:"float:left",text:"Previous",routeName:"routeObjectAfterEnterRoute"}}),a=new Ps({props:{style:"float:right",text:"Next",routeName:"routeComponentPropertiesRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function va(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,w,_,T,E,O,j,L,q,N,I,P,F,M;return m=new ts({props:{to:{name:"routeComponentComponentsRoute"},elementProps:{style:"display: inline; cursor: pointer;"},$$slots:{default:[ba]},$$scope:{ctx:t}}}),E=new ea({}),F=new qs({props:{$$slots:{default:[ga]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Route Object - On Error Function",o=x(),r=R("p"),s=C("The "),a=R("b"),a.textContent="onError",i=C(" option sets a function that is going to be executed for\n the specific route when something goes wrong.\n "),l=R("br"),c=x(),u=R("br"),f=C("\n When that happens the natural behaviour is to open the error page. In this context\n SCR has a very basic error component that comes with it. You can of course set\n you own error component and it is encouraged to do so.\n "),p=R("br"),h=C("\n See the "),it(m.$$.fragment),d=C(" for more info."),b=x(),g=R("pre"),g.innerHTML='// Setting Route On Error Function\n}\n onError((err, routeObjParams) => { console.error(err) });\n{',w=x(),_=R("br"),T=x(),it(E.$$.fragment),O=x(),j=R("p"),j.textContent="So that is it for this section. This feature enables us to handle any errors\n that may occur inside this specific route definition.",L=x(),q=R("center"),q.innerHTML='The configuration for this route.',N=x(),I=R("pre"),I.textContent='{\n name: "routeObjectOnErrorRoute",\n path: "/svelte-client-router/routeObjectOnError",\n lazyLoadComponent: () => import("./docs/pages/SCR_RouteObjectOnError.svelte"),\n title: "SCR - Route Object - On Error Function",\n}',P=x(),it(F.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(g,"class","scr-pre"),S(j,"class","scr-text-justify"),S(q,"class","scr-center"),S(I,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(r,s),v(r,a),v(r,i),v(r,l),v(r,c),v(r,u),v(r,f),v(r,p),v(r,h),lt(m,r,null),v(r,d),v(e,b),v(e,g),v(e,w),v(e,_),v(e,T),lt(E,e,null),v(e,O),v(e,j),v(e,L),v(e,q),v(e,N),v(e,I),v(e,P),lt(F,e,null),M=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),m.$set(n);const o={};1&e&&(o.$$scope={dirty:e,ctx:t}),F.$set(o)},i(t){M||(et(m.$$.fragment,t),et(E.$$.fragment,t),et(F.$$.fragment,t),M=!0)},o(t){nt(m.$$.fragment,t),nt(E.$$.fragment,t),nt(F.$$.fragment,t),M=!1},d(t){t&&$(e),ct(m),ct(E),ct(F)}}}var ya=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,va,i,{})}}});function $a(t){let e,n;return{c(){e=R("a"),e.textContent="components - that can be check in the next section -",n=C(", and some are crucial for it to work correctly."),S(e,"href","/"),O(e,"pointer-events","none")},m(t,o){y(t,e,o),y(t,n,o)},d(t){t&&$(e),t&&$(n)}}}function Ra(t){let e;return{c(){e=R("a"),e.textContent="route object properties section.",S(e,"href","/"),O(e,"pointer-events","none")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function Ca(e){let n,o,r,s,a,i;return r=new Ps({props:{style:"float:left",text:"Previous",routeName:"routeObjectOnErrorRoute"}}),a=new Ps({props:{style:"float:right",text:"Next",routeName:"routeComponentComponentsRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function xa(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,w,_,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H,z,D,U,G,W,Y,V,K,J,X,Q,Z,tt,ot,rt,st,at,ut,ft,pt,ht,mt,dt,bt,gt;return l=new ts({props:{to:{name:"routeComponentComponentsRoute"},elementProps:{style:"display: inline; cursor: pointer;"},$$slots:{default:[$a]},$$scope:{ctx:t}}}),q=new ts({props:{to:{name:"routeObjectOptionsRoute"},elementProps:{style:"display: inline; cursor: pointer;"},$$slots:{default:[Ra]},$$scope:{ctx:t}}}),bt=new qs({props:{$$slots:{default:[Ca]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Route Component - Properties",o=x(),r=R("p"),s=C("The route component is a "),a=R("a"),a.textContent="Svelte Component",i=C("\n , so it can receive parameters to pass further. Some of these parameters are\n "),it(l.$$.fragment),c=x(),u=R("br"),f=x(),p=R("br"),h=C("\n\n Lets see these parameters that aren't components:"),m=x(),d=R("pre"),d.innerHTML='// Importing the router component\nimport { SCR_ROUTER_COMPONENT } from "svelte-client-router"\nimport SCR_Layout from "../testComponents/SCR_Layout.svelte";\nimport SCR_Loading from "../testComponents/SCR_LoadingComponent.svelte";\nimport SCR_Error from "../testComponents/SCR_Error.svelte";\nimport SCR_NotFound from "../testComponents/SCR_NotFound.svelte";\n\n// Define the router object array\nconst routes = [\n {\n ... // Your routes definitions\n }\n]\n\n// Example of usage\n<SCR_ROUTER_COMPONENT \n bind:routes \n defaultLayoutComponent={SCR_Layout}\n notFoundComponent={SCR_NotFound}\n errorComponent={SCR_Error}\n loadingComponent={SCR_Loading}\n allProps={... // Passing parameters to be available in and routes and all components }\n allLoadingProps={... // Passing parameters to be available in and routes in loading component }\n/>',b=x(),g=R("br"),w=x(),_=R("h4"),_.textContent="Routes",T=x(),E=R("p"),O=C("This is where you declare all your routes. It is the index of your\n application. It has several options that you can configure.\n "),j=R("br"),L=C("\n For more information see the "),it(q.$$.fragment),N=x(),I=R("br"),P=x(),F=R("br"),M=C("\n Lets check out a complete example of declaration with all possible options:"),A=x(),B=R("pre"),B.innerHTML='// Setting Route Object Definition Example\nconst routes = [\n {\n name: "routeName1",\n path: "/test1",\n component: SCR_C1,\n\n // This property has preference over component property\n lazyLoadComponent: () =>\n import("./docs/pages/SCR_RouteComponentProperties.svelte"),\n layout: SCR_Layout,\n\n // This property has preference over layout property\n lazyLoadLayoutComponent: () =>\n import("./docs/SCR_Layout.svelte"),\n ignoreLayout: false,\n ignoreScroll: false,\n scrollProps: {\n top: 0,\n left: 0,\n behavior: "smooth",\n timeout: 10, // timeout must be greater than 10 milliseconds\n },\n title: "First Route Title",\n params: { myCustomParam: "text param!", }\n loadingProps: { textLoading: "Loading this route...", }\n ignoreGlobalBeforeFunction: false,\n executeRouteBEFBeforeGlobalBEF: false,\n forceReload: false,\n afterBeforeEnter: (routeObjParams) => console.log(routeObjParams)\n beforeEnter: [\n (resolve, routeFrom, routeTo, routeObjParams, payload) => resolve(true),\n (resolve, routeFrom, routeTo, routeObjParams, payload) => resolve(true),\n (resolve, routeFrom, routeTo, routeObjParams, payload) => resolve(true),\n ],\n onError: (err, routeObjParams) => console.error(err)\n },\n]',k=x(),H=R("p"),H.textContent="Each route defined inside the route array object can have these options.\n Very robust and we can see that SCR is focused on before enter behaviour.",z=x(),D=R("br"),U=x(),G=R("h4"),G.textContent="All Props",W=x(),Y=R("p"),Y.innerHTML="The allProps option can be passed to the router component. It must be\n an object with all the properties that you want to deliver to every route and\n component. This property will be made available everywhere.",V=x(),K=R("pre"),K.innerHTML='// Example\nconst allProps = {\n passToAll: "OK"\n}',J=x(),X=R("br"),Q=x(),Z=R("h4"),Z.textContent="All Loading Props",tt=x(),ot=R("p"),ot.innerHTML="The allLoadingProps option can be passed to the router component. It must\n be an object with all the properties that you want to deliver to every route\n when loading the component.",rt=x(),st=R("pre"),st.innerHTML='// Example\nconst allLoadingProps = {\n passToAll: "OK"\n}',at=x(),ut=R("p"),ut.textContent="Now that we saw the basic properties of the component. In the next section\n we will explore the SCR component components properties.",ft=x(),pt=R("center"),pt.innerHTML='The configuration for this route.',ht=x(),mt=R("pre"),mt.textContent='{\n name: "routeComponentPropertiesRoute",\n path: "/svelte-client-router/routeComponentProperties",\n lazyLoadComponent: () =>\n import("./docs/pages/SCR_RouteComponentProperties.svelte"),\n title: "SCR - Route Component - Properties",\n}',dt=x(),it(bt.$$.fragment),S(n,"class","scr-h4"),S(a,"href","https://svelte.dev/tutorial/basics"),S(a,"target","_blank"),S(r,"class","scr-text-justify"),S(d,"class","scr-pre"),S(_,"class","scr-h4"),S(E,"class","scr-text-justify"),S(B,"class","scr-pre"),S(H,"class","scr-text-justify"),S(G,"class","scr-h4"),S(Y,"class","scr-text-justify"),S(K,"class","scr-pre"),S(Z,"class","scr-h4"),S(ot,"class","scr-text-justify"),S(st,"class","scr-pre"),S(ut,"class","scr-text-justify"),S(pt,"class","scr-center"),S(mt,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(r,s),v(r,a),v(r,i),lt(l,r,null),v(r,c),v(r,u),v(r,f),v(r,p),v(r,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,w),v(e,_),v(e,T),v(e,E),v(E,O),v(E,j),v(E,L),lt(q,E,null),v(E,N),v(E,I),v(E,P),v(E,F),v(E,M),v(e,A),v(e,B),v(e,k),v(e,H),v(e,z),v(e,D),v(e,U),v(e,G),v(e,W),v(e,Y),v(e,V),v(e,K),v(e,J),v(e,X),v(e,Q),v(e,Z),v(e,tt),v(e,ot),v(e,rt),v(e,st),v(e,at),v(e,ut),v(e,ft),v(e,pt),v(e,ht),v(e,mt),v(e,dt),lt(bt,e,null),gt=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),l.$set(n);const o={};1&e&&(o.$$scope={dirty:e,ctx:t}),q.$set(o);const r={};1&e&&(r.$$scope={dirty:e,ctx:t}),bt.$set(r)},i(t){gt||(et(l.$$.fragment,t),et(q.$$.fragment,t),et(bt.$$.fragment,t),gt=!0)},o(t){nt(l.$$.fragment,t),nt(q.$$.fragment,t),nt(bt.$$.fragment,t),gt=!1},d(t){t&&$(e),ct(l),ct(q),ct(bt)}}}var wa=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,xa,i,{})}}});function _a(e){let n,o,r,s,a,i;return r=new Ps({props:{style:"float:left",text:"Previous",routeName:"routeComponentPropertiesRoute"}}),a=new Ps({props:{style:"float:right",text:"Next",routeName:"navigationRoutingRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function Sa(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,w,_,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H,z,D,U,G,W,Y,V,K,J,X,Q,Z,tt,ot,rt,st,at,ut,ft,pt,ht,mt,dt,bt;return dt=new qs({props:{$$slots:{default:[_a]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Route Component - Components",o=x(),r=R("p"),r.innerHTML="As said throught this documentation it is encouraged to provide your own\n custom components. SCR functions can work with no component provided by you.\n But it is not ideal they are very simple and minimalistic.\n
    \n Lets see all the components one by one:",s=x(),a=R("br"),i=x(),l=R("h4"),l.textContent="Layout Component",c=x(),u=R("p"),u.innerHTML="The Layout Component is the layout used to encapsulate all your route\n components. It can be override on route declaration object for an specific\n one for that route.\n
    \n It must be declared a default slot inside of the Layout Component or else your\n route component will not be drawed.\n
    \n
    \n The Global Layout must be passed to SCR Router Component as exampled below:",f=x(),p=R("pre"),p.innerHTML='// Importing your components\nimport { SCR_ROUTER_COMPONENT } from "svelte-client-router"\nimport SCR_Layout from "../testComponents/SCR_Layout.svelte";\n\n// Define the router object array\nconst routes = [\n {\n ... // Your routes definitions\n }\n]\n\n// Example of usage\n<SCR_ROUTER_COMPONENT \n bind:routes \n defaultLayoutComponent={SCR_Layout}\n/>',h=x(),m=R("p"),m.textContent="Next an example of Svelte Layout Component:",d=x(),b=R("pre"),b.innerHTML='// Example of a Svelte Layout Component\n<script>\n import SCR_Menu from "./SCR_Menu.svelte";\n import SCR_Footer from "./SCR_Footer.svelte";\n\n // This two following variables are always available in the layout component\n export let currentRoute;\n export let fromRoute;\n\n // Any other params declared on before enter functions \n // all props, payload, etc.. will be made available here too\n ...\n</script>\n\n<div class="scr-main-layout">\n <div class="scr-header">\n <slot name="scr_header">\n <h2 class="scr-main-layout__header">\n Svelte Client Router - The Svelte SPA Router!\n </h2>\n\n <--! REMEMBER TO DECLARE A DEFAULT SLOT! ->\n </slot>\n\n </div>\n <div class="scr-main">\n <SCR_Menu />\n <div class="scr-pages"><slot /></div>\n </div>\n <div><SCR_Footer /></div>\n</div>',g=x(),C=R("br"),w=x(),_=R("h4"),_.textContent="Loading Component",T=x(),E=R("p"),E.innerHTML="The Loading Component is the loading screen used to show when before enter\n routes are been processed.\n
    \n It will receive allLoadingProps declared and any route object\n loadingProps defined.",O=x(),j=R("pre"),j.innerHTML='// Importing your components\nimport { SCR_ROUTER_COMPONENT } from "svelte-client-router"\nimport SCR_Loading from "../testComponents/SCR_Loading.svelte";\n\n// Define the router object array\nconst routes = [\n {\n ... // Your routes definitions\n }\n]\n\n// Example of usage\n<SCR_ROUTER_COMPONENT \n bind:routes \n loadingComponent={SCR_Loading}\n/>',L=x(),q=R("p"),q.textContent="Next an example of Svelte Loading Component:",N=x(),I=R("pre"),I.innerHTML='// Example of a Svelte Loading Component\n<script>\n\n // This variable was passed on loadingProps - Route Object Definition\n export let loadingText = "Loading...";\n</script>\n\n<center class="scr-center">\n <div class="scr-lds-spinner">\n <div />\n <div />\n <div />\n <div />\n <div />\n <div />\n <div />\n <div />\n <div />\n <div />\n <div />\n <div />\n </div>\n <h1 class="scr-h1">{loadingText}</h1>\n</center>',P=x(),F=R("br"),M=x(),A=R("h4"),A.textContent="Not Found Component",B=x(),k=R("p"),k.innerHTML="The Not Found Component is the component that must be loaded when the user\n try to access a not existent route.\n
    \n It will receive all the parameters available.",H=x(),z=R("pre"),z.innerHTML='// Importing your components\nimport { SCR_ROUTER_COMPONENT } from "svelte-client-router"\nimport SCR_NotFound from "../testComponents/SCR_NotFound.svelte";\n\n// Define the router object array\nconst routes = [\n {\n ... // Your routes definitions\n }\n]\n\n// Example of usage\n<SCR_ROUTER_COMPONENT \n bind:routes \n notFoundComponent={SCR_NotFound}\n/>',D=x(),U=R("p"),U.textContent="Next an example of Svelte Not Found Component:",G=x(),W=R("pre"),W.innerHTML='// Example of a Svelte Not Found Component\n<script>\n\n // Example of route store usage\n import routerStore from "../js/store/router.js";\n\n</script>\n<center class="scr-center">\n <p class="scr-p">Not Found</p>\n <p class="scr-p-small">{$routerStore.currentLocation || "='("}</p>\n</center>',Y=x(),V=R("br"),K=x(),J=R("h4"),J.textContent="Error Component",X=x(),Q=R("p"),Q.innerHTML="The Error Component is the component that must be loaded when something goes\n wrong on routing.\n
    \n It will receive all the parameters available.",Z=x(),tt=R("pre"),tt.innerHTML='// Importing your components\nimport { SCR_ROUTER_COMPONENT } from "svelte-client-router"\nimport SCR_Error from "../testComponents/SCR_Error.svelte";\n\n// Define the router object array\nconst routes = [\n {\n ... // Your routes definitions\n }\n]\n\n// Example of usage\n<SCR_ROUTER_COMPONENT \n bind:routes \n errorComponent={SCR_Error}\n/>',ot=x(),rt=R("p"),rt.textContent="Next an example of Svelte Error Component:",st=x(),at=R("pre"),at.innerHTML='// Example of a Svelte Error Component\n<script>\n\n // This variable was passed on onError Function\n export let errorMessage = "An error has occured!";\n\n</script>\n\n<center class="scr-center">\n <p class="scr-p">Error</p>\n <p class="scr-p-small">{errorMessage}</p>\n</center>',ut=x(),ft=R("center"),ft.innerHTML='The configuration for this route.',pt=x(),ht=R("pre"),ht.textContent='{\n name: "routeComponentComponentsRoute",\n path: "/svelte-client-router/routeComponentComponents",\n lazyLoadComponent: () =>\n import("./docs/pages/SCR_RouteComponentComponents.svelte"),\n title: "SCR - Route Component - Components",\n}',mt=x(),it(dt.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(l,"class","scr-h4"),S(u,"class","scr-text-justify"),S(p,"class","scr-pre"),S(m,"class","scr-text-justify"),S(b,"class","scr-pre"),S(_,"class","scr-h4"),S(E,"class","scr-text-justify"),S(j,"class","scr-pre"),S(q,"class","scr-text-justify"),S(I,"class","scr-pre"),S(A,"class","scr-h4"),S(k,"class","scr-text-justify"),S(z,"class","scr-pre"),S(U,"class","scr-text-justify"),S(W,"class","scr-pre"),S(J,"class","scr-h4"),S(Q,"class","scr-text-justify"),S(tt,"class","scr-pre"),S(rt,"class","scr-text-justify"),S(at,"class","scr-pre"),S(ft,"class","scr-center"),S(ht,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,C),v(e,w),v(e,_),v(e,T),v(e,E),v(e,O),v(e,j),v(e,L),v(e,q),v(e,N),v(e,I),v(e,P),v(e,F),v(e,M),v(e,A),v(e,B),v(e,k),v(e,H),v(e,z),v(e,D),v(e,U),v(e,G),v(e,W),v(e,Y),v(e,V),v(e,K),v(e,J),v(e,X),v(e,Q),v(e,Z),v(e,tt),v(e,ot),v(e,rt),v(e,st),v(e,at),v(e,ut),v(e,ft),v(e,pt),v(e,ht),v(e,mt),lt(dt,e,null),bt=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),dt.$set(n)},i(t){bt||(et(dt.$$.fragment,t),bt=!0)},o(t){nt(dt.$$.fragment,t),bt=!1},d(t){t&&$(e),ct(dt)}}}var Ta=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,Sa,i,{})}}});function Ea(e){let n,o,r,s,a,i;return r=new Ps({props:{style:"float:left",text:"Previous",routeName:"routeComponentComponentsRoute"}}),a=new Ps({props:{style:"float:right",text:"Next",routeName:"navigationStoreRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function Oa(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,w,_,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H;return k=new qs({props:{$$slots:{default:[Ea]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Navigation - Routing",o=x(),r=R("p"),r.textContent="There are two main methods when routing SCR.",s=x(),a=R("ul"),a.innerHTML="
  • pushRoute: pushes a route forward.
  • \n
  • backRoute: back to the first route history, uses\n window.history.back(-1).
  • ",i=x(),l=R("p"),l.innerHTML="There are no secret of using them, but pushRoute has some nice features.\n Lets check them:",c=x(),u=R("br"),f=x(),p=R("h4"),p.textContent="Push Route",h=x(),m=R("pre"),m.innerHTML='// Importing pushRoute function\nimport { pushRoute } from "svelte-client-router"\n\n// Example of Usage\n<script>\n pushRoute("/routePath");\n</script>',d=x(),b=R("br"),g=x(),C=R("h4"),C.textContent="Push Route Function Anatomy",w=x(),_=R("p"),_.textContent="This function can receive three paramenters as it follows:",T=x(),E=R("ul"),E.innerHTML="
  • to: the route path to go to. It can understand three types of\n declarations:\n
    • A string path: For example: "/someRoute/to/go"
    • \n
    • path: For example: { path: "/routePath" }
    • \n
    • name: For example: { name: "theRouteName" }
  • \n
    \n
  • customParams: Some custom params to send to Before Enter and After\n Before Enter Functions as well the components
  • \n
    \n
  • onError: A custom onError function. This is nice because you can\n override your route onError declaration. It will execute this function\n instead of the route definition declared function.
  • ",O=x(),j=R("br"),L=x(),q=R("h4"),q.textContent="Back Route",N=x(),I=R("pre"),I.innerHTML='// Importing backRoute function\nimport { backRoute } from "svelte-client-router"\n\n// Example of Usage\n<script>\n // Go to previous entered route.\n // It returns the previous route too\n backRoute();\n</script>',P=x(),F=R("center"),F.innerHTML='The configuration for this route.',M=x(),A=R("pre"),A.textContent='{\n name: "routeNavigationRouting",\n path: "/svelte-client-router/navigationRouting",\n lazyLoadComponent: () =>\n import("./docs/pages/SCR_NavigationRouting.svelte"),\n title: "SCR - Navigation - Routing",\n}',B=x(),it(k.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(l,"class","scr-text-justify"),S(p,"class","scr-h4"),S(m,"class","scr-pre"),S(C,"class","scr-h4"),S(_,"class","scr-text-justify"),S(q,"class","scr-h4"),S(I,"class","scr-pre"),S(F,"class","scr-center"),S(A,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,C),v(e,w),v(e,_),v(e,T),v(e,E),v(e,O),v(e,j),v(e,L),v(e,q),v(e,N),v(e,I),v(e,P),v(e,F),v(e,M),v(e,A),v(e,B),lt(k,e,null),H=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),k.$set(n)},i(t){H||(et(k.$$.fragment,t),H=!0)},o(t){nt(k.$$.fragment,t),H=!1},d(t){t&&$(e),ct(k)}}}var ja=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,Oa,i,{})}}});function La(e){let n,o,r,s,a,i;return r=new Ps({props:{style:"float:left",text:"Previous",routeName:"navigationRoutingRoute"}}),a=new Ps({props:{style:"float:right",text:"Next",routeName:"routerLinkPropertiesRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function qa(t){let e,n,o,r,s,a,i,l,c,u,f,p,h;return p=new qs({props:{$$slots:{default:[La]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Navigation - Store",o=x(),r=R("p"),r.innerHTML="As well as the previous section you can import the entire navigation store.\n This is not recommend though. If you can use the methods directly it is\n recommended to you to do so. Because when pushing routes there is a flow to\n be followed. Anyway just so you know there is this store and you can check\n it like below.\n
    \n
    \n For more info about the anatomy of the functions provided go back to the previous\n section.",s=x(),a=R("pre"),a.innerHTML='// Importing Navigate Store\nimport { \n SCR_NAVIGATE_STORE,\n} from "svelte-client-router"\n\n// Example of Usage\n<script>\n\n // Go to defined path route\n SCR_NAVIGATE_STORE.pushRoute("/routePath");\n\n // Go to previous entered route.\n // It returns the previous route too\n SCR_NAVIGATE_STORE.backRoute();\n\n</script>',i=x(),l=R("center"),l.innerHTML='The configuration for this route.',c=x(),u=R("pre"),u.textContent='{\n\n name: "routeNavigationStore",\n path: "/svelte-client-router/navigationStore",\n lazyLoadComponent: () =>\n import("./docs/pages/SCR_NavigationStore.svelte"),\n title: "SCR - Navigation - Store",\n}',f=x(),it(p.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(a,"class","scr-pre"),S(l,"class","scr-center"),S(u,"class","scr-pre"),S(e,"class","scr-page")},m(t,m){y(t,e,m),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),lt(p,e,null),h=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),p.$set(n)},i(t){h||(et(p.$$.fragment,t),h=!0)},o(t){nt(p.$$.fragment,t),h=!1},d(t){t&&$(e),ct(p)}}}var Na=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,qa,i,{})}}});function Ia(e){let n,o,r,s,a,i;return r=new Ps({props:{style:"float:left",text:"Previous",routeName:"navigationStoreRoute"}}),a=new Ps({props:{style:"float:right; opacity: 0.5",text:"Next",routeName:"routerLinkPropertiesRoute",title:"More content to be added"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function Pa(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,w,_,T,E,O,j,L;return j=new qs({props:{$$slots:{default:[Ia]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Route Link",o=x(),r=R("p"),r.innerHTML="The Route Link is a component wrapper to make links. Easy to click and\n execute what you want. It is totally customisable.\n
    \n Lets see how to import and use it:",s=x(),a=R("pre"),a.innerHTML='// Importing Navigate Store\n<script>\n import { SCR_ROUTE_LINK } from "svelte-client-router";\n</script>\n\n<--! Example of Usage -->\n<SCR_ROUTER_LINK\n to={{ name: "routeComponentComponentsRoute" }}\n elementProps={{ style: "display: inline; cursor: pointer;" }}\n>\n <a style="pointer-events: none;">\n components - that can be check in the next section -</a>, \n and some are crucial for it to work correctly.\n\n</SCR_ROUTER_LINK>',i=x(),l=R("br"),c=x(),u=R("h4"),u.textContent="Properties",f=x(),p=R("p"),p.textContent="Pretty easy to use, isn't it? So now lets check out the component exported\n properties:",h=x(),m=R("ul"),m.innerHTML="
  • to: the route path to go to. It can understand three types of\n declarations:\n
    • A string path: For example: "/someRoute/to/go"
    • \n
    • path: For example: { path: "/routePath" }
    • \n
    • name: For example: { name: "theRouteName" }
  • \n
    \n
  • props: Some custom params to send to Before Enter and After Before\n Enter Functions as well the components
  • \n
    \n
  • onError: A custom onError function. This is nice because you can\n override your route onError declaration. It will execute this function\n instead of the route definition declared function.
  • \n
    \n
  • elementProps: This is all the HTML properties to pass to parent div\n so you can customize it at your own will.
  • ",d=x(),b=R("p"),b.textContent="Lets see another example:",g=x(),C=R("pre"),C.innerHTML='// Importing Navigate Store\n<script>\n import { SCR_ROUTE_LINK } from "svelte-client-router";\n</script>\n\n<--! Another Example of Usage -->\n<SCR_ROUTER_LINK \n to={{name: "myRouteNameThree" }}\n props={{ pushCustomParam: "someCustomParams" }}\n elementProps={{ style:"background-color: green" }}\n onError={(err, routeObjParams) => console.log("Execute this instead error defined on router object! - Only if something goes wrong}\n>\n <button>Click to Go to Defined Route Named: myRouteNameThree!</button>\n</SCR_ROUTER_LINK>',w=x(),_=R("center"),_.innerHTML='The configuration for this route.',T=x(),E=R("pre"),E.textContent='{\n name: "routerLinkPropertiesRoute",\n path: "/svelte-client-router/routerLinkProperties",\n lazyLoadComponent: () =>\n import("./docs/pages/SCR_RouterLinkProperties.svelte"),\n title: "SCR - Route Link - Properties",\n}',O=x(),it(j.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(a,"class","scr-pre"),S(u,"class","scr-h4"),S(p,"class","scr-text-justify"),S(b,"class","scr-text-justify"),S(C,"class","scr-pre"),S(_,"class","scr-center"),S(E,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,C),v(e,w),v(e,_),v(e,T),v(e,E),v(e,O),lt(j,e,null),L=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),j.$set(n)},i(t){L||(et(j.$$.fragment,t),L=!0)},o(t){nt(j.$$.fragment,t),L=!1},d(t){t&&$(e),ct(j)}}}var Fa=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,Pa,i,{})}}});return Os}(); + */var No=Et((function(t,e){t.exports=function t(e,n,o){function r(a,i){if(!n[a]){if(!e[a]){if(!i&&Ot)return Ot(a);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,(function(t){var n=e[a][1][t];return r(n||t)}),c,c.exports,t,e,n,o)}return n[a].exports}for(var s=Ot,a=0;a=43)}})).catch((function(){return!1}))}function C(t){return"boolean"==typeof d?c.resolve(d):R(t).then((function(t){return d=t}))}function x(t){var e=b[t.name],n={};n.promise=new c((function(t,e){n.resolve=t,n.reject=e})),e.deferredOperations.push(n),e.dbReady?e.dbReady=e.dbReady.then((function(){return n.promise})):e.dbReady=n.promise}function _(t){var e=b[t.name].deferredOperations.pop();if(e)return e.resolve(),e.promise}function w(t,e){var n=b[t.name].deferredOperations.pop();if(n)return n.reject(e),n.promise}function S(t,e){return new c((function(n,o){if(b[t.name]=b[t.name]||F(),t.db){if(!e)return n(t.db);x(t),t.db.close()}var r=[t.name];e&&r.push(t.version);var s=a.open.apply(a,r);e&&(s.onupgradeneeded=function(e){var n=s.result;try{n.createObjectStore(t.storeName),e.oldVersion<=1&&n.createObjectStore(m)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+t.name+'" has been upgraded from version '+e.oldVersion+" to version "+e.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),s.onerror=function(t){t.preventDefault(),o(s.error)},s.onsuccess=function(){n(s.result),_(t)}}))}function T(t){return S(t,!1)}function E(t){return S(t,!0)}function O(t,e){if(!t.db)return!0;var n=!t.db.objectStoreNames.contains(t.storeName),o=t.versiont.db.version;if(o&&(t.version!==e&&console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),r||n){if(n){var s=t.db.version+1;s>t.version&&(t.version=s)}return!0}return!1}function j(t){return new c((function(e,n){var o=new FileReader;o.onerror=n,o.onloadend=function(n){var o=btoa(n.target.result||"");e({__local_forage_encoded_blob:!0,data:o,type:t.type})},o.readAsBinaryString(t)}))}function L(t){return l([$(atob(t.data))],{type:t.type})}function q(t){return t&&t.__local_forage_encoded_blob}function N(t){var e=this,n=e._initReady().then((function(){var t=b[e._dbInfo.name];if(t&&t.dbReady)return t.dbReady}));return f(n,t,t),n}function I(t){x(t);for(var e=b[t.name],n=e.forages,o=0;o0&&(!t.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return c.resolve().then((function(){if(!t.db||"NotFoundError"===r.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),E(t)})).then((function(){return I(t).then((function(){P(t,e,n,o-1)}))})).catch(n);n(r)}}function F(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function M(t){var e=this,n={db:null};if(t)for(var o in t)n[o]=t[o];var r=b[n.name];r||(r=F(),b[n.name]=r),r.forages.push(e),e._initReady||(e._initReady=e.ready,e.ready=N);var s=[];function a(){return c.resolve()}for(var i=0;i>4,u[l++]=(15&o)<<4|r>>2,u[l++]=(3&r)<<6|63&s;return c}function mt(t){var e,n=new Uint8Array(t),o="";for(e=0;e>2],o+=K[(3&n[e])<<4|n[e+1]>>4],o+=K[(15&n[e+1])<<2|n[e+2]>>6],o+=K[63&n[e+2]];return n.length%3==2?o=o.substring(0,o.length-1)+"=":n.length%3==1&&(o=o.substring(0,o.length-2)+"=="),o}function dt(t,e){var n="";if(t&&(n=pt.call(t)),t&&("[object ArrayBuffer]"===n||t.buffer&&"[object ArrayBuffer]"===pt.call(t.buffer))){var o,r=Q;t instanceof ArrayBuffer?(o=t,r+=tt):(o=t.buffer,"[object Int8Array]"===n?r+=nt:"[object Uint8Array]"===n?r+=ot:"[object Uint8ClampedArray]"===n?r+=rt:"[object Int16Array]"===n?r+=st:"[object Uint16Array]"===n?r+=it:"[object Int32Array]"===n?r+=at:"[object Uint32Array]"===n?r+=lt:"[object Float32Array]"===n?r+=ct:"[object Float64Array]"===n?r+=ut:e(new Error("Failed to get type for BinaryArray"))),e(r+mt(o))}else if("[object Blob]"===n){var s=new FileReader;s.onload=function(){var n=J+t.type+"~"+mt(this.result);e(Q+et+n)},s.readAsArrayBuffer(t)}else try{e(JSON.stringify(t))}catch(n){console.error("Couldn't convert value into a JSON string: ",t),e(null,n)}}function bt(t){if(t.substring(0,Z)!==Q)return JSON.parse(t);var e,n=t.substring(ft),o=t.substring(Z,ft);if(o===et&&X.test(n)){var r=n.match(X);e=r[1],n=n.substring(r[0].length)}var s=ht(n);switch(o){case tt:return s;case et:return l([s],{type:e});case nt:return new Int8Array(s);case ot:return new Uint8Array(s);case rt:return new Uint8ClampedArray(s);case st:return new Int16Array(s);case it:return new Uint16Array(s);case at:return new Int32Array(s);case lt:return new Uint32Array(s);case ct:return new Float32Array(s);case ut:return new Float64Array(s);default:throw new Error("Unkown type: "+o)}}var gt={serialize:dt,deserialize:bt,stringToBuffer:ht,bufferToString:mt};function vt(t,e,n,o){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,o)}function yt(t){var e=this,n={db:null};if(t)for(var o in t)n[o]="string"!=typeof t[o]?t[o].toString():t[o];var r=new c((function(t,o){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(t){return o(t)}n.db.transaction((function(r){vt(r,n,(function(){e._dbInfo=n,t()}),(function(t,e){o(e)}))}),o)}));return n.serializer=gt,r}function $t(t,e,n,o,r,s){t.executeSql(n,o,r,(function(t,a){a.code===a.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],(function(t,i){i.rows.length?s(t,a):vt(t,e,(function(){t.executeSql(n,o,r,s)}),s)}),s):s(t,a)}),s)}function Rt(t,e){var n=this;t=p(t);var o=new c((function(e,o){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){$t(n,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[t],(function(t,n){var o=n.rows.length?n.rows.item(0).value:null;o&&(o=r.serializer.deserialize(o)),e(o)}),(function(t,e){o(e)}))}))})).catch(o)}));return u(o,e),o}function Ct(t,e){var n=this,o=new c((function(e,o){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){$t(n,r,"SELECT * FROM "+r.storeName,[],(function(n,o){for(var s=o.rows,a=s.length,i=0;i0)return void s(xt.apply(r,[t,i,n,o-1]));a(e)}}))}))})).catch(a)}));return u(s,n),s}function _t(t,e,n){return xt.apply(this,[t,e,n,1])}function wt(t,e){var n=this;t=p(t);var o=new c((function(e,o){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){$t(n,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[t],(function(){e()}),(function(t,e){o(e)}))}))})).catch(o)}));return u(o,e),o}function St(t){var e=this,n=new c((function(t,n){e.ready().then((function(){var o=e._dbInfo;o.db.transaction((function(e){$t(e,o,"DELETE FROM "+o.storeName,[],(function(){t()}),(function(t,e){n(e)}))}))})).catch(n)}));return u(n,t),n}function Tt(t){var e=this,n=new c((function(t,n){e.ready().then((function(){var o=e._dbInfo;o.db.transaction((function(e){$t(e,o,"SELECT COUNT(key) as c FROM "+o.storeName,[],(function(e,n){var o=n.rows.item(0).c;t(o)}),(function(t,e){n(e)}))}))})).catch(n)}));return u(n,t),n}function Et(t,e){var n=this,o=new c((function(e,o){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){$t(n,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[t+1],(function(t,n){var o=n.rows.length?n.rows.item(0).key:null;e(o)}),(function(t,e){o(e)}))}))})).catch(o)}));return u(o,e),o}function Ot(t){var e=this,n=new c((function(t,n){e.ready().then((function(){var o=e._dbInfo;o.db.transaction((function(e){$t(e,o,"SELECT key FROM "+o.storeName,[],(function(e,n){for(var o=[],r=0;r '__WebKitDatabaseInfoTable__'",[],(function(n,o){for(var r=[],s=0;s0}function Mt(t){var e=this,n={};if(t)for(var o in t)n[o]=t[o];return n.keyPrefix=It(t,e._defaultConfig),Ft()?(e._dbInfo=n,n.serializer=gt,c.resolve()):c.reject()}function At(t){var e=this,n=e.ready().then((function(){for(var t=e._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var o=localStorage.key(n);0===o.indexOf(t)&&localStorage.removeItem(o)}}));return u(n,t),n}function Bt(t,e){var n=this;t=p(t);var o=n.ready().then((function(){var e=n._dbInfo,o=localStorage.getItem(e.keyPrefix+t);return o&&(o=e.serializer.deserialize(o)),o}));return u(o,e),o}function kt(t,e){var n=this,o=n.ready().then((function(){for(var e=n._dbInfo,o=e.keyPrefix,r=o.length,s=localStorage.length,a=1,i=0;i=0;e--){var n=localStorage.key(e);0===n.indexOf(t)&&localStorage.removeItem(n)}})):c.reject("Invalid arguments"),e),o}var Yt={_driver:"localStorageWrapper",_initStorage:Mt,_support:Nt(),iterate:kt,getItem:Bt,setItem:Gt,removeItem:Ut,clear:At,length:Dt,key:Ht,keys:zt,dropInstance:Wt},Vt=function(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)},Kt=function(t,e){for(var n=t.length,o=0;o{try{if(!Array.isArray(t)||0===t.length)return;await t.map((async t=>{await Po.getItem(t)&&(await Po.removeItem(t),await async function(t,e=!0){try{let n=ko(await Po.getItem(Io));if(null==n)return;n=n.filter((e=>e.key!==t)),n.length>0?await Po.setItem(Io,Bo(n)):await Po.removeItem(Io),!e&&Po.getItem(t)&&await Po.removeItem(t)}catch(t){throw t}}(t))}));let e=ko(await Po.getItem(Io));if(null==e)return;e=e.filter((e=>!t.includes(e.key))),e.length>0?await Po.setItem(Io,Bo(e)):await Po.removeItem(Io)}catch(t){throw t}},Mo=async(t,e,n,o=[])=>{try{t((async t=>{for(let e of o)t[e]=void 0;await(async(t,e,n)=>{try{if(null==t||""===t.trim())return!1;if(null==e)return void await Fo([t]);n&&Number.isSafeInteger(n)&&Number.isInteger(n),await Po.setItem(t,Bo(e))}catch(t){throw t}})(e,t,n)}))()}catch(t){throw t}},Ao=async(t,e)=>{try{const n=await(async t=>{try{return ko(await Po.getItem(t))}catch(t){throw t}})(e);if(!n)return;t((()=>Object.assign({},Ro(n))))}catch(t){throw t}};function Bo(t){return"object"==typeof t?JSON.stringify(t):t}function ko(t){if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}const Ho=[];function zo(e,n=t){let o;const r=[];function s(t){if(i(e,t)&&(e=t,o)){const t=!Ho.length;for(let t=0;t{const t=r.indexOf(l);-1!==t&&r.splice(t,1),0===r.length&&(o(),o=null)}}}}const Do=["localstorage","indexeddb","none"],Uo=zo(Co({},{hashMode:!1,navigationHistoryLimit:10,saveMode:"localstorage",notFoundRoute:"/notFound",errorRoute:"/error",consoleLogErrorMessages:!0,consoleLogStores:!0,usesRouteLayout:!0,considerTrailingSlashOnMatchingRoute:!0,useScroll:!1,scrollProps:{top:0,left:0,behavior:"smooth",timeout:10}}));let Go,Wo;function Yo(t){"boolean"==typeof t&&wo(Uo,{hashMode:t})}function Vo(t){"number"==typeof t&&wo(Uo,{navigationHistoryLimit:t})}function Ko(t){Do.includes(t)&&wo(Uo,{saveMode:t})}function Jo(t){"string"==typeof t&&t.includes("/")&&wo(Uo,{notFoundRoute:t})}function Xo(t){"string"==typeof t&&t.includes("/")&&wo(Uo,{errorRoute:t})}function Qo(t=!1){"boolean"==typeof t&&wo(Uo,{consoleLogErrorMessages:t})}function Zo(t=!1){"boolean"==typeof t&&wo(Uo,{consoleLogStores:t})}function tr(t){"boolean"==typeof t&&wo(Uo,{usesRouteLayout:t})}function er(t){0}function nr(t){"boolean"==typeof t&&wo(Uo,{useScroll:t})}function or(t){t&&"function"==typeof t&&(Go=t)}function rr(t){if(t&&("function"==typeof t||Array.isArray(t))){if(Array.isArray(t))for(let e of t)if("function"!=typeof e)return;Wo=t}}var sr={subscribe:Uo.subscribe,update:Uo.update,setConfig:function(t){Yo(t.hashMode),Vo(t.navigationHistoryLimit),Ko(t.saveMode),Jo(t.notFoundRoute),Xo(t.errorRoute),Qo(t.consoleLogErrorMessages),Zo(t.consoleLogStores),tr(t.usesRouteLayout),setConsiderTrailingSlashOnMatchingRoute(t.considerTrailingSlashOnMatchingRoute),or(t.onError),rr(t.beforeEnter),er(t.scrollProps),nr(t.useScroll)},getConfig:function(){return _o(Uo)},setHashMode:Yo,getHashMode:function(){return xo(Uo,"hashMode")},setNavigationHistoryLimit:Vo,getNavigationHistoryLimit:function(){return xo(Uo,"navigationHistoryLimit")},setSaveMode:Ko,getSaveMode:function(){return xo(Uo,"saveMode")},setNotFoundRoute:Jo,getNotFoundRoute:function(){return xo(Uo,"notFoundRoute")},setErrorRoute:Xo,getErrorRoute:function(){return xo(Uo,"errorRoute")},setConsoleLogErrorMessages:Qo,getConsoleLogErrorMessages:function(){return xo(Uo,"consoleLogErrorMessages")},setConsoleLogStores:Zo,getConsoleLogStores:function(){return xo(Uo,"consoleLogStores")},setUsesRouteLayout:tr,getUsesRouteLayout:function(){return xo(Uo,"usesRouteLayout")},setConsiderTrailingSlashOnMachingRoute:function(t){"boolean"==typeof t&&wo(Uo,{considerTrailingSlashOnMachingRoute:t})},getConsiderTrailingSlashOnMachingRoute:function(){return xo(Uo,"considerTrailingSlashOnMachingRoute")},setScrollProps:er,getScrollProps:function(){return xo(Uo,"scrollProps")},setUseScroll:nr,getUseScroll:function(){return xo(Uo,"useScroll")},setOnError:or,getOnError:function(){return Go},setBeforeEnter:rr,getBeforeEnter:function(){return Wo}};const ar="SRC_ROUTER_STORE",ir=zo(Co({},{routes:[],currentLocation:void 0,currentRoute:{name:void 0,pathname:void 0,params:[],hostname:void 0,protocol:void 0,port:void 0,origin:void 0,hash:void 0},fromRoute:{name:void 0,pathname:void 0,params:[],hostname:void 0,protocol:void 0,port:void 0,origin:void 0,hash:void 0},navigationHistory:[]}));async function lr(t){if("object"==typeof t){const e=ur();e.navigationHistoryLimit>0&&(t=t.slice(0,e.navigationHistoryLimit-1)),wo(ir,{navigationHistory:t}),await fr()}}function cr(){return xo(ir,"navigationHistory")}function ur(){return sr.getConfig()}async function fr(){const t=ur();return!(!t||!t.saveMode||"none"==t.saveMode)&&("localstorage"===t.saveMode?await Oo(ir.subscribe,ar):"indexeddb"===t.saveMode&&await Mo(ir.subscribe,ar),!1)}var pr={subscribe:ir.subscribe,update:ir.update,STORAGE_KEY:ar,setRoutes:async function(t=[]){Array.isArray(t)&&(wo(ir,{routes:t}),await fr())},getRoutes:function(){return xo(ir,"routes")},setCurrentRoute:async function(t){"object"==typeof t&&(wo(ir,{currentRoute:t}),await fr())},getCurrentRoute:function(){return xo(ir,"currentRoute")},setFromRoute:async function(t){"object"==typeof t&&(wo(ir,{fromRoute:t}),await fr())},getFromRoute:function(){return xo(ir,"fromRoute")},setNavigationHistory:lr,getNavigationHistory:cr,pushNavigationHistory:async function(t){let e=cr()||[];e=[t,...e],await lr(e)},popNavigationHistory:async function(){let t=cr()||[];if(0==t.length)return!1;const e={...t[0]};return await lr(t.slice(1)),e},setCurrentLocation:async function(t){"string"==typeof t&&(wo(ir,{currentLocation:t}),await fr())},getCurrentLocation:function(){return xo(ir,"currentLocation")},getConfig:ur};const hr=zo(Co({},{pushRoute:!1,params:{}}));let mr;function dr(t={}){wo(hr,{params:t})}function br(){const t=xo(hr,"params");return dr(),t}function gr(){return pr.getNavigationHistory()}var vr={subscribe:hr.subscribe,update:hr.update,pushRoute:function(t,e,n){if(!t){const e=new Error(`SCR_ROUTER - Route not defined - ${t}`);if("function"!=typeof n)throw e;n(e)}const o=pr.getRoutes();mr=void 0,"string"==typeof t?mr=o.find((e=>e.path===t)):t.path?mr=o.find((e=>e.path===t.path)):t.name&&(mr=o.find((e=>e.name===t.name))),mr||(mr={notFound:!0,path:"string"==typeof t?t:t.path||""}),n&&"function"==typeof n&&(mr.onError=n),dr(e),wo(hr,{pushRoute:!0})},getPushRoute:function(){return xo(hr,"pushRoute")},consumeRoutePushed:function(){const t=Co({},mr);return mr=void 0,wo(hr,{pushRoute:!1}),t.params={...t.params,...br()},t},backRoute:function(){let t;return gr().length>0&&(t=pr.popNavigationHistory()),window.history.back(),t},getNavigationHistory:gr,getConfig:function(){return sr.getConfig()},setParams:dr,consumeParams:br};function yr(){this.resolveLoading=function(){this.resolveFunc&&(this.resolveFunc(!0),this.resolveFunc=void 0)},this.startLoading=function(){return this.callbackFunc=new Promise(((t,e)=>{this.resolveFunc=t})),this.callbackFunc}}function $r(e){let n,o,r,s,a,i=(e[0].currentLocation||"='(")+"";return{c(){n=R("center"),o=R("p"),o.textContent="Not Found",r=x(),s=R("p"),a=C(i),S(o,"class","scr-p svelte-zj7cmj"),S(s,"class","scr-p-small svelte-zj7cmj")},m(t,e){y(t,n,e),v(n,o),v(n,r),v(n,s),v(s,a)},p(t,[e]){1&e&&i!==(i=(t[0].currentLocation||"='(")+"")&&E(a,i)},i:t,o:t,d(t){t&&$(n)}}}function Rr(t,e,n){let o;return l(t,pr,(t=>n(0,o=t))),[o]}class Cr extends pt{constructor(t){super(),ft(this,t,Rr,$r,i,{})}}function xr(e){let n,o,r,s,a;return{c(){n=R("center"),o=R("div"),o.innerHTML='
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    ',r=x(),s=R("h1"),a=C(e[0]),S(o,"class","scr-lds-spinner svelte-146mxqr"),S(s,"class","scr-h1 svelte-146mxqr"),S(n,"class","scr-center svelte-146mxqr")},m(t,e){y(t,n,e),v(n,o),v(n,r),v(n,s),v(s,a)},p(t,[e]){1&e&&E(a,t[0])},i:t,o:t,d(t){t&&$(n)}}}function _r(t,e,n){let{loadingText:o="Loading..."}=e;return t.$$set=t=>{"loadingText"in t&&n(0,o=t.loadingText)},[o]}class wr extends pt{constructor(t){super(),ft(this,t,_r,xr,i,{loadingText:0})}}function Sr(e){let n,o,r,s,a;return{c(){n=R("center"),o=R("p"),o.textContent="Error",r=x(),s=R("p"),a=C(e[0]),S(o,"class","scr-p svelte-jhjhwz"),S(s,"class","scr-p-small svelte-jhjhwz")},m(t,e){y(t,n,e),v(n,o),v(n,r),v(n,s),v(s,a)},p(t,[e]){1&e&&E(a,t[0])},i:t,o:t,d(t){t&&$(n)}}}function Tr(t,e,n){let{errorMessage:o="An error has occured!"}=e;return t.$$set=t=>{"errorMessage"in t&&n(0,o=t.errorMessage)},[o]}class Er extends pt{constructor(t){super(),ft(this,t,Tr,Sr,i,{errorMessage:0})}}const Or=t=>({}),jr=t=>({});function Lr(t){let e,n,o;const r=t[1].scr_header,s=c(r,t,t[0],jr),a=s||function(t){let e;return{c(){e=R("h1"),e.textContent="Svelte Client Router - The Svelte SPA Router!",S(e,"class","scr-main-layout__header svelte-1brx1pu")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}(),i=t[1].default,l=c(i,t,t[0],null);return{c(){e=R("main"),a&&a.c(),n=x(),l&&l.c(),S(e,"class","scr-main-layout svelte-1brx1pu")},m(t,r){y(t,e,r),a&&a.m(e,null),v(e,n),l&&l.m(e,null),o=!0},p(t,[e]){s&&s.p&&1&e&&f(s,r,t,t[0],e,Or,jr),l&&l.p&&1&e&&f(l,i,t,t[0],e,null,null)},i(t){o||(et(a,t),et(l,t),o=!0)},o(t){nt(a,t),nt(l,t),o=!1},d(t){t&&$(e),a&&a.d(t),l&&l.d(t)}}}function qr(t,e,n){let{$$slots:o={},$$scope:r}=e;return t.$$set=t=>{"$$scope"in t&&n(0,r=t.$$scope)},[r,o]}class Nr extends pt{constructor(t){super(),ft(this,t,qr,Lr,i,{})}}function Ir(e){return{c:t,m:t,p:t,i:t,o:t,d:t}}function Pr(t){let e,n,o,r;const s=[Mr,Fr],a=[];function i(t,e){return t[1].usesRouteLayout&&"function"==typeof t[6]?0:1}return e=i(t),n=a[e]=s[e](t),{c(){n.c(),o=_()},m(t,n){a[e].m(t,n),y(t,o,n),r=!0},p(t,r){let l=e;e=i(t),e===l?a[e].p(t,r):(Z(),nt(a[l],1,1,(()=>{a[l]=null})),tt(),n=a[e],n?n.p(t,r):(n=a[e]=s[e](t),n.c()),et(n,1),n.m(o.parentNode,o))},i(t){r||(et(n),r=!0)},o(t){nt(n),r=!1},d(t){a[e].d(t),t&&$(o)}}}function Fr(t){let e,o,r;const s=[t[2]];var a=t[4];function i(t){let e={};for(let t=0;t{ct(t,1)})),tt()}a?(e=new a(i()),it(e.$$.fragment),et(e.$$.fragment,1),lt(e,o.parentNode,o)):e=null}else a&&e.$set(r)},i(t){r||(e&&et(e.$$.fragment,t),r=!0)},o(t){e&&nt(e.$$.fragment,t),r=!1},d(t){t&&$(o),e&&ct(e,t)}}}function Mr(t){let e,o,r;const s=[t[2]];var a=t[6];function i(t){let e={$$slots:{default:[Ar]},$$scope:{ctx:t}};for(let t=0;t{ct(t,1)})),tt()}a?(e=new a(i(t)),it(e.$$.fragment),et(e.$$.fragment,1),lt(e,o.parentNode,o)):e=null}else a&&e.$set(r)},i(t){r||(e&&et(e.$$.fragment,t),r=!0)},o(t){e&&nt(e.$$.fragment,t),r=!1},d(t){t&&$(o),e&&ct(e,t)}}}function Ar(t){let e,o,r;const s=[t[2]];var a=t[4];function i(t){let e={};for(let t=0;t{ct(t,1)})),tt()}a?(e=new a(i()),it(e.$$.fragment),et(e.$$.fragment,1),lt(e,o.parentNode,o)):e=null}else a&&e.$set(r)},i(t){r||(e&&et(e.$$.fragment,t),r=!0)},o(t){e&&nt(e.$$.fragment,t),r=!1},d(t){t&&$(o),e&&ct(e,t)}}}function Br(t){let e,o,r;const s=[t[3],t[2]];var a=t[0];function i(t){let e={};for(let t=0;t{ct(t,1)})),tt()}a?(e=new a(i()),it(e.$$.fragment),et(e.$$.fragment,1),lt(e,o.parentNode,o)):e=null}else a&&e.$set(r)},i(t){r||(e&&et(e.$$.fragment,t),r=!0)},o(t){e&&nt(e.$$.fragment,t),r=!1},d(t){t&&$(o),e&&ct(e,t)}}}function kr(t){let e,n,o,r={ctx:t,current:null,token:null,hasCatch:!1,pending:Br,then:Pr,catch:Ir,value:26,blocks:[,,,]};return rt(n=t[5],r),{c(){e=_(),r.block.c()},m(t,n){y(t,e,n),r.block.m(t,r.anchor=n),r.mount=()=>e.parentNode,r.anchor=e,o=!0},p(e,[o]){if(t=e,r.ctx=t,32&o&&n!==(n=t[5])&&rt(n,r));else{const e=t.slice();e[26]=r.resolved,r.block.p(e,o)}},i(t){o||(et(r.block),o=!0)},o(t){for(let t=0;t<3;t+=1){nt(r.blocks[t])}o=!1},d(t){t&&$(e),r.block.d(t),r.token=null,r=null}}}function Hr(t){return t?Array.isArray(t)?t:"function"==typeof t?[t]:[]:[]}function zr(t){let e={};return t.replace(/[?&]+([^=&]+)=([^&]*)/gi,(function(t,n,o){e[n]=o})),e}function Dr(t,e,n){let o,r,s;l(t,sr,(t=>n(1,o=t))),l(t,pr,(t=>n(13,r=t))),l(t,vr,(t=>n(14,s=t)));let a,i,c,{routes:u}=e,{notFoundComponent:f=Cr}=e,{errorComponent:p=Er}=e,{defaultLayoutComponent:h=Nr}=e,{loadingComponent:m=wr}=e,{allProps:d={}}=e,{allLoadingProps:b={}}=e,g={},v={},y=h,$=new yr;function R(t,e=!0){const n=(o.hashMode?"#":"")+t;history.pushState?history.pushState(null,null,n):location.hash=n,e&&window.dispatchEvent(new Event("popstate"))}function C(t,e){return n(2,g={}),t&&t.params&&n(2,g={payload:t.payload,...t.params,...Co({},d)}),n(2,g={...g,...e,currentRoute:{...i,name:t.name,pathname:t.path},fromRoute:r.fromRoute}),g}function x(t,e,r){return n(4,a=p),C(r,{errorMessage:t}),e&&o.consoleLogErrorMessages&&console.error(e),R(o.errorRoute,!1)}function _(t,e){if(t.onError&&"function"==typeof t.onError)return t.onError(e,C(t)),x(`SCR_ROUTER - Caught an error: ${e}!`,e,t);throw`Error on route (${t.name} - ${t.path}) - ${e}!`}async function w(t,e=!0){try{if(function(){let t=location.pathname;o.hashMode&&location.hash&&(t=location.hash.slice(1)),i={pathname:t,params:zr(location.href),hostname:location.hostname,protocol:location.protocol,port:location.port,origin:location.origin,hash:location.hash}}(),t&&!t.forceReload&&i.pathname===t.path)return;if(n(6,y=!1),i.pathname===o.errorRoute)return void n(4,a=p);if(t){if(t.notFound)return await pr.setCurrentLocation(t.path),R(o.notFoundRoute)}else t=r.routes.find((t=>t.path==i.pathname||o.considerTrailingSlashOnMatchingRoute&&t.path+"/"==i.pathname));if(!t)return n(4,a=f),i.pathname!=o.notFoundRoute&&(await pr.setCurrentLocation(i.pathname),R(o.notFoundRoute));n(5,c=$.startLoading()),n(3,v={...Co({},b)}),t.loadingProps&&n(3,v={...v,...t.loadingProps}),await pr.setCurrentLocation(i.pathname);const s=sr.getBeforeEnter();if(!t.beforeEnter&&(!s||t.ignoreGlobalBeforeFunction))return await T(t,e);const l=Hr(t.beforeEnter);if(t.ignoreGlobalBeforeFunction)await S(t,l,e);else{const n=Hr(s),o=t.executeRouteBEFBeforeGlobalBEF?[...l,...n]:[...n,...l];await S(t,o,e)}}catch(e){$.resolveLoading(),sr.getOnError()&&sr.getOnError()(e,C(t)),x(`SCR_ROUTER - ${e}!`,e,t)}finally{$.resolveLoading()}}async function S(t,e,n){const s=Co({},r.currentRoute),a=Co({name:t.name},i);let l,c;t.payload={};for(let n of e){if(!n||"function"!=typeof n)throw new Error(`SCR_ROUTER - Before Enter Function of route (${t.name} - ${t.path}) is not a function!`);if(l=await new Promise((async(e,r)=>{try{c=void 0,t.params&&(c={...t.params}),await n(e,s,a,c,t.payload),t.payload||(t.payload={},o.consoleLogErrorMessages&&console.warn("SCR_ROUTER - Payload property were redefined")),C(t)}catch(t){e({SCR_ROUTE_ERROR:!0,error:t})}})),!0!==l){if(!l)return R(r.currentRoute.pathname);if(l.SCR_ROUTE_ERROR)return _(t,l.error);if(l&&(l.redirect||l.path))return R(l.redirect||l.path);if(l&&l.name){const e=r.routes.find((t=>t.name===l.name));if(!e){let e=new Error(`Error not found route name (${l.name})`);return _(t,e)}return R(e.path)}return _(t,new Error("The resolve option was not able to understand the parameters passed!"))}}return await T(t,n)}async function T(t,e=!1){t.title&&(jt.document.title=t.title),await pr.setFromRoute(r.currentRoute),await pr.pushNavigationHistory(r.currentRoute),e?await pr.setCurrentRoute({...i,name:t.name}):await pr.setCurrentRoute({pathname:t.path,params:{...t.params},hostname:i.hostname,protocol:i.protocol,port:i.port,origin:i.origin,hash:i.hash,name:t.name});const s=C(t);if(t.afterBeforeEnter&&"function"==typeof t.afterBeforeEnter&&t.afterBeforeEnter(s),o.usesRouteLayout&&!t.ignoreLayout)if("function"==typeof t.lazyLoadLayoutComponent){const e=await t.lazyLoadLayoutComponent();if(!e||!e.default)throw new Error(`Lazy Load Layout Component defined for (${t.name} - ${t.path}) could not be loaded`);n(6,y=e.default)}else t.layoutComponent?n(6,y=t.layoutComponent):n(6,y=h);else n(6,y=!1);if(!t.component&&!t.lazyLoadComponent)throw new Error(`No component defined for (${t.name} - ${t.path})!`);if("function"==typeof t.lazyLoadComponent){const e=await t.lazyLoadComponent();if(!e||!e.default)throw new Error(`Lazy Load Component defined for (${t.name} - ${t.path}) could not be loaded`);n(4,a=e.default)}if($.resolveLoading(),o.useScroll&&!t.ignoreScroll){let e={top:o.scrollProps.top||0,left:o.scrollProps.left||0,behavior:o.scrollProps.behavior||"smooth",timeout:o.scrollProps.timeout||10};t.scrollProps&&(e.top=t.scrollProps.top,e.left=t.scrollProps.left,e.behavior=t.scrollProps.behavior,e.timeout=t.scrollProps.timeout),setTimeout((()=>window.scrollTo(e)),e.timeout)}return R(t.path,!1)}var E;return E=async()=>{if("localstorage"===o.saveMode?await jo(pr.update,pr.STORAGE_KEY):"indexeddb"===o.saveMode&&await Ao(pr.update,pr.STORAGE_KEY),u&&await pr.setRoutes(u),!r.routes||0==r.routes.length){const t=new Error("SCR_ROUTER - No routes were defined!");return sr.getOnError()?sr.getOnError()(t):x(`SCR_ROUTER - ${t}!`,t),n(4,a=p),t}await w()},F().$$.on_mount.push(E),window.addEventListener("popstate",(async t=>{await w()})),t.$$set=t=>{"routes"in t&&n(7,u=t.routes),"notFoundComponent"in t&&n(8,f=t.notFoundComponent),"errorComponent"in t&&n(9,p=t.errorComponent),"defaultLayoutComponent"in t&&n(10,h=t.defaultLayoutComponent),"loadingComponent"in t&&n(0,m=t.loadingComponent),"allProps"in t&&n(11,d=t.allProps),"allLoadingProps"in t&&n(12,b=t.allLoadingProps)},t.$$.update=()=>{8194&t.$$.dirty&&o.consoleLogStores&&r&&(console.log(" ----- SCR - Router Store ------------ "),console.log(r),console.log(" ------------------------------------- ")),2&t.$$.dirty&&o.consoleLogStores&&o&&(console.log(" ----- SCR - Configuration Store ----- "),console.log(o),console.log(" ------------------------------------- ")),16386&t.$$.dirty&&o.consoleLogStores&&s&&(console.log(" ----- SCR - Navigate Store ---------- "),console.log(s),console.log(" ------------------------------------- ")),16384&t.$$.dirty&&s.pushRoute&&w(vr.consumeRoutePushed(),!1)},[m,o,g,v,a,c,y,u,f,p,h,d,b,r,s]}function Ur(t){let e,o,r,s;const a=t[6].default,i=c(a,t,t[5],null);let l=[t[0]],u={};for(let t=0;t{"props"in t&&n(2,s=t.props),"onError"in t&&n(3,a=t.onError),"to"in t&&n(4,i=t.to),"elementProps"in t&&n(0,l=t.elementProps),"$$scope"in t&&n(5,r=t.$$scope)},[l,function(){i?vr.pushRoute(i,s,a):alert("SCR_ROUTERLINK Component\n- to property is not defined")},s,a,i,r,o]}const Wr=class extends pt{constructor(t){super(),ft(this,t,Dr,kr,i,{routes:7,notFoundComponent:8,errorComponent:9,defaultLayoutComponent:10,loadingComponent:0,allProps:11,allLoadingProps:12})}},Yr=class extends pt{constructor(t){super(),ft(this,t,Gr,Ur,i,{props:2,onError:3,to:4,elementProps:0})}},Vr=sr,Kr=vr.pushRoute;function Jr(t){const e=t-1;return e*e*e+1}function Xr(t,{delay:e=0,duration:n=400,easing:o=Jr,x:r=0,y:s=0,opacity:a=0}={}){const i=getComputedStyle(t),l=+i.opacity,c="none"===i.transform?"":i.transform,u=l*(1-a);return{delay:e,duration:n,easing:o,css:(t,e)=>`\n\t\t\ttransform: ${c} translate(${(1-t)*r}px, ${(1-t)*s}px);\n\t\t\topacity: ${l-u*e}`}}function Qr(t){let e;return{c(){e=R("div"),e.textContent="Presentation",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function Zr(t){let e;return{c(){e=R("div"),e.textContent="Installation",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function ts(t){let e;return{c(){e=R("div"),e.textContent="Getting Started",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function es(t){let e;return{c(){e=R("div"),e.textContent="Configuration Options",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function ns(t){let e;return{c(){e=R("div"),e.textContent="Global Before Enter",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function os(t){let e;return{c(){e=R("div"),e.textContent="Global On Error",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function rs(t){let e;return{c(){e=R("div"),e.textContent="Properties",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function ss(t){let e;return{c(){e=R("div"),e.textContent="Before Enter",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function as(t){let e;return{c(){e=R("div"),e.textContent="After Before Enter",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function is(t){let e;return{c(){e=R("div"),e.textContent="On Error",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function ls(t){let e;return{c(){e=R("div"),e.textContent="Properties",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function cs(t){let e;return{c(){e=R("div"),e.textContent="Components",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function us(t){let e;return{c(){e=R("div"),e.textContent="Routing",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function fs(t){let e;return{c(){e=R("div"),e.textContent="Store",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function ps(t){let e;return{c(){e=R("div"),e.textContent="Properties",S(e,"class","scr-menu-item svelte-1gz3q5m")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function hs(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,_,w,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H,z,D,U,G,W,Y,V,K;return r=new Yr({props:{to:{name:"rootRoute"},$$slots:{default:[Qr]},$$scope:{ctx:t}}}),a=new Yr({props:{to:{name:"installationRoute"},$$slots:{default:[Zr]},$$scope:{ctx:t}}}),l=new Yr({props:{to:{name:"gettingStartedRoute"},$$slots:{default:[ts]},$$scope:{ctx:t}}}),p=new Yr({props:{to:{name:"configurationOptionsRoute"},$$slots:{default:[es]},$$scope:{ctx:t}}}),m=new Yr({props:{to:{name:"configurationGlobalBeforeEnterOptionRoute"},$$slots:{default:[ns]},$$scope:{ctx:t}}}),b=new Yr({props:{to:{name:"configurationOnErrorOptionRoute"},$$slots:{default:[os]},$$scope:{ctx:t}}}),w=new Yr({props:{to:{name:"routeObjectOptionsRoute"},$$slots:{default:[rs]},$$scope:{ctx:t}}}),E=new Yr({props:{to:{name:"routeObjectBeforeEnterRoute"},$$slots:{default:[ss]},$$scope:{ctx:t}}}),j=new Yr({props:{to:{name:"routeObjectAfterBeforeEnterRoute"},$$slots:{default:[as]},$$scope:{ctx:t}}}),q=new Yr({props:{to:{name:"routeObjectOnErrorRoute"},$$slots:{default:[is]},$$scope:{ctx:t}}}),F=new Yr({props:{to:{name:"routeComponentPropertiesRoute"},$$slots:{default:[ls]},$$scope:{ctx:t}}}),A=new Yr({props:{to:{name:"routeComponentComponentsRoute"},$$slots:{default:[cs]},$$scope:{ctx:t}}}),z=new Yr({props:{to:{name:"navigationRoutingRoute"},$$slots:{default:[us]},$$scope:{ctx:t}}}),U=new Yr({props:{to:{name:"navigationStoreRoute"},$$slots:{default:[fs]},$$scope:{ctx:t}}}),V=new Yr({props:{to:{name:"routerLinkPropertiesRoute"},$$slots:{default:[ps]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Introduction",o=x(),it(r.$$.fragment),s=x(),it(a.$$.fragment),i=x(),it(l.$$.fragment),c=x(),u=R("h4"),u.textContent="Configuration",f=x(),it(p.$$.fragment),h=x(),it(m.$$.fragment),d=x(),it(b.$$.fragment),g=x(),C=R("h4"),C.textContent="Route Object",_=x(),it(w.$$.fragment),T=x(),it(E.$$.fragment),O=x(),it(j.$$.fragment),L=x(),it(q.$$.fragment),N=x(),I=R("h4"),I.textContent="Route Component",P=x(),it(F.$$.fragment),M=x(),it(A.$$.fragment),B=x(),k=R("h4"),k.textContent="Navigation",H=x(),it(z.$$.fragment),D=x(),it(U.$$.fragment),G=x(),W=R("h4"),W.textContent="Route Link",Y=x(),it(V.$$.fragment),S(n,"class","scr-menu-h4 svelte-1gz3q5m"),S(u,"class","scr-menu-h4 svelte-1gz3q5m"),S(C,"class","scr-menu-h4 svelte-1gz3q5m"),S(I,"class","scr-menu-h4 svelte-1gz3q5m"),S(k,"class","scr-menu-h4 svelte-1gz3q5m"),S(W,"class","scr-menu-h4 svelte-1gz3q5m"),S(e,"class","scr-menu svelte-1gz3q5m")},m(t,$){y(t,e,$),v(e,n),v(e,o),lt(r,e,null),v(e,s),lt(a,e,null),v(e,i),lt(l,e,null),v(e,c),v(e,u),v(e,f),lt(p,e,null),v(e,h),lt(m,e,null),v(e,d),lt(b,e,null),v(e,g),v(e,C),v(e,_),lt(w,e,null),v(e,T),lt(E,e,null),v(e,O),lt(j,e,null),v(e,L),lt(q,e,null),v(e,N),v(e,I),v(e,P),lt(F,e,null),v(e,M),lt(A,e,null),v(e,B),v(e,k),v(e,H),lt(z,e,null),v(e,D),lt(U,e,null),v(e,G),v(e,W),v(e,Y),lt(V,e,null),K=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const o={};1&e&&(o.$$scope={dirty:e,ctx:t}),a.$set(o);const s={};1&e&&(s.$$scope={dirty:e,ctx:t}),l.$set(s);const i={};1&e&&(i.$$scope={dirty:e,ctx:t}),p.$set(i);const c={};1&e&&(c.$$scope={dirty:e,ctx:t}),m.$set(c);const u={};1&e&&(u.$$scope={dirty:e,ctx:t}),b.$set(u);const f={};1&e&&(f.$$scope={dirty:e,ctx:t}),w.$set(f);const h={};1&e&&(h.$$scope={dirty:e,ctx:t}),E.$set(h);const d={};1&e&&(d.$$scope={dirty:e,ctx:t}),j.$set(d);const g={};1&e&&(g.$$scope={dirty:e,ctx:t}),q.$set(g);const v={};1&e&&(v.$$scope={dirty:e,ctx:t}),F.$set(v);const y={};1&e&&(y.$$scope={dirty:e,ctx:t}),A.$set(y);const $={};1&e&&($.$$scope={dirty:e,ctx:t}),z.$set($);const R={};1&e&&(R.$$scope={dirty:e,ctx:t}),U.$set(R);const C={};1&e&&(C.$$scope={dirty:e,ctx:t}),V.$set(C)},i(t){K||(et(r.$$.fragment,t),et(a.$$.fragment,t),et(l.$$.fragment,t),et(p.$$.fragment,t),et(m.$$.fragment,t),et(b.$$.fragment,t),et(w.$$.fragment,t),et(E.$$.fragment,t),et(j.$$.fragment,t),et(q.$$.fragment,t),et(F.$$.fragment,t),et(A.$$.fragment,t),et(z.$$.fragment,t),et(U.$$.fragment,t),et(V.$$.fragment,t),K=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),nt(l.$$.fragment,t),nt(p.$$.fragment,t),nt(m.$$.fragment,t),nt(b.$$.fragment,t),nt(w.$$.fragment,t),nt(E.$$.fragment,t),nt(j.$$.fragment,t),nt(q.$$.fragment,t),nt(F.$$.fragment,t),nt(A.$$.fragment,t),nt(z.$$.fragment,t),nt(U.$$.fragment,t),nt(V.$$.fragment,t),K=!1},d(t){t&&$(e),ct(r),ct(a),ct(l),ct(p),ct(m),ct(b),ct(w),ct(E),ct(j),ct(q),ct(F),ct(A),ct(z),ct(U),ct(V)}}}class ms extends pt{constructor(t){super(),ft(this,t,null,hs,i,{})}}const ds=t=>({}),bs=t=>({});function gs(n){let o,r,i,l,u,p,m,d,b,C,_,w;const T=n[1].scr_header,E=c(T,n,n[0],bs),O=E||function(t){let e;return{c(){e=R("h2"),e.textContent="Svelte Client Router - The Svelte SPA Router!",S(e,"class","scr-main-layout__header svelte-lxpf7t")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}();u=new ms({});const j=n[1].default,L=c(j,n,n[0],null);return{c(){o=R("div"),r=R("div"),O&&O.c(),i=x(),l=R("div"),it(u.$$.fragment),p=x(),m=R("div"),L&&L.c(),C=x(),_=R("div"),_.innerHTML=' \n ',S(r,"class","scr-header svelte-lxpf7t"),S(m,"class","scr-pages svelte-lxpf7t"),S(l,"class","scr-main svelte-lxpf7t"),S(_,"class","scr-footer svelte-lxpf7t"),S(o,"class","scr-main-layout svelte-lxpf7t")},m(t,e){y(t,o,e),v(o,r),O&&O.m(r,null),v(o,i),v(o,l),lt(u,l,null),v(l,p),v(l,m),L&&L.m(m,null),v(o,C),v(o,_),w=!0},p(t,[e]){E&&E.p&&1&e&&f(E,T,t,t[0],e,ds,bs),L&&L.p&&1&e&&f(L,j,t,t[0],e,null,null)},i(n){w||(et(O,n),et(u.$$.fragment,n),et(L,n),D((()=>{b&&b.end(1),d||(d=function(n,o,r){let s,i,l=o(n,r),c=!1,u=0;function f(){s&&I(n,s)}function p(){const{delay:o=0,duration:r=300,easing:a=e,tick:p=t,css:m}=l||ot;m&&(s=N(n,0,1,r,o,a,m,u++)),p(0,1);const d=h()+o,b=d+r;i&&i.abort(),c=!0,D((()=>J(n,!0,"start"))),i=g((t=>{if(c){if(t>=b)return p(1,0),J(n,!0,"end"),f(),c=!1;if(t>=d){const e=a((t-d)/r);p(e,1-e)}}return c}))}let m=!1;return{start(){m||(I(n),a(l)?(l=l(),K().then(p)):p())},invalidate(){m=!1},end(){c&&(f(),c=!1)}}}(m,Xr,{delay:201,x:300,duration:200,opacity:0})),d.start()})),w=!0)},o(n){nt(O,n),nt(u.$$.fragment,n),nt(L,n),d&&d.invalidate(),b=function(n,o,r){let i,l=o(n,r),c=!0;const u=Q;function f(){const{delay:o=0,duration:r=300,easing:a=e,tick:f=t,css:p}=l||ot;p&&(i=N(n,1,0,r,o,a,p));const m=h()+o,d=m+r;D((()=>J(n,!1,"start"))),g((t=>{if(c){if(t>=d)return f(0,1),J(n,!1,"end"),--u.r||s(u.c),!1;if(t>=m){const e=a((t-m)/r);f(1-e,e)}}return c}))}return u.r+=1,a(l)?K().then((()=>{l=l(),f()})):f(),{end(t){t&&l.tick&&l.tick(1,0),c&&(i&&I(n,i),c=!1)}}}(m,Xr,{x:300,duration:200,opacity:0}),w=!1},d(t){t&&$(o),O&&O.d(t),ct(u),L&&L.d(t),t&&b&&b.end()}}}function vs(t,e,n){let{$$slots:o={},$$scope:r}=e;return t.$$set=t=>{"$$scope"in t&&n(0,r=t.$$scope)},[r,o]}class ys extends pt{constructor(t){super(),ft(this,t,vs,gs,i,{})}}function $s(t){let e,n,o;function r(e){t[1](e)}let s={defaultLayoutComponent:ys};return void 0!==t[0]&&(s.routes=t[0]),e=new Wr({props:s}),A.push((()=>function(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}(e,"routes",r))),{c(){it(e.$$.fragment)},m(t,n){lt(e,t,n),o=!0},p(t,[o]){const r={};var s;!n&&1&o&&(n=!0,r.routes=t[0],s=()=>n=!1,k.push(s)),e.$set(r)},i(t){o||(et(e.$$.fragment,t),o=!0)},o(t){nt(e.$$.fragment,t),o=!1},d(t){ct(e,t)}}}function Rs(t,e,n){Vr.setNotFoundRoute("/svelte-client-router/myCustomNotFoundRoute"),Vr.setErrorRoute("/svelte-client-router/myCustomErrorRoute"),Vr.setConsoleLogStores(!1),Vr.setNavigationHistoryLimit(10),Vr.setHashMode(!0),Vr.setUseScroll(!0),Vr.setScrollProps({top:0,left:0,behavior:"smooth",timeout:10}),Vr.setOnError(((t,e)=>{console.log("GLOBAL ERROR CONFIG",e)}));let o=[{name:"root",path:"/",beforeEnter:[(t,e,n,o,r)=>{t({redirect:"/svelte-client-router"})}]},{name:"rootRoute",path:"/svelte-client-router",lazyLoadComponent:()=>Promise.resolve().then((function(){return Ls})),title:"SCR - Presentation"},{name:"installationRoute",path:"/svelte-client-router/installation",lazyLoadComponent:()=>Promise.resolve().then((function(){return Is})),title:"SCR - Installation"},{name:"gettingStartedRoute",path:"/svelte-client-router/gettingStarted",lazyLoadComponent:()=>Promise.resolve().then((function(){return Ms})),title:"SCR - Getting Started"},{name:"configurationOptionsRoute",path:"/svelte-client-router/configurationOptions",lazyLoadComponent:()=>Promise.resolve().then((function(){return ks})),title:"SCR - Configuration Options"},{name:"configurationGlobalBeforeEnterOptionRoute",path:"/svelte-client-router/configurationBeforeEnter",lazyLoadComponent:()=>Promise.resolve().then((function(){return Ws})),title:"SCR - Configuration - Before Enter"},{name:"configurationOnErrorOptionRoute",path:"/svelte-client-router/configurationOnError",lazyLoadComponent:()=>Promise.resolve().then((function(){return Qs})),title:"SCR - Configuration - On Error"},{name:"routeObjectOptionsRoute",path:"/svelte-client-router/routeObjectOptions",lazyLoadComponent:()=>Promise.resolve().then((function(){return ea})),title:"SCR - Route Object - Options"},{name:"routeObjectBeforeEnterRoute",path:"/svelte-client-router/routeObjectBeforeEnter",lazyLoadComponent:()=>Promise.resolve().then((function(){return sa})),title:"SCR - Route Object - Before Enter Functions"},{name:"routeObjectAfterBeforeEnterRoute",path:"/svelte-client-router/routeObjectAfterBeforeEnter",lazyLoadComponent:()=>Promise.resolve().then((function(){return la})),title:"SCR - Route Object - After Before Function"},{name:"routeObjectOnErrorRoute",path:"/svelte-client-router/routeObjectOnError",lazyLoadComponent:()=>Promise.resolve().then((function(){return pa})),title:"SCR - Route Object - On Error Function"},{name:"routeComponentPropertiesRoute",path:"/svelte-client-router/routeComponentProperties",lazyLoadComponent:()=>Promise.resolve().then((function(){return ga})),title:"SCR - Route Component - Properties"},{name:"routeComponentComponentsRoute",path:"/svelte-client-router/routeComponentComponents",lazyLoadComponent:()=>Promise.resolve().then((function(){return $a})),title:"SCR - Route Component - Components"},{name:"navigationRoutingRoute",path:"/svelte-client-router/navigationRouting",lazyLoadComponent:()=>Promise.resolve().then((function(){return xa})),title:"SCR - Navigation - Routing"},{name:"navigationStoreRoute",path:"/svelte-client-router/navigationStore",lazyLoadComponent:()=>Promise.resolve().then((function(){return Sa})),title:"SCR - Navigation - Store"},{name:"routerLinkPropertiesRoute",path:"/svelte-client-router/routerLinkProperties",lazyLoadComponent:()=>Promise.resolve().then((function(){return Oa})),title:"SCR - Route Link - Properties"}];return[o,function(t){o=t,n(0,o)}]}const Cs=new class extends pt{constructor(t){super(),ft(this,t,Rs,$s,i,{})}}({target:document.body});function xs(t){let e,n,o,r;const s=t[1].default,a=c(s,t,t[0],null);return{c(){e=R("div"),n=R("hr"),o=x(),a&&a.c(),S(n,"class","scr-hr"),S(e,"class","scr-footer svelte-rxr6jj")},m(t,s){y(t,e,s),v(e,n),v(e,o),a&&a.m(e,null),r=!0},p(t,[e]){a&&a.p&&1&e&&f(a,s,t,t[0],e,null,null)},i(t){r||(et(a,t),r=!0)},o(t){nt(a,t),r=!1},d(t){t&&$(e),a&&a.d(t)}}}function _s(t,e,n){let{$$slots:o={},$$scope:r}=e;return t.$$set=t=>{"$$scope"in t&&n(0,r=t.$$scope)},[r,o]}class ws extends pt{constructor(t){super(),ft(this,t,_s,xs,i,{})}}function Ss(e){let n,o,r,s;return{c(){n=R("button"),o=C(e[0]),S(n,"title",e[2]),S(n,"style",e[1]),S(n,"type","button"),S(n,"class","btn scr-button")},m(t,a){y(t,n,a),v(n,o),r||(s=w(n,"click",e[3]),r=!0)},p(t,[e]){1&e&&E(o,t[0]),4&e&&S(n,"title",t[2]),2&e&&S(n,"style",t[1])},i:t,o:t,d(t){t&&$(n),r=!1,s()}}}function Ts(t,e,n){let{routeName:o="rootRoute"}=e,{text:r="Button"}=e,{style:s=""}=e,{title:a}=e;return t.$$set=t=>{"routeName"in t&&n(4,o=t.routeName),"text"in t&&n(0,r=t.text),"style"in t&&n(1,s=t.style),"title"in t&&n(2,a=t.title)},[r,s,a,function(){Kr({name:o})},o]}class Es extends pt{constructor(t){super(),ft(this,t,Ts,Ss,i,{routeName:4,text:0,style:1,title:2})}}function Os(e){let n,o,r,s;return r=new Es({props:{style:"float:right",text:"Next",routeName:"installationRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),s=!0},p:t,i(t){s||(et(r.$$.fragment,t),s=!0)},o(t){nt(r.$$.fragment,t),s=!1},d(t){t&&$(n),ct(r)}}}function js(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d;return m=new ws({props:{$$slots:{default:[Os]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Presentation",o=x(),r=R("p"),r.innerHTML="Hi.. This is The Svelte Router - thought to be focused on controlling what\n happens before entering the route.\n
    \n
    \n The motivation to develop this router was that, until now, there isn't a nice\n router for svelte. When we think on routing what do we want? Did you stop do\n think about it?\n
    \n
    \n Let's see what we thought...",s=x(),a=R("ul"),a.innerHTML='
  • Lazy Load Components and Layouts
  • \n
  • Global and Per Route Layout
  • \n
  • Execute something Before Enter The Route
  • \n
  • Execute something Before Enter Each Route
  • \n
  • The possibility to ignore global before enter on a single route
  • \n
  • A Loading Component To Keep Our Users Waiting
  • \n
  • A Error Component To land when something goes wrong
  • \n
  • A Not Found Component To land when the user try to enter a not existing\n route
  • \n
  • Customize this routes and components at our will
  • \n
  • To set the title automatically
  • \n
  • To pass information between Before Enter Function and send to Route Loaded\n Components
  • \n
  • The possibility to use hash routing
  • ',i=x(),l=R("p"),l.innerHTML="Not only that is important but to control the overall behaviour when routing.\n Where to set the scroll position, reload the route everytime or just when I\n am not in the route - this may prevent some looping issues in your\n application.\n
    \n
    \n Anyway a lot of cool stuff when routing. So in each section it will be provided\n the configuration used to configure each route ok? See below the configuration\n for this first route. \n
    \n Pretty simple isn't it ?",c=x(),u=R("center"),u.innerHTML='The configuration for this route.',f=x(),p=R("pre"),p.textContent='{\n name: "rootRoute",\n path: "/svelte-client-router",\n lazyLoadComponent: () => import("./docs/pages/SCR_Presentation.svelte"),\n title: "SCR - Presentation",\n}',h=x(),it(m.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(l,"class","scr-text-justify"),S(u,"class","scr-center"),S(p,"class","scr-pre"),S(e,"class","scr-page")},m(t,b){y(t,e,b),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),lt(m,e,null),d=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),m.$set(n)},i(t){d||(et(m.$$.fragment,t),d=!0)},o(t){nt(m.$$.fragment,t),d=!1},d(t){t&&$(e),ct(m)}}}var Ls=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,js,i,{})}}});function qs(e){let n,o,r,s,a,i;return r=new Es({props:{style:"float:left",text:"Previous",routeName:"rootRoute"}}),a=new Es({props:{style:"float:right",text:"Next",routeName:"gettingStartedRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function Ns(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g;return b=new ws({props:{$$slots:{default:[qs]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Installation",o=x(),r=R("h5"),r.textContent="Via npm:",s=x(),a=R("pre"),a.textContent="npm install svelte-client-router",i=x(),l=R("h5"),l.textContent="Importing in your code:",c=x(),u=R("pre"),u.innerHTML='// This is just an example of all possibilities exported by the package\nimport { \n SCR_ROUTER_COMPONENT,\n SCR_ROUTER_LINK,\n SCR_ROUTER_STORE,\n SCR_CONFIG_STORE,\n SCR_NAVIGATE_STORE,\n pushRoute,\n backRoute,\n} from "svelte-client-router"',f=x(),p=R("center"),p.innerHTML='The configuration for this route.',h=x(),m=R("pre"),m.innerHTML='// This is an example of one route declaration.\n// This object must go inside of an array.\n// See the next chapter for more info!\n{\n name: "installationRoute",\n path: "/svelte-client-router/installation",\n lazyLoadComponent: () => import("./docs/pages/SCR_Installation.svelte"),\n title: "SCR - Installation",\n}',d=x(),it(b.$$.fragment),S(n,"class","scr-h4"),S(a,"class","scr-pre"),S(u,"class","scr-pre"),S(p,"class","scr-center"),S(m,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),lt(b,e,null),g=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),b.$set(n)},i(t){g||(et(b.$$.fragment,t),g=!0)},o(t){nt(b.$$.fragment,t),g=!1},d(t){t&&$(e),ct(b)}}}var Is=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,Ns,i,{})}}});function Ps(e){let n,o,r,s,a,i;return r=new Es({props:{style:"float:left",text:"Previous",routeName:"installationRoute"}}),a=new Es({props:{style:"float:right",text:"Next",routeName:"configurationOptionsRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function Fs(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,_,w,T,E,O,j,L,q,N,I,P,F,M,A,B;return A=new ws({props:{$$slots:{default:[Ps]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Getting Started",o=x(),r=R("h5"),r.textContent="Loading The Svelte Client Router",s=x(),a=R("pre"),a.innerHTML='import { \n SCR_ROUTER_COMPONENT,\n SCR_ROUTER_LINK,\n SCR_ROUTER_STORE,\n SCR_CONFIG_STORE,\n SCR_NAVIGATE_STORE,\n pushRoute,\n backRoute,\n} from "svelte-client-router"\n\n// Make sure to declare the default slot "<slot />" inside of your layout component\n// For more info about Svelte Slots\nimport MY_LAYOUT from "./path/to/my/MY_LAYOUT.svelte";',i=x(),l=R("br"),c=x(),u=R("h5"),u.textContent="Declaring Routes",f=x(),p=R("pre"),p.textContent='const routes = [\n {\n name: "root",\n path: "/",\n beforeEnter: [\n (resolve, rFrom, rTo, params, payload) => {\n resolve({ redirect: "/svelte-client-router" } );\n } ,\n ],\n } ,\n {\n name: "rootRoute",\n path: "/svelte-client-router",\n lazyLoadComponent: () => import("./docs/pages/SCR_Presentation.svelte"),\n title: "SCR - Presentation",\n } ,\n {\n name: "installationRoute",\n path: "/svelte-client-router/installation",\n lazyLoadComponent: () => import("./docs/pages/SCR_Installation.svelte"),\n title: "SCR - Installation",\n } ,\n {\n name: "gettingStartedRoute",\n path: "/svelte-client-router/gettingStarted",\n lazyLoadComponent: () => import("./docs/pages/SCR_GettingStarted.svelte"),\n title: "SCR - Getting Started",\n } ,\n ];\n}',h=x(),m=R("br"),d=x(),b=R("h5"),b.textContent="Using The Component",g=x(),C=R("pre"),C.textContent="",_=x(),w=R("p"),w.innerHTML="That is it. We are ready to route our application.\n
    \n
    \n Of course this is a very basic configuration though. Go through the next sections\n to learn about more advanced settings.",T=x(),E=R("br"),O=x(),j=R("h5"),j.textContent="Full Example",L=x(),q=R("pre"),q.innerHTML='// Svelte Component\n<script>\n\n// Importing Svelte Client Router\nimport { \n SCR_ROUTER_COMPONENT,\n SCR_ROUTER_LINK,\n SCR_ROUTER_STORE,\n SCR_CONFIG_STORE,\n SCR_NAVIGATE_STORE,\n pushRoute,\n backRoute,\n} from "svelte-client-router"\n\n// Make sure to declare the default slot "<slot />" inside of your layout component\n// For more info about Svelte Slots\n// Importing My Very Nice Layout\nimport MY_LAYOUT from "./path/to/my/MY_LAYOUT.svelte";\n\n// Setting Routes\nconst routes = [\n {\n // Doesn't declare a component because it redirects only!\n name: "root",\n path: "/",\n beforeEnter: [\n (resolve, rFrom, rTo, params, payload) => {\n resolve({ redirect: "/svelte-client-router" } );\n } ,\n ],\n } ,\n {\n name: "rootRoute",\n path: "/svelte-client-router",\n lazyLoadComponent: () => import("./docs/pages/SCR_Presentation.svelte"),\n title: "SCR - Presentation",\n } ,\n {\n name: "installationRoute",\n path: "/svelte-client-router/installation",\n lazyLoadComponent: () => import("./docs/pages/SCR_Installation.svelte"),\n title: "SCR - Installation",\n } ,\n {\n name: "gettingStartedRoute",\n path: "/svelte-client-router/gettingStarted",\n lazyLoadComponent: () => import("./docs/pages/SCR_GettingStarted.svelte"),\n title: "SCR - Getting Started",\n } ,\n ];\n}\n\n<script> \n\n<!-- Using SCR Router Component - passing routes and my custom layout -->\n<SCR_ROUTER_COMPONENT bind:routes defaultLayoutComponent={MY_LAYOUT} />',N=x(),I=R("center"),I.innerHTML='The configuration for this route.',P=x(),F=R("pre"),F.textContent='{\n name: "gettingStartedRoute",\n path: "/svelte-client-router/gettingStarted",\n lazyLoadComponent: () => import("./docs/pages/SCR_GettingStarted.svelte"),\n title: "SCR - Getting Started",\n}',M=x(),it(A.$$.fragment),S(n,"class","scr-h4"),S(a,"class","scr-pre"),S(p,"class","scr-pre"),S(C,"class","scr-pre"),S(w,"class","scr-text-justify"),S(q,"class","scr-pre"),S(I,"class","scr-center"),S(F,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,C),v(e,_),v(e,w),v(e,T),v(e,E),v(e,O),v(e,j),v(e,L),v(e,q),v(e,N),v(e,I),v(e,P),v(e,F),v(e,M),lt(A,e,null),B=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),A.$set(n)},i(t){B||(et(A.$$.fragment,t),B=!0)},o(t){nt(A.$$.fragment,t),B=!1},d(t){t&&$(e),ct(A)}}}var Ms=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,Fs,i,{})}}});function As(e){let n,o,r,s,a,i;return r=new Es({props:{style:"float:left",text:"Previous",routeName:"gettingStartedRoute"}}),a=new Es({props:{style:"float:right",text:"Next",routeName:"configurationGlobalBeforeEnterOptionRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function Bs(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,_,w,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H,z,D,U,G,W,Y,V,K,J,X,Q,Z,tt,ot,rt,st,at,ut,ft,pt,ht,mt,dt,bt,gt,vt,yt,$t,Rt,Ct,xt,_t,wt,St,Tt,Et,Ot,jt,Lt,qt,Nt,It,Pt,Ft,Mt,At,Bt,kt,Ht,zt,Dt,Ut,Gt,Wt,Yt,Vt,Kt,Jt,Xt,Qt,Zt,te,ee,ne,oe,re,se,ae,ie,le,ce,ue,fe,pe,he,me,de,be;return de=new ws({props:{$$slots:{default:[As]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Configuration Options",o=x(),r=R("p"),r.innerHTML='The configuration are managed in a Svelte Store.\n The Svelte Store are one of the cooliest things in Svelte. Is very reactive and\n helps us to make our router reactive too. You can change the behaviour at any\n point and will instantly react to it.',s=x(),a=R("h5"),a.textContent="Importing",i=x(),l=R("pre"),l.innerHTML='// Importing configuration store\nimport { SCR_CONFIG_STORE } from "svelte-client-router"',c=x(),u=R("p"),u.textContent="Next.. lets check out all the available properties.",f=x(),p=R("hr"),h=x(),m=R("h4"),m.textContent="Hash Mode",d=x(),b=R("p"),b.innerHTML="The hashMode option controls either if our router must check a hashed\n based route like this site or must NOT consider a hashed based route\n path where the hash char doesn't mean much.\n
    \n
    \n This website for example must be hashed based because Github Pages is not prepared\n to return the index.html page for each route request.",g=x(),C=R("pre"),C.innerHTML='// ## Hash Mode checks route using #/ before the location path\n// ## for example http://localhost:5000/pathAAA#/pathBBB\n// ## it will consider only pathBBB and ignore pathAAA as path!\n// ## Boolean \n// ## Default value: false\n{\n hashMode: false,\n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setHashMode(true);',_=x(),w=R("hr"),T=x(),E=R("h4"),E.textContent="Navigation History Limit",O=x(),j=R("p"),j.innerHTML="The navigationHistoryLimit option sets the size of the navigation\n history. Inside the router store we have an array that contains all the\n route objects where the first position is the last page visited and the last\n position is the first page visited.\n
    \n
    \n If is set 0 or less it will be considered unlimited.",L=x(),q=R("pre"),q.innerHTML='// ## Navigation History Limit is the amount of route history is added \n// ## in the route navigation history list \n// ## 0 or -1 equals to "no limit"\n// ## Integer\n// ## Default value: 10\n{\n navigationHistoryLimit: 10, \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setNavigationHistoryLimit(10);',N=x(),I=R("hr"),P=x(),F=R("h4"),F.textContent="Save Mode",M=x(),A=R("p"),A.innerHTML="The saveMode option has the following options:",B=x(),k=R("ul"),k.innerHTML="
  • localstorage: (default) Saves the router store in the localstorage.
  • \n
  • indexeddb: Saves the router store in the Index DB Storage.
  • \n
  • none: Doesn't save the store anywhere.
  • ",H=x(),z=R("p"),z.textContent="The implications are implicit. Saving the route object helps us to keep\n track all the user history if you need that information when reloading the\n page.",D=x(),U=R("pre"),U.innerHTML='// ## Save mode sets the type of saving history route and store\n// ## It can be set to one of this following values:\n// ## - localstorage: it saves route in the localstorage\n// ## - indexeddb: it saves route in the IndexedDb \n// ## - none: Doesn't save anything - meaning when reload it starts fresh all values!\n// ## String\n// ## Default value: localstorage\n{\n saveMode: localstorage, \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setSaveMode("localstorage");',G=x(),W=R("hr"),Y=x(),V=R("h4"),V.textContent="Not Found Route",K=x(),J=R("p"),J.innerHTML="The notFoundRoute option sets the route to redirect to when the user\n enter a non existent url path.\n
    \n
    \n OBS: It has to start with "/"",X=x(),Q=R("pre"),Q.innerHTML='// ## Not Found Route Path\n// ## is the path that should redirect when not found a path in the application\n// ## String - must include "/"\n// ## Default value: /notFound\n{\n notFound: "/notFound", \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setNotFoundRoute("/notFound");',Z=x(),tt=R("hr"),ot=x(),rt=R("h4"),rt.textContent="Error Route",st=x(),at=R("p"),at.innerHTML="The errorRoute option sets the route to redirect to when an error\n occurs.\n
    \n
    \n OBS: It has to start with "/"",ut=x(),ft=R("pre"),ft.innerHTML='// ## Error Route Path\n// ## is the path that should redirect when an error occurs in the application\n// ## String - must include "/"\n// ## Default value: /error\n{\n notFound: "/error", \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setErrorRoute("/error");',pt=x(),ht=R("hr"),mt=x(),dt=R("h4"),dt.textContent="Console Log Error Messages",bt=x(),gt=R("p"),gt.innerHTML="The consoleLogErrorMessages option enables SCR to log all possible\n errors in the console log.\n
    \n
    \n When something goes wrong it helps to see the stack trace and the error messages.",vt=x(),yt=R("pre"),yt.innerHTML='// ## Console Log Error Messages logs in the console \n// ## any error messages of the SCR for debugging purposes\n// ## Boolean\n// ## Default value: true\n{\n consoleLogStores: true, \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setConsoleLogErrorMessages(true);',$t=x(),Rt=R("hr"),Ct=x(),xt=R("h4"),xt.textContent="Console Log Stores",_t=x(),wt=R("p"),wt.innerHTML="The consoleLogStores option enables SCR to log all changes in the\n stores.\n
    \n
    \n This is great for debugging purposes.",St=x(),Tt=R("pre"),Tt.innerHTML='// ## Console Log Stores logs in the console \n// ## any changes in the Router Store for debugging purposes\n// ## Boolean\n// ## Default value: true\n{\n setConsoleLogStores: true, \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setConsoleLogStores(true);',Et=x(),Ot=R("hr"),jt=x(),Lt=R("h4"),Lt.textContent="Uses Route Layout",qt=x(),Nt=R("p"),Nt.innerHTML="The usesRouteLayout option tells the SCR that you are going to use a\n Global Layout.\n
    \n
    \n You can set a layout per route, but most common cases you want to set a global\n layout and if necessary set a different route layout.\n
    \n
    \n The SCR has a default simple layout that you probably not going to use, so if\n you do not want to use a custom layout it is better to set this option to false.",It=x(),Pt=R("pre"),Pt.innerHTML='// ## Uses Route Layout defines if you will be using layout \n// ## for each route or not - can be ignored in the route \n// ## Boolean\n// ## Default value: true\n{\n usesRouteLayout: true, \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setUsesRouteLayout(true);',Ft=x(),Mt=R("hr"),At=x(),Bt=R("h4"),Bt.textContent="Consider Trailing Slash On Matching Route",kt=x(),Ht=R("p"),Ht.innerHTML="The considerTrailingSlashOnMatchingRoute option speaks for itself. When\n searching for a matching route a trailing slash should be considered or not.",zt=x(),Dt=R("pre"),Dt.innerHTML='// ## Consider Trailing Slash On Matching Route\n// ## add an slash in the end of the route path to search in the route definitions\n// ## Boolean\n// ## Default value: true\n{\nconsiderTrailingSlashOnMatchingRoute: true, \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setConsiderTrailingSlashOnMatchingRoute(true);',Ut=x(),Gt=R("hr"),Wt=x(),Yt=R("h4"),Yt.textContent="Use Scroll",Vt=x(),Kt=R("p"),Kt.innerHTML="The useScroll option tell SCR that you will be using a scroll\n behaviour globally. That means SCR will apply the global scrollProps\n configuration for each route entered if the route do not specify a differente\n scrollProps\n configuration or the ignoreScroll property.",Jt=x(),Xt=R("pre"),Xt.innerHTML='// ## Use Scroll - enable or disables scrolling on entering the route\n// ## Boolean\n// ## Default value: true\n{\nuseScroll: true, \n}\n\n// How to set in the store\nSCR_CONFIG_STORE.setUseScroll(true);',Qt=x(),Zt=R("hr"),te=x(),ee=R("h4"),ee.textContent="Scroll Props",ne=x(),oe=R("p"),oe.innerHTML="The scrollProps option is the behaviour options when the scrolling is enabled.\n It has the following options:",re=x(),se=R("ul"),se.innerHTML="
  • top: The top position to scroll - Default is 0
  • \n
  • left: The left position to scroll - Default is 0
  • \n
  • behaviour: The behaviour when scrolling to position - Default is\n "smooth"
  • \n
  • timeout: This options sets a timeout to fire the scrolling. The\n minimum value accepted is 10 milliseconds. Default is 10 milliseconds.
  • ",ae=x(),ie=R("pre"),ie.innerHTML='// ## Scroll Props\n// ## The scrolling props on entering the route if enabled\n// ## Default Values: \n// ## scrollProps: {\n// ## top: 0,\n// ## left: 0,\n// ## behaviour: "smooth",\n// ## timeout: 10, // timeout must be greater than 10 milliseconds\n// ## },\n// ## Object\n// ## Default value: {\n top: 0,\n left: 0,\n behaviour: "smooth", \n timeout: 10, // timeout must be greater than 10 milliseconds\n}\n{\nscrollProps: {\n top: 0,\n left: 0,\n behaviour: "smooth",\n timeout: 10, // timeout must be greater than 10 milliseconds\n}, \n\n// How to set in the store\nSCR_CONFIG_STORE.setScrollProps({\n top: 0,\n left: 0,\n behaviour: "smooth",\n timeout: 10,\n});',le=x(),ce=R("p"),ce.textContent="So that is it for this section. But the configuration store is not over yet.\n The next properties has its own sections each. Click next to see more\n information.",ue=x(),fe=R("center"),fe.innerHTML='The configuration for this route.',pe=x(),he=R("pre"),he.textContent='{\n name: "configurationOptionsRoute",\n path: "/svelte-client-router/configurationOptions",\n lazyLoadComponent: () => import("./docs/pages/SCR_ConfigurationOptions.svelte"),\n title: "SCR - Configuration Options",\n}',me=x(),it(de.$$.fragment),S(n,"class","scr-h4"),S(l,"class","scr-pre"),S(p,"class","scr-hr"),S(m,"class","scr-h4"),S(b,"class","scr-text-justify"),S(C,"class","scr-pre"),S(w,"class","scr-hr"),S(E,"class","scr-h4"),S(j,"class","scr-text-justify"),S(q,"class","scr-pre"),S(I,"class","scr-hr"),S(F,"class","scr-h4"),S(A,"class","scr-text-justify"),S(U,"class","scr-pre"),S(W,"class","scr-hr"),S(V,"class","scr-h4"),S(J,"class","scr-text-justify"),S(Q,"class","scr-pre"),S(tt,"class","scr-hr"),S(rt,"class","scr-h4"),S(at,"class","scr-text-justify"),S(ft,"class","scr-pre"),S(ht,"class","scr-hr"),S(dt,"class","scr-h4"),S(gt,"class","scr-text-justify"),S(yt,"class","scr-pre"),S(Rt,"class","scr-hr"),S(xt,"class","scr-h4"),S(wt,"class","scr-text-justify"),S(Tt,"class","scr-pre"),S(Ot,"class","scr-hr"),S(Lt,"class","scr-h4"),S(Nt,"class","scr-text-justify"),S(Pt,"class","scr-pre"),S(Mt,"class","scr-hr"),S(Bt,"class","scr-h4"),S(Ht,"class","scr-text-justify"),S(Dt,"class","scr-pre"),S(Gt,"class","scr-hr"),S(Yt,"class","scr-h4"),S(Kt,"class","scr-text-justify"),S(Xt,"class","scr-pre"),S(Zt,"class","scr-hr"),S(ee,"class","scr-h4"),S(oe,"class","scr-text-justify"),S(ie,"class","scr-pre"),S(ce,"class","scr-text-justify"),S(fe,"class","scr-center"),S(he,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,C),v(e,_),v(e,w),v(e,T),v(e,E),v(e,O),v(e,j),v(e,L),v(e,q),v(e,N),v(e,I),v(e,P),v(e,F),v(e,M),v(e,A),v(e,B),v(e,k),v(e,H),v(e,z),v(e,D),v(e,U),v(e,G),v(e,W),v(e,Y),v(e,V),v(e,K),v(e,J),v(e,X),v(e,Q),v(e,Z),v(e,tt),v(e,ot),v(e,rt),v(e,st),v(e,at),v(e,ut),v(e,ft),v(e,pt),v(e,ht),v(e,mt),v(e,dt),v(e,bt),v(e,gt),v(e,vt),v(e,yt),v(e,$t),v(e,Rt),v(e,Ct),v(e,xt),v(e,_t),v(e,wt),v(e,St),v(e,Tt),v(e,Et),v(e,Ot),v(e,jt),v(e,Lt),v(e,qt),v(e,Nt),v(e,It),v(e,Pt),v(e,Ft),v(e,Mt),v(e,At),v(e,Bt),v(e,kt),v(e,Ht),v(e,zt),v(e,Dt),v(e,Ut),v(e,Gt),v(e,Wt),v(e,Yt),v(e,Vt),v(e,Kt),v(e,Jt),v(e,Xt),v(e,Qt),v(e,Zt),v(e,te),v(e,ee),v(e,ne),v(e,oe),v(e,re),v(e,se),v(e,ae),v(e,ie),v(e,le),v(e,ce),v(e,ue),v(e,fe),v(e,pe),v(e,he),v(e,me),lt(de,e,null),be=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),de.$set(n)},i(t){be||(et(de.$$.fragment,t),be=!0)},o(t){nt(de.$$.fragment,t),be=!1},d(t){t&&$(e),ct(de)}}}var ks=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,Bs,i,{})}}});function Hs(e){let n,o,r,s,a,i,l,c,u;return{c(){n=R("h4"),n.textContent="Anatomy of the Before Enter Function",o=x(),r=R("p"),r.textContent="When declaring a Before Enter function it will be provided some cool\n parameters for you to play with. Lets check them in order of declaration:",s=x(),a=R("pre"),a.innerHTML='// Example of one before enter function declaration\n(resolve, routeFrom, routeTo, routeObjParams, payload) => { \n resolve(true); \n}',i=x(),l=R("ul"),l.innerHTML='
  • resolve: The first param is the a solvable function. When all the\n code has executed you must call this function to end it. Note that there\n isn't a reject call as one might expect.\n
    \n You always solve the Before Function with resolve! The resolve function can receive\n the following parameters:\n
    • true: When is everything ok and should continue execution. For example:\n resolve(true)
    • \n
    • false: When something went wrong and should stop execution. For example:\n resolve(false) or resolve()
    • \n
    • { redirect: "/somePath" }: To redirect to another\n route. This means that it will not continue executing the Before Enter\n sequence and just will redirect to the specified path.\n
      \n For example: resolve({ redirect: "/somePath" })\n
      \n
    • \n
    • { path: "/somePath" }: To redirect to another route.\n This means that it will not continue executing the Before Enter sequence\n and just will redirect to the specified path.\n
      \n For example: resolve({ path: "/somePath" })\n
      \n
    • \n
    • { name: "routeName" }: To redirect to another route by\n name. This means that it will not continue executing the Before Enter\n sequence and just will redirect to the specified route name.\n
      \n For example: resolve({ name: "someRouteName" })\n
      \n
  • \n
  • routeFrom: This is an object containing the values of the route which\n is coming from. This object has the following values:\n
    • name: The name of the route
    • \n
    • hash: The hash value of the route
    • \n
    • hostname: The hostname of the route. For example: "localhost"
    • \n
    • origin: The origin of the route. For example:\n "http://localhost:5000"
    • \n
    • params: The query params of the route. For example: {\n testParam: "someParamValue" }
    • \n
    • pathname: The path of the route. For example:\n "/svelte-client-router/configurationBeforeEnter"
    • \n
    • port: The port of the host. For example: "5000"
    • \n
    • protocol: The protocol used. For example: "http:"
  • \n
    \n
  • routeTo: This is an object containing the values of the route which\n is going to. This object has the following values:\n
    • name: The name of the route
    • \n
    • hash: The hash value of the route
    • \n
    • hostname: The hostname of the route. For example: "localhost"
    • \n
    • origin: The origin of the route. For example:\n "http://localhost:5000"
    • \n
    • params: The query params of the route. For example: {\n testParam: "someParamValue" }
    • \n
    • pathname: The path of the route. For example:\n "/svelte-client-router/configurationBeforeEnter"
    • \n
    • port: The port of the host. For example: "5000"
    • \n
    • protocol: The protocol used. For example: "http:"
  • \n
    \n
  • routeObjectParam: All the parameters passed to this route set in the\n route object definition until the execution of this before enter. Order of declaration matters.\n It will include any defined payload properties.
  • \n
    \n
  • payload: This is an special object. You can set parameters to pass\n forward down the chain of before enter funcions execution. This variable\n will be made available in all the component and layout components.\n
    \n OBS: DO NOT REDEFINE THIS OBJECT - because you will lose all previous\n properties set and it will reset the object not sending the new definition\n that you made for this object.
  • ',c=x(),u=R("p"),u.textContent="So that is it for this section. This is a powerfull feature enables us to\n control for each route necessary security of overall behaviour.",S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(a,"class","scr-pre"),S(u,"class","scr-text-justify")},m(t,e){y(t,n,e),y(t,o,e),y(t,r,e),y(t,s,e),y(t,a,e),y(t,i,e),y(t,l,e),y(t,c,e),y(t,u,e)},p:t,i:t,o:t,d(t){t&&$(n),t&&$(o),t&&$(r),t&&$(s),t&&$(a),t&&$(i),t&&$(l),t&&$(c),t&&$(u)}}}class zs extends pt{constructor(t){super(),ft(this,t,null,Hs,i,{})}}function Ds(t){let e;return{c(){e=R("a"),e.textContent="Route Object Properties",S(e,"href","/"),O(e,"pointer-events","none")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function Us(e){let n,o,r,s,a,i;return r=new Es({props:{style:"float:left",text:"Previous",routeName:"configurationOptionsRoute"}}),a=new Es({props:{style:"float:right",text:"Next",routeName:"configurationOnErrorOptionRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function Gs(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,_,w,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H,z,D,U,G,W,Y,V,K;return L=new Yr({props:{to:{name:"routeObjectOptionsRoute"},elementProps:{style:"display: inline; cursor: pointer;"},$$slots:{default:[Ds]},$$scope:{ctx:t}}}),z=new zs({}),V=new ws({props:{$$slots:{default:[Us]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Configuration - Before Enter Function",o=x(),r=R("p"),s=C("The "),a=R("b"),a.textContent="beforeEnter",i=C(" option sets an array of functions or just a function\n that must be executed for before each route if the option\n "),l=R("b"),l.textContent="ignoreGlobalBeforeFunction",c=C("\n isn't set in the route definition object.\n "),u=R("br"),f=x(),p=R("br"),h=C("\n The default order of execution is first execute all Global Before Functions and\n then execute route object before enter functions. But for a particular route\n the behaviour maybe different. Maybe it is needed to execute the route before\n function before Global Before Functions.\n "),m=R("br"),d=x(),b=R("br"),g=C("\n If that is the case then you can set in the route object the option\n "),_=R("b"),_.textContent="executeRouteBEFBeforeGlobalBEF",w=C(" to true. When this option is enabled\n in the route definition object the default order of execution is overrided\n and executes route object before functions before Global Before Functions.\n "),T=R("br"),E=x(),O=R("br"),j=C("\n See the "),it(L.$$.fragment),q=C(" for more info.\n "),N=R("br"),I=x(),P=R("br"),F=C("\n See the next example of how to set this option:"),M=x(),A=R("pre"),A.innerHTML='// importing the SCR - The configuration store\nimport { SCR_CONFIG_STORE } from "svelte-client-router"\n\n// ------ SETTING A FUNCTION ------\n// Setting Global Before Enter Function\nSCR_CONFIG_STORE.setBeforeEnter((resolve) => { resolve(true); });\n\n// OR\n\n// ------ SETTING AN ARRAY OF FUNCTIONS ------\n// Setting Global Before Enter Functions\n// You can set as many Before Enter Functions as you want!\nSCR_CONFIG_STORE.setBeforeEnter([\n (resolve) => { resolve(true); },\n (resolve) => { resolve(true); },\n (resolve) => { resolve(true); },\n]);',B=x(),k=R("br"),H=x(),it(z.$$.fragment),D=x(),U=R("center"),U.innerHTML='The configuration for this route.',G=x(),W=R("pre"),W.textContent='{\n name: "configurationGlobalBeforeEnterOptionRoute",\n path: "/svelte-client-router/configurationBeforeEnter",\n lazyLoadComponent: () => import("./docs/pages/SCR_ConfigurationBeforeEnter.svelte"),\n title: "SCR - Configuration - Before Enter",\n}',Y=x(),it(V.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(A,"class","scr-pre"),S(U,"class","scr-center"),S(W,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(r,s),v(r,a),v(r,i),v(r,l),v(r,c),v(r,u),v(r,f),v(r,p),v(r,h),v(r,m),v(r,d),v(r,b),v(r,g),v(r,_),v(r,w),v(r,T),v(r,E),v(r,O),v(r,j),lt(L,r,null),v(r,q),v(r,N),v(r,I),v(r,P),v(r,F),v(e,M),v(e,A),v(e,B),v(e,k),v(e,H),lt(z,e,null),v(e,D),v(e,U),v(e,G),v(e,W),v(e,Y),lt(V,e,null),K=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),L.$set(n);const o={};1&e&&(o.$$scope={dirty:e,ctx:t}),V.$set(o)},i(t){K||(et(L.$$.fragment,t),et(z.$$.fragment,t),et(V.$$.fragment,t),K=!0)},o(t){nt(L.$$.fragment,t),nt(z.$$.fragment,t),nt(V.$$.fragment,t),K=!1},d(t){t&&$(e),ct(L),ct(z),ct(V)}}}var Ws=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,Gs,i,{})}}});function Ys(e){let n,o,r,s,a,i,l;return{c(){n=R("h4"),n.textContent="Anatomy of the On Error Function",o=x(),r=R("p"),r.innerHTML="When declaring a On Error Function it will be provided some parameters for you\n to deal with the issue.\n
    \n Lets check them in order of declaration:",s=x(),a=R("pre"),a.innerHTML='// Example of On Error function declaration\n(err, routeObjParams) => { \n console.error(err);\n}',i=x(),l=R("ul"),l.innerHTML="
  • err: The error object containing the error information
  • \n
  • routeObjParams: All the parameters passed until that error has\n occurred.\n
    \n This is a composed object and it has the following parameters:\n
    • currentRoute: The current route object containing the\n information of the route that the user is trying to access. It is\n composed by the following params:\n
      • name: The name of the route
      • \n
      • hash: The hash value of the route
      • \n
      • hostname: The hostname of the route. For example: "localhost"
      • \n
      • origin: The origin of the route. For example:\n "http://localhost:5000"
      • \n
      • params: The query params of the route. For example: {\n testParam: "someParamValue" }
      • \n
      • pathname: The path of the route. For example:\n "/svelte-client-router/configurationBeforeEnter"
      • \n
      • port: The port of the host. For example: "5000"
      • \n
      • protocol: The protocol used. For example: "http:"
    • \n
      \n
    • fromRoute: The coming from route object containing the\n information of the route that the user is coming from. It is composed by\n the following params:\n
      • name: The name of the route
      • \n
      • hash: The hash value of the route
      • \n
      • hostname: The hostname of the route. For example: "localhost"
      • \n
      • origin: The origin of the route. For example:\n "http://localhost:5000"
      • \n
      • params: The query params of the route. For example: {\n testParam: "someParamValue" }
      • \n
      • pathname: The path of the route. For example:\n "/svelte-client-router/configurationBeforeEnter"
      • \n
      • port: The port of the host. For example: "5000"
      • \n
      • protocol: The protocol used. For example: "http:"
    • \n
      \n
    • routeObjParams: all the parameters passed until the moment of the\n error, including any defined payload properties.
  • ",S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(a,"class","scr-pre")},m(t,e){y(t,n,e),y(t,o,e),y(t,r,e),y(t,s,e),y(t,a,e),y(t,i,e),y(t,l,e)},p:t,i:t,o:t,d(t){t&&$(n),t&&$(o),t&&$(r),t&&$(s),t&&$(a),t&&$(i),t&&$(l)}}}class Vs extends pt{constructor(t){super(),ft(this,t,null,Ys,i,{})}}function Ks(t){let e;return{c(){e=R("a"),e.textContent="Route Component Components",S(e,"href","/"),O(e,"pointer-events","none")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function Js(e){let n,o,r,s,a,i;return r=new Es({props:{style:"float:left",text:"Previous",routeName:"configurationGlobalBeforeEnterOptionRoute"}}),a=new Es({props:{style:"float:right",text:"Next",routeName:"routeObjectOptionsRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function Xs(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,_,w,T,E,O,j,L,q,N,I,P,F,M;return m=new Yr({props:{to:{name:"routeComponentComponentsRoute"},elementProps:{style:"display: inline; cursor: pointer;"},$$slots:{default:[Ks]},$$scope:{ctx:t}}}),E=new Vs({}),F=new ws({props:{$$slots:{default:[Js]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Configuration - On Error Function",o=x(),r=R("p"),s=C("The "),a=R("b"),a.textContent="onError",i=C(" option sets a function that is going to be executed for\n any route when something goes wrong.\n "),l=R("br"),c=x(),u=R("br"),f=C("\n When that happens the natural behaviour is to open the error page. In this context\n SCR has a very basic error component that comes with it. You can of course set\n you own error component and it is encouraged to do so.\n "),p=R("br"),h=C("\n See the "),it(m.$$.fragment),d=C(" for more info."),b=x(),g=R("pre"),g.innerHTML='// importing the SCR - The configuration store\nimport { SCR_CONFIG_STORE } from "svelte-client-router"\n\n// Setting Global On Error Function\nSCR_CONFIG_STORE.setOnError((err, routeObjParams) => { console.error(err) });',_=x(),w=R("br"),T=x(),it(E.$$.fragment),O=x(),j=R("p"),j.textContent="So that is it for this section. This feature enables us to handle any errors\n that may occur inside our routing definitions.",L=x(),q=R("center"),q.innerHTML='The configuration for this route.',N=x(),I=R("pre"),I.textContent='{\n name: "configurationOnErrorOptionRoute",\n path: "/svelte-client-router/configurationOnError",\n lazyLoadComponent: () => import("./docs/pages/SCR_ConfigurationOnError.svelte"),\n title: "SCR - Configuration - On Error",\n}',P=x(),it(F.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(g,"class","scr-pre"),S(j,"class","scr-text-justify"),S(q,"class","scr-center"),S(I,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(r,s),v(r,a),v(r,i),v(r,l),v(r,c),v(r,u),v(r,f),v(r,p),v(r,h),lt(m,r,null),v(r,d),v(e,b),v(e,g),v(e,_),v(e,w),v(e,T),lt(E,e,null),v(e,O),v(e,j),v(e,L),v(e,q),v(e,N),v(e,I),v(e,P),lt(F,e,null),M=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),m.$set(n);const o={};1&e&&(o.$$scope={dirty:e,ctx:t}),F.$set(o)},i(t){M||(et(m.$$.fragment,t),et(E.$$.fragment,t),et(F.$$.fragment,t),M=!0)},o(t){nt(m.$$.fragment,t),nt(E.$$.fragment,t),nt(F.$$.fragment,t),M=!1},d(t){t&&$(e),ct(m),ct(E),ct(F)}}}var Qs=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,Xs,i,{})}}});function Zs(e){let n,o,r,s,a,i;return r=new Es({props:{style:"float:left",text:"Previous",routeName:"configurationOnErrorOptionRoute"}}),a=new Es({props:{style:"float:right",text:"Next",routeName:"routeObjectBeforeEnterRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function ta(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,_,w,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H,z,D,U,G,W,Y,V,K,J,X,Q,Z,tt,ot,rt,st,at,ut,ft,pt,ht,mt,dt,bt,gt,vt,yt,$t,Rt,Ct,xt,_t,wt,St,Tt,Et,Ot,jt,Lt,qt,Nt,It,Pt,Ft,Mt,At,Bt,kt,Ht,zt,Dt,Ut,Gt,Wt,Yt,Vt,Kt,Jt,Xt,Qt,Zt,te,ee,ne,oe,re,se,ae,ie,le,ce,ue,fe,pe,he,me,de,be,ge,ve,ye,$e,Re,Ce,xe,_e,we,Se,Te,Ee,Oe,je,Le,qe,Ne,Ie,Pe,Fe;return Pe=new ws({props:{$$slots:{default:[Zs]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Route Object - Properties",o=x(),r=R("p"),r.innerHTML="This is where we can declare our routes. It has several option that\n modelates the route behaviour.\n
    \n There is some mandatory properties that configure a minimal route declaration.\n Lets check each option:",s=x(),a=R("hr"),i=x(),l=R("h4"),l.textContent="Name",c=x(),u=R("p"),u.innerHTML="The name option is mandatory. It an humam readable identification for\n this route.\n
    \n As it is an identification property must be unique. If some route is declared\n with the same name, it will always find the first route with that name and route\n to it.",f=x(),p=R("pre"),p.innerHTML='// ## Route Name\n// ## The name identifying this route\n// ## String - Obrigatory\n// ## Default value: none\n{\n name: "exampleOfRouteName",\n}',h=x(),m=R("hr"),d=x(),b=R("h4"),b.textContent="Path",g=x(),C=R("p"),C.innerHTML="The path is mandatory and it is the path to route to.\n
    \n
    \n As it is an identification property must be unique. If some route is declared\n with the same path, it will always find the first route with that path and route\n to it.",_=x(),w=R("pre"),w.innerHTML='// ## Route Path\n// ## The path identifying this route\n// ## String - Obrigatory\n// ## Default value: none\n{\n path: "/path/to/my/route",\n}',T=x(),E=R("hr"),O=x(),j=R("h4"),j.textContent="Component",L=x(),q=R("p"),q.innerHTML="The component is partially mandatory. This is because if the route\n only redirects, it will not use the loaded component.\n
    \n
    \n The component specified will be included inside the default slot of the Layout\n Component.",N=x(),I=R("pre"),I.innerHTML='// ## Component - the loaded component that is going to be used \n// for this route\n// ## Function - Imported component for this route\n// ## Default value: none\n\n// Import your component\nimport SCR_C1 from "./testComponents/SCR_C1.svelte";\n\n{\n // Setting your route component\n component: SCR_C1,\n}',P=x(),F=R("hr"),M=x(),A=R("h4"),A.textContent="Lazy Load Component",B=x(),k=R("p"),k.innerHTML="The lazyLoadComponent is partially mandatory. This is because if the\n route only redirects, it will not load any component.\n
    \n
    \n The component specified will be included inside the default slot of the Layout\n Component.",H=x(),z=R("pre"),z.innerHTML='// ## Lazy Load Component - the component that must be loaded to be used \n// ## for this route\n// ## Function - Function to load the component for this route\n// ## Default value: none\n\n{\n // Lazy loading your route component\n lazyLoadComponent: () => import("./testComponents/SCR_C1.svelte"),\n}',D=x(),U=R("hr"),G=x(),W=R("h4"),W.textContent="Layout Component",Y=x(),V=R("p"),V.innerHTML="The layoutComponent is a custom loaded layout to use with this\n specific route. When set it will override any global layout set for this\n route only.\n
    \n
    \n The layout component specified must have a default slot declared to include route\n component.",K=x(),J=R("pre"),J.innerHTML='// ## Layout Component - the layout component that is going to be used \n// ## for this route\n// ## Function - Imported layout component for this route\n// ## Default value: none\n\n// Import your component\nimport SRC_Layout from "./testComponents/SRC_Layout.svelte";\n\n{\n // Setting your route layout component\n layoutComponent: SRC_Layout,\n}',X=x(),Q=R("hr"),Z=x(),tt=R("h4"),tt.textContent="Lazy Load Layout Component",ot=x(),rt=R("p"),rt.innerHTML="The lazyLoadLayoutComponent is a custom layout to be loaded to use\n with this specific route. When set it will override any global layout set\n for this route only.\n
    \n
    \n The lazy layout component specified must have a default slot declared to include\n route component.",st=x(),at=R("pre"),at.innerHTML='// ## Lazy Load Layout Component - the layout component that must be loaded to be used \n// ## for this route\n// ## Function - Function to load the layout component for this route\n// ## Default value: none\n\n{\n // Lazy loading your route layout component\n lazyLoadLayoutComponent: () => import("./testComponents/SRC_Layout.svelte"),\n}',ut=x(),ft=R("hr"),pt=x(),ht=R("h4"),ht.textContent="Params",mt=x(),dt=R("p"),dt.innerHTML="The params option is an object that must be available on before enter\n functions or even the components.\n
    \n It will be available at any moment for you. Of course this is some fixed values.\n See the payload param in the before enter sections to pass some custom values\n between functions.",bt=x(),gt=R("pre"),gt.innerHTML='// ## Params - all the params the should be available\n// for this route on any Before Enter Execution or \n// After Before Enter Execution\n// ## Object\n// ## Default value: {}\n{\n params: { \n myParam: "My Custom Param", \n },\n}',vt=x(),yt=R("hr"),$t=x(),Rt=R("h4"),Rt.textContent="Loading Props",Ct=x(),xt=R("p"),xt.innerHTML="The loadingProps option is an object that will be available on\n loading component.\n
    \n When routing the user may be waiting for some request to return and for that\n SCR makes available a loading component. Of course you can override it and you\n are encouraged to do so.\n
    \n
    \n Any properties set here will be delivered to the loading component.",_t=x(),wt=R("pre"),wt.innerHTML='// ## Loading Props - all props that must be available to\n// loading component when it is triggered\n// ## Object\n// ## Default value: {}\n{\n loadingProps: { loadingText: "Carregando..." },\n}',St=x(),Tt=R("hr"),Et=x(),Ot=R("h4"),Ot.textContent="Ignore Layout",jt=x(),Lt=R("p"),Lt.innerHTML="The ignoreLayout option when set to true, ignores any layout defined to\n this specific route.",qt=x(),Nt=R("pre"),Nt.innerHTML='// ## Ignore Layout - if should ignore layout component\n// ## when you do not want to use global or local layout component\n// ## Boolean\n// ## Default value: false\n{\n ignoreLayout: false,\n}',It=x(),Pt=R("hr"),Ft=x(),Mt=R("h4"),Mt.textContent="Ignore Scroll",At=x(),Bt=R("p"),Bt.innerHTML="The ignoreScroll option when set to true, ignores any scroll behaviour\n defined.",kt=x(),Ht=R("pre"),Ht.innerHTML='// ## Ignore Scroll - if this route should ignore scrolling\n// ## Boolean\n// ## Default value: false\n{\n ignoreScroll: false,\n}',zt=x(),Dt=R("hr"),Ut=x(),Gt=R("h4"),Gt.textContent="Scroll Props",Wt=x(),Yt=R("p"),Yt.innerHTML="The scrollProps option overrides the store scrollProps configuration\n for this specific route.",Vt=x(),Kt=R("pre"),Kt.innerHTML='// ## Scroll Props\n// ## The scrolling props on entering the route if enabled\n// ## Default Values: \n// ## Object\n// ## Default value: configuration store\n{\n scrollProps: {\n top: 0,\n left: 0,\n behavior: "smooth",\n timeout: 10, // timeout must be greater than 10 milliseconds\n },\n}',Jt=x(),Xt=R("hr"),Qt=x(),Zt=R("h4"),Zt.textContent="Title",te=x(),ee=R("p"),ee.innerHTML="The title option sets when enters the route the page title.",ne=x(),oe=R("pre"),oe.innerHTML='// ## Title - it defines the route title\n// ## String\n// ## Default value: none\n{\n title: "Route Object - Options",\n}',re=x(),se=R("hr"),ae=x(),ie=R("h4"),ie.textContent="Ignore Global Before Function",le=x(),ce=R("p"),ce.innerHTML="The ignoreGlobalBeforeFunction option when is true will not execute any\n Global Before Enter functions for this specific route.",ue=x(),fe=R("pre"),fe.innerHTML='// ## Ignore Global Before Function - \n// ## if should ignore defined global before function \n// ## Boolean\n// ## Default value: false\n{\n ignoreGlobalBeforeFunction: false,\n}',pe=x(),he=R("hr"),me=x(),de=R("h4"),de.textContent="Execute Route BEF Before Global BEF",be=x(),ge=R("p"),ge.innerHTML="The executeRouteBEFBeforeGlobalBEF option when is true will modify\n the default behaviour of the SCR. The SCR always runs Global Before Enter\n Functions before Route Before Enter Functions, but is different when this\n option is true.\n
    \n When set to true it will execute Route Before Functions before Global Before\n Functions.",ve=x(),ye=R("pre"),ye.innerHTML='// ## Execute Route Before Enter Function Before Global Before Function \n// ## if should execute route before function sequence before \n// ## global before enter execution\n// ## Boolean \n// ## Default value: false\n{\n executeRouteBEFBeforeGlobalBEF: false,\n}',$e=x(),Re=R("hr"),Ce=x(),xe=R("h4"),xe.textContent="Force Reload",_e=x(),we=R("p"),we.innerHTML="The forceReload option when is true will not reload the route when\n the route is already loaded. The user may click in a button that pushes to\n the current route. The default behaviour is just not to reload the route.\n
    \n
    \n But maybe this is a feature you want to execute.",Se=x(),Te=R("pre"),Te.innerHTML='// ## Force Reload - when in opened route try to push the same route\n// by using pushRoute function\n// When enabled it will reload the current route as if it was not opened\n// ## Boolean\n// ## Default value: false\n{\n forceReload: false,\n}',Ee=x(),Oe=R("p"),Oe.textContent="So that is it for this section. But it is not the end of the Route Options.\n See the next section to more info.",je=x(),Le=R("center"),Le.innerHTML='The configuration for this route.',qe=x(),Ne=R("pre"),Ne.textContent='{\n name: "routeObjectOptionsRoute",\n path: "/svelte-client-router/routeObjectOptions",\n lazyLoadComponent: () => import("./docs/pages/SCR_RouteObjectProperties.svelte"),\n title: "SCR - Route Object - Options",\n}',Ie=x(),it(Pe.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(a,"class","scr-hr"),S(l,"class","scr-h4"),S(u,"class","scr-text-justify"),S(p,"class","scr-pre"),S(m,"class","scr-hr"),S(b,"class","scr-h4"),S(C,"class","scr-text-justify"),S(w,"class","scr-pre"),S(E,"class","scr-hr"),S(j,"class","scr-h4"),S(q,"class","scr-text-justify"),S(I,"class","scr-pre"),S(F,"class","scr-hr"),S(A,"class","scr-h4"),S(k,"class","scr-text-justify"),S(z,"class","scr-pre"),S(U,"class","scr-hr"),S(W,"class","scr-h4"),S(V,"class","scr-text-justify"),S(J,"class","scr-pre"),S(Q,"class","scr-hr"),S(tt,"class","scr-h4"),S(rt,"class","scr-text-justify"),S(at,"class","scr-pre"),S(ft,"class","scr-hr"),S(ht,"class","scr-h4"),S(dt,"class","scr-text-justify"),S(gt,"class","scr-pre"),S(yt,"class","scr-hr"),S(Rt,"class","scr-h4"),S(xt,"class","scr-text-justify"),S(wt,"class","scr-pre"),S(Tt,"class","scr-hr"),S(Ot,"class","scr-h4"),S(Lt,"class","scr-text-justify"),S(Nt,"class","scr-pre"),S(Pt,"class","scr-hr"),S(Mt,"class","scr-h4"),S(Bt,"class","scr-text-justify"),S(Ht,"class","scr-pre"),S(Dt,"class","scr-hr"),S(Gt,"class","scr-h4"),S(Yt,"class","scr-text-justify"),S(Kt,"class","scr-pre"),S(Xt,"class","scr-hr"),S(Zt,"class","scr-h4"),S(ee,"class","scr-text-justify"),S(oe,"class","scr-pre"),S(se,"class","scr-hr"),S(ie,"class","scr-h4"),S(ce,"class","scr-text-justify"),S(fe,"class","scr-pre"),S(he,"class","scr-hr"),S(de,"class","scr-h4"),S(ge,"class","scr-text-justify"),S(ye,"class","scr-pre"),S(Re,"class","scr-hr"),S(xe,"class","scr-h4"),S(we,"class","scr-text-justify"),S(Te,"class","scr-pre"),S(Oe,"class","scr-text-justify"),S(Le,"class","scr-center"),S(Ne,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,C),v(e,_),v(e,w),v(e,T),v(e,E),v(e,O),v(e,j),v(e,L),v(e,q),v(e,N),v(e,I),v(e,P),v(e,F),v(e,M),v(e,A),v(e,B),v(e,k),v(e,H),v(e,z),v(e,D),v(e,U),v(e,G),v(e,W),v(e,Y),v(e,V),v(e,K),v(e,J),v(e,X),v(e,Q),v(e,Z),v(e,tt),v(e,ot),v(e,rt),v(e,st),v(e,at),v(e,ut),v(e,ft),v(e,pt),v(e,ht),v(e,mt),v(e,dt),v(e,bt),v(e,gt),v(e,vt),v(e,yt),v(e,$t),v(e,Rt),v(e,Ct),v(e,xt),v(e,_t),v(e,wt),v(e,St),v(e,Tt),v(e,Et),v(e,Ot),v(e,jt),v(e,Lt),v(e,qt),v(e,Nt),v(e,It),v(e,Pt),v(e,Ft),v(e,Mt),v(e,At),v(e,Bt),v(e,kt),v(e,Ht),v(e,zt),v(e,Dt),v(e,Ut),v(e,Gt),v(e,Wt),v(e,Yt),v(e,Vt),v(e,Kt),v(e,Jt),v(e,Xt),v(e,Qt),v(e,Zt),v(e,te),v(e,ee),v(e,ne),v(e,oe),v(e,re),v(e,se),v(e,ae),v(e,ie),v(e,le),v(e,ce),v(e,ue),v(e,fe),v(e,pe),v(e,he),v(e,me),v(e,de),v(e,be),v(e,ge),v(e,ve),v(e,ye),v(e,$e),v(e,Re),v(e,Ce),v(e,xe),v(e,_e),v(e,we),v(e,Se),v(e,Te),v(e,Ee),v(e,Oe),v(e,je),v(e,Le),v(e,qe),v(e,Ne),v(e,Ie),lt(Pe,e,null),Fe=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),Pe.$set(n)},i(t){Fe||(et(Pe.$$.fragment,t),Fe=!0)},o(t){nt(Pe.$$.fragment,t),Fe=!1},d(t){t&&$(e),ct(Pe)}}}var ea=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,ta,i,{})}}});function na(t){let e;return{c(){e=R("a"),e.textContent="Route Object Properties",S(e,"href","/"),O(e,"pointer-events","none")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function oa(e){let n,o,r,s,a,i;return r=new Es({props:{style:"float:left",text:"Previous",routeName:"routeObjectOptionsRoute"}}),a=new Es({props:{style:"float:right",text:"Next",routeName:"routeObjectAfterBeforeEnterRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function ra(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,_,w,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H,z,D,U,G,W,Y;return L=new Yr({props:{to:{name:"routeObjectOptionsRoute"},elementProps:{style:"display: inline; cursor: pointer;"},$$slots:{default:[na]},$$scope:{ctx:t}}}),k=new zs({}),W=new ws({props:{$$slots:{default:[oa]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Route Object - Before Enter Functions",o=x(),r=R("p"),s=C("The "),a=R("b"),a.textContent="beforeEnter",i=C(" option sets an array of functions or just a function\n that must be executed for before each route if the option\n "),l=R("b"),l.textContent="ignoreGlobalBeforeFunction",c=C("\n isn't set in the route definition object.\n "),u=R("br"),f=x(),p=R("br"),h=C("\n The default order of execution is first execute all Global Before Functions and\n then execute route object before enter functions. But for a particular route\n the behaviour maybe different. Maybe it is needed to execute the route before\n function before Global Before Functions.\n "),m=R("br"),d=x(),b=R("br"),g=C("\n If that is the case then you can set in the route object the option\n "),_=R("b"),_.textContent="executeRouteBEFBeforeGlobalBEF",w=C(" to true. When this option is enabled\n in the route definition object the default order of execution is overrided\n and executes route object before functions before Global Before Functions.\n "),T=R("br"),E=x(),O=R("br"),j=C("\n See the "),it(L.$$.fragment),q=C(" for more info.\n "),N=R("br"),I=x(),P=R("br"),F=C("\n See the next example of how to set this option:"),M=x(),A=R("pre"),A.innerHTML='// ------ SETTING A FUNCTION ------\n// Setting Route Before Enter Function\n{\n beforeEnter((resolve) => { resolve(true); });\n}\n// OR\n\n// ------ SETTING AN ARRAY OF FUNCTIONS ------\n// Setting Route Before Enter Functions\n// You can set as many Before Enter Functions as you want!\n{\n beforeEnter([\n (resolve) => { resolve(true); },\n (resolve) => { resolve(true); },\n (resolve) => { resolve(true); },\n ]);\n}',B=x(),it(k.$$.fragment),H=x(),z=R("center"),z.innerHTML='The configuration for this route.',D=x(),U=R("pre"),U.textContent='{\n name: "routeObjectBeforeEnterRoute",\n path: "/svelte-client-router/routeObjectBeforeEnter",\n lazyLoadComponent: () => import("./docs/pages/SCR_RouteObjectBeforeEnter.svelte"),\n title: "SCR - Route Object - Before Enter Functions",\n}',G=x(),it(W.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(A,"class","scr-pre"),S(z,"class","scr-center"),S(U,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(r,s),v(r,a),v(r,i),v(r,l),v(r,c),v(r,u),v(r,f),v(r,p),v(r,h),v(r,m),v(r,d),v(r,b),v(r,g),v(r,_),v(r,w),v(r,T),v(r,E),v(r,O),v(r,j),lt(L,r,null),v(r,q),v(r,N),v(r,I),v(r,P),v(r,F),v(e,M),v(e,A),v(e,B),lt(k,e,null),v(e,H),v(e,z),v(e,D),v(e,U),v(e,G),lt(W,e,null),Y=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),L.$set(n);const o={};1&e&&(o.$$scope={dirty:e,ctx:t}),W.$set(o)},i(t){Y||(et(L.$$.fragment,t),et(k.$$.fragment,t),et(W.$$.fragment,t),Y=!0)},o(t){nt(L.$$.fragment,t),nt(k.$$.fragment,t),nt(W.$$.fragment,t),Y=!1},d(t){t&&$(e),ct(L),ct(k),ct(W)}}}var sa=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,ra,i,{})}}});function aa(e){let n,o,r,s,a,i;return r=new Es({props:{style:"float:left",text:"Previous",routeName:"routeObjectBeforeEnterRoute"}}),a=new Es({props:{style:"float:right",text:"Next",routeName:"routeObjectOnErrorRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function ia(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,_,w,T,E,O;return E=new ws({props:{$$slots:{default:[aa]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Route Object - After Before Enter Function",o=x(),r=R("p"),r.innerHTML="The afterEnter option sets a function that must be executed for this\n specific route when finishing routing. This function will not redirect or\n avoid entering the route. The permission to enter has been granted already\n by passing all the before enter functions.\n
    \n
    \n So this function is more like a customization before enter. Here you can override\n the title of the route, can pass more parameters or execute important stuff before\n render the route.\n
    \n
    \n See the next example of how to set this option:",s=x(),a=R("pre"),a.innerHTML='// ------ SETTING A FUNCTION ------\n// Setting Route After Enter Function\n{\n afterEnter((routeObjParams) => { console.log(routeObjParams); });\n}',i=x(),l=R("br"),c=x(),u=R("h4"),u.textContent="Anatomy of the After Before Enter Function",f=x(),p=R("p"),p.innerHTML="When declaring a After Before Enter Function it will be provided a\n parameter.\n
    \n Lets check it:",h=x(),m=R("pre"),m.innerHTML='// Example of After Before Enter Function declaration\n(routeObjParams) => { \n console.log(routeObjParams);\n}',d=x(),b=R("ul"),b.innerHTML="
  • routeObjParams: All the parameters passed until that error has\n occurred.\n
    \n This is a composed object and it has the following parameters:\n
    • currentRoute: The current route object containing the\n information of the route that the user is trying to access. It is\n composed by the following params:\n
      • name: The name of the route
      • \n
      • hash: The hash value of the route
      • \n
      • hostname: The hostname of the route. For example:\n "localhost"
      • \n
      • origin: The origin of the route. For example:\n "http://localhost:5000"
      • \n
      • params: The query params of the route. For example: {\n testParam: "someParamValue" }
      • \n
      • pathname: The path of the route. For example:\n "/svelte-client-router/configurationBeforeEnter"
      • \n
      • port: The port of the host. For example: "5000"
      • \n
      • protocol: The protocol used. For example: "http:"
    • \n
      \n
    • fromRoute: The coming from route object containing the\n information of the route that the user is coming from. It is composed\n by the following params:\n
      • name: The name of the route
      • \n
      • hash: The hash value of the route
      • \n
      • hostname: The hostname of the route. For example:\n "localhost"
      • \n
      • origin: The origin of the route. For example:\n "http://localhost:5000"
      • \n
      • params: The query params of the route. For example: {\n testParam: "someParamValue" }
      • \n
      • pathname: The path of the route. For example:\n "/svelte-client-router/configurationBeforeEnter"
      • \n
      • port: The port of the host. For example: "5000"
      • \n
      • protocol: The protocol used. For example: "http:"
    • \n
      \n
    • routeObjParams: all the parameters passed down the before enter\n chain and route parameters, that includes payload as well.
  • ",g=x(),C=R("center"),C.innerHTML='The configuration for this route.',_=x(),w=R("pre"),w.textContent='{\n name: "routeObjectAfterBeforeEnterRoute",\n path: "/svelte-client-router/routeObjectAfterBeforeEnter",\n lazyLoadComponent: () => import("./docs/pages/SCR_RouteObjectAfterBeforeEnter.svelte"),\n title: "SCR - Route Object - After Before Function",\n}',T=x(),it(E.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(a,"class","scr-pre"),S(u,"class","scr-h4"),S(p,"class","scr-text-justify"),S(m,"class","scr-pre"),S(C,"class","scr-center"),S(w,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,C),v(e,_),v(e,w),v(e,T),lt(E,e,null),O=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),E.$set(n)},i(t){O||(et(E.$$.fragment,t),O=!0)},o(t){nt(E.$$.fragment,t),O=!1},d(t){t&&$(e),ct(E)}}}var la=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,ia,i,{})}}});function ca(t){let e;return{c(){e=R("a"),e.textContent="Route Component Components",S(e,"href","/"),O(e,"pointer-events","none")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function ua(e){let n,o,r,s,a,i;return r=new Es({props:{style:"float:left",text:"Previous",routeName:"routeObjectAfterEnterRoute"}}),a=new Es({props:{style:"float:right",text:"Next",routeName:"routeComponentPropertiesRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function fa(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,_,w,T,E,O,j,L,q,N,I,P,F,M;return m=new Yr({props:{to:{name:"routeComponentComponentsRoute"},elementProps:{style:"display: inline; cursor: pointer;"},$$slots:{default:[ca]},$$scope:{ctx:t}}}),E=new Vs({}),F=new ws({props:{$$slots:{default:[ua]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Route Object - On Error Function",o=x(),r=R("p"),s=C("The "),a=R("b"),a.textContent="onError",i=C(" option sets a function that is going to be executed for\n the specific route when something goes wrong.\n "),l=R("br"),c=x(),u=R("br"),f=C("\n When that happens the natural behaviour is to open the error page. In this context\n SCR has a very basic error component that comes with it. You can of course set\n you own error component and it is encouraged to do so.\n "),p=R("br"),h=C("\n See the "),it(m.$$.fragment),d=C(" for more info."),b=x(),g=R("pre"),g.innerHTML='// Setting Route On Error Function\n}\n onError((err, routeObjParams) => { console.error(err) });\n{',_=x(),w=R("br"),T=x(),it(E.$$.fragment),O=x(),j=R("p"),j.textContent="So that is it for this section. This feature enables us to handle any errors\n that may occur inside this specific route definition.",L=x(),q=R("center"),q.innerHTML='The configuration for this route.',N=x(),I=R("pre"),I.textContent='{\n name: "routeObjectOnErrorRoute",\n path: "/svelte-client-router/routeObjectOnError",\n lazyLoadComponent: () => import("./docs/pages/SCR_RouteObjectOnError.svelte"),\n title: "SCR - Route Object - On Error Function",\n}',P=x(),it(F.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(g,"class","scr-pre"),S(j,"class","scr-text-justify"),S(q,"class","scr-center"),S(I,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(r,s),v(r,a),v(r,i),v(r,l),v(r,c),v(r,u),v(r,f),v(r,p),v(r,h),lt(m,r,null),v(r,d),v(e,b),v(e,g),v(e,_),v(e,w),v(e,T),lt(E,e,null),v(e,O),v(e,j),v(e,L),v(e,q),v(e,N),v(e,I),v(e,P),lt(F,e,null),M=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),m.$set(n);const o={};1&e&&(o.$$scope={dirty:e,ctx:t}),F.$set(o)},i(t){M||(et(m.$$.fragment,t),et(E.$$.fragment,t),et(F.$$.fragment,t),M=!0)},o(t){nt(m.$$.fragment,t),nt(E.$$.fragment,t),nt(F.$$.fragment,t),M=!1},d(t){t&&$(e),ct(m),ct(E),ct(F)}}}var pa=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,fa,i,{})}}});function ha(t){let e,n;return{c(){e=R("a"),e.textContent="components - that can be check in the next section -",n=C(", and some are crucial for it to work correctly."),S(e,"href","/"),O(e,"pointer-events","none")},m(t,o){y(t,e,o),y(t,n,o)},d(t){t&&$(e),t&&$(n)}}}function ma(t){let e;return{c(){e=R("a"),e.textContent="route object properties section.",S(e,"href","/"),O(e,"pointer-events","none")},m(t,n){y(t,e,n)},d(t){t&&$(e)}}}function da(e){let n,o,r,s,a,i;return r=new Es({props:{style:"float:left",text:"Previous",routeName:"routeObjectOnErrorRoute"}}),a=new Es({props:{style:"float:right",text:"Next",routeName:"routeComponentComponentsRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function ba(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,_,w,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H,z,D,U,G,W,Y,V,K,J,X,Q,Z,tt,ot,rt,st,at,ut,ft,pt,ht,mt,dt,bt,gt;return l=new Yr({props:{to:{name:"routeComponentComponentsRoute"},elementProps:{style:"display: inline; cursor: pointer;"},$$slots:{default:[ha]},$$scope:{ctx:t}}}),q=new Yr({props:{to:{name:"routeObjectOptionsRoute"},elementProps:{style:"display: inline; cursor: pointer;"},$$slots:{default:[ma]},$$scope:{ctx:t}}}),bt=new ws({props:{$$slots:{default:[da]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Route Component - Properties",o=x(),r=R("p"),s=C("The route component is a "),a=R("a"),a.textContent="Svelte Component",i=C("\n , so it can receive parameters to pass further. Some of these parameters are\n "),it(l.$$.fragment),c=x(),u=R("br"),f=x(),p=R("br"),h=C("\n\n Lets see these parameters that aren't components:"),m=x(),d=R("pre"),d.innerHTML='// Importing the router component\nimport { SCR_ROUTER_COMPONENT } from "svelte-client-router"\nimport SCR_Layout from "../testComponents/SCR_Layout.svelte";\nimport SCR_Loading from "../testComponents/SCR_LoadingComponent.svelte";\nimport SCR_Error from "../testComponents/SCR_Error.svelte";\nimport SCR_NotFound from "../testComponents/SCR_NotFound.svelte";\n\n// Define the router object array\nconst routes = [\n {\n ... // Your routes definitions\n }\n]\n\n// Example of usage\n<SCR_ROUTER_COMPONENT \n bind:routes \n defaultLayoutComponent={SCR_Layout}\n notFoundComponent={SCR_NotFound}\n errorComponent={SCR_Error}\n loadingComponent={SCR_Loading}\n allProps={... // Passing parameters to be available in and routes and all components }\n allLoadingProps={... // Passing parameters to be available in and routes in loading component }\n/>',b=x(),g=R("br"),_=x(),w=R("h4"),w.textContent="Routes",T=x(),E=R("p"),O=C("This is where you declare all your routes. It is the index of your\n application. It has several options that you can configure.\n "),j=R("br"),L=C("\n For more information see the "),it(q.$$.fragment),N=x(),I=R("br"),P=x(),F=R("br"),M=C("\n Lets check out a complete example of declaration with all possible options:"),A=x(),B=R("pre"),B.innerHTML='// Setting Route Object Definition Example\nconst routes = [\n {\n name: "routeName1",\n path: "/test1",\n component: SCR_C1,\n\n // This property has preference over component property\n lazyLoadComponent: () =>\n import("./docs/pages/SCR_RouteComponentProperties.svelte"),\n layout: SCR_Layout,\n\n // This property has preference over layout property\n lazyLoadLayoutComponent: () =>\n import("./docs/SCR_Layout.svelte"),\n ignoreLayout: false,\n ignoreScroll: false,\n scrollProps: {\n top: 0,\n left: 0,\n behavior: "smooth",\n timeout: 10, // timeout must be greater than 10 milliseconds\n },\n title: "First Route Title",\n params: { myCustomParam: "text param!", }\n loadingProps: { textLoading: "Loading this route...", }\n ignoreGlobalBeforeFunction: false,\n executeRouteBEFBeforeGlobalBEF: false,\n forceReload: false,\n afterBeforeEnter: (routeObjParams) => console.log(routeObjParams)\n beforeEnter: [\n (resolve, routeFrom, routeTo, routeObjParams, payload) => resolve(true),\n (resolve, routeFrom, routeTo, routeObjParams, payload) => resolve(true),\n (resolve, routeFrom, routeTo, routeObjParams, payload) => resolve(true),\n ],\n onError: (err, routeObjParams) => console.error(err)\n },\n]',k=x(),H=R("p"),H.textContent="Each route defined inside the route array object can have these options.\n Very robust and we can see that SCR is focused on before enter behaviour.",z=x(),D=R("br"),U=x(),G=R("h4"),G.textContent="All Props",W=x(),Y=R("p"),Y.innerHTML="The allProps option can be passed to the router component. It must be\n an object with all the properties that you want to deliver to every route and\n component. This property will be made available everywhere.",V=x(),K=R("pre"),K.innerHTML='// Example\nconst allProps = {\n passToAll: "OK"\n}',J=x(),X=R("br"),Q=x(),Z=R("h4"),Z.textContent="All Loading Props",tt=x(),ot=R("p"),ot.innerHTML="The allLoadingProps option can be passed to the router component. It must\n be an object with all the properties that you want to deliver to every route\n when loading the component.",rt=x(),st=R("pre"),st.innerHTML='// Example\nconst allLoadingProps = {\n passToAll: "OK"\n}',at=x(),ut=R("p"),ut.textContent="Now that we saw the basic properties of the component. In the next section\n we will explore the SCR component components properties.",ft=x(),pt=R("center"),pt.innerHTML='The configuration for this route.',ht=x(),mt=R("pre"),mt.textContent='{\n name: "routeComponentPropertiesRoute",\n path: "/svelte-client-router/routeComponentProperties",\n lazyLoadComponent: () =>\n import("./docs/pages/SCR_RouteComponentProperties.svelte"),\n title: "SCR - Route Component - Properties",\n}',dt=x(),it(bt.$$.fragment),S(n,"class","scr-h4"),S(a,"href","https://svelte.dev/tutorial/basics"),S(a,"target","_blank"),S(r,"class","scr-text-justify"),S(d,"class","scr-pre"),S(w,"class","scr-h4"),S(E,"class","scr-text-justify"),S(B,"class","scr-pre"),S(H,"class","scr-text-justify"),S(G,"class","scr-h4"),S(Y,"class","scr-text-justify"),S(K,"class","scr-pre"),S(Z,"class","scr-h4"),S(ot,"class","scr-text-justify"),S(st,"class","scr-pre"),S(ut,"class","scr-text-justify"),S(pt,"class","scr-center"),S(mt,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(r,s),v(r,a),v(r,i),lt(l,r,null),v(r,c),v(r,u),v(r,f),v(r,p),v(r,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,_),v(e,w),v(e,T),v(e,E),v(E,O),v(E,j),v(E,L),lt(q,E,null),v(E,N),v(E,I),v(E,P),v(E,F),v(E,M),v(e,A),v(e,B),v(e,k),v(e,H),v(e,z),v(e,D),v(e,U),v(e,G),v(e,W),v(e,Y),v(e,V),v(e,K),v(e,J),v(e,X),v(e,Q),v(e,Z),v(e,tt),v(e,ot),v(e,rt),v(e,st),v(e,at),v(e,ut),v(e,ft),v(e,pt),v(e,ht),v(e,mt),v(e,dt),lt(bt,e,null),gt=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),l.$set(n);const o={};1&e&&(o.$$scope={dirty:e,ctx:t}),q.$set(o);const r={};1&e&&(r.$$scope={dirty:e,ctx:t}),bt.$set(r)},i(t){gt||(et(l.$$.fragment,t),et(q.$$.fragment,t),et(bt.$$.fragment,t),gt=!0)},o(t){nt(l.$$.fragment,t),nt(q.$$.fragment,t),nt(bt.$$.fragment,t),gt=!1},d(t){t&&$(e),ct(l),ct(q),ct(bt)}}}var ga=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,ba,i,{})}}});function va(e){let n,o,r,s,a,i;return r=new Es({props:{style:"float:left",text:"Previous",routeName:"routeComponentPropertiesRoute"}}),a=new Es({props:{style:"float:right",text:"Next",routeName:"navigationRoutingRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function ya(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,_,w,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H,z,D,U,G,W,Y,V,K,J,X,Q,Z,tt,ot,rt,st,at,ut,ft,pt,ht,mt,dt,bt;return dt=new ws({props:{$$slots:{default:[va]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Route Component - Components",o=x(),r=R("p"),r.innerHTML="As said throught this documentation it is encouraged to provide your own\n custom components. SCR functions can work with no component provided by you.\n But it is not ideal they are very simple and minimalistic.\n
    \n Lets see all the components one by one:",s=x(),a=R("br"),i=x(),l=R("h4"),l.textContent="Layout Component",c=x(),u=R("p"),u.innerHTML="The Layout Component is the layout used to encapsulate all your route\n components. It can be override on route declaration object for an specific\n one for that route.\n
    \n It must be declared a default slot inside of the Layout Component or else your\n route component will not be drawed.\n
    \n
    \n The Global Layout must be passed to SCR Router Component as exampled below:",f=x(),p=R("pre"),p.innerHTML='// Importing your components\nimport { SCR_ROUTER_COMPONENT } from "svelte-client-router"\nimport SCR_Layout from "../testComponents/SCR_Layout.svelte";\n\n// Define the router object array\nconst routes = [\n {\n ... // Your routes definitions\n }\n]\n\n// Example of usage\n<SCR_ROUTER_COMPONENT \n bind:routes \n defaultLayoutComponent={SCR_Layout}\n/>',h=x(),m=R("p"),m.textContent="Next an example of Svelte Layout Component:",d=x(),b=R("pre"),b.innerHTML='// Example of a Svelte Layout Component\n<script>\n import SCR_Menu from "./SCR_Menu.svelte";\n import SCR_Footer from "./SCR_Footer.svelte";\n\n // This two following variables are always available in the layout component\n export let currentRoute;\n export let fromRoute;\n\n // Any other params declared on before enter functions \n // all props, payload, etc.. will be made available here too\n ...\n</script>\n\n<div class="scr-main-layout">\n <div class="scr-header">\n <slot name="scr_header">\n <h2 class="scr-main-layout__header">\n Svelte Client Router - The Svelte SPA Router!\n </h2>\n\n <--! REMEMBER TO DECLARE A DEFAULT SLOT! ->\n </slot>\n\n </div>\n <div class="scr-main">\n <SCR_Menu />\n <div class="scr-pages"><slot /></div>\n </div>\n <div><SCR_Footer /></div>\n</div>',g=x(),C=R("br"),_=x(),w=R("h4"),w.textContent="Loading Component",T=x(),E=R("p"),E.innerHTML="The Loading Component is the loading screen used to show when before enter\n routes are been processed.\n
    \n It will receive allLoadingProps declared and any route object\n loadingProps defined.",O=x(),j=R("pre"),j.innerHTML='// Importing your components\nimport { SCR_ROUTER_COMPONENT } from "svelte-client-router"\nimport SCR_Loading from "../testComponents/SCR_Loading.svelte";\n\n// Define the router object array\nconst routes = [\n {\n ... // Your routes definitions\n }\n]\n\n// Example of usage\n<SCR_ROUTER_COMPONENT \n bind:routes \n loadingComponent={SCR_Loading}\n/>',L=x(),q=R("p"),q.textContent="Next an example of Svelte Loading Component:",N=x(),I=R("pre"),I.innerHTML='// Example of a Svelte Loading Component\n<script>\n\n // This variable was passed on loadingProps - Route Object Definition\n export let loadingText = "Loading...";\n</script>\n\n<center class="scr-center">\n <div class="scr-lds-spinner">\n <div />\n <div />\n <div />\n <div />\n <div />\n <div />\n <div />\n <div />\n <div />\n <div />\n <div />\n <div />\n </div>\n <h1 class="scr-h1">{loadingText}</h1>\n</center>',P=x(),F=R("br"),M=x(),A=R("h4"),A.textContent="Not Found Component",B=x(),k=R("p"),k.innerHTML="The Not Found Component is the component that must be loaded when the user\n try to access a not existent route.\n
    \n It will receive all the parameters available.",H=x(),z=R("pre"),z.innerHTML='// Importing your components\nimport { SCR_ROUTER_COMPONENT } from "svelte-client-router"\nimport SCR_NotFound from "../testComponents/SCR_NotFound.svelte";\n\n// Define the router object array\nconst routes = [\n {\n ... // Your routes definitions\n }\n]\n\n// Example of usage\n<SCR_ROUTER_COMPONENT \n bind:routes \n notFoundComponent={SCR_NotFound}\n/>',D=x(),U=R("p"),U.textContent="Next an example of Svelte Not Found Component:",G=x(),W=R("pre"),W.innerHTML='// Example of a Svelte Not Found Component\n<script>\n\n // Example of route store usage\n import routerStore from "../js/store/router.js";\n\n</script>\n<center class="scr-center">\n <p class="scr-p">Not Found</p>\n <p class="scr-p-small">{$routerStore.currentLocation || "='("}</p>\n</center>',Y=x(),V=R("br"),K=x(),J=R("h4"),J.textContent="Error Component",X=x(),Q=R("p"),Q.innerHTML="The Error Component is the component that must be loaded when something goes\n wrong on routing.\n
    \n It will receive all the parameters available.",Z=x(),tt=R("pre"),tt.innerHTML='// Importing your components\nimport { SCR_ROUTER_COMPONENT } from "svelte-client-router"\nimport SCR_Error from "../testComponents/SCR_Error.svelte";\n\n// Define the router object array\nconst routes = [\n {\n ... // Your routes definitions\n }\n]\n\n// Example of usage\n<SCR_ROUTER_COMPONENT \n bind:routes \n errorComponent={SCR_Error}\n/>',ot=x(),rt=R("p"),rt.textContent="Next an example of Svelte Error Component:",st=x(),at=R("pre"),at.innerHTML='// Example of a Svelte Error Component\n<script>\n\n // This variable was passed on onError Function\n export let errorMessage = "An error has occured!";\n\n</script>\n\n<center class="scr-center">\n <p class="scr-p">Error</p>\n <p class="scr-p-small">{errorMessage}</p>\n</center>',ut=x(),ft=R("center"),ft.innerHTML='The configuration for this route.',pt=x(),ht=R("pre"),ht.textContent='{\n name: "routeComponentComponentsRoute",\n path: "/svelte-client-router/routeComponentComponents",\n lazyLoadComponent: () =>\n import("./docs/pages/SCR_RouteComponentComponents.svelte"),\n title: "SCR - Route Component - Components",\n}',mt=x(),it(dt.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(l,"class","scr-h4"),S(u,"class","scr-text-justify"),S(p,"class","scr-pre"),S(m,"class","scr-text-justify"),S(b,"class","scr-pre"),S(w,"class","scr-h4"),S(E,"class","scr-text-justify"),S(j,"class","scr-pre"),S(q,"class","scr-text-justify"),S(I,"class","scr-pre"),S(A,"class","scr-h4"),S(k,"class","scr-text-justify"),S(z,"class","scr-pre"),S(U,"class","scr-text-justify"),S(W,"class","scr-pre"),S(J,"class","scr-h4"),S(Q,"class","scr-text-justify"),S(tt,"class","scr-pre"),S(rt,"class","scr-text-justify"),S(at,"class","scr-pre"),S(ft,"class","scr-center"),S(ht,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,C),v(e,_),v(e,w),v(e,T),v(e,E),v(e,O),v(e,j),v(e,L),v(e,q),v(e,N),v(e,I),v(e,P),v(e,F),v(e,M),v(e,A),v(e,B),v(e,k),v(e,H),v(e,z),v(e,D),v(e,U),v(e,G),v(e,W),v(e,Y),v(e,V),v(e,K),v(e,J),v(e,X),v(e,Q),v(e,Z),v(e,tt),v(e,ot),v(e,rt),v(e,st),v(e,at),v(e,ut),v(e,ft),v(e,pt),v(e,ht),v(e,mt),lt(dt,e,null),bt=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),dt.$set(n)},i(t){bt||(et(dt.$$.fragment,t),bt=!0)},o(t){nt(dt.$$.fragment,t),bt=!1},d(t){t&&$(e),ct(dt)}}}var $a=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,ya,i,{})}}});function Ra(e){let n,o,r,s,a,i;return r=new Es({props:{style:"float:left",text:"Previous",routeName:"routeComponentComponentsRoute"}}),a=new Es({props:{style:"float:right",text:"Next",routeName:"navigationStoreRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function Ca(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,_,w,T,E,O,j,L,q,N,I,P,F,M,A,B,k,H;return k=new ws({props:{$$slots:{default:[Ra]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Navigation - Routing",o=x(),r=R("p"),r.textContent="There are two main methods when routing SCR.",s=x(),a=R("ul"),a.innerHTML="
  • pushRoute: pushes a route forward.
  • \n
  • backRoute: back to the first route history, uses\n window.history.back(-1).
  • ",i=x(),l=R("p"),l.innerHTML="There are no secret of using them, but pushRoute has some nice features.\n Lets check them:",c=x(),u=R("br"),f=x(),p=R("h4"),p.textContent="Push Route",h=x(),m=R("pre"),m.innerHTML='// Importing pushRoute function\nimport { pushRoute } from "svelte-client-router"\n\n// Example of Usage\n<script>\n pushRoute("/routePath");\n</script>',d=x(),b=R("br"),g=x(),C=R("h4"),C.textContent="Push Route Function Anatomy",_=x(),w=R("p"),w.textContent="This function can receive three paramenters as it follows:",T=x(),E=R("ul"),E.innerHTML="
  • to: the route path to go to. It can understand three types of\n declarations:\n
    • A string path: For example: "/someRoute/to/go"
    • \n
    • path: For example: { path: "/routePath" }
    • \n
    • name: For example: { name: "theRouteName" }
  • \n
    \n
  • customParams: Some custom params to send to Before Enter and After\n Before Enter Functions as well the components
  • \n
    \n
  • onError: A custom onError function. This is nice because you can\n override your route onError declaration. It will execute this function\n instead of the route definition declared function.
  • ",O=x(),j=R("br"),L=x(),q=R("h4"),q.textContent="Back Route",N=x(),I=R("pre"),I.innerHTML='// Importing backRoute function\nimport { backRoute } from "svelte-client-router"\n\n// Example of Usage\n<script>\n // Go to previous entered route.\n // It returns the previous route too\n backRoute();\n</script>',P=x(),F=R("center"),F.innerHTML='The configuration for this route.',M=x(),A=R("pre"),A.textContent='{\n name: "routeNavigationRouting",\n path: "/svelte-client-router/navigationRouting",\n lazyLoadComponent: () =>\n import("./docs/pages/SCR_NavigationRouting.svelte"),\n title: "SCR - Navigation - Routing",\n}',B=x(),it(k.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(l,"class","scr-text-justify"),S(p,"class","scr-h4"),S(m,"class","scr-pre"),S(C,"class","scr-h4"),S(w,"class","scr-text-justify"),S(q,"class","scr-h4"),S(I,"class","scr-pre"),S(F,"class","scr-center"),S(A,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,C),v(e,_),v(e,w),v(e,T),v(e,E),v(e,O),v(e,j),v(e,L),v(e,q),v(e,N),v(e,I),v(e,P),v(e,F),v(e,M),v(e,A),v(e,B),lt(k,e,null),H=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),k.$set(n)},i(t){H||(et(k.$$.fragment,t),H=!0)},o(t){nt(k.$$.fragment,t),H=!1},d(t){t&&$(e),ct(k)}}}var xa=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,Ca,i,{})}}});function _a(e){let n,o,r,s,a,i;return r=new Es({props:{style:"float:left",text:"Previous",routeName:"navigationRoutingRoute"}}),a=new Es({props:{style:"float:right",text:"Next",routeName:"routerLinkPropertiesRoute"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function wa(t){let e,n,o,r,s,a,i,l,c,u,f,p,h;return p=new ws({props:{$$slots:{default:[_a]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Navigation - Store",o=x(),r=R("p"),r.innerHTML="As well as the previous section you can import the entire navigation store.\n This is not recommend though. If you can use the methods directly it is\n recommended to you to do so. Because when pushing routes there is a flow to\n be followed. Anyway just so you know there is this store and you can check\n it like below.\n
    \n
    \n For more info about the anatomy of the functions provided go back to the previous\n section.",s=x(),a=R("pre"),a.innerHTML='// Importing Navigate Store\nimport { \n SCR_NAVIGATE_STORE,\n} from "svelte-client-router"\n\n// Example of Usage\n<script>\n\n // Go to defined path route\n SCR_NAVIGATE_STORE.pushRoute("/routePath");\n\n // Go to previous entered route.\n // It returns the previous route too\n SCR_NAVIGATE_STORE.backRoute();\n\n</script>',i=x(),l=R("center"),l.innerHTML='The configuration for this route.',c=x(),u=R("pre"),u.textContent='{\n\n name: "routeNavigationStore",\n path: "/svelte-client-router/navigationStore",\n lazyLoadComponent: () =>\n import("./docs/pages/SCR_NavigationStore.svelte"),\n title: "SCR - Navigation - Store",\n}',f=x(),it(p.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(a,"class","scr-pre"),S(l,"class","scr-center"),S(u,"class","scr-pre"),S(e,"class","scr-page")},m(t,m){y(t,e,m),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),lt(p,e,null),h=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),p.$set(n)},i(t){h||(et(p.$$.fragment,t),h=!0)},o(t){nt(p.$$.fragment,t),h=!1},d(t){t&&$(e),ct(p)}}}var Sa=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,wa,i,{})}}});function Ta(e){let n,o,r,s,a,i;return r=new Es({props:{style:"float:left",text:"Previous",routeName:"navigationStoreRoute"}}),a=new Es({props:{style:"float:right; opacity: 0.5",text:"Next",routeName:"routerLinkPropertiesRoute",title:"More content to be added"}}),{c(){n=R("div"),o=R("div"),it(r.$$.fragment),s=x(),it(a.$$.fragment),S(o,"class","col"),S(n,"class","row")},m(t,e){y(t,n,e),v(n,o),lt(r,o,null),v(o,s),lt(a,o,null),i=!0},p:t,i(t){i||(et(r.$$.fragment,t),et(a.$$.fragment,t),i=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),i=!1},d(t){t&&$(n),ct(r),ct(a)}}}function Ea(t){let e,n,o,r,s,a,i,l,c,u,f,p,h,m,d,b,g,C,_,w,T,E,O,j,L;return j=new ws({props:{$$slots:{default:[Ta]},$$scope:{ctx:t}}}),{c(){e=R("div"),n=R("h4"),n.textContent="Route Link",o=x(),r=R("p"),r.innerHTML="The Route Link is a component wrapper to make links. Easy to click and\n execute what you want. It is totally customisable.\n
    \n Lets see how to import and use it:",s=x(),a=R("pre"),a.innerHTML='// Importing Navigate Store\n<script>\n import { SCR_ROUTE_LINK } from "svelte-client-router";\n</script>\n\n<--! Example of Usage -->\n<SCR_ROUTER_LINK\n to={{ name: "routeComponentComponentsRoute" }}\n elementProps={{ style: "display: inline; cursor: pointer;" }}\n>\n <a style="pointer-events: none;">\n components - that can be check in the next section -</a>, \n and some are crucial for it to work correctly.\n\n</SCR_ROUTER_LINK>',i=x(),l=R("br"),c=x(),u=R("h4"),u.textContent="Properties",f=x(),p=R("p"),p.textContent="Pretty easy to use, isn't it? So now lets check out the component exported\n properties:",h=x(),m=R("ul"),m.innerHTML="
  • to: the route path to go to. It can understand three types of\n declarations:\n
    • A string path: For example: "/someRoute/to/go"
    • \n
    • path: For example: { path: "/routePath" }
    • \n
    • name: For example: { name: "theRouteName" }
  • \n
    \n
  • props: Some custom params to send to Before Enter and After Before\n Enter Functions as well the components
  • \n
    \n
  • onError: A custom onError function. This is nice because you can\n override your route onError declaration. It will execute this function\n instead of the route definition declared function.
  • \n
    \n
  • elementProps: This is all the HTML properties to pass to parent div\n so you can customize it at your own will.
  • ",d=x(),b=R("p"),b.textContent="Lets see another example:",g=x(),C=R("pre"),C.innerHTML='// Importing Navigate Store\n<script>\n import { SCR_ROUTE_LINK } from "svelte-client-router";\n</script>\n\n<--! Another Example of Usage -->\n<SCR_ROUTER_LINK \n to={{name: "myRouteNameThree" }}\n props={{ pushCustomParam: "someCustomParams" }}\n elementProps={{ style:"background-color: green" }}\n onError={(err, routeObjParams) => console.log("Execute this instead error defined on router object! - Only if something goes wrong}\n>\n <button>Click to Go to Defined Route Named: myRouteNameThree!</button>\n</SCR_ROUTER_LINK>',_=x(),w=R("center"),w.innerHTML='The configuration for this route.',T=x(),E=R("pre"),E.textContent='{\n name: "routerLinkPropertiesRoute",\n path: "/svelte-client-router/routerLinkProperties",\n lazyLoadComponent: () =>\n import("./docs/pages/SCR_RouterLinkProperties.svelte"),\n title: "SCR - Route Link - Properties",\n}',O=x(),it(j.$$.fragment),S(n,"class","scr-h4"),S(r,"class","scr-text-justify"),S(a,"class","scr-pre"),S(u,"class","scr-h4"),S(p,"class","scr-text-justify"),S(b,"class","scr-text-justify"),S(C,"class","scr-pre"),S(w,"class","scr-center"),S(E,"class","scr-pre"),S(e,"class","scr-page")},m(t,$){y(t,e,$),v(e,n),v(e,o),v(e,r),v(e,s),v(e,a),v(e,i),v(e,l),v(e,c),v(e,u),v(e,f),v(e,p),v(e,h),v(e,m),v(e,d),v(e,b),v(e,g),v(e,C),v(e,_),v(e,w),v(e,T),v(e,E),v(e,O),lt(j,e,null),L=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),j.$set(n)},i(t){L||(et(j.$$.fragment,t),L=!0)},o(t){nt(j.$$.fragment,t),L=!1},d(t){t&&$(e),ct(j)}}}var Oa=Object.freeze({__proto__:null,default:class extends pt{constructor(t){super(),ft(this,t,null,Ea,i,{})}}});return Cs}(); //# sourceMappingURL=bundle.js.map diff --git a/docs/build/bundle.js.map b/docs/build/bundle.js.map index dec8cc9..fa18f95 100644 --- a/docs/build/bundle.js.map +++ b/docs/build/bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal/index.mjs","../../node_modules/lodash/_listCacheClear.js","../../node_modules/lodash/eq.js","../../node_modules/lodash/_assocIndexOf.js","../../node_modules/lodash/_listCacheDelete.js","../../node_modules/lodash/_listCacheGet.js","../../node_modules/lodash/_listCacheHas.js","../../node_modules/lodash/_listCacheSet.js","../../node_modules/lodash/_ListCache.js","../../node_modules/lodash/_stackClear.js","../../node_modules/lodash/_stackDelete.js","../../node_modules/lodash/_stackGet.js","../../node_modules/lodash/_stackHas.js","../../node_modules/lodash/_freeGlobal.js","../../node_modules/lodash/_root.js","../../node_modules/lodash/_Symbol.js","../../node_modules/lodash/_getRawTag.js","../../node_modules/lodash/_objectToString.js","../../node_modules/lodash/_baseGetTag.js","../../node_modules/lodash/isObject.js","../../node_modules/lodash/isFunction.js","../../node_modules/lodash/_isMasked.js","../../node_modules/lodash/_coreJsData.js","../../node_modules/lodash/_toSource.js","../../node_modules/lodash/_baseIsNative.js","../../node_modules/lodash/_getValue.js","../../node_modules/lodash/_getNative.js","../../node_modules/lodash/_Map.js","../../node_modules/lodash/_nativeCreate.js","../../node_modules/lodash/_hashClear.js","../../node_modules/lodash/_hashDelete.js","../../node_modules/lodash/_hashGet.js","../../node_modules/lodash/_hashHas.js","../../node_modules/lodash/_hashSet.js","../../node_modules/lodash/_Hash.js","../../node_modules/lodash/_mapCacheClear.js","../../node_modules/lodash/_isKeyable.js","../../node_modules/lodash/_getMapData.js","../../node_modules/lodash/_mapCacheDelete.js","../../node_modules/lodash/_mapCacheGet.js","../../node_modules/lodash/_mapCacheHas.js","../../node_modules/lodash/_mapCacheSet.js","../../node_modules/lodash/_MapCache.js","../../node_modules/lodash/_stackSet.js","../../node_modules/lodash/_Stack.js","../../node_modules/lodash/_arrayEach.js","../../node_modules/lodash/_defineProperty.js","../../node_modules/lodash/_baseAssignValue.js","../../node_modules/lodash/_assignValue.js","../../node_modules/lodash/_copyObject.js","../../node_modules/lodash/_baseTimes.js","../../node_modules/lodash/isObjectLike.js","../../node_modules/lodash/_baseIsArguments.js","../../node_modules/lodash/isArguments.js","../../node_modules/lodash/isArray.js","../../node_modules/lodash/stubFalse.js","../../node_modules/lodash/isBuffer.js","../../node_modules/lodash/_isIndex.js","../../node_modules/lodash/isLength.js","../../node_modules/lodash/_baseIsTypedArray.js","../../node_modules/lodash/_baseUnary.js","../../node_modules/lodash/_nodeUtil.js","../../node_modules/lodash/isTypedArray.js","../../node_modules/lodash/_arrayLikeKeys.js","../../node_modules/lodash/_isPrototype.js","../../node_modules/lodash/_overArg.js","../../node_modules/lodash/_nativeKeys.js","../../node_modules/lodash/_baseKeys.js","../../node_modules/lodash/isArrayLike.js","../../node_modules/lodash/keys.js","../../node_modules/lodash/_baseAssign.js","../../node_modules/lodash/_nativeKeysIn.js","../../node_modules/lodash/_baseKeysIn.js","../../node_modules/lodash/keysIn.js","../../node_modules/lodash/_baseAssignIn.js","../../node_modules/lodash/_cloneBuffer.js","../../node_modules/lodash/_copyArray.js","../../node_modules/lodash/_arrayFilter.js","../../node_modules/lodash/stubArray.js","../../node_modules/lodash/_getSymbols.js","../../node_modules/lodash/_copySymbols.js","../../node_modules/lodash/_arrayPush.js","../../node_modules/lodash/_getPrototype.js","../../node_modules/lodash/_getSymbolsIn.js","../../node_modules/lodash/_copySymbolsIn.js","../../node_modules/lodash/_baseGetAllKeys.js","../../node_modules/lodash/_getAllKeys.js","../../node_modules/lodash/_getAllKeysIn.js","../../node_modules/lodash/_DataView.js","../../node_modules/lodash/_Promise.js","../../node_modules/lodash/_Set.js","../../node_modules/lodash/_WeakMap.js","../../node_modules/lodash/_getTag.js","../../node_modules/lodash/_initCloneArray.js","../../node_modules/lodash/_Uint8Array.js","../../node_modules/lodash/_cloneArrayBuffer.js","../../node_modules/lodash/_cloneDataView.js","../../node_modules/lodash/_cloneRegExp.js","../../node_modules/lodash/_cloneSymbol.js","../../node_modules/lodash/_cloneTypedArray.js","../../node_modules/lodash/_initCloneByTag.js","../../node_modules/lodash/_baseCreate.js","../../node_modules/lodash/_initCloneObject.js","../../node_modules/lodash/_baseIsMap.js","../../node_modules/lodash/isMap.js","../../node_modules/lodash/_baseIsSet.js","../../node_modules/lodash/isSet.js","../../node_modules/lodash/_baseClone.js","../../node_modules/lodash/cloneDeep.js","../../src/js/functions.js","../../node_modules/date-fns/esm/_lib/toInteger/index.js","../../node_modules/date-fns/esm/_lib/requiredArgs/index.js","../../node_modules/date-fns/esm/toDate/index.js","../../node_modules/date-fns/esm/addMilliseconds/index.js","../../node_modules/date-fns/esm/isBefore/index.js","../../src/plugins/lsplugin.js","../../node_modules/localforage/dist/localforage.js","../../src/plugins/lfplugin.js","../../node_modules/svelte/store/index.mjs","../../src/js/store/config.js","../../src/js/store/router.js","../../src/js/store/navigate.js","../../src/js/helpers/loadingController.js","../../src/components/SCR_NotFound.svelte","../../src/components/SCR_Loading.svelte","../../src/components/SCR_Error.svelte","../../src/components/SCR_Router.svelte","../../src/components/SCR_RouterLink.svelte","../../src/index.js","../../node_modules/svelte/easing/index.mjs","../../node_modules/svelte/transition/index.mjs","../../src/docs/SCR_Menu.svelte","../../src/docs/SCR_Layout.svelte","../../src/App.svelte","../../src/main.js","../../src/docs/components/SCR_PushRouteButton.svelte","../../src/docs/pages/SCR_ConfigurationBeforeEnter.svelte","../../src/docs/pages/SCR_ConfigurationOnError.svelte","../../src/docs/pages/SCR_RouteObjectBeforeEnter.svelte","../../src/docs/pages/SCR_RouteObjectOnError.svelte","../../src/docs/pages/SCR_RouteComponentProperties.svelte"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot_spread(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_spread_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_spread_changes_fn(dirty) | get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_element(nodes, name, attributes, svg) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeName === name) {\n let j = 0;\n const remove = [];\n while (j < node.attributes.length) {\n const attribute = node.attributes[j++];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n for (let k = 0; k < remove.length; k++) {\n node.removeAttribute(remove[k]);\n }\n return nodes.splice(i, 1)[0];\n }\n }\n return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 3) {\n node.data = '' + data;\n return nodes.splice(i, 1)[0];\n }\n }\n return text(data);\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(anchor = null) {\n this.a = anchor;\n this.e = this.n = null;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.h(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n callbacks.slice().forEach(fn => fn(event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${String(value).replace(/\"/g, '"').replace(/'/g, ''')}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : context || []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : options.context || []),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.37.0' }, detail)));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to seperate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_custom_elements_slots, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_keyed_each, update_slot, update_slot_spread, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","import cloneDeep from \"lodash/cloneDeep\";\n\nexport const assign = (target, source) => {\n return Object.assign(cloneDeep(target), cloneDeep(source));\n};\n\nexport const getStoreKey = (store, key) => {\n const storeState = getStoreState(store);\n return storeState[key];\n};\n\nexport const getStoreState = (store) => {\n let storeStateObj;\n const unsubscribe = store.subscribe((storeState) => {\n if (!Array.isArray(storeState)) {\n storeStateObj = assign({}, storeState);\n } else {\n storeStateObj = [...storeState];\n }\n });\n unsubscribe();\n return storeStateObj;\n};\n\nexport const updateStoreKey = (store, objValue) => {\n store.update((storeState) => {\n return assign(storeState, objValue);\n });\n};\n","export default function toInteger(dirtyNumber) {\n if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n return NaN;\n }\n\n var number = Number(dirtyNumber);\n\n if (isNaN(number)) {\n return number;\n }\n\n return number < 0 ? Math.ceil(number) : Math.floor(number);\n}","export default function requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\n\nexport default function toDate(argument) {\n requiredArgs(1, arguments);\n var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule\"); // eslint-disable-next-line no-console\n\n console.warn(new Error().stack);\n }\n\n return new Date(NaN);\n }\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\n\nexport default function addMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var timestamp = toDate(dirtyDate).getTime();\n var amount = toInteger(dirtyAmount);\n return new Date(timestamp + amount);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date that should be before the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\n\nexport default function isBefore(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() < dateToCompare.getTime();\n}","import cloneDeep from \"lodash/cloneDeep\";\nimport { isBefore, addMilliseconds } from \"date-fns\";\n\nconst LS = localStorage;\nconst PREFIX_KEY = \"SCR_ROUTER_\";\nconst EXPIRE_KEYS = `${PREFIX_KEY}EXPIRE_KEYS`;\n\nexport const getItem = (key) => {\n removeExpiredKeys();\n return fromJSON(LS.getItem(key));\n};\n\nexport const setItem = (key, value, time) => {\n if (key === undefined || key === null || key.trim() === \"\") {\n return false;\n }\n if (value === undefined || value === null) {\n clearKeyList([key]);\n return;\n }\n removeExpiredKeys();\n if (\n time &&\n Number.isSafeInteger(time) &&\n Number.isInteger(time) &&\n time > 0\n ) {\n addExpireKey(key, time);\n }\n LS.setItem(key, toJSON(value));\n};\n\nexport const removeItem = (key) => {\n removeExpiredKeys();\n const item = fromJSON(LS.getItem(key));\n if (item !== null && item !== undefined) {\n LS.removeItem(key);\n removeExpireKey(key);\n }\n return item;\n};\n\nexport const getAll = () => {\n if (!LS || LS.length === 0) {\n return [];\n }\n removeExpiredKeys();\n let items = Object.assign({}, cloneDeep(LS));\n delete items[EXPIRE_KEYS];\n return items;\n};\n\n// clear all the expiration list and the keys\nexport const clearExpireKeys = () => {\n const expire = fromJSON(LS.getItem(EXPIRE_KEYS));\n\n if (expire === null || expire === undefined) {\n return;\n }\n\n expire.map((item) => LS.removeItem(item.key));\n\n LS.removeItem(EXPIRE_KEYS);\n};\n\n// clear a given array list of keys\n// affects expiration key list and the keys\nexport const clearKeyList = (keyList) => {\n if (!Array.isArray(keyList) || keyList.length === 0) {\n return;\n }\n\n keyList.map((key) => {\n if (LS.getItem(key)) {\n LS.removeItem(key);\n removeExpireKey(key);\n }\n });\n\n // updating the remaining list keychain if it has left any item\n let expire = fromJSON(LS.getItem(EXPIRE_KEYS));\n if (expire === null || expire === undefined) {\n return;\n }\n\n expire = expire.filter((item) => !keyList.includes(item.key));\n if (expire.length > 0) {\n LS.setItem(EXPIRE_KEYS, toJSON(expire));\n } else {\n LS.removeItem(EXPIRE_KEYS);\n }\n};\n\n// Function to check and remove a key if expired\n// If so... remove the key from the expiration list and the key\nexport const removeExpiredKeys = () => {\n let keyList = [];\n let expire = fromJSON(LS.getItem(EXPIRE_KEYS));\n\n if (expire && expire.length > 0) {\n expire = expire.filter((item) => {\n if (\n isBefore(new Date(), new Date(item.liveUntil)) &&\n LS.getItem(item.key)\n ) {\n return true;\n }\n LS.removeItem(item.key);\n keyList.push(item.key);\n });\n\n if (expire.length > 0) {\n LS.setItem(EXPIRE_KEYS, toJSON(expire));\n } else {\n LS.removeItem(EXPIRE_KEYS);\n }\n }\n return keyList;\n};\n\nexport const setSvelteStoreInStorage = (\n subscribe,\n key,\n timeout,\n ignoreKeys = []\n) => {\n const unsubscribe = subscribe((store) => {\n for (let iKeys of ignoreKeys) {\n store[iKeys] = undefined;\n }\n setItem(key, store, timeout);\n });\n unsubscribe();\n};\n\nexport const getSvelteStoreInStorage = (update, key) => {\n const storage = getItem(key);\n if (!storage) {\n return;\n }\n update(() => {\n return Object.assign({}, cloneDeep(storage));\n });\n};\n\n// ------------------------------------------------- ## BELOW THIS LINE PRIVATE FUNCTIONS ONLY ## -------------------------------------------------\n// add a key in the expiration key list\n// key: String\n// time: In milliseconds\nfunction addExpireKey(key, time) {\n if (!Number.isInteger(time) || !Number.isSafeInteger(time)) {\n throw new Error(\"Time to add an expire key is not a safe integer\");\n }\n\n let expire = fromJSON(LS.getItem(EXPIRE_KEYS));\n const liveUntil = addMilliseconds(new Date(), time);\n\n if (expire !== null && expire !== undefined) {\n expire = expire.filter((item) => item.key !== key);\n expire.push({ key, liveUntil });\n } else {\n expire = [{ key, liveUntil }];\n }\n\n LS.setItem(EXPIRE_KEYS, toJSON(expire));\n}\n\n// removes a specific key from expiration key list, may remove the key too\n// key: String\n// expireKeyOnly: Boolean -- only = true for only remove from expireKey OR the key itself too\nfunction removeExpireKey(key, expireKeyOnly = true) {\n let expire = fromJSON(LS.getItem(EXPIRE_KEYS));\n if (expire === null || expire === undefined) {\n return;\n }\n\n expire = expire.filter((item) => item.key !== key);\n\n if (expire.length > 0) {\n LS.setItem(EXPIRE_KEYS, toJSON(expire));\n } else {\n LS.removeItem(EXPIRE_KEYS);\n }\n\n if (!expireKeyOnly && LS.getItem(key)) {\n LS.removeItem(key);\n }\n}\n\nfunction toJSON(item) {\n if (typeof item === \"object\") {\n return JSON.stringify(item);\n }\n return item;\n}\n\nfunction fromJSON(item) {\n if (!item) {\n return item;\n }\n try {\n return JSON.parse(item);\n } catch (err) {\n return item;\n }\n}\n\n// setInterval(removeExpiredKeys, 5000);\n","/*!\n localForage -- Offline Storage, Improved\n Version 1.9.0\n https://localforage.github.io/localForage\n (c) 2013-2017 Mozilla, Apache License 2.0\n*/\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.localforage = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw (f.code=\"MODULE_NOT_FOUND\", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var scriptEl = global.document.createElement('script');\n scriptEl.onreadystatechange = function () {\n nextTick();\n\n scriptEl.onreadystatechange = null;\n scriptEl.parentNode.removeChild(scriptEl);\n scriptEl = null;\n };\n global.document.documentElement.appendChild(scriptEl);\n };\n } else {\n scheduleDrain = function () {\n setTimeout(nextTick, 0);\n };\n }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n draining = true;\n var i, oldQueue;\n var len = queue.length;\n while (len) {\n oldQueue = queue;\n queue = [];\n i = -1;\n while (++i < len) {\n oldQueue[i]();\n }\n len = queue.length;\n }\n draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n if (queue.push(task) === 1 && !draining) {\n scheduleDrain();\n }\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],2:[function(_dereq_,module,exports){\n'use strict';\nvar immediate = _dereq_(1);\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = Promise;\n\nfunction Promise(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('resolver must be a function');\n }\n this.state = PENDING;\n this.queue = [];\n this.outcome = void 0;\n if (resolver !== INTERNAL) {\n safelyResolveThenable(this, resolver);\n }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n typeof onRejected !== 'function' && this.state === REJECTED) {\n return this;\n }\n var promise = new this.constructor(INTERNAL);\n if (this.state !== PENDING) {\n var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n unwrap(promise, resolver, this.outcome);\n } else {\n this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n }\n\n return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n this.promise = promise;\n if (typeof onFulfilled === 'function') {\n this.onFulfilled = onFulfilled;\n this.callFulfilled = this.otherCallFulfilled;\n }\n if (typeof onRejected === 'function') {\n this.onRejected = onRejected;\n this.callRejected = this.otherCallRejected;\n }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n immediate(function () {\n var returnValue;\n try {\n returnValue = func(value);\n } catch (e) {\n return handlers.reject(promise, e);\n }\n if (returnValue === promise) {\n handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n } else {\n handlers.resolve(promise, returnValue);\n }\n });\n}\n\nhandlers.resolve = function (self, value) {\n var result = tryCatch(getThen, value);\n if (result.status === 'error') {\n return handlers.reject(self, result.value);\n }\n var thenable = result.value;\n\n if (thenable) {\n safelyResolveThenable(self, thenable);\n } else {\n self.state = FULFILLED;\n self.outcome = value;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callFulfilled(value);\n }\n }\n return self;\n};\nhandlers.reject = function (self, error) {\n self.state = REJECTED;\n self.outcome = error;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callRejected(error);\n }\n return self;\n};\n\nfunction getThen(obj) {\n // Make sure we only access the accessor once as required by the spec\n var then = obj && obj.then;\n if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n return function appyThen() {\n then.apply(obj, arguments);\n };\n }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n // Either fulfill, reject or reject with error\n var called = false;\n function onError(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.reject(self, value);\n }\n\n function onSuccess(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.resolve(self, value);\n }\n\n function tryToUnwrap() {\n thenable(onSuccess, onError);\n }\n\n var result = tryCatch(tryToUnwrap);\n if (result.status === 'error') {\n onError(result.value);\n }\n}\n\nfunction tryCatch(func, value) {\n var out = {};\n try {\n out.value = func(value);\n out.status = 'success';\n } catch (e) {\n out.status = 'error';\n out.value = e;\n }\n return out;\n}\n\nPromise.resolve = resolve;\nfunction resolve(value) {\n if (value instanceof this) {\n return value;\n }\n return handlers.resolve(new this(INTERNAL), value);\n}\n\nPromise.reject = reject;\nfunction reject(reason) {\n var promise = new this(INTERNAL);\n return handlers.reject(promise, reason);\n}\n\nPromise.all = all;\nfunction all(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var values = new Array(len);\n var resolved = 0;\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n allResolver(iterable[i], i);\n }\n return promise;\n function allResolver(value, i) {\n self.resolve(value).then(resolveFromAll, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n function resolveFromAll(outValue) {\n values[i] = outValue;\n if (++resolved === len && !called) {\n called = true;\n handlers.resolve(promise, values);\n }\n }\n }\n}\n\nPromise.race = race;\nfunction race(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n resolver(iterable[i]);\n }\n return promise;\n function resolver(value) {\n self.resolve(value).then(function (response) {\n if (!called) {\n called = true;\n handlers.resolve(promise, response);\n }\n }, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n }\n}\n\n},{\"1\":1}],3:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\nif (typeof global.Promise !== 'function') {\n global.Promise = _dereq_(2);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"2\":2}],4:[function(_dereq_,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getIDB() {\n /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */\n try {\n if (typeof indexedDB !== 'undefined') {\n return indexedDB;\n }\n if (typeof webkitIndexedDB !== 'undefined') {\n return webkitIndexedDB;\n }\n if (typeof mozIndexedDB !== 'undefined') {\n return mozIndexedDB;\n }\n if (typeof OIndexedDB !== 'undefined') {\n return OIndexedDB;\n }\n if (typeof msIndexedDB !== 'undefined') {\n return msIndexedDB;\n }\n } catch (e) {\n return;\n }\n}\n\nvar idb = getIDB();\n\nfunction isIndexedDBValid() {\n try {\n // Initialize IndexedDB; fall back to vendor-prefixed versions\n // if needed.\n if (!idb || !idb.open) {\n return false;\n }\n // We mimic PouchDB here;\n //\n // We test for openDatabase because IE Mobile identifies itself\n // as Safari. Oh the lulz...\n var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform);\n\n var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1;\n\n // Safari <10.1 does not meet our requirements for IDB support\n // (see: https://github.com/pouchdb/pouchdb/issues/5572).\n // Safari 10.1 shipped with fetch, we can use that to detect it.\n // Note: this creates issues with `window.fetch` polyfills and\n // overrides; see:\n // https://github.com/localForage/localForage/issues/856\n return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' &&\n // some outdated implementations of IDB that appear on Samsung\n // and HTC Android devices <4.4 are missing IDBKeyRange\n // See: https://github.com/mozilla/localForage/issues/128\n // See: https://github.com/mozilla/localForage/issues/272\n typeof IDBKeyRange !== 'undefined';\n } catch (e) {\n return false;\n }\n}\n\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\nfunction createBlob(parts, properties) {\n /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */\n parts = parts || [];\n properties = properties || {};\n try {\n return new Blob(parts, properties);\n } catch (e) {\n if (e.name !== 'TypeError') {\n throw e;\n }\n var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder;\n var builder = new Builder();\n for (var i = 0; i < parts.length; i += 1) {\n builder.append(parts[i]);\n }\n return builder.getBlob(properties.type);\n }\n}\n\n// This is CommonJS because lie is an external dependency, so Rollup\n// can just ignore it.\nif (typeof Promise === 'undefined') {\n // In the \"nopromises\" build this will just throw if you don't have\n // a global promise object, but it would throw anyway later.\n _dereq_(3);\n}\nvar Promise$1 = Promise;\n\nfunction executeCallback(promise, callback) {\n if (callback) {\n promise.then(function (result) {\n callback(null, result);\n }, function (error) {\n callback(error);\n });\n }\n}\n\nfunction executeTwoCallbacks(promise, callback, errorCallback) {\n if (typeof callback === 'function') {\n promise.then(callback);\n }\n\n if (typeof errorCallback === 'function') {\n promise[\"catch\"](errorCallback);\n }\n}\n\nfunction normalizeKey(key) {\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n return key;\n}\n\nfunction getCallback() {\n if (arguments.length && typeof arguments[arguments.length - 1] === 'function') {\n return arguments[arguments.length - 1];\n }\n}\n\n// Some code originally from async_storage.js in\n// [Gaia](https://github.com/mozilla-b2g/gaia).\n\nvar DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support';\nvar supportsBlobs = void 0;\nvar dbContexts = {};\nvar toString = Object.prototype.toString;\n\n// Transaction Modes\nvar READ_ONLY = 'readonly';\nvar READ_WRITE = 'readwrite';\n\n// Transform a binary string to an array buffer, because otherwise\n// weird stuff happens when you try to work with the binary string directly.\n// It is known.\n// From http://stackoverflow.com/questions/14967647/ (continues on next line)\n// encode-decode-image-with-base64-breaks-image (2013-04-21)\nfunction _binStringToArrayBuffer(bin) {\n var length = bin.length;\n var buf = new ArrayBuffer(length);\n var arr = new Uint8Array(buf);\n for (var i = 0; i < length; i++) {\n arr[i] = bin.charCodeAt(i);\n }\n return buf;\n}\n\n//\n// Blobs are not supported in all versions of IndexedDB, notably\n// Chrome <37 and Android <5. In those versions, storing a blob will throw.\n//\n// Various other blob bugs exist in Chrome v37-42 (inclusive).\n// Detecting them is expensive and confusing to users, and Chrome 37-42\n// is at very low usage worldwide, so we do a hacky userAgent check instead.\n//\n// content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120\n// 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916\n// FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836\n//\n// Code borrowed from PouchDB. See:\n// https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js\n//\nfunction _checkBlobSupportWithoutCaching(idb) {\n return new Promise$1(function (resolve) {\n var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, READ_WRITE);\n var blob = createBlob(['']);\n txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\n txn.onabort = function (e) {\n // If the transaction aborts now its due to not being able to\n // write to the database, likely due to the disk being full\n e.preventDefault();\n e.stopPropagation();\n resolve(false);\n };\n\n txn.oncomplete = function () {\n var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n var matchedEdge = navigator.userAgent.match(/Edge\\//);\n // MS Edge pretends to be Chrome 42:\n // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n };\n })[\"catch\"](function () {\n return false; // error, so assume unsupported\n });\n}\n\nfunction _checkBlobSupport(idb) {\n if (typeof supportsBlobs === 'boolean') {\n return Promise$1.resolve(supportsBlobs);\n }\n return _checkBlobSupportWithoutCaching(idb).then(function (value) {\n supportsBlobs = value;\n return supportsBlobs;\n });\n}\n\nfunction _deferReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Create a deferred object representing the current database operation.\n var deferredOperation = {};\n\n deferredOperation.promise = new Promise$1(function (resolve, reject) {\n deferredOperation.resolve = resolve;\n deferredOperation.reject = reject;\n });\n\n // Enqueue the deferred operation.\n dbContext.deferredOperations.push(deferredOperation);\n\n // Chain its promise to the database readiness.\n if (!dbContext.dbReady) {\n dbContext.dbReady = deferredOperation.promise;\n } else {\n dbContext.dbReady = dbContext.dbReady.then(function () {\n return deferredOperation.promise;\n });\n }\n}\n\nfunction _advanceReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Resolve its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.resolve();\n return deferredOperation.promise;\n }\n}\n\nfunction _rejectReadiness(dbInfo, err) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Reject its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.reject(err);\n return deferredOperation.promise;\n }\n}\n\nfunction _getConnection(dbInfo, upgradeNeeded) {\n return new Promise$1(function (resolve, reject) {\n dbContexts[dbInfo.name] = dbContexts[dbInfo.name] || createDbContext();\n\n if (dbInfo.db) {\n if (upgradeNeeded) {\n _deferReadiness(dbInfo);\n dbInfo.db.close();\n } else {\n return resolve(dbInfo.db);\n }\n }\n\n var dbArgs = [dbInfo.name];\n\n if (upgradeNeeded) {\n dbArgs.push(dbInfo.version);\n }\n\n var openreq = idb.open.apply(idb, dbArgs);\n\n if (upgradeNeeded) {\n openreq.onupgradeneeded = function (e) {\n var db = openreq.result;\n try {\n db.createObjectStore(dbInfo.storeName);\n if (e.oldVersion <= 1) {\n // Added when support for blob shims was added\n db.createObjectStore(DETECT_BLOB_SUPPORT_STORE);\n }\n } catch (ex) {\n if (ex.name === 'ConstraintError') {\n console.warn('The database \"' + dbInfo.name + '\"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage \"' + dbInfo.storeName + '\" already exists.');\n } else {\n throw ex;\n }\n }\n };\n }\n\n openreq.onerror = function (e) {\n e.preventDefault();\n reject(openreq.error);\n };\n\n openreq.onsuccess = function () {\n resolve(openreq.result);\n _advanceReadiness(dbInfo);\n };\n });\n}\n\nfunction _getOriginalConnection(dbInfo) {\n return _getConnection(dbInfo, false);\n}\n\nfunction _getUpgradedConnection(dbInfo) {\n return _getConnection(dbInfo, true);\n}\n\nfunction _isUpgradeNeeded(dbInfo, defaultVersion) {\n if (!dbInfo.db) {\n return true;\n }\n\n var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName);\n var isDowngrade = dbInfo.version < dbInfo.db.version;\n var isUpgrade = dbInfo.version > dbInfo.db.version;\n\n if (isDowngrade) {\n // If the version is not the default one\n // then warn for impossible downgrade.\n if (dbInfo.version !== defaultVersion) {\n console.warn('The database \"' + dbInfo.name + '\"' + \" can't be downgraded from version \" + dbInfo.db.version + ' to version ' + dbInfo.version + '.');\n }\n // Align the versions to prevent errors.\n dbInfo.version = dbInfo.db.version;\n }\n\n if (isUpgrade || isNewStore) {\n // If the store is new then increment the version (if needed).\n // This will trigger an \"upgradeneeded\" event which is required\n // for creating a store.\n if (isNewStore) {\n var incVersion = dbInfo.db.version + 1;\n if (incVersion > dbInfo.version) {\n dbInfo.version = incVersion;\n }\n }\n\n return true;\n }\n\n return false;\n}\n\n// encode a blob for indexeddb engines that don't support blobs\nfunction _encodeBlob(blob) {\n return new Promise$1(function (resolve, reject) {\n var reader = new FileReader();\n reader.onerror = reject;\n reader.onloadend = function (e) {\n var base64 = btoa(e.target.result || '');\n resolve({\n __local_forage_encoded_blob: true,\n data: base64,\n type: blob.type\n });\n };\n reader.readAsBinaryString(blob);\n });\n}\n\n// decode an encoded blob\nfunction _decodeBlob(encodedBlob) {\n var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));\n return createBlob([arrayBuff], { type: encodedBlob.type });\n}\n\n// is this one of our fancy encoded blobs?\nfunction _isEncodedBlob(value) {\n return value && value.__local_forage_encoded_blob;\n}\n\n// Specialize the default `ready()` function by making it dependent\n// on the current database operations. Thus, the driver will be actually\n// ready when it's been initialized (default) *and* there are no pending\n// operations on the database (initiated by some other instances).\nfunction _fullyReady(callback) {\n var self = this;\n\n var promise = self._initReady().then(function () {\n var dbContext = dbContexts[self._dbInfo.name];\n\n if (dbContext && dbContext.dbReady) {\n return dbContext.dbReady;\n }\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n}\n\n// Try to establish a new db connection to replace the\n// current one which is broken (i.e. experiencing\n// InvalidStateError while creating a transaction).\nfunction _tryReconnect(dbInfo) {\n _deferReadiness(dbInfo);\n\n var dbContext = dbContexts[dbInfo.name];\n var forages = dbContext.forages;\n\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n if (forage._dbInfo.db) {\n forage._dbInfo.db.close();\n forage._dbInfo.db = null;\n }\n }\n dbInfo.db = null;\n\n return _getOriginalConnection(dbInfo).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n // store the latest db reference\n // in case the db was upgraded\n dbInfo.db = dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n forages[i]._dbInfo.db = db;\n }\n })[\"catch\"](function (err) {\n _rejectReadiness(dbInfo, err);\n throw err;\n });\n}\n\n// FF doesn't like Promises (micro-tasks) and IDDB store operations,\n// so we have to do it with callbacks\nfunction createTransaction(dbInfo, mode, callback, retries) {\n if (retries === undefined) {\n retries = 1;\n }\n\n try {\n var tx = dbInfo.db.transaction(dbInfo.storeName, mode);\n callback(null, tx);\n } catch (err) {\n if (retries > 0 && (!dbInfo.db || err.name === 'InvalidStateError' || err.name === 'NotFoundError')) {\n return Promise$1.resolve().then(function () {\n if (!dbInfo.db || err.name === 'NotFoundError' && !dbInfo.db.objectStoreNames.contains(dbInfo.storeName) && dbInfo.version <= dbInfo.db.version) {\n // increase the db version, to create the new ObjectStore\n if (dbInfo.db) {\n dbInfo.version = dbInfo.db.version + 1;\n }\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n }).then(function () {\n return _tryReconnect(dbInfo).then(function () {\n createTransaction(dbInfo, mode, callback, retries - 1);\n });\n })[\"catch\"](callback);\n }\n\n callback(err);\n }\n}\n\nfunction createDbContext() {\n return {\n // Running localForages sharing a database.\n forages: [],\n // Shared database.\n db: null,\n // Database readiness (promise).\n dbReady: null,\n // Deferred operations on the database.\n deferredOperations: []\n };\n}\n\n// Open the IndexedDB database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n // Get the current context of the database;\n var dbContext = dbContexts[dbInfo.name];\n\n // ...or create a new context.\n if (!dbContext) {\n dbContext = createDbContext();\n // Register the new context in the global container.\n dbContexts[dbInfo.name] = dbContext;\n }\n\n // Register itself as a running localForage in the current context.\n dbContext.forages.push(self);\n\n // Replace the default `ready()` function with the specialized one.\n if (!self._initReady) {\n self._initReady = self.ready;\n self.ready = _fullyReady;\n }\n\n // Create an array of initialization states of the related localForages.\n var initPromises = [];\n\n function ignoreErrors() {\n // Don't handle errors here,\n // just makes sure related localForages aren't pending.\n return Promise$1.resolve();\n }\n\n for (var j = 0; j < dbContext.forages.length; j++) {\n var forage = dbContext.forages[j];\n if (forage !== self) {\n // Don't wait for itself...\n initPromises.push(forage._initReady()[\"catch\"](ignoreErrors));\n }\n }\n\n // Take a snapshot of the related localForages.\n var forages = dbContext.forages.slice(0);\n\n // Initialize the connection process only when\n // all the related localForages aren't pending.\n return Promise$1.all(initPromises).then(function () {\n dbInfo.db = dbContext.db;\n // Get the connection or open a new one without upgrade.\n return _getOriginalConnection(dbInfo);\n }).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n dbInfo.db = dbContext.db = db;\n self._dbInfo = dbInfo;\n // Share the final connection amongst related localForages.\n for (var k = 0; k < forages.length; k++) {\n var forage = forages[k];\n if (forage !== self) {\n // Self is already up-to-date.\n forage._dbInfo.db = dbInfo.db;\n forage._dbInfo.version = dbInfo.version;\n }\n }\n });\n}\n\nfunction getItem(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.get(key);\n\n req.onsuccess = function () {\n var value = req.result;\n if (value === undefined) {\n value = null;\n }\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n resolve(value);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items stored in database.\nfunction iterate(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.openCursor();\n var iterationNumber = 1;\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (cursor) {\n var value = cursor.value;\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n var result = iterator(value, cursor.key, iterationNumber++);\n\n // when the iterator callback returns any\n // (non-`undefined`) value, then we stop\n // the iteration immediately\n if (result !== void 0) {\n resolve(result);\n } else {\n cursor[\"continue\"]();\n }\n } else {\n resolve();\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n\n return promise;\n}\n\nfunction setItem(key, value, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n var dbInfo;\n self.ready().then(function () {\n dbInfo = self._dbInfo;\n if (toString.call(value) === '[object Blob]') {\n return _checkBlobSupport(dbInfo.db).then(function (blobSupport) {\n if (blobSupport) {\n return value;\n }\n return _encodeBlob(value);\n });\n }\n return value;\n }).then(function (value) {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n\n // The reason we don't _save_ null is because IE 10 does\n // not support saving the `null` type in IndexedDB. How\n // ironic, given the bug below!\n // See: https://github.com/mozilla/localForage/issues/161\n if (value === null) {\n value = undefined;\n }\n\n var req = store.put(value, key);\n\n transaction.oncomplete = function () {\n // Cast to undefined so the value passed to\n // callback/promise is the same as what one would get out\n // of `getItem()` later. This leads to some weirdness\n // (setItem('foo', undefined) will return `null`), but\n // it's not my fault localStorage is our baseline and that\n // it's weird.\n if (value === undefined) {\n value = null;\n }\n\n resolve(value);\n };\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction removeItem(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n // We use a Grunt task to make this safe for IE and some\n // versions of Android (including those used by Cordova).\n // Normally IE won't like `.delete()` and will insist on\n // using `['delete']()`, but we have a build step that\n // fixes this for us now.\n var req = store[\"delete\"](key);\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onerror = function () {\n reject(req.error);\n };\n\n // The request will be also be aborted if we've exceeded our storage\n // space.\n transaction.onabort = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction clear(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.clear();\n\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction length(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.count();\n\n req.onsuccess = function () {\n resolve(req.result);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction key(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n if (n < 0) {\n resolve(null);\n\n return;\n }\n\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var advanced = false;\n var req = store.openKeyCursor();\n\n req.onsuccess = function () {\n var cursor = req.result;\n if (!cursor) {\n // this means there weren't enough keys\n resolve(null);\n\n return;\n }\n\n if (n === 0) {\n // We have the first key, return it if that's what they\n // wanted.\n resolve(cursor.key);\n } else {\n if (!advanced) {\n // Otherwise, ask the cursor to skip ahead n\n // records.\n advanced = true;\n cursor.advance(n);\n } else {\n // When we get here, we've got the nth key.\n resolve(cursor.key);\n }\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.openKeyCursor();\n var keys = [];\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (!cursor) {\n resolve(keys);\n return;\n }\n\n keys.push(cursor.key);\n cursor[\"continue\"]();\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction dropInstance(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n var currentConfig = this.config();\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n var isCurrentDb = options.name === currentConfig.name && self._dbInfo.db;\n\n var dbPromise = isCurrentDb ? Promise$1.resolve(self._dbInfo.db) : _getOriginalConnection(options).then(function (db) {\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n forages[i]._dbInfo.db = db;\n }\n return db;\n });\n\n if (!options.storeName) {\n promise = dbPromise.then(function (db) {\n _deferReadiness(options);\n\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n\n db.close();\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n forage._dbInfo.db = null;\n }\n\n var dropDBPromise = new Promise$1(function (resolve, reject) {\n var req = idb.deleteDatabase(options.name);\n\n req.onerror = req.onblocked = function (err) {\n var db = req.result;\n if (db) {\n db.close();\n }\n reject(err);\n };\n\n req.onsuccess = function () {\n var db = req.result;\n if (db) {\n db.close();\n }\n resolve(db);\n };\n });\n\n return dropDBPromise.then(function (db) {\n dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n var _forage = forages[i];\n _advanceReadiness(_forage._dbInfo);\n }\n })[\"catch\"](function (err) {\n (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n throw err;\n });\n });\n } else {\n promise = dbPromise.then(function (db) {\n if (!db.objectStoreNames.contains(options.storeName)) {\n return;\n }\n\n var newVersion = db.version + 1;\n\n _deferReadiness(options);\n\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n\n db.close();\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n forage._dbInfo.db = null;\n forage._dbInfo.version = newVersion;\n }\n\n var dropObjectPromise = new Promise$1(function (resolve, reject) {\n var req = idb.open(options.name, newVersion);\n\n req.onerror = function (err) {\n var db = req.result;\n db.close();\n reject(err);\n };\n\n req.onupgradeneeded = function () {\n var db = req.result;\n db.deleteObjectStore(options.storeName);\n };\n\n req.onsuccess = function () {\n var db = req.result;\n db.close();\n resolve(db);\n };\n });\n\n return dropObjectPromise.then(function (db) {\n dbContext.db = db;\n for (var j = 0; j < forages.length; j++) {\n var _forage2 = forages[j];\n _forage2._dbInfo.db = db;\n _advanceReadiness(_forage2._dbInfo);\n }\n })[\"catch\"](function (err) {\n (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n throw err;\n });\n });\n }\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar asyncStorage = {\n _driver: 'asyncStorage',\n _initStorage: _initStorage,\n _support: isIndexedDBValid(),\n iterate: iterate,\n getItem: getItem,\n setItem: setItem,\n removeItem: removeItem,\n clear: clear,\n length: length,\n key: key,\n keys: keys,\n dropInstance: dropInstance\n};\n\nfunction isWebSQLValid() {\n return typeof openDatabase === 'function';\n}\n\n// Sadly, the best way to save binary data in WebSQL/localStorage is serializing\n// it to Base64, so this is how we store it to prevent very strange errors with less\n// verbose ways of binary <-> string data storage.\nvar BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\nvar BLOB_TYPE_PREFIX = '~~local_forage_type~';\nvar BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/;\n\nvar SERIALIZED_MARKER = '__lfsc__:';\nvar SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length;\n\n// OMG the serializations!\nvar TYPE_ARRAYBUFFER = 'arbf';\nvar TYPE_BLOB = 'blob';\nvar TYPE_INT8ARRAY = 'si08';\nvar TYPE_UINT8ARRAY = 'ui08';\nvar TYPE_UINT8CLAMPEDARRAY = 'uic8';\nvar TYPE_INT16ARRAY = 'si16';\nvar TYPE_INT32ARRAY = 'si32';\nvar TYPE_UINT16ARRAY = 'ur16';\nvar TYPE_UINT32ARRAY = 'ui32';\nvar TYPE_FLOAT32ARRAY = 'fl32';\nvar TYPE_FLOAT64ARRAY = 'fl64';\nvar TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length;\n\nvar toString$1 = Object.prototype.toString;\n\nfunction stringToBuffer(serializedString) {\n // Fill the string into a ArrayBuffer.\n var bufferLength = serializedString.length * 0.75;\n var len = serializedString.length;\n var i;\n var p = 0;\n var encoded1, encoded2, encoded3, encoded4;\n\n if (serializedString[serializedString.length - 1] === '=') {\n bufferLength--;\n if (serializedString[serializedString.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n var buffer = new ArrayBuffer(bufferLength);\n var bytes = new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = BASE_CHARS.indexOf(serializedString[i]);\n encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]);\n encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]);\n encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]);\n\n /*jslint bitwise: true */\n bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n }\n return buffer;\n}\n\n// Converts a buffer to a string to store, serialized, in the backend\n// storage library.\nfunction bufferToString(buffer) {\n // base64-arraybuffer\n var bytes = new Uint8Array(buffer);\n var base64String = '';\n var i;\n\n for (i = 0; i < bytes.length; i += 3) {\n /*jslint bitwise: true */\n base64String += BASE_CHARS[bytes[i] >> 2];\n base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n base64String += BASE_CHARS[bytes[i + 2] & 63];\n }\n\n if (bytes.length % 3 === 2) {\n base64String = base64String.substring(0, base64String.length - 1) + '=';\n } else if (bytes.length % 3 === 1) {\n base64String = base64String.substring(0, base64String.length - 2) + '==';\n }\n\n return base64String;\n}\n\n// Serialize a value, afterwards executing a callback (which usually\n// instructs the `setItem()` callback/promise to be executed). This is how\n// we store binary data with localStorage.\nfunction serialize(value, callback) {\n var valueType = '';\n if (value) {\n valueType = toString$1.call(value);\n }\n\n // Cannot use `value instanceof ArrayBuffer` or such here, as these\n // checks fail when running the tests using casper.js...\n //\n // TODO: See why those tests fail and use a better solution.\n if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) {\n // Convert binary arrays to a string and prefix the string with\n // a special marker.\n var buffer;\n var marker = SERIALIZED_MARKER;\n\n if (value instanceof ArrayBuffer) {\n buffer = value;\n marker += TYPE_ARRAYBUFFER;\n } else {\n buffer = value.buffer;\n\n if (valueType === '[object Int8Array]') {\n marker += TYPE_INT8ARRAY;\n } else if (valueType === '[object Uint8Array]') {\n marker += TYPE_UINT8ARRAY;\n } else if (valueType === '[object Uint8ClampedArray]') {\n marker += TYPE_UINT8CLAMPEDARRAY;\n } else if (valueType === '[object Int16Array]') {\n marker += TYPE_INT16ARRAY;\n } else if (valueType === '[object Uint16Array]') {\n marker += TYPE_UINT16ARRAY;\n } else if (valueType === '[object Int32Array]') {\n marker += TYPE_INT32ARRAY;\n } else if (valueType === '[object Uint32Array]') {\n marker += TYPE_UINT32ARRAY;\n } else if (valueType === '[object Float32Array]') {\n marker += TYPE_FLOAT32ARRAY;\n } else if (valueType === '[object Float64Array]') {\n marker += TYPE_FLOAT64ARRAY;\n } else {\n callback(new Error('Failed to get type for BinaryArray'));\n }\n }\n\n callback(marker + bufferToString(buffer));\n } else if (valueType === '[object Blob]') {\n // Conver the blob to a binaryArray and then to a string.\n var fileReader = new FileReader();\n\n fileReader.onload = function () {\n // Backwards-compatible prefix for the blob type.\n var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result);\n\n callback(SERIALIZED_MARKER + TYPE_BLOB + str);\n };\n\n fileReader.readAsArrayBuffer(value);\n } else {\n try {\n callback(JSON.stringify(value));\n } catch (e) {\n console.error(\"Couldn't convert value into a JSON string: \", value);\n\n callback(null, e);\n }\n }\n}\n\n// Deserialize data we've inserted into a value column/field. We place\n// special markers into our strings to mark them as encoded; this isn't\n// as nice as a meta field, but it's the only sane thing we can do whilst\n// keeping localStorage support intact.\n//\n// Oftentimes this will just deserialize JSON content, but if we have a\n// special marker (SERIALIZED_MARKER, defined above), we will extract\n// some kind of arraybuffer/binary data/typed array out of the string.\nfunction deserialize(value) {\n // If we haven't marked this string as being specially serialized (i.e.\n // something other than serialized JSON), we can just return it and be\n // done with it.\n if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {\n return JSON.parse(value);\n }\n\n // The following code deals with deserializing some kind of Blob or\n // TypedArray. First we separate out the type of data we're dealing\n // with from the data itself.\n var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH);\n var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH);\n\n var blobType;\n // Backwards-compatible blob type serialization strategy.\n // DBs created with older versions of localForage will simply not have the blob type.\n if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) {\n var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX);\n blobType = matcher[1];\n serializedString = serializedString.substring(matcher[0].length);\n }\n var buffer = stringToBuffer(serializedString);\n\n // Return the right type based on the code/type set during\n // serialization.\n switch (type) {\n case TYPE_ARRAYBUFFER:\n return buffer;\n case TYPE_BLOB:\n return createBlob([buffer], { type: blobType });\n case TYPE_INT8ARRAY:\n return new Int8Array(buffer);\n case TYPE_UINT8ARRAY:\n return new Uint8Array(buffer);\n case TYPE_UINT8CLAMPEDARRAY:\n return new Uint8ClampedArray(buffer);\n case TYPE_INT16ARRAY:\n return new Int16Array(buffer);\n case TYPE_UINT16ARRAY:\n return new Uint16Array(buffer);\n case TYPE_INT32ARRAY:\n return new Int32Array(buffer);\n case TYPE_UINT32ARRAY:\n return new Uint32Array(buffer);\n case TYPE_FLOAT32ARRAY:\n return new Float32Array(buffer);\n case TYPE_FLOAT64ARRAY:\n return new Float64Array(buffer);\n default:\n throw new Error('Unkown type: ' + type);\n }\n}\n\nvar localforageSerializer = {\n serialize: serialize,\n deserialize: deserialize,\n stringToBuffer: stringToBuffer,\n bufferToString: bufferToString\n};\n\n/*\n * Includes code from:\n *\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n\nfunction createDbTable(t, dbInfo, callback, errorCallback) {\n t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' ' + '(id INTEGER PRIMARY KEY, key unique, value)', [], callback, errorCallback);\n}\n\n// Open the WebSQL database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage$1(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i];\n }\n }\n\n var dbInfoPromise = new Promise$1(function (resolve, reject) {\n // Open the database; the openDatabase API will automatically\n // create it for us if it doesn't exist.\n try {\n dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size);\n } catch (e) {\n return reject(e);\n }\n\n // Create our key/value table if it doesn't exist.\n dbInfo.db.transaction(function (t) {\n createDbTable(t, dbInfo, function () {\n self._dbInfo = dbInfo;\n resolve();\n }, function (t, error) {\n reject(error);\n });\n }, reject);\n });\n\n dbInfo.serializer = localforageSerializer;\n return dbInfoPromise;\n}\n\nfunction tryExecuteSql(t, dbInfo, sqlStatement, args, callback, errorCallback) {\n t.executeSql(sqlStatement, args, callback, function (t, error) {\n if (error.code === error.SYNTAX_ERR) {\n t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name = ?\", [dbInfo.storeName], function (t, results) {\n if (!results.rows.length) {\n // if the table is missing (was deleted)\n // re-create it table and retry\n createDbTable(t, dbInfo, function () {\n t.executeSql(sqlStatement, args, callback, errorCallback);\n }, errorCallback);\n } else {\n errorCallback(t, error);\n }\n }, errorCallback);\n } else {\n errorCallback(t, error);\n }\n }, errorCallback);\n}\n\nfunction getItem$1(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).value : null;\n\n // Check to see if this is serialized content we need to\n // unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction iterate$1(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName, [], function (t, results) {\n var rows = results.rows;\n var length = rows.length;\n\n for (var i = 0; i < length; i++) {\n var item = rows.item(i);\n var result = item.value;\n\n // Check to see if this is serialized content\n // we need to unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n result = iterator(result, item.key, i + 1);\n\n // void(0) prevents problems with redefinition\n // of `undefined`.\n if (result !== void 0) {\n resolve(result);\n return;\n }\n }\n\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction _setItem(key, value, callback, retriesLeft) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n // The localStorage API doesn't return undefined values in an\n // \"expected\" way, so undefined is always cast to null in all\n // drivers. See: https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'INSERT OR REPLACE INTO ' + dbInfo.storeName + ' ' + '(key, value) VALUES (?, ?)', [key, value], function () {\n resolve(originalValue);\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n // The transaction failed; check\n // to see if it's a quota error.\n if (sqlError.code === sqlError.QUOTA_ERR) {\n // We reject the callback outright for now, but\n // it's worth trying to re-run the transaction.\n // Even if the user accepts the prompt to use\n // more storage on Safari, this error will\n // be called.\n //\n // Try to re-run the transaction.\n if (retriesLeft > 0) {\n resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1]));\n return;\n }\n reject(sqlError);\n }\n });\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction setItem$1(key, value, callback) {\n return _setItem.apply(this, [key, value, callback, 1]);\n}\n\nfunction removeItem$1(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Deletes every item in the table.\n// TODO: Find out if this resets the AUTO_INCREMENT number.\nfunction clear$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Does a simple `COUNT(key)` to get the number of items stored in\n// localForage.\nfunction length$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n // Ahhh, SQL makes this one soooooo easy.\n tryExecuteSql(t, dbInfo, 'SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) {\n var result = results.rows.item(0).c;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Return the key located at key index X; essentially gets the key from a\n// `WHERE id = ?`. This is the most efficient way I can think to implement\n// this rarely-used (in my experience) part of the API, but it can seem\n// inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so\n// the ID of each key will change every time it's updated. Perhaps a stored\n// procedure for the `setItem()` SQL would solve this problem?\n// TODO: Don't change ID on `setItem()`.\nfunction key$1(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).key : null;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName, [], function (t, results) {\n var keys = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n keys.push(results.rows.item(i).key);\n }\n\n resolve(keys);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// https://www.w3.org/TR/webdatabase/#databases\n// > There is no way to enumerate or delete the databases available for an origin from this API.\nfunction getAllStoreNames(db) {\n return new Promise$1(function (resolve, reject) {\n db.transaction(function (t) {\n t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'\", [], function (t, results) {\n var storeNames = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n storeNames.push(results.rows.item(i).name);\n }\n\n resolve({\n db: db,\n storeNames: storeNames\n });\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n reject(sqlError);\n });\n });\n}\n\nfunction dropInstance$1(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n var currentConfig = this.config();\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n promise = new Promise$1(function (resolve) {\n var db;\n if (options.name === currentConfig.name) {\n // use the db reference of the current instance\n db = self._dbInfo.db;\n } else {\n db = openDatabase(options.name, '', '', 0);\n }\n\n if (!options.storeName) {\n // drop all database tables\n resolve(getAllStoreNames(db));\n } else {\n resolve({\n db: db,\n storeNames: [options.storeName]\n });\n }\n }).then(function (operationInfo) {\n return new Promise$1(function (resolve, reject) {\n operationInfo.db.transaction(function (t) {\n function dropTable(storeName) {\n return new Promise$1(function (resolve, reject) {\n t.executeSql('DROP TABLE IF EXISTS ' + storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n }\n\n var operations = [];\n for (var i = 0, len = operationInfo.storeNames.length; i < len; i++) {\n operations.push(dropTable(operationInfo.storeNames[i]));\n }\n\n Promise$1.all(operations).then(function () {\n resolve();\n })[\"catch\"](function (e) {\n reject(e);\n });\n }, function (sqlError) {\n reject(sqlError);\n });\n });\n });\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar webSQLStorage = {\n _driver: 'webSQLStorage',\n _initStorage: _initStorage$1,\n _support: isWebSQLValid(),\n iterate: iterate$1,\n getItem: getItem$1,\n setItem: setItem$1,\n removeItem: removeItem$1,\n clear: clear$1,\n length: length$1,\n key: key$1,\n keys: keys$1,\n dropInstance: dropInstance$1\n};\n\nfunction isLocalStorageValid() {\n try {\n return typeof localStorage !== 'undefined' && 'setItem' in localStorage &&\n // in IE8 typeof localStorage.setItem === 'object'\n !!localStorage.setItem;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getKeyPrefix(options, defaultConfig) {\n var keyPrefix = options.name + '/';\n\n if (options.storeName !== defaultConfig.storeName) {\n keyPrefix += options.storeName + '/';\n }\n return keyPrefix;\n}\n\n// Check if localStorage throws when saving an item\nfunction checkIfLocalStorageThrows() {\n var localStorageTestKey = '_localforage_support_test';\n\n try {\n localStorage.setItem(localStorageTestKey, true);\n localStorage.removeItem(localStorageTestKey);\n\n return false;\n } catch (e) {\n return true;\n }\n}\n\n// Check if localStorage is usable and allows to save an item\n// This method checks if localStorage is usable in Safari Private Browsing\n// mode, or in any other case where the available quota for localStorage\n// is 0 and there wasn't any saved items yet.\nfunction _isLocalStorageUsable() {\n return !checkIfLocalStorageThrows() || localStorage.length > 0;\n}\n\n// Config the localStorage backend, using options set in the config.\nfunction _initStorage$2(options) {\n var self = this;\n var dbInfo = {};\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n dbInfo.keyPrefix = _getKeyPrefix(options, self._defaultConfig);\n\n if (!_isLocalStorageUsable()) {\n return Promise$1.reject();\n }\n\n self._dbInfo = dbInfo;\n dbInfo.serializer = localforageSerializer;\n\n return Promise$1.resolve();\n}\n\n// Remove all keys from the datastore, effectively destroying all data in\n// the app's key/value store!\nfunction clear$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var keyPrefix = self._dbInfo.keyPrefix;\n\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Retrieve an item from the store. Unlike the original async_storage\n// library in Gaia, we don't modify return values at all. If a key's value\n// is `undefined`, we pass that value to the callback function.\nfunction getItem$2(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result = localStorage.getItem(dbInfo.keyPrefix + key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the key\n // is likely undefined and we'll pass it straight to the\n // callback.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items in the store.\nfunction iterate$2(iterator, callback) {\n var self = this;\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var keyPrefix = dbInfo.keyPrefix;\n var keyPrefixLength = keyPrefix.length;\n var length = localStorage.length;\n\n // We use a dedicated iterator instead of the `i` variable below\n // so other keys we fetch in localStorage aren't counted in\n // the `iterationNumber` argument passed to the `iterate()`\n // callback.\n //\n // See: github.com/mozilla/localForage/pull/435#discussion_r38061530\n var iterationNumber = 1;\n\n for (var i = 0; i < length; i++) {\n var key = localStorage.key(i);\n if (key.indexOf(keyPrefix) !== 0) {\n continue;\n }\n var value = localStorage.getItem(key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the\n // key is likely undefined and we'll pass it straight\n // to the iterator.\n if (value) {\n value = dbInfo.serializer.deserialize(value);\n }\n\n value = iterator(value, key.substring(keyPrefixLength), iterationNumber++);\n\n if (value !== void 0) {\n return value;\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Same as localStorage's key() method, except takes a callback.\nfunction key$2(n, callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result;\n try {\n result = localStorage.key(n);\n } catch (error) {\n result = null;\n }\n\n // Remove the prefix from the key, if a key is found.\n if (result) {\n result = result.substring(dbInfo.keyPrefix.length);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var length = localStorage.length;\n var keys = [];\n\n for (var i = 0; i < length; i++) {\n var itemKey = localStorage.key(i);\n if (itemKey.indexOf(dbInfo.keyPrefix) === 0) {\n keys.push(itemKey.substring(dbInfo.keyPrefix.length));\n }\n }\n\n return keys;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Supply the number of keys in the datastore to the callback function.\nfunction length$2(callback) {\n var self = this;\n var promise = self.keys().then(function (keys) {\n return keys.length;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Remove an item from the store, nice and simple.\nfunction removeItem$2(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n localStorage.removeItem(dbInfo.keyPrefix + key);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Set a key's value and run an optional callback once the value is set.\n// Unlike Gaia's implementation, the callback function is passed the value,\n// in case you want to operate on that value only after you're sure it\n// saved, or something like that.\nfunction setItem$2(key, value, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n // Convert undefined values to null.\n // https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n return new Promise$1(function (resolve, reject) {\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n try {\n localStorage.setItem(dbInfo.keyPrefix + key, value);\n resolve(originalValue);\n } catch (e) {\n // localStorage capacity exceeded.\n // TODO: Make this a specific error/event.\n if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {\n reject(e);\n }\n reject(e);\n }\n }\n });\n });\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction dropInstance$2(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n var currentConfig = this.config();\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n promise = new Promise$1(function (resolve) {\n if (!options.storeName) {\n resolve(options.name + '/');\n } else {\n resolve(_getKeyPrefix(options, self._defaultConfig));\n }\n }).then(function (keyPrefix) {\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar localStorageWrapper = {\n _driver: 'localStorageWrapper',\n _initStorage: _initStorage$2,\n _support: isLocalStorageValid(),\n iterate: iterate$2,\n getItem: getItem$2,\n setItem: setItem$2,\n removeItem: removeItem$2,\n clear: clear$2,\n length: length$2,\n key: key$2,\n keys: keys$2,\n dropInstance: dropInstance$2\n};\n\nvar sameValue = function sameValue(x, y) {\n return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y);\n};\n\nvar includes = function includes(array, searchElement) {\n var len = array.length;\n var i = 0;\n while (i < len) {\n if (sameValue(array[i], searchElement)) {\n return true;\n }\n i++;\n }\n\n return false;\n};\n\nvar isArray = Array.isArray || function (arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n};\n\n// Drivers are stored here when `defineDriver()` is called.\n// They are shared across all instances of localForage.\nvar DefinedDrivers = {};\n\nvar DriverSupport = {};\n\nvar DefaultDrivers = {\n INDEXEDDB: asyncStorage,\n WEBSQL: webSQLStorage,\n LOCALSTORAGE: localStorageWrapper\n};\n\nvar DefaultDriverOrder = [DefaultDrivers.INDEXEDDB._driver, DefaultDrivers.WEBSQL._driver, DefaultDrivers.LOCALSTORAGE._driver];\n\nvar OptionalDriverMethods = ['dropInstance'];\n\nvar LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'].concat(OptionalDriverMethods);\n\nvar DefaultConfig = {\n description: '',\n driver: DefaultDriverOrder.slice(),\n name: 'localforage',\n // Default DB size is _JUST UNDER_ 5MB, as it's the highest size\n // we can use without a prompt.\n size: 4980736,\n storeName: 'keyvaluepairs',\n version: 1.0\n};\n\nfunction callWhenReady(localForageInstance, libraryMethod) {\n localForageInstance[libraryMethod] = function () {\n var _args = arguments;\n return localForageInstance.ready().then(function () {\n return localForageInstance[libraryMethod].apply(localForageInstance, _args);\n });\n };\n}\n\nfunction extend() {\n for (var i = 1; i < arguments.length; i++) {\n var arg = arguments[i];\n\n if (arg) {\n for (var _key in arg) {\n if (arg.hasOwnProperty(_key)) {\n if (isArray(arg[_key])) {\n arguments[0][_key] = arg[_key].slice();\n } else {\n arguments[0][_key] = arg[_key];\n }\n }\n }\n }\n }\n\n return arguments[0];\n}\n\nvar LocalForage = function () {\n function LocalForage(options) {\n _classCallCheck(this, LocalForage);\n\n for (var driverTypeKey in DefaultDrivers) {\n if (DefaultDrivers.hasOwnProperty(driverTypeKey)) {\n var driver = DefaultDrivers[driverTypeKey];\n var driverName = driver._driver;\n this[driverTypeKey] = driverName;\n\n if (!DefinedDrivers[driverName]) {\n // we don't need to wait for the promise,\n // since the default drivers can be defined\n // in a blocking manner\n this.defineDriver(driver);\n }\n }\n }\n\n this._defaultConfig = extend({}, DefaultConfig);\n this._config = extend({}, this._defaultConfig, options);\n this._driverSet = null;\n this._initDriver = null;\n this._ready = false;\n this._dbInfo = null;\n\n this._wrapLibraryMethodsWithReady();\n this.setDriver(this._config.driver)[\"catch\"](function () {});\n }\n\n // Set any config values for localForage; can be called anytime before\n // the first API call (e.g. `getItem`, `setItem`).\n // We loop through options so we don't overwrite existing config\n // values.\n\n\n LocalForage.prototype.config = function config(options) {\n // If the options argument is an object, we use it to set values.\n // Otherwise, we return either a specified config value or all\n // config values.\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n // If localforage is ready and fully initialized, we can't set\n // any new configuration values. Instead, we return an error.\n if (this._ready) {\n return new Error(\"Can't call config() after localforage \" + 'has been used.');\n }\n\n for (var i in options) {\n if (i === 'storeName') {\n options[i] = options[i].replace(/\\W/g, '_');\n }\n\n if (i === 'version' && typeof options[i] !== 'number') {\n return new Error('Database version must be a number.');\n }\n\n this._config[i] = options[i];\n }\n\n // after all config options are set and\n // the driver option is used, try setting it\n if ('driver' in options && options.driver) {\n return this.setDriver(this._config.driver);\n }\n\n return true;\n } else if (typeof options === 'string') {\n return this._config[options];\n } else {\n return this._config;\n }\n };\n\n // Used to define a custom driver, shared across all instances of\n // localForage.\n\n\n LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) {\n var promise = new Promise$1(function (resolve, reject) {\n try {\n var driverName = driverObject._driver;\n var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver');\n\n // A driver name should be defined and not overlap with the\n // library-defined, default drivers.\n if (!driverObject._driver) {\n reject(complianceError);\n return;\n }\n\n var driverMethods = LibraryMethods.concat('_initStorage');\n for (var i = 0, len = driverMethods.length; i < len; i++) {\n var driverMethodName = driverMethods[i];\n\n // when the property is there,\n // it should be a method even when optional\n var isRequired = !includes(OptionalDriverMethods, driverMethodName);\n if ((isRequired || driverObject[driverMethodName]) && typeof driverObject[driverMethodName] !== 'function') {\n reject(complianceError);\n return;\n }\n }\n\n var configureMissingMethods = function configureMissingMethods() {\n var methodNotImplementedFactory = function methodNotImplementedFactory(methodName) {\n return function () {\n var error = new Error('Method ' + methodName + ' is not implemented by the current driver');\n var promise = Promise$1.reject(error);\n executeCallback(promise, arguments[arguments.length - 1]);\n return promise;\n };\n };\n\n for (var _i = 0, _len = OptionalDriverMethods.length; _i < _len; _i++) {\n var optionalDriverMethod = OptionalDriverMethods[_i];\n if (!driverObject[optionalDriverMethod]) {\n driverObject[optionalDriverMethod] = methodNotImplementedFactory(optionalDriverMethod);\n }\n }\n };\n\n configureMissingMethods();\n\n var setDriverSupport = function setDriverSupport(support) {\n if (DefinedDrivers[driverName]) {\n console.info('Redefining LocalForage driver: ' + driverName);\n }\n DefinedDrivers[driverName] = driverObject;\n DriverSupport[driverName] = support;\n // don't use a then, so that we can define\n // drivers that have simple _support methods\n // in a blocking manner\n resolve();\n };\n\n if ('_support' in driverObject) {\n if (driverObject._support && typeof driverObject._support === 'function') {\n driverObject._support().then(setDriverSupport, reject);\n } else {\n setDriverSupport(!!driverObject._support);\n }\n } else {\n setDriverSupport(true);\n }\n } catch (e) {\n reject(e);\n }\n });\n\n executeTwoCallbacks(promise, callback, errorCallback);\n return promise;\n };\n\n LocalForage.prototype.driver = function driver() {\n return this._driver || null;\n };\n\n LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) {\n var getDriverPromise = DefinedDrivers[driverName] ? Promise$1.resolve(DefinedDrivers[driverName]) : Promise$1.reject(new Error('Driver not found.'));\n\n executeTwoCallbacks(getDriverPromise, callback, errorCallback);\n return getDriverPromise;\n };\n\n LocalForage.prototype.getSerializer = function getSerializer(callback) {\n var serializerPromise = Promise$1.resolve(localforageSerializer);\n executeTwoCallbacks(serializerPromise, callback);\n return serializerPromise;\n };\n\n LocalForage.prototype.ready = function ready(callback) {\n var self = this;\n\n var promise = self._driverSet.then(function () {\n if (self._ready === null) {\n self._ready = self._initDriver();\n }\n\n return self._ready;\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n };\n\n LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) {\n var self = this;\n\n if (!isArray(drivers)) {\n drivers = [drivers];\n }\n\n var supportedDrivers = this._getSupportedDrivers(drivers);\n\n function setDriverToConfig() {\n self._config.driver = self.driver();\n }\n\n function extendSelfWithDriver(driver) {\n self._extend(driver);\n setDriverToConfig();\n\n self._ready = self._initStorage(self._config);\n return self._ready;\n }\n\n function initDriver(supportedDrivers) {\n return function () {\n var currentDriverIndex = 0;\n\n function driverPromiseLoop() {\n while (currentDriverIndex < supportedDrivers.length) {\n var driverName = supportedDrivers[currentDriverIndex];\n currentDriverIndex++;\n\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(extendSelfWithDriver)[\"catch\"](driverPromiseLoop);\n }\n\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n }\n\n return driverPromiseLoop();\n };\n }\n\n // There might be a driver initialization in progress\n // so wait for it to finish in order to avoid a possible\n // race condition to set _dbInfo\n var oldDriverSetDone = this._driverSet !== null ? this._driverSet[\"catch\"](function () {\n return Promise$1.resolve();\n }) : Promise$1.resolve();\n\n this._driverSet = oldDriverSetDone.then(function () {\n var driverName = supportedDrivers[0];\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(function (driver) {\n self._driver = driver._driver;\n setDriverToConfig();\n self._wrapLibraryMethodsWithReady();\n self._initDriver = initDriver(supportedDrivers);\n });\n })[\"catch\"](function () {\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n });\n\n executeTwoCallbacks(this._driverSet, callback, errorCallback);\n return this._driverSet;\n };\n\n LocalForage.prototype.supports = function supports(driverName) {\n return !!DriverSupport[driverName];\n };\n\n LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) {\n extend(this, libraryMethodsAndProperties);\n };\n\n LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) {\n var supportedDrivers = [];\n for (var i = 0, len = drivers.length; i < len; i++) {\n var driverName = drivers[i];\n if (this.supports(driverName)) {\n supportedDrivers.push(driverName);\n }\n }\n return supportedDrivers;\n };\n\n LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() {\n // Add a stub for each driver API method that delays the call to the\n // corresponding driver method until localForage is ready. These stubs\n // will be replaced by the driver methods as soon as the driver is\n // loaded, so there is no performance impact.\n for (var i = 0, len = LibraryMethods.length; i < len; i++) {\n callWhenReady(this, LibraryMethods[i]);\n }\n };\n\n LocalForage.prototype.createInstance = function createInstance(options) {\n return new LocalForage(options);\n };\n\n return LocalForage;\n}();\n\n// The actual localForage object that we expose as a module or via a\n// global. It's extended by pulling in one of our other libraries.\n\n\nvar localforage_js = new LocalForage();\n\nmodule.exports = localforage_js;\n\n},{\"3\":3}]},{},[4])(4)\n});\n","import cloneDeep from \"lodash/cloneDeep\";\nimport { isBefore, addMilliseconds } from \"date-fns\";\nimport localforage from \"localforage\";\n\nconst PREFIX_KEY = \"SCR_ROUTER_\";\nconst IDX_DB_NAME = PREFIX_KEY;\nconst IDX_DB_STORE = PREFIX_KEY;\nconst EXPIRE_KEYS = `${PREFIX_KEY}IDX_DB_P_EXPIRE_KEYS`;\n\nlocalforage.config({\n driver: localforage.INDEXEDDB,\n name: IDX_DB_NAME,\n version: `${PREFIX_KEY}VERSION`,\n storeName: IDX_DB_STORE,\n description: `${PREFIX_KEY}DB_DESCRIPTOR`,\n});\n\nconst LF = localforage;\n\nexport const getItem = async (key) => {\n try {\n await removeExpiredKeys();\n return fromJSON(await LF.getItem(key));\n } catch (error) {\n throw error;\n }\n};\n\nexport const setItem = async (key, value, time) => {\n try {\n if (key === undefined || key === null || key.trim() === \"\") {\n return false;\n }\n if (value === undefined || value === null) {\n await clearKeyList([key]);\n return;\n }\n await removeExpiredKeys();\n if (\n time &&\n Number.isSafeInteger(time) &&\n Number.isInteger(time) &&\n time > 0\n ) {\n await addExpireKey(key, time);\n }\n await LF.setItem(key, toJSON(value));\n } catch (error) {\n throw error;\n }\n};\n\nexport const removeItem = async (key) => {\n try {\n await removeExpiredKeys();\n const item = fromJSON(await LF.getItem(key));\n if (item !== null && item !== undefined) {\n await LF.removeItem(key);\n await removeExpireKey(key);\n }\n return item;\n } catch (error) {\n throw error;\n }\n};\n\nexport const getAll = async () => {\n try {\n await removeExpiredKeys();\n const keys = await LF.keys();\n const items = [];\n let item;\n for (let key of keys) {\n items.push(await LF.getItem(key));\n await LF.removeItem(key);\n }\n return items;\n } catch (error) {\n throw error;\n }\n};\n\n// clear all the expiration list and the keys\nexport const clearExpireKeys = async () => {\n try {\n const expire = fromJSON(await LF.getItem(EXPIRE_KEYS));\n\n if (expire === null || expire === undefined) {\n return;\n }\n\n await expire.map(async (item) => await LF.removeItem(item.key));\n\n await LF.removeItem(EXPIRE_KEYS);\n } catch (error) {\n throw error;\n }\n};\n\n// clear a given array list of keys\n// affects expiration key list and the keys\nexport const clearKeyList = async (keyList) => {\n try {\n if (!Array.isArray(keyList) || keyList.length === 0) {\n return;\n }\n\n await keyList.map(async (key) => {\n if (await LF.getItem(key)) {\n await LF.removeItem(key);\n await removeExpireKey(key);\n }\n });\n\n // updating the remaining list keychain if it has left any item\n let expire = fromJSON(await LF.getItem(EXPIRE_KEYS));\n if (expire === null || expire === undefined) {\n return;\n }\n\n expire = expire.filter((item) => !keyList.includes(item.key));\n if (expire.length > 0) {\n await LF.setItem(EXPIRE_KEYS, toJSON(expire));\n } else {\n await LF.removeItem(EXPIRE_KEYS);\n }\n } catch (error) {\n throw error;\n }\n};\n\n// Function to check and remove a key if expired\n// If so... remove the key from the expiration list and the key\nexport const removeExpiredKeys = async () => {\n try {\n let keyList = [];\n let expire = fromJSON(await LF.getItem(EXPIRE_KEYS));\n\n if (expire && expire.length > 0) {\n expire = await expire.filter(async (item) => {\n if (\n isBefore(new Date(), new Date(item.liveUntil)) &&\n (await LF.getItem(item.key))\n ) {\n return true;\n }\n await LF.removeItem(item.key);\n keyList.push(item.key);\n });\n\n if (expire.length > 0) {\n await LF.setItem(EXPIRE_KEYS, toJSON(expire));\n } else {\n await LF.removeItem(EXPIRE_KEYS);\n }\n }\n return keyList;\n } catch (error) {\n throw error;\n }\n};\n\nexport const setSvelteStoreInStorage = async (\n subscribe,\n key,\n timeout,\n ignoreKeys = []\n) => {\n try {\n const unsubscribe = subscribe(async (store) => {\n for (let iKeys of ignoreKeys) {\n store[iKeys] = undefined;\n }\n await setItem(key, store, timeout);\n });\n unsubscribe();\n } catch (error) {\n throw error;\n }\n};\n\nexport const getSvelteStoreInStorage = async (update, key) => {\n try {\n const storage = await getItem(key);\n if (!storage) {\n return;\n }\n update(() => {\n return Object.assign({}, cloneDeep(storage));\n });\n } catch (error) {\n throw error;\n }\n};\n\n// ------------------------------------------------- ## BELOW THIS LINE PRIVATE FUNCTIONS ONLY ## -------------------------------------------------\n// add a key in the expiration key list\n// key: String\n// time: In milliseconds\nasync function addExpireKey(key, time) {\n try {\n if (!Number.isInteger(time) || !Number.isSafeInteger(time)) {\n throw new Error(\"Time to add an expire key is not a safe integer\");\n }\n\n let expire = fromJSON(await LF.getItem(EXPIRE_KEYS));\n const liveUntil = addMilliseconds(new Date(), time);\n\n if (expire !== null && expire !== undefined) {\n expire = expire.filter((item) => item.key !== key);\n expire.push({ key, liveUntil });\n } else {\n expire = [{ key, liveUntil }];\n }\n\n await LF.setItem(EXPIRE_KEYS, toJSON(expire));\n } catch (error) {\n throw error;\n }\n}\n\n// removes a specific key from expiration key list, may remove the key too\n// key: String\n// expireKeyOnly: Boolean -- only = true for only remove from expireKey OR the key itself too\nasync function removeExpireKey(key, expireKeyOnly = true) {\n try {\n let expire = fromJSON(await LF.getItem(EXPIRE_KEYS));\n if (expire === null || expire === undefined) {\n return;\n }\n\n expire = expire.filter((item) => item.key !== key);\n\n if (expire.length > 0) {\n await LF.setItem(EXPIRE_KEYS, toJSON(expire));\n } else {\n await LF.removeItem(EXPIRE_KEYS);\n }\n\n if (!expireKeyOnly && LF.getItem(key)) {\n await LF.removeItem(key);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction toJSON(item) {\n if (typeof item === \"object\") {\n return JSON.stringify(item);\n }\n return item;\n}\n\nfunction fromJSON(item) {\n if (!item) {\n return item;\n }\n try {\n return JSON.parse(item);\n } catch (err) {\n return item;\n }\n}\n\n// setInterval(removeExpiredKeys, 5000);\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = [];\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (let i = 0; i < subscribers.length; i += 1) {\n const s = subscribers[i];\n s[1]();\n subscriber_queue.push(s, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.push(subscriber);\n if (subscribers.length === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n const index = subscribers.indexOf(subscriber);\n if (index !== -1) {\n subscribers.splice(index, 1);\n }\n if (subscribers.length === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","import { writable } from \"svelte/store\";\nimport {\n assign,\n updateStoreKey,\n getStoreState,\n getStoreKey,\n} from \"../functions\";\nconst storeTemplate = {\n hashMode: false,\n navigationHistoryLimit: 10,\n saveMode: \"localstorage\",\n notFoundRoute: \"/notFound\",\n errorRoute: \"/error\",\n consoleLogErrorMessages: true,\n consoleLogStores: true,\n usesRouteLayout: true,\n considerTrailingSlashOnMatchingRoute: true,\n useScroll: false,\n scrollProps: {\n top: 0,\n left: 0,\n behavior: \"smooth\",\n timeout: 10,\n },\n};\n\nconst ENUM_SAVE_MODE = [\"localstorage\", \"indexeddb\", \"none\"];\n\nconst store = writable(assign({}, storeTemplate));\nlet onError;\nlet beforeEnter;\n\n// -------------- config Property -----------------------------------------------------\n\nfunction setConfig(config) {\n setHashMode(config.hashMode);\n setNavigationHistoryLimit(config.navigationHistoryLimit);\n setSaveMode(config.saveMode);\n setNotFoundRoute(config.notFoundRoute);\n setErrorRoute(config.errorRoute);\n setConsoleLogErrorMessages(config.consoleLogErrorMessages);\n setConsoleLogStores(config.consoleLogStores);\n setUsesRouteLayout(config.usesRouteLayout);\n setConsiderTrailingSlashOnMatchingRoute(\n config.considerTrailingSlashOnMatchingRoute\n );\n setOnError(config.onError);\n setBeforeEnter(config.beforeEnter);\n setScrollProps(config.scrollProps);\n setUseScroll(config.useScroll);\n}\n\nfunction getConfig() {\n return getStoreState(store);\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- hashmode Property ---------------------------------------------------\n\nfunction setHashMode(hashMode) {\n if (typeof hashMode == \"boolean\") {\n updateStoreKey(store, { hashMode });\n }\n}\n\nfunction getHashMode() {\n return getStoreKey(store, \"hashMode\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- navigationHistoryLimit Property -------------------------------------\n\nfunction setNavigationHistoryLimit(navigationHistoryLimit) {\n if (typeof navigationHistoryLimit == \"number\") {\n updateStoreKey(store, { navigationHistoryLimit });\n }\n}\n\nfunction getNavigationHistoryLimit() {\n return getStoreKey(store, \"navigationHistoryLimit\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- saveMode Property ---------------------------------------------------\n\nfunction setSaveMode(saveMode) {\n if (ENUM_SAVE_MODE.includes(saveMode)) {\n updateStoreKey(store, { saveMode });\n }\n}\n\nfunction getSaveMode() {\n return getStoreKey(store, \"saveMode\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- notFoundRoute Property ----------------------------------------------\n\nfunction setNotFoundRoute(notFoundRoute) {\n if (typeof notFoundRoute == \"string\" && notFoundRoute.includes(\"/\")) {\n updateStoreKey(store, { notFoundRoute });\n }\n}\n\nfunction getNotFoundRoute() {\n return getStoreKey(store, \"notFoundRoute\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- errorRoute Property -------------------------------------------------\n\nfunction setErrorRoute(errorRoute) {\n if (typeof errorRoute == \"string\" && errorRoute.includes(\"/\")) {\n updateStoreKey(store, { errorRoute });\n }\n}\n\nfunction getErrorRoute() {\n return getStoreKey(store, \"errorRoute\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- consoleLogErrorMessages Property ------------------------------------\n\nfunction setConsoleLogErrorMessages(consoleLogErrorMessages = false) {\n if (typeof consoleLogErrorMessages == \"boolean\") {\n updateStoreKey(store, { consoleLogErrorMessages });\n }\n}\n\nfunction getConsoleLogErrorMessages() {\n return getStoreKey(store, \"consoleLogErrorMessages\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- consoleLogStores Property ------------------------------------\n\nfunction setConsoleLogStores(consoleLogStores = false) {\n if (typeof consoleLogStores == \"boolean\") {\n updateStoreKey(store, { consoleLogStores });\n }\n}\n\nfunction getConsoleLogStores() {\n return getStoreKey(store, \"consoleLogStores\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- usesRouteLayout Property --------------------------------------------\n\nfunction setUsesRouteLayout(usesRouteLayout) {\n if (typeof usesRouteLayout == \"boolean\") {\n updateStoreKey(store, { usesRouteLayout });\n }\n}\n\nfunction getUsesRouteLayout() {\n return getStoreKey(store, \"usesRouteLayout\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- considerTrailingSlashOnMachingRoute Property ------------------------\n\nfunction setConsiderTrailingSlashOnMachingRoute(\n considerTrailingSlashOnMachingRoute\n) {\n if (typeof considerTrailingSlashOnMachingRoute == \"boolean\") {\n updateStoreKey(store, { considerTrailingSlashOnMachingRoute });\n }\n}\n\nfunction getConsiderTrailingSlashOnMachingRoute() {\n return getStoreKey(store, \"considerTrailingSlashOnMachingRoute\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- scrollProps Property ------------------------------------------------\n\nfunction setScrollProps(scrollProps) {\n if (typeof setScrollProps == \"object\") {\n let sp = {\n top: scrollProps.top,\n left: scrollProps.left,\n behavior: scrollProps.behavior,\n timeout:\n scrollProps.timeout && scrollProps.timeout > 10\n ? scrollProps.timeout\n : 10,\n };\n updateStoreKey(store, { scrollProps });\n }\n}\n\nfunction getScrollProps() {\n return getStoreKey(store, \"scrollProps\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- useScroll Property --------------------------------------------------\n\nfunction setUseScroll(useScroll) {\n if (typeof useScroll == \"boolean\") {\n updateStoreKey(store, { useScroll });\n }\n}\n\nfunction getUseScroll() {\n return getStoreKey(store, \"useScroll\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- onError Function ----------------------------------------------------\n\nfunction setOnError(onErrorParam) {\n if (!onErrorParam || typeof onErrorParam !== \"function\") {\n return;\n }\n onError = onErrorParam;\n}\n\nfunction getOnError() {\n return onError;\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- beforeEnter Function --------------------------------------------\n\nfunction setBeforeEnter(beforeEnterParam) {\n if (\n !beforeEnterParam ||\n (typeof beforeEnterParam !== \"function\" && !Array.isArray(beforeEnterParam))\n ) {\n return;\n }\n if (Array.isArray(beforeEnterParam)) {\n for (let bFuncItem of beforeEnterParam) {\n if (typeof bFuncItem !== \"function\") {\n return;\n }\n }\n }\n // if is valid\n beforeEnter = beforeEnterParam;\n}\n\nfunction getBeforeEnter() {\n return beforeEnter;\n}\n\n// --------------------------------------------------------------------------------------\n\nexport default {\n subscribe: store.subscribe,\n update: store.update,\n setConfig,\n getConfig,\n setHashMode,\n getHashMode,\n setNavigationHistoryLimit,\n getNavigationHistoryLimit,\n setSaveMode,\n getSaveMode,\n setNotFoundRoute,\n getNotFoundRoute,\n setErrorRoute,\n getErrorRoute,\n setConsoleLogErrorMessages,\n getConsoleLogErrorMessages,\n setConsoleLogStores,\n getConsoleLogStores,\n setUsesRouteLayout,\n getUsesRouteLayout,\n setConsiderTrailingSlashOnMachingRoute,\n getConsiderTrailingSlashOnMachingRoute,\n setScrollProps,\n getScrollProps,\n setUseScroll,\n getUseScroll,\n setOnError,\n getOnError,\n setBeforeEnter,\n getBeforeEnter,\n};\n","import { writable } from \"svelte/store\";\nimport {\n assign,\n getStoreState,\n updateStoreKey,\n getStoreKey,\n} from \"../functions\";\nimport * as lsPlugin from \"../../plugins/lsplugin.js\";\nimport * as lfPlugin from \"../../plugins/lfplugin.js\";\n\nimport configStore from \"./config.js\";\n\nconst STORAGE_KEY = \"SRC_ROUTER_STORE\";\n\nconst storeTemplate = {\n routes: [],\n currentLocation: undefined,\n currentRoute: {\n name: undefined,\n pathname: undefined,\n params: [],\n hostname: undefined,\n protocol: undefined,\n port: undefined,\n origin: undefined,\n hash: undefined,\n },\n fromRoute: {\n name: undefined,\n pathname: undefined,\n params: [],\n hostname: undefined,\n protocol: undefined,\n port: undefined,\n origin: undefined,\n hash: undefined,\n },\n navigationHistory: [],\n};\n\nconst store = writable(assign({}, storeTemplate));\n\n// -------------- routes Property ------------------------------------------------------\n\nasync function setRoutes(routes = []) {\n if (!Array.isArray(routes)) {\n return;\n }\n updateStoreKey(store, { routes });\n await saveMode();\n}\n\nfunction getRoutes() {\n return getStoreKey(store, \"routes\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- currentLocation Property --------------------------------------------\n\nasync function setCurrentLocation(currentLocation) {\n if (typeof currentLocation == \"string\") {\n updateStoreKey(store, { currentLocation });\n await saveMode();\n }\n}\n\nfunction getCurrentLocation() {\n return getStoreKey(store, \"currentLocation\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- currentRoute Property -----------------------------------------------\n\nasync function setCurrentRoute(currentRoute) {\n if (typeof currentRoute == \"object\") {\n updateStoreKey(store, { currentRoute });\n await saveMode();\n }\n}\n\nfunction getCurrentRoute() {\n return getStoreKey(store, \"currentRoute\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- fromRoute Property --------------------------------------------------\n\nasync function setFromRoute(fromRoute) {\n if (typeof fromRoute == \"object\") {\n updateStoreKey(store, { fromRoute });\n await saveMode();\n }\n}\n\nfunction getFromRoute() {\n return getStoreKey(store, \"fromRoute\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- navigationHistory Property ------------------------------------------\n\nasync function setNavigationHistory(navigationHistory) {\n if (typeof navigationHistory == \"object\") {\n const configs = getConfig();\n if (configs.navigationHistoryLimit > 0) {\n navigationHistory = navigationHistory.slice(\n 0,\n configs.navigationHistoryLimit - 1\n );\n }\n updateStoreKey(store, { navigationHistory });\n await saveMode();\n }\n}\n\nasync function pushNavigationHistory(navObj) {\n let navigationHistory = getNavigationHistory() || [];\n navigationHistory = [navObj, ...navigationHistory];\n await setNavigationHistory(navigationHistory);\n}\n\nasync function popNavigationHistory() {\n let navigationHistory = getNavigationHistory() || [];\n\n if (navigationHistory.length == 0) {\n return false;\n }\n const navObj = { ...navigationHistory[0] };\n await setNavigationHistory(navigationHistory.slice(1));\n return navObj;\n}\n\nfunction getNavigationHistory() {\n return getStoreKey(store, \"navigationHistory\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- config Property -----------------------------------------------------\n\nfunction getConfig() {\n return configStore.getConfig();\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- saveMode Function ---------------------------------------------------\n\nasync function saveMode() {\n const configs = getConfig();\n if (!configs || !configs.saveMode || configs.saveMode == \"none\") {\n return false;\n }\n if (configs.saveMode === \"localstorage\") {\n await lsPlugin.setSvelteStoreInStorage(store.subscribe, STORAGE_KEY);\n } else if (configs.saveMode === \"indexeddb\") {\n await lfPlugin.setSvelteStoreInStorage(store.subscribe, STORAGE_KEY);\n }\n return false;\n}\n// --------------------------------------------------------------------------------------\n\nexport default {\n subscribe: store.subscribe,\n update: store.update,\n STORAGE_KEY,\n setRoutes,\n getRoutes,\n setCurrentRoute,\n getCurrentRoute,\n setFromRoute,\n getFromRoute,\n setNavigationHistory,\n getNavigationHistory,\n pushNavigationHistory,\n popNavigationHistory,\n setCurrentLocation,\n getCurrentLocation,\n getConfig,\n};\n","import { writable } from \"svelte/store\";\nimport {\n assign,\n getStoreState,\n updateStoreKey,\n getStoreKey,\n} from \"../functions\";\nimport * as lsPlugin from \"../../plugins/lsplugin.js\";\nimport * as lfPlugin from \"../../plugins/lfplugin.js\";\n\nimport configStore from \"./config.js\";\nimport routeStore from \"./router.js\";\n\nconst storeTemplate = {\n pushRoute: false,\n params: {},\n};\n\nconst store = writable(assign({}, storeTemplate));\nlet routeNavigation;\nlet backRouteNavigation;\n\n// -------------- pushRoute Property --------------------------------------------------\n\nfunction pushRoute(route, params, onError) {\n if (!route) {\n const error = new Error(`SCR_ROUTER - Route not defined - ${route}`);\n if (typeof onError === \"function\") {\n onError(error);\n } else {\n throw error;\n }\n }\n const routes = routeStore.getRoutes();\n routeNavigation = undefined;\n\n if (typeof route === \"string\") {\n routeNavigation = routes.find((rItem) => rItem.path === route);\n } else if (route.path) {\n routeNavigation = routes.find((rItem) => rItem.path === route.path);\n } else if (route.name) {\n routeNavigation = routes.find((rItem) => rItem.name === route.name);\n }\n\n if (!routeNavigation) {\n routeNavigation = {\n notFound: true,\n path: typeof route === \"string\" ? route : route.path || \"\",\n };\n }\n\n if (onError && typeof onError === \"function\") {\n routeNavigation.onError = onError;\n }\n\n setParams(params);\n updateStoreKey(store, { pushRoute: true });\n}\n\nfunction consumeRoutePushed() {\n const copyRouteNavigation = assign({}, routeNavigation);\n routeNavigation = undefined;\n updateStoreKey(store, { pushRoute: false });\n copyRouteNavigation.params = {\n ...copyRouteNavigation.params,\n ...consumeParams(),\n };\n return copyRouteNavigation;\n}\n\nfunction backRoute() {\n const navigationHistory = getNavigationHistory();\n let popRoute;\n if (navigationHistory.length > 0) {\n popRoute = routeStore.popNavigationHistory();\n }\n window.history.back();\n return popRoute;\n}\n\nfunction getPushRoute() {\n return getStoreKey(store, \"pushRoute\");\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- params Property -----------------------------------------------------\n\nfunction setParams(params = {}) {\n updateStoreKey(store, { params });\n}\n\nfunction consumeParams() {\n const params = getStoreKey(store, \"params\");\n setParams();\n return params;\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- navigationHistory Property ------------------------------------------\n\nfunction getNavigationHistory() {\n return routeStore.getNavigationHistory();\n}\n\n// --------------------------------------------------------------------------------------\n// -------------- config Property -----------------------------------------------------\n\nfunction getConfig() {\n return configStore.getConfig();\n}\n\n// --------------------------------------------------------------------------------------\n\nexport default {\n subscribe: store.subscribe,\n update: store.update,\n pushRoute,\n getPushRoute,\n consumeRoutePushed,\n backRoute,\n getNavigationHistory,\n getConfig,\n setParams,\n consumeParams,\n};\n","function loadingController() {\n let callbackFunc;\n let resolveFunc;\n this.resolveLoading = function () {\n if (this.resolveFunc) {\n this.resolveFunc(true);\n this.resolveFunc = undefined;\n }\n };\n this.startLoading = function () {\n if (resolveFunc) {\n this.resolveLoading();\n }\n this.callbackFunc = new Promise((resolve, reject) => {\n this.resolveFunc = resolve;\n });\n return this.callbackFunc;\n };\n}\nexport default loadingController;\n","\n\n
    \n

    Not Found

    \n

    {$routerStore.currentLocation || \"='(\"}

    \n
    \n\n","\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n

    {loadingText}

    \n
    \n\n\n","\n\n
    \n

    Error

    \n

    {errorMessage}

    \n
    \n\n\n","\n\n{#await loadingPromise}\n \n{:then value}\n {#if $configStore.usesRouteLayout && typeof layoutComponent === \"function\"}\n \n \n \n {:else}\n \n {/if}\n{/await}\n","\n\n
    \n \n
    \n","import SCR_ROUTER_COMPONENT_IMPORT from \"./components/SCR_Router.svelte\";\nimport SCR_ROUTER_LINK_COMPONENT_IMPORT from \"./components/SCR_RouterLink.svelte\";\nimport routerStore from \"./js/store/router.js\";\nimport configStore from \"./js/store/config.js\";\nimport navigateStore from \"./js/store/navigate.js\";\n\nexport const SCR_ROUTER_COMPONENT = SCR_ROUTER_COMPONENT_IMPORT;\nexport const SCR_ROUTER_LINK = SCR_ROUTER_LINK_COMPONENT_IMPORT;\nexport const SCR_ROUTER_STORE = routerStore;\nexport const SCR_CONFIG_STORE = configStore;\nexport const SCR_NAVIGATE_STORE = navigateStore;\nexport const pushRoute = navigateStore.pushRoute;\nexport const backRoute = navigateStore.backRoute;","export { identity as linear } from '../internal/index.mjs';\n\n/*\nAdapted from https://github.com/mattdesl\nDistributed under MIT License https://github.com/mattdesl/eases/blob/master/LICENSE.md\n*/\nfunction backInOut(t) {\n const s = 1.70158 * 1.525;\n if ((t *= 2) < 1)\n return 0.5 * (t * t * ((s + 1) * t - s));\n return 0.5 * ((t -= 2) * t * ((s + 1) * t + s) + 2);\n}\nfunction backIn(t) {\n const s = 1.70158;\n return t * t * ((s + 1) * t - s);\n}\nfunction backOut(t) {\n const s = 1.70158;\n return --t * t * ((s + 1) * t + s) + 1;\n}\nfunction bounceOut(t) {\n const a = 4.0 / 11.0;\n const b = 8.0 / 11.0;\n const c = 9.0 / 10.0;\n const ca = 4356.0 / 361.0;\n const cb = 35442.0 / 1805.0;\n const cc = 16061.0 / 1805.0;\n const t2 = t * t;\n return t < a\n ? 7.5625 * t2\n : t < b\n ? 9.075 * t2 - 9.9 * t + 3.4\n : t < c\n ? ca * t2 - cb * t + cc\n : 10.8 * t * t - 20.52 * t + 10.72;\n}\nfunction bounceInOut(t) {\n return t < 0.5\n ? 0.5 * (1.0 - bounceOut(1.0 - t * 2.0))\n : 0.5 * bounceOut(t * 2.0 - 1.0) + 0.5;\n}\nfunction bounceIn(t) {\n return 1.0 - bounceOut(1.0 - t);\n}\nfunction circInOut(t) {\n if ((t *= 2) < 1)\n return -0.5 * (Math.sqrt(1 - t * t) - 1);\n return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n}\nfunction circIn(t) {\n return 1.0 - Math.sqrt(1.0 - t * t);\n}\nfunction circOut(t) {\n return Math.sqrt(1 - --t * t);\n}\nfunction cubicInOut(t) {\n return t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0;\n}\nfunction cubicIn(t) {\n return t * t * t;\n}\nfunction cubicOut(t) {\n const f = t - 1.0;\n return f * f * f + 1.0;\n}\nfunction elasticInOut(t) {\n return t < 0.5\n ? 0.5 *\n Math.sin(((+13.0 * Math.PI) / 2) * 2.0 * t) *\n Math.pow(2.0, 10.0 * (2.0 * t - 1.0))\n : 0.5 *\n Math.sin(((-13.0 * Math.PI) / 2) * (2.0 * t - 1.0 + 1.0)) *\n Math.pow(2.0, -10.0 * (2.0 * t - 1.0)) +\n 1.0;\n}\nfunction elasticIn(t) {\n return Math.sin((13.0 * t * Math.PI) / 2) * Math.pow(2.0, 10.0 * (t - 1.0));\n}\nfunction elasticOut(t) {\n return (Math.sin((-13.0 * (t + 1.0) * Math.PI) / 2) * Math.pow(2.0, -10.0 * t) + 1.0);\n}\nfunction expoInOut(t) {\n return t === 0.0 || t === 1.0\n ? t\n : t < 0.5\n ? +0.5 * Math.pow(2.0, 20.0 * t - 10.0)\n : -0.5 * Math.pow(2.0, 10.0 - t * 20.0) + 1.0;\n}\nfunction expoIn(t) {\n return t === 0.0 ? t : Math.pow(2.0, 10.0 * (t - 1.0));\n}\nfunction expoOut(t) {\n return t === 1.0 ? t : 1.0 - Math.pow(2.0, -10.0 * t);\n}\nfunction quadInOut(t) {\n t /= 0.5;\n if (t < 1)\n return 0.5 * t * t;\n t--;\n return -0.5 * (t * (t - 2) - 1);\n}\nfunction quadIn(t) {\n return t * t;\n}\nfunction quadOut(t) {\n return -t * (t - 2.0);\n}\nfunction quartInOut(t) {\n return t < 0.5\n ? +8.0 * Math.pow(t, 4.0)\n : -8.0 * Math.pow(t - 1.0, 4.0) + 1.0;\n}\nfunction quartIn(t) {\n return Math.pow(t, 4.0);\n}\nfunction quartOut(t) {\n return Math.pow(t - 1.0, 3.0) * (1.0 - t) + 1.0;\n}\nfunction quintInOut(t) {\n if ((t *= 2) < 1)\n return 0.5 * t * t * t * t * t;\n return 0.5 * ((t -= 2) * t * t * t * t + 2);\n}\nfunction quintIn(t) {\n return t * t * t * t * t;\n}\nfunction quintOut(t) {\n return --t * t * t * t * t + 1;\n}\nfunction sineInOut(t) {\n return -0.5 * (Math.cos(Math.PI * t) - 1);\n}\nfunction sineIn(t) {\n const v = Math.cos(t * Math.PI * 0.5);\n if (Math.abs(v) < 1e-14)\n return 1;\n else\n return 1 - v;\n}\nfunction sineOut(t) {\n return Math.sin((t * Math.PI) / 2);\n}\n\nexport { backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, cubicIn, cubicInOut, cubicOut, elasticIn, elasticInOut, elasticOut, expoIn, expoInOut, expoOut, quadIn, quadInOut, quadOut, quartIn, quartInOut, quartOut, quintIn, quintInOut, quintOut, sineIn, sineInOut, sineOut };\n","import { cubicInOut, linear, cubicOut } from '../easing/index.mjs';\nimport { is_function, assign } from '../internal/index.mjs';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\n\nfunction blur(node, { delay = 0, duration = 400, easing = cubicInOut, amount = 5, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const f = style.filter === 'none' ? '' : style.filter;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `opacity: ${target_opacity - (od * u)}; filter: ${f} blur(${u * amount}px);`\n };\n}\nfunction fade(node, { delay = 0, duration = 400, easing = linear } = {}) {\n const o = +getComputedStyle(node).opacity;\n return {\n delay,\n duration,\n easing,\n css: t => `opacity: ${t * o}`\n };\n}\nfunction fly(node, { delay = 0, duration = 400, easing = cubicOut, x = 0, y = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `\n\t\t\ttransform: ${transform} translate(${(1 - t) * x}px, ${(1 - t) * y}px);\n\t\t\topacity: ${target_opacity - (od * u)}`\n };\n}\nfunction slide(node, { delay = 0, duration = 400, easing = cubicOut } = {}) {\n const style = getComputedStyle(node);\n const opacity = +style.opacity;\n const height = parseFloat(style.height);\n const padding_top = parseFloat(style.paddingTop);\n const padding_bottom = parseFloat(style.paddingBottom);\n const margin_top = parseFloat(style.marginTop);\n const margin_bottom = parseFloat(style.marginBottom);\n const border_top_width = parseFloat(style.borderTopWidth);\n const border_bottom_width = parseFloat(style.borderBottomWidth);\n return {\n delay,\n duration,\n easing,\n css: t => 'overflow: hidden;' +\n `opacity: ${Math.min(t * 20, 1) * opacity};` +\n `height: ${t * height}px;` +\n `padding-top: ${t * padding_top}px;` +\n `padding-bottom: ${t * padding_bottom}px;` +\n `margin-top: ${t * margin_top}px;` +\n `margin-bottom: ${t * margin_bottom}px;` +\n `border-top-width: ${t * border_top_width}px;` +\n `border-bottom-width: ${t * border_bottom_width}px;`\n };\n}\nfunction scale(node, { delay = 0, duration = 400, easing = cubicOut, start = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const sd = 1 - start;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `\n\t\t\ttransform: ${transform} scale(${1 - (sd * u)});\n\t\t\topacity: ${target_opacity - (od * u)}\n\t\t`\n };\n}\nfunction draw(node, { delay = 0, speed, duration, easing = cubicInOut } = {}) {\n const len = node.getTotalLength();\n if (duration === undefined) {\n if (speed === undefined) {\n duration = 800;\n }\n else {\n duration = len / speed;\n }\n }\n else if (typeof duration === 'function') {\n duration = duration(len);\n }\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `stroke-dasharray: ${t * len} ${u * len}`\n };\n}\nfunction crossfade(_a) {\n var { fallback } = _a, defaults = __rest(_a, [\"fallback\"]);\n const to_receive = new Map();\n const to_send = new Map();\n function crossfade(from, node, params) {\n const { delay = 0, duration = d => Math.sqrt(d) * 30, easing = cubicOut } = assign(assign({}, defaults), params);\n const to = node.getBoundingClientRect();\n const dx = from.left - to.left;\n const dy = from.top - to.top;\n const dw = from.width / to.width;\n const dh = from.height / to.height;\n const d = Math.sqrt(dx * dx + dy * dy);\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n const opacity = +style.opacity;\n return {\n delay,\n duration: is_function(duration) ? duration(d) : duration,\n easing,\n css: (t, u) => `\n\t\t\t\topacity: ${t * opacity};\n\t\t\t\ttransform-origin: top left;\n\t\t\t\ttransform: ${transform} translate(${u * dx}px,${u * dy}px) scale(${t + (1 - t) * dw}, ${t + (1 - t) * dh});\n\t\t\t`\n };\n }\n function transition(items, counterparts, intro) {\n return (node, params) => {\n items.set(params.key, {\n rect: node.getBoundingClientRect()\n });\n return () => {\n if (counterparts.has(params.key)) {\n const { rect } = counterparts.get(params.key);\n counterparts.delete(params.key);\n return crossfade(rect, node, params);\n }\n // if the node is disappearing altogether\n // (i.e. wasn't claimed by the other list)\n // then we need to supply an outro\n items.delete(params.key);\n return fallback && fallback(node, params, intro);\n };\n };\n }\n return [\n transition(to_send, to_receive, false),\n transition(to_receive, to_send, true)\n ];\n}\n\nexport { blur, crossfade, draw, fade, fly, scale, slide };\n","\n\n
    \n

    Introduction

    \n \n
    Presentation
    \n
    \n \n
    Installation
    \n
    \n \n
    Getting Started
    \n
    \n

    Configuration

    \n \n
    Configuration Options
    \n
    \n \n
    Global Before Enter
    \n
    \n \n
    Global On Error
    \n
    \n

    Route Object

    \n \n
    Properties
    \n
    \n \n
    Before Enter
    \n
    \n \n
    After Before Enter
    \n
    \n \n
    On Error
    \n
    \n

    Route Component

    \n \n
    Properties
    \n
    \n \n
    Components
    \n
    \n

    Navigation

    \n \n
    Routing
    \n
    \n \n
    Store
    \n
    \n

    Route Link

    \n \n
    Properties
    \n
    \n
    \n\n\n","\n\n
    \n
    \n \n

    \n Svelte Client Router - The Svelte SPA Router!\n

    \n
    \n
    \n
    \n \n \n \n
    \n
    \n \n\n\n\n","\n\n\n","import App from './App.svelte';\n\nconst app = new App({\n\ttarget: document.body,\n});\n\nexport default app;","\n\n