designix-uis 1.0.7 → 1.0.9

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.
Files changed (38) hide show
  1. package/dist/designix-uis.js +1 -1
  2. package/dist/public/_app/immutable/chunks/{9q6So200.js → D6b7pR07.js} +1 -1
  3. package/dist/public/_app/immutable/chunks/{CamENbg3.js → D9RKXuOl.js} +1 -1
  4. package/dist/public/_app/immutable/chunks/DStHZ7RC.js +1 -0
  5. package/dist/public/_app/immutable/chunks/{BMSQdX9I.js → Hk7dWbl9.js} +1 -1
  6. package/dist/public/_app/immutable/chunks/{DVXf0BbA.js → UFE6jN6v.js} +1 -1
  7. package/dist/public/_app/immutable/entry/{app.DPKVfIh6.js → app.BG9dzG96.js} +2 -2
  8. package/dist/public/_app/immutable/entry/start.CUW1ArIX.js +1 -0
  9. package/dist/public/_app/immutable/nodes/{0.C-h3DYfc.js → 0.DFhDVqqs.js} +1 -1
  10. package/dist/public/_app/immutable/nodes/{1.CZxIYtB_.js → 1.CSi3glXp.js} +1 -1
  11. package/dist/public/_app/immutable/nodes/{2.Bgxy5SFR.js → 2.DLfJBwuP.js} +1 -1
  12. package/dist/public/_app/immutable/nodes/{3.BIaTIJ8z.js → 3.UouLSSho.js} +1 -1
  13. package/dist/public/_app/version.json +1 -1
  14. package/dist/public/gear/gear_bar.html +13 -13
  15. package/dist/public/gear/gear_epicycloid.html +13 -13
  16. package/dist/public/gear/gear_ring.html +13 -13
  17. package/dist/public/gear/gear_wheel.html +13 -13
  18. package/dist/public/heliostat/base.html +13 -13
  19. package/dist/public/heliostat/haxis_guidance.html +13 -13
  20. package/dist/public/heliostat/heliostat.html +13 -13
  21. package/dist/public/heliostat/heliostat_2.html +13 -13
  22. package/dist/public/heliostat/pole_static.html +13 -13
  23. package/dist/public/heliostat/rake.html +13 -13
  24. package/dist/public/heliostat/rake_stopper.html +13 -13
  25. package/dist/public/heliostat/ring.html +13 -13
  26. package/dist/public/heliostat/ring_guidance.html +13 -13
  27. package/dist/public/heliostat/rod.html +13 -13
  28. package/dist/public/heliostat/spider.html +13 -13
  29. package/dist/public/heliostat/surface.html +13 -13
  30. package/dist/public/heliostat/swing.html +13 -13
  31. package/dist/public/heliostat/trapeze.html +13 -13
  32. package/dist/public/heliostat/vaxis.html +13 -13
  33. package/dist/public/heliostat/vaxis_guidance.html +13 -13
  34. package/dist/public/heliostat/vaxis_holder.html +13 -13
  35. package/dist/public/index.html +11 -11
  36. package/package.json +1 -1
  37. package/dist/public/_app/immutable/chunks/CR8iOxPW.js +0 -1
  38. package/dist/public/_app/immutable/entry/start.Da9Ac1vp.js +0 -1
@@ -12,7 +12,7 @@ import getport from "get-port";
12
12
  // package.json
