aptechka 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/animation/Tweened.d.ts +0 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +7 -10
- package/lib/morph/Morph.d.ts +1 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +120 -108
- package/package.json +1 -1
|
@@ -10,7 +10,6 @@ export declare class Tweened extends Animated {
|
|
|
10
10
|
start(): void;
|
|
11
11
|
pause(): void;
|
|
12
12
|
stop(): void;
|
|
13
|
-
get max(): import("../store").Store<number, keyof import("../store").StoreManagers, import("../store").StoreEntry<number>>;
|
|
14
13
|
protected update(): void;
|
|
15
14
|
protected handleAnimationFrame(e: TickerCallbackEntry): void;
|
|
16
15
|
}
|
package/lib/animation/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var u=Object.defineProperty,c=Object.defineProperties;var l=Object.getOwnPropertyDescriptors;var r=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var i=(a,t,e)=>t in a?u(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,n=(a,t)=>{for(var e in t||(t={}))g.call(t,e)&&i(a,e,t[e]);if(r)for(var e of r(t))A.call(t,e)&&i(a,e,t[e]);return a},s=(a,t)=>c(a,l(t));var m=(a,t,e)=>(i(a,typeof t!="symbol"?t+"":t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../Animated-Bf-gPIQM.cjs"),F=require("../easings-DsS5-Kqc.cjs"),f=require("../Damped-BwpMU9Gi.cjs");class q extends d.Animated{constructor(e){super(s(n({},e),{min:(e==null?void 0:e.min)||0,max:(e==null?void 0:e.max)||1e3}));m(this,"easing");this.easing=(e==null?void 0:e.easing)||F.linear}start(){this.listenAnimationFrame()}pause(){this.unlistenAnimationFrame()}stop(){this.reset()}update(){const e=(this.target-this.min.current)/(this.delta||1),h=this.easing(e);this.current=this.min.current+h*this.delta}handleAnimationFrame(e){this.shift(e.elapsed),(e.elapsed&&this.current===0||this.current===this.delta)&&this.unlistenAnimationFrame()}}exports.Animated=d.Animated;exports.Damped=f.Damped;exports.Tweened=q;
|
package/lib/animation/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
var d = Object.defineProperty, l = Object.defineProperties;
|
|
2
2
|
var u = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var i = Object.getOwnPropertySymbols;
|
|
4
|
-
var c = Object.prototype.hasOwnProperty,
|
|
4
|
+
var c = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var r = (a, t, e) => t in a ? d(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, s = (a, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
7
|
c.call(t, e) && r(a, e, t[e]);
|
|
8
8
|
if (i)
|
|
9
9
|
for (var e of i(t))
|
|
10
|
-
|
|
10
|
+
A.call(t, e) && r(a, e, t[e]);
|
|
11
11
|
return a;
|
|
12
12
|
}, m = (a, t) => l(a, u(t));
|
|
13
13
|
var n = (a, t, e) => (r(a, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
-
import { A as
|
|
15
|
-
import { l as
|
|
14
|
+
import { A as f } from "../Animated-Br_4OSth.js";
|
|
15
|
+
import { l as g } from "../easings-BKi40vHz.js";
|
|
16
16
|
import { D as b } from "../Damped-urvryQLo.js";
|
|
17
|
-
class w extends
|
|
17
|
+
class w extends f {
|
|
18
18
|
constructor(e) {
|
|
19
19
|
super(m(s({}, e), {
|
|
20
20
|
min: (e == null ? void 0 : e.min) || 0,
|
|
21
21
|
max: (e == null ? void 0 : e.max) || 1e3
|
|
22
22
|
}));
|
|
23
23
|
n(this, "easing");
|
|
24
|
-
this.easing = (e == null ? void 0 : e.easing) ||
|
|
24
|
+
this.easing = (e == null ? void 0 : e.easing) || g;
|
|
25
25
|
}
|
|
26
26
|
start() {
|
|
27
27
|
this.listenAnimationFrame();
|
|
@@ -32,9 +32,6 @@ class w extends g {
|
|
|
32
32
|
stop() {
|
|
33
33
|
this.reset();
|
|
34
34
|
}
|
|
35
|
-
get max() {
|
|
36
|
-
return super.max;
|
|
37
|
-
}
|
|
38
35
|
update() {
|
|
39
36
|
const e = (this.target - this.min.current) / (this.delta || 1), h = this.easing(e);
|
|
40
37
|
this.current = this.min.current + h * this.delta;
|
|
@@ -44,7 +41,7 @@ class w extends g {
|
|
|
44
41
|
}
|
|
45
42
|
}
|
|
46
43
|
export {
|
|
47
|
-
|
|
44
|
+
f as Animated,
|
|
48
45
|
b as Damped,
|
|
49
46
|
w as Tweened
|
|
50
47
|
};
|
package/lib/morph/Morph.d.ts
CHANGED
|
@@ -22,5 +22,6 @@ export declare class Morph {
|
|
|
22
22
|
constructor(parameters?: MorphParameters);
|
|
23
23
|
beforeNavigationEvent(callback: MorphNavigationCallback): () => void;
|
|
24
24
|
afterNavigationEvent(callback: MorphNavigationCallback): () => void;
|
|
25
|
+
prefetch(pathname: string): Promise<Document>;
|
|
25
26
|
navigate(pathname: string, historyAction?: MorphHistoryAction): Promise<void>;
|
|
26
27
|
}
|
package/lib/morph/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var nt=Object.defineProperty;var V=(s,t)=>(t=Symbol[s])?t:Symbol.for("Symbol."+s);var ot=(s,t,e)=>t in s?nt(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var _=(s,t,e)=>(ot(s,typeof t!="symbol"?t+"":t,e),e),m=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var i=(s,t,e)=>(m(s,t,"read from private field"),e?e.call(s):t.get(s)),n=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},r=(s,t,e,o)=>(m(s,t,"write to private field"),o?o.call(s,e):t.set(s,e),e);var f=(s,t,e)=>(m(s,t,"access private method"),e);var T=(s,t,e)=>new Promise((o,c)=>{var l=u=>{try{g(e.next(u))}catch(v){c(v)}},y=u=>{try{g(e.throw(u))}catch(v){c(v)}},g=u=>u.done?o(u.value):Promise.resolve(u.value).then(l,y);g((e=e.apply(s,t)).next())});var X=(s,t,e)=>(t=s[V("asyncIterator")])?t.call(s):(s=s[V("iterator")](),t={},e=(o,c)=>(c=s[o])&&(t[o]=l=>new Promise((y,g,u)=>(l=c.call(s,l),u=l.done,Promise.resolve(l.value).then(v=>y({value:v,done:u}),g)))),e("next"),e("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("../notifier/index.cjs"),rt=require("../browser-CpzFX2xg.cjs");var M,d,w,N,P,S;class ht{constructor(t,e){n(this,M,void 0);n(this,d,void 0);n(this,w,void 0);n(this,N,void 0);n(this,P,t=>{t.preventDefault(),i(this,M).navigate(i(this,w),i(this,N))});n(this,S,()=>{i(this,M).prefetch(i(this,w))});r(this,M,e),r(this,d,t),r(this,w,i(this,d).getAttribute("href")||"/"),r(this,N,i(this,d).getAttribute("data-history-action")||"push"),i(this,d).addEventListener("click",i(this,P)),i(this,w)===location.pathname&&i(this,d).classList.add("current"),i(this,d).hasAttribute("data-prefetch")&&i(this,d).addEventListener("pointerenter",i(this,S))}destroy(){i(this,d).removeEventListener("click",i(this,P)),i(this,d).removeEventListener("pointerenter",i(this,S)),i(this,d).classList.remove("current")}}M=new WeakMap,d=new WeakMap,w=new WeakMap,N=new WeakMap,P=new WeakMap,S=new WeakMap;var a,k,A,C,x,j,E,L,H,D,q,R,z,p,$,W,G,F,J,B,tt,O,Q,K;class ct{constructor(t){n(this,R);n(this,p);n(this,W);n(this,F);n(this,B);n(this,O);n(this,a,null);n(this,k,null);n(this,A,null);n(this,C,null);n(this,x,[]);n(this,j,new DOMParser);n(this,E,new Map);n(this,L,void 0);n(this,H,null);_(this,"preprocessor");_(this,"postprocessor");n(this,D,new Z.Notifier);n(this,q,new Z.Notifier);n(this,K,t=>{t.state&&this.navigate(t.state,"none")});rt.isBrowser&&(r(this,a,(t==null?void 0:t.base)||"/"),t!=null&&t.base?(r(this,a,t.base),t.base.endsWith("/")||r(this,a,i(this,a)+"/")):r(this,a,"/"),r(this,k,(t==null?void 0:t.waitForHeadToLoad)!==!1),r(this,A,(t==null?void 0:t.cachePages)!==!1),r(this,C,f(this,F,J).call(this,document)),r(this,H,location.pathname),f(this,W,G).call(this),addEventListener("popstate",i(this,K)))}beforeNavigationEvent(t){return i(this,D).subscribe(t)}afterNavigationEvent(t){return i(this,q).subscribe(t)}prefetch(t){return T(this,null,function*(){return f(this,R,z).call(this,t)})}navigate(t,e="push"){return T(this,null,function*(){var c;if(t=f(this,p,$).call(this,t),i(this,L)===t||i(this,H)===t)return;r(this,L,t);const o=i(this,E).has(t);try{let l=!0;if(this.preprocessor)try{yield new Promise((h,b)=>{var I;(I=this.preprocessor)==null||I.call(this,{pathname:t,resolve:h,reject:b,isCached:o})})}catch(h){h?console.error(h):console.log("Route change canceled"),l=!1}if(i(this,D).notify({pathname:t,isCached:o}),!l||i(this,L)!==t)return;const y=i(this,E).get(t)||(yield f(this,R,z).call(this,t));if(i(this,L)!==t)return;const g=Array.from(document.head.children),u=Array.from(y.head.cloneNode(!0).children),v=f(this,B,tt).call(this,g,u),et=f(this,O,Q).call(this,g,v),U=f(this,O,Q).call(this,u,v);et.forEach(h=>h.remove()),U.forEach(h=>document.head.appendChild(h));const Y=U.filter(h=>h.tagName==="STYLE"||h.tagName==="SCRIPT"||h.tagName==="LINK");i(this,k)&&Y.length&&(yield new Promise(h=>T(this,null,function*(){let b=0;try{for(var I=X(Y),dt,ft,at;dt=!(ft=yield I.next()).done;dt=!1){const st=ft.value;st.onload=()=>{b++,b===Y.length&&h()}}}catch(ft){at=[ft]}finally{try{dt&&(ft=I.return)&&(yield ft.call(I))}finally{if(at)throw at[0]}}})));const it=f(this,F,J).call(this,y);i(this,C).forEach((h,b)=>{const I=it[b];h.innerHTML=I.innerHTML}),r(this,H,t),e==="push"?history.pushState(t,"",t+location.search):e==="replace"&&history.replaceState(t,"",t+location.search),f(this,W,G).call(this),(c=this.postprocessor)==null||c.call(this,{pathname:t,isCached:o}),i(this,q).notify({pathname:t,isCached:o})}catch(l){console.error(l)}r(this,L,void 0)})}}a=new WeakMap,k=new WeakMap,A=new WeakMap,C=new WeakMap,x=new WeakMap,j=new WeakMap,E=new WeakMap,L=new WeakMap,H=new WeakMap,D=new WeakMap,q=new WeakMap,R=new WeakSet,z=function(t){return T(this,null,function*(){const e=i(this,E).get(t);if(e)return e;const c=yield(yield fetch(t)).text(),l=i(this,j).parseFromString(c,"text/html");return i(this,A)&&i(this,E).set(t,l),l})},p=new WeakSet,$=function(t){return t=t.replace(i(this,a),""),t.startsWith("/")&&(t=t.slice(1)),i(this,a)+t},W=new WeakSet,G=function(){const t=[...document.documentElement.querySelectorAll("a")].filter(e=>{var o;return(o=e.getAttribute("href"))==null?void 0:o.startsWith("/")});i(this,x).forEach(e=>e.destroy()),r(this,x,t.map(e=>new ht(e,this)))},F=new WeakSet,J=function(t){const e=t.querySelectorAll("[data-morph]");return e.length?[...e]:[t.body]},B=new WeakSet,tt=function(t,e){return t.filter(o=>e.find(c=>c.outerHTML===o.outerHTML))},O=new WeakSet,Q=function(t,e){return t.filter(o=>!e.find(c=>c.outerHTML===o.outerHTML))},K=new WeakMap;exports.Morph=ct;
|
package/lib/morph/index.js
CHANGED
|
@@ -1,179 +1,191 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var j = (
|
|
5
|
-
if (!t.has(
|
|
1
|
+
var ot = Object.defineProperty;
|
|
2
|
+
var X = (s, t) => (t = Symbol[s]) ? t : Symbol.for("Symbol." + s);
|
|
3
|
+
var nt = (s, t, e) => t in s ? ot(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
4
|
+
var j = (s, t, e) => (nt(s, typeof t != "symbol" ? t + "" : t, e), e), z = (s, t, e) => {
|
|
5
|
+
if (!t.has(s))
|
|
6
6
|
throw TypeError("Cannot " + e);
|
|
7
7
|
};
|
|
8
|
-
var
|
|
9
|
-
if (t.has(
|
|
8
|
+
var i = (s, t, e) => (z(s, t, "read from private field"), e ? e.call(s) : t.get(s)), o = (s, t, e) => {
|
|
9
|
+
if (t.has(s))
|
|
10
10
|
throw TypeError("Cannot add the same private member more than once");
|
|
11
|
-
t instanceof WeakSet ? t.add(
|
|
12
|
-
}, r = (
|
|
13
|
-
var d = (
|
|
14
|
-
var
|
|
15
|
-
var
|
|
11
|
+
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
12
|
+
}, r = (s, t, e, n) => (z(s, t, "write to private field"), n ? n.call(s, e) : t.set(s, e), e);
|
|
13
|
+
var d = (s, t, e) => (z(s, t, "access private method"), e);
|
|
14
|
+
var T = (s, t, e) => new Promise((n, c) => {
|
|
15
|
+
var l = (f) => {
|
|
16
16
|
try {
|
|
17
|
-
g(e.next(
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
17
|
+
g(e.next(f));
|
|
18
|
+
} catch (L) {
|
|
19
|
+
c(L);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, y = (f) => {
|
|
22
22
|
try {
|
|
23
|
-
g(e.throw(
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
23
|
+
g(e.throw(f));
|
|
24
|
+
} catch (L) {
|
|
25
|
+
c(L);
|
|
26
26
|
}
|
|
27
|
-
}, g = (
|
|
28
|
-
g((e = e.apply(
|
|
27
|
+
}, g = (f) => f.done ? n(f.value) : Promise.resolve(f.value).then(l, y);
|
|
28
|
+
g((e = e.apply(s, t)).next());
|
|
29
29
|
});
|
|
30
|
-
var
|
|
31
|
-
import { Notifier as
|
|
32
|
-
import { i as
|
|
33
|
-
var
|
|
34
|
-
class
|
|
30
|
+
var Z = (s, t, e) => (t = s[X("asyncIterator")]) ? t.call(s) : (s = s[X("iterator")](), t = {}, e = (n, c) => (c = s[n]) && (t[n] = (l) => new Promise((y, g, f) => (l = c.call(s, l), f = l.done, Promise.resolve(l.value).then((L) => y({ value: L, done: f }), g)))), e("next"), e("return"), t);
|
|
31
|
+
import { Notifier as _ } from "../notifier/index.js";
|
|
32
|
+
import { i as rt } from "../browser-0zX67oeU.js";
|
|
33
|
+
var H, u, E, N, P, S;
|
|
34
|
+
class ht {
|
|
35
35
|
constructor(t, e) {
|
|
36
|
-
o(this,
|
|
37
|
-
o(this,
|
|
38
|
-
o(this,
|
|
39
|
-
o(this,
|
|
40
|
-
o(this,
|
|
41
|
-
t.preventDefault(),
|
|
36
|
+
o(this, H, void 0);
|
|
37
|
+
o(this, u, void 0);
|
|
38
|
+
o(this, E, void 0);
|
|
39
|
+
o(this, N, void 0);
|
|
40
|
+
o(this, P, (t) => {
|
|
41
|
+
t.preventDefault(), i(this, H).navigate(i(this, E), i(this, N));
|
|
42
|
+
});
|
|
43
|
+
o(this, S, () => {
|
|
44
|
+
i(this, H).prefetch(i(this, E));
|
|
42
45
|
});
|
|
43
|
-
r(this,
|
|
46
|
+
r(this, H, e), r(this, u, t), r(this, E, i(this, u).getAttribute("href") || "/"), r(this, N, i(this, u).getAttribute(
|
|
47
|
+
"data-history-action"
|
|
48
|
+
) || "push"), i(this, u).addEventListener("click", i(this, P)), i(this, E) === location.pathname && i(this, u).classList.add("current"), i(this, u).hasAttribute("data-prefetch") && i(this, u).addEventListener("pointerenter", i(this, S));
|
|
44
49
|
}
|
|
45
50
|
destroy() {
|
|
46
|
-
|
|
51
|
+
i(this, u).removeEventListener("click", i(this, P)), i(this, u).removeEventListener("pointerenter", i(this, S)), i(this, u).classList.remove("current");
|
|
47
52
|
}
|
|
48
53
|
}
|
|
49
|
-
|
|
50
|
-
var a,
|
|
54
|
+
H = new WeakMap(), u = new WeakMap(), E = new WeakMap(), N = new WeakMap(), P = new WeakMap(), S = new WeakMap();
|
|
55
|
+
var a, k, A, C, x, I, w, v, M, D, R, W, G, O, $, m, J, F, Q, B, tt, p, U, K;
|
|
51
56
|
class ut {
|
|
52
57
|
constructor(t) {
|
|
53
|
-
o(this,
|
|
58
|
+
o(this, W);
|
|
54
59
|
o(this, O);
|
|
55
|
-
o(this, D);
|
|
56
60
|
o(this, m);
|
|
61
|
+
o(this, F);
|
|
57
62
|
o(this, B);
|
|
58
|
-
o(this,
|
|
63
|
+
o(this, p);
|
|
59
64
|
o(this, a, null);
|
|
60
|
-
o(this, P, null);
|
|
61
|
-
o(this, S, null);
|
|
62
65
|
o(this, k, null);
|
|
63
|
-
o(this,
|
|
64
|
-
o(this,
|
|
65
|
-
o(this,
|
|
66
|
-
o(this,
|
|
67
|
-
o(this,
|
|
66
|
+
o(this, A, null);
|
|
67
|
+
o(this, C, null);
|
|
68
|
+
o(this, x, []);
|
|
69
|
+
o(this, I, new DOMParser());
|
|
70
|
+
o(this, w, /* @__PURE__ */ new Map());
|
|
71
|
+
o(this, v, void 0);
|
|
72
|
+
o(this, M, null);
|
|
68
73
|
j(this, "preprocessor");
|
|
69
74
|
j(this, "postprocessor");
|
|
70
|
-
o(this,
|
|
71
|
-
o(this,
|
|
75
|
+
o(this, D, new _());
|
|
76
|
+
o(this, R, new _());
|
|
72
77
|
o(this, K, (t) => {
|
|
73
78
|
t.state && this.navigate(t.state, "none");
|
|
74
79
|
});
|
|
75
|
-
|
|
80
|
+
rt && (r(this, a, (t == null ? void 0 : t.base) || "/"), t != null && t.base ? (r(this, a, t.base), t.base.endsWith("/") || r(this, a, i(this, a) + "/")) : r(this, a, "/"), r(this, k, (t == null ? void 0 : t.waitForHeadToLoad) !== !1), r(this, A, (t == null ? void 0 : t.cachePages) !== !1), r(this, C, d(this, F, Q).call(this, document)), r(this, M, location.pathname), d(this, m, J).call(this), addEventListener("popstate", i(this, K)));
|
|
76
81
|
}
|
|
77
82
|
beforeNavigationEvent(t) {
|
|
78
|
-
return
|
|
83
|
+
return i(this, D).subscribe(t);
|
|
79
84
|
}
|
|
80
85
|
afterNavigationEvent(t) {
|
|
81
|
-
return
|
|
86
|
+
return i(this, R).subscribe(t);
|
|
87
|
+
}
|
|
88
|
+
prefetch(t) {
|
|
89
|
+
return T(this, null, function* () {
|
|
90
|
+
return d(this, W, G).call(this, t);
|
|
91
|
+
});
|
|
82
92
|
}
|
|
83
93
|
navigate(t, e = "push") {
|
|
84
|
-
return
|
|
85
|
-
var
|
|
86
|
-
if (t = d(this, O, $).call(this, t),
|
|
94
|
+
return T(this, null, function* () {
|
|
95
|
+
var c;
|
|
96
|
+
if (t = d(this, O, $).call(this, t), i(this, v) === t || i(this, M) === t)
|
|
87
97
|
return;
|
|
88
|
-
r(this,
|
|
89
|
-
const n =
|
|
98
|
+
r(this, v, t);
|
|
99
|
+
const n = i(this, w).has(t);
|
|
90
100
|
try {
|
|
91
|
-
let
|
|
101
|
+
let l = !0;
|
|
92
102
|
if (this.preprocessor)
|
|
93
103
|
try {
|
|
94
|
-
yield new Promise((
|
|
95
|
-
var
|
|
96
|
-
(
|
|
104
|
+
yield new Promise((h, b) => {
|
|
105
|
+
var q;
|
|
106
|
+
(q = this.preprocessor) == null || q.call(this, { pathname: t, resolve: h, reject: b, isCached: n });
|
|
97
107
|
});
|
|
98
|
-
} catch (
|
|
99
|
-
|
|
108
|
+
} catch (h) {
|
|
109
|
+
h ? console.error(h) : console.log("Route change canceled"), l = !1;
|
|
100
110
|
}
|
|
101
|
-
if (
|
|
111
|
+
if (i(this, D).notify({
|
|
102
112
|
pathname: t,
|
|
103
113
|
isCached: n
|
|
104
|
-
}), !
|
|
114
|
+
}), !l || i(this, v) !== t)
|
|
105
115
|
return;
|
|
106
|
-
const
|
|
107
|
-
if (
|
|
116
|
+
const y = i(this, w).get(t) || (yield d(this, W, G).call(this, t));
|
|
117
|
+
if (i(this, v) !== t)
|
|
108
118
|
return;
|
|
109
|
-
const g = Array.from(document.head.children),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
119
|
+
const g = Array.from(document.head.children), f = Array.from(
|
|
120
|
+
y.head.cloneNode(!0).children
|
|
121
|
+
), L = d(this, B, tt).call(this, g, f), et = d(this, p, U).call(this, g, L), V = d(this, p, U).call(this, f, L);
|
|
122
|
+
et.forEach((h) => h.remove()), V.forEach((h) => document.head.appendChild(h));
|
|
123
|
+
const Y = V.filter(
|
|
124
|
+
(h) => h.tagName === "STYLE" || h.tagName === "SCRIPT" || h.tagName === "LINK"
|
|
113
125
|
);
|
|
114
|
-
|
|
115
|
-
let
|
|
126
|
+
i(this, k) && Y.length && (yield new Promise((h) => T(this, null, function* () {
|
|
127
|
+
let b = 0;
|
|
116
128
|
try {
|
|
117
|
-
for (var
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
129
|
+
for (var q = Z(Y), gt, Lt, vt; gt = !(Lt = yield q.next()).done; gt = !1) {
|
|
130
|
+
const st = Lt.value;
|
|
131
|
+
st.onload = () => {
|
|
132
|
+
b++, b === Y.length && h();
|
|
121
133
|
};
|
|
122
134
|
}
|
|
123
|
-
} catch (
|
|
124
|
-
|
|
135
|
+
} catch (Lt) {
|
|
136
|
+
vt = [Lt];
|
|
125
137
|
} finally {
|
|
126
138
|
try {
|
|
127
|
-
|
|
139
|
+
gt && (Lt = q.return) && (yield Lt.call(q));
|
|
128
140
|
} finally {
|
|
129
|
-
if (
|
|
130
|
-
throw
|
|
141
|
+
if (vt)
|
|
142
|
+
throw vt[0];
|
|
131
143
|
}
|
|
132
144
|
}
|
|
133
145
|
})));
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
}), r(this,
|
|
139
|
-
} catch (
|
|
140
|
-
console.error(
|
|
146
|
+
const it = d(this, F, Q).call(this, y);
|
|
147
|
+
i(this, C).forEach((h, b) => {
|
|
148
|
+
const q = it[b];
|
|
149
|
+
h.innerHTML = q.innerHTML;
|
|
150
|
+
}), r(this, M, t), e === "push" ? history.pushState(t, "", t + location.search) : e === "replace" && history.replaceState(t, "", t + location.search), d(this, m, J).call(this), (c = this.postprocessor) == null || c.call(this, { pathname: t, isCached: n }), i(this, R).notify({ pathname: t, isCached: n });
|
|
151
|
+
} catch (l) {
|
|
152
|
+
console.error(l);
|
|
141
153
|
}
|
|
142
|
-
r(this,
|
|
154
|
+
r(this, v, void 0);
|
|
143
155
|
});
|
|
144
156
|
}
|
|
145
157
|
}
|
|
146
|
-
a = new WeakMap(),
|
|
147
|
-
return
|
|
148
|
-
const e =
|
|
158
|
+
a = new WeakMap(), k = new WeakMap(), A = new WeakMap(), C = new WeakMap(), x = new WeakMap(), I = new WeakMap(), w = new WeakMap(), v = new WeakMap(), M = new WeakMap(), D = new WeakMap(), R = new WeakMap(), W = new WeakSet(), G = function(t) {
|
|
159
|
+
return T(this, null, function* () {
|
|
160
|
+
const e = i(this, w).get(t);
|
|
149
161
|
if (e)
|
|
150
162
|
return e;
|
|
151
|
-
const
|
|
152
|
-
return
|
|
163
|
+
const c = yield (yield fetch(t)).text(), l = i(this, I).parseFromString(c, "text/html");
|
|
164
|
+
return i(this, A) && i(this, w).set(t, l), l;
|
|
153
165
|
});
|
|
154
166
|
}, O = new WeakSet(), $ = function(t) {
|
|
155
|
-
return t = t.replace(
|
|
156
|
-
},
|
|
157
|
-
const t = [
|
|
158
|
-
(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
);
|
|
163
|
-
|
|
164
|
-
},
|
|
167
|
+
return t = t.replace(i(this, a), ""), t.startsWith("/") && (t = t.slice(1)), i(this, a) + t;
|
|
168
|
+
}, m = new WeakSet(), J = function() {
|
|
169
|
+
const t = [
|
|
170
|
+
...document.documentElement.querySelectorAll("a")
|
|
171
|
+
].filter((e) => {
|
|
172
|
+
var n;
|
|
173
|
+
return (n = e.getAttribute("href")) == null ? void 0 : n.startsWith("/");
|
|
174
|
+
});
|
|
175
|
+
i(this, x).forEach((e) => e.destroy()), r(this, x, t.map((e) => new ht(e, this)));
|
|
176
|
+
}, F = new WeakSet(), Q = function(t) {
|
|
165
177
|
const e = t.querySelectorAll("[data-morph]");
|
|
166
178
|
return e.length ? [...e] : [t.body];
|
|
167
|
-
}, B = new WeakSet(),
|
|
179
|
+
}, B = new WeakSet(), tt = function(t, e) {
|
|
168
180
|
return t.filter(
|
|
169
181
|
(n) => e.find(
|
|
170
|
-
(
|
|
182
|
+
(c) => c.outerHTML === n.outerHTML
|
|
171
183
|
)
|
|
172
184
|
);
|
|
173
|
-
},
|
|
185
|
+
}, p = new WeakSet(), U = function(t, e) {
|
|
174
186
|
return t.filter(
|
|
175
187
|
(n) => !e.find(
|
|
176
|
-
(
|
|
188
|
+
(c) => c.outerHTML === n.outerHTML
|
|
177
189
|
)
|
|
178
190
|
);
|
|
179
191
|
}, K = new WeakMap();
|