aptechka 0.4.11 → 0.4.13
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/{Damped-Ceg1a3X8.js → Damped-BZujMwuv.js} +11 -10
- package/lib/Damped-DK3CSBXb.cjs +1 -0
- package/lib/{Derived-B-g8dYgh.cjs → Derived-BZtlW0bB.cjs} +1 -1
- package/lib/{Derived-kPJs5JC5.js → Derived-DH-ouLBq.js} +1 -1
- package/lib/DragControls-CV1YozSr.cjs +1 -0
- package/lib/{DragControls-CZhJHO0_.js → DragControls-Ch_JO2ML.js} +23 -22
- package/lib/SourceManager-Bl_uduSS.cjs +1 -0
- package/lib/{SourceManager-4OHacQoQ.js → SourceManager-D_8MZ3bR.js} +21 -20
- package/lib/Store-BQGNOHlY.cjs +1 -0
- package/lib/{Store-BQXXikps.js → Store-Cd-E5W1z.js} +8 -7
- package/lib/{Viewport-wlgZaIn7.js → Viewport-Bx-VImCe.js} +6 -5
- package/lib/Viewport-_WllZTJ0.cjs +1 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +1 -0
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +6 -5
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +16 -15
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +4 -3
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +4 -3
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/{createStylesheet-CqHU9_qv.cjs → createStylesheet-C8aQQ4hd.cjs} +1 -1
- package/lib/{createStylesheet-DBCEbDjI.js → createStylesheet-KMRQhSa-.js} +1 -1
- package/lib/createTheme-BSreUYge.cjs +1 -0
- package/lib/createTheme-u3NsrEV6.js +16 -0
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +4 -3
- package/lib/custom-element/index.cjs +1 -1
- package/lib/custom-element/index.js +3 -2
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +7 -6
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +3 -3
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +23 -22
- package/lib/en3/index.cjs +1 -1
- package/lib/en3/index.js +23 -22
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +8 -7
- package/lib/{index-BUOBDenR.js → index-Fasue6kv.js} +20 -19
- package/lib/index-nxoux28n.cjs +9 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +3 -2
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +11 -10
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +148 -139
- package/lib/libs/path-data-polyfill.d.ts +1 -0
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +16 -15
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +6 -5
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +4 -3
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +21 -20
- package/lib/path-data-polyfill-CXsOR7Oc.cjs +3 -0
- package/lib/path-data-polyfill-DgeDWYeI.js +454 -0
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +14 -13
- package/lib/resized/index.cjs +1 -1
- package/lib/resized/index.js +8 -7
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +8 -7
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +307 -298
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.d.ts +3 -0
- package/lib/scroll-entries/index.js +18 -13
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/slicer/index.cjs +2 -2
- package/lib/slicer/index.js +4 -3
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +2 -2
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +13 -12
- package/lib/{tags-CMPg9ETZ.js → tags-BoPv9fDr.js} +234 -233
- package/lib/tags-CueX-JLX.cjs +1 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +7 -6
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +3 -2
- package/lib/tweaker/index.cjs +1 -1
- package/lib/tweaker/index.js +6 -5
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +164 -127
- package/lib/utils/svg.d.ts +15 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +6 -5
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +7 -6
- package/package.json +1 -1
- package/lib/Damped-BdnkNOcb.cjs +0 -1
- package/lib/DragControls-C7P6P5HO.cjs +0 -1
- package/lib/SourceManager-Bc68GDrb.cjs +0 -1
- package/lib/Store-C-1ruEIm.cjs +0 -1
- package/lib/Viewport-DAjFJF5V.cjs +0 -1
- package/lib/createTheme-CHnsCgAr.js +0 -15
- package/lib/createTheme-Cfaw9UmV.cjs +0 -1
- package/lib/index-Bv5vIuF-.cjs +0 -9
- package/lib/tags-Djb6mb1o.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var Le=Object.defineProperty,qe=Object.defineProperties;var xe=Object.getOwnPropertyDescriptors;var de=Object.getOwnPropertySymbols;var Ae=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;var he=(e,t,r)=>t in e?Le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=(e,t)=>{for(var r in t||(t={}))Ae.call(t,r)&&he(e,r,t[r]);if(de)for(var r of de(t))Me.call(t,r)&&he(e,r,t[r]);return e},me=(e,t)=>qe(e,xe(t));var O=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var o=(e,t,r)=>(O(e,t,"read from private field"),r?r.call(e):t.get(e)),a=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},g=(e,t,r,i)=>(O(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r);var c=(e,t,r)=>(O(e,t,"access private method"),r);const y=require("./Store-BQGNOHlY.cjs"),we=require("./browser-CpzFX2xg.cjs"),pe=require("./object-CCiXnER2.cjs"),j=require("./string-DhgS_iFl.cjs");require("./path-data-polyfill-CXsOR7Oc.cjs");const De=require("./connector/index.cjs"),Fe=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view"]);var u,b,l,N,h,m,B,be,R,ge,$,ye,k,ee,T,te,G,Ee,V,Se,W,Ce,z,ve,L,ne,q,re,I,Ne,x,ie,A,oe,J,ke,M,se,v,P,D,ue,F,ce,H,ae,K,U;const Y=class Y{constructor(...t){a(this,B);a(this,R);a(this,$);a(this,k);a(this,T);a(this,G);a(this,V);a(this,W);a(this,z);a(this,L);a(this,q);a(this,I);a(this,x);a(this,A);a(this,J);a(this,M);a(this,v);a(this,D);a(this,F);a(this,H);a(this,u,null);a(this,b,new Set);a(this,l,new Set);a(this,N,void 0);a(this,h,void 0);a(this,m,void 0);a(this,K,()=>{o(this,b).forEach(t=>{t()}),o(this,b).clear()});a(this,U,t=>{o(this,l).forEach(r=>{r(t)}),o(this,l).clear(),c(this,A,oe).call(this)});if(we.isBrowser){const r=t[0],i=t[1];g(this,u,c(this,B,be).call(this,r,i==null?void 0:i.forceSvg)),c(this,$,ye).call(this,i)}}get node(){return o(this,u)}set node(t){var r;c(this,A,oe).call(this),g(this,u,t),(r=o(this,N))==null||r.call(this),o(this,u)instanceof Element&&g(this,h,[...o(this,u).querySelectorAll("store-root")]),c(this,x,ie).call(this),c(this,k,ee).call(this)}};u=new WeakMap,b=new WeakMap,l=new WeakMap,N=new WeakMap,h=new WeakMap,m=new WeakMap,B=new WeakSet,be=function(t,r){let i=null;if(t instanceof Node)i=t;else if(typeof t=="string")if(!t.includes("<")&&t.includes("-"))i=new(customElements.get(t));else if(t.includes("<")){const s=document.createElement("div");s.innerHTML=t,i=s.firstElementChild}else Fe.has(t)||r?i=document.createElementNS("http://www.w3.org/2000/svg",t):i=document.createElement(t);else i=document.createElement("div");return i},R=new WeakSet,ge=function(t){return t instanceof HTMLElement||t instanceof SVGElement},$=new WeakSet,ye=function(t){if(!t)return;const r=c(this,R,ge).call(this,o(this,u)),i=t.ref;delete t.ref,t!=null&&t.onConnect&&(o(this,b).add(t.onConnect),delete t.onConnect),t!=null&&t.onDisconnect&&(o(this,l).add(t.onDisconnect),delete t.onDisconnect);let s,f;for(const d in t){const w=t[d];d==="class"&&r?c(this,T,te).call(this,w):d==="style"&&r?c(this,W,Ce).call(this,w):d==="lightChildren"?c(this,v,P).call(this,o(this,u),w):d==="children"?c(this,v,P).call(this,o(this,u)instanceof Element?o(this,u).shadowRoot||o(this,u):o(this,u),w):d.startsWith("on")?(f||(f={}),f[d]=w):(s||(s={}),s[d]=w)}c(this,J,ke).call(this,s),c(this,I,Ne).call(this,f),i&&(typeof i=="function"?i(o(this,u)):i.current=o(this,u)),c(this,k,ee).call(this)},k=new WeakSet,ee=function(){if(we.isBrowser&&(o(this,l).size||o(this,b).size)){const t=o(this,u)instanceof DocumentFragment?o(this,u).firstChild:o(this,u);g(this,N,De.connector.subscribe(t,{connectCallback:o(this,K),disconnectCallback:o(this,U),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},T=new WeakSet,te=function(t){if(t){if(typeof t=="string")o(this,u).classList.add(t);else if(Array.isArray(t))t.forEach(r=>{c(this,T,te).call(this,r)});else if(typeof t=="object")if(t instanceof y.Store)c(this,G,Ee).call(this,t);else for(const r in t){const i=t[r];i instanceof y.Store?c(this,V,Se).call(this,r,i):i?o(this,u).classList.add(r):o(this,u).classList.remove(r)}}else return},G=new WeakSet,Ee=function(t){o(this,l).add(t.subscribe(({current:r,previous:i})=>{i&&[i].flat().forEach(s=>{s&&o(this,u).classList.remove(s)}),r&&[r].flat().forEach(s=>{s&&o(this,u).classList.add(s)})}))},V=new WeakSet,Se=function(t,r){o(this,l).add(r.subscribe(({current:i})=>{i?o(this,u).classList.add(t):o(this,u).classList.remove(t)}))},W=new WeakSet,Ce=function(t){if(!t)return;o(this,u).tagName==="style"||o(this,u).tagName==="STYLE"?c(this,L,ne).call(this,t):c(this,z,ve).call(this,t)},z=new WeakSet,ve=function(t){for(const r in t){const i=r,s=t[i];s instanceof y.Store?o(this,l).add(s.subscribe(({current:f})=>{c(this,q,re).call(this,i,f)})):c(this,q,re).call(this,i,s)}},L=new WeakSet,ne=function(t){for(const r in t){const i=t[r];if(typeof i=="object"&&!(i instanceof y.Store))o(this,u).appendChild(document.createTextNode(`${r} {`)),c(this,L,ne).call(this,i),o(this,u).appendChild(document.createTextNode("}"));else if(i instanceof y.Store){const s=document.createTextNode("");o(this,l).add(i.subscribe(f=>{f.current?s.nodeValue=`${j.camelToKebab(r)}: ${f.current};`:s.nodeValue=""})),o(this,u).appendChild(s)}else o(this,u).appendChild(document.createTextNode(`${j.camelToKebab(r)}: ${i};`))}},q=new WeakSet,re=function(t,r){t.includes("--")?r?o(this,u).style.setProperty(t,r):o(this,u).style.removeProperty(t):r?o(this,u).style[t]=r:o(this,u).style[t]=""},I=new WeakSet,Ne=function(t){if(t){o(this,m)||g(this,m,[]);for(const r in t){const i=r,s=j.uncapitalize(i.split("on").slice(1).join("on")),f=t[i];typeof f=="object"?o(this,m).push({name:s,callback:f.callback,options:f.options}):typeof f=="function"&&o(this,m).push({name:s,callback:f})}c(this,x,ie).call(this)}},x=new WeakSet,ie=function(){var t;(t=o(this,m))==null||t.forEach(r=>{o(this,u).addEventListener(r.name,r.callback,r.options)})},A=new WeakSet,oe=function(){var t;(t=o(this,m))==null||t.forEach(r=>{o(this,u).removeEventListener(r.name,r.callback,r.options)})},J=new WeakSet,ke=function(t){for(const r in t){const i=t[r];i instanceof y.Store?o(this,l).add(i.subscribe(({current:s})=>{c(this,M,se).call(this,r,s)})):c(this,M,se).call(this,r,i)}},M=new WeakSet,se=function(t,r){var s,f;const i=o(this,u);t in i&&!((f=(s=i.constructor)==null?void 0:s.observedAttributes)!=null&&f.includes(t))?r!=null&&(i[t]=r.toString()):r!=null&&i.setAttribute(t,r.toString())},v=new WeakSet,P=function(t,r){r&&(r=[r].flat(),r.forEach(i=>{if(i instanceof y.Store){const s=document.createElement("div");s.style.display="contents",t.appendChild(s),o(this,h)||g(this,h,[]);const f=o(this,h).length;s.setAttribute("store-root",""),o(this,h).push(s),o(this,l).add(i.subscribe(({current:d,previous:w})=>{const E=o(this,h)[f];E.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const Q=Array.from(E.childNodes),fe=[d].flat(),Te=[w].flat(),le=[],X=[];Te.forEach((p,S)=>{!fe.includes(p)&&Q[S]?le.push(Q[S]):X.push(p)}),fe.forEach((p,S)=>{if(X[S]){if(p!==X[S]){const C=c(this,F,ce).call(this,p),Z=Q[S];C instanceof Node?Z.isEqualNode(C)||E.replaceChild(C,Z):E.removeChild(Z)}}else{const C=c(this,F,ce).call(this,p);C instanceof Node&&s.appendChild(C)}}),le.forEach(p=>{E.removeChild(p)}),E.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Y)c(this,D,ue).call(this,t,i.node);else if(i instanceof Function)c(this,v,P).call(this,t,pe.isESClass(i)?new i:i());else{const s=c(this,H,ae).call(this,i);s instanceof Node&&c(this,D,ue).call(this,t,s)}}))},D=new WeakSet,ue=function(t,r){!(t instanceof ShadowRoot)&&r instanceof HTMLElement&&r.tagName==="STYLE"?(o(this,b).add(()=>{[...document.head.querySelectorAll("style")].find(s=>s.outerHTML===r.outerHTML)||document.head.appendChild(r)}),o(this,l).add(()=>{r.remove()})):t.appendChild(r)},F=new WeakSet,ce=function(t){return t instanceof Y?t.node:typeof t=="function"?pe.isESClass(t)?new t:t():c(this,H,ae).call(this,t)},H=new WeakSet,ae=function(t){if(t instanceof Node)return t;if(t!=null){const r=String(t);if(r.trim().startsWith("<")&&r.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=r,i.firstElementChild}else return document.createTextNode(r)}else return},K=new WeakMap,U=new WeakMap;let n=Y;function He(...e){return new n(...e)}function Pe(e){return new n("a",e)}function Be(e){return new n("abbr",e)}function Re(e){return new n("address",e)}function $e(e){return new n("area",e)}function Ge(e){return new n("article",e)}function Ve(e){return new n("aside",e)}function We(e){return new n("audio",e)}function ze(e){return new n("b",e)}function Ie(e){return new n("base",e)}function Je(e){return new n("bdi",e)}function Ke(e){return new n("bdo",e)}function Ue(e){return new n("blockquote",e)}function Ye(e){return new n("body",e)}function Qe(e){return new n("br",e)}function Xe(e){return new n("button",e)}function Ze(e){return new n("canvas",e)}function _e(e){return new n("caption",e)}function Oe(e){return new n("cite",e)}function je(e){return new n("code",e)}function et(e){return new n("col",e)}function tt(e){return new n("colgroup",e)}function nt(e){return new n("data",e)}function rt(e){return new n("datalist",e)}function it(e){return new n("dd",e)}function ot(e){return new n("del",e)}function st(e){return new n("details",e)}function ut(e){return new n("dfn",e)}function ct(e){return new n("dialog",e)}function at(e){return new n("div",e)}function ft(e){return new n("dl",e)}function lt(e){return new n("dt",e)}function dt(e){return new n("em",e)}function ht(e){return new n("embed",e)}function mt(e){return new n("fieldset",e)}function wt(e){return new n("figcaption",e)}function pt(e){return new n("figure",e)}function bt(e){return new n("footer",e)}function gt(e){return new n("form",e)}function yt(e){return new n("h1",e)}function Et(e){return new n("h2",e)}function St(e){return new n("h3",e)}function Ct(e){return new n("h4",e)}function vt(e){return new n("h5",e)}function Nt(e){return new n("h6",e)}function kt(e){return new n("head",e)}function Tt(e){return new n("header",e)}function Lt(e){return new n("hgroup",e)}function qt(e){return new n("hr",e)}function xt(e){return new n("html",e)}function At(e){return new n("i",e)}function Mt(e){return new n("iframe",e)}function Dt(e){return new n("img",e)}function Ft(e){return new n("input",e)}function Ht(e){return new n("ins",e)}function Pt(e){return new n("kbd",e)}function Bt(e){return new n("label",e)}function Rt(e){return new n("legend",e)}function $t(e){return new n("li",e)}function Gt(e){return new n("link",e)}function Vt(e){return new n("main",e)}function Wt(e){return new n("map",e)}function zt(e){return new n("mark",e)}function It(e){return new n("menu",e)}function Jt(e){return new n("meta",e)}function Kt(e){return new n("meter",e)}function Ut(e){return new n("nav",e)}function Yt(e){return new n("noscript",e)}function Qt(e){return new n("object",e)}function Xt(e){return new n("ol",e)}function Zt(e){return new n("optgroup",e)}function _t(e){return new n("option",e)}function Ot(e){return new n("output",e)}function jt(e){return new n("p",e)}function en(e){return new n("picture",e)}function tn(e){return new n("pre",e)}function nn(e){return new n("progress",e)}function rn(e){return new n("q",e)}function on(e){return new n("rp",e)}function sn(e){return new n("rt",e)}function un(e){return new n("ruby",e)}function cn(e){return new n("s",e)}function an(e){return new n("samp",e)}function fn(e){return new n("script",e)}function ln(e){return new n("search",e)}function dn(e){return new n("section",e)}function hn(e){return new n("select",e)}function mn(e){return new n("slot",e)}function wn(e){return new n("small",e)}function pn(e){return new n("source",e)}function bn(e){return new n("span",e)}function gn(e){return new n("strong",e)}function yn(e){return new n("style",{style:e})}function En(e){return new n("sub",e)}function Sn(e){return new n("summary",e)}function Cn(e){return new n("sup",e)}function vn(e){return new n("table",e)}function Nn(e){return new n("tbody",e)}function kn(e){return new n("td",e)}function Tn(e){return new n("template",e)}function Ln(e){return new n("textarea",e)}function qn(e){return new n("tfoot",e)}function xn(e){return new n("th",e)}function An(e){return new n("thead",e)}function Mn(e){return new n("time",e)}function Dn(e){return new n("title",e)}function Fn(e){return new n("tr",e)}function Hn(e){return new n("track",e)}function Pn(e){return new n("u",e)}function Bn(e){return new n("ul",e)}function Rn(e){return new n("var",e)}function $n(e){return new n("video",e)}function Gn(e){return new n("wbr",e)}function Vn(e){return new n(document.createDocumentFragment(),e)}function Wn(e){return new n(document.createTextNode(""),e)}function zn(e){return new n("div",me(_({},e),{style:_({display:"contents"},e==null?void 0:e.style)}))}exports.ElementConstructor=n;exports.a=Pe;exports.abbr=Be;exports.address=Re;exports.area=$e;exports.article=Ge;exports.aside=Ve;exports.audio=We;exports.b=ze;exports.base=Ie;exports.bdi=Je;exports.bdo=Ke;exports.blockquote=Ue;exports.body=Ye;exports.br=Qe;exports.button=Xe;exports.canvas=Ze;exports.caption=_e;exports.cite=Oe;exports.code=je;exports.col=et;exports.colgroup=tt;exports.contents=zn;exports.data=nt;exports.datalist=rt;exports.dd=it;exports.del=ot;exports.details=st;exports.dfn=ut;exports.dialog=ct;exports.div=at;exports.dl=ft;exports.dt=lt;exports.element=He;exports.em=dt;exports.embed=ht;exports.empty=Wn;exports.fieldset=mt;exports.figcaption=wt;exports.figure=pt;exports.footer=bt;exports.form=gt;exports.fragment=Vn;exports.h1=yt;exports.h2=Et;exports.h3=St;exports.h4=Ct;exports.h5=vt;exports.h6=Nt;exports.head=kt;exports.header=Tt;exports.hgroup=Lt;exports.hr=qt;exports.html=xt;exports.htmlVar=Rn;exports.i=At;exports.iframe=Mt;exports.img=Dt;exports.input=Ft;exports.ins=Ht;exports.kbd=Pt;exports.label=Bt;exports.legend=Rt;exports.li=$t;exports.link=Gt;exports.main=Vt;exports.map=Wt;exports.mark=zt;exports.menu=It;exports.meta=Jt;exports.meter=Kt;exports.nav=Ut;exports.noscript=Yt;exports.object=Qt;exports.ol=Xt;exports.optgroup=Zt;exports.option=_t;exports.output=Ot;exports.p=jt;exports.picture=en;exports.pre=tn;exports.progress=nn;exports.q=rn;exports.rp=on;exports.rt=sn;exports.ruby=un;exports.s=cn;exports.samp=an;exports.script=fn;exports.search=ln;exports.section=dn;exports.select=hn;exports.slot=mn;exports.small=wn;exports.source=pn;exports.span=bn;exports.strong=gn;exports.style=yn;exports.sub=En;exports.summary=Sn;exports.sup=Cn;exports.table=vn;exports.tbody=Nn;exports.td=kn;exports.template=Tn;exports.textarea=Ln;exports.tfoot=qn;exports.th=xn;exports.thead=An;exports.time=Mn;exports.title=Dn;exports.tr=Fn;exports.track=Hn;exports.u=Pn;exports.ul=Bn;exports.video=$n;exports.wbr=Gn;
|
package/lib/theme/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-BQGNOHlY.cjs");const r=require("../browser-CpzFX2xg.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const t=require("../tags-CueX-JLX.cjs"),a=require("../createTheme-BSreUYge.cjs"),e=a.createTheme({colorDark:"#1c1c1c",colorDarkAux:"#282828",colorLight:"#ffffff",colorActive:"#00E5B0",tweakerWidth:"500px",tweakerOffset:"20px",tweakerFolderHeight:"40px",heightInput:"30px",borderRadius:"12px",borderRadiusSmall:"4px",gapLarge:"16px",gapMedium:"12px",gapSmall:"8px",gapExtraSmall:"4px",fontSizeLarge:"20px",fontSizeMedium:"16px",fontSizeSmall:"14px",durationShort:"0.2s"},{prefix:"aptechka-"});r.isBrowser&&document.head.appendChild(t.style({":root":e.style}).node);exports.aptechkaTheme=e;
|
package/lib/theme/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "../Store-
|
|
1
|
+
import "../Store-Cd-E5W1z.js";
|
|
2
2
|
import { i as e } from "../browser-0zX67oeU.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import "../path-data-polyfill-DgeDWYeI.js";
|
|
4
|
+
import { aD as r } from "../tags-BoPv9fDr.js";
|
|
5
|
+
import { c as o } from "../createTheme-u3NsrEV6.js";
|
|
6
|
+
const a = o(
|
|
6
7
|
{
|
|
7
8
|
colorDark: "#1c1c1c",
|
|
8
9
|
colorDarkAux: "#282828",
|
|
@@ -27,9 +28,9 @@ const o = a(
|
|
|
27
28
|
);
|
|
28
29
|
e && document.head.appendChild(
|
|
29
30
|
r({
|
|
30
|
-
":root":
|
|
31
|
+
":root": a.style
|
|
31
32
|
}).node
|
|
32
33
|
);
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
a as aptechkaTheme
|
|
35
36
|
};
|
package/lib/ticker/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var L=(h,s,e)=>{if(!s.has(h))throw TypeError("Cannot "+e)};var i=(h,s,e)=>(L(h,s,"read from private field"),e?e.call(h):s.get(h)),r=(h,s,e)=>{if(s.has(h))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(h):s.set(h,e)},t=(h,s,e,n)=>(L(h,s,"write to private field"),n?n.call(h,e):s.set(h,e),e);var q=(h,s,e)=>(L(h,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("../intersector/index.cjs"),S=require("../browser-CpzFX2xg.cjs");var f,l,y,b,m,u,o,k;class V{constructor(s,e){r(this,f,void 0);r(this,l,void 0);r(this,y,void 0);r(this,b,0);r(this,m,0);r(this,u,0);r(this,o,!1);r(this,k,s=>{t(this,o,s.isIntersecting)});t(this,f,s),t(this,l,e==null?void 0:e.maxFPS),t(this,y,(e==null?void 0:e.order)||0),e!=null&&e.culling&&S.isBrowser?B.intersector.subscribe(e.culling,i(this,k)):t(this,o,!0)}get callback(){return i(this,f)}get order(){return i(this,y)}sync(s){t(this,b,s-i(this,u))}tick(s){if(t(this,u,Math.max(0,s-i(this,b))),i(this,m)||t(this,m,s),i(this,l))if(i(this,u)>=1e3/i(this,l))t(this,b,s-i(this,u)%i(this,l));else return;else t(this,b,s);i(this,o)&&i(this,f).call(this,{elapsed:i(this,u),timestamp:s,startTimestamp:i(this,m)})}destroy(){B.intersector.unsubscribe(i(this,k))}}f=new WeakMap,l=new WeakMap,y=new WeakMap,b=new WeakMap,m=new WeakMap,u=new WeakMap,o=new WeakMap,k=new WeakMap;var F,d,a,g,c,A,P,T,x,v,w;class E{constructor(){r(this,A);r(this,T);r(this,F,0);r(this,d,0);r(this,a,void 0);r(this,g,!1);r(this,c,[]);r(this,v,s=>{if(i(this,g)){t(this,g,!1),t(this,F,s-i(this,d));for(const e of i(this,c))e.sync(i(this,d))}t(this,a,requestAnimationFrame(i(this,v))),t(this,d,s-i(this,F));for(const e of i(this,c))e.tick(i(this,d))});r(this,w,()=>{document.hidden&&t(this,g,!0)});S.isBrowser&&document.addEventListener("visibilitychange",i(this,w))}subscribe(s,e){if(!i(this,c).find(n=>n.callback===s)){const n=new V(s,e);n.sync(performance.now()),i(this,c).push(n),t(this,c,i(this,c).sort((I,M)=>I.order-M.order))}return q(this,A,P).call(this),()=>this.unsubscribe(s)}unsubscribe(s){const e=i(this,c).filter(n=>n.callback===s);e.length&&(e.forEach(n=>n.destroy()),t(this,c,i(this,c).filter(n=>n.callback!==s)),i(this,c).length||q(this,T,x).call(this))}destroy(){S.isBrowser&&(q(this,T,x).call(this),document.removeEventListener("visibilitychange",i(this,w)))}}F=new WeakMap,d=new WeakMap,a=new WeakMap,g=new WeakMap,c=new WeakMap,A=new WeakSet,P=function(){i(this,c).length&&!i(this,a)&&t(this,a,requestAnimationFrame(i(this,v)))},T=new WeakSet,x=function(){i(this,a)&&(cancelAnimationFrame(i(this,a)),t(this,a,void 0))},v=new WeakMap,w=new WeakMap;const j=new E;exports.Ticker=E;exports.ticker=j;
|
|
1
|
+
"use strict";var L=(h,s,e)=>{if(!s.has(h))throw TypeError("Cannot "+e)};var i=(h,s,e)=>(L(h,s,"read from private field"),e?e.call(h):s.get(h)),r=(h,s,e)=>{if(s.has(h))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(h):s.set(h,e)},t=(h,s,e,n)=>(L(h,s,"write to private field"),n?n.call(h,e):s.set(h,e),e);var q=(h,s,e)=>(L(h,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("../intersector/index.cjs"),S=require("../browser-CpzFX2xg.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var f,l,y,b,m,u,o,k;class V{constructor(s,e){r(this,f,void 0);r(this,l,void 0);r(this,y,void 0);r(this,b,0);r(this,m,0);r(this,u,0);r(this,o,!1);r(this,k,s=>{t(this,o,s.isIntersecting)});t(this,f,s),t(this,l,e==null?void 0:e.maxFPS),t(this,y,(e==null?void 0:e.order)||0),e!=null&&e.culling&&S.isBrowser?B.intersector.subscribe(e.culling,i(this,k)):t(this,o,!0)}get callback(){return i(this,f)}get order(){return i(this,y)}sync(s){t(this,b,s-i(this,u))}tick(s){if(t(this,u,Math.max(0,s-i(this,b))),i(this,m)||t(this,m,s),i(this,l))if(i(this,u)>=1e3/i(this,l))t(this,b,s-i(this,u)%i(this,l));else return;else t(this,b,s);i(this,o)&&i(this,f).call(this,{elapsed:i(this,u),timestamp:s,startTimestamp:i(this,m)})}destroy(){B.intersector.unsubscribe(i(this,k))}}f=new WeakMap,l=new WeakMap,y=new WeakMap,b=new WeakMap,m=new WeakMap,u=new WeakMap,o=new WeakMap,k=new WeakMap;var F,d,a,g,c,A,P,T,x,v,w;class E{constructor(){r(this,A);r(this,T);r(this,F,0);r(this,d,0);r(this,a,void 0);r(this,g,!1);r(this,c,[]);r(this,v,s=>{if(i(this,g)){t(this,g,!1),t(this,F,s-i(this,d));for(const e of i(this,c))e.sync(i(this,d))}t(this,a,requestAnimationFrame(i(this,v))),t(this,d,s-i(this,F));for(const e of i(this,c))e.tick(i(this,d))});r(this,w,()=>{document.hidden&&t(this,g,!0)});S.isBrowser&&document.addEventListener("visibilitychange",i(this,w))}subscribe(s,e){if(!i(this,c).find(n=>n.callback===s)){const n=new V(s,e);n.sync(performance.now()),i(this,c).push(n),t(this,c,i(this,c).sort((I,M)=>I.order-M.order))}return q(this,A,P).call(this),()=>this.unsubscribe(s)}unsubscribe(s){const e=i(this,c).filter(n=>n.callback===s);e.length&&(e.forEach(n=>n.destroy()),t(this,c,i(this,c).filter(n=>n.callback!==s)),i(this,c).length||q(this,T,x).call(this))}destroy(){S.isBrowser&&(q(this,T,x).call(this),document.removeEventListener("visibilitychange",i(this,w)))}}F=new WeakMap,d=new WeakMap,a=new WeakMap,g=new WeakMap,c=new WeakMap,A=new WeakSet,P=function(){i(this,c).length&&!i(this,a)&&t(this,a,requestAnimationFrame(i(this,v)))},T=new WeakSet,x=function(){i(this,a)&&(cancelAnimationFrame(i(this,a)),t(this,a,void 0))},v=new WeakMap,w=new WeakMap;const j=new E;exports.Ticker=E;exports.ticker=j;
|
package/lib/ticker/index.js
CHANGED
|
@@ -10,6 +10,7 @@ var i = (h, s, t) => (x(h, s, "read from private field"), t ? t.call(h) : s.get(
|
|
|
10
10
|
var L = (h, s, t) => (x(h, s, "access private method"), t);
|
|
11
11
|
import { intersector as S } from "../intersector/index.js";
|
|
12
12
|
import { i as q } from "../browser-0zX67oeU.js";
|
|
13
|
+
import "../path-data-polyfill-DgeDWYeI.js";
|
|
13
14
|
var b, u, y, f, d, l, o, F;
|
|
14
15
|
class B {
|
|
15
16
|
constructor(s, t) {
|
|
@@ -108,8 +109,8 @@ k = new WeakMap(), m = new WeakMap(), a = new WeakMap(), g = new WeakMap(), c =
|
|
|
108
109
|
}, v = new WeakSet(), E = function() {
|
|
109
110
|
i(this, a) && (cancelAnimationFrame(i(this, a)), e(this, a, void 0));
|
|
110
111
|
}, T = new WeakMap(), A = new WeakMap();
|
|
111
|
-
const
|
|
112
|
+
const z = new C();
|
|
112
113
|
export {
|
|
113
114
|
C as Ticker,
|
|
114
|
-
|
|
115
|
+
z as ticker
|
|
115
116
|
};
|
package/lib/tweaker/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var ce=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var u=(t,e,r)=>(ce(t,e,"read from private field"),r?r.call(t):e.get(t)),z=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},$=(t,e,r,n)=>(ce(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);const we=require("../browser-CpzFX2xg.cjs"),v=require("../custom-element/index.cjs"),d=require("../Store-C-1ruEIm.cjs"),me=require("../file-EevnUtRj.cjs"),ke=require("../function-MthRj-GJ.cjs"),h=require("../tags-Djb6mb1o.cjs"),m=require("../createStylesheet-CqHU9_qv.cjs"),be=require("../Viewport-DAjFJF5V.cjs"),s=require("../theme/index.cjs"),_e=require("../accordion/index.cjs"),Se=require("../index-Bv5vIuF-.cjs"),ye=require("../events-Crwi8fz6.cjs");require("../checkbox/index.cjs");const Te=require("../math-GDWEqu7y.cjs"),de='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',pe='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',Ce='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',xe='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>';var x,w;class $e{constructor(){z(this,x,"");z(this,w,[]);$(this,x,d.storeRegistry.projectName+"-studio")}openPanel(e){u(this,w).includes(e)||u(this,w).push(e)}closePanel(e){$(this,w,u(this,w).filter(r=>r!==e))}isPanelOpened(e){return u(this,w).includes(e)}save(){const e={openedPanels:u(this,w)};localStorage.setItem(u(this,x),JSON.stringify(e)),d.storeRegistry.saveState()}load(){d.storeRegistry.loadState();const e=localStorage.getItem(u(this,x));if(e)try{const r=JSON.parse(e);r.openedPanels&&$(this,w,r.openedPanels)}catch(r){console.error(r)}}}x=new WeakMap,w=new WeakMap;const C=new $e;var _;class F extends v.CustomElement{constructor(...r){super();z(this,_,void 0);$(this,_,r)}addStore(r){u(this,_).push(r)}get firstStore(){return u(this,_)[0]}get stores(){return u(this,_)}updateStores(r){u(this,_).forEach(n=>{n.current=r})}}_=new WeakMap;var Pe=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,Me=(t,e,r,n)=>{for(var a=n>1?void 0:n?Oe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Pe(e,r,a),a};const Ee=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{padding:"0",margin:"0",width:`calc(${s.aptechkaTheme.heightInput.var} * 0.5)`,height:`calc(${s.aptechkaTheme.heightInput.var} * 0.5)`,borderRadius:s.aptechkaTheme.borderRadius.var,overflow:"hidden",accentColor:s.aptechkaTheme.colorLight.var}});let re=class extends F{constructor(...t){super(...t),this.openShadow(Ee),h.element(this,{children:[h.element("e-checkbox",{onChange:e=>{this.updateStores(e.currentTarget.checked)},ref:e=>{this.firstStore.subscribe(r=>{e.checked=r.current})}})]})}};re=Me([v.define("e-tweaker-boolean-manager")],re);var Re=Object.defineProperty,De=Object.getOwnPropertyDescriptor,We=(t,e,r,n)=>{for(var a=n>1?void 0:n?De(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Re(e,r,a),a};const Le=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:s.aptechkaTheme.heightInput.var,padding:"0",background:"none",borderRadius:s.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:s.aptechkaTheme.borderRadius.var,height:`calc(${s.aptechkaTheme.heightInput.var} * 0.93)`}});let ae=class extends F{constructor(...t){super(...t),this.openShadow(Le),h.element(this,{children:[h.input({type:"color",value:this.firstStore,onInput:e=>{this.updateStores(e.currentTarget.value)}})]})}};ae=We([v.define("e-tweaker-color-manager")],ae);var Ie=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,Ae=(t,e,r,n)=>{for(var a=n>1?void 0:n?Fe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Ie(e,r,a),a};const ze=m.createStylesheet({a:{color:"inherit"}});let ne=class extends F{constructor(...t){var e,r;super(...t),this.openShadow(ze),h.element(this,{children:[h.a({href:this.firstStore,target:(r=(e=this.firstStore.passport)==null?void 0:e.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}};ne=Ae([v.define("e-tweaker-link-manager")],ne);var qe=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,He=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ne(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&qe(e,r,a),a},Ze=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},j=(t,e,r)=>(Ze(t,e,"read from private field"),r?r.call(t):e.get(t)),Ke=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},P;const Ge=m.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:s.aptechkaTheme.fontSizeSmall.var},".text-input":{height:s.aptechkaTheme.heightInput.var,width:"100%",margin:"0",padding:`0 ${s.aptechkaTheme.gapSmall.var}`,backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var}});let Q=class extends F{constructor(...t){super(...t),Ke(this,P,new d.Store([])),this.openShadow(Ge),h.element(this,{children:[h.input({class:"text-input",type:"string",value:this.firstStore,onChange:e=>{this.updateStores(e.currentTarget.value)}}),j(this,P)]})}appendContent(t){j(this,P).current=[...j(this,P).current,t]}};P=new WeakMap;Q=He([v.define("e-tweaker-string-manager")],Q);var Ve=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,Ye=(t,e,r,n)=>{for(var a=n>1?void 0:n?Je(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Ve(e,r,a),a},ue=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},b=(t,e,r)=>(ue(t,e,"read from private field"),r?r.call(t):e.get(t)),q=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},ee=(t,e,r,n)=>(ue(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),O,M,E,H;let U=class extends Q{constructor(...t){var e,r,n,a,o,i;super(...t),q(this,O,void 0),q(this,M,void 0),q(this,E,void 0),q(this,H,k=>{const A=typeof k=="string"?parseFloat(k)||this.min:k,fe=Te.clamp(A,b(this,M),b(this,E));return this.toFixed(fe)}),ee(this,M,((r=(e=this.firstStore.passport)==null?void 0:e.manager)==null?void 0:r.min)||0),ee(this,E,((a=(n=this.firstStore.passport)==null?void 0:n.manager)==null?void 0:a.max)||1),ee(this,O,((i=(o=this.firstStore.passport)==null?void 0:o.manager)==null?void 0:i.step)||.01)}get min(){return b(this,M)}get max(){return b(this,E)}get step(){return b(this,O)}toFixed(t){var r;const e=((r=b(this,O).toString().split(".")[1])==null?void 0:r.length)||0;return e?+t.toFixed(e):Math.ceil(t)}connectedCallback(){this.firstStore.addMiddleware(b(this,H))}disconnectedCallback(){this.firstStore.removeMiddleware(b(this,H))}};O=new WeakMap;M=new WeakMap;E=new WeakMap;H=new WeakMap;U=Ye([v.define("e-tweaker-number-manager")],U);var Be=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,Ue=(t,e,r,n)=>{for(var a=n>1?void 0:n?Qe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Be(e,r,a),a};const Xe=m.createStylesheet({":host":{width:"100%"},".text-input":{width:"60px",marginRight:s.aptechkaTheme.gapLarge.var,textAlign:"center"},".range-input":{boxSizing:"border-box","-webkit-appearance":"none",height:"8px",width:"100%",margin:"0",padding:"0",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var},".range-input::-webkit-slider-thumb":{"-webkit-appearance":"none",height:`calc(${s.aptechkaTheme.heightInput.var} * 0.7)`,width:s.aptechkaTheme.borderRadius.var,borderRadius:s.aptechkaTheme.borderRadius.var,backgroundColor:s.aptechkaTheme.colorLight.var,transitionProperty:"background-color",transitionDuration:s.aptechkaTheme.durationShort.var},".range-input:focus::-webkit-slider-thumb":{backgroundColor:s.aptechkaTheme.colorActive.var},".range-input::-webkit-slider-runnable-track":{"-webkit-appearance":"none","box-shadow":"none",border:"none",background:"transparent"}});let ie=class extends U{constructor(...t){super(...t),this.addStylesheet(Xe),this.appendContent(h.input({class:"range-input",type:"range",min:this.min,max:this.max,step:this.step,value:this.firstStore,onInput:e=>{this.updateStores(parseFloat(e.currentTarget.value))}}))}};ie=Ue([v.define("e-tweaker-range-manager")],ie);var je=Object.defineProperty,et=Object.getOwnPropertyDescriptor,tt=(t,e,r,n)=>{for(var a=n>1?void 0:n?et(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&je(e,r,a),a};const rt=m.createStylesheet({"e-select":{width:"100%","--arrow-color":s.aptechkaTheme.colorLight.var},"e-select-head":{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},"e-select-option":{transitionDuration:s.aptechkaTheme.durationShort.var,transitionProperty:"color"},"e-select-option:hover":{color:s.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:s.aptechkaTheme.colorLight.var,transitionProperty:"transform",transitionDuration:s.aptechkaTheme.durationShort.var},".opened svg":{transform:"scaleY(-1)"}});let se=class extends F{constructor(...t){var r,n;super(...t),this.openShadow(rt);const e=((n=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:n.variants)||[];h.element(this,{children:h.element("e-select",{value:this.firstStore,onChange:a=>{this.updateStores(a.currentTarget.value)},lightChildren:[h.element("e-select-head",{lightChildren:[h.span({"data-value-holder":""})]}),...e.map((a,o)=>h.element("e-select-option",{lightChildren:a,default:o===0?!0:null}))]})})}};se=tt([v.define("e-tweaker-select-manager")],se);const at={boolean:re,color:ae,link:ne,number:U,range:ie,select:se,string:Q};var nt=Object.defineProperty,it=Object.getOwnPropertyDescriptor,st=(t,e,r,n)=>{for(var a=n>1?void 0:n?it(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&nt(e,r,a),a},ve=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},l=(t,e,r)=>(ve(t,e,"read from private field"),r?r.call(t):e.get(t)),S=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},y=(t,e,r,n)=>(ve(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),g,R,D,W,L,Z,K;const ot=m.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.4fr 1fr",alignItems:"center",color:s.aptechkaTheme.colorLight.var,gap:s.aptechkaTheme.gapMedium.var},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:s.aptechkaTheme.fontSizeMedium.var,display:"flex",alignItems:"center",gap:s.aptechkaTheme.gapExtraSmall.var},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:s.aptechkaTheme.colorLight.var,transitionDuration:s.aptechkaTheme.durationShort.var,transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:s.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});let X=class extends v.CustomElement{constructor(t){var r,n,a,o;super(),S(this,g,[]),S(this,R,void 0),S(this,D,void 0),S(this,W,!1),S(this,L,void 0),S(this,Z,()=>{d.activeStores.current.find(i=>l(this,g).includes(i))||this.remove()}),S(this,K,i=>{l(this,W)&&((i.metaKey||i.ctrlKey)&&i.code==="KeyC"?navigator.clipboard.writeText(l(this,g)[0].current):(i.metaKey||i.ctrlKey)&&i.code==="KeyR"&&(l(this,g).forEach(k=>{k.reset()}),i.preventDefault()))}),y(this,g,[t.store]),y(this,R,t.store.passport.name),y(this,D,l(this,R).split(".").slice(-1).toString());const e=((n=(r=t.store.passport)==null?void 0:r.manager)==null?void 0:n.type)||"string";y(this,L,new at[e](l(this,g)[0])),this.openShadow(ot),h.element(this,{class:{disabled:((o=(a=t.store.passport)==null?void 0:a.manager)==null?void 0:o.disabled)||!1},onPointerleave:()=>{y(this,W,!1)},onPointerenter:()=>{y(this,W,!0)},children:[h.div({class:"head",children:[h.div({class:"name",children:l(this,D)+":"}),h.div({class:"head-buttons",children:[h.button({class:"head-button",children:pe,onClick:()=>{navigator.clipboard.writeText(l(this,g)[0].current)}}),h.button({class:"head-button",children:de,onClick:()=>{l(this,g).forEach(i=>{i.reset()})}})]})]}),l(this,L)]})}get key(){return l(this,R)}get name(){return l(this,D)}get stores(){return l(this,g)}addStore(t){l(this,L).addStore(t)}connectedCallback(){d.activeStores.subscribe(l(this,Z)),addEventListener("keydown",l(this,K)),ye.dispatchSizeChangeEvent(this)}disconnectedCallback(){d.activeStores.unsubscribe(l(this,Z)),removeEventListener("keydown",l(this,K))}};g=new WeakMap;R=new WeakMap;D=new WeakMap;W=new WeakMap;L=new WeakMap;Z=new WeakMap;K=new WeakMap;X=st([v.define("e-tweaker-field")],X);var ht=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,lt=(t,e,r,n)=>{for(var a=n>1?void 0:n?ct(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&ht(e,r,a),a},ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},c=(t,e,r)=>(ge(t,e,"read from private field"),r?r.call(t):e.get(t)),T=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},te=(t,e,r,n)=>(ge(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),f,G,p,V,J,oe;const dt=m.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:s.aptechkaTheme.tweakerFolderHeight.var,paddingLeft:s.aptechkaTheme.gapMedium.var,paddingRight:s.aptechkaTheme.gapMedium.var,display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:s.aptechkaTheme.colorDarkAux.var,borderRadius:s.aptechkaTheme.borderRadius.var},".name":{fontSize:s.aptechkaTheme.fontSizeLarge.var,color:s.aptechkaTheme.colorLight.var},".body":{transitionProperty:"height",transitionDuration:s.aptechkaTheme.durationShort.var,overflow:"hidden",height:"0px"},".body-content":{boxSizing:"border-box",padding:s.aptechkaTheme.gapLarge.var,display:"grid",gap:s.aptechkaTheme.gapMedium.var},".arrow":{width:"20px",height:"20px",fill:s.aptechkaTheme.colorLight.var,transition:`transform ${s.aptechkaTheme.durationShort.var}`},".opened .arrow":{transform:"scaleY(-1)"}});let I=class extends _e.AccordionElement{constructor(t){super(),T(this,f,void 0),T(this,G,new d.Store(null)),T(this,p,new d.Store([])),T(this,V,void 0),T(this,J,null),T(this,oe,e=>{let r=[],n=[];e.forEach(a=>{r=[...r,...a.removedNodes],n=[...n,...a.addedNodes]}),c(this,p).current=c(this,p).current.filter(a=>!r.includes(a)),c(this,f)&&!c(this,p).current.length&&!n.length&&this.remove()}),this.openShadow(dt),te(this,f,t.key),te(this,V,new MutationObserver(c(this,oe))),h.element(this,{onAccordionItemToggle:e=>{e.stopPropagation(),e.detail.opened?C.openPanel(c(this,f)):C.closePanel(c(this,f))},children:[h.div({class:"wrapper",children:[h.div({class:"head",children:[c(this,f)?h.div({class:"name",children:[c(this,f).split(".").slice(-1).toString()]}):null,c(this,G),h.element(Se.arrowIcon,{class:"arrow"})]}),h.div({class:"body",children:h.div({class:"body-content",children:c(this,p),ref:e=>te(this,J,e.firstElementChild)})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return c(this,f)}get head(){return c(this,G)}get content(){return c(this,p)}connectedCallback(){super.connectedCallback(),setTimeout(()=>{C.isPanelOpened(c(this,f))&&this.openAll({skipTransition:!0})},50),c(this,V).observe(c(this,J),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const r=t.store.passport.name.split("."),n=r.slice(0,r.length-t.remainingFolders.length).join("."),a=c(this,p).current.find(o=>o.key===n);a instanceof I?a.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):c(this,p).current=[...c(this,p).current,new I({key:n,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const e=c(this,p).current.find(r=>r.key===t.store.passport.name);e instanceof X?e.addStore(t.store):c(this,p).current=[...c(this,p).current,new X({store:t.store})]}}};f=new WeakMap;G=new WeakMap;p=new WeakMap;V=new WeakMap;J=new WeakMap;oe=new WeakMap;I=lt([v.define("e-tweaker-folder")],I);var pt=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,vt=(t,e,r,n)=>{for(var a=n>1?void 0:n?ut(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&pt(e,r,a),a},gt=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},N=(t,e,r)=>(gt(t,e,"read from private field"),r?r.call(t):e.get(t)),le=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Y,B;const ft=m.createStylesheet({":host":{fontFamily:"sans-serif",position:"absolute",top:s.aptechkaTheme.tweakerOffset.var,right:s.aptechkaTheme.tweakerOffset.var,width:s.aptechkaTheme.tweakerWidth.var,backgroundColor:s.aptechkaTheme.colorDark.var,borderRadius:s.aptechkaTheme.borderRadius.var,transition:"opacity 0.2s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:s.aptechkaTheme.gapExtraSmall.var},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:s.aptechkaTheme.colorLight.var,transitionProperty:"fill",transitionDuration:s.aptechkaTheme.durationShort.var},".tweaker-button:hover":{fill:s.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
1
|
+
"use strict";var ce=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var u=(t,e,r)=>(ce(t,e,"read from private field"),r?r.call(t):e.get(t)),q=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},$=(t,e,r,n)=>(ce(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);const we=require("../browser-CpzFX2xg.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const v=require("../custom-element/index.cjs"),d=require("../Store-BQGNOHlY.cjs"),me=require("../file-EevnUtRj.cjs"),ke=require("../function-MthRj-GJ.cjs"),h=require("../tags-CueX-JLX.cjs"),m=require("../createStylesheet-C8aQQ4hd.cjs"),be=require("../Viewport-_WllZTJ0.cjs"),s=require("../theme/index.cjs"),_e=require("../accordion/index.cjs"),Se=require("../index-nxoux28n.cjs"),ye=require("../events-Crwi8fz6.cjs");require("../checkbox/index.cjs");const Te=require("../math-GDWEqu7y.cjs"),de='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',pe='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',Ce='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',xe='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>';var x,w;class $e{constructor(){q(this,x,"");q(this,w,[]);$(this,x,d.storeRegistry.projectName+"-studio")}openPanel(e){u(this,w).includes(e)||u(this,w).push(e)}closePanel(e){$(this,w,u(this,w).filter(r=>r!==e))}isPanelOpened(e){return u(this,w).includes(e)}save(){const e={openedPanels:u(this,w)};localStorage.setItem(u(this,x),JSON.stringify(e)),d.storeRegistry.saveState()}load(){d.storeRegistry.loadState();const e=localStorage.getItem(u(this,x));if(e)try{const r=JSON.parse(e);r.openedPanels&&$(this,w,r.openedPanels)}catch(r){console.error(r)}}}x=new WeakMap,w=new WeakMap;const C=new $e;var _;class F extends v.CustomElement{constructor(...r){super();q(this,_,void 0);$(this,_,r)}addStore(r){u(this,_).push(r)}get firstStore(){return u(this,_)[0]}get stores(){return u(this,_)}updateStores(r){u(this,_).forEach(n=>{n.current=r})}}_=new WeakMap;var Pe=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,Me=(t,e,r,n)=>{for(var a=n>1?void 0:n?Oe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Pe(e,r,a),a};const Ee=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{padding:"0",margin:"0",width:`calc(${s.aptechkaTheme.heightInput.var} * 0.5)`,height:`calc(${s.aptechkaTheme.heightInput.var} * 0.5)`,borderRadius:s.aptechkaTheme.borderRadius.var,overflow:"hidden",accentColor:s.aptechkaTheme.colorLight.var}});let re=class extends F{constructor(...t){super(...t),this.openShadow(Ee),h.element(this,{children:[h.element("e-checkbox",{onChange:e=>{this.updateStores(e.currentTarget.checked)},ref:e=>{this.firstStore.subscribe(r=>{e.checked=r.current})}})]})}};re=Me([v.define("e-tweaker-boolean-manager")],re);var Re=Object.defineProperty,De=Object.getOwnPropertyDescriptor,We=(t,e,r,n)=>{for(var a=n>1?void 0:n?De(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Re(e,r,a),a};const Le=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:s.aptechkaTheme.heightInput.var,padding:"0",background:"none",borderRadius:s.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:s.aptechkaTheme.borderRadius.var,height:`calc(${s.aptechkaTheme.heightInput.var} * 0.93)`}});let ae=class extends F{constructor(...t){super(...t),this.openShadow(Le),h.element(this,{children:[h.input({type:"color",value:this.firstStore,onInput:e=>{this.updateStores(e.currentTarget.value)}})]})}};ae=We([v.define("e-tweaker-color-manager")],ae);var Ie=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,Ae=(t,e,r,n)=>{for(var a=n>1?void 0:n?Fe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Ie(e,r,a),a};const qe=m.createStylesheet({a:{color:"inherit"}});let ne=class extends F{constructor(...t){var e,r;super(...t),this.openShadow(qe),h.element(this,{children:[h.a({href:this.firstStore,target:(r=(e=this.firstStore.passport)==null?void 0:e.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}};ne=Ae([v.define("e-tweaker-link-manager")],ne);var ze=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,He=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ne(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&ze(e,r,a),a},Ze=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},j=(t,e,r)=>(Ze(t,e,"read from private field"),r?r.call(t):e.get(t)),Ke=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},P;const Ge=m.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:s.aptechkaTheme.fontSizeSmall.var},".text-input":{height:s.aptechkaTheme.heightInput.var,width:"100%",margin:"0",padding:`0 ${s.aptechkaTheme.gapSmall.var}`,backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var}});let Q=class extends F{constructor(...t){super(...t),Ke(this,P,new d.Store([])),this.openShadow(Ge),h.element(this,{children:[h.input({class:"text-input",type:"string",value:this.firstStore,onChange:e=>{this.updateStores(e.currentTarget.value)}}),j(this,P)]})}appendContent(t){j(this,P).current=[...j(this,P).current,t]}};P=new WeakMap;Q=He([v.define("e-tweaker-string-manager")],Q);var Ve=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,Ye=(t,e,r,n)=>{for(var a=n>1?void 0:n?Je(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Ve(e,r,a),a},ue=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},b=(t,e,r)=>(ue(t,e,"read from private field"),r?r.call(t):e.get(t)),z=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},ee=(t,e,r,n)=>(ue(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),O,M,E,H;let U=class extends Q{constructor(...t){var e,r,n,a,o,i;super(...t),z(this,O,void 0),z(this,M,void 0),z(this,E,void 0),z(this,H,k=>{const A=typeof k=="string"?parseFloat(k)||this.min:k,fe=Te.clamp(A,b(this,M),b(this,E));return this.toFixed(fe)}),ee(this,M,((r=(e=this.firstStore.passport)==null?void 0:e.manager)==null?void 0:r.min)||0),ee(this,E,((a=(n=this.firstStore.passport)==null?void 0:n.manager)==null?void 0:a.max)||1),ee(this,O,((i=(o=this.firstStore.passport)==null?void 0:o.manager)==null?void 0:i.step)||.01)}get min(){return b(this,M)}get max(){return b(this,E)}get step(){return b(this,O)}toFixed(t){var r;const e=((r=b(this,O).toString().split(".")[1])==null?void 0:r.length)||0;return e?+t.toFixed(e):Math.ceil(t)}connectedCallback(){this.firstStore.addMiddleware(b(this,H))}disconnectedCallback(){this.firstStore.removeMiddleware(b(this,H))}};O=new WeakMap;M=new WeakMap;E=new WeakMap;H=new WeakMap;U=Ye([v.define("e-tweaker-number-manager")],U);var Be=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,Ue=(t,e,r,n)=>{for(var a=n>1?void 0:n?Qe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Be(e,r,a),a};const Xe=m.createStylesheet({":host":{width:"100%"},".text-input":{width:"60px",marginRight:s.aptechkaTheme.gapLarge.var,textAlign:"center"},".range-input":{boxSizing:"border-box","-webkit-appearance":"none",height:"8px",width:"100%",margin:"0",padding:"0",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var},".range-input::-webkit-slider-thumb":{"-webkit-appearance":"none",height:`calc(${s.aptechkaTheme.heightInput.var} * 0.7)`,width:s.aptechkaTheme.borderRadius.var,borderRadius:s.aptechkaTheme.borderRadius.var,backgroundColor:s.aptechkaTheme.colorLight.var,transitionProperty:"background-color",transitionDuration:s.aptechkaTheme.durationShort.var},".range-input:focus::-webkit-slider-thumb":{backgroundColor:s.aptechkaTheme.colorActive.var},".range-input::-webkit-slider-runnable-track":{"-webkit-appearance":"none","box-shadow":"none",border:"none",background:"transparent"}});let ie=class extends U{constructor(...t){super(...t),this.addStylesheet(Xe),this.appendContent(h.input({class:"range-input",type:"range",min:this.min,max:this.max,step:this.step,value:this.firstStore,onInput:e=>{this.updateStores(parseFloat(e.currentTarget.value))}}))}};ie=Ue([v.define("e-tweaker-range-manager")],ie);var je=Object.defineProperty,et=Object.getOwnPropertyDescriptor,tt=(t,e,r,n)=>{for(var a=n>1?void 0:n?et(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&je(e,r,a),a};const rt=m.createStylesheet({"e-select":{width:"100%","--arrow-color":s.aptechkaTheme.colorLight.var},"e-select-head":{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},"e-select-option":{transitionDuration:s.aptechkaTheme.durationShort.var,transitionProperty:"color"},"e-select-option:hover":{color:s.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:s.aptechkaTheme.colorLight.var,transitionProperty:"transform",transitionDuration:s.aptechkaTheme.durationShort.var},".opened svg":{transform:"scaleY(-1)"}});let se=class extends F{constructor(...t){var r,n;super(...t),this.openShadow(rt);const e=((n=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:n.variants)||[];h.element(this,{children:h.element("e-select",{value:this.firstStore,onChange:a=>{this.updateStores(a.currentTarget.value)},lightChildren:[h.element("e-select-head",{lightChildren:[h.span({"data-value-holder":""})]}),...e.map((a,o)=>h.element("e-select-option",{lightChildren:a,default:o===0?!0:null}))]})})}};se=tt([v.define("e-tweaker-select-manager")],se);const at={boolean:re,color:ae,link:ne,number:U,range:ie,select:se,string:Q};var nt=Object.defineProperty,it=Object.getOwnPropertyDescriptor,st=(t,e,r,n)=>{for(var a=n>1?void 0:n?it(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&nt(e,r,a),a},ve=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},l=(t,e,r)=>(ve(t,e,"read from private field"),r?r.call(t):e.get(t)),S=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},y=(t,e,r,n)=>(ve(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),g,R,D,W,L,Z,K;const ot=m.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.4fr 1fr",alignItems:"center",color:s.aptechkaTheme.colorLight.var,gap:s.aptechkaTheme.gapMedium.var},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:s.aptechkaTheme.fontSizeMedium.var,display:"flex",alignItems:"center",gap:s.aptechkaTheme.gapExtraSmall.var},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:s.aptechkaTheme.colorLight.var,transitionDuration:s.aptechkaTheme.durationShort.var,transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:s.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});let X=class extends v.CustomElement{constructor(t){var r,n,a,o;super(),S(this,g,[]),S(this,R,void 0),S(this,D,void 0),S(this,W,!1),S(this,L,void 0),S(this,Z,()=>{d.activeStores.current.find(i=>l(this,g).includes(i))||this.remove()}),S(this,K,i=>{l(this,W)&&((i.metaKey||i.ctrlKey)&&i.code==="KeyC"?navigator.clipboard.writeText(l(this,g)[0].current):(i.metaKey||i.ctrlKey)&&i.code==="KeyR"&&(l(this,g).forEach(k=>{k.reset()}),i.preventDefault()))}),y(this,g,[t.store]),y(this,R,t.store.passport.name),y(this,D,l(this,R).split(".").slice(-1).toString());const e=((n=(r=t.store.passport)==null?void 0:r.manager)==null?void 0:n.type)||"string";y(this,L,new at[e](l(this,g)[0])),this.openShadow(ot),h.element(this,{class:{disabled:((o=(a=t.store.passport)==null?void 0:a.manager)==null?void 0:o.disabled)||!1},onPointerleave:()=>{y(this,W,!1)},onPointerenter:()=>{y(this,W,!0)},children:[h.div({class:"head",children:[h.div({class:"name",children:l(this,D)+":"}),h.div({class:"head-buttons",children:[h.button({class:"head-button",children:pe,onClick:()=>{navigator.clipboard.writeText(l(this,g)[0].current)}}),h.button({class:"head-button",children:de,onClick:()=>{l(this,g).forEach(i=>{i.reset()})}})]})]}),l(this,L)]})}get key(){return l(this,R)}get name(){return l(this,D)}get stores(){return l(this,g)}addStore(t){l(this,L).addStore(t)}connectedCallback(){d.activeStores.subscribe(l(this,Z)),addEventListener("keydown",l(this,K)),ye.dispatchSizeChangeEvent(this)}disconnectedCallback(){d.activeStores.unsubscribe(l(this,Z)),removeEventListener("keydown",l(this,K))}};g=new WeakMap;R=new WeakMap;D=new WeakMap;W=new WeakMap;L=new WeakMap;Z=new WeakMap;K=new WeakMap;X=st([v.define("e-tweaker-field")],X);var ht=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,lt=(t,e,r,n)=>{for(var a=n>1?void 0:n?ct(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&ht(e,r,a),a},ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},c=(t,e,r)=>(ge(t,e,"read from private field"),r?r.call(t):e.get(t)),T=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},te=(t,e,r,n)=>(ge(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),f,G,p,V,J,oe;const dt=m.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:s.aptechkaTheme.tweakerFolderHeight.var,paddingLeft:s.aptechkaTheme.gapMedium.var,paddingRight:s.aptechkaTheme.gapMedium.var,display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:s.aptechkaTheme.colorDarkAux.var,borderRadius:s.aptechkaTheme.borderRadius.var},".name":{fontSize:s.aptechkaTheme.fontSizeLarge.var,color:s.aptechkaTheme.colorLight.var},".body":{transitionProperty:"height",transitionDuration:s.aptechkaTheme.durationShort.var,overflow:"hidden",height:"0px"},".body-content":{boxSizing:"border-box",padding:s.aptechkaTheme.gapLarge.var,display:"grid",gap:s.aptechkaTheme.gapMedium.var},".arrow":{width:"20px",height:"20px",fill:s.aptechkaTheme.colorLight.var,transition:`transform ${s.aptechkaTheme.durationShort.var}`},".opened .arrow":{transform:"scaleY(-1)"}});let I=class extends _e.AccordionElement{constructor(t){super(),T(this,f,void 0),T(this,G,new d.Store(null)),T(this,p,new d.Store([])),T(this,V,void 0),T(this,J,null),T(this,oe,e=>{let r=[],n=[];e.forEach(a=>{r=[...r,...a.removedNodes],n=[...n,...a.addedNodes]}),c(this,p).current=c(this,p).current.filter(a=>!r.includes(a)),c(this,f)&&!c(this,p).current.length&&!n.length&&this.remove()}),this.openShadow(dt),te(this,f,t.key),te(this,V,new MutationObserver(c(this,oe))),h.element(this,{onAccordionItemToggle:e=>{e.stopPropagation(),e.detail.opened?C.openPanel(c(this,f)):C.closePanel(c(this,f))},children:[h.div({class:"wrapper",children:[h.div({class:"head",children:[c(this,f)?h.div({class:"name",children:[c(this,f).split(".").slice(-1).toString()]}):null,c(this,G),h.element(Se.arrowIcon,{class:"arrow"})]}),h.div({class:"body",children:h.div({class:"body-content",children:c(this,p),ref:e=>te(this,J,e.firstElementChild)})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return c(this,f)}get head(){return c(this,G)}get content(){return c(this,p)}connectedCallback(){super.connectedCallback(),setTimeout(()=>{C.isPanelOpened(c(this,f))&&this.openAll({skipTransition:!0})},50),c(this,V).observe(c(this,J),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const r=t.store.passport.name.split("."),n=r.slice(0,r.length-t.remainingFolders.length).join("."),a=c(this,p).current.find(o=>o.key===n);a instanceof I?a.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):c(this,p).current=[...c(this,p).current,new I({key:n,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const e=c(this,p).current.find(r=>r.key===t.store.passport.name);e instanceof X?e.addStore(t.store):c(this,p).current=[...c(this,p).current,new X({store:t.store})]}}};f=new WeakMap;G=new WeakMap;p=new WeakMap;V=new WeakMap;J=new WeakMap;oe=new WeakMap;I=lt([v.define("e-tweaker-folder")],I);var pt=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,vt=(t,e,r,n)=>{for(var a=n>1?void 0:n?ut(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&pt(e,r,a),a},gt=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},N=(t,e,r)=>(gt(t,e,"read from private field"),r?r.call(t):e.get(t)),le=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Y,B;const ft=m.createStylesheet({":host":{fontFamily:"sans-serif",position:"absolute",top:s.aptechkaTheme.tweakerOffset.var,right:s.aptechkaTheme.tweakerOffset.var,width:s.aptechkaTheme.tweakerWidth.var,backgroundColor:s.aptechkaTheme.colorDark.var,borderRadius:s.aptechkaTheme.borderRadius.var,transition:"opacity 0.2s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:s.aptechkaTheme.gapExtraSmall.var},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:s.aptechkaTheme.colorLight.var,transitionProperty:"fill",transitionDuration:s.aptechkaTheme.durationShort.var},".tweaker-button:hover":{fill:s.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
2
2
|
100dvh -
|
|
3
3
|
(
|
|
4
4
|
${s.aptechkaTheme.tweakerOffset.var} * 2 +
|
package/lib/tweaker/index.js
CHANGED
|
@@ -8,16 +8,17 @@ var d = (t, e, r) => (ve(t, e, "read from private field"), r ? r.call(t) : e.get
|
|
|
8
8
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
9
9
|
}, M = (t, e, r, n) => (ve(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r);
|
|
10
10
|
import { i as Ce } from "../browser-0zX67oeU.js";
|
|
11
|
+
import "../path-data-polyfill-DgeDWYeI.js";
|
|
11
12
|
import { CustomElement as fe, define as f } from "../custom-element/index.js";
|
|
12
|
-
import { s as S, S as se, a as $ } from "../Store-
|
|
13
|
+
import { s as S, S as se, a as $ } from "../Store-Cd-E5W1z.js";
|
|
13
14
|
import { c as ke } from "../file-lxi_oXJf.js";
|
|
14
15
|
import { d as xe } from "../function-C10DGppn.js";
|
|
15
|
-
import { e as p, a0 as re, a as $e, aB as Pe, D as w, p as A, a3 as Oe } from "../tags-
|
|
16
|
-
import { c as m } from "../createStylesheet-
|
|
17
|
-
import { a as Me } from "../Viewport-
|
|
16
|
+
import { e as p, a0 as re, a as $e, aB as Pe, D as w, p as A, a3 as Oe } from "../tags-BoPv9fDr.js";
|
|
17
|
+
import { c as m } from "../createStylesheet-KMRQhSa-.js";
|
|
18
|
+
import { a as Me } from "../Viewport-Bx-VImCe.js";
|
|
18
19
|
import { aptechkaTheme as s } from "../theme/index.js";
|
|
19
20
|
import { AccordionElement as Ee } from "../accordion/index.js";
|
|
20
|
-
import { a as Te } from "../index-
|
|
21
|
+
import { a as Te } from "../index-Fasue6kv.js";
|
|
21
22
|
import { d as De } from "../events-_C2CztxR.js";
|
|
22
23
|
import "../checkbox/index.js";
|
|
23
24
|
import { c as Re } from "../math-BOBiC4TN.js";
|
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../attributes-Bf2svn4j.cjs"),S=require("../browser-CpzFX2xg.cjs"),h=require("../dom-JBOkFLTh.cjs"),u=require("../easings-DsS5-Kqc.cjs"),v=require("../events-Crwi8fz6.cjs"),I=require("../file-EevnUtRj.cjs"),x=require("../function-MthRj-GJ.cjs"),P=require("../gestures-DHLrn6Q8.cjs"),f=require("../layout-8ryRAMGJ.cjs"),p=require("../math-GDWEqu7y.cjs"),y=require("../number-yVpzMdbQ.cjs"),d=require("../object-CCiXnER2.cjs"),D=require("../polyfills-CrcS4RcO.cjs"),m=require("../string-DhgS_iFl.cjs"),C=require("../style-At6aDoqG.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");function T(t,e,...s){return[...t.slice(0,e),...s,...t.slice(e)]}function q(t,e){const s=t.measureText(e),a=s.actualBoundingBoxAscent+s.actualBoundingBoxDescent,n=s.width;return{height:a,width:n}}function Q(t){return Math.floor(t)+.5}function M(t,e,s,a,n,o){let i=t/e,r=s/a,c=0,l=0;return n=typeof n=="undefined"?.5:n,o=typeof o=="undefined"?.5:o,i>r?(c=a,l=a*i):(l=s,c=s/i),[(s-l)*n,(a-c)*o,l,c]}function R(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function A(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function z(t,e,s=!1){let a=t.x-e.width/2,n=e.height/2-t.y;return s&&(a=a/(e.width/2),n=n/(e.height/2)),{x:a,y:n}}function B(t,e){const s=t.x/e.x,a=t.y/e.y;return{x:s,y:a}}function N(t,e){return e=e||{x:0,y:0,width:document.documentElement.offsetWidth,height:innerHeight},{x:(t.x-e.x)/e.width*e.width,y:(t.y-e.y)/e.height*e.height}}function j(...t){const e={};return Array.from(document.styleSheets).forEach(s=>{Array.from(s.cssRules).forEach(a=>{a instanceof CSSStyleRule&&a.selectorText===":root"&&t.forEach(n=>{const o=a.styleMap.get(n);o?e[n]=o.toString():console.warn(`variable named ${n} not found`)})})}),e}function k(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function U(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function O(t,{normalize:e=!0,pathSelector:s="path"}={}){const a=document.createElement(null);a.innerHTML=t;const n=a.firstElementChild,i=n.querySelector(s).getPathData();if(e){const r=n.getAttribute("viewBox").split(" ").map(l=>parseFloat(l)),c=Math.min(r[2],r[3]);i.forEach(l=>{l.values=l.values.map(g=>g/c)})}return i}function V(t,e,s,a,n){const o=[];for(let i=0;i<=1;i+=1/n){const r=Math.pow(1-i,3)*t.x+3*Math.pow(1-i,2)*i*e.x+3*(1-i)*Math.pow(i,2)*s.x+Math.pow(i,3)*a.x,c=Math.pow(1-i,3)*t.y+3*Math.pow(1-i,2)*i*e.y+3*(1-i)*Math.pow(i,2)*s.y+Math.pow(i,3)*a.y;o.push({x:r,y:c})}return o}function J(t,e){const s=(e==null?void 0:e.segments)||20,a=O(t,e);let n=[];for(let o=0;o<a.length-1;o++){const{type:i,values:r}=a[o];if(i==="M"&&o===0)n.push({x:r[0],y:r[1]});else if(i==="C"){const c=n[n.length-1],l={x:r[0],y:r[1]},g={x:r[2],y:r[3]},w={x:r[4],y:r[5]},E=V(c,l,g,w,s);n=[...n,...E]}}return n}exports.parseAttribute=b.parseAttribute;exports.parseAttributeValue=b.parseAttributeValue;exports.isBrowser=S.isBrowser;exports.findParentElement=h.findParentElement;exports.findScrollParentElement=h.findScrollParentElement;exports.getAllParentElements=h.getAllParentElements;exports.getElement=h.getElement;exports.easeInCubic=u.easeInCubic;exports.easeInExpo=u.easeInExpo;exports.easeInOutCubic=u.easeInOutCubic;exports.easeInOutExpo=u.easeInOutExpo;exports.easeInOutQuad=u.easeInOutQuad;exports.easeInOutQuart=u.easeInOutQuart;exports.easeInOutQuint=u.easeInOutQuint;exports.easeInQuad=u.easeInQuad;exports.easeInQuart=u.easeInQuart;exports.easeInQuint=u.easeInQuint;exports.easeOutCubic=u.easeOutCubic;exports.easeOutExpo=u.easeOutExpo;exports.easeOutQuad=u.easeOutQuad;exports.easeOutQuart=u.easeOutQuart;exports.easeOutQuint=u.easeOutQuint;exports.linear=u.linear;exports.dispatchSizeChangeEvent=v.dispatchSizeChangeEvent;exports.createJSONAndSave=I.createJSONAndSave;exports.debounce=x.debounce;exports.throttle=x.throttle;exports.setupDrag=P.setupDrag;exports.getCumulativeOffsetLeft=f.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=f.getCumulativeOffsetTop;exports.getCumulativePosition=f.getCumulativePosition;exports.calculateDistance=p.calculateDistance;exports.calculateDistanceWithRadius=p.calculateDistanceWithRadius;exports.clamp=p.clamp;exports.damp=p.damp;exports.lerp=p.lerp;exports.mapRange=p.mapRange;exports.round=p.round;exports.smootherstep=p.smootherstep;exports.smoothstep=p.smoothstep;exports.step=p.step;exports.preciseNumber=y.preciseNumber;exports.roundNumberTo=y.roundNumberTo;exports.cloneDeep=d.cloneDeep;exports.compareObjects=d.compareObjects;exports.isESClass=d.isESClass;exports.isNullish=d.isNullish;exports.isObject=d.isObject;exports.mergeDeep=d.mergeDeep;exports.mixin=d.mixin;exports.omit=d.omit;exports.pick=d.pick;exports.nullishCoalescing=D.nullishCoalescing;exports.camelToKebab=m.camelToKebab;exports.capitalize=m.capitalize;exports.generateId=m.generateId;exports.isUppercase=m.isUppercase;exports.kebabToCamel=m.kebabToCamel;exports.snakeToDotted=m.snakeToDotted;exports.toPascalCase=m.toPascalCase;exports.uncapitalize=m.uncapitalize;exports.getElementTransitionDurationMS=C.getElementTransitionDurationMS;exports.getElementTransitionDurationS=C.getElementTransitionDurationS;exports.cover=M;exports.decode=U;exports.dotCircleCollision=A;exports.dotRectCollision=R;exports.encode=k;exports.fixPosition=Q;exports.getPathData=O;exports.getPointerPosition=N;exports.getPoints=J;exports.getRootVariables=j;exports.insert=T;exports.measureText=q;exports.normalize=B;exports.screenToCartesian=z;
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -19,5 +19,6 @@ export { isObject, cloneDeep, mergeDeep, isNullish, compareObjects, pick, omit,
|
|
|
19
19
|
export { nullishCoalescing } from './polyfills';
|
|
20
20
|
export { kebabToCamel, camelToKebab, snakeToDotted, toPascalCase, capitalize, uncapitalize, generateId, isUppercase, } from './string';
|
|
21
21
|
export { getElementTransitionDurationMS, getElementTransitionDurationS, } from './style';
|
|
22
|
+
export { type GenerateSVGPathDataOptions, type BezierPoint, getPathData, getPoints, } from './svg';
|
|
22
23
|
export type { Axes2D, Axes3D, Dot2D, Rect2D, Circle, Dot3D, Rect3D, } from './ts-shape';
|
|
23
24
|
export type { NestedKeys, NestedValueOf, DeepOmit, DeepPartial, Requiredish, WithRequired, Split, SplitFirst, Tail, KebabToCamel, CamelToKebab, } from './ts-utility';
|
package/lib/utils/index.js
CHANGED
|
@@ -1,158 +1,195 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { i as
|
|
3
|
-
import { f as
|
|
4
|
-
import { c as
|
|
5
|
-
import { d as
|
|
6
|
-
import { c as
|
|
7
|
-
import { d as
|
|
8
|
-
import { s as
|
|
9
|
-
import { g as
|
|
10
|
-
import { e as
|
|
11
|
-
import { p as
|
|
12
|
-
import { c as
|
|
13
|
-
import { n as
|
|
14
|
-
import { c as
|
|
15
|
-
import { g as
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { a as Q, p as T } from "../attributes-69we3byR.js";
|
|
2
|
+
import { i as B } from "../browser-0zX67oeU.js";
|
|
3
|
+
import { f as z, b as N, a as j, g as U } from "../dom-0S_WDL4g.js";
|
|
4
|
+
import { c as V, n as F, f as J, p as K, b as $, i as G, m as H, e as W, g as X, j as Y, d as Z, o as _, a as L, h as ee, k as te, l as ae } from "../easings-BKi40vHz.js";
|
|
5
|
+
import { d as ne } from "../events-_C2CztxR.js";
|
|
6
|
+
import { c as ie } from "../file-lxi_oXJf.js";
|
|
7
|
+
import { d as ue, t as le } from "../function-C10DGppn.js";
|
|
8
|
+
import { s as pe } from "../gestures-D2Fdra_G.js";
|
|
9
|
+
import { g as he, a as de, b as fe } from "../layout-HoBT_Da2.js";
|
|
10
|
+
import { e as ge, f as ye, c as we, d as be, l as Ce, m as Ee, r as ve, b as Se, a as Me, s as Oe } from "../math-BOBiC4TN.js";
|
|
11
|
+
import { p as De, r as Pe } from "../number-Bo5RdrA1.js";
|
|
12
|
+
import { c as Qe, d as Te, i as Ae, b as Be, a as ke, m as ze, e as Ne, o as je, p as Ue } from "../object-D6MVWB4l.js";
|
|
13
|
+
import { n as Ve } from "../polyfills-DJUYczFm.js";
|
|
14
|
+
import { c as Je, a as Ke, g as $e, i as Ge, k as He, s as We, t as Xe, u as Ye } from "../string-f0Dnk0L1.js";
|
|
15
|
+
import { g as _e, a as Le } from "../style-j2TwriJ_.js";
|
|
16
|
+
import "../path-data-polyfill-DgeDWYeI.js";
|
|
17
|
+
function x(t, e, ...n) {
|
|
18
|
+
return [...t.slice(0, e), ...n, ...t.slice(e)];
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
const
|
|
20
|
+
function g(t, e) {
|
|
21
|
+
const n = t.measureText(e), s = n.actualBoundingBoxAscent + n.actualBoundingBoxDescent, a = n.width;
|
|
21
22
|
return {
|
|
22
23
|
height: s,
|
|
23
|
-
width:
|
|
24
|
+
width: a
|
|
24
25
|
};
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
-
return Math.floor(
|
|
27
|
+
function y(t) {
|
|
28
|
+
return Math.floor(t) + 0.5;
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
-
let
|
|
31
|
-
return
|
|
32
|
-
(
|
|
33
|
-
(s -
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
function w(t, e, n, s, a, i) {
|
|
31
|
+
let o = t / e, r = n / s, l = 0, u = 0;
|
|
32
|
+
return a = typeof a == "undefined" ? 0.5 : a, i = typeof i == "undefined" ? 0.5 : i, o > r ? (l = s, u = s * o) : (u = n, l = n / o), [
|
|
33
|
+
(n - u) * a,
|
|
34
|
+
(s - l) * i,
|
|
35
|
+
u,
|
|
36
|
+
l
|
|
36
37
|
];
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
-
return
|
|
39
|
+
function b(t, e) {
|
|
40
|
+
return t.x < e.x + e.width && t.x > e.x && t.y < e.y + e.height && t.y > e.y;
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
-
return Math.sqrt((
|
|
42
|
+
function C(t, e) {
|
|
43
|
+
return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2) < e.radius;
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
-
let s =
|
|
46
|
-
return
|
|
45
|
+
function E(t, e, n = !1) {
|
|
46
|
+
let s = t.x - e.width / 2, a = e.height / 2 - t.y;
|
|
47
|
+
return n && (s = s / (e.width / 2), a = a / (e.height / 2)), { x: s, y: a };
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
-
const
|
|
50
|
-
return { x:
|
|
49
|
+
function v(t, e) {
|
|
50
|
+
const n = t.x / e.x, s = t.y / e.y;
|
|
51
|
+
return { x: n, y: s };
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
+
function S(t, e) {
|
|
53
54
|
return e = e || {
|
|
54
55
|
x: 0,
|
|
55
56
|
y: 0,
|
|
56
57
|
width: document.documentElement.offsetWidth,
|
|
57
58
|
height: innerHeight
|
|
58
59
|
}, {
|
|
59
|
-
x: (
|
|
60
|
-
y: (
|
|
60
|
+
x: (t.x - e.x) / e.width * e.width,
|
|
61
|
+
y: (t.y - e.y) / e.height * e.height
|
|
61
62
|
};
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
+
function M(...t) {
|
|
64
65
|
const e = {};
|
|
65
|
-
return Array.from(document.styleSheets).forEach((
|
|
66
|
-
Array.from(
|
|
67
|
-
s instanceof CSSStyleRule && s.selectorText === ":root" &&
|
|
68
|
-
const
|
|
69
|
-
|
|
66
|
+
return Array.from(document.styleSheets).forEach((n) => {
|
|
67
|
+
Array.from(n.cssRules).forEach((s) => {
|
|
68
|
+
s instanceof CSSStyleRule && s.selectorText === ":root" && t.forEach((a) => {
|
|
69
|
+
const i = s.styleMap.get(a);
|
|
70
|
+
i ? e[a] = i.toString() : console.warn(`variable named ${a} not found`);
|
|
70
71
|
});
|
|
71
72
|
});
|
|
72
73
|
}), e;
|
|
73
74
|
}
|
|
74
|
-
function
|
|
75
|
-
const e = window.atob(
|
|
75
|
+
function O(t) {
|
|
76
|
+
const e = window.atob(t);
|
|
76
77
|
return decodeURIComponent(window.escape(e));
|
|
77
78
|
}
|
|
78
|
-
function
|
|
79
|
-
const e = window.unescape(encodeURIComponent(
|
|
79
|
+
function I(t) {
|
|
80
|
+
const e = window.unescape(encodeURIComponent(t));
|
|
80
81
|
return window.btoa(e);
|
|
81
82
|
}
|
|
83
|
+
function h(t, { normalize: e = !0, pathSelector: n = "path" } = {}) {
|
|
84
|
+
const s = document.createElement(null);
|
|
85
|
+
s.innerHTML = t;
|
|
86
|
+
const a = s.firstElementChild, o = a.querySelector(n).getPathData();
|
|
87
|
+
if (e) {
|
|
88
|
+
const r = a.getAttribute("viewBox").split(" ").map((u) => parseFloat(u)), l = Math.min(r[2], r[3]);
|
|
89
|
+
o.forEach((u) => {
|
|
90
|
+
u.values = u.values.map((c) => c / l);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
return o;
|
|
94
|
+
}
|
|
95
|
+
function d(t, e, n, s, a) {
|
|
96
|
+
const i = [];
|
|
97
|
+
for (let o = 0; o <= 1; o += 1 / a) {
|
|
98
|
+
const r = Math.pow(1 - o, 3) * t.x + 3 * Math.pow(1 - o, 2) * o * e.x + 3 * (1 - o) * Math.pow(o, 2) * n.x + Math.pow(o, 3) * s.x, l = Math.pow(1 - o, 3) * t.y + 3 * Math.pow(1 - o, 2) * o * e.y + 3 * (1 - o) * Math.pow(o, 2) * n.y + Math.pow(o, 3) * s.y;
|
|
99
|
+
i.push({ x: r, y: l });
|
|
100
|
+
}
|
|
101
|
+
return i;
|
|
102
|
+
}
|
|
103
|
+
function D(t, e) {
|
|
104
|
+
const n = (e == null ? void 0 : e.segments) || 20, s = h(t, e);
|
|
105
|
+
let a = [];
|
|
106
|
+
for (let i = 0; i < s.length - 1; i++) {
|
|
107
|
+
const { type: o, values: r } = s[i];
|
|
108
|
+
if (o === "M" && i === 0)
|
|
109
|
+
a.push({ x: r[0], y: r[1] });
|
|
110
|
+
else if (o === "C") {
|
|
111
|
+
const l = a[a.length - 1], u = { x: r[0], y: r[1] }, c = { x: r[2], y: r[3] }, p = { x: r[4], y: r[5] }, m = d(l, u, c, p, n);
|
|
112
|
+
a = [...a, ...m];
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return a;
|
|
116
|
+
}
|
|
82
117
|
export {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
118
|
+
ge as calculateDistance,
|
|
119
|
+
ye as calculateDistanceWithRadius,
|
|
120
|
+
Je as camelToKebab,
|
|
121
|
+
Ke as capitalize,
|
|
122
|
+
we as clamp,
|
|
123
|
+
Qe as cloneDeep,
|
|
124
|
+
Te as compareObjects,
|
|
125
|
+
w as cover,
|
|
126
|
+
ie as createJSONAndSave,
|
|
127
|
+
be as damp,
|
|
128
|
+
ue as debounce,
|
|
129
|
+
I as decode,
|
|
130
|
+
ne as dispatchSizeChangeEvent,
|
|
131
|
+
C as dotCircleCollision,
|
|
132
|
+
b as dotRectCollision,
|
|
133
|
+
V as easeInCubic,
|
|
134
|
+
F as easeInExpo,
|
|
135
|
+
J as easeInOutCubic,
|
|
136
|
+
K as easeInOutExpo,
|
|
137
|
+
$ as easeInOutQuad,
|
|
138
|
+
G as easeInOutQuart,
|
|
139
|
+
H as easeInOutQuint,
|
|
140
|
+
W as easeInQuad,
|
|
141
|
+
X as easeInQuart,
|
|
142
|
+
Y as easeInQuint,
|
|
143
|
+
Z as easeOutCubic,
|
|
144
|
+
_ as easeOutExpo,
|
|
145
|
+
L as easeOutQuad,
|
|
146
|
+
ee as easeOutQuart,
|
|
147
|
+
te as easeOutQuint,
|
|
148
|
+
O as encode,
|
|
149
|
+
z as findParentElement,
|
|
150
|
+
N as findScrollParentElement,
|
|
151
|
+
y as fixPosition,
|
|
152
|
+
$e as generateId,
|
|
153
|
+
j as getAllParentElements,
|
|
154
|
+
he as getCumulativeOffsetLeft,
|
|
155
|
+
de as getCumulativeOffsetTop,
|
|
156
|
+
fe as getCumulativePosition,
|
|
157
|
+
U as getElement,
|
|
158
|
+
_e as getElementTransitionDurationMS,
|
|
159
|
+
Le as getElementTransitionDurationS,
|
|
160
|
+
h as getPathData,
|
|
161
|
+
S as getPointerPosition,
|
|
162
|
+
D as getPoints,
|
|
163
|
+
M as getRootVariables,
|
|
164
|
+
x as insert,
|
|
165
|
+
B as isBrowser,
|
|
166
|
+
Ae as isESClass,
|
|
167
|
+
Be as isNullish,
|
|
168
|
+
ke as isObject,
|
|
169
|
+
Ge as isUppercase,
|
|
170
|
+
He as kebabToCamel,
|
|
171
|
+
Ce as lerp,
|
|
172
|
+
ae as linear,
|
|
173
|
+
Ee as mapRange,
|
|
174
|
+
g as measureText,
|
|
175
|
+
ze as mergeDeep,
|
|
176
|
+
Ne as mixin,
|
|
177
|
+
v as normalize,
|
|
178
|
+
Ve as nullishCoalescing,
|
|
179
|
+
je as omit,
|
|
180
|
+
Q as parseAttribute,
|
|
181
|
+
T as parseAttributeValue,
|
|
182
|
+
Ue as pick,
|
|
183
|
+
De as preciseNumber,
|
|
184
|
+
ve as round,
|
|
185
|
+
Pe as roundNumberTo,
|
|
186
|
+
E as screenToCartesian,
|
|
187
|
+
pe as setupDrag,
|
|
188
|
+
Se as smootherstep,
|
|
189
|
+
Me as smoothstep,
|
|
190
|
+
We as snakeToDotted,
|
|
191
|
+
Oe as step,
|
|
192
|
+
le as throttle,
|
|
193
|
+
Xe as toPascalCase,
|
|
194
|
+
Ye as uncapitalize
|
|
158
195
|
};
|