13
13
  var package_default = {
14
14
  name: "designix-uis",
15
- version: "1.0.7",
15
+ version: "1.0.9",
16
16
  description: "mini-server for static content of designix-ui",
17
17
  private: false,
18
18
  repository: {
@@ -1,3 +1,3 @@
1
- var Xt=t=>{throw TypeError(t)};var Ce=(t,e,n)=>e.has(t)||Xt("Cannot "+n);var A=(t,e,n)=>(Ce(t,e,"read from private field"),n?n.call(t):e.get(t)),x=(t,e,n)=>e.has(t)?Xt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{o as Pt}from"./Bk2aPQXL.js";import{n as It,aG as Ne,a7 as C,j as N,D as O,a8 as Oe}from"./60ejCBYp.js";import{a as je,b as P}from"./CR8iOxPW.js";const B=[];function jt(t,e=It){let n=null;const r=new Set;function a(o){if(Ne(t,o)&&(t=o,n)){const c=!B.length;for(const l of r)l[1](),B.push(l,t);if(c){for(let l=0;l<B.length;l+=2)B[l][0](B[l+1]);B.length=0}}}function s(o){a(o(t))}function i(o,c=It){const l=[o,c];return r.add(l),r.size===1&&(n=e(a,s)||It),o(t),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:a,update:s,subscribe:i}}new URL("sveltekit-internal://");function $e(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function De(t){return t.split("%25").map(decodeURI).join("%25")}function Fe(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function Ut({href:t}){return t.split("#")[0]}function Ve(t,e,n,r=!1){const a=new URL(t);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return l=>(n(l),i[o](l));e();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return e(),t[i]},enumerable:!0,configurable:!0});return a}function Be(...t){let e=5381;for(const n of t)if(typeof n=="string"){let r=n.length;for(;r;)e=e*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)e=e*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}function qe(t){const e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n.buffer}const Ge=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&z.delete($t(t)),Ge(t,e));const z=new Map;function Me(t,e){const n=$t(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&z.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=qe(a)),Promise.resolve(new Response(a,s))}return window.fetch(t,e)}function He(t,e,n){if(z.size>0){const r=$t(t,n),a=z.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);z.delete(r)}}return window.fetch(e,n)}function $t(t,e){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const a=[];e.headers&&a.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&a.push(e.body),r+=`[data-hash="${Be(...a)}"]`}return r}const Ke=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function We(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${ze(t).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return Lt(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return Lt(String.fromCharCode(...c.slice(2).split("-").map(d=>parseInt(d,16))));const u=Ke.exec(c),[,p,y,f,m]=u;return e.push({name:f,matcher:m,optional:!!p,rest:!!y,chained:y?l===1&&i[0]==="":!1}),y?"(.*?)":p?"([^/]*)?":"([^/]+?)"}return Lt(c)}).join("")}).join("")}/?$`),params:e}}function Ye(t){return!/^\([^)]+\)$/.test(t)}function ze(t){return t.slice(1).split("/").filter(Ye)}function Je(t,e,n){const r={},a=t.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<e.length;o+=1){const c=e[o];let l=a[o-i];if(c.chained&&c.rest&&i&&(l=a.slice(o-i,o+1).filter(u=>u).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const u=e[o+1],p=a[o+1];u&&!u.rest&&u.optional&&p&&c.chained&&(i=0),!u&&!p&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function Lt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Xe({nodes:t,server_loads:e,dictionary:n,matchers:r}){const a=new Set(e);return Object.entries(n).map(([o,[c,l,u]])=>{const{pattern:p,params:y}=We(o),f={id:o,exec:m=>{const d=p.exec(m);if(d)return Je(d,y,r)},errors:[1,...u||[]].map(m=>t[m]),layouts:[0,...l||[]].map(i),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(o){const c=o<0;return c&&(o=~o),[c,t[o]]}function i(o){return o===void 0?o:[a.has(o),t[o]]}}function fe(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function Zt(t,e,n=JSON.stringify){const r=n(e);try{sessionStorage[t]=r}catch{}}const Ze="1740077226154",ue="sveltekit:snapshot",he="sveltekit:scroll",de="sveltekit:states",Qe="sveltekit:pageurl",G="sveltekit:history",X="sveltekit:navigation",ht={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ut=location.origin;function pe(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function Dt(){return{x:pageXOffset,y:pageYOffset}}function q(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const Qt={...ht,"":ht.hover};function ge(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function me(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=ge(t)}}function Ct(t,e,n){let r;try{if(r=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,s=!r||!!a||bt(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===ut&&t.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function dt(t){let e=null,n=null,r=null,a=null,s=null,i=null,o=t;for(;o&&o!==document.documentElement;)r===null&&(r=q(o,"preload-code")),a===null&&(a=q(o,"preload-data")),e===null&&(e=q(o,"keepfocus")),n===null&&(n=q(o,"noscroll")),s===null&&(s=q(o,"reload")),i===null&&(i=q(o,"replacestate")),o=ge(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Qt[r??"off"],preload_data:Qt[a??"off"],keepfocus:c(e),noscroll:c(n),reload:c(s),replace_state:c(i)}}function te(t){const e=jt(t);let n=!0;function r(){n=!0,e.update(i=>i)}function a(i){n=!1,e.set(i)}function s(i){let o;return e.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const ye={v:()=>{}};function tn(){const{set:t,subscribe:e}=jt(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${je}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Ze;return i&&(t(!0),ye.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:e,check:r}}function bt(t,e,n){return t.origin!==ut||!t.pathname.startsWith(e)?!0:n?!(t.pathname===e+"/"||t.pathname===e+"/index.html"||t.protocol==="file:"&&t.pathname.replace(/\/[^/]+\.html?$/,"")===e):!1}function ee(t){const e=nn(t),n=new ArrayBuffer(e.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,e.charCodeAt(a));return n}const en="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function nn(t){t.length%4===0&&(t=t.replace(/==?$/,""));let e="",n=0,r=0;for(let a=0;a<t.length;a++)n<<=6,n|=en.indexOf(t[a]),r+=6,r===24&&(e+=String.fromCharCode((n&16711680)>>16),e+=String.fromCharCode((n&65280)>>8),e+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,e+=String.fromCharCode(n)):r===18&&(n>>=2,e+=String.fromCharCode((n&65280)>>8),e+=String.fromCharCode(n&255)),e}const rn=-1,an=-2,on=-3,sn=-4,cn=-5,ln=-6;function fn(t,e){if(typeof t=="number")return a(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const n=t,r=Array(n.length);function a(s,i=!1){if(s===rn)return;if(s===on)return NaN;if(s===sn)return 1/0;if(s===cn)return-1/0;if(s===ln)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],l=e==null?void 0:e[c];if(l)return r[s]=l(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const u=new Set;r[s]=u;for(let f=1;f<o.length;f+=1)u.add(a(o[f]));break;case"Map":const p=new Map;r[s]=p;for(let f=1;f<o.length;f+=2)p.set(a(o[f]),a(o[f+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const y=Object.create(null);r[s]=y;for(let f=1;f<o.length;f+=2)y[o[f]]=a(o[f+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const f=globalThis[c],m=o[1],d=ee(m),h=new f(d);r[s]=h;break}case"ArrayBuffer":{const f=o[1],m=ee(f);r[s]=m;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let l=0;l<o.length;l+=1){const u=o[l];u!==an&&(c[l]=a(u))}}else{const c={};r[s]=c;for(const l in o){const u=o[l];c[l]=a(u)}}return r[s]}return a(0)}const we=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...we];const un=new Set([...we]);[...un];function hn(t){return t.filter(e=>e!=null)}class At{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class Ft{constructor(e,n){this.status=e,this.location=n}}class Vt extends Error{constructor(e,n,r){super(r),this.status=e,this.text=n}}const dn="x-sveltekit-invalidated",pn="x-sveltekit-trailing-slash";function pt(t){return t instanceof At||t instanceof Vt?t.status:500}function gn(t){return t instanceof Vt?t.text:"Internal Error"}let U,Z,Tt;const mn=Pt.toString().includes("$$")||/function \w+\(\) \{\}/.test(Pt.toString());var et,nt,rt,at,ot,st,it,ct,ie,lt,ce,ft,le;mn?(U={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},Z={current:null},Tt={current:!1}):(U=new(ie=class{constructor(){x(this,et,C({}));x(this,nt,C(null));x(this,rt,C(null));x(this,at,C({}));x(this,ot,C({id:null}));x(this,st,C({}));x(this,it,C(-1));x(this,ct,C(new URL("https://example.com")))}get data(){return N(A(this,et))}set data(e){O(A(this,et),e)}get form(){return N(A(this,nt))}set form(e){O(A(this,nt),e)}get error(){return N(A(this,rt))}set error(e){O(A(this,rt),e)}get params(){return N(A(this,at))}set params(e){O(A(this,at),e)}get route(){return N(A(this,ot))}set route(e){O(A(this,ot),e)}get state(){return N(A(this,st))}set state(e){O(A(this,st),e)}get status(){return N(A(this,it))}set status(e){O(A(this,it),e)}get url(){return N(A(this,ct))}set url(e){O(A(this,ct),e)}},et=new WeakMap,nt=new WeakMap,rt=new WeakMap,at=new WeakMap,ot=new WeakMap,st=new WeakMap,it=new WeakMap,ct=new WeakMap,ie),Z=new(ce=class{constructor(){x(this,lt,C(null))}get current(){return N(A(this,lt))}set current(e){O(A(this,lt),e)}},lt=new WeakMap,ce),Tt=new(le=class{constructor(){x(this,ft,C(!1))}get current(){return N(A(this,ft))}set current(e){O(A(this,ft),e)}},ft=new WeakMap,le),ye.v=()=>Tt.current=!0);function yn(t){Object.assign(U,t)}const wn="/__data.json",_n=".html__data.json";function vn(t){return t.endsWith(".html")?t.replace(/\.html$/,_n):t.replace(/\/$/,"")+wn}const bn=new Set(["icon","shortcut icon","apple-touch-icon"]),V=fe(he)??{},Q=fe(ue)??{},$={url:te({}),page:te({}),navigating:jt(null),updated:tn()};function Bt(t){V[t]=Dt()}function An(t,e){let n=t+1;for(;V[n];)delete V[n],n+=1;for(n=e+1;Q[n];)delete Q[n],n+=1}function K(t){return location.href=t.href,new Promise(()=>{})}async function _e(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(P||"/");t&&await t.update()}}function ne(){}let qt,Nt,gt,j,Ot,S;const mt=[],yt=[];let L=null;const ve=new Set,Sn=new Set,M=new Set;let v={branch:[],error:null,url:null},Gt=!1,wt=!1,re=!0,tt=!1,W=!1,be=!1,Mt=!1,Ae,R,T,F;const J=new Set;async function Mn(t,e,n){var a,s,i,o;document.URL!==location.href&&(location.href=location.href),S=t,await((s=(a=t.hooks).init)==null?void 0:s.call(a)),qt=Xe(t),j=document.documentElement,Ot=e,Nt=t.nodes[0],gt=t.nodes[1],Nt(),gt(),R=(i=history.state)==null?void 0:i[G],T=(o=history.state)==null?void 0:o[X],R||(R=T=Date.now(),history.replaceState({...history.state,[G]:R,[X]:T},""));const r=V[R];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),n?await On(Ot,n):await Pn(S.hash?Pe(new URL(location.href)):location.href,{replaceState:!0}),Nn()}function En(){mt.length=0,Mt=!1}function Se(t){yt.some(e=>e==null?void 0:e.snapshot)&&(Q[t]=yt.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Ee(t){var e;(e=Q[t])==null||e.forEach((n,r)=>{var a,s;(s=(a=yt[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function ae(){Bt(R),Zt(he,V),Se(T),Zt(ue,Q)}async function Ht(t,e,n,r){return Y({type:"goto",url:pe(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:r,accept:()=>{e.invalidateAll&&(Mt=!0),e.invalidate&&e.invalidate.forEach(Cn)}})}async function kn(t){if(t.id!==(L==null?void 0:L.id)){const e={};J.add(e),L={id:t.id,token:e,promise:Re({...t,preload:e}).then(n=>(J.delete(e),n.type==="loaded"&&n.state.error&&(L=null),n))}}return L.promise}async function xt(t){var n;const e=(n=await Et(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].map(r=>r==null?void 0:r[1]()))}function ke(t,e,n){var s;v=t.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),Object.assign(U,t.props.page),Ae=new S.root({target:e,props:{...t.props,stores:$,components:yt},hydrate:n,sync:!1}),Ee(T);const a={from:null,to:{params:v.params,route:{id:((s=v.route)==null?void 0:s.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};M.forEach(i=>i(a)),wt=!0}function _t({url:t,params:e,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(P&&(t.pathname===P||t.pathname===P+"/"))o="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(o=f.slash);t.pathname=$e(t.pathname,o),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:a,route:s},props:{constructors:hn(n).map(f=>f.node.component),page:Yt(U)}};i!==void 0&&(c.props.form=i);let l={},u=!U,p=0;for(let f=0;f<Math.max(n.length,v.branch.length);f+=1){const m=n[f],d=v.branch[f];(m==null?void 0:m.data)!==(d==null?void 0:d.data)&&(u=!0),m&&(l={...l,...m.data},u&&(c.props[`data_${p}`]=l),p+=1)}return(!v.url||t.href!==v.url.href||v.error!==a||i!==void 0&&i!==U.form||u)&&(c.props.page={error:a,params:e,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(t),form:i??null,data:u?l:U.data}),c}async function Kt({loader:t,parent:e,url:n,params:r,route:a,server_data_node:s}){var u,p,y;let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await t();if((u=l.universal)!=null&&u.load){let f=function(...d){for(const h of d){const{href:w}=new URL(h,n);c.dependencies.add(w)}};const m={route:new Proxy(a,{get:(d,h)=>(o&&(c.route=!0),d[h])}),params:new Proxy(r,{get:(d,h)=>(o&&c.params.add(h),d[h])}),data:(s==null?void 0:s.data)??null,url:Ve(n,()=>{o&&(c.url=!0)},d=>{o&&c.search_params.add(d)},S.hash),async fetch(d,h){let w;d instanceof Request?(w=d.url,h={body:d.method==="GET"||d.method==="HEAD"?void 0:await d.blob(),cache:d.cache,credentials:d.credentials,headers:[...d.headers].length?d.headers:void 0,integrity:d.integrity,keepalive:d.keepalive,method:d.method,mode:d.mode,redirect:d.redirect,referrer:d.referrer,referrerPolicy:d.referrerPolicy,signal:d.signal,...h}):w=d;const E=new URL(w,n);return o&&f(E.href),E.origin===n.origin&&(w=E.href.slice(n.origin.length)),wt?He(w,E.href,h):Me(w,h)},setHeaders:()=>{},depends:f,parent(){return o&&(c.parent=!0),e()},untrack(d){o=!1;try{return d()}finally{o=!0}}};i=await l.universal.load.call(null,m)??null}return{node:l,loader:t,server:s,universal:(p=l.universal)!=null&&p.load?{type:"data",data:i,uses:c}:null,data:i??(s==null?void 0:s.data)??null,slash:((y=l.universal)==null?void 0:y.trailingSlash)??(s==null?void 0:s.slash)}}function oe(t,e,n,r,a,s){if(Mt)return!0;if(!a)return!1;if(a.parent&&t||a.route&&e||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==v.params[i])return!0;for(const i of a.dependencies)if(mt.some(o=>o(new URL(i))))return!0;return!1}function Wt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function Rn(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const r of n){const a=t.searchParams.getAll(r),s=e.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function se({error:t,url:e,route:n,params:r}){return{type:"loaded",state:{error:t,url:e,route:n,params:r,branch:[]},props:{page:Yt(U),constructors:[]}}}async function Re({id:t,invalidating:e,url:n,params:r,route:a,preload:s}){if((L==null?void 0:L.id)===t)return J.delete(L.token),L.promise;const{errors:i,layouts:o,leaf:c}=a,l=[...o,c];i.forEach(g=>g==null?void 0:g().catch(()=>{})),l.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));let u=null;const p=v.url?t!==vt(v.url):!1,y=v.route?a.id!==v.route.id:!1,f=Rn(v.url,n);let m=!1;const d=l.map((g,_)=>{var D;const b=v.branch[_],k=!!(g!=null&&g[0])&&((b==null?void 0:b.loader)!==g[1]||oe(m,y,p,f,(D=b.server)==null?void 0:D.uses,r));return k&&(m=!0),k});if(d.some(Boolean)){try{u=await Le(n,d)}catch(g){const _=await H(g,{url:n,params:r,route:{id:t}});return J.has(s)?se({error:_,url:n,params:r,route:a}):St({status:pt(g),error:_,url:n,route:a})}if(u.type==="redirect")return u}const h=u==null?void 0:u.nodes;let w=!1;const E=l.map(async(g,_)=>{var kt;if(!g)return;const b=v.branch[_],k=h==null?void 0:h[_];if((!k||k.type==="skip")&&g[1]===(b==null?void 0:b.loader)&&!oe(w,y,p,f,(kt=b.universal)==null?void 0:kt.uses,r))return b;if(w=!0,(k==null?void 0:k.type)==="error")throw k;return Kt({loader:g[1],url:n,params:r,route:a,parent:async()=>{var Jt;const zt={};for(let Rt=0;Rt<_;Rt+=1)Object.assign(zt,(Jt=await E[Rt])==null?void 0:Jt.data);return zt},server_data_node:Wt(k===void 0&&g[0]?{type:"skip"}:k??null,g[0]?b==null?void 0:b.server:void 0)})});for(const g of E)g.catch(()=>{});const I=[];for(let g=0;g<l.length;g+=1)if(l[g])try{I.push(await E[g])}catch(_){if(_ instanceof Ft)return{type:"redirect",location:_.location};if(J.has(s))return se({error:await H(_,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=pt(_),k;if(h!=null&&h.includes(_))b=_.status??b,k=_.error;else if(_ instanceof At)k=_.body;else{if(await $.updated.check())return await _e(),await K(n);k=await H(_,{params:r,url:n,route:{id:a.id}})}const D=await In(g,I,i);return D?_t({url:n,params:r,branch:I.slice(0,D.idx).concat(D.node),status:b,error:k,route:a}):await Ue(n,{id:a.id},k,b)}else I.push(void 0);return _t({url:n,params:r,branch:I,status:200,error:null,route:a,form:e?void 0:null})}async function In(t,e,n){for(;t--;)if(n[t]){let r=t;for(;!e[r];)r-=1;try{return{idx:r+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function St({status:t,error:e,url:n,route:r}){const a={};let s=null;if(S.server_loads[0]===0)try{const o=await Le(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==ut||n.pathname!==location.pathname||Gt)&&await K(n)}try{const o=await Kt({loader:Nt,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Wt(s)}),c={node:await gt(),loader:gt,universal:null,server:null,data:null};return _t({url:n,params:a,branch:[o,c],status:t,error:e,route:null})}catch(o){if(o instanceof Ft)return Ht(new URL(o.location,location.href),{},0);throw o}}function Un(t){let e;try{if(e=S.hooks.reroute({url:new URL(t)})??t,typeof e=="string"){const n=new URL(t);S.hash?n.hash=e:n.pathname=e,e=n}}catch{return}return e}async function Et(t,e){if(t&&!bt(t,P,S.hash)){const n=Un(t);if(!n)return;const r=Ln(n);for(const a of qt){const s=a.exec(r);if(s)return{id:vt(t),invalidating:e,route:a,params:Fe(s),url:t}}}}function Ln(t){return De(S.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(P.length))||"/"}function vt(t){return(S.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Ie({url:t,type:e,intent:n,delta:r}){let a=!1;const s=xe(v,n,t,e);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return tt||ve.forEach(o=>o(i)),a?null:s}async function Y({type:t,url:e,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:l=ne,block:u=ne}){const p=F;F=c;const y=await Et(e,!1),f=Ie({url:e,type:t,delta:n==null?void 0:n.delta,intent:y});if(!f){u(),F===c&&(F=p);return}const m=R,d=T;l(),tt=!0,wt&&$.navigating.set(Z.current=f.navigation);let h=y&&await Re(y);if(!h){if(bt(e,P,S.hash))return await K(e);h=await Ue(e,{id:null},await H(new Vt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404)}if(e=(y==null?void 0:y.url)||e,F!==c)return f.reject(new Error("navigation aborted")),!1;if(h.type==="redirect")if(o>=20)h=await St({status:500,error:await H(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}});else return await Ht(new URL(h.location,e).href,{},o+1,c),!1;else h.props.page.status>=400&&await $.updated.check()&&(await _e(),await K(e));if(En(),Bt(m),Se(d),h.props.page.url.pathname!==e.pathname&&(e.pathname=h.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,_={[G]:R+=g,[X]:T+=g,[de]:i};(s?history.replaceState:history.pushState).call(history,_,"",e),s||An(R,T)}if(L=null,h.props.page.state=i,wt){v=h.state,h.props.page&&(h.props.page.url=e);const g=(await Promise.all(Array.from(Sn,_=>_(f.navigation)))).filter(_=>typeof _=="function");if(g.length>0){let _=function(){g.forEach(b=>{M.delete(b)})};g.push(_),g.forEach(b=>{M.add(b)})}Ae.$set(h.props),yn(h.props.page),be=!0}else ke(h,Ot,!1);const{activeElement:w}=document;await Oe();const E=n?n.scroll:a?Dt():null;if(re){const g=e.hash&&document.getElementById(decodeURIComponent(S.hash?e.hash.split("#")[2]??"":e.hash.slice(1)));E?scrollTo(E.x,E.y):g?g.scrollIntoView():scrollTo(0,0)}const I=document.activeElement!==w&&document.activeElement!==document.body;!r&&!I&&jn(),re=!0,h.props.page&&Object.assign(U,h.props.page),tt=!1,t==="popstate"&&Ee(T),f.fulfil(void 0),M.forEach(g=>g(f.navigation)),$.navigating.set(Z.current=null)}async function Ue(t,e,n,r){return t.origin===ut&&t.pathname===location.pathname&&!Gt?await St({status:r,error:n,url:t,route:e}):await K(t)}function Tn(){let t,e;j.addEventListener("mousemove",i=>{const o=i.target;clearTimeout(t),t=setTimeout(()=>{a(o,2)},20)});function n(i){i.defaultPrevented||a(i.composedPath()[0],1)}j.addEventListener("mousedown",n),j.addEventListener("touchstart",n,{passive:!0});const r=new IntersectionObserver(i=>{for(const o of i)o.isIntersecting&&(xt(new URL(o.target.href)),r.unobserve(o.target))},{threshold:0});async function a(i,o){const c=me(i,j);if(!c||c===e)return;e=c;const{url:l,external:u,download:p}=Ct(c,P,S.hash);if(u||p)return;const y=dt(c),f=l&&vt(v.url)===vt(l);if(!y.reload&&!f)if(o<=y.preload_data){const m=await Et(l,!1);m&&kn(m)}else o<=y.preload_code&&xt(l)}function s(){r.disconnect();for(const i of j.querySelectorAll("a")){const{url:o,external:c,download:l}=Ct(i,P,S.hash);if(c||l)continue;const u=dt(i);u.reload||(u.preload_code===ht.viewport&&r.observe(i),u.preload_code===ht.eager&&xt(o))}}M.add(s),s()}function H(t,e){if(t instanceof At)return t.body;const n=pt(t),r=gn(t);return S.hooks.handleError({error:t,event:e,status:n,message:r})??{message:r}}function xn(t,e){Pt(()=>(t.add(e),()=>{t.delete(e)}))}function Hn(t){xn(M,t)}function Pn(t,e={}){return t=new URL(pe(t)),t.origin!==ut?Promise.reject(new Error("goto: invalid URL")):Ht(t,e,0)}function Cn(t){if(typeof t=="function")mt.push(t);else{const{href:e}=new URL(t,location.href);mt.push(n=>n.href===e)}}function Nn(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(ae(),!tt){const a=xe(v,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};ve.forEach(i=>i(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ae()}),(e=navigator.connection)!=null&&e.saveData||Tn(),j.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=me(n.composedPath()[0],j);if(!r)return;const{url:a,external:s,target:i,download:o}=Ct(r,P,S.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=dt(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[u,p]=(S.hash?a.hash.replace(/^#/,""):a.href).split("#"),y=u===Ut(location);if(s||c.reload&&(!y||!p)){Ie({url:a,type:"link"})?tt=!0:n.preventDefault();return}if(p!==void 0&&y){const[,f]=v.url.href.split("#");if(f===p){if(n.preventDefault(),p===""||p==="top"&&r.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const m=r.ownerDocument.getElementById(decodeURIComponent(p));m&&(m.scrollIntoView(),m.focus())}return}if(W=!0,Bt(R),t(a),!c.replace_state)return;W=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await Y({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href})}),j.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const o=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(bt(o,P,!1))return;const c=n.target,l=dt(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const u=new FormData(c),p=a==null?void 0:a.getAttribute("name");p&&u.append(p,(a==null?void 0:a.getAttribute("value"))??""),o.search=new URLSearchParams(u).toString(),Y({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href})}),addEventListener("popstate",async n=>{var r;if((r=n.state)!=null&&r[G]){const a=n.state[G];if(F={},a===R)return;const s=V[a],i=n.state[de]??{},o=new URL(n.state[Qe]??location.href),c=n.state[X],l=v.url?Ut(location)===Ut(v.url):!1;if(c===T&&(be||l)){i!==U.state&&(U.state=i),t(o),V[R]=Dt(),s&&scrollTo(s.x,s.y),R=a;return}const p=a-R;await Y({type:"popstate",url:o,popped:{state:i,scroll:s,delta:p},accept:()=>{R=a,T=c},block:()=>{history.go(-p)},nav_token:F})}else if(!W){const a=new URL(location.href);t(a)}}),addEventListener("hashchange",()=>{W?(W=!1,history.replaceState({...history.state,[G]:++R,[X]:T},"",location.href)):S.hash&&v.url.hash===location.hash&&Y({type:"goto",url:Pe(v.url)})});for(const n of document.querySelectorAll("link"))bn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&$.navigating.set(Z.current=null)});function t(n){v.url=U.url=n,$.page.set(Yt(U)),$.page.notify()}}async function On(t,{status:e=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Gt=!0;const l=new URL(location.href);let u;({params:a={},route:s={id:null}}=await Et(l,!1)||{}),u=qt.find(({id:f})=>f===s.id);let p,y=!0;try{const f=r.map(async(d,h)=>{const w=o[h];return w!=null&&w.uses&&(w.uses=Te(w.uses)),Kt({loader:S.nodes[d],url:l,params:a,route:s,parent:async()=>{const E={};for(let I=0;I<h;I+=1)Object.assign(E,(await f[I]).data);return E},server_data_node:Wt(w)})}),m=await Promise.all(f);if(u){const d=u.layouts;for(let h=0;h<d.length;h++)d[h]||m.splice(h,0,void 0)}p=_t({url:l,params:a,branch:m,status:e,error:n,form:c,route:u??null})}catch(f){if(f instanceof Ft){await K(new URL(f.location,location.href));return}p=await St({status:pt(f),error:await H(f,{url:l,params:a,route:s}),url:l,route:s}),t.textContent="",y=!1}p.props.page&&(p.props.page.state={}),ke(p,t,y)}async function Le(t,e){var s;const n=new URL(t);n.pathname=vn(t.pathname),t.pathname.endsWith("/")&&n.searchParams.append(pn,"1"),n.searchParams.append(dn,e.map(i=>i?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let i;throw(s=a.headers.get("content-type"))!=null&&s.includes("application/json")?i=await a.json():a.status===404?i="Not Found":a.status===500&&(i="Internal Error"),new At(a.status,i)}return new Promise(async i=>{var y;const o=new Map,c=a.body.getReader(),l=new TextDecoder;function u(f){return fn(f,{...S.decoders,Promise:m=>new Promise((d,h)=>{o.set(m,{fulfil:d,reject:h})})})}let p="";for(;;){const{done:f,value:m}=await c.read();if(f&&!p)break;for(p+=!m&&p?`
1
+ var Xt=t=>{throw TypeError(t)};var Ce=(t,e,n)=>e.has(t)||Xt("Cannot "+n);var A=(t,e,n)=>(Ce(t,e,"read from private field"),n?n.call(t):e.get(t)),x=(t,e,n)=>e.has(t)?Xt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{o as Pt}from"./Bk2aPQXL.js";import{n as It,aG as Ne,a7 as C,j as N,D as O,a8 as Oe}from"./60ejCBYp.js";import{a as je,b as P}from"./DStHZ7RC.js";const B=[];function jt(t,e=It){let n=null;const r=new Set;function a(o){if(Ne(t,o)&&(t=o,n)){const c=!B.length;for(const l of r)l[1](),B.push(l,t);if(c){for(let l=0;l<B.length;l+=2)B[l][0](B[l+1]);B.length=0}}}function s(o){a(o(t))}function i(o,c=It){const l=[o,c];return r.add(l),r.size===1&&(n=e(a,s)||It),o(t),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:a,update:s,subscribe:i}}new URL("sveltekit-internal://");function $e(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function De(t){return t.split("%25").map(decodeURI).join("%25")}function Fe(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function Ut({href:t}){return t.split("#")[0]}function Ve(t,e,n,r=!1){const a=new URL(t);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return l=>(n(l),i[o](l));e();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return e(),t[i]},enumerable:!0,configurable:!0});return a}function Be(...t){let e=5381;for(const n of t)if(typeof n=="string"){let r=n.length;for(;r;)e=e*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)e=e*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}function qe(t){const e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n.buffer}const Ge=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&z.delete($t(t)),Ge(t,e));const z=new Map;function Me(t,e){const n=$t(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&z.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=qe(a)),Promise.resolve(new Response(a,s))}return window.fetch(t,e)}function He(t,e,n){if(z.size>0){const r=$t(t,n),a=z.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);z.delete(r)}}return window.fetch(e,n)}function $t(t,e){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const a=[];e.headers&&a.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&a.push(e.body),r+=`[data-hash="${Be(...a)}"]`}return r}const Ke=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function We(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${ze(t).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return Lt(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return Lt(String.fromCharCode(...c.slice(2).split("-").map(d=>parseInt(d,16))));const u=Ke.exec(c),[,p,y,f,m]=u;return e.push({name:f,matcher:m,optional:!!p,rest:!!y,chained:y?l===1&&i[0]==="":!1}),y?"(.*?)":p?"([^/]*)?":"([^/]+?)"}return Lt(c)}).join("")}).join("")}/?$`),params:e}}function Ye(t){return!/^\([^)]+\)$/.test(t)}function ze(t){return t.slice(1).split("/").filter(Ye)}function Je(t,e,n){const r={},a=t.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<e.length;o+=1){const c=e[o];let l=a[o-i];if(c.chained&&c.rest&&i&&(l=a.slice(o-i,o+1).filter(u=>u).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const u=e[o+1],p=a[o+1];u&&!u.rest&&u.optional&&p&&c.chained&&(i=0),!u&&!p&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function Lt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Xe({nodes:t,server_loads:e,dictionary:n,matchers:r}){const a=new Set(e);return Object.entries(n).map(([o,[c,l,u]])=>{const{pattern:p,params:y}=We(o),f={id:o,exec:m=>{const d=p.exec(m);if(d)return Je(d,y,r)},errors:[1,...u||[]].map(m=>t[m]),layouts:[0,...l||[]].map(i),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(o){const c=o<0;return c&&(o=~o),[c,t[o]]}function i(o){return o===void 0?o:[a.has(o),t[o]]}}function fe(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function Zt(t,e,n=JSON.stringify){const r=n(e);try{sessionStorage[t]=r}catch{}}const Ze="1740166462080",ue="sveltekit:snapshot",he="sveltekit:scroll",de="sveltekit:states",Qe="sveltekit:pageurl",G="sveltekit:history",X="sveltekit:navigation",ht={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ut=location.origin;function pe(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function Dt(){return{x:pageXOffset,y:pageYOffset}}function q(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const Qt={...ht,"":ht.hover};function ge(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function me(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=ge(t)}}function Ct(t,e,n){let r;try{if(r=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,s=!r||!!a||bt(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===ut&&t.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function dt(t){let e=null,n=null,r=null,a=null,s=null,i=null,o=t;for(;o&&o!==document.documentElement;)r===null&&(r=q(o,"preload-code")),a===null&&(a=q(o,"preload-data")),e===null&&(e=q(o,"keepfocus")),n===null&&(n=q(o,"noscroll")),s===null&&(s=q(o,"reload")),i===null&&(i=q(o,"replacestate")),o=ge(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Qt[r??"off"],preload_data:Qt[a??"off"],keepfocus:c(e),noscroll:c(n),reload:c(s),replace_state:c(i)}}function te(t){const e=jt(t);let n=!0;function r(){n=!0,e.update(i=>i)}function a(i){n=!1,e.set(i)}function s(i){let o;return e.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const ye={v:()=>{}};function tn(){const{set:t,subscribe:e}=jt(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${je}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Ze;return i&&(t(!0),ye.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:e,check:r}}function bt(t,e,n){return t.origin!==ut||!t.pathname.startsWith(e)?!0:n?!(t.pathname===e+"/"||t.pathname===e+"/index.html"||t.protocol==="file:"&&t.pathname.replace(/\/[^/]+\.html?$/,"")===e):!1}function ee(t){const e=nn(t),n=new ArrayBuffer(e.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,e.charCodeAt(a));return n}const en="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function nn(t){t.length%4===0&&(t=t.replace(/==?$/,""));let e="",n=0,r=0;for(let a=0;a<t.length;a++)n<<=6,n|=en.indexOf(t[a]),r+=6,r===24&&(e+=String.fromCharCode((n&16711680)>>16),e+=String.fromCharCode((n&65280)>>8),e+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,e+=String.fromCharCode(n)):r===18&&(n>>=2,e+=String.fromCharCode((n&65280)>>8),e+=String.fromCharCode(n&255)),e}const rn=-1,an=-2,on=-3,sn=-4,cn=-5,ln=-6;function fn(t,e){if(typeof t=="number")return a(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const n=t,r=Array(n.length);function a(s,i=!1){if(s===rn)return;if(s===on)return NaN;if(s===sn)return 1/0;if(s===cn)return-1/0;if(s===ln)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],l=e==null?void 0:e[c];if(l)return r[s]=l(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const u=new Set;r[s]=u;for(let f=1;f<o.length;f+=1)u.add(a(o[f]));break;case"Map":const p=new Map;r[s]=p;for(let f=1;f<o.length;f+=2)p.set(a(o[f]),a(o[f+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const y=Object.create(null);r[s]=y;for(let f=1;f<o.length;f+=2)y[o[f]]=a(o[f+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const f=globalThis[c],m=o[1],d=ee(m),h=new f(d);r[s]=h;break}case"ArrayBuffer":{const f=o[1],m=ee(f);r[s]=m;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let l=0;l<o.length;l+=1){const u=o[l];u!==an&&(c[l]=a(u))}}else{const c={};r[s]=c;for(const l in o){const u=o[l];c[l]=a(u)}}return r[s]}return a(0)}const we=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...we];const un=new Set([...we]);[...un];function hn(t){return t.filter(e=>e!=null)}class At{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class Ft{constructor(e,n){this.status=e,this.location=n}}class Vt extends Error{constructor(e,n,r){super(r),this.status=e,this.text=n}}const dn="x-sveltekit-invalidated",pn="x-sveltekit-trailing-slash";function pt(t){return t instanceof At||t instanceof Vt?t.status:500}function gn(t){return t instanceof Vt?t.text:"Internal Error"}let U,Z,Tt;const mn=Pt.toString().includes("$$")||/function \w+\(\) \{\}/.test(Pt.toString());var et,nt,rt,at,ot,st,it,ct,ie,lt,ce,ft,le;mn?(U={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},Z={current:null},Tt={current:!1}):(U=new(ie=class{constructor(){x(this,et,C({}));x(this,nt,C(null));x(this,rt,C(null));x(this,at,C({}));x(this,ot,C({id:null}));x(this,st,C({}));x(this,it,C(-1));x(this,ct,C(new URL("https://example.com")))}get data(){return N(A(this,et))}set data(e){O(A(this,et),e)}get form(){return N(A(this,nt))}set form(e){O(A(this,nt),e)}get error(){return N(A(this,rt))}set error(e){O(A(this,rt),e)}get params(){return N(A(this,at))}set params(e){O(A(this,at),e)}get route(){return N(A(this,ot))}set route(e){O(A(this,ot),e)}get state(){return N(A(this,st))}set state(e){O(A(this,st),e)}get status(){return N(A(this,it))}set status(e){O(A(this,it),e)}get url(){return N(A(this,ct))}set url(e){O(A(this,ct),e)}},et=new WeakMap,nt=new WeakMap,rt=new WeakMap,at=new WeakMap,ot=new WeakMap,st=new WeakMap,it=new WeakMap,ct=new WeakMap,ie),Z=new(ce=class{constructor(){x(this,lt,C(null))}get current(){return N(A(this,lt))}set current(e){O(A(this,lt),e)}},lt=new WeakMap,ce),Tt=new(le=class{constructor(){x(this,ft,C(!1))}get current(){return N(A(this,ft))}set current(e){O(A(this,ft),e)}},ft=new WeakMap,le),ye.v=()=>Tt.current=!0);function yn(t){Object.assign(U,t)}const wn="/__data.json",_n=".html__data.json";function vn(t){return t.endsWith(".html")?t.replace(/\.html$/,_n):t.replace(/\/$/,"")+wn}const bn=new Set(["icon","shortcut icon","apple-touch-icon"]),V=fe(he)??{},Q=fe(ue)??{},$={url:te({}),page:te({}),navigating:jt(null),updated:tn()};function Bt(t){V[t]=Dt()}function An(t,e){let n=t+1;for(;V[n];)delete V[n],n+=1;for(n=e+1;Q[n];)delete Q[n],n+=1}function K(t){return location.href=t.href,new Promise(()=>{})}async function _e(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(P||"/");t&&await t.update()}}function ne(){}let qt,Nt,gt,j,Ot,S;const mt=[],yt=[];let L=null;const ve=new Set,Sn=new Set,M=new Set;let v={branch:[],error:null,url:null},Gt=!1,wt=!1,re=!0,tt=!1,W=!1,be=!1,Mt=!1,Ae,R,T,F;const J=new Set;async function Mn(t,e,n){var a,s,i,o;document.URL!==location.href&&(location.href=location.href),S=t,await((s=(a=t.hooks).init)==null?void 0:s.call(a)),qt=Xe(t),j=document.documentElement,Ot=e,Nt=t.nodes[0],gt=t.nodes[1],Nt(),gt(),R=(i=history.state)==null?void 0:i[G],T=(o=history.state)==null?void 0:o[X],R||(R=T=Date.now(),history.replaceState({...history.state,[G]:R,[X]:T},""));const r=V[R];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),n?await On(Ot,n):await Pn(S.hash?Pe(new URL(location.href)):location.href,{replaceState:!0}),Nn()}function En(){mt.length=0,Mt=!1}function Se(t){yt.some(e=>e==null?void 0:e.snapshot)&&(Q[t]=yt.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Ee(t){var e;(e=Q[t])==null||e.forEach((n,r)=>{var a,s;(s=(a=yt[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function ae(){Bt(R),Zt(he,V),Se(T),Zt(ue,Q)}async function Ht(t,e,n,r){return Y({type:"goto",url:pe(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:r,accept:()=>{e.invalidateAll&&(Mt=!0),e.invalidate&&e.invalidate.forEach(Cn)}})}async function kn(t){if(t.id!==(L==null?void 0:L.id)){const e={};J.add(e),L={id:t.id,token:e,promise:Re({...t,preload:e}).then(n=>(J.delete(e),n.type==="loaded"&&n.state.error&&(L=null),n))}}return L.promise}async function xt(t){var n;const e=(n=await Et(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].map(r=>r==null?void 0:r[1]()))}function ke(t,e,n){var s;v=t.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),Object.assign(U,t.props.page),Ae=new S.root({target:e,props:{...t.props,stores:$,components:yt},hydrate:n,sync:!1}),Ee(T);const a={from:null,to:{params:v.params,route:{id:((s=v.route)==null?void 0:s.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};M.forEach(i=>i(a)),wt=!0}function _t({url:t,params:e,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(P&&(t.pathname===P||t.pathname===P+"/"))o="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(o=f.slash);t.pathname=$e(t.pathname,o),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:a,route:s},props:{constructors:hn(n).map(f=>f.node.component),page:Yt(U)}};i!==void 0&&(c.props.form=i);let l={},u=!U,p=0;for(let f=0;f<Math.max(n.length,v.branch.length);f+=1){const m=n[f],d=v.branch[f];(m==null?void 0:m.data)!==(d==null?void 0:d.data)&&(u=!0),m&&(l={...l,...m.data},u&&(c.props[`data_${p}`]=l),p+=1)}return(!v.url||t.href!==v.url.href||v.error!==a||i!==void 0&&i!==U.form||u)&&(c.props.page={error:a,params:e,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(t),form:i??null,data:u?l:U.data}),c}async function Kt({loader:t,parent:e,url:n,params:r,route:a,server_data_node:s}){var u,p,y;let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await t();if((u=l.universal)!=null&&u.load){let f=function(...d){for(const h of d){const{href:w}=new URL(h,n);c.dependencies.add(w)}};const m={route:new Proxy(a,{get:(d,h)=>(o&&(c.route=!0),d[h])}),params:new Proxy(r,{get:(d,h)=>(o&&c.params.add(h),d[h])}),data:(s==null?void 0:s.data)??null,url:Ve(n,()=>{o&&(c.url=!0)},d=>{o&&c.search_params.add(d)},S.hash),async fetch(d,h){let w;d instanceof Request?(w=d.url,h={body:d.method==="GET"||d.method==="HEAD"?void 0:await d.blob(),cache:d.cache,credentials:d.credentials,headers:[...d.headers].length?d.headers:void 0,integrity:d.integrity,keepalive:d.keepalive,method:d.method,mode:d.mode,redirect:d.redirect,referrer:d.referrer,referrerPolicy:d.referrerPolicy,signal:d.signal,...h}):w=d;const E=new URL(w,n);return o&&f(E.href),E.origin===n.origin&&(w=E.href.slice(n.origin.length)),wt?He(w,E.href,h):Me(w,h)},setHeaders:()=>{},depends:f,parent(){return o&&(c.parent=!0),e()},untrack(d){o=!1;try{return d()}finally{o=!0}}};i=await l.universal.load.call(null,m)??null}return{node:l,loader:t,server:s,universal:(p=l.universal)!=null&&p.load?{type:"data",data:i,uses:c}:null,data:i??(s==null?void 0:s.data)??null,slash:((y=l.universal)==null?void 0:y.trailingSlash)??(s==null?void 0:s.slash)}}function oe(t,e,n,r,a,s){if(Mt)return!0;if(!a)return!1;if(a.parent&&t||a.route&&e||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==v.params[i])return!0;for(const i of a.dependencies)if(mt.some(o=>o(new URL(i))))return!0;return!1}function Wt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function Rn(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const r of n){const a=t.searchParams.getAll(r),s=e.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function se({error:t,url:e,route:n,params:r}){return{type:"loaded",state:{error:t,url:e,route:n,params:r,branch:[]},props:{page:Yt(U),constructors:[]}}}async function Re({id:t,invalidating:e,url:n,params:r,route:a,preload:s}){if((L==null?void 0:L.id)===t)return J.delete(L.token),L.promise;const{errors:i,layouts:o,leaf:c}=a,l=[...o,c];i.forEach(g=>g==null?void 0:g().catch(()=>{})),l.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));let u=null;const p=v.url?t!==vt(v.url):!1,y=v.route?a.id!==v.route.id:!1,f=Rn(v.url,n);let m=!1;const d=l.map((g,_)=>{var D;const b=v.branch[_],k=!!(g!=null&&g[0])&&((b==null?void 0:b.loader)!==g[1]||oe(m,y,p,f,(D=b.server)==null?void 0:D.uses,r));return k&&(m=!0),k});if(d.some(Boolean)){try{u=await Le(n,d)}catch(g){const _=await H(g,{url:n,params:r,route:{id:t}});return J.has(s)?se({error:_,url:n,params:r,route:a}):St({status:pt(g),error:_,url:n,route:a})}if(u.type==="redirect")return u}const h=u==null?void 0:u.nodes;let w=!1;const E=l.map(async(g,_)=>{var kt;if(!g)return;const b=v.branch[_],k=h==null?void 0:h[_];if((!k||k.type==="skip")&&g[1]===(b==null?void 0:b.loader)&&!oe(w,y,p,f,(kt=b.universal)==null?void 0:kt.uses,r))return b;if(w=!0,(k==null?void 0:k.type)==="error")throw k;return Kt({loader:g[1],url:n,params:r,route:a,parent:async()=>{var Jt;const zt={};for(let Rt=0;Rt<_;Rt+=1)Object.assign(zt,(Jt=await E[Rt])==null?void 0:Jt.data);return zt},server_data_node:Wt(k===void 0&&g[0]?{type:"skip"}:k??null,g[0]?b==null?void 0:b.server:void 0)})});for(const g of E)g.catch(()=>{});const I=[];for(let g=0;g<l.length;g+=1)if(l[g])try{I.push(await E[g])}catch(_){if(_ instanceof Ft)return{type:"redirect",location:_.location};if(J.has(s))return se({error:await H(_,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=pt(_),k;if(h!=null&&h.includes(_))b=_.status??b,k=_.error;else if(_ instanceof At)k=_.body;else{if(await $.updated.check())return await _e(),await K(n);k=await H(_,{params:r,url:n,route:{id:a.id}})}const D=await In(g,I,i);return D?_t({url:n,params:r,branch:I.slice(0,D.idx).concat(D.node),status:b,error:k,route:a}):await Ue(n,{id:a.id},k,b)}else I.push(void 0);return _t({url:n,params:r,branch:I,status:200,error:null,route:a,form:e?void 0:null})}async function In(t,e,n){for(;t--;)if(n[t]){let r=t;for(;!e[r];)r-=1;try{return{idx:r+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function St({status:t,error:e,url:n,route:r}){const a={};let s=null;if(S.server_loads[0]===0)try{const o=await Le(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==ut||n.pathname!==location.pathname||Gt)&&await K(n)}try{const o=await Kt({loader:Nt,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Wt(s)}),c={node:await gt(),loader:gt,universal:null,server:null,data:null};return _t({url:n,params:a,branch:[o,c],status:t,error:e,route:null})}catch(o){if(o instanceof Ft)return Ht(new URL(o.location,location.href),{},0);throw o}}function Un(t){let e;try{if(e=S.hooks.reroute({url:new URL(t)})??t,typeof e=="string"){const n=new URL(t);S.hash?n.hash=e:n.pathname=e,e=n}}catch{return}return e}async function Et(t,e){if(t&&!bt(t,P,S.hash)){const n=Un(t);if(!n)return;const r=Ln(n);for(const a of qt){const s=a.exec(r);if(s)return{id:vt(t),invalidating:e,route:a,params:Fe(s),url:t}}}}function Ln(t){return De(S.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(P.length))||"/"}function vt(t){return(S.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Ie({url:t,type:e,intent:n,delta:r}){let a=!1;const s=xe(v,n,t,e);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return tt||ve.forEach(o=>o(i)),a?null:s}async function Y({type:t,url:e,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:l=ne,block:u=ne}){const p=F;F=c;const y=await Et(e,!1),f=Ie({url:e,type:t,delta:n==null?void 0:n.delta,intent:y});if(!f){u(),F===c&&(F=p);return}const m=R,d=T;l(),tt=!0,wt&&$.navigating.set(Z.current=f.navigation);let h=y&&await Re(y);if(!h){if(bt(e,P,S.hash))return await K(e);h=await Ue(e,{id:null},await H(new Vt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404)}if(e=(y==null?void 0:y.url)||e,F!==c)return f.reject(new Error("navigation aborted")),!1;if(h.type==="redirect")if(o>=20)h=await St({status:500,error:await H(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}});else return await Ht(new URL(h.location,e).href,{},o+1,c),!1;else h.props.page.status>=400&&await $.updated.check()&&(await _e(),await K(e));if(En(),Bt(m),Se(d),h.props.page.url.pathname!==e.pathname&&(e.pathname=h.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,_={[G]:R+=g,[X]:T+=g,[de]:i};(s?history.replaceState:history.pushState).call(history,_,"",e),s||An(R,T)}if(L=null,h.props.page.state=i,wt){v=h.state,h.props.page&&(h.props.page.url=e);const g=(await Promise.all(Array.from(Sn,_=>_(f.navigation)))).filter(_=>typeof _=="function");if(g.length>0){let _=function(){g.forEach(b=>{M.delete(b)})};g.push(_),g.forEach(b=>{M.add(b)})}Ae.$set(h.props),yn(h.props.page),be=!0}else ke(h,Ot,!1);const{activeElement:w}=document;await Oe();const E=n?n.scroll:a?Dt():null;if(re){const g=e.hash&&document.getElementById(decodeURIComponent(S.hash?e.hash.split("#")[2]??"":e.hash.slice(1)));E?scrollTo(E.x,E.y):g?g.scrollIntoView():scrollTo(0,0)}const I=document.activeElement!==w&&document.activeElement!==document.body;!r&&!I&&jn(),re=!0,h.props.page&&Object.assign(U,h.props.page),tt=!1,t==="popstate"&&Ee(T),f.fulfil(void 0),M.forEach(g=>g(f.navigation)),$.navigating.set(Z.current=null)}async function Ue(t,e,n,r){return t.origin===ut&&t.pathname===location.pathname&&!Gt?await St({status:r,error:n,url:t,route:e}):await K(t)}function Tn(){let t,e;j.addEventListener("mousemove",i=>{const o=i.target;clearTimeout(t),t=setTimeout(()=>{a(o,2)},20)});function n(i){i.defaultPrevented||a(i.composedPath()[0],1)}j.addEventListener("mousedown",n),j.addEventListener("touchstart",n,{passive:!0});const r=new IntersectionObserver(i=>{for(const o of i)o.isIntersecting&&(xt(new URL(o.target.href)),r.unobserve(o.target))},{threshold:0});async function a(i,o){const c=me(i,j);if(!c||c===e)return;e=c;const{url:l,external:u,download:p}=Ct(c,P,S.hash);if(u||p)return;const y=dt(c),f=l&&vt(v.url)===vt(l);if(!y.reload&&!f)if(o<=y.preload_data){const m=await Et(l,!1);m&&kn(m)}else o<=y.preload_code&&xt(l)}function s(){r.disconnect();for(const i of j.querySelectorAll("a")){const{url:o,external:c,download:l}=Ct(i,P,S.hash);if(c||l)continue;const u=dt(i);u.reload||(u.preload_code===ht.viewport&&r.observe(i),u.preload_code===ht.eager&&xt(o))}}M.add(s),s()}function H(t,e){if(t instanceof At)return t.body;const n=pt(t),r=gn(t);return S.hooks.handleError({error:t,event:e,status:n,message:r})??{message:r}}function xn(t,e){Pt(()=>(t.add(e),()=>{t.delete(e)}))}function Hn(t){xn(M,t)}function Pn(t,e={}){return t=new URL(pe(t)),t.origin!==ut?Promise.reject(new Error("goto: invalid URL")):Ht(t,e,0)}function Cn(t){if(typeof t=="function")mt.push(t);else{const{href:e}=new URL(t,location.href);mt.push(n=>n.href===e)}}function Nn(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(ae(),!tt){const a=xe(v,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};ve.forEach(i=>i(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ae()}),(e=navigator.connection)!=null&&e.saveData||Tn(),j.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=me(n.composedPath()[0],j);if(!r)return;const{url:a,external:s,target:i,download:o}=Ct(r,P,S.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=dt(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[u,p]=(S.hash?a.hash.replace(/^#/,""):a.href).split("#"),y=u===Ut(location);if(s||c.reload&&(!y||!p)){Ie({url:a,type:"link"})?tt=!0:n.preventDefault();return}if(p!==void 0&&y){const[,f]=v.url.href.split("#");if(f===p){if(n.preventDefault(),p===""||p==="top"&&r.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const m=r.ownerDocument.getElementById(decodeURIComponent(p));m&&(m.scrollIntoView(),m.focus())}return}if(W=!0,Bt(R),t(a),!c.replace_state)return;W=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await Y({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href})}),j.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const o=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(bt(o,P,!1))return;const c=n.target,l=dt(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const u=new FormData(c),p=a==null?void 0:a.getAttribute("name");p&&u.append(p,(a==null?void 0:a.getAttribute("value"))??""),o.search=new URLSearchParams(u).toString(),Y({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href})}),addEventListener("popstate",async n=>{var r;if((r=n.state)!=null&&r[G]){const a=n.state[G];if(F={},a===R)return;const s=V[a],i=n.state[de]??{},o=new URL(n.state[Qe]??location.href),c=n.state[X],l=v.url?Ut(location)===Ut(v.url):!1;if(c===T&&(be||l)){i!==U.state&&(U.state=i),t(o),V[R]=Dt(),s&&scrollTo(s.x,s.y),R=a;return}const p=a-R;await Y({type:"popstate",url:o,popped:{state:i,scroll:s,delta:p},accept:()=>{R=a,T=c},block:()=>{history.go(-p)},nav_token:F})}else if(!W){const a=new URL(location.href);t(a)}}),addEventListener("hashchange",()=>{W?(W=!1,history.replaceState({...history.state,[G]:++R,[X]:T},"",location.href)):S.hash&&v.url.hash===location.hash&&Y({type:"goto",url:Pe(v.url)})});for(const n of document.querySelectorAll("link"))bn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&$.navigating.set(Z.current=null)});function t(n){v.url=U.url=n,$.page.set(Yt(U)),$.page.notify()}}async function On(t,{status:e=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Gt=!0;const l=new URL(location.href);let u;({params:a={},route:s={id:null}}=await Et(l,!1)||{}),u=qt.find(({id:f})=>f===s.id);let p,y=!0;try{const f=r.map(async(d,h)=>{const w=o[h];return w!=null&&w.uses&&(w.uses=Te(w.uses)),Kt({loader:S.nodes[d],url:l,params:a,route:s,parent:async()=>{const E={};for(let I=0;I<h;I+=1)Object.assign(E,(await f[I]).data);return E},server_data_node:Wt(w)})}),m=await Promise.all(f);if(u){const d=u.layouts;for(let h=0;h<d.length;h++)d[h]||m.splice(h,0,void 0)}p=_t({url:l,params:a,branch:m,status:e,error:n,form:c,route:u??null})}catch(f){if(f instanceof Ft){await K(new URL(f.location,location.href));return}p=await St({status:pt(f),error:await H(f,{url:l,params:a,route:s}),url:l,route:s}),t.textContent="",y=!1}p.props.page&&(p.props.page.state={}),ke(p,t,y)}async function Le(t,e){var s;const n=new URL(t);n.pathname=vn(t.pathname),t.pathname.endsWith("/")&&n.searchParams.append(pn,"1"),n.searchParams.append(dn,e.map(i=>i?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let i;throw(s=a.headers.get("content-type"))!=null&&s.includes("application/json")?i=await a.json():a.status===404?i="Not Found":a.status===500&&(i="Internal Error"),new At(a.status,i)}return new Promise(async i=>{var y;const o=new Map,c=a.body.getReader(),l=new TextDecoder;function u(f){return fn(f,{...S.decoders,Promise:m=>new Promise((d,h)=>{o.set(m,{fulfil:d,reject:h})})})}let p="";for(;;){const{done:f,value:m}=await c.read();if(f&&!p)break;for(p+=!m&&p?`
2
2
  `:l.decode(m,{stream:!0});;){const d=p.indexOf(`
3
3
  `);if(d===-1)break;const h=JSON.parse(p.slice(0,d));if(p=p.slice(d+1),h.type==="redirect")return i(h);if(h.type==="data")(y=h.nodes)==null||y.forEach(w=>{(w==null?void 0:w.type)==="data"&&(w.uses=Te(w.uses),w.data=u(w.data))}),i(h);else if(h.type==="chunk"){const{id:w,data:E,error:I}=h,g=o.get(w);o.delete(w),I?g.reject(u(I)):g.fulfil(u(E))}}}})}function Te(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}function jn(){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const e=document.body,n=e.getAttribute("tabindex");e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),n!==null?e.setAttribute("tabindex",n):e.removeAttribute("tabindex");const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const i=a[s],o=r.getRangeAt(s);if(i.commonAncestorContainer!==o.commonAncestorContainer||i.startContainer!==o.startContainer||i.endContainer!==o.endContainer||i.startOffset!==o.startOffset||i.endOffset!==o.endOffset)return}r.removeAllRanges()}})}}}function xe(t,e,n,r){var c,l;let a,s;const i=new Promise((u,p)=>{a=u,s=p});return i.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((l=e==null?void 0:e.route)==null?void 0:l.id)??null},url:n},willUnload:!e,type:r,complete:i},fulfil:a,reject:s}}function Yt(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function Pe(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}export{At as H,Hn as a,Mn as b,Pn as g,U as p,$ as s};
@@ -1 +1 @@
1
- import{k as m,o as _,u as i,q as l,m as k,v as h,j as g,w as v,x as b}from"./60ejCBYp.js";import{s as x,p as c}from"./9q6So200.js";function q(r=!1){const t=m,e=t.l.u;if(!e)return;let a=()=>v(t.s);if(r){let n=0,s={};const d=b(()=>{let u=!1;const f=t.s;for(const o in f)f[o]!==s[o]&&(s[o]=f[o],u=!0);return u&&n++,n});a=()=>g(d)}e.b.length&&_(()=>{p(t,a),l(e.b)}),i(()=>{const n=k(()=>e.m.map(h));return()=>{for(const s of n)typeof s=="function"&&s()}}),e.a.length&&i(()=>{p(t,a),l(e.a)})}function p(r,t){if(r.l.s)for(const e of r.l.s)g(e);t()}const y={get error(){return c.error},get status(){return c.status},get url(){return c.url}};x.updated.check;const w=y;export{q as i,w as p};
1
+ import{k as m,o as _,u as i,q as l,m as k,v as h,j as g,w as v,x as b}from"./60ejCBYp.js";import{s as x,p as c}from"./D6b7pR07.js";function q(r=!1){const t=m,e=t.l.u;if(!e)return;let a=()=>v(t.s);if(r){let n=0,s={};const d=b(()=>{let u=!1;const f=t.s;for(const o in f)f[o]!==s[o]&&(s[o]=f[o],u=!0);return u&&n++,n});a=()=>g(d)}e.b.length&&_(()=>{p(t,a),l(e.b)}),i(()=>{const n=k(()=>e.m.map(h));return()=>{for(const s of n)typeof s=="function"&&s()}}),e.a.length&&i(()=>{p(t,a),l(e.a)})}function p(r,t){if(r.l.s)for(const e of r.l.s)g(e);t()}const y={get error(){return c.error},get status(){return c.status},get url(){return c.url}};x.updated.check;const w=y;export{q as i,w as p};
@@ -0,0 +1 @@
1
+ var s;const a=((s=globalThis.__sveltekit_lfm7ge)==null?void 0:s.base)??"";var e;const t=((e=globalThis.__sveltekit_lfm7ge)==null?void 0:e.assets)??a;export{t as a,a as b};
@@ -1,4 +1,4 @@
1
- var Et=Object.defineProperty;var bt=(s,e,_)=>e in s?Et(s,e,{enumerable:!0,configurable:!0,writable:!0,value:_}):s[e]=_;var G=(s,e,_)=>bt(s,typeof e!="symbol"?e+"":e,_);import{p as t,a as z,b as xe,c as $e,d as _e,f as L,g as J,h as B,E as re,j as U,r as ae,k as P,l as ge,m as le,n as ve,o as X,q as Le,t as He,u as De,v as At,w as Me,x as Ke,y as kt,z as Se,A as ye,B as Oe,C as ze,S as ke,D as Rt}from"./DVXf0BbA.js";var Nt=class{constructor(s,e,_,o,i){G(this,"base_center_x");G(this,"base_center_y");G(this,"base_radius");G(this,"initial_angle");G(this,"right_nleft");this.base_center_x=s,this.base_center_y=e,this.base_radius=_,this.initial_angle=o,this.right_nleft=i}angleSign(){return this.right_nleft?1:-1}lFromU(s){return this.base_radius*Math.sqrt(1+s**2)}wFromU(s){if(s<0)throw`err729: involute parameter au ${s} is negative`;if(Math.abs(s)>Math.PI/2)throw`err730: involute parameter au ${s} is larger than PI/2`;return this.angleSign()*(s-Math.atan(s))}w2FromU(s){return this.initial_angle+this.wFromU(s)}ptc(s){const e=this.lFromU(s),_=this.w2FromU(s),o=this.base_center_x+Math.cos(_)*e,i=this.base_center_y+Math.sin(_)*e;return[o,i]}ptcta(s){return this.initial_angle+this.angleSign()*s}uFromL(s){return Math.sqrt(s**2/this.base_radius**2-1)}uFromWslow(s){let _=Math.PI/3,o=_/2,i=this.wFromU(_),d=0;for(;Math.abs(i-s)>1e-4;)i<s?_+=o:_-=o,i=this.wFromU(_),o=o/2,d+=1;return console.log(`dbg072: uFromWslow itcnt ${d}`),_}laptc(s,e,_,o){if(Math.sign(e)*this.angleSign()<0)throw`err904: Invole.laptc angle-of-pressure ${e} not compatible with right_nleft ${this.right_nleft}`;const i=s+e,d=this.base_center_x+Math.cos(i)*this.base_radius,c=this.base_center_y+Math.sin(i)*this.base_radius,n=i-this.angleSign()*Math.PI/2,l=_*this.base_radius,h=d+Math.cos(n)*l,a=c+Math.sin(n)*l,g=this.lFromU(_)*o,r=_,u=Math.cos(r)*g,f=Math.sin(r)*g;return[h,a,u,f]}};function Ee(s,e,_,o,i){return new Nt(s,e,_,o,i)}var Ct=class{constructor(){G(this,"mod",1);G(this,"TN",23);G(this,"as",1);G(this,"cx",0);G(this,"cy",0);G(this,"brr",50);G(this,"blr",50);G(this,"ar",54);G(this,"pr",53);G(this,"dr",52);G(this,"br",51);G(this,"bRound",1);G(this,"adt",.5);G(this,"initAngle",0);G(this,"axisAngle",0);G(this,"involArcPairs",1);G(this,"skinThickness",0);G(this,"involuteR",Ee(0,0,50,0,!0));G(this,"involuteL",Ee(0,0,50,0,!1));G(this,"rud",0);G(this,"rup",0);G(this,"rua",0);G(this,"rwd",0);G(this,"rwp",0);G(this,"rwa",0);G(this,"lud",0);G(this,"lup",0);G(this,"lua",0);G(this,"lwd",0);G(this,"lwp",0);G(this,"lwa",0);G(this,"msg");G(this,"initStep",0);this.mod=1,this.msg="",this.initStep=0}incInitStep(s){if(this.initStep+1!==s)throw`err834: incInitStep initStep ${this.initStep} and target ${s} are not compatible`;this.initStep=s}checkInitStep(s,e){if(this.initStep<s)throw`err835: checkInitStep for ${e} initStep ${this.initStep} is too small compare to targetMin ${s}`}set1ModuleToothNumber(s,e){this.incInitStep(1),this.mod=s,this.TN=e,this.pr=this.mod*this.TN/2,this.as=2*Math.PI/this.TN}set2CenterPosition(s,e){this.incInitStep(2),this.cx=s,this.cy=e}set3CircleRadius(s,e,_,o){this.incInitStep(3),this.ar=this.pr+this.mod*s,this.dr=this.pr-this.mod*e,this.br=this.dr-this.mod*_,this.bRound=o}set4BaseCircles(s,e){this.incInitStep(4),this.brr=s,this.blr=e}set5AddendumThickness(s){this.incInitStep(5),this.adt=s/100}set6Angles(s,e){this.incInitStep(6),this.initAngle=s,this.axisAngle=e}set7InvoluteDetails(s,e){this.incInitStep(7),this.involArcPairs=s,this.skinThickness=e}getRefCircles(){return this.checkInitStep(4,"getRefCircles"),[P(this.cx,this.cy,this.ar,"Azure"),P(this.cx,this.cy,this.pr,"Azure"),P(this.cx,this.cy,this.dr,"Azure"),P(this.cx,this.cy,this.br,"Azure"),P(this.cx,this.cy,this.brr,"CornFlowerBlue"),P(this.cx,this.cy,this.blr,"Crimson")]}calcInvoluteAngles(){this.checkInitStep(4,"calcInvoluteAngles"),this.involuteR=Ee(this.cx,this.cy,this.brr,0,!0),this.dr>this.brr?this.rud=this.involuteR.uFromL(this.dr):this.rud=0,this.rup=this.involuteR.uFromL(this.pr),this.rua=this.involuteR.uFromL(this.ar),this.rwd=this.involuteR.wFromU(this.rud),this.rwp=this.involuteR.wFromU(this.rup),this.rwa=this.involuteR.wFromU(this.rua),this.involuteL=Ee(this.cx,this.cy,this.blr,0,!1),this.dr>this.blr?this.lud=this.involuteL.uFromL(this.dr):this.lud=0,this.lup=this.involuteL.uFromL(this.pr),this.lua=this.involuteL.uFromL(this.ar),this.lwd=this.involuteL.wFromU(this.lud),this.lwp=this.involuteL.wFromU(this.lup),this.lwa=this.involuteL.wFromU(this.lua)}checkProfileConditions(){const s=this.as*this.adt,e=this.rwa-this.rwp,_=Math.abs(this.lwa-this.lwp),o=s-e-_;if(o<0)throw`err554: No remaining Addendum reserve ${L(o)}
1
+ var Et=Object.defineProperty;var bt=(s,e,_)=>e in s?Et(s,e,{enumerable:!0,configurable:!0,writable:!0,value:_}):s[e]=_;var G=(s,e,_)=>bt(s,typeof e!="symbol"?e+"":e,_);import{p as t,a as z,b as xe,c as $e,d as _e,f as L,g as J,h as B,E as re,j as U,r as ae,k as P,l as ge,m as le,n as ve,o as X,q as Le,t as He,u as De,v as At,w as Me,x as Ke,y as kt,z as Se,A as ye,B as Oe,C as ze,S as ke,D as Rt}from"./UFE6jN6v.js";var Nt=class{constructor(s,e,_,o,i){G(this,"base_center_x");G(this,"base_center_y");G(this,"base_radius");G(this,"initial_angle");G(this,"right_nleft");this.base_center_x=s,this.base_center_y=e,this.base_radius=_,this.initial_angle=o,this.right_nleft=i}angleSign(){return this.right_nleft?1:-1}lFromU(s){return this.base_radius*Math.sqrt(1+s**2)}wFromU(s){if(s<0)throw`err729: involute parameter au ${s} is negative`;if(Math.abs(s)>Math.PI/2)throw`err730: involute parameter au ${s} is larger than PI/2`;return this.angleSign()*(s-Math.atan(s))}w2FromU(s){return this.initial_angle+this.wFromU(s)}ptc(s){const e=this.lFromU(s),_=this.w2FromU(s),o=this.base_center_x+Math.cos(_)*e,i=this.base_center_y+Math.sin(_)*e;return[o,i]}ptcta(s){return this.initial_angle+this.angleSign()*s}uFromL(s){return Math.sqrt(s**2/this.base_radius**2-1)}uFromWslow(s){let _=Math.PI/3,o=_/2,i=this.wFromU(_),d=0;for(;Math.abs(i-s)>1e-4;)i<s?_+=o:_-=o,i=this.wFromU(_),o=o/2,d+=1;return console.log(`dbg072: uFromWslow itcnt ${d}`),_}laptc(s,e,_,o){if(Math.sign(e)*this.angleSign()<0)throw`err904: Invole.laptc angle-of-pressure ${e} not compatible with right_nleft ${this.right_nleft}`;const i=s+e,d=this.base_center_x+Math.cos(i)*this.base_radius,c=this.base_center_y+Math.sin(i)*this.base_radius,n=i-this.angleSign()*Math.PI/2,l=_*this.base_radius,h=d+Math.cos(n)*l,a=c+Math.sin(n)*l,g=this.lFromU(_)*o,r=_,u=Math.cos(r)*g,f=Math.sin(r)*g;return[h,a,u,f]}};function Ee(s,e,_,o,i){return new Nt(s,e,_,o,i)}var Ct=class{constructor(){G(this,"mod",1);G(this,"TN",23);G(this,"as",1);G(this,"cx",0);G(this,"cy",0);G(this,"brr",50);G(this,"blr",50);G(this,"ar",54);G(this,"pr",53);G(this,"dr",52);G(this,"br",51);G(this,"bRound",1);G(this,"adt",.5);G(this,"initAngle",0);G(this,"axisAngle",0);G(this,"involArcPairs",1);G(this,"skinThickness",0);G(this,"involuteR",Ee(0,0,50,0,!0));G(this,"involuteL",Ee(0,0,50,0,!1));G(this,"rud",0);G(this,"rup",0);G(this,"rua",0);G(this,"rwd",0);G(this,"rwp",0);G(this,"rwa",0);G(this,"lud",0);G(this,"lup",0);G(this,"lua",0);G(this,"lwd",0);G(this,"lwp",0);G(this,"lwa",0);G(this,"msg");G(this,"initStep",0);this.mod=1,this.msg="",this.initStep=0}incInitStep(s){if(this.initStep+1!==s)throw`err834: incInitStep initStep ${this.initStep} and target ${s} are not compatible`;this.initStep=s}checkInitStep(s,e){if(this.initStep<s)throw`err835: checkInitStep for ${e} initStep ${this.initStep} is too small compare to targetMin ${s}`}set1ModuleToothNumber(s,e){this.incInitStep(1),this.mod=s,this.TN=e,this.pr=this.mod*this.TN/2,this.as=2*Math.PI/this.TN}set2CenterPosition(s,e){this.incInitStep(2),this.cx=s,this.cy=e}set3CircleRadius(s,e,_,o){this.incInitStep(3),this.ar=this.pr+this.mod*s,this.dr=this.pr-this.mod*e,this.br=this.dr-this.mod*_,this.bRound=o}set4BaseCircles(s,e){this.incInitStep(4),this.brr=s,this.blr=e}set5AddendumThickness(s){this.incInitStep(5),this.adt=s/100}set6Angles(s,e){this.incInitStep(6),this.initAngle=s,this.axisAngle=e}set7InvoluteDetails(s,e){this.incInitStep(7),this.involArcPairs=s,this.skinThickness=e}getRefCircles(){return this.checkInitStep(4,"getRefCircles"),[P(this.cx,this.cy,this.ar,"Azure"),P(this.cx,this.cy,this.pr,"Azure"),P(this.cx,this.cy,this.dr,"Azure"),P(this.cx,this.cy,this.br,"Azure"),P(this.cx,this.cy,this.brr,"CornFlowerBlue"),P(this.cx,this.cy,this.blr,"Crimson")]}calcInvoluteAngles(){this.checkInitStep(4,"calcInvoluteAngles"),this.involuteR=Ee(this.cx,this.cy,this.brr,0,!0),this.dr>this.brr?this.rud=this.involuteR.uFromL(this.dr):this.rud=0,this.rup=this.involuteR.uFromL(this.pr),this.rua=this.involuteR.uFromL(this.ar),this.rwd=this.involuteR.wFromU(this.rud),this.rwp=this.involuteR.wFromU(this.rup),this.rwa=this.involuteR.wFromU(this.rua),this.involuteL=Ee(this.cx,this.cy,this.blr,0,!1),this.dr>this.blr?this.lud=this.involuteL.uFromL(this.dr):this.lud=0,this.lup=this.involuteL.uFromL(this.pr),this.lua=this.involuteL.uFromL(this.ar),this.lwd=this.involuteL.wFromU(this.lud),this.lwp=this.involuteL.wFromU(this.lup),this.lwa=this.involuteL.wFromU(this.lua)}checkProfileConditions(){const s=this.as*this.adt,e=this.rwa-this.rwp,_=Math.abs(this.lwa-this.lwp),o=s-e-_;if(o<0)throw`err554: No remaining Addendum reserve ${L(o)}
2
2
  `;const i=this.as*(1-this.adt),d=this.rwp-this.rwd,c=Math.abs(this.lwp-this.lwd),n=i-d-c;if(n<2*Math.atan2(this.bRound,this.br))throw`err555: No remaining Dedendum reserve ${L(n)} compare to bRound ${L(this.bRound)}
3
3
  `}getToothRef(){const s=6*this.involArcPairs,e=0;this.checkInitStep(7,"getProfile"),this.calcInvoluteAngles();const _=(this.rua-this.rud)/s,o=(this.lua-this.lud)/s,i=this.initAngle+e*this.as,d=Ee(this.cx,this.cy,this.brr,i-this.rwp,!0),[c,n]=d.ptc(this.rud+0*_),l=J(c,n,"Gold");for(let S=0;S<s;S++){const[g,r]=d.ptc(this.rud+(S+1)*_);l.addSegStrokeA(g,r)}const h=i+this.as*this.adt,a=Ee(this.cx,this.cy,this.blr,h-this.lwp,!1);for(let S=0;S<s+1;S++){const[g,r]=a.ptc(this.lud+(s-S)*o);l.addSegStrokeA(g,r)}return l.closeSegStroke(),l}getProfile(){this.checkInitStep(7,"getProfile"),this.calcInvoluteAngles(),this.checkProfileConditions();const s=this.rwd-this.rwp,e=this.lwd-this.lwp,_=this.dr>this.brr?this.dr:this.brr,o=this.dr>this.blr?this.dr:this.blr;if(this.bRound>_-this.br)throw`err409: getProfile bRound ${L(this.bRound)} too large for erdr ${L(_)} and br ${L(this.br)}`;if(this.bRound>o-this.br)throw`err408: getProfile bRound ${L(this.bRound)} too large for eldr ${L(o)} and br ${L(this.br)}`;const i=(this.rua-this.rud)/this.involArcPairs,d=(this.lua-this.lud)/this.involArcPairs,c=le(this.cx,this.cy),n=c.translatePolar(this.initAngle+s,this.br),l=J(n.cx,n.cy);for(let h=0;h<this.TN;h++){const a=this.initAngle+h*this.as,S=c.translatePolar(a+s,this.br);l.addSegStrokeA(S.cx,S.cy).addCornerRounded(this.bRound);const g=Ee(this.cx,this.cy,this.brr,a-this.rwp,!0),[r,u]=g.ptc(this.rud),f=g.ptcta(this.rud),H=le(r,u).translatePolar(f-Math.PI/2,this.skinThickness);l.addSegStrokeA(H.cx,H.cy);for(let x=0;x<this.involArcPairs;x++){const O=this.rud+x*i,[C,$]=g.ptc(O+i),m=g.ptcta(O),q=g.ptcta(O+i)+Math.PI,F=le(C,$).translatePolar(m-Math.PI/2,this.skinThickness);l.addPointA(F.cx,F.cy).addSeg2Arcs(m,q)}const k=a+this.as*this.adt,M=Ee(this.cx,this.cy,this.blr,k-this.lwp,!1),D=this.lud+this.involArcPairs*d,[b,N]=M.ptc(D),R=M.ptcta(D)+Math.PI,v=le(b,N).translatePolar(R-Math.PI/2,this.skinThickness);l.addSegStrokeA(v.cx,v.cy);for(let x=0;x<this.involArcPairs;x++){const O=this.lud+(this.involArcPairs-x)*d,[C,$]=M.ptc(O-d),m=M.ptcta(O)+Math.PI,q=M.ptcta(O-d),F=le(C,$).translatePolar(m-Math.PI/2,this.skinThickness);l.addPointA(F.cx,F.cy).addSeg2Arcs(m,q)}const E=c.translatePolar(k+e,this.br);l.addSegStrokeA(E.cx,E.cy).addCornerRounded(this.bRound)}return l.closeSegStroke(),l}getMsg(){return this.msg}};function Qe(){return new Ct}function It(s,e,_,o){s.checkInitStep(1,"helper.gw2center-1"),e.checkInitStep(1,"helper.gw2center-2");const i=s.pr+e.pr+o,d=s.cx+i*Math.cos(_),c=s.cy+i*Math.sin(_);return[d,c,i]}function Vt(s,e,_,o,i,d,c,n,l,h,a){s.checkInitStep(3,"helper.baseCircles-1"),e.checkInitStep(3,"helper.baseCircles-2");let S=_,g=i,r=o,u=d;const f=s.pr+e.pr,H=h,k=a;switch(H){case 0:e.TN>s.TN?(S=s.dr,g=S*e.TN/s.TN):(g=e.dr,S=g*s.TN/e.TN);break;case 1:g=S*e.TN/s.TN;break;case 2:S=g*s.TN/e.TN;break;case 3:S=f*s.TN/(s.TN+e.TN)*Math.cos(ve(c)),g=S*e.TN/s.TN;break;case 4:break;default:console.log(`err337: involROpt2 case ${H} is not implemented!`)}switch(k){case 0:e.TN>s.TN?(r=s.dr,u=r*e.TN/s.TN):(u=e.dr,r=u*s.TN/e.TN);break;case 1:u=r*e.TN/s.TN;break;case 2:r=u*s.TN/e.TN;break;case 3:r=f*s.TN/(s.TN+e.TN)*Math.cos(ve(n)),u=r*e.TN/s.TN;break;case 4:break;default:console.log(`err358: involLOpt2 case ${k} is not implemented!`)}return l===1&&(r=S,u=g),[S,r,g,u]}var Bt=class{constructor(s,e,_,o,i,d){G(this,"gw1");G(this,"gw2");G(this,"initAngle1");G(this,"angleCenterCenter");G(this,"interAxis");G(this,"rightLeftCenter2");G(this,"msg");G(this,"apr");G(this,"apl");G(this,"lBDr",0);G(this,"lBDl",0);G(this,"laStartRr1",0);G(this,"laStartRr2",0);G(this,"laStartRl1",0);G(this,"laStartRl2",0);G(this,"aFODr1",0);G(this,"aFODr2",0);G(this,"aFODl1",0);G(this,"aFODl2",0);G(this,"lasr1",0);G(this,"lasr2",0);G(this,"lasl1",0);G(this,"lasl2",0);G(this,"firstToothUr1",0);G(this,"firstToothUl1",0);G(this,"ftdr1",0);G(this,"ftdl1",0);this.gw1=s,this.gw2=e,this.initAngle1=_,this.angleCenterCenter=o,this.interAxis=i,this.rightLeftCenter2=d,this.msg="",this.apr=0,this.apl=0}check1(){this.gw1.checkInitStep(4,"ActionLine.check1-1"),this.gw2.checkInitStep(4,"ActionLine.check1-2"),this.interAxis>this.gw1.ar+this.gw2.ar&&(this.msg+=`warn333: initAngle2 interAxis ${L(this.interAxis)} is too large compare to gw1.ar ${L(this.gw1.ar)} and gw2.ar ${L(this.gw2.ar)}
4
4
  `),Se(this.gw1.brr*this.gw2.TN-this.gw2.brr*this.gw1.TN)!==0&&(this.msg+=`warn407: right ratios differ N1/N2 = ${this.gw1.TN} / ${this.gw2.TN} = ${L(this.gw1.TN/this.gw2.TN)} and brr1/brr2 = ${L(this.gw1.brr)}/${L(this.gw2.brr)} = ${L(this.gw1.brr/this.gw2.brr)}
@@ -58,7 +58,7 @@ ${Ue(s)}
58
58
  ENDSEC
59
59
  0
60
60
  EOF
61
- `}stringify(){return this.close(),this.dxfStr}};function q0(){return new U0}function j0(e,n,t){return{circle:!0,cx:e,cy:n,radius:t}}var W0=class{constructor(){M(this,"seg");this.seg=[]}addStart(e,n){this.seg=[];const t={typ:0,px:e,py:n};this.seg.push(t)}addStroke(e,n){const t={typ:1,px:e,py:n};this.seg.push(t)}addArc(e,n,t,r,s){const i={typ:2,px:e,py:n,radius:t,large:r,ccw:s};this.seg.push(i)}toJson(){return{circle:!1,seg:this.seg}}};function H0(){return new W0}var No=class{};function Ro(e,n,t,r){const s=Mt(e,n,t),i=Z(s.pc.cx,s.pc.cy),o=yt(s.a2-s.a1),u=(t.arcCcw?o:o-2*Math.PI)/r,l=[];for(let c=1;c<r;c++)l.push(i.translatePolar(s.a1+c*u,t.radius));return l}var Y0=class kt extends No{constructor(t,r,s=""){super();M(this,"circle",!1);M(this,"segments");M(this,"points");M(this,"debugPoints");M(this,"debugLines");M(this,"lastPoint");M(this,"imposedColor");this.segments=[new et(6,t,r,0)],this.points=[],this.debugPoints=[],this.debugLines=[],this.lastPoint=Z(t,r),this.imposedColor=s}setLastPoint(t,r){this.lastPoint=Z(t,r)}getLastPoint(){return this.lastPoint}getFirstPoint(){return Z(this.segments[0].px,this.segments[0].py)}addPointA(t,r){if(this.points.length>2)throw`err311: contour add too much point ${t} ${r}`;return this.points.push(Z(t,r)),this}addPointAP(t,r){const s=Z(0,0).translatePolar(t,r);return this.addPointA(s.cx,s.cy),this}addPointR(t,r){const i=this.getLastPoint().translate(t,r);return this.addPointA(i.cx,i.cy),this}addPointRP(t,r){const i=this.getLastPoint().translatePolar(t,r);return this.addPointA(i.cx,i.cy),this}addSeg(t){return this.segments.push(t),this}addSegStroke(){if(this.points.length!==1)throw`err554: contour addSegStroke with unexpected points.length ${this.points.length}`;const t=this.points.pop();if(t!==void 0){const r=new et(0,t.cx,t.cy,0);t.isEqual(this.getLastPoint())||(this.addSeg(r),this.setLastPoint(t.cx,t.cy))}else throw"err284: contour p1 is undefined";return this}addSegStrokeA(t,r){return this.addPointA(t,r).addSegStroke(),this}addSegStrokeAP(t,r){return this.addPointAP(t,r).addSegStroke(),this}addSegStrokeR(t,r){return this.addPointR(t,r).addSegStroke(),this}addSegStrokeRP(t,r){return this.addPointRP(t,r).addSegStroke(),this}addSegArc(t,r,s){if(this.points.length!==1)throw`err954: contour addSegArc with unexpected points.length ${this.points.length}`;const i=this.points.pop();if(i!==void 0){const o=new et(1,i.cx,i.cy,t,r,s);i.isEqual(this.getLastPoint())?console.log(`warn144: addSegArc last and new point identical ${ut(i.cx)} ${ut(i.cy)}`):(this.addSeg(o),this.setLastPoint(i.cx,i.cy))}else throw"err482: contour p1 is undefined";return this}addSegArc2(){if(this.points.length!==2)throw`err958: contour addSegArc2 with unexpected points.length ${this.points.length}`;const t=this.points.pop(),r=this.points.pop();if(r!==void 0&&t!==void 0){const s=this.getLastPoint(),i=v0(s,r,t),o=i.distanceToPoint(s),a=s.middlePoint(t),u=a.angleToPoint(s),l=a.angleToPoint(r),c=le(l-u);let h=!1,m=!1;if(!a.isEqual(i)){const x=a.angleToPoint(i),y=le(x-u);Math.sign(y)*Math.sign(c)>0&&(h=!0)}Math.sign(c)>0&&(m=!0),this.addPointA(t.cx,t.cy).addSegArc(o,h,m),this.debugPoints.push(r)}else throw"err488: contour p1 or p2 or seg is undefined";return this}addSegArc3(t,r){if(this.points.length!==1)throw`err914: contour addSegArc3 with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=this.getLastPoint(),o=Ur(i,s);let a=s;r&&(a=i);const u=Qn(a.cx,a.cy,t+Math.PI/2),l=o.intersection(u),c=l.distanceToPoint(i),h=i.middlePoint(s),m=a.angleToPoint(h),x=le(t-m);let y=!1;Math.abs(x)>Math.PI/2&&(y=!0);let f=!1;x<0&&(f=!0),r||(f=!f),this.addPointA(s.cx,s.cy).addSegArc(c,y,f),this.debugPoints.push(h),this.debugPoints.push(l)}else throw"err282: contour p1 is undefined";return this}addSeg2Arcs(t,r){if(this.points.length!==1)throw`err214: contour addSeg2Arcs with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=this.getLastPoint(),o=i.distanceToPoint(s),a=i.angleToPoint(s),u=s.angleToPoint(i),l=le(t-a),c=-1*le(r-u);if(Math.abs(l)>=Math.PI/2)throw`err545: addSeg2Arcs with too large au ${l}`;if(Math.abs(c)>=Math.PI/2)throw`err546: addSeg2Arcs with too large av ${c}`;if(ne(l)===0)throw`err765: addSeg2Arcs with almost zero au ${l}`;if(ne(c)===0)throw`err766: addSeg2Arcs with almost zero av ${c}`;if(Math.sign(l)*Math.sign(c)<1)throw`err767: addSeg2Arcs with au/av bad orientation ${l} ${c}`;const h=Math.tan(l/2),m=Math.tan(c/2),x=o*m/(m+h),y=Math.abs(x/Math.sin(l)),f=x/Math.cos(l/2),d=o*h/(m+h),p=Math.abs(d/Math.sin(c)),g=i.translatePolar(a+l/2,f);let D=!1;Math.sign(l)<0&&(D=!0),this.addPointA(g.cx,g.cy).addSegArc(y,!1,D),this.addPointA(s.cx,s.cy).addSegArc(p,!1,D),this.debugPoints.push(i.translatePolar(a,x)),this.debugPoints.push(i.translatePolar(a+l-Math.sign(l)*Math.PI/2,y)),this.debugPoints.push(s.translatePolar(u-c+Math.sign(l)*Math.PI/2,p))}else throw"err182: contour p1 is undefined";return this}addCornerPointed(){const t=new et(2,0,0,0);return this.addSeg(t),this}addCornerRounded(t){const r=new et(3,0,0,t);return this.addSeg(r),this}addCornerWidened(t){const r=new et(4,0,0,t);return this.addSeg(r),this}addCornerWideAcc(t){const r=new et(5,0,0,t);return this.addSeg(r),this}closeSegStroke(){const t=this.segments[0].px,r=this.segments[0].py;return this.addSegStrokeA(t,r),this}closeSegArc(t,r,s){const i=this.segments[0].px,o=this.segments[0].py;return this.addPointA(i,o).addSegArc(t,r,s),this}clone(){const t=new kt(this.segments[0].px,this.segments[0].py);for(const r of this.segments){const s=r.clone();s.sType!==6&&(t.addSeg(s),je(s.sType)&&t.setLastPoint(s.px,s.py))}return t}translate(t,r){const s=this.segments[0].px+t,i=this.segments[0].py+r,o=new kt(s,i);for(const a of this.segments){const u=a.clone();je(a.sType)&&(u.px+=t,u.py+=r),u.sType!==6&&(o.addSeg(u),je(u.sType)&&o.setLastPoint(u.px,u.py))}return o}translatePolar(t,r){return this.translate(r*Math.cos(t),r*Math.sin(t))}rotate(t,r,s){const i=Z(t,r),a=Z(this.segments[0].px,this.segments[0].py).rotate(i,s),u=new kt(a.cx,a.cy);for(const l of this.segments){const c=l.clone();if(je(l.sType)){const m=Z(c.px,c.py).rotate(i,s);c.px=m.cx,c.py=m.cy}c.sType!==6&&(u.addSeg(c),je(c.sType)&&u.setLastPoint(c.px,c.py))}return u}scale(t,r,s,i=!1){const o=Z(t,r),u=Z(this.segments[0].px,this.segments[0].py).scale(o,s),l=new kt(u.cx,u.cy);for(const c of this.segments){const h=c.clone();if(je(c.sType)){const x=Z(h.px,h.py).scale(o,s);h.px=x.cx,h.py=x.cy}c.sType===1&&(h.radius*=s),On(c.sType)&&i&&(h.radius*=s),h.sType!==6&&(l.addSeg(h),je(h.sType)&&l.setLastPoint(h.px,h.py))}return l}addPartial(t){if(this.points.length>0)throw`err911: addPartial, points should be used ${this.points.length}`;let r=t;if(t.segments.length>0){const s=t.segments[0],i=this.getLastPoint(),o=s.px-i.cx,a=s.py-i.cy;s.sType===6&&(r=t.translate(-o,-a))}for(const s of r.segments)s.sType!==6&&(this.addSeg(s),je(s.sType)&&this.setLastPoint(s.px,s.py));return this}draw(t,r,s=de.contour){const i=this.imposedColor===""?s:this.imposedColor;let o=0,a=0;for(const u of this.segments){if(u.sType===0){const[l,c]=qt(o,a,r),[h,m]=qt(u.px,u.py,r);t.beginPath(),t.moveTo(l,c),t.lineTo(h,m),t.strokeStyle=i,t.stroke()}if(u.sType===1)try{const l=Mt(o,a,u),[c,h]=qt(l.pc.cx,l.pc.cy,r),m=Mo(u.radius,r);t.beginPath(),t.arc(c,h,m,-l.a1,-l.a2,u.arcCcw),t.strokeStyle=i,t.stroke()}catch(l){console.log("err413: "+l)}cn(u.sType)&&(o=u.px,a=u.py)}}extractSkeleton(){const t=this.segments[0],r=new kt(t.px,t.py);for(const s of this.segments)je(s.sType)&&r.addSeg(s);return r}generateContour(){Bt.clearPoints(),Bt.clearLines();const t=[],r=[];let s=0,i=0,o=0;for(const c of this.segments){if(c.sType===0){const x=Z(i,o),y=Z(c.px,c.py),f=Z(0,0);t.push(new He(c.sType,x,y,f,0,0,0,!1)),s=1}if(c.sType===1){const x=Mt(i,o,c);t.push(x),s=1}const h=t.at(-1),m=t.at(-2);if(h!==void 0&&m!==void 0&&je(h.sType)&&Er(m.sType)){const x=t.pop(),y=t.pop(),f=t.pop();if(f!==void 0&&y!==void 0&&x!==void 0){const d=yi(f,y,x);t.push(...d)}else throw"err603: contour generateContour internal error"}if(Er(c.sType)){if(s===2)throw`err419: generateContour with two consecutive corners ${c.sType}`;if(s===0&&On(c.sType)&&c.radius>0){const x=Z(0,0);r.push(new He(c.sType,x,x,x,c.radius,0,0,!1))}if(s===1&&On(c.sType)&&c.radius>0){const x=Z(0,0);t.push(new He(c.sType,x,x,x,c.radius,0,0,!1))}s=2}cn(c.sType)&&(i=c.px,o=c.py)}if(r.length>0)if(s===1)t.push(...r);else throw"err397: contour generateContour Corners defined at end and begining";const a=t.at(-1);if(a!==void 0&&Er(a.sType)){const c=t[0],h=t.pop(),m=t.pop();if(m!==void 0&&h!==void 0&&c!==void 0){const x=yi(m,h,c);t.push(...x.slice(0,-1));const y=x.at(-1);if(y!==void 0)t[0]=y;else throw"err606: contour generateContour internal error"}else throw"err602: contour generateContour internal error"}const u=t[0],l=new kt(u.p1.cx,u.p1.cy,this.imposedColor);l.debugPoints.push(...Bt.getPoints()),l.debugLines.push(...Bt.getLines());for(const c of t)if(c.sType===0)l.addSegStrokeA(c.p2.cx,c.p2.cy);else if(c.sType===1){const h=E0(c);l.addPointA(c.p2.cx,c.p2.cy).addSegArc(h.radius,h.arcLarge,h.arcCcw)}else throw`err986: contour generateContour unexpected in seg2 Enum ${c.sType}`;return l}generatePoints(t){const r=[];let s=0,i=0;for(const o of this.segments){if(o.sType===1)try{const a=Ro(s,i,o,t);r.push(...a)}catch(a){console.log("err453: "+a)}cn(o.sType)&&(s=o.px,i=o.py,r.push(Z(s,i)))}return r}getOrientation(t,r){const s=t.slice(1);let i=0,o=s.at(-3),a=s.at(-2),u=s.at(-1);for(const c of s)if(o=a,a=u,u=c,a.cx===r){const h=o.cx-a.cx,m=o.cy-a.cy,x=u.cx-a.cx,y=u.cy-a.cy,f=x*m-y*h;i=Math.sign(f)}if(i===0)throw`err299: Orientation hasn't been found with point number ${s.length}`;return i>0}getEnvelop(){const t=this.generatePoints(24),r=[],s=[];for(const h of t)r.push(h.cx),s.push(h.cy);const i=Math.min(...r),o=Math.max(...r),a=Math.min(...s),u=Math.max(...s),l=this.getOrientation(t,i),c=this.getOrientation(t,o);if(c!==l)throw`err390: orientation unstable ${l} ${c} with ${t.length} points`;return[i,o,a,u,l]}generateLines(){const t=[];return t.push(...this.debugLines),t}checkContour(t){if(t.segments[0].sType!==6)throw`err412: contour check first seg is not eStart ${t.segments[0].sType}`;let r=0,s=0;for(const a of t.segments){if(a.sType===1)try{Mt(r,s,a)}catch(u){throw`err778: ${u}`}cn(a.sType)&&(r=a.px,s=a.py)}const i=t.segments[0].px,o=t.segments[0].py;if(ne(r-i)!==0||ne(s-o)!==0)throw`err414: contour check, contour is not closed px ${i} ${r} py ${i} ${o}`}check(){Bt.clearMsg(),this.checkContour(this);const t=this.generateContour();return this.checkContour(t),Bt.getMsg()}toSvg(t,r=""){const s=L0();for(const o of this.segments)o.sType===6?s.addStart(o.px,t-o.py):o.sType===0?s.addStroke(o.px,t-o.py):o.sType===1?s.addArc(o.px,t-o.py,o.radius,o.arcLarge,!o.arcCcw):console.log(`err631: contour.toSvg has unknown segment type ${o.sType}`);return s.stringify(r)}toDxfSeg(){const t=[];let r=0,s=0;for(const i of this.segments){if(i.sType===0)t.push(R0(r,s,i.px,i.py));else if(i.sType===1)try{const o=Mt(r,s,i);t.push(O0(o.pc.cx,o.pc.cy,i.radius,o.a1,o.a2,o.arcCcw))}catch(o){console.log("err413: "+o)}cn(i.sType)&&(r=i.px,s=i.py)}return t}toPax(){const t=H0();for(const s of this.segments)s.sType===6?t.addStart(s.px,s.py):s.sType===0?t.addStroke(s.px,s.py):s.sType===1?t.addArc(s.px,s.py,s.radius,s.arcLarge,s.arcCcw):console.log(`err709: contour.toPax has unknown segment type ${s.sType}`);return t.toJson()}getPerimeter(){let t=0;const r=this.generateContour();let s=0,i=0;for(const o of r.segments)if(o.sType===6)s=o.px,i=o.py;else if(o.sType===0){const a=Math.sqrt((o.px-s)**2+(o.py-i)**2);s=o.px,i=o.py,t+=a}else if(o.sType===1){const a=Mt(s,i,o),u=yt(a.a2-a.a1),l=a.arcCcw?u:yt(2*Math.PI-u),c=o.radius*l;s=o.px,i=o.py,t+=c}else console.log(`err760: contour.getPerimeter has unknown segment type ${o.sType}`);return t}generateRevertOrientation(){const t=this.segments[0],r=new kt(t.px,t.py);for(const s of this.segments)je(s.sType)&&r.addSeg(s);return r}},G0=class Vt extends No{constructor(t,r,s,i=""){super();M(this,"circle",!0);M(this,"px");M(this,"py");M(this,"radius");M(this,"imposedColor");if(this.px=t,this.py=r,this.radius=s,this.imposedColor=i,s<0)throw`err432: iRadius ${s} is negative at circle ix ${t}, iy ${r}`}clone(){return new Vt(this.px,this.py,this.radius,this.imposedColor)}translate(t,r){return new Vt(this.px+t,this.py+r,this.radius,this.imposedColor)}translatePolar(t,r){return this.translate(r*Math.cos(t),r*Math.sin(t))}rotate(t,r,s){const i=Z(t,r),o=Z(this.px,this.py).rotate(i,s);return new Vt(o.cx,o.cy,this.radius,this.imposedColor)}draw(t,r,s=de.contour){const[i,o]=qt(this.px,this.py,r),a=Mo(this.radius,r),u=this.imposedColor===""?s:this.imposedColor;t.beginPath(),t.arc(i,o,a,0,2*Math.PI,!0),t.strokeStyle=u,t.stroke()}extractSkeleton(){return new Vt(this.px,this.py,this.radius)}generateContour(){return new Vt(this.px,this.py,this.radius,this.imposedColor)}generatePoints(t){const r=[],s=Z(this.px,this.py),i=t*2;r.push(s);for(let o=0;o<i;o++){const a=s.translatePolar(o*2*Math.PI/i,this.radius);r.push(a)}return r}getEnvelop(){return[this.px-this.radius,this.px+this.radius,this.py-this.radius,this.py+this.radius,!0]}generateLines(){return[]}check(){return""}toSvg(t,r=""){return M0(this.px,t-this.py,this.radius,r)}toDxfSeg(){const t=[];return t.push(V0(this.px,this.py,this.radius)),t}toPax(){return j0(this.px,this.py,this.radius)}getPerimeter(){return 2*Math.PI*this.radius}generateRevertOrientation(){return new Vt(this.px,this.py,this.radius,this.imposedColor)}};function ss(e,n,t=""){return new Y0(e,n,t)}function cf(e,n,t,r=""){return new G0(e,n,t,r)}var Z0=class qr{constructor(){M(this,"pointList");M(this,"lineList");M(this,"vectorList");M(this,"mainList");M(this,"mainBList");M(this,"secondList");M(this,"secondBList");M(this,"dynamicsList");M(this,"xMin");M(this,"xMax");M(this,"yMin");M(this,"yMax");this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[],this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addPoint(n){this.pointList.push(n)}addPoints(n){this.pointList.push(...n)}addLine(n){this.lineList.push(n)}addLines(n){for(const t of n)this.lineList.push(t)}addVector(n){this.vectorList.push(n)}addMainOI(n){const t=[];for(const r of n){const s=r.generateContour();this.addPoints(s.generatePoints(2)),this.addLines(s.generateLines()),t.push(s),this.mainBList.push(r.extractSkeleton())}this.mainList.push(t)}addMainO(n){const t=[n];this.addMainOI(t)}addSecond(n){const t=n.generateContour();this.addPoints(t.generatePoints(2)),this.addLines(t.generateLines()),this.secondList.push(t),this.secondBList.push(n.extractSkeleton())}addDynamics(n){this.addPoints(n.generatePoints(2)),this.addLines(n.generateLines()),this.dynamicsList.push(n)}translate(n,t){const r=new qr;for(const s of this.pointList)r.addPoint(s.translate(n,t));for(const s of this.lineList)r.addLine(s.translate(n,t));for(const s of this.vectorList)r.addVector(s.translate(n,t));for(const s of this.mainList){const i=[];for(const o of s)i.push(o.translate(n,t));r.addMainOI(i)}for(const s of this.secondList)r.addSecond(s.translate(n,t));for(const s of this.dynamicsList)r.addDynamics(s.translate(n,t));return r}translatePolar(n,t){return this.translate(t*Math.cos(n),t*Math.sin(n))}rotate(n,t,r){const s=new qr,i=Z(n,t);for(const o of this.pointList)s.addPoint(o.rotate(i,r));for(const o of this.lineList)s.addLine(o.rotate(i,r));for(const o of this.vectorList)s.addVector(o.rotate(i,r));for(const o of this.mainList){const a=[];for(const u of o)a.push(u.rotate(n,t,r));s.addMainOI(a)}for(const o of this.secondList)s.addSecond(o.rotate(n,t,r));for(const o of this.dynamicsList)s.addDynamics(o.rotate(n,t,r));return s}mergeFigure(n,t=!1){for(const r of n.pointList)this.addPoint(r.clone());for(const r of n.lineList)this.addLine(r.clone());for(const r of n.vectorList)this.addVector(r.clone());for(const r of n.mainList){const s=[];for(const i of r)s.push(i.clone());if(t)for(const i of s)this.addSecond(i);else this.addMainOI(s)}for(const r of n.secondList)this.addSecond(r.clone());for(const r of n.dynamicsList)this.addDynamics(r.clone())}mainListC(){const n=[];for(const t of this.mainList)for(const r of t)n.push(r);return n}clear(){this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[]}getMinMax(){[this.xMin,this.xMax,this.yMin,this.yMax]=Io(this.pointList)}getAdjustFull(n,t){let r=Or();return this.pointList.length>0&&(this.getMinMax(),r=Vr(this.xMin,this.xMax,this.yMin,this.yMax,n,t)),r}getAdjustZoom(n,t){let r=Or();if(this.pointList.length>0){this.getMinMax();const s=(this.xMin+this.xMax)/2,i=(this.yMin+this.yMax)/2;r=Vr(s,this.xMax,i,this.yMax,n,t)}return r}quantifyRuler(n,t){const s=n/10/t.scaleX;let i=1e-4;for(;i<s;)i*=10;i/5>s?i/=5:i/2>s&&(i/=2);const o=i*t.scaleX;return[i,o]}drawRuler(n,t,r){const[s,i]=this.quantifyRuler(n.canvas.width,t),o=n.canvas.width-10-i;n.font="15px Arial",n.fillStyle=r,n.fillText(`${s.toFixed(4)}`,o,20),n.beginPath(),n.moveTo(o,25),n.lineTo(o+i,25),n.lineTo(o+i,25+i),n.strokeStyle=r,n.stroke()}draw(n,t,r){if(r.points)for(const s of this.pointList)s.draw(n,t);if(r.lines)for(const s of this.lineList)s.draw(n,t);if(r.vectors)for(const s of this.vectorList)s.draw(n,t);if(r.main)for(const s of this.mainList)for(const[i,o]of s.entries()){let a=de.mainOuter;i>0&&(a=de.mainInner),o.draw(n,t,a)}if(r.mainB)for(const s of this.mainBList)s.draw(n,t,de.mainB);if(r.second)for(const s of this.secondList)s.draw(n,t,de.second);if(r.secondB)for(const s of this.secondBList)s.draw(n,t,de.secondB);if(r.dynamics)for(const s of this.dynamicsList)s.draw(n,t,de.dynamics);if(r.ruler&&this.drawRuler(n,t,de.ruler),r.refframe){for(const s of[10,100,200])Z(s,0).draw(n,t,de.reference,2),Z(-s,0).draw(n,t,de.reference,2),Z(0,s).draw(n,t,de.reference,2),Z(0,-s).draw(n,t,de.reference,2);Z(0,0).draw(n,t,de.origin,2)}}};function X0(){return new Z0}function jr(e){const n=X0();for(const t in e){const r=e[t];for(const s of r.pointList)n.pointList.push(s);for(const s of r.lineList)n.lineList.push(s);for(const s of r.vectorList)n.vectorList.push(s);for(const s of r.mainList)n.mainList.push(s);for(const s of r.mainBList)n.mainBList.push(s);for(const s of r.secondList)n.secondList.push(s);for(const s of r.secondBList)n.secondBList.push(s);for(const s of r.dynamicsList)n.dynamicsList.push(s)}return n}function lf(){return{points:!1,lines:!1,vectors:!1,main:!0,mainB:!1,second:!0,secondB:!1,dynamics:!1,ruler:!0,refframe:!1}}function ff(e){return{points:e.points,lines:e.lines,vectors:e.vectors,main:e.main,mainB:e.mainB,second:e.second,secondB:e.secondB,dynamics:e.dynamics,ruler:e.ruler,refframe:e.refframe}}var K0=(e=>(e[e.eNumber=0]="eNumber",e[e.eCheckbox=1]="eCheckbox",e[e.eDropdown=2]="eDropdown",e[e.eSectionSeparator=3]="eSectionSeparator",e))(K0||{}),zt={partName:"",params:[],paramSvg:{},sim:{tMax:0,tStep:0,tUpdate:0}};function J0(e,n,t){return{val:e,init:n,chg:t}}function z0(e){const n={};for(const t of Object.keys(e))n[t]=e[t].val;return n}var Q0=class{constructor(e,n=""){M(this,"paramVal",{});M(this,"paramInit",{});M(this,"paramChanged",{});M(this,"partName");M(this,"suffix");M(this,"paramNames");for(const t of e.params)this.paramVal[t.name]=t.init,this.paramInit[t.name]=t.init,this.paramChanged[t.name]=!1;this.suffix=n,this.partName=e.partName,this.paramNames=this.getParamName()}getParamName(){const e=[];for(const n of Object.keys(this.paramVal))e.push(n);return e}getPartName(){return this.partName}getPartNameSuffix(){return this.partName+this.suffix}getSuffix(){return this.suffix}getParamVal(){return this.paramVal}getVal(e){if(this.paramNames.includes(e))return this.paramVal[e];throw`err140: parameter ${e} does not exist in design ${this.partName}`}getInit(e){if(this.paramNames.includes(e))return this.paramInit[e];throw`err149: parameter ${e} does not exist in design ${this.partName}`}getChanged(e){if(this.paramNames.includes(e))return this.paramChanged[e];throw`err156: parameter ${e} does not exist in design ${this.partName}`}setVal(e,n){if(this.paramNames.includes(e))this.paramVal[e]=n,this.paramChanged[e]=!0;else throw`err163: parameter ${e} does not exist in design ${this.partName}`}applyParamVal(e){let n="";for(const t of Object.keys(e))this.setVal(t,e[t]);return n+=`info104: apply ${Object.keys(e).length} parameters on ${this.partName}
61
+ `}stringify(){return this.close(),this.dxfStr}};function q0(){return new U0}function j0(e,n,t){return{circle:!0,cx:e,cy:n,radius:t}}var W0=class{constructor(){M(this,"seg");this.seg=[]}addStart(e,n){this.seg=[];const t={typ:0,px:e,py:n};this.seg.push(t)}addStroke(e,n){const t={typ:1,px:e,py:n};this.seg.push(t)}addArc(e,n,t,r,s){const i={typ:2,px:e,py:n,radius:t,large:r,ccw:s};this.seg.push(i)}toJson(){return{circle:!1,seg:this.seg}}};function H0(){return new W0}var No=class{};function Ro(e,n,t,r){const s=Mt(e,n,t),i=Z(s.pc.cx,s.pc.cy),o=yt(s.a2-s.a1),u=(t.arcCcw?o:o-2*Math.PI)/r,l=[];for(let c=1;c<r;c++)l.push(i.translatePolar(s.a1+c*u,t.radius));return l}var Y0=class kt extends No{constructor(t,r,s=""){super();M(this,"circle",!1);M(this,"segments");M(this,"points");M(this,"debugPoints");M(this,"debugLines");M(this,"lastPoint");M(this,"imposedColor");this.segments=[new et(6,t,r,0)],this.points=[],this.debugPoints=[],this.debugLines=[],this.lastPoint=Z(t,r),this.imposedColor=s}setLastPoint(t,r){this.lastPoint=Z(t,r)}getLastPoint(){return this.lastPoint}getFirstPoint(){return Z(this.segments[0].px,this.segments[0].py)}addPointA(t,r){if(this.points.length>2)throw`err311: contour add too much point ${t} ${r}`;return this.points.push(Z(t,r)),this}addPointAP(t,r){const s=Z(0,0).translatePolar(t,r);return this.addPointA(s.cx,s.cy),this}addPointR(t,r){const i=this.getLastPoint().translate(t,r);return this.addPointA(i.cx,i.cy),this}addPointRP(t,r){const i=this.getLastPoint().translatePolar(t,r);return this.addPointA(i.cx,i.cy),this}addSeg(t){return this.segments.push(t),this}addSegStroke(){if(this.points.length!==1)throw`err554: contour addSegStroke with unexpected points.length ${this.points.length}`;const t=this.points.pop();if(t!==void 0){const r=new et(0,t.cx,t.cy,0);t.isEqual(this.getLastPoint())||(this.addSeg(r),this.setLastPoint(t.cx,t.cy))}else throw"err284: contour p1 is undefined";return this}addSegStrokeA(t,r){return this.addPointA(t,r).addSegStroke(),this}addSegStrokeAP(t,r){return this.addPointAP(t,r).addSegStroke(),this}addSegStrokeR(t,r){return this.addPointR(t,r).addSegStroke(),this}addSegStrokeRP(t,r){return this.addPointRP(t,r).addSegStroke(),this}addSegArc(t,r,s){if(this.points.length!==1)throw`err954: contour addSegArc with unexpected points.length ${this.points.length}`;const i=this.points.pop();if(i!==void 0){const o=new et(1,i.cx,i.cy,t,r,s);i.isEqual(this.getLastPoint())?console.log(`warn144: addSegArc last and new point identical ${ut(i.cx)} ${ut(i.cy)}`):(this.addSeg(o),this.setLastPoint(i.cx,i.cy))}else throw"err482: contour p1 is undefined";return this}addSegArc2(){if(this.points.length!==2)throw`err958: contour addSegArc2 with unexpected points.length ${this.points.length}`;const t=this.points.pop(),r=this.points.pop();if(r!==void 0&&t!==void 0){const s=this.getLastPoint(),i=v0(s,r,t),o=i.distanceToPoint(s),a=s.middlePoint(t),u=a.angleToPoint(s),l=a.angleToPoint(r),c=le(l-u);let h=!1,m=!1;if(!a.isEqual(i)){const x=a.angleToPoint(i),y=le(x-u);Math.sign(y)*Math.sign(c)>0&&(h=!0)}Math.sign(c)>0&&(m=!0),this.addPointA(t.cx,t.cy).addSegArc(o,h,m),this.debugPoints.push(r)}else throw"err488: contour p1 or p2 or seg is undefined";return this}addSegArc3(t,r){if(this.points.length!==1)throw`err914: contour addSegArc3 with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=this.getLastPoint(),o=Ur(i,s);let a=s;r&&(a=i);const u=Qn(a.cx,a.cy,t+Math.PI/2),l=o.intersection(u),c=l.distanceToPoint(i),h=i.middlePoint(s),m=a.angleToPoint(h),x=le(t-m);let y=!1;Math.abs(x)>Math.PI/2&&(y=!0);let f=!1;x<0&&(f=!0),r||(f=!f),this.addPointA(s.cx,s.cy).addSegArc(c,y,f),this.debugPoints.push(h),this.debugPoints.push(l)}else throw"err282: contour p1 is undefined";return this}addSeg2Arcs(t,r){if(this.points.length!==1)throw`err214: contour addSeg2Arcs with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=this.getLastPoint(),o=i.distanceToPoint(s),a=i.angleToPoint(s),u=s.angleToPoint(i),l=le(t-a),c=-1*le(r-u);if(Math.abs(l)>=Math.PI/2)throw`err545: addSeg2Arcs with too large au ${l}`;if(Math.abs(c)>=Math.PI/2)throw`err546: addSeg2Arcs with too large av ${c}`;if(ne(l)===0)throw`err765: addSeg2Arcs with almost zero au ${l}`;if(ne(c)===0)throw`err766: addSeg2Arcs with almost zero av ${c}`;if(Math.sign(l)*Math.sign(c)<1)throw`err767: addSeg2Arcs with au/av bad orientation ${l} ${c}`;const h=Math.tan(l/2),m=Math.tan(c/2),x=o*m/(m+h),y=Math.abs(x/Math.sin(l)),f=x/Math.cos(l/2),d=o*h/(m+h),p=Math.abs(d/Math.sin(c)),g=i.translatePolar(a+l/2,f);let D=!1;Math.sign(l)<0&&(D=!0),this.addPointA(g.cx,g.cy).addSegArc(y,!1,D),this.addPointA(s.cx,s.cy).addSegArc(p,!1,D),this.debugPoints.push(i.translatePolar(a,x)),this.debugPoints.push(i.translatePolar(a+l-Math.sign(l)*Math.PI/2,y)),this.debugPoints.push(s.translatePolar(u-c+Math.sign(l)*Math.PI/2,p))}else throw"err182: contour p1 is undefined";return this}addCornerPointed(){const t=new et(2,0,0,0);return this.addSeg(t),this}addCornerRounded(t){const r=new et(3,0,0,t);return this.addSeg(r),this}addCornerWidened(t){const r=new et(4,0,0,t);return this.addSeg(r),this}addCornerWideAcc(t){const r=new et(5,0,0,t);return this.addSeg(r),this}closeSegStroke(){const t=this.segments[0].px,r=this.segments[0].py;return this.addSegStrokeA(t,r),this}closeSegArc(t,r,s){const i=this.segments[0].px,o=this.segments[0].py;return this.addPointA(i,o).addSegArc(t,r,s),this}clone(){const t=new kt(this.segments[0].px,this.segments[0].py);for(const r of this.segments){const s=r.clone();s.sType!==6&&(t.addSeg(s),je(s.sType)&&t.setLastPoint(s.px,s.py))}return t}translate(t,r){const s=this.segments[0].px+t,i=this.segments[0].py+r,o=new kt(s,i);for(const a of this.segments){const u=a.clone();je(a.sType)&&(u.px+=t,u.py+=r),u.sType!==6&&(o.addSeg(u),je(u.sType)&&o.setLastPoint(u.px,u.py))}return o}translatePolar(t,r){return this.translate(r*Math.cos(t),r*Math.sin(t))}rotate(t,r,s){const i=Z(t,r),a=Z(this.segments[0].px,this.segments[0].py).rotate(i,s),u=new kt(a.cx,a.cy);for(const l of this.segments){const c=l.clone();if(je(l.sType)){const m=Z(c.px,c.py).rotate(i,s);c.px=m.cx,c.py=m.cy}c.sType!==6&&(u.addSeg(c),je(c.sType)&&u.setLastPoint(c.px,c.py))}return u}scale(t,r,s,i=!1){const o=Z(t,r),u=Z(this.segments[0].px,this.segments[0].py).scale(o,s),l=new kt(u.cx,u.cy);for(const c of this.segments){const h=c.clone();if(je(c.sType)){const x=Z(h.px,h.py).scale(o,s);h.px=x.cx,h.py=x.cy}c.sType===1&&(h.radius*=s),On(c.sType)&&i&&(h.radius*=s),h.sType!==6&&(l.addSeg(h),je(h.sType)&&l.setLastPoint(h.px,h.py))}return l}addPartial(t){if(this.points.length>0)throw`err911: addPartial, points should be used ${this.points.length}`;let r=t;if(t.segments.length>0){const s=t.segments[0],i=this.getLastPoint(),o=s.px-i.cx,a=s.py-i.cy;s.sType===6&&(r=t.translate(-o,-a))}for(const s of r.segments)s.sType!==6&&(this.addSeg(s),je(s.sType)&&this.setLastPoint(s.px,s.py));return this}draw(t,r,s=de.contour){const i=this.imposedColor===""?s:this.imposedColor;let o=0,a=0;for(const u of this.segments){if(u.sType===0){const[l,c]=qt(o,a,r),[h,m]=qt(u.px,u.py,r);t.beginPath(),t.moveTo(l,c),t.lineTo(h,m),t.strokeStyle=i,t.stroke()}if(u.sType===1)try{const l=Mt(o,a,u),[c,h]=qt(l.pc.cx,l.pc.cy,r),m=Mo(u.radius,r);t.beginPath(),t.arc(c,h,m,-l.a1,-l.a2,u.arcCcw),t.strokeStyle=i,t.stroke()}catch(l){console.log("err413: "+l)}cn(u.sType)&&(o=u.px,a=u.py)}}extractSkeleton(){const t=this.segments[0],r=new kt(t.px,t.py);for(const s of this.segments)je(s.sType)&&r.addSeg(s);return r}generateContour(){Bt.clearPoints(),Bt.clearLines();const t=[],r=[];let s=0,i=0,o=0;for(const c of this.segments){if(c.sType===0){const x=Z(i,o),y=Z(c.px,c.py),f=Z(0,0);t.push(new He(c.sType,x,y,f,0,0,0,!1)),s=1}if(c.sType===1){const x=Mt(i,o,c);t.push(x),s=1}const h=t.at(-1),m=t.at(-2);if(h!==void 0&&m!==void 0&&je(h.sType)&&Er(m.sType)){const x=t.pop(),y=t.pop(),f=t.pop();if(f!==void 0&&y!==void 0&&x!==void 0){const d=yi(f,y,x);t.push(...d)}else throw"err603: contour generateContour internal error"}if(Er(c.sType)){if(s===2)throw`err419: generateContour with two consecutive corners ${c.sType}`;if(s===0&&On(c.sType)&&c.radius>0){const x=Z(0,0);r.push(new He(c.sType,x,x,x,c.radius,0,0,!1))}if(s===1&&On(c.sType)&&c.radius>0){const x=Z(0,0);t.push(new He(c.sType,x,x,x,c.radius,0,0,!1))}s=2}cn(c.sType)&&(i=c.px,o=c.py)}if(r.length>0)if(s===1)t.push(...r);else throw"err397: contour generateContour Corners defined at end and begining";const a=t.at(-1);if(a!==void 0&&Er(a.sType)){const c=t[0],h=t.pop(),m=t.pop();if(m!==void 0&&h!==void 0&&c!==void 0){const x=yi(m,h,c);t.push(...x.slice(0,-1));const y=x.at(-1);if(y!==void 0)t[0]=y;else throw"err606: contour generateContour internal error"}else throw"err602: contour generateContour internal error"}const u=t[0],l=new kt(u.p1.cx,u.p1.cy,this.imposedColor);l.debugPoints.push(...Bt.getPoints()),l.debugLines.push(...Bt.getLines());for(const c of t)if(c.sType===0)l.addSegStrokeA(c.p2.cx,c.p2.cy);else if(c.sType===1){const h=E0(c);l.addPointA(c.p2.cx,c.p2.cy).addSegArc(h.radius,h.arcLarge,h.arcCcw)}else throw`err986: contour generateContour unexpected in seg2 Enum ${c.sType}`;return l}generatePoints(t){const r=[];let s=0,i=0;for(const o of this.segments){if(o.sType===1)try{const a=Ro(s,i,o,t);r.push(...a)}catch(a){console.log("err453: "+a)}cn(o.sType)&&(s=o.px,i=o.py,r.push(Z(s,i)))}return r}getOrientation(t,r){const s=t.slice(1);let i=0,o=s.at(-3),a=s.at(-2),u=s.at(-1);for(const c of s)if(o=a,a=u,u=c,a.cx===r){const h=o.cx-a.cx,m=o.cy-a.cy,x=u.cx-a.cx,y=u.cy-a.cy,f=x*m-y*h;i=Math.sign(f)}if(i===0)throw`err299: Orientation hasn't been found with point number ${s.length}`;return i>0}getEnvelop(){const t=this.generatePoints(24),r=[],s=[];for(const h of t)r.push(h.cx),s.push(h.cy);const i=Math.min(...r),o=Math.max(...r),a=Math.min(...s),u=Math.max(...s),l=this.getOrientation(t,i),c=this.getOrientation(t,o);if(c!==l)throw`err390: orientation unstable ${l} ${c} with ${t.length} points`;return{xMin:i,xMax:o,yMin:a,yMax:u,orientation:l}}generateLines(){const t=[];return t.push(...this.debugLines),t}checkContour(t){if(t.segments[0].sType!==6)throw`err412: contour check first seg is not eStart ${t.segments[0].sType}`;let r=0,s=0;for(const a of t.segments){if(a.sType===1)try{Mt(r,s,a)}catch(u){throw`err778: ${u}`}cn(a.sType)&&(r=a.px,s=a.py)}const i=t.segments[0].px,o=t.segments[0].py;if(ne(r-i)!==0||ne(s-o)!==0)throw`err414: contour check, contour is not closed px ${i} ${r} py ${i} ${o}`}check(){Bt.clearMsg(),this.checkContour(this);const t=this.generateContour();return this.checkContour(t),Bt.getMsg()}toSvg(t,r=""){const s=L0();for(const o of this.segments)o.sType===6?s.addStart(o.px,t-o.py):o.sType===0?s.addStroke(o.px,t-o.py):o.sType===1?s.addArc(o.px,t-o.py,o.radius,o.arcLarge,!o.arcCcw):console.log(`err631: contour.toSvg has unknown segment type ${o.sType}`);return s.stringify(r)}toDxfSeg(){const t=[];let r=0,s=0;for(const i of this.segments){if(i.sType===0)t.push(R0(r,s,i.px,i.py));else if(i.sType===1)try{const o=Mt(r,s,i);t.push(O0(o.pc.cx,o.pc.cy,i.radius,o.a1,o.a2,o.arcCcw))}catch(o){console.log("err413: "+o)}cn(i.sType)&&(r=i.px,s=i.py)}return t}toPax(){const t=H0();for(const s of this.segments)s.sType===6?t.addStart(s.px,s.py):s.sType===0?t.addStroke(s.px,s.py):s.sType===1?t.addArc(s.px,s.py,s.radius,s.arcLarge,s.arcCcw):console.log(`err709: contour.toPax has unknown segment type ${s.sType}`);return t.toJson()}getPerimeter(){let t=0;const r=this.generateContour();let s=0,i=0;for(const o of r.segments)if(o.sType===6)s=o.px,i=o.py;else if(o.sType===0){const a=Math.sqrt((o.px-s)**2+(o.py-i)**2);s=o.px,i=o.py,t+=a}else if(o.sType===1){const a=Mt(s,i,o),u=yt(a.a2-a.a1),l=a.arcCcw?u:yt(2*Math.PI-u),c=o.radius*l;s=o.px,i=o.py,t+=c}else console.log(`err760: contour.getPerimeter has unknown segment type ${o.sType}`);return t}generateRevertOrientation(){const t=this.segments[0],r=new kt(t.px,t.py);for(const s of this.segments)je(s.sType)&&r.addSeg(s);return r}},G0=class Vt extends No{constructor(t,r,s,i=""){super();M(this,"circle",!0);M(this,"px");M(this,"py");M(this,"radius");M(this,"imposedColor");if(this.px=t,this.py=r,this.radius=s,this.imposedColor=i,s<0)throw`err432: iRadius ${s} is negative at circle ix ${t}, iy ${r}`}clone(){return new Vt(this.px,this.py,this.radius,this.imposedColor)}translate(t,r){return new Vt(this.px+t,this.py+r,this.radius,this.imposedColor)}translatePolar(t,r){return this.translate(r*Math.cos(t),r*Math.sin(t))}rotate(t,r,s){const i=Z(t,r),o=Z(this.px,this.py).rotate(i,s);return new Vt(o.cx,o.cy,this.radius,this.imposedColor)}draw(t,r,s=de.contour){const[i,o]=qt(this.px,this.py,r),a=Mo(this.radius,r),u=this.imposedColor===""?s:this.imposedColor;t.beginPath(),t.arc(i,o,a,0,2*Math.PI,!0),t.strokeStyle=u,t.stroke()}extractSkeleton(){return new Vt(this.px,this.py,this.radius)}generateContour(){return new Vt(this.px,this.py,this.radius,this.imposedColor)}generatePoints(t){const r=[],s=Z(this.px,this.py),i=t*2;r.push(s);for(let o=0;o<i;o++){const a=s.translatePolar(o*2*Math.PI/i,this.radius);r.push(a)}return r}getEnvelop(){return{xMin:this.px-this.radius,xMax:this.px+this.radius,yMin:this.py-this.radius,yMax:this.py+this.radius,orientation:!0}}generateLines(){return[]}check(){return""}toSvg(t,r=""){return M0(this.px,t-this.py,this.radius,r)}toDxfSeg(){const t=[];return t.push(V0(this.px,this.py,this.radius)),t}toPax(){return j0(this.px,this.py,this.radius)}getPerimeter(){return 2*Math.PI*this.radius}generateRevertOrientation(){return new Vt(this.px,this.py,this.radius,this.imposedColor)}};function ss(e,n,t=""){return new Y0(e,n,t)}function cf(e,n,t,r=""){return new G0(e,n,t,r)}var Z0=class qr{constructor(){M(this,"pointList");M(this,"lineList");M(this,"vectorList");M(this,"mainList");M(this,"mainBList");M(this,"secondList");M(this,"secondBList");M(this,"dynamicsList");M(this,"xMin");M(this,"xMax");M(this,"yMin");M(this,"yMax");this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[],this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addPoint(n){this.pointList.push(n)}addPoints(n){this.pointList.push(...n)}addLine(n){this.lineList.push(n)}addLines(n){for(const t of n)this.lineList.push(t)}addVector(n){this.vectorList.push(n)}addMainOI(n){const t=[];for(const r of n){const s=r.generateContour();this.addPoints(s.generatePoints(2)),this.addLines(s.generateLines()),t.push(s),this.mainBList.push(r.extractSkeleton())}this.mainList.push(t)}addMainO(n){const t=[n];this.addMainOI(t)}addSecond(n){const t=n.generateContour();this.addPoints(t.generatePoints(2)),this.addLines(t.generateLines()),this.secondList.push(t),this.secondBList.push(n.extractSkeleton())}addDynamics(n){this.addPoints(n.generatePoints(2)),this.addLines(n.generateLines()),this.dynamicsList.push(n)}translate(n,t){const r=new qr;for(const s of this.pointList)r.addPoint(s.translate(n,t));for(const s of this.lineList)r.addLine(s.translate(n,t));for(const s of this.vectorList)r.addVector(s.translate(n,t));for(const s of this.mainList){const i=[];for(const o of s)i.push(o.translate(n,t));r.addMainOI(i)}for(const s of this.secondList)r.addSecond(s.translate(n,t));for(const s of this.dynamicsList)r.addDynamics(s.translate(n,t));return r}translatePolar(n,t){return this.translate(t*Math.cos(n),t*Math.sin(n))}rotate(n,t,r){const s=new qr,i=Z(n,t);for(const o of this.pointList)s.addPoint(o.rotate(i,r));for(const o of this.lineList)s.addLine(o.rotate(i,r));for(const o of this.vectorList)s.addVector(o.rotate(i,r));for(const o of this.mainList){const a=[];for(const u of o)a.push(u.rotate(n,t,r));s.addMainOI(a)}for(const o of this.secondList)s.addSecond(o.rotate(n,t,r));for(const o of this.dynamicsList)s.addDynamics(o.rotate(n,t,r));return s}mergeFigure(n,t=!1){for(const r of n.pointList)this.addPoint(r.clone());for(const r of n.lineList)this.addLine(r.clone());for(const r of n.vectorList)this.addVector(r.clone());for(const r of n.mainList){const s=[];for(const i of r)s.push(i.clone());if(t)for(const i of s)this.addSecond(i);else this.addMainOI(s)}for(const r of n.secondList)this.addSecond(r.clone());for(const r of n.dynamicsList)this.addDynamics(r.clone())}mainListC(){const n=[];for(const t of this.mainList)for(const r of t)n.push(r);return n}clear(){this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[]}getMinMax(){[this.xMin,this.xMax,this.yMin,this.yMax]=Io(this.pointList)}getAdjustFull(n,t){let r=Or();return this.pointList.length>0&&(this.getMinMax(),r=Vr(this.xMin,this.xMax,this.yMin,this.yMax,n,t)),r}getAdjustZoom(n,t){let r=Or();if(this.pointList.length>0){this.getMinMax();const s=(this.xMin+this.xMax)/2,i=(this.yMin+this.yMax)/2;r=Vr(s,this.xMax,i,this.yMax,n,t)}return r}quantifyRuler(n,t){const s=n/10/t.scaleX;let i=1e-4;for(;i<s;)i*=10;i/5>s?i/=5:i/2>s&&(i/=2);const o=i*t.scaleX;return[i,o]}drawRuler(n,t,r){const[s,i]=this.quantifyRuler(n.canvas.width,t),o=n.canvas.width-10-i;n.font="15px Arial",n.fillStyle=r,n.fillText(`${s.toFixed(4)}`,o,20),n.beginPath(),n.moveTo(o,25),n.lineTo(o+i,25),n.lineTo(o+i,25+i),n.strokeStyle=r,n.stroke()}draw(n,t,r){if(r.points)for(const s of this.pointList)s.draw(n,t);if(r.lines)for(const s of this.lineList)s.draw(n,t);if(r.vectors)for(const s of this.vectorList)s.draw(n,t);if(r.main)for(const s of this.mainList)for(const[i,o]of s.entries()){let a=de.mainOuter;i>0&&(a=de.mainInner),o.draw(n,t,a)}if(r.mainB)for(const s of this.mainBList)s.draw(n,t,de.mainB);if(r.second)for(const s of this.secondList)s.draw(n,t,de.second);if(r.secondB)for(const s of this.secondBList)s.draw(n,t,de.secondB);if(r.dynamics)for(const s of this.dynamicsList)s.draw(n,t,de.dynamics);if(r.ruler&&this.drawRuler(n,t,de.ruler),r.refframe){for(const s of[10,100,200])Z(s,0).draw(n,t,de.reference,2),Z(-s,0).draw(n,t,de.reference,2),Z(0,s).draw(n,t,de.reference,2),Z(0,-s).draw(n,t,de.reference,2);Z(0,0).draw(n,t,de.origin,2)}}};function X0(){return new Z0}function jr(e){const n=X0();for(const t in e){const r=e[t];for(const s of r.pointList)n.pointList.push(s);for(const s of r.lineList)n.lineList.push(s);for(const s of r.vectorList)n.vectorList.push(s);for(const s of r.mainList)n.mainList.push(s);for(const s of r.mainBList)n.mainBList.push(s);for(const s of r.secondList)n.secondList.push(s);for(const s of r.secondBList)n.secondBList.push(s);for(const s of r.dynamicsList)n.dynamicsList.push(s)}return n}function lf(){return{points:!1,lines:!1,vectors:!1,main:!0,mainB:!1,second:!0,secondB:!1,dynamics:!1,ruler:!0,refframe:!1}}function ff(e){return{points:e.points,lines:e.lines,vectors:e.vectors,main:e.main,mainB:e.mainB,second:e.second,secondB:e.secondB,dynamics:e.dynamics,ruler:e.ruler,refframe:e.refframe}}var K0=(e=>(e[e.eNumber=0]="eNumber",e[e.eCheckbox=1]="eCheckbox",e[e.eDropdown=2]="eDropdown",e[e.eSectionSeparator=3]="eSectionSeparator",e))(K0||{}),zt={partName:"",params:[],paramSvg:{},sim:{tMax:0,tStep:0,tUpdate:0}};function J0(e,n,t){return{val:e,init:n,chg:t}}function z0(e){const n={};for(const t of Object.keys(e))n[t]=e[t].val;return n}var Q0=class{constructor(e,n=""){M(this,"paramVal",{});M(this,"paramInit",{});M(this,"paramChanged",{});M(this,"partName");M(this,"suffix");M(this,"paramNames");for(const t of e.params)this.paramVal[t.name]=t.init,this.paramInit[t.name]=t.init,this.paramChanged[t.name]=!1;this.suffix=n,this.partName=e.partName,this.paramNames=this.getParamName()}getParamName(){const e=[];for(const n of Object.keys(this.paramVal))e.push(n);return e}getPartName(){return this.partName}getPartNameSuffix(){return this.partName+this.suffix}getSuffix(){return this.suffix}getParamVal(){return this.paramVal}getVal(e){if(this.paramNames.includes(e))return this.paramVal[e];throw`err140: parameter ${e} does not exist in design ${this.partName}`}getInit(e){if(this.paramNames.includes(e))return this.paramInit[e];throw`err149: parameter ${e} does not exist in design ${this.partName}`}getChanged(e){if(this.paramNames.includes(e))return this.paramChanged[e];throw`err156: parameter ${e} does not exist in design ${this.partName}`}setVal(e,n){if(this.paramNames.includes(e))this.paramVal[e]=n,this.paramChanged[e]=!0;else throw`err163: parameter ${e} does not exist in design ${this.partName}`}applyParamVal(e){let n="";for(const t of Object.keys(e))this.setVal(t,e[t]);return n+=`info104: apply ${Object.keys(e).length} parameters on ${this.partName}
62
62
  `,n}applyParamList(e){return this.applyParamVal(z0(e))}getDesignParamList(){const e={};for(const n of this.paramNames)e[n]=J0(this.getVal(n),this.getInit(n),this.getChanged(n));return e}};function df(e,n=""){return new Q0(e,n)}function pf(e,n,t,r=0,s=100,i=1){return{name:e,unit:n,init:t,min:r,max:s,step:i,dropdown:[],pType:0}}function hf(e,n){return{name:e,unit:"checkbox",init:n?1:0,min:0,max:1,step:1,dropdown:[],pType:1}}function mf(e,n,t=0){let r=0;return t<n.length&&(r=t),{name:e,unit:"dropdown",init:r,min:0,max:n.length-1,step:1,dropdown:n,pType:2}}function xf(e){return{name:e,unit:"section-separator",init:0,min:0,max:0,step:0,dropdown:[],pType:3}}var el=(e=>(e[e.eLinearOrtho=0]="eLinearOrtho",e[e.eRotate=1]="eRotate",e))(el||{}),tl=(e=>(e[e.eIdentity=0]="eIdentity",e[e.eIntersection=1]="eIntersection",e[e.eUnion=2]="eUnion",e[e.eSubstraction=3]="eSubstraction",e))(tl||{});function gf(e){return{partName:e,calcErr:!0,logstr:"",fig:{},vol:{extrudes:[],volumes:[]},sub:{}}}function Df(e){if(e.calcErr){let n=`err182: Error in sub-design ${e.partName}
63
63
  `;throw n+=nl(e.logstr,e.partName),n}}function nl(e,n){let t="";for(const r of e.split(`
64
64
  `))r!==""&&(t+=`[${n}]: ${r}
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_app/immutable/nodes/0.C-h3DYfc.js","_app/immutable/chunks/CQMpGrSx.js","_app/immutable/chunks/60ejCBYp.js","_app/immutable/chunks/DVXf0BbA.js","_app/immutable/chunks/B65mmUx4.js","_app/immutable/chunks/CR8iOxPW.js","_app/immutable/assets/0.D3ep0F2Z.css","_app/immutable/nodes/1.CZxIYtB_.js","_app/immutable/chunks/DS9TV8mR.js","_app/immutable/chunks/CamENbg3.js","_app/immutable/chunks/9q6So200.js","_app/immutable/chunks/Bk2aPQXL.js","_app/immutable/nodes/2.Bgxy5SFR.js","_app/immutable/chunks/BMSQdX9I.js","_app/immutable/assets/2.BTCojHq8.css","_app/immutable/nodes/3.BIaTIJ8z.js","_app/immutable/chunks/CcKzBTq0.js","_app/immutable/assets/3.DKegludn.css"])))=>i.map(i=>d[i]);
2
- var G=r=>{throw TypeError(r)};var K=(r,e,s)=>e.has(r)||G("Cannot "+s);var u=(r,e,s)=>(K(r,e,"read from private field"),s?s.call(r):e.get(r)),L=(r,e,s)=>e.has(r)?G("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,s),T=(r,e,s,o)=>(K(r,e,"write to private field"),o?o.call(r,s):e.set(r,s),s);import{h as N,K as J,b as X,E as Z,d as M,Q as $,g as ee,D as A,a1 as te,j as _,a5 as re,a6 as se,$ as ne,p as ae,o as oe,u as ce,a7 as j,a8 as ie,f as k,s as ue,a as le,c as de,r as fe,x as D,t as me}from"../chunks/60ejCBYp.js";import{h as he,m as _e,u as ve,t as W,a as E,c as I,b as ge,s as ye}from"../chunks/CQMpGrSx.js";import{p as V,a as be,i as U,b as q}from"../chunks/CcKzBTq0.js";import{o as Ee}from"../chunks/Bk2aPQXL.js";function F(r,e,s){N&&J();var o=r,a,i;X(()=>{a!==(a=e())&&(i&&($(i),i=null),a&&(i=M(()=>s(o,a))))},Z),N&&(o=ee)}function Pe(r){return class extends Re{constructor(e){super({component:r,...e})}}}var v,d;class Re{constructor(e){L(this,v);L(this,d);var i;var s=new Map,o=(t,n)=>{var c=ne(n);return s.set(t,c),c};const a=new Proxy({...e.props||{},$$events:{}},{get(t,n){return _(s.get(n)??o(n,Reflect.get(t,n)))},has(t,n){return n===te?!0:(_(s.get(n)??o(n,Reflect.get(t,n))),Reflect.has(t,n))},set(t,n,c){return A(s.get(n)??o(n,c),c),Reflect.set(t,n,c)}});T(this,d,(e.hydrate?he:_e)(e.component,{target:e.target,anchor:e.anchor,props:a,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((i=e==null?void 0:e.props)!=null&&i.$$host)||e.sync===!1)&&re(),T(this,v,a.$$events);for(const t of Object.keys(u(this,d)))t==="$set"||t==="$destroy"||t==="$on"||se(this,t,{get(){return u(this,d)[t]},set(n){u(this,d)[t]=n},enumerable:!0});u(this,d).$set=t=>{Object.assign(a,t)},u(this,d).$destroy=()=>{ve(u(this,d))}}$set(e){u(this,d).$set(e)}$on(e,s){u(this,v)[e]=u(this,v)[e]||[];const o=(...a)=>s.call(this,...a);return u(this,v)[e].push(o),()=>{u(this,v)[e]=u(this,v)[e].filter(a=>a!==o)}}$destroy(){u(this,d).$destroy()}}v=new WeakMap,d=new WeakMap;const xe="modulepreload",we=function(r){return"/"+r},Q={},O=function(e,s,o){let a=Promise.resolve();if(s&&s.length>0){document.getElementsByTagName("link");const t=document.querySelector("meta[property=csp-nonce]"),n=(t==null?void 0:t.nonce)||(t==null?void 0:t.getAttribute("nonce"));a=Promise.allSettled(s.map(c=>{if(c=we(c),c in Q)return;Q[c]=!0;const g=c.endsWith(".css"),x=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${x}`))return;const m=document.createElement("link");if(m.rel=g?"stylesheet":xe,g||(m.as="script"),m.crossOrigin="",m.href=c,n&&m.setAttribute("nonce",n),document.head.appendChild(m),g)return new Promise((S,C)=>{m.addEventListener("load",S),m.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(t){const n=new Event("vite:preloadError",{cancelable:!0});if(n.payload=t,window.dispatchEvent(n),!n.defaultPrevented)throw t}return a.then(t=>{for(const n of t||[])n.status==="rejected"&&i(n.reason);return e().catch(i)})},Ue={};var ke=W('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Oe=W("<!> <!>",1);function Ae(r,e){ae(e,!0);let s=V(e,"components",23,()=>[]),o=V(e,"data_0",3,null),a=V(e,"data_1",3,null);oe(()=>e.stores.page.set(e.page)),ce(()=>{e.stores,e.page,e.constructors,s(),e.form,o(),a(),e.stores.page.notify()});let i=j(!1),t=j(!1),n=j(null);Ee(()=>{const l=e.stores.page.subscribe(()=>{_(i)&&(A(t,!0),ie().then(()=>{A(n,be(document.title||"untitled page"))}))});return A(i,!0),l});const c=D(()=>e.constructors[1]);var g=Oe(),x=k(g);{var m=l=>{var h=I();const P=D(()=>e.constructors[0]);var R=k(h);F(R,()=>_(P),(y,b)=>{q(b(y,{get data(){return o()},get form(){return e.form},children:(f,Le)=>{var B=I(),p=k(B);F(p,()=>_(c),(z,H)=>{q(H(z,{get data(){return a()},get form(){return e.form}}),w=>s()[1]=w,()=>{var w;return(w=s())==null?void 0:w[1]})}),E(f,B)},$$slots:{default:!0}}),f=>s()[0]=f,()=>{var f;return(f=s())==null?void 0:f[0]})}),E(l,h)},S=l=>{var h=I();const P=D(()=>e.constructors[0]);var R=k(h);F(R,()=>_(P),(y,b)=>{q(b(y,{get data(){return o()},get form(){return e.form}}),f=>s()[0]=f,()=>{var f;return(f=s())==null?void 0:f[0]})}),E(l,h)};U(x,l=>{e.constructors[1]?l(m):l(S,!1)})}var C=ue(x,2);{var Y=l=>{var h=ke(),P=de(h);{var R=y=>{var b=ge();me(()=>ye(b,_(n))),E(y,b)};U(P,y=>{_(t)&&y(R)})}fe(h),E(l,h)};U(C,l=>{_(i)&&l(Y)})}E(r,g),le()}const qe=Pe(Ae),Fe=[()=>O(()=>import("../nodes/0.C-h3DYfc.js"),__vite__mapDeps([0,1,2,3,4,5,6])),()=>O(()=>import("../nodes/1.CZxIYtB_.js"),__vite__mapDeps([7,1,2,8,9,10,11,5])),()=>O(()=>import("../nodes/2.Bgxy5SFR.js"),__vite__mapDeps([12,1,2,8,3,13,5,14])),()=>O(()=>import("../nodes/3.BIaTIJ8z.js"),__vite__mapDeps([15,13,3,2,1,10,11,5,16,4,9,8,17]))],Be=[],Ge={"/":[2],"/[...design]":[3]},Se={handleError:({error:r})=>{console.error(r)},reroute:()=>{},transport:{}},Ce=Object.fromEntries(Object.entries(Se.transport).map(([r,e])=>[r,e.decode])),Ke=!1,Ne=(r,e)=>Ce[r](e);export{Ne as decode,Ce as decoders,Ge as dictionary,Ke as hash,Se as hooks,Ue as matchers,Fe as nodes,qe as root,Be as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_app/immutable/nodes/0.DFhDVqqs.js","_app/immutable/chunks/CQMpGrSx.js","_app/immutable/chunks/60ejCBYp.js","_app/immutable/chunks/UFE6jN6v.js","_app/immutable/chunks/B65mmUx4.js","_app/immutable/chunks/DStHZ7RC.js","_app/immutable/assets/0.D3ep0F2Z.css","_app/immutable/nodes/1.CSi3glXp.js","_app/immutable/chunks/DS9TV8mR.js","_app/immutable/chunks/D9RKXuOl.js","_app/immutable/chunks/D6b7pR07.js","_app/immutable/chunks/Bk2aPQXL.js","_app/immutable/nodes/2.DLfJBwuP.js","_app/immutable/chunks/Hk7dWbl9.js","_app/immutable/assets/2.BTCojHq8.css","_app/immutable/nodes/3.UouLSSho.js","_app/immutable/chunks/CcKzBTq0.js","_app/immutable/assets/3.DKegludn.css"])))=>i.map(i=>d[i]);
2
+ var G=r=>{throw TypeError(r)};var K=(r,e,s)=>e.has(r)||G("Cannot "+s);var u=(r,e,s)=>(K(r,e,"read from private field"),s?s.call(r):e.get(r)),L=(r,e,s)=>e.has(r)?G("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,s),T=(r,e,s,o)=>(K(r,e,"write to private field"),o?o.call(r,s):e.set(r,s),s);import{h as N,K as J,b as X,E as Z,d as M,Q as $,g as ee,D as A,a1 as te,j as _,a5 as re,a6 as se,$ as ne,p as ae,o as oe,u as ce,a7 as j,a8 as ie,f as k,s as ue,a as le,c as de,r as fe,x as D,t as me}from"../chunks/60ejCBYp.js";import{h as he,m as _e,u as ve,t as W,a as E,c as I,b as ge,s as ye}from"../chunks/CQMpGrSx.js";import{p as V,a as be,i as U,b as q}from"../chunks/CcKzBTq0.js";import{o as Ee}from"../chunks/Bk2aPQXL.js";function F(r,e,s){N&&J();var o=r,a,i;X(()=>{a!==(a=e())&&(i&&($(i),i=null),a&&(i=M(()=>s(o,a))))},Z),N&&(o=ee)}function Pe(r){return class extends Re{constructor(e){super({component:r,...e})}}}var v,d;class Re{constructor(e){L(this,v);L(this,d);var i;var s=new Map,o=(t,n)=>{var c=ne(n);return s.set(t,c),c};const a=new Proxy({...e.props||{},$$events:{}},{get(t,n){return _(s.get(n)??o(n,Reflect.get(t,n)))},has(t,n){return n===te?!0:(_(s.get(n)??o(n,Reflect.get(t,n))),Reflect.has(t,n))},set(t,n,c){return A(s.get(n)??o(n,c),c),Reflect.set(t,n,c)}});T(this,d,(e.hydrate?he:_e)(e.component,{target:e.target,anchor:e.anchor,props:a,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((i=e==null?void 0:e.props)!=null&&i.$$host)||e.sync===!1)&&re(),T(this,v,a.$$events);for(const t of Object.keys(u(this,d)))t==="$set"||t==="$destroy"||t==="$on"||se(this,t,{get(){return u(this,d)[t]},set(n){u(this,d)[t]=n},enumerable:!0});u(this,d).$set=t=>{Object.assign(a,t)},u(this,d).$destroy=()=>{ve(u(this,d))}}$set(e){u(this,d).$set(e)}$on(e,s){u(this,v)[e]=u(this,v)[e]||[];const o=(...a)=>s.call(this,...a);return u(this,v)[e].push(o),()=>{u(this,v)[e]=u(this,v)[e].filter(a=>a!==o)}}$destroy(){u(this,d).$destroy()}}v=new WeakMap,d=new WeakMap;const xe="modulepreload",we=function(r){return"/"+r},Q={},O=function(e,s,o){let a=Promise.resolve();if(s&&s.length>0){document.getElementsByTagName("link");const t=document.querySelector("meta[property=csp-nonce]"),n=(t==null?void 0:t.nonce)||(t==null?void 0:t.getAttribute("nonce"));a=Promise.allSettled(s.map(c=>{if(c=we(c),c in Q)return;Q[c]=!0;const g=c.endsWith(".css"),x=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${x}`))return;const m=document.createElement("link");if(m.rel=g?"stylesheet":xe,g||(m.as="script"),m.crossOrigin="",m.href=c,n&&m.setAttribute("nonce",n),document.head.appendChild(m),g)return new Promise((S,C)=>{m.addEventListener("load",S),m.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(t){const n=new Event("vite:preloadError",{cancelable:!0});if(n.payload=t,window.dispatchEvent(n),!n.defaultPrevented)throw t}return a.then(t=>{for(const n of t||[])n.status==="rejected"&&i(n.reason);return e().catch(i)})},Ue={};var ke=W('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Oe=W("<!> <!>",1);function Ae(r,e){ae(e,!0);let s=V(e,"components",23,()=>[]),o=V(e,"data_0",3,null),a=V(e,"data_1",3,null);oe(()=>e.stores.page.set(e.page)),ce(()=>{e.stores,e.page,e.constructors,s(),e.form,o(),a(),e.stores.page.notify()});let i=j(!1),t=j(!1),n=j(null);Ee(()=>{const l=e.stores.page.subscribe(()=>{_(i)&&(A(t,!0),ie().then(()=>{A(n,be(document.title||"untitled page"))}))});return A(i,!0),l});const c=D(()=>e.constructors[1]);var g=Oe(),x=k(g);{var m=l=>{var h=I();const P=D(()=>e.constructors[0]);var R=k(h);F(R,()=>_(P),(y,b)=>{q(b(y,{get data(){return o()},get form(){return e.form},children:(f,Le)=>{var B=I(),p=k(B);F(p,()=>_(c),(z,H)=>{q(H(z,{get data(){return a()},get form(){return e.form}}),w=>s()[1]=w,()=>{var w;return(w=s())==null?void 0:w[1]})}),E(f,B)},$$slots:{default:!0}}),f=>s()[0]=f,()=>{var f;return(f=s())==null?void 0:f[0]})}),E(l,h)},S=l=>{var h=I();const P=D(()=>e.constructors[0]);var R=k(h);F(R,()=>_(P),(y,b)=>{q(b(y,{get data(){return o()},get form(){return e.form}}),f=>s()[0]=f,()=>{var f;return(f=s())==null?void 0:f[0]})}),E(l,h)};U(x,l=>{e.constructors[1]?l(m):l(S,!1)})}var C=ue(x,2);{var Y=l=>{var h=ke(),P=de(h);{var R=y=>{var b=ge();me(()=>ye(b,_(n))),E(y,b)};U(P,y=>{_(t)&&y(R)})}fe(h),E(l,h)};U(C,l=>{_(i)&&l(Y)})}E(r,g),le()}const qe=Pe(Ae),Fe=[()=>O(()=>import("../nodes/0.DFhDVqqs.js"),__vite__mapDeps([0,1,2,3,4,5,6])),()=>O(()=>import("../nodes/1.CSi3glXp.js"),__vite__mapDeps([7,1,2,8,9,10,11,5])),()=>O(()=>import("../nodes/2.DLfJBwuP.js"),__vite__mapDeps([12,1,2,8,3,13,5,14])),()=>O(()=>import("../nodes/3.UouLSSho.js"),__vite__mapDeps([15,13,3,2,1,10,11,5,16,4,9,8,17]))],Be=[],Ge={"/":[2],"/[...design]":[3]},Se={handleError:({error:r})=>{console.error(r)},reroute:()=>{},transport:{}},Ce=Object.fromEntries(Object.entries(Se.transport).map(([r,e])=>[r,e.decode])),Ke=!1,Ne=(r,e)=>Ce[r](e);export{Ne as decode,Ce as decoders,Ge as dictionary,Ke as hash,Se as hooks,Ue as matchers,Fe as nodes,qe as root,Be as server_loads};
@@ -0,0 +1 @@
1
+ import{b as a}from"../chunks/D6b7pR07.js";export{a as start};
@@ -1,2 +1,2 @@
1
- import{t as v,a as p,s as w}from"../chunks/CQMpGrSx.js";import{p as j,s as e,f as u,a as P,c as t,r as a,n as k,y as r,t as S,j as O}from"../chunks/60ejCBYp.js";import{F as z,s as C,e as D,i as F}from"../chunks/DVXf0BbA.js";import{s as M}from"../chunks/B65mmUx4.js";import{b as T}from"../chunks/CR8iOxPW.js";const W=!0,Q=Object.freeze(Object.defineProperty({__proto__:null,prerender:W},Symbol.toStringTag,{value:"Module"})),q="designix-ui",A="1.0.0",B={designix:"^1.0.6",geometrix:"^1.0.6",geomui:"^1.0.6"},E={name:q,version:A,dependencies:B};var G=v(" <br>",1),H=v(`<h1 class="svelte-im9xuh">Welcome to designix-ui</h1> <h6 class="svelte-im9xuh">Showcasing the usage of the <a href="https://svelte.dev/">svelte</a> library <a href="https://www.npmjs.com/package/geomui">geomui</a>.</h6> <nav class="svelte-im9xuh"><a class="svelte-im9xuh">index: list of designs</a></nav> <main class="svelte-im9xuh"><!></main> <footer class="svelte-im9xuh"><article><a href="https://github.com/charlyoleg2/parametrix">designix-ui</a>, a minimalist showcase
1
+ import{t as v,a as p,s as w}from"../chunks/CQMpGrSx.js";import{p as j,s as e,f as u,a as P,c as t,r as a,n as k,y as r,t as S,j as O}from"../chunks/60ejCBYp.js";import{F as z,s as C,e as D,i as F}from"../chunks/UFE6jN6v.js";import{s as M}from"../chunks/B65mmUx4.js";import{b as T}from"../chunks/DStHZ7RC.js";const W=!0,Q=Object.freeze(Object.defineProperty({__proto__:null,prerender:W},Symbol.toStringTag,{value:"Module"})),q="designix-ui",A="1.0.0",B={designix:"^1.0.6",geometrix:"^1.0.6",geomui:"^1.0.6"},E={name:q,version:A,dependencies:B};var G=v(" <br>",1),H=v(`<h1 class="svelte-im9xuh">Welcome to designix-ui</h1> <h6 class="svelte-im9xuh">Showcasing the usage of the <a href="https://svelte.dev/">svelte</a> library <a href="https://www.npmjs.com/package/geomui">geomui</a>.</h6> <nav class="svelte-im9xuh"><a class="svelte-im9xuh">index: list of designs</a></nav> <main class="svelte-im9xuh"><!></main> <footer class="svelte-im9xuh"><article><a href="https://github.com/charlyoleg2/parametrix">designix-ui</a>, a minimalist showcase
2
2
  of <a href="https://www.npmjs.com/package/geomui">geomui</a>.</article> <article><h3>Designix-ui version</h3> <code></code></article> <article><h3>Parametrix</h3> <ol><li><a href="https://github.com/charlyoleg2/parametrix">Parametrix repo</a></li> <li><a href="https://charlyoleg2.github.io/parametrix/">Parametrix page</a></li> <li><a href="https://catalos-catalui.vercel.app/">Catalos</a></li></ol></article></footer>`,1);function R(g,o){j(o,!0);const f=z(E);var l=H(),s=e(u(l),4),d=t(s);C(d,"href",`${T}/`),a(s);var i=e(s,2),x=t(i);M(x,()=>o.children??k),a(i);var n=e(i,2),c=e(t(n),2),m=e(t(c),2);D(m,21,()=>f,F,(_,b)=>{r();var h=G(),y=u(h,!0);r(),S(()=>w(y,O(b))),p(_,h)}),a(m),a(c),r(2),a(n),p(g,l),P()}export{R as component,Q as universal};
@@ -1 +1 @@
1
- import{t as h,a as l,s as e}from"../chunks/CQMpGrSx.js";import"../chunks/DS9TV8mR.js";import{p as v,f as u,t as g,a as x,s as _,c as p,r as o}from"../chunks/60ejCBYp.js";import{i as d,p as i}from"../chunks/CamENbg3.js";var b=h("<h1> </h1> <p> </p>",1);function w(m,f){v(f,!1),d();var a=b(),t=u(a),n=p(t,!0);o(t);var r=_(t,2),c=p(r,!0);o(r),g(()=>{var s;e(n,i.status),e(c,(s=i.error)==null?void 0:s.message)}),l(m,a),x()}export{w as component};
1
+ import{t as h,a as l,s as e}from"../chunks/CQMpGrSx.js";import"../chunks/DS9TV8mR.js";import{p as v,f as u,t as g,a as x,s as _,c as p,r as o}from"../chunks/60ejCBYp.js";import{i as d,p as i}from"../chunks/D9RKXuOl.js";var b=h("<h1> </h1> <p> </p>",1);function w(m,f){v(f,!1),d();var a=b(),t=u(a),n=p(t,!0);o(t);var r=_(t,2),c=p(r,!0);o(r),g(()=>{var s;e(n,i.status),e(c,(s=i.error)==null?void 0:s.message)}),l(m,a),x()}export{w as component};
@@ -1 +1 @@
1
- import{t as l,a as i,s as v}from"../chunks/CQMpGrSx.js";import"../chunks/DS9TV8mR.js";import{s as d,f as h,r as s,c as m,t as _,j as f}from"../chunks/60ejCBYp.js";import{e as g,i as b,s as x}from"../chunks/DVXf0BbA.js";import{d as u}from"../chunks/BMSQdX9I.js";import{b as L}from"../chunks/CR8iOxPW.js";var $=l("<li><a> </a></li>"),j=l('<h2 class="svelte-1r3d1r">List of designs:</h2> <ol></ol>',1);function A(p){var r=j(),e=d(h(r),2);g(e,5,()=>u,b,(c,o)=>{var a=$(),t=m(a),n=m(t,!0);s(t),s(a),_(()=>{x(t,"href",`${L}/${f(o)}`),v(n,f(o))}),i(c,a)}),s(e),i(p,r)}export{A as component};
1
+ import{t as l,a as i,s as v}from"../chunks/CQMpGrSx.js";import"../chunks/DS9TV8mR.js";import{s as d,f as h,r as s,c as m,t as _,j as f}from"../chunks/60ejCBYp.js";import{e as g,i as b,s as x}from"../chunks/UFE6jN6v.js";import{d as u}from"../chunks/Hk7dWbl9.js";import{b as L}from"../chunks/DStHZ7RC.js";var $=l("<li><a> </a></li>"),j=l('<h2 class="svelte-1r3d1r">List of designs:</h2> <ol></ol>',1);function A(p){var r=j(),e=d(h(r),2);g(e,5,()=>u,b,(c,o)=>{var a=$(),t=m(a),n=m(t,!0);s(t),s(a),_(()=>{x(t,"href",`${L}/${f(o)}`),v(n,f(o))}),i(c,a)}),s(e),i(p,r)}export{A as component};
@@ -1,4 +1,4 @@
1
- import{a as ba,b as Ra}from"../chunks/BMSQdX9I.js";import{H as Ua,a as Na,g as Ia}from"../chunks/9q6So200.js";import{l as ua,e as Xa,w as Wa,f as Ft,c as Re,a as C,t as R,s as D,b as ga,r as da,g as xa}from"../chunks/CQMpGrSx.js";import{h as Ke,aE as Ya,m as za,T as Sa,R as Aa,D as x,j as a,B as Va,f as yt,c as n,r as s,t as Q,p as bt,a as gt,s as l,a7 as H,x as mt,y as jt,u as _a,aF as Za}from"../chunks/60ejCBYp.js";import{c as qa,a as A,p as wt,i as ie,b as Ge}from"../chunks/CcKzBTq0.js";import{s as E,e as zt,i as St,G as at,H as Be,I as Ea,J as Ka,K as Ga,L as Ba,M as fa,P as qe,N as ka,O as Ee,Q as ce,R as Ha,T as Ja,U as Qa,V as $a,W as oa,X as ts,Y as ja,f as xe,r as ca,Z as st,_ as es,$ as pa,a0 as as,a1 as ss,a2 as ls,a3 as ns}from"../chunks/DVXf0BbA.js";import{b as He}from"../chunks/CR8iOxPW.js";import{s as rs}from"../chunks/B65mmUx4.js";import{p as ha,i as os}from"../chunks/CamENbg3.js";import{a as cs,o as is}from"../chunks/Bk2aPQXL.js";import"../chunks/DS9TV8mR.js";function Ca(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var c=e.length;for(t=0;t<c;t++)e[t]&&(r=Ca(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function vs(){for(var e,t,r=0,o="",c=arguments.length;r<c;r++)(e=arguments[r])&&(t=Ca(e))&&(o&&(o+=" "),o+=t);return o}function ya(e){return typeof e=="object"?vs(e):e??""}function wa(e,t,r){var o=e.__className,c=ds(t,r);Ke&&e.className===c?e.__className=c:(o!==c||Ke&&e.className!==c)&&(t==null,e.className=c,e.__className=c)}function ds(e,t){return(e??"")+(" "+t)}function ht(e,t,r){if(r){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function ke(e,t,r=t){var o=Ya();ua(e,"input",c=>{var i=c?e.defaultValue:e.value;if(i=ia(e)?va(i):i,r(i),o&&i!==(i=t())){var d=e.selectionStart,v=e.selectionEnd;e.value=i??"",v!==null&&(e.selectionStart=d,e.selectionEnd=Math.min(v,e.value.length))}}),(Ke&&e.defaultValue!==e.value||za(t)==null&&e.value)&&r(ia(e)?va(e.value):e.value),Sa(()=>{var c=t();ia(e)&&c===va(e.value)||e.type==="date"&&!c&&!e.value||c!==e.value&&(e.value=c??"")})}function pt(e,t,r=t){ua(e,"change",o=>{var c=o?e.defaultChecked:e.checked;r(c)}),(Ke&&e.defaultChecked!==e.checked||za(t)==null)&&r(e.checked),Sa(()=>{var o=t();e.checked=!!o})}function ia(e){var t=e.type;return t==="number"||t==="range"}function va(e){return e===""?null:+e}function Oa(e,t,r){if(e.multiple)return _s(e,t);for(var o of e.options){var c=Te(o);if(qa(c,t)){o.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function us(e,t){Aa(()=>{var r=new MutationObserver(()=>{var o=e.__value;Oa(e,o)});return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{r.disconnect()}})}function Da(e,t,r=t){var o=!0;ua(e,"change",c=>{var i=c?"[selected]":":checked",d;if(e.multiple)d=[].map.call(e.querySelectorAll(i),Te);else{var v=e.querySelector(i)??e.querySelector("option:not([disabled])");d=v&&Te(v)}r(d)}),Aa(()=>{var c=t();if(Oa(e,c,o),o&&c===void 0){var i=e.querySelector(":checked");i!==null&&(c=Te(i),r(c))}e.__value=c,o=!1}),us(e)}function _s(e,t){for(var r of e.options)r.selected=~t.indexOf(Te(r))}function Te(e){return"__value"in e?e.__value:e.value}function fs(e,t){Xa(window,["resize"],()=>Wa(()=>t(window[e])))}function ms(e){var t=Va(0);return function(){return arguments.length===1?(x(t,a(t)+1),arguments[0]):(a(t),e())}}function bs(e,t){throw new Ua(e,t)}new TextEncoder;function gs({params:e}){const t=e.design;if(Object.keys(ba).includes(t))return{pageDef:ba[t],allLink:Ra};bs(404,"Design undefined!")}const xn=Object.freeze(Object.defineProperty({__proto__:null,load:gs},Symbol.toStringTag,{value:"Module"})),J=A({});function Pa(e,t,r){if(Object.keys(J).includes(e)){const c=J[e],i=Object.keys(c);for(const d of Object.keys(t))i.includes(d)?r&&(c[d]=t[d]):c[d]=t[d];J[e]=c}else J[e]=t}function xs(e){const t=e.pDef.partName,r={};for(const o of e.pDef.params)r[o.name]=o.init;Pa(t,r,!1)}function ks(e,t){t(!1)}var js=R('<aside class="backdrop svelte-sjxf1e"><div class="dialog svelte-sjxf1e"><button class="svelte-sjxf1e"><img></button></div></aside>');function Fa(e,t){let r=wt(t,"modalOpen",15);var o=Re(),c=yt(o);{var i=d=>{var v=js(),f=n(v),h=n(f);h.__click=[ks,r];var _=n(h);s(h),s(f),s(v),Q(()=>{E(_,"src",t.svgPath),E(_,"alt",t.svgPath)}),C(d,v)};ie(c,d=>{r()&&d(i)})}C(e,o)}Ft(["click"]);var ps=(e,t,r)=>t(a(r)),hs=R('<button class="svelte-fxmnfh"><img class="svelte-fxmnfh"></button>'),ys=R('<section class="svelte-fxmnfh"><!> <!></section>');function ws(e,t){bt(t,!0);function r(_){const N=[];for(const S of Object.values(_.paramSvg))N.includes(S)||N.push(S);return N}let o=H(!1),c=H(""),i=mt(()=>r(t.pDef).map(_=>`${He}/pgdsvg/${_}`));function d(_){x(c,A(_)),x(o,!0)}var v=ys(),f=n(v);Fa(f,{get svgPath(){return a(c)},get modalOpen(){return a(o)},set modalOpen(_){x(o,A(_))}});var h=l(f,2);zt(h,17,()=>a(i),St,(_,N)=>{var S=hs();S.__click=[ps,d,N];var b=n(S);s(S),Q(()=>{E(b,"src",a(N)),E(b,"alt",a(N))}),C(_,S)}),s(v),C(e,v),gt()}Ft(["click"]);function Ds(e,t){t(!1)}function Ls(e,t,r){t.okFunc(),r(!1)}var Ns=R('<aside class="backdrop svelte-weruk7"><div class="dialog svelte-weruk7"><article class="question svelte-weruk7"><!></article> <footer class="svelte-weruk7"><button class="cancel svelte-weruk7">Cancel</button> <button class="ok svelte-weruk7"> </button></footer></div></aside>');function Me(e,t){bt(t,!0);let r=wt(t,"okName",3,"Ok"),o=wt(t,"modalOpen",15),c=wt(t,"sizeLarge",3,!1);var i=Re(),d=yt(i);{var v=f=>{var h=Ns(),_=n(h),N=n(_),S=n(N);rs(S,()=>t.children),s(N);var b=l(N,2),u=n(b);u.__click=[Ds,o];var T=l(u,2);T.__click=[Ls,t,o];var I=n(T,!0);s(T),s(b),s(_),s(h),Q(()=>{ht(_,"sizeLarge",c()),D(I,r())}),C(f,h)};ie(d,f=>{o()&&f(v)})}C(e,i),gt()}Ft(["click"]);function zs(e,t,r,o){for(const c of t())a(r)[c]=a(o)}var Ss=(e,t)=>{x(t,!0)},As=R('<p class="diagItem svelte-12dj9tj"> </p>'),Cs=R('<p class="diagTitle svelte-12dj9tj">Do you really want to delete the following localStorage keys?</p> <!>',1),Os=(e,t,r)=>t(a(r)),Ps=R('<tr class="svelte-12dj9tj"><td><input type="checkbox"></td><td class="svelte-12dj9tj"><button class="svelte-12dj9tj"> </button></td><td> </td></tr>'),Fs=R('<div class="deleteKeys svelte-12dj9tj"><button class="svelte-12dj9tj">Delete</button> <!> <table class="svelte-12dj9tj"><thead class="svelte-12dj9tj"><tr><td>Delete</td><td>Key name</td><td>Last modification</td></tr><tr><td><input type="checkbox"></td><td class="instruction">delete all</td><td></td></tr></thead><tbody class="svelte-12dj9tj"></tbody></table></div>');function Ma(e,t){bt(t,!0);let r=wt(t,"storeName",15),o=wt(t,"localKeys",15),c=H(A({})),i=H(!1),d=H(!1);function v(){let z=[];const p=new RegExp(`^${t.pageName}_`);return z=Object.keys(window.localStorage).filter(K=>p.test(K)).map(K=>K.replace(p,"")),z.sort(),z}o(v());function f(z){r(z)}function h(z){let p={};for(const Z of z){let K="";const $=`${t.pageName}_${Z}`,q=window.localStorage.getItem($);q!==null&&(K=JSON.parse(q).lastModif),p[Z]=K}return p}let _=mt(()=>h(o()));function N(z){let p={};for(const Z of z)p[Z]=!1;return p}x(c,A(N(o())));function S(){for(const z of o())if(a(c)[z]){const p=`${t.pageName}_${z}`;window.localStorage.removeItem(p)}x(i,!1),o(v())}var b=Fs(),u=n(b);u.__click=[Ss,d];var T=l(u,2);Me(T,{okName:"Confirm",okFunc:S,get modalOpen(){return a(d)},set modalOpen(z){x(d,A(z))},children:(z,p)=>{var Z=Cs(),K=l(yt(Z),2);zt(K,17,o,St,($,q)=>{var tt=Re(),dt=yt(tt);{var ot=G=>{var ut=As(),xt=n(ut,!0);s(ut),Q(()=>D(xt,a(q))),C(G,ut)};ie(dt,G=>{a(c)[a(q)]&&G(ot)})}C($,tt)}),C(z,Z)},$$slots:{default:!0}});var I=l(T,2),et=n(I),M=l(n(et)),B=n(M),nt=n(B);at(nt),nt.__change=[zs,o,c,i],s(B),jt(2),s(M),s(et);var rt=l(et);zt(rt,21,o,St,(z,p)=>{var Z=Ps(),K=n(Z),$=n(K);at($),s(K);var q=l(K),tt=n(q);tt.__click=[Os,f,p];var dt=n(tt,!0);s(tt),s(q);var ot=l(q),G=n(ot,!0);s(ot),s(Z),Q(()=>{D(dt,a(p)),D(G,a(_)[a(p)])}),pt($,()=>a(c)[a(p)],ut=>a(c)[a(p)]=ut),C(z,Z)}),s(rt),s(I),s(b),pt(nt,()=>a(i),z=>x(i,z)),C(e,b),gt()}Ft(["click","change"]);var Ms=R('<p class="warnMsg svelte-1rkdwo"> </p>'),Ts=R('<!> <div class="svelte-1rkdwo"><label for="storName" class="svelte-1rkdwo">Give a name to your parameter-set:</label> <input type="text" id="storName" required minlength="4" maxlength="30" size="32" class="svelte-1rkdwo"> <!></div>',1);function Rs(e,t){bt(t,!0);let r=wt(t,"storeName",15),o=H(A([]));function c(S){const b=/[-:]/g,u=/\..*$/,T=new Date().toISOString().replace(b,"").replace(u,"").replace("T","_");return`${S}_${T}`}r(c(t.pageName));let i=mt(()=>a(o).includes(r()));var d=Ts(),v=yt(d);Ma(v,{get pageName(){return t.pageName},get storeName(){return r()},set storeName(S){r(S)},get localKeys(){return a(o)},set localKeys(S){x(o,A(S))}});var f=l(v,2),h=l(n(f),2);at(h);var _=l(h,2);{var N=S=>{var b=Ms(),u=n(b);s(b),Q(()=>D(u,`Warning: name ${r()??""} already used`)),C(S,b)};ie(_,S=>{a(i)&&S(N)})}s(f),ke(h,r),C(e,d),gt()}var Us=R('<!> <div class="svelte-1ozd0ey"><label for="storName" class="svelte-1ozd0ey">Select a parameter-set:</label> <input type="text" id="storName" readonly="" minlength="4" maxlength="30" size="32" class="svelte-1ozd0ey"></div>',1);function Is(e,t){bt(t,!0);let r=wt(t,"storeName",15),o=H(A([]));function c(h){let _=r();return!h.includes(_)&&(h.length>0?_=h[0]:_=""),_}_a(()=>{r(c(a(o)))});var i=Us(),d=yt(i);Ma(d,{get pageName(){return t.pageName},get storeName(){return r()},set storeName(h){r(h)},get localKeys(){return a(o)},set localKeys(h){x(o,A(h))}});var v=l(d,2),f=l(n(v),2);at(f),s(v),Q(()=>Be(f,r())),C(e,i),gt()}const j=A({dLayers:Ka(),zAdjust:Ea(),canvasZWidth:0});var Xs=R('<canvas class="mini svelte-z8e4tz"></canvas>');function La(e,t){bt(t,!0);const r=200,o=.6;let c;function i(f,h,_,N){const S=Ga(N);S.ruler=!1;let b;if(c){const u=c.getContext("2d");u.clearRect(0,0,u.canvas.width,u.canvas.height);const T=u.canvas.width;try{t.full?b=f.getAdjustFull(u.canvas.width,u.canvas.height):b=Ba(_,T,h),f.draw(u,b,S)}catch(I){console.log(I)}}}_a(()=>{i(t.pFig,j.zAdjust,j.canvasZWidth,j.dLayers)});function d(f){const h=f.offsetX,_=f.offsetY,N=c.getContext("2d"),S=N.canvas.width/2,b=N.canvas.height/2;if(f.button===0){let u=1;h>S&&(u+=1*o),_>b&&(u+=2*o),N.canvas.width=u*r,N.canvas.height=u*r,i(t.pFig,j.zAdjust,j.canvasZWidth,j.dLayers)}}var v=Xs();E(v,"width",r),E(v,"height",r),v.__click=d,Ge(v,f=>c=f,()=>c),C(e,v),gt()}Ft(["click"]);function Ws(e,t){const r=document.createElement("a");r.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),r.setAttribute("download",e),r.click(),r.remove()}function Ys(e,t,r){const o=/[-:]/g,c=/\..*$/,i=new Date().toISOString().replace(o,"").replace(c,"").replace("T","_");return fa(i,e,t,r)}function ma(e,t,r){const o=/[-:]/g,c=/\..*$/,i=new Date().toISOString().replace(o,"").replace(c,"").replace("T","_"),d=`px_${e}_${i}.json`,v=fa(i,e,t,r);Ws(d,v)}function Vs(e,t,r){const o=new URL(e),c=2e3;let i=o.toString().length;for(const d of Object.keys(t)){const v=t[d].toString(),f=2+d.length+v.length;o.searchParams.append(encodeURIComponent(d),encodeURIComponent(v)),i+=f}return i>=c&&console.log(`warn547: generateUrl: strLength ${i} larger than strLengthLimit ${c}`),o.toString()}function Zs(e,t){if(e.target){const r=e.target.files;r&&t(r[0])}}function qs(e,t,r,o){x(t,A(r())),x(o,!0)}function Es(e,t){x(t,!0)}function Ks(e,t){x(t,!0)}function Gs(e,t){x(t,!1)}var Bs=(e,t)=>{x(t,!0)},Hs=(e,t)=>{x(t,!0)},Js=(e,t,r)=>t(a(r).name),Qs=R('<input type="number" class="input-number svelte-jonk14"> <input type="range" class="svelte-jonk14">',1),$s=R("<option> </option>"),tl=R("<select></select>"),el=R("<option> </option>"),al=R("<select></select>"),sl=R('<tr class="svelte-jonk14"><td class="svelte-jonk14"></td><td class="svelte-jonk14"><button class="svelte-jonk14"> </button></td><td class="svelte-jonk14"><!></td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"> </td></tr>'),ll=R('<tbody class="svelte-jonk14"><tr class="separator svelte-jonk14"><td class="svelte-jonk14"></td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"><label class="svelte-jonk14"><input type="checkbox" class="svelte-jonk14"> <span class="svelte-jonk14"></span></label></td></tr></tbody> <tbody class="svelte-jonk14"></tbody>',1),nl=(e,t)=>{x(t,!0)},rl=R('<p>Copy this URL and send it to your friends!</p> <p class="cUrl svelte-jonk14"> </p>',1),ol=R('<section class="svelte-jonk14"><h2 class="svelte-jonk14">Parameters</h2> <main class="svelte-jonk14"><label for="loadFParams" class="fileUpload svelte-jonk14">Load Params from File</label> <input id="loadFParams" type="file" accept="text/plain, application/json" class="svelte-jonk14"> <button class="svelte-jonk14">Set Params Default</button> <button class="svelte-jonk14">Load Params from localStorage</button> <!> <!> <textarea rows="3" cols="80" readonly="" wrap="soft" class="svelte-jonk14"></textarea> <table class="svelte-jonk14"><thead class="svelte-jonk14"><tr class="svelte-jonk14"><td class="svelte-jonk14">&#35;</td><td class="svelte-jonk14">Parameter name</td><td class="svelte-jonk14">Value<span class="svelte-jonk14"><button class="svelte-jonk14">&minus;</button><button class="svelte-jonk14">+</button></span></td><td class="svelte-jonk14">Unit</td><td class="svelte-jonk14">Default</td><td class="svelte-jonk14">Min</td><td class="svelte-jonk14">Max</td><td class="svelte-jonk14">Step</td></tr></thead><!></table> <div class="comment svelte-jonk14"><label for="inComment">Comment:</label> <input type="text" id="inComment" maxlength="150"></div> <button class="svelte-jonk14">Save Parameters to File</button> <button class="svelte-jonk14">Save Parameters as URL</button> <button class="svelte-jonk14">Save Parameters to localStorage</button> <!> <!></main> <!> <button class="side-img svelte-jonk14"><img class="svelte-jonk14"></button> <div class="mini-canvas svelte-jonk14"><!></div> <div class="mini-canvas svelte-jonk14"><!></div></section>');function cl(e,t){bt(t,!0);let r=H(""),o=H(!1),c=H(""),i=H(!1),d=H(!1),v=H(!1),f=H(!1),h=H(!1),_=H(""),N=H(""),S=H(""),b=H(A(q(t.pDef.params[0].name))),u=H(!1),T=H(A(ot(dt(t.pDef.params))));Na(()=>{x(b,A(q(t.pDef.params[0].name))),x(T,A(ot(dt(t.pDef.params))))});function I(g,k){let L="",X=!1;g!==t.pDef.partName&&(L+=`warn361: read partName: '${g}' expected partName: '${t.pDef.partName}'
1
+ import{a as ba,b as Ra}from"../chunks/Hk7dWbl9.js";import{H as Ua,a as Na,g as Ia}from"../chunks/D6b7pR07.js";import{l as ua,e as Xa,w as Wa,f as Ft,c as Re,a as C,t as R,s as D,b as ga,r as da,g as xa}from"../chunks/CQMpGrSx.js";import{h as Ke,aE as Ya,m as za,T as Sa,R as Aa,D as x,j as a,B as Va,f as yt,c as n,r as s,t as Q,p as bt,a as gt,s as l,a7 as H,x as mt,y as jt,u as _a,aF as Za}from"../chunks/60ejCBYp.js";import{c as qa,a as A,p as wt,i as ie,b as Ge}from"../chunks/CcKzBTq0.js";import{s as E,e as zt,i as St,G as at,H as Be,I as Ea,J as Ka,K as Ga,L as Ba,M as fa,P as qe,N as ka,O as Ee,Q as ce,R as Ha,T as Ja,U as Qa,V as $a,W as oa,X as ts,Y as ja,f as xe,r as ca,Z as st,_ as es,$ as pa,a0 as as,a1 as ss,a2 as ls,a3 as ns}from"../chunks/UFE6jN6v.js";import{b as He}from"../chunks/DStHZ7RC.js";import{s as rs}from"../chunks/B65mmUx4.js";import{p as ha,i as os}from"../chunks/D9RKXuOl.js";import{a as cs,o as is}from"../chunks/Bk2aPQXL.js";import"../chunks/DS9TV8mR.js";function Ca(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var c=e.length;for(t=0;t<c;t++)e[t]&&(r=Ca(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function vs(){for(var e,t,r=0,o="",c=arguments.length;r<c;r++)(e=arguments[r])&&(t=Ca(e))&&(o&&(o+=" "),o+=t);return o}function ya(e){return typeof e=="object"?vs(e):e??""}function wa(e,t,r){var o=e.__className,c=ds(t,r);Ke&&e.className===c?e.__className=c:(o!==c||Ke&&e.className!==c)&&(t==null,e.className=c,e.__className=c)}function ds(e,t){return(e??"")+(" "+t)}function ht(e,t,r){if(r){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function ke(e,t,r=t){var o=Ya();ua(e,"input",c=>{var i=c?e.defaultValue:e.value;if(i=ia(e)?va(i):i,r(i),o&&i!==(i=t())){var d=e.selectionStart,v=e.selectionEnd;e.value=i??"",v!==null&&(e.selectionStart=d,e.selectionEnd=Math.min(v,e.value.length))}}),(Ke&&e.defaultValue!==e.value||za(t)==null&&e.value)&&r(ia(e)?va(e.value):e.value),Sa(()=>{var c=t();ia(e)&&c===va(e.value)||e.type==="date"&&!c&&!e.value||c!==e.value&&(e.value=c??"")})}function pt(e,t,r=t){ua(e,"change",o=>{var c=o?e.defaultChecked:e.checked;r(c)}),(Ke&&e.defaultChecked!==e.checked||za(t)==null)&&r(e.checked),Sa(()=>{var o=t();e.checked=!!o})}function ia(e){var t=e.type;return t==="number"||t==="range"}function va(e){return e===""?null:+e}function Oa(e,t,r){if(e.multiple)return _s(e,t);for(var o of e.options){var c=Te(o);if(qa(c,t)){o.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function us(e,t){Aa(()=>{var r=new MutationObserver(()=>{var o=e.__value;Oa(e,o)});return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{r.disconnect()}})}function Da(e,t,r=t){var o=!0;ua(e,"change",c=>{var i=c?"[selected]":":checked",d;if(e.multiple)d=[].map.call(e.querySelectorAll(i),Te);else{var v=e.querySelector(i)??e.querySelector("option:not([disabled])");d=v&&Te(v)}r(d)}),Aa(()=>{var c=t();if(Oa(e,c,o),o&&c===void 0){var i=e.querySelector(":checked");i!==null&&(c=Te(i),r(c))}e.__value=c,o=!1}),us(e)}function _s(e,t){for(var r of e.options)r.selected=~t.indexOf(Te(r))}function Te(e){return"__value"in e?e.__value:e.value}function fs(e,t){Xa(window,["resize"],()=>Wa(()=>t(window[e])))}function ms(e){var t=Va(0);return function(){return arguments.length===1?(x(t,a(t)+1),arguments[0]):(a(t),e())}}function bs(e,t){throw new Ua(e,t)}new TextEncoder;function gs({params:e}){const t=e.design;if(Object.keys(ba).includes(t))return{pageDef:ba[t],allLink:Ra};bs(404,"Design undefined!")}const xn=Object.freeze(Object.defineProperty({__proto__:null,load:gs},Symbol.toStringTag,{value:"Module"})),J=A({});function Pa(e,t,r){if(Object.keys(J).includes(e)){const c=J[e],i=Object.keys(c);for(const d of Object.keys(t))i.includes(d)?r&&(c[d]=t[d]):c[d]=t[d];J[e]=c}else J[e]=t}function xs(e){const t=e.pDef.partName,r={};for(const o of e.pDef.params)r[o.name]=o.init;Pa(t,r,!1)}function ks(e,t){t(!1)}var js=R('<aside class="backdrop svelte-sjxf1e"><div class="dialog svelte-sjxf1e"><button class="svelte-sjxf1e"><img></button></div></aside>');function Fa(e,t){let r=wt(t,"modalOpen",15);var o=Re(),c=yt(o);{var i=d=>{var v=js(),f=n(v),h=n(f);h.__click=[ks,r];var _=n(h);s(h),s(f),s(v),Q(()=>{E(_,"src",t.svgPath),E(_,"alt",t.svgPath)}),C(d,v)};ie(c,d=>{r()&&d(i)})}C(e,o)}Ft(["click"]);var ps=(e,t,r)=>t(a(r)),hs=R('<button class="svelte-fxmnfh"><img class="svelte-fxmnfh"></button>'),ys=R('<section class="svelte-fxmnfh"><!> <!></section>');function ws(e,t){bt(t,!0);function r(_){const N=[];for(const S of Object.values(_.paramSvg))N.includes(S)||N.push(S);return N}let o=H(!1),c=H(""),i=mt(()=>r(t.pDef).map(_=>`${He}/pgdsvg/${_}`));function d(_){x(c,A(_)),x(o,!0)}var v=ys(),f=n(v);Fa(f,{get svgPath(){return a(c)},get modalOpen(){return a(o)},set modalOpen(_){x(o,A(_))}});var h=l(f,2);zt(h,17,()=>a(i),St,(_,N)=>{var S=hs();S.__click=[ps,d,N];var b=n(S);s(S),Q(()=>{E(b,"src",a(N)),E(b,"alt",a(N))}),C(_,S)}),s(v),C(e,v),gt()}Ft(["click"]);function Ds(e,t){t(!1)}function Ls(e,t,r){t.okFunc(),r(!1)}var Ns=R('<aside class="backdrop svelte-weruk7"><div class="dialog svelte-weruk7"><article class="question svelte-weruk7"><!></article> <footer class="svelte-weruk7"><button class="cancel svelte-weruk7">Cancel</button> <button class="ok svelte-weruk7"> </button></footer></div></aside>');function Me(e,t){bt(t,!0);let r=wt(t,"okName",3,"Ok"),o=wt(t,"modalOpen",15),c=wt(t,"sizeLarge",3,!1);var i=Re(),d=yt(i);{var v=f=>{var h=Ns(),_=n(h),N=n(_),S=n(N);rs(S,()=>t.children),s(N);var b=l(N,2),u=n(b);u.__click=[Ds,o];var T=l(u,2);T.__click=[Ls,t,o];var I=n(T,!0);s(T),s(b),s(_),s(h),Q(()=>{ht(_,"sizeLarge",c()),D(I,r())}),C(f,h)};ie(d,f=>{o()&&f(v)})}C(e,i),gt()}Ft(["click"]);function zs(e,t,r,o){for(const c of t())a(r)[c]=a(o)}var Ss=(e,t)=>{x(t,!0)},As=R('<p class="diagItem svelte-12dj9tj"> </p>'),Cs=R('<p class="diagTitle svelte-12dj9tj">Do you really want to delete the following localStorage keys?</p> <!>',1),Os=(e,t,r)=>t(a(r)),Ps=R('<tr class="svelte-12dj9tj"><td><input type="checkbox"></td><td class="svelte-12dj9tj"><button class="svelte-12dj9tj"> </button></td><td> </td></tr>'),Fs=R('<div class="deleteKeys svelte-12dj9tj"><button class="svelte-12dj9tj">Delete</button> <!> <table class="svelte-12dj9tj"><thead class="svelte-12dj9tj"><tr><td>Delete</td><td>Key name</td><td>Last modification</td></tr><tr><td><input type="checkbox"></td><td class="instruction">delete all</td><td></td></tr></thead><tbody class="svelte-12dj9tj"></tbody></table></div>');function Ma(e,t){bt(t,!0);let r=wt(t,"storeName",15),o=wt(t,"localKeys",15),c=H(A({})),i=H(!1),d=H(!1);function v(){let z=[];const p=new RegExp(`^${t.pageName}_`);return z=Object.keys(window.localStorage).filter(K=>p.test(K)).map(K=>K.replace(p,"")),z.sort(),z}o(v());function f(z){r(z)}function h(z){let p={};for(const Z of z){let K="";const $=`${t.pageName}_${Z}`,q=window.localStorage.getItem($);q!==null&&(K=JSON.parse(q).lastModif),p[Z]=K}return p}let _=mt(()=>h(o()));function N(z){let p={};for(const Z of z)p[Z]=!1;return p}x(c,A(N(o())));function S(){for(const z of o())if(a(c)[z]){const p=`${t.pageName}_${z}`;window.localStorage.removeItem(p)}x(i,!1),o(v())}var b=Fs(),u=n(b);u.__click=[Ss,d];var T=l(u,2);Me(T,{okName:"Confirm",okFunc:S,get modalOpen(){return a(d)},set modalOpen(z){x(d,A(z))},children:(z,p)=>{var Z=Cs(),K=l(yt(Z),2);zt(K,17,o,St,($,q)=>{var tt=Re(),dt=yt(tt);{var ot=G=>{var ut=As(),xt=n(ut,!0);s(ut),Q(()=>D(xt,a(q))),C(G,ut)};ie(dt,G=>{a(c)[a(q)]&&G(ot)})}C($,tt)}),C(z,Z)},$$slots:{default:!0}});var I=l(T,2),et=n(I),M=l(n(et)),B=n(M),nt=n(B);at(nt),nt.__change=[zs,o,c,i],s(B),jt(2),s(M),s(et);var rt=l(et);zt(rt,21,o,St,(z,p)=>{var Z=Ps(),K=n(Z),$=n(K);at($),s(K);var q=l(K),tt=n(q);tt.__click=[Os,f,p];var dt=n(tt,!0);s(tt),s(q);var ot=l(q),G=n(ot,!0);s(ot),s(Z),Q(()=>{D(dt,a(p)),D(G,a(_)[a(p)])}),pt($,()=>a(c)[a(p)],ut=>a(c)[a(p)]=ut),C(z,Z)}),s(rt),s(I),s(b),pt(nt,()=>a(i),z=>x(i,z)),C(e,b),gt()}Ft(["click","change"]);var Ms=R('<p class="warnMsg svelte-1rkdwo"> </p>'),Ts=R('<!> <div class="svelte-1rkdwo"><label for="storName" class="svelte-1rkdwo">Give a name to your parameter-set:</label> <input type="text" id="storName" required minlength="4" maxlength="30" size="32" class="svelte-1rkdwo"> <!></div>',1);function Rs(e,t){bt(t,!0);let r=wt(t,"storeName",15),o=H(A([]));function c(S){const b=/[-:]/g,u=/\..*$/,T=new Date().toISOString().replace(b,"").replace(u,"").replace("T","_");return`${S}_${T}`}r(c(t.pageName));let i=mt(()=>a(o).includes(r()));var d=Ts(),v=yt(d);Ma(v,{get pageName(){return t.pageName},get storeName(){return r()},set storeName(S){r(S)},get localKeys(){return a(o)},set localKeys(S){x(o,A(S))}});var f=l(v,2),h=l(n(f),2);at(h);var _=l(h,2);{var N=S=>{var b=Ms(),u=n(b);s(b),Q(()=>D(u,`Warning: name ${r()??""} already used`)),C(S,b)};ie(_,S=>{a(i)&&S(N)})}s(f),ke(h,r),C(e,d),gt()}var Us=R('<!> <div class="svelte-1ozd0ey"><label for="storName" class="svelte-1ozd0ey">Select a parameter-set:</label> <input type="text" id="storName" readonly="" minlength="4" maxlength="30" size="32" class="svelte-1ozd0ey"></div>',1);function Is(e,t){bt(t,!0);let r=wt(t,"storeName",15),o=H(A([]));function c(h){let _=r();return!h.includes(_)&&(h.length>0?_=h[0]:_=""),_}_a(()=>{r(c(a(o)))});var i=Us(),d=yt(i);Ma(d,{get pageName(){return t.pageName},get storeName(){return r()},set storeName(h){r(h)},get localKeys(){return a(o)},set localKeys(h){x(o,A(h))}});var v=l(d,2),f=l(n(v),2);at(f),s(v),Q(()=>Be(f,r())),C(e,i),gt()}const j=A({dLayers:Ka(),zAdjust:Ea(),canvasZWidth:0});var Xs=R('<canvas class="mini svelte-z8e4tz"></canvas>');function La(e,t){bt(t,!0);const r=200,o=.6;let c;function i(f,h,_,N){const S=Ga(N);S.ruler=!1;let b;if(c){const u=c.getContext("2d");u.clearRect(0,0,u.canvas.width,u.canvas.height);const T=u.canvas.width;try{t.full?b=f.getAdjustFull(u.canvas.width,u.canvas.height):b=Ba(_,T,h),f.draw(u,b,S)}catch(I){console.log(I)}}}_a(()=>{i(t.pFig,j.zAdjust,j.canvasZWidth,j.dLayers)});function d(f){const h=f.offsetX,_=f.offsetY,N=c.getContext("2d"),S=N.canvas.width/2,b=N.canvas.height/2;if(f.button===0){let u=1;h>S&&(u+=1*o),_>b&&(u+=2*o),N.canvas.width=u*r,N.canvas.height=u*r,i(t.pFig,j.zAdjust,j.canvasZWidth,j.dLayers)}}var v=Xs();E(v,"width",r),E(v,"height",r),v.__click=d,Ge(v,f=>c=f,()=>c),C(e,v),gt()}Ft(["click"]);function Ws(e,t){const r=document.createElement("a");r.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),r.setAttribute("download",e),r.click(),r.remove()}function Ys(e,t,r){const o=/[-:]/g,c=/\..*$/,i=new Date().toISOString().replace(o,"").replace(c,"").replace("T","_");return fa(i,e,t,r)}function ma(e,t,r){const o=/[-:]/g,c=/\..*$/,i=new Date().toISOString().replace(o,"").replace(c,"").replace("T","_"),d=`px_${e}_${i}.json`,v=fa(i,e,t,r);Ws(d,v)}function Vs(e,t,r){const o=new URL(e),c=2e3;let i=o.toString().length;for(const d of Object.keys(t)){const v=t[d].toString(),f=2+d.length+v.length;o.searchParams.append(encodeURIComponent(d),encodeURIComponent(v)),i+=f}return i>=c&&console.log(`warn547: generateUrl: strLength ${i} larger than strLengthLimit ${c}`),o.toString()}function Zs(e,t){if(e.target){const r=e.target.files;r&&t(r[0])}}function qs(e,t,r,o){x(t,A(r())),x(o,!0)}function Es(e,t){x(t,!0)}function Ks(e,t){x(t,!0)}function Gs(e,t){x(t,!1)}var Bs=(e,t)=>{x(t,!0)},Hs=(e,t)=>{x(t,!0)},Js=(e,t,r)=>t(a(r).name),Qs=R('<input type="number" class="input-number svelte-jonk14"> <input type="range" class="svelte-jonk14">',1),$s=R("<option> </option>"),tl=R("<select></select>"),el=R("<option> </option>"),al=R("<select></select>"),sl=R('<tr class="svelte-jonk14"><td class="svelte-jonk14"></td><td class="svelte-jonk14"><button class="svelte-jonk14"> </button></td><td class="svelte-jonk14"><!></td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"> </td></tr>'),ll=R('<tbody class="svelte-jonk14"><tr class="separator svelte-jonk14"><td class="svelte-jonk14"></td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"><label class="svelte-jonk14"><input type="checkbox" class="svelte-jonk14"> <span class="svelte-jonk14"></span></label></td></tr></tbody> <tbody class="svelte-jonk14"></tbody>',1),nl=(e,t)=>{x(t,!0)},rl=R('<p>Copy this URL and send it to your friends!</p> <p class="cUrl svelte-jonk14"> </p>',1),ol=R('<section class="svelte-jonk14"><h2 class="svelte-jonk14">Parameters</h2> <main class="svelte-jonk14"><label for="loadFParams" class="fileUpload svelte-jonk14">Load Params from File</label> <input id="loadFParams" type="file" accept="text/plain, application/json" class="svelte-jonk14"> <button class="svelte-jonk14">Set Params Default</button> <button class="svelte-jonk14">Load Params from localStorage</button> <!> <!> <textarea rows="3" cols="80" readonly="" wrap="soft" class="svelte-jonk14"></textarea> <table class="svelte-jonk14"><thead class="svelte-jonk14"><tr class="svelte-jonk14"><td class="svelte-jonk14">&#35;</td><td class="svelte-jonk14">Parameter name</td><td class="svelte-jonk14">Value<span class="svelte-jonk14"><button class="svelte-jonk14">&minus;</button><button class="svelte-jonk14">+</button></span></td><td class="svelte-jonk14">Unit</td><td class="svelte-jonk14">Default</td><td class="svelte-jonk14">Min</td><td class="svelte-jonk14">Max</td><td class="svelte-jonk14">Step</td></tr></thead><!></table> <div class="comment svelte-jonk14"><label for="inComment">Comment:</label> <input type="text" id="inComment" maxlength="150"></div> <button class="svelte-jonk14">Save Parameters to File</button> <button class="svelte-jonk14">Save Parameters as URL</button> <button class="svelte-jonk14">Save Parameters to localStorage</button> <!> <!></main> <!> <button class="side-img svelte-jonk14"><img class="svelte-jonk14"></button> <div class="mini-canvas svelte-jonk14"><!></div> <div class="mini-canvas svelte-jonk14"><!></div></section>');function cl(e,t){bt(t,!0);let r=H(""),o=H(!1),c=H(""),i=H(!1),d=H(!1),v=H(!1),f=H(!1),h=H(!1),_=H(""),N=H(""),S=H(""),b=H(A(q(t.pDef.params[0].name))),u=H(!1),T=H(A(ot(dt(t.pDef.params))));Na(()=>{x(b,A(q(t.pDef.params[0].name))),x(T,A(ot(dt(t.pDef.params))))});function I(g,k){let L="",X=!1;g!==t.pDef.partName&&(L+=`warn361: read partName: '${g}' expected partName: '${t.pDef.partName}'
2
2
  `,X=!0);let lt=0,ct=0,It=0;const Ot=[];for(const it of t.pDef.params)Ot.push(it.name),Object.hasOwn(k,it.name)?(lt+=1,J[t.pDef.partName][it.name]===k[it.name]?It+=1:J[t.pDef.partName][it.name]=k[it.name]):ct+=1;let Yt=0;for(const it of Object.keys(k))Ot.includes(it)||(Yt+=1,L+=`warn363: parameter ${it} not in the scope of the design (${Yt})
3
3
  `);const Vt=Yt>0,fe=new Date().toLocaleTimeString();return L+=`Params loaded at ${fe} :`,L+=` def-nb: ${Object.keys(t.pDef.params).length}`,L+=`, cover-nb: ${lt}, uncover-nb: ${ct}
4
4
  `,L+=` load-nb: ${Object.keys(k).length}`,L+=`, equal-nb: ${It}, changed-nb: ${lt-It}`,L+=`, out-of-scope: ${Yt}`,[L,X||Vt]}async function et(g){try{const k=await fetch(g);if(!k.ok)throw`err627: error while fetching ${g}`;const L=await k.text(),[X]=ka(L);(lt=>(x(c,A(lt[0])),x(i,A(lt[1]))))(I(X.partName,X.pVal)),x(r,A(X.comment))}catch(k){let L=`err223: error by fetching px file
@@ -1 +1 @@
1
- {"version":"1740077226154"}
1
+ {"version":"1740166462080"}