From 79146e3179da0676b04c12b2c5fabda0c55e2594 Mon Sep 17 00:00:00 2001 From: Stephen Date: Sun, 17 Dec 2023 16:08:13 +0100 Subject: [PATCH] Docs --- Makefile | 1 + build/chunk-CBNPKG4R.js | 5 --- build/chunk-MXP7PCLU.js | 5 +++ .../{chunk-UP3ZNJNM.js => chunk-PRLZB5VS.js} | 4 +- .../{chunk-XZJUXBZJ.js => chunk-T2R3YWYH.js} | 6 +-- build/data/clock.js | 6 +-- build/debug.css | 6 +++ build/literal-element/module.js | 6 +-- build/literal-html/module.js | 6 +-- build/module.js | 6 +-- data/cart.js | 17 ++++++++ documentation/build/details-toggle/shadow.css | 4 +- documentation/build/module.css | 6 +-- documentation/build/module.js | 4 +- documentation/classes/text.css | 2 +- index.html | 2 +- literal-html/README.md | 43 ++++++++++++++----- literal-html/index.html | 38 +++++++++++----- 18 files changed, 116 insertions(+), 51 deletions(-) delete mode 100644 build/chunk-CBNPKG4R.js create mode 100644 build/chunk-MXP7PCLU.js rename build/{chunk-UP3ZNJNM.js => chunk-PRLZB5VS.js} (99%) rename build/{chunk-XZJUXBZJ.js => chunk-T2R3YWYH.js} (98%) create mode 100644 build/debug.css create mode 100644 data/cart.js diff --git a/Makefile b/Makefile index f714e5e..1e233ee 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ comments: modules: rm -rf ./build deno run --allow-read --allow-env --allow-net --allow-write --allow-run ../fn/deno/make-modules.js build \ + debug.css \ module.js \ data/clock.js \ literal-element/module.js \ diff --git a/build/chunk-CBNPKG4R.js b/build/chunk-CBNPKG4R.js deleted file mode 100644 index 0df95b1..0000000 --- a/build/chunk-CBNPKG4R.js +++ /dev/null @@ -1,5 +0,0 @@ -/* Literal - 0.8.0 - By Stephen Band - Built 2023-12-17 14:30 */ - diff --git a/build/chunk-MXP7PCLU.js b/build/chunk-MXP7PCLU.js new file mode 100644 index 0000000..49d5c0e --- /dev/null +++ b/build/chunk-MXP7PCLU.js @@ -0,0 +1,5 @@ +/* Literal + 0.8.1 + By Stephen Band + Built 2023-12-17 15:00 */ + diff --git a/build/chunk-UP3ZNJNM.js b/build/chunk-PRLZB5VS.js similarity index 99% rename from build/chunk-UP3ZNJNM.js rename to build/chunk-PRLZB5VS.js index 386d30f..a517242 100644 --- a/build/chunk-UP3ZNJNM.js +++ b/build/chunk-PRLZB5VS.js @@ -1,7 +1,7 @@ /* Literal - 0.8.0 + 0.8.1 By Stephen Band - Built 2023-12-17 14:30 */ + Built 2023-12-17 15:00 */ function y(){}function G(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var i=t(o);return e.set(o,i),i}}var ar=Array.prototype;function ur(t,e){return typeof t=="function"?t.apply(null,e):t}function Ge(t,e,r){r=r||t.length;var o=r===1?e?t:G(t):G(function(i){return Ge(function(){var s=[i];return s.push.apply(s,arguments),t.apply(null,s)},e,r-1)});return function i(s){return arguments.length===0?i:arguments.length===1?o(s):arguments.length>=r?t.apply(null,arguments):ur(o(s),ar.slice.call(arguments,1))}}var d=Ge;function cr(t,e){return e[t]}var C=d(cr,!0);function pr(t){let e=t[0];return/^\w/.test(e)}function _t(t={},e,r,o){let i=Object.entries(t).filter(pr),s=i.map(C(0)),a=i.map(C(1));return o?new Function(...s,"return ("+e+") => {"+(r||"")+"}").apply(o,a):new Function(...s,"return function("+e+"){"+(r||"")+"}").apply(null,a)}var lt=">";var Pe="";var Jt={};function Kt(t,e,r,o=""){let i=` `+Pe+"return this.compose`"+t+"`;\n",s=i;if(Jt[s])return Jt[s];if(!1)try{}catch(a){}return Jt[s]=_t(e,r,i)}var H={updateEvent:!1};function Qt(t){return function(){return arguments[t]}}function f(t){return t}function b(){return this}var Me=Object.create,fr=Object.freeze,S=fr(Me(Me(Object.prototype,{at:{value:y},shift:{value:y},push:{value:y},forEach:{value:y},join:{value:function(){return""}},every:{value:function(){return!0}},filter:{value:b},find:{value:y},findIndex:{value:function(){return-1}},flat:{value:b},flatMap:{value:b},includes:{value:function(){return!1}},indexOf:{value:function(){return-1}},map:{value:b},reduce:{value:Qt(1)},sort:{value:b},each:{value:b},pipe:{value:f},start:{value:b},stop:{value:b},done:{value:b},valueOf:{value:function(){return null}}}),{length:{value:0}}));function Yt(t){return t&&t[Symbol.iterator]}function p(t,e){return function(){let o=t.apply(this,arguments),i=e[o]||e.default;if(!i)throw new Error('overload() no function defined for key "'+o+'"');return i.apply(this,arguments)}}var W=t=>typeof t;var B=Object.assign,j=Object.create,ht=Symbol("done"),Fe=p(W,{function:t=>t(),object:t=>t.stop()});function w(t,e){return e.stop&&(e.input=t),t[0]=e,e}function Zt(t,e){let r=-1,o;for(;t[++r]&&t[r]!==e;);for(e.input=void 0;t[r++];)t[r-1]=t[r];return e}function l(t){if(t.status==="done"||(t.status="done",t.pipe&&!t[0]))return t;let e=t[ht];for(t[ht]=void 0,e&&e.forEach(Fe);t[0];)Array.isArray(t[0])?Zt(t,t[0]):l(Zt(t,t[0]));return t}function c(t){this.input=t}B(c.prototype,{push:function(t){return this[0]&&this[0].push(t)},each:function(t){return this.pipe(new qe(this,t))},pipe:function(t){if(this[0])throw new Error("Stream: cannot .pipe() a unicast stream more than once");return w(this,t),this.input.pipe(this),t},broadcast:function(t){return new mt(this,t)},filter:function(t){return new Ve(this,t)},flatMap:function(t){return new He(this,t)},map:function(t){return new We(this,t)},reduce:function(t,e){return this.pipe(new $e(t,e)).value},scan:function(t,e){return new ze(this,t,e)},slice:function(t,e){return new Ie(this,t,e)},split:function(t){return new Xe(this,t)},start:function(){return this.status==="done"?this:(this.input.start.apply(this.input,arguments),this)},stop:function(){return this.status==="done"?this:this.input[1]?(Zt(this.input,this),l(this)):(this.input.stop.apply(this.input,arguments),this)},done:function(t){return this.status==="done"?(Fe(t),this):((this[ht]||(this[ht]=[])).push(t),this)},[Symbol.asyncIterator]:async function*(){let t=[],e=o=>t.push(o);function r(o,i){e=o}for(this.each(o=>e(o)).done(()=>e=noop);e!==noop;)yield t.length?t.shift():await new Promise(r)}});function mt(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(S)}mt.prototype=B(j(c.prototype),{push:function(t){if(t===void 0)return;this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)},pipe:function(t){let e=-1;for(;this[++e];);return this.memory&&e===0&&this.input.pipe(this),this[e]=t,this.value!==void 0&&t.push(this.value),!this.memory&&e===0&&this.input.pipe(this),t}});function qe(t,e){this.input=t,this.push=e}qe.prototype=B(j(c.prototype),{pipe:null});function Ve(t,e){this.input=t,this.fn=e}Ve.prototype=B(j(c.prototype),{push:function(e){let r=this.fn;r(e)&&this[0].push(e)}});function He(t,e){this.input=t,this.fn=e}He.prototype=B(j(c.prototype),{push:function(e){let r=this.fn,o=r(e);if(o!==void 0)if(Yt(o))for(let i of o)this[0].push(i);else o.pipe?(console.warn("FlatMapping pipeables is dodgy. Map to arrays for the moment please."),this.done(o.each(i=>this[0].push(i)))):o.then&&o.then(i=>this[0].push(i))}});function We(t,e){this.input=t,this.fn=e}We.prototype=B(j(c.prototype),{push:function(e){let r=this.fn,o=r(e);return o===void 0||!this[0]?!1:this[0].push(o)}});function $e(t,e){this.fn=t,this.value=e,this.i=0}$e.prototype=B(j(c.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ze(t,e,r){this.input=t,this.fn=e,this.value=r}ze.prototype=B(j(c.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function Ie(t,e,r=1/0){this.input=t,this.index=-e,this.indexEnd=e+r}Ie.prototype=B(j(c.prototype),{push:function(e){++this.index>0&&this[0].push(e),this.index===this.indexEnd&&this.stop()}});function Xe(t,e){this.input=t,this.chunk=[],typeof n=="number"?this.n=e:this.fn=e}Xe.prototype=B(j(c.prototype),{fn:function(){return this.chunk.length===this.n},push:function(e){let r=this.chunk;this.fn(e)?(this[0].push(r),this.chunk=[]):r.push(e)}});var lr=Array.prototype,hr=Object.assign,mr=Object.create;function Z(t){this.buffer=t||[]}Z.prototype=hr(mr(c.prototype),{pipe:function(t){for(w(this,t);this.buffer.length&&this[0];){let e=lr.shift.apply(this.buffer);e!==void 0&&this[0].push(e)}return this.buffer=t,t},push:function(t){if(t!==void 0)return this.buffer.push(t)},stop:function(){return this.input?c.prototype.stop.apply(this,arguments):(this.buffer=S,l(this))}});var dr=Object.assign,gr=Object.create;function $(t){this.promise=t}$.prototype=dr(gr(c.prototype),{push:null,pipe:function(t){let e=this.promise;return w(this,t),e.then(r=>{this.status!=="done"&&this[0].push(r)}),e.finally(()=>l(this)),t}});var te=Object.assign,wr=Object.create;function yr(t){return!!t.active}function xr(t){return!!t.stopped}function _e(t,e,r,o,i){this.input=t.then?new $(t):t,this.stream=r,this.values=o,this.pipes=i,this.name=e,this.active=!1,this.stopped=!1}te(_e.prototype,{push:function(t){let{stream:e,values:r,name:o}=this;if(r[o]=t,this.active=!0,e.active||(e.active=this.pipes.every(yr)))if(e.mutable)e[0].push(r);else{let i=new this.values.constructor;e[0].push(te(i,r))}},stop:function(){this.stopped=!0,this.pipes.every(xr)&&l(this.stream)}});function tt(t,e){this.inputs=t,this.mutable=e&&(e===!0||e.mutable),this.active=!1}tt.prototype=te(wr(c.prototype),{push:null,pipe:function(t){let e=this.inputs,r=this.pipes=[],o;w(this,t);let i;for(i in e){let s=e[i];typeof s=="object"&&(s.pipe||s.then)&&r.push(new _e(s,i,this,e,r))}for(o of r)o.input.done(o).pipe(o);return t},stop:function(){return this.status==="done"?this:(this.pipes.forEach(t=>{let e=t.input;e[1]?unpipe(e,t):e.stop()}),l(this.stream))}});var br=Object.assign,vr=Object.create;function dt(t){this.fn=t}dt.prototype=br(vr(c.prototype),{pipe:function(t){return w(this,t),this.fn(e=>this.push(e),e=>this.stop(e)),t}});var Je=Object.assign,Er=Object.create;function Ke(t){this.stream=t}Je(Ke.prototype,{push:function(t){this.stream[0].push(t)},stop:function(){--this.stream.count===0&&l(this.stream)},done:function(t){console.log("HELLO"),this.stream.done(t)}});function gt(t){this.inputs=t}gt.prototype=Je(Er(c.prototype),{push:null,pipe:function(t){let e=this.inputs;this.count=e.length,w(this,t);let r=new Ke(this),o=-1,i;for(;i=e[++o];)if(i.pipe)i.pipe(r);else if(i.then)i.then(s=>r.push(s)),i.finally(()=>r.stop());else{let s=-1;for(;++s{this.timer=requestAnimationFrame(e),this[0].push(r/1e3)};this.timer=requestAnimationFrame(e)}else{let e=performance.now()/1e3;this.timer=setTimeout(()=>{let r=performance.now()/1e3,o=()=>this[0].push(performance.now()/1e3);this.status="playing",this[0].push(r),this.timer=setInterval(o,this.duration*1e3)},e>t?t-e:0)}return this},stop:function(t){return this.status==="done"?this:(this.duration==="frame"?cancelAnimationFrame(this.timer):this.status==="waiting"?clearTimeout(this.timer):clearInterval(this.timer),this.timer=void 0,l(this))}});var Tr=Object.assign,Dr=Object.create;function wt(t,e){c.call(this,t),this.duration=e}wt.prototype=Tr(Dr(c.prototype),{push:function(t){if(t===void 0)return;if(this.clock){this.value=t;return}let e=new P(this.duration);this.value=t,this.clock=e.each(r=>{if(this.value===void 0){e.stop(),this.clock=void 0;return}this[0].push(this.value),this.value=void 0}).start()},stop:function(t){return this.clock&&(this.clock.stop(),this.clock=void 0),t&&(this[0].push(value),this.value=void 0),c.prototype.stop.apply(this,arguments),this}});var Br=Array.prototype,Ye=Object.assign;function Qe(t){throw new TypeError("Stream cannot be created .from() "+typeof t)}Ye(c,{isStream:function(t){return c.prototype.isPrototypeOf(t)},of:function(){return new Z(Br.slice.apply(arguments))},from:function(t){return t?typeof t=="object"?typeof t.pipe=="function"?new c(t):typeof t.then=="function"?new $(t):typeof t.length=="number"?new Z(t):new tt(t):typeof t=="function"?new dt(t):Qe(t):Qe(t)},broadcast:t=>new mt(S,t),combine:(t,e)=>new tt(t,e),clock:t=>new P(t),merge:function(){return new gt(arguments)}});Ye(c.prototype,{throttle:function(t){return new wt(this,t)},log:b});var ys=c.frames;var Nr=Object.assign,kr=Object.defineProperties,Rr=Object.isExtensible,Ar=Object.prototype,F=Symbol("observe");function Cr(t,e){let r=t.indexOf(e);return r>-1&&t.splice(r,1),t}var Ze={[F]:{}};function yt(t,e){if(!t||!t.length)return 0;t=t.slice(0);for(var r=-1;t[++r];)t[r].status!=="stopped"&&t[r].push(e);return r}function tn(t){this.observables={},this.gets=[],this.sets=void 0,this.target=t,this.observer=new Proxy(t,this),Ze[F].value=this,kr(t,Ze)}Nr(tn.prototype,{notify:function(t){yt(this.observables[t],this.target[t]),yt(this.sets,this.target)},listen:function(t,e){(t===null?this.sets||(this.sets=[]):this.observables[t]||(this.observables[t]=[])).push(e)},unlisten:function(t,e){let r=t===null?this.sets:this.observables[t];r&&Cr(r,e)},get:function(e,r,o){let i=e[r];if(typeof r=="symbol"||r==="__proto__")return i;let s=Object.getOwnPropertyDescriptor(e,r);if((s?s.writable||s.set:i===void 0)&&yt(this.gets,r),!Ar.hasOwnProperty.call(e,r))return i;let u=N(i);if(!u)return i;for(var m=-1;this.gets[++m];)this.gets[m].listen(r);return u},set:function(e,r,o,i){if(typeof r=="symbol"||r==="__proto__")return e[r]=o,!0;let s=k(o);if(e[r]===o||e[r]===s)return!0;let a=e.length;for(var u=-1;this.gets[++u];)this.gets[u].unlisten(r);return e[r]=s,r!=="length"&&e.length!==a&&yt(this.observables.length,e.length),this.notify(r),!0},deleteProperty:function(t,e){return typeof e=="symbol"||e==="__proto__"?(delete t[e],!0):(t.hasOwnProperty(e)&&(delete t[e],this.notify(e)),!0)}});function xt(t){return t&&Rr(t)&&!Node.prototype.isPrototypeOf(t)&&(typeof BaseAudioContext>"u"||!BaseAudioContext.prototype.isPrototypeOf(t))&&!(t instanceof Date)&&!(t instanceof RegExp)&&!(t instanceof Map)&&!(t instanceof WeakMap)&&!(t instanceof Set)&&!(window.WeakSet&&t instanceof WeakSet)&&!ArrayBuffer.isView(t)}function N(t,e){return t?t[F]?t[F].observer:e||xt(t)?new tn(t).observer:void 0:void 0}function k(t){return t&&t[F]&&t[F].target||t}function z(t){return N(t)&&t[F]}var en=Object.assign,jr=Object.create,ee=/(^\.?|\.)\s*([\w-]*)\s*/g;function Lr(t){this.producer.push(t)}function ne(t,e,r,o){ee.lastIndex=e;let i=ee.exec(t);this.path=t,this.object=r,this.producer=o,this.key=i[2]||i[1],this.index=ee.lastIndex,this.isMuteableObserver=this.path.slice(this.index)===".",this.index>=this.path.length&&(this.push=Lr),this.listen(),this.push(this.key==="."?this.object:k(this.object)[this.key])}en(ne.prototype,{push:function(t){xt(t)?this.child?this.child.relisten(t):this.child=new ne(this.path,this.index,t,this.producer):(this.child&&(this.child.stop(),this.child=void 0),this.producer.push(this.isMuteableObserver?t:void 0))},listen:function(){let t=z(this.object);t&&t.listen(this.key==="."?null:this.key,this)},unlisten:function(){z(this.object).unlisten(this.key==="."?null:this.key,this)},relisten:function(t){this.unlisten(),this.object=t,this.listen(),this.push(k(this.object)[this.key])},stop:function(){this.unlisten(),this.child&&this.child.stop(),this.child=void 0,this.status="stopped"}});function nn(t,e,r){this.path=t,this.object=e,this.value=r}nn.prototype=en(jr(c.prototype),{push:function(t){this.value===t&&(!this.isMutationProducer||!xt(t))||(this.value=t,this[0].push(t))},pipe:function(t){return w(this,t),this.pathObserver=new ne(this.path,0,this.object,this),this.isMutationProducer=this.path[this.path.length-1]===".",t},stop:function(){return this.pathObserver.stop(),l(this)}});function R(t,e,r){return new nn(t,e,r)}N.getObject=k;var I=N;function Ur(t,e,r){let o=t(e),i=t(r);return i===o?0:o>i?1:-1}var rn=d(Ur,!0);function re(t,e,r){return r>e?e:r-1&&o.splice(s,1)}for(i=o.length;i--;)if(e[o[i]]===void 0){if(t[o[i]]!==void 0)return!1}else return!1;return!0}var sn=d(on,!0);function q(t){return!!t||t!=null&&!Number.isNaN(t)}function Gr(t,e){let r;for(r in t)if(t[r]!==e[r])return!1;return!0}var an=d(Gr,!0);var un=/\.?([\w-]+)/g;function Pr(t,e,r){var o=t.exec(e);if(!o)throw new Error('getPath(path, object): invalid path "'+e+'" at "'+e.slice(t.lastIndex)+'"');return cn(t,e,r[o[1]])}function cn(t,e,r){return t.lastIndex===e.length?r:r?Pr(t,e,r):void 0}function Mr(t,e){return un.lastIndex=0,cn(un,""+t,e)}var pn=d(Mr,!0);function Fr(t,e,r){let o=t.replace(/([^.]+)\./g,(i,s)=>(e=e[s],""));return e[o]=r}var bt=d(Fr,!0);function et(t,e){t.remove&&t.remove(e);let r;for(;(r=t.indexOf(e))!==-1;)t.splice(r,1);return t}var fn=d(et,!0);function oe(t){if(t=typeof t=="number"?t+"":t.trim(),typeof t=="string")return t.toLowerCase().replace(/^[\W_]+/,"").replace(/[\W_]+$/,"").replace(/[\W_]+/g,"-")}function X(t,e){return e+t}function ie(t){if(typeof t.length=="number")return t[t.length-1]}function se(t,e,r){return(r-t)/(e-t)}function ae(t,e,r){return r*(e-t)+t}function ue(t){let e=typeof t=="object"&&typeof t.length!="number"?Object.entries(t).flatMap(r=>r[1]===void 0?S:r[1]&&typeof r[1]=="object"&&r[1].map?r[1].map(o=>[r[0],o]):[r]):t;return new URLSearchParams(e)}var qr={assign:Object.assign,by:rn,ceil:Math.ceil,clamp:re,denormalise:ae,entries:Object.entries,equals:sn,floor:Math.floor,get:pn,id:f,isDefined:q,clock:t=>new P(t),keys:Object.keys,last:ie,matches:an,noop:y,normalise:se,nothing:S,observe:R,Data:N,overload:p,round:(t,e=1)=>Math.round(t/e)*e,paramify:ue,remove:fn,set:bt,slugify:oe,Stream:c,sum:X,translate:function(e){return window.translations&&window.translations[e]||e},values:Object.values},ln=qr;var Vr=Object.entries,vt={};function Hr(t,[e,r]){let o=new URL(e,window.location);return vt[o]=new URL(r,window.location),vt}function ba(t){Vr(t).reduce(Hr,vt)}function hn(t){let e=new URL(t,window.location);return vt[e]||e}function Et(t){var e={};return function(o){return o in e?e[o]:e[o]=t(o)}}function St(t){return function(r,...o){var i=t[r]||t.default;return i&&i.apply(this,o)}}var Wr=p(f,{is:y,tag:y,data:function(t,e,r){Object.assign(e.dataset,r)},html:function(t,e,r){e.innerHTML=r},text:function(t,e,r){e.textContent=r},children:function(t,e,r){e.innerHTML="",e.append.apply(e,r)},points:T,cx:T,cy:T,r:T,x:T,y:T,dx:T,dy:T,transform:T,preserveAspectRatio:T,viewBox:T,default:function(t,e,r){t in e?e[t]=r:e.setAttribute(t,r)}});function T(t,e,r){e.setAttribute(t,r)}function $r(t,e){for(var r=Object.keys(e),o=r.length;o--;)Wr(r[o],t,e[r[o]]);return t}var Ot=d($r,!0);var ce="http://www.w3.org/2000/svg",mn=document.createElement("template"),pe=(t,e)=>e&&typeof e;function dn(t,e=""){let r=document.createRange();return r.selectNode(t),r.createContextualFragment(e)}var x=p(pe,{string:function(t,e){let r=document.createElementNS(ce,t);return r.innerHTML=e,r},object:function(t,e){let r=document.createElementNS(ce,t);return typeof e.length=="number"?r.append.apply(r,e):Ot(r,e),r},default:t=>document.createElementNS(ce,t)}),zr=p(pe,{string:function(t,e){let r=document.createElement(t);return r.innerHTML=e,r},object:function(t,e){let r=document.createElement(t);return typeof e.length=="number"?r.append.apply(r,e):Ot(r,e),r},default:t=>document.createElement(t)}),Ir=p(f,{comment:function(t,e){return document.createComment(e||"")},fragment:p(pe,{string:function(t,e,r){return r?dn(r,e):(mn.innerHTML=e,mn.content.cloneNode(!0))},object:function(t,e,r){let o=r?dn(r):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):Ot(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:x,ellipse:x,g:x,glyph:x,image:x,line:x,rect:x,use:x,path:x,pattern:x,polygon:x,polyline:x,svg:x,tspan:x,default:zr}),L=Ir;var Xr={xml:"application/xml",html:"text/html",svg:"image/svg+xml"};function gn(t,e){if(e){var r=Xr[t.toLowerCase()]||t,o;try{o=new window.DOMParser().parseFromString(e,r)}catch{return}if(!o||o.getElementsByTagName("parsererror").length)throw new Error("Invalid "+t.toUpperCase()+": "+e);return o}}function wn(t){return gn("html",t)}function yn(t){return gn("svg",t)}var U=Object.assign,_={headers:function(t){return{}},body:f},_r=St({"application/x-www-form-urlencoded":function(t){return U(t,{"Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"})},"application/json":function(t){return U(t,{"Content-Type":"application/json; charset=utf-8","X-Requested-With":"XMLHttpRequest"})},"multipart/form-data":function(t){return U(t,{"Content-Type":"multipart/form-data","X-Requested-With":"XMLHttpRequest"})},"audio/wav":function(t){return U(t,{"Content-Type":"audio/wav","X-Requested-With":"XMLHttpRequest"})},"image/png":function(t){return U(t,{"Content-Type":"image/png","X-Requested-With":"XMLHttpRequest"})},"image/jpg":function(t){return U(t,{"Content-Type":"image/jpg","X-Requested-With":"XMLHttpRequest"})},"image/jpeg":function(t){return U(t,{"Content-Type":"image/jpeg","X-Requested-With":"XMLHttpRequest"})},default:function(t){return U(t,{"Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"})}}),Jr=St({"application/json":function(t){return t.get?Kr(t):JSON.stringify(t)},"application/x-www-form-urlencoded":function(t){return t.get?bn(t):vn(t)},"multipart/form-data":function(t){return t.get?t:Qr(t)},default:f});function Kr(t){return JSON.stringify(Array.from(t.entries()).reduce(function(e,r){return e[r[0]]=r[1],e},{}))}function bn(t){return new URLSearchParams(t).toString()}function vn(t){return Object.keys(t).reduce((e,r)=>(e.append(r,t[r]),e),new URLSearchParams)}function Qr(t){throw new Error("TODO: dataToFormData(data)")}function Yr(t,e){return e instanceof FormData?t+"?"+bn(e):t+"?"+vn(e)}function Zr(t,e,r,o){let i=typeof r=="string"?r:r&&r["Content-Type"]||"application/json",s=_r(i,U(_.headers&&e?_.headers(e):{},typeof r=="string"?{}:r)),a={method:t,headers:s,credentials:"same-origin",signal:o&&o.signal};return t!=="GET"&&(a.body=Jr(i,_.body?_.body(e):e)),a}function Tt(t){return t.blob()}function to(t){return t.json().catch(e=>{throw new Error("Cannot parse JSON "+t.url+". "+e.message)})}function xn(t){return t.formData()}function eo(t){return t.text()}function no(t){return t.text().then(e=>/^\s*/.test(e)?wn(e):L("fragment",e))}function ro(t){return t.text().then(e=>/^\s*<\?xml/.test(e)?yn(e):(console.warn("Untested SVG fragment parsing in request.js!"),L("fragment",e)))}var oo={"text/plain":eo,"text/html":no,"image/svg+xml":ro,"application/json":to,"multipart/form-data":xn,"application/x-www-form-urlencoded":xn,audio:Tt,"audio/wav":Tt,"audio/m4a":Tt,"application/zip":Tt};function io(t){if(_.onresponse&&(t=_.onresponse(t)),!t.ok)throw new Error(t.statusText+"");let e=t.headers.get("Content-Type");if(!e)return;let r=e.replace(/\;.*$/,"");return oo[r](t)}function Dt(t="GET",e,r={},o="application/json"){t=t.toUpperCase(),t==="GET"&&r&&(e=Yr(e,r));let i=Zr(t,r,o,arguments[4]);return fetch(e,i).then(io)}function Bt(t){return Dt("GET",t)}var so=/\.([\w-]+)(?:#|\?|$)/,ao=[],uo=p(t=>(so.exec(t.pathname)||ao)[1],{js:Et(t=>{let e=t.origin+t.pathname+t.search,r=t.hash.slice(1)||"default";return import(e).then(C(r))}),default:Et(Bt)});function fe(t){let e=hn(t);return uo(e)}var En=y;function le(t){var e=t.id;if(!e){do e=Math.ceil(Math.random()*1e5);while(document.getElementById(e));t.id=e}return e}function nt(t){return t.nodeType===3}var co={1:"element",3:"text",8:"comment",9:"document",10:"doctype",11:"fragment"};function he(t){return co[t.nodeType]}var Sn=document.createElement("textarea");function rt(t){return Sn.innerHTML=t,Sn.value}var po=/\$\{/;function ot(t){return t&&po.test(t)}var fo=Array.prototype;function Nt(t){return fo.indexOf.apply(t.parentNode.childNodes,arguments)}function me(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");return function(r){let o=r.target,i;for(i in t){let s=o.closest(i);if(s)return t[i](s,...arguments)}}}var lo=Object.assign,ho=/\s+/,kt={fullscreenchange:G(()=>"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"mozFullScreenElement"in document?"mozfullscreenchange":"msFullscreenElement"in document?"MSFullscreenChange":"fullscreenchange")},On=0;window.addEventListener("click",t=>On=t.timeStamp);function mo(t,e){return t.node.addEventListener(kt[e]?kt[e]():e,t,t.options),t}function go(t,e){return t.node.removeEventListener(kt[e]?kt[e]():e,t),t}function Tn(t,e,r,o){this.types=t.split(ho),this.options=e,this.node=r,this.select=e&&e.select,this.initialEvent=o}lo(Tn.prototype,{pipe:function(t){w(this,t),this.types.reduce(mo,this),this.initialEvent&&(this.handleEvent(this.initialEvent),delete this.initialEvent)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=On)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(go,this),l(this[0])}});function V(t,e,r){let o;return typeof t=="object"&&(o=t,t=o.type),new c(new Tn(t,o,e,r))}function de(t){return t.validity?t.validity.valid:!0}function wo(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function ge(t){return t===window?wo():t.getClientRects()[0]||t.getBoundingClientRect()}var yo=Object.assign,it={bubbles:!0,cancelable:!0};function st(t,e){let r=it,o,i,s,a,u,m;return typeof t=="object"?({type:t,detail:i,bubbles:s,cancelable:a,composed:u,...o}=t,m=yo(new CustomEvent(t,{detail:i,bubbles:s||it.bubbles,cancelable:a||it.cancelable,composed:u||it.composed}),o)):m=new CustomEvent(t,it),e.dispatchEvent(m)}var Rt=d(st,!0);var xo=/^\s*([+-]?\d*\.?\d+)([^\s]*)\s*$/;function we(t){return function(r){if(typeof r=="number")return r;var o=xo.exec(r);if(!o||!t[o[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+r+'" (accepted units '+Object.keys(t).join(", ")+")");return o?t.catch(parseFloat(o[1]),o[2]):t.catch(parseFloat(r))}return t[o[2]||""](parseFloat(o[1]))}}var bo=/px$/,Dn={"transform:translateX":function(t){var e=at("transform",t);if(!e||e==="none")return 0;var r=At(e);return parseFloat(r[4])},"transform:translateY":function(t){var e=at("transform",t);if(!e||e==="none")return 0;var r=At(e);return parseFloat(r[5])},"transform:scale":function(t){var e=at("transform",t);if(!e||e==="none")return 0;var r=At(e),o=parseFloat(r[0]),i=parseFloat(r[1]);return Math.sqrt(o*o+i*i)},"transform:rotate":function(t){var e=at("transform",t);if(!e||e==="none")return 0;var r=At(e),o=parseFloat(r[0]),i=parseFloat(r[1]);return Math.atan2(i,o)}};function At(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function at(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function Ct(t,e){if(Dn[t])return Dn[t](e);var r=at(t,e);return typeof r=="string"&&bo.test(r)?parseFloat(r):r}var jt,Lt;function Bn(){if(!jt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",jt=Ct("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return jt}function Nn(){return Lt||(Lt=Ct("font-size",document.documentElement)),Lt}window.addEventListener("resize",()=>{jt=void 0,Lt=void 0});var J=p(W,{number:f,string:we({px:f,em:t=>Bn()*t,rem:t=>Nn()*t,vw:t=>window.innerWidth*t/100,vh:t=>window.innerHeight*t/100,vmin:t=>window.innerWidthwindow.innerWidtht.prototype?(t.name||"function")+(So.exec(t.toString())||[])[1]:(Eo.exec(t.toString())||[])[1]+" ⇒ {…}",number:t=>Number.isNaN(t)?"":Number.isFinite(t)?t:t<0?"-∞":"∞",string:f,symbol:t=>t.toString(),undefined:t=>"",object:p(t=>t&&t.constructor.name,{Array:t=>t.map(Un).join(""),RegExp:t=>"/"+t.source+"/",Stream:()=>"",null:()=>"",default:t=>JSON.stringify(t,null,2)}),default:JSON.stringify}),D=Un;var Pn=Array.prototype,K=Symbol("literal-value"),Oo={"select-one":!0,"select-multiple":!0,checkbox:!0,radio:!0};function ut(t){return K in t?t[K]:"value"in t?t.value:t.getAttribute("value")||void 0}var Q=p(C("type"),{"select-one":t=>t.selectedIndex>-1?ut(t.options[t.selectedIndex]):void 0,"select-multiple":t=>Pn.filter.call(t.options,C("selected")).map(ut),checkbox:ut,radio:ut,number:t=>Number(t.value),range:t=>Number(t.value),default:t=>t.value}),To={number:"number",range:"number"};function Gn(t,e){if(document.activeElement===t)return 0;let r=Oo[t.type];if(r&&K in t&&t[K]===e)return 0;let o=To[t.type];if(o&&typeof e!==o)return 0;r&&(t[K]=e);let i=D(e);return i===t.value?0:("value"in t?t.value=i:t.setAttribute("value",i),H.updateEvent&&Rt(H.updateEvent,t),1)}var be=p(C("type"),{"select-one":(t,e)=>{if(typeof e=="string"||typeof e=="number")return Gn(t,e);let r=Pn.find.call(t.options,o=>e===ut(o));return r&&!r.selected?(r.selected=!0,1):0},default:Gn});function Mn(t){delete t[K]}var Fn=Object.assign(ln,{root:document.documentElement,body:document.body,create:L,delegate:me,events:V,frame:window.requestAnimationFrame,getValue:Q,isValid:de,navigate:xe,rect:ge,request:Dt,trigger:st,validate:Ut,px:J,em:kn,rem:Rn,vw:An,vh:Cn});function qn(t,e){return e===""||e===void 0?t:t+e}function Do(t,e,r){return t&&typeof t=="object"?t.find?e+t.map(D).reduce(qn):e+D(t):e+D(t)}function ct(t){return t[0].map((r,o)=>o<=t.length?Do(t[o+1],r,D):r===""?void 0:r).reduce(qn)}var ve={"accept-charset":"acceptCharset",accesskey:"accessKey",cellpadding:"cellPadding",cellspacing:"cellSpacing",codebase:"codeBase",colspan:"colSpan",datetime:"dateTime",for:"htmlFor",form:null,formaction:"formAction",formenctype:"formEnctype",formmethod:"formMethod",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",httpequiv:"httpEquiv",longdesc:"longDesc",maxlength:"maxLength",minlength:"minLength",nohref:"noHref",noresize:"noResize",noshade:"noShade",nowrap:"noWrap",novalidate:"noValidate",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",tfoot:"tFoot",thead:"tHead",usemap:"useMap",valign:"vAlign",valuetype:"valueType"};var Bo=Object.assign,No=Object.values,Ee={};function ko(t){t.stop()}function Se(t,e){this.children={},this.target=k(t),this.path=e}Bo(Se.prototype,{pipe:function(t){this[0]=this.root=t,z(this.target).gets.push(this)},listen:function(t){if(this.children[t])return;let e=(this.path?this.path+".":"")+t;(this.children[t]=new Se(this.target[t],e)).pipe(this.root)},unlisten:function(t){this.children[t]&&(this.children[t].stop(),delete this.children[t])},push:function(t){Ee.path=(this.path?this.path+".":"")+t,Ee.value=this.target[t],this.root[0].push(Ee)},stop:function(){et(z(this.target).gets,this),No(this.children).forEach(ko),this.path===""&&l(this[0]),this.status="stopped"}});function Oe(t){let e=N(t);return e?new c(new Se(e,"")):S}var pt=[],Ro=Promise.resolve(pt),Gt;function Ao(t){var e,r;let o=-1;for(;t[++o]!==void 0;){let i=t[o].update()}Gt=void 0,t.length=0}function Vn(t){return Gt||(Gt=Ro.then(Ao)),pt.push(t),t.status="cued",Gt}function Pt(t){if(t.status!=="cued"||!pt.length)return;let e=pt.indexOf(t);e>0&&pt.splice(e,1),t.status="idle"}var Hn=Object.assign,Co=Object.create;var jo=0,Mt;function Lo(t){t.stop()}function Uo(t){t.cancelled=!0}function Wn(t){let e;for(e in t)t[e].stop(),delete t[e]}function $n(t){t&&(t.forEach(Uo),t.length=0)}function zn(t){t&&(t.forEach(Lo),t.length=0)}function Go(t,e){let r=t[t.length-1];return r&&r.path.lengtho.cue())}function Ft(t,e,r,o,i,s=!1){if(i&&typeof i=="object"){let a=I.getObject(i);if(a.then){let u=t.promises||(t.promises=[]);r[o]="",a.then(m=>{if(!a.cancelled)return et(u,a),Ft(t,e,r,o,m,!0)}),u.push(a);return}if(a.pipe){let u=t.streams||(t.streams=[]);r[o]="";let m=!1;a.each(E=>Ft(t,e,r,o,E,m)),m=!0,u.push(a);return}if(c.isStream(a)){let u=t.streams||(t.streams=[]);r[o]="",u.push(a);return}if(typeof a.length=="number"){let u=a.length;for(;u--;)Ft(t,e,a,u,a[u])}}r[o]=i,s&&t.render.apply(t,e)}function O(t,e,r,o,i=""){this.literal=Kt(r,o,this.parameterNames.join(", "),i),this.path=t,this.name=e,this.message=i}Hn(O.prototype,{create:function(t,e){return Hn(Co(this),{id:++jo,element:t,observers:{},status:"idle",parameters:this.parameterNames.map(r=>e[r]),renderCount:0})},cue:function(t){return Wn(this.observers),Vn(this),this},push:function(t){t=I(t),this.data!==t&&(this.data=t,this.cue())},update:function(){let t=this.data,e=this.observers;$n(this.promises),zn(this.streams),this.status="rendering";let r=Mt;Mt=this,this.records=Oe(t).filter(()=>Mt===this);let o=this.records.reduce(Go,[]);if(!1)try{}catch(i){}else++this.renderCount,this.literal.apply(this,this.getParameters());return Po(e,o,t,this),Mt=r,this.status=this.status==="rendering"?"idle":this.status,this},compose:function(t){this.records.stop(),this.singleExpression===void 0&&(this.singleExpression=t.length===2&&!/\S/.test(t[0])&&!/\S/.test(t[1]));let e=0;for(;t[++e]!==void 0;)Ft(this,arguments,arguments,e,arguments[e]);return this.render.apply(this,arguments),this},stop:function(){return Pt(this),Wn(this.observers),$n(this.promises),zn(this.streams),l(this),this},done:c.prototype.done,parameterNames:["data","DATA","element","host","shadow"],getParameters:function(){let t=this.parameters;return t[0]=this.data,t[1]=I.getObject(this.data),t[2]=this.element,t}});var Mo=Object.assign,Fo=Object.getOwnPropertyDescriptor,qo=Object.getPrototypeOf;function In(t,e){let r=Fo(e,t);return r?r.set||r.writable:In(t,qo(e))}function Vo(t,e){return t in e?In(t,e):!1}function Ho(t,e,r,o,i){return o?t[r]!==i?(t[r]=i,1):0:i===t.getAttribute(e)?0:(t.setAttribute(e,i),1)}function g(t,e,r,o,i){O.apply(this,arguments),this.property=e in ve?ve[e]:e,this.writable=Vo(e,o)}Mo(g.prototype,O.prototype,{render:function(){return this.value=this.singleExpression?arguments[1]:ct(arguments),this.mutations=Ho(this.element,this.name,this.property,this.writable,this.value),this}});function ft(t){return t=Array.from(t),t[0]=!!t[0].join(" ").trim().split(/\s+/).map(Boolean).reduce(X),!!t.map(Boolean).reduce(X)}var Wo=Object.assign;function $o(t,e,r,o,i){return o?t[r]!==!!i?(t[r]=!!i,1):0:(i?t.setAttribute(e,e):t.removeAttribute(e),1)}function h(t,e,r,o,i){g.apply(this,arguments),o.removeAttribute(e)}Wo(h.prototype,g.prototype,{render:function(t){let e=ft(arguments);return this.mutations=$o(this.element,this.name,this.property,this.writable,e),this}});function zo(t,e,r){return typeof e.set=="function"?e.set(t,r):e[t]=r}var Xn=d(zo,!0);function Te(t,e,r,o,i,s){console.warn("Literal: you are using the function bind(). This is experimental and the API may change.");let a=t.getAttribute("value"),u=q(a),m=V("input",t).map(u?E=>i(E.target.checked?a:void 0):E=>i(E.target.checked)).each(Xn(r,e));return R(r,e).map(o).each(u?E=>s(t,v+""===a):E=>s(t,!!E)).done(m)}var _n=Object.assign;function Io(t){return""+t}function Jn(t,e,r){let o=typeof e=="boolean"?e:r?t.type==="checkbox"&&e&&e.map?e.map(Io).includes(Q(t)):e+""===t.value:!!e;return o===t.checked?0:(t.checked=o,H.updateEvent&&Rt(H.updateEvent,node),1)}function qt(t,e,r,o,i){g.call(this,t,"checked",r,o,i),this.hasValue=q(o.getAttribute("value")),o.removeAttribute(e)}_n(qt.prototype,g.prototype,{parameterNames:["data","DATA","element","host","shadow","bind"],create:function(t,e){return g.prototype.create.call(this,t,_n({bind:(r,o,i=f,s=f)=>Te(t,o,r,i,s,Jn)},e))},render:function(t){return this.singleExpression?this.value=arguments[1]:this.value=ft(arguments),this.mutations=Jn(this.element,this.value,this.hasValue),this}});var Xo=Array.prototype,Kn=Object.assign,_o=[],Jo=p((t,e)=>e,{class:t=>t.classList});function Ko(t,e,r,o){let i=e.length;for(;i--;)r.includes(e[i])&&e.splice(i,1);return e.length&&(t.remove.apply(t,e),++o),r.length&&(t.add.apply(t,r),++o),o}function Vt(t,e,r,o,i){g.apply(this,arguments),o.setAttribute(e,"")}Kn(Vt.prototype,g.prototype,{create:function(t,e){return Kn(g.prototype.create.apply(this,arguments),{list:Jo(t,this.name),tokens:_o})},render:function(t){let e=0;if(this.renderCount===1){let o=t.join(" ").trim();o&&(this.list.add.apply(this.list,o.split(/\s+/)),++e)}let r=Xo.slice.call(arguments,1).map(D).join(" ").trim().split(/\s+/).filter(o=>!!o);return this.mutations=Ko(this.list,this.tokens,r,e),this.tokens=r,this}});function Qo(t){return Q(t.target)}function De(t,e,r,o,i,s){let a=V("input",t).map(Qo).map(i).each(bt(r,e));return R(r,e).map(o).done(a)}function Ht(t){let e=t[0],r=0,o=e[r];for(;e[++r]!==void 0;)o+=t[r]+e[r];return Number(o)}var Qn=Object.assign,Yo=p((t,e)=>e,{number:Ht,range:Ht,default:ct});function Wt(t,e,r,o,i){g.call(this,t,"value",r,o,i),o.removeAttribute("value")}Qn(Wt.prototype,g.prototype,{parameterNames:["data","DATA","element","host","shadow","bind"],create:function(t,e){return g.prototype.create.call(this,t,Qn({bind:(r,o,i=f,s=f)=>De(t,o,r,i,s,be)},e))},render:function(t){return this.value=this.singleExpression?arguments[1]:Yo(arguments,this.element.type),this.mutations=be(this.element,this.value),this},stop:function(){return Mn(this.element),g.prototype.stop.apply(this,arguments)}});function Be(t){let e=t.slice(1),r=document.getElementById(e);if(!r)throw new Error("Template "+t+" not found");return r}var Yn=G(function(e){return Bt(e).then(r=>{let o=new URL(e,window.location),i=o.hash?r.querySelector(o.hash):r;return{id:e,content:i.content||i}})});function Ne(t,e,r,o){let i=new M(t,r,o);return i.push(e),i}function Zn(t,e,r,o){let i=new M(t,r,o);return e.each(s=>i.push(s)),i.done(e),i}function $t(t,e,r,o){let i=k(e);if(/^#/.test(t)){let u=Be(t),m=typeof i=="string"?fe(i):i&&i.then?i:null;return m?m.then(E=>Ne(u,E,r,o)):i&&i.pipe?Zn(u,i,r,o):Ne(u,i||{},r,o)}let s=Yn(t),a=typeof i=="string"?fe(i):(i&&i.then,i);return i&&i.pipe?s.then(u=>Zn(u,e,r,o)):Promise.all([s,a]).then(([u,m])=>Ne(u,m,r,o))}var Vp=Array.prototype,ke=Object.assign;function Re(t){t&&typeof t=="object"&&t.stop&&t.stop()}function Zo(t){return t instanceof M||t instanceof Node?t:D(t)}function tr(t,e){return typeof e=="string"&&typeof t[t.length-1]=="string"?t[t.length-1]+=e:t.push(e),t}function er(t,e){return Array.isArray(e)?e.reduce(er,t):tr(t,Zo(e))}function Ae(t,e){return t.nodeValue!==e?(t.nodeValue=e,1):0}function nr(t){return t.content?nr(t.content):t}function ti(t,e,r){let o=r.length-1,i=Ae(t,r[0]),s=t.nextSibling,a=0;for(;++a$t(i,a,t,e):$t(i,s,t,e)},print:(...i)=>En(this,...i)});return ke(O.prototype.create.call(this,t,o),{contents:[],first:r.childNodes[this.name],last:r.childNodes[this.name+1]})},push:function(){return this.contents.forEach(Re),this.contents.length=0,O.prototype.push.apply(this,arguments)},update:function(){return this.contents.forEach(Re),this.contents.length=0,O.prototype.update.call(this)},render:function(t){let e=0;for(this.contents.length=0,this.contents.push(t[e]);t[++e]!==void 0;)er(this.contents,arguments[e]),tr(this.contents,t[e]);return this.mutations=ti(this.first,this.last,this.contents),this},stop:function(){return this.contents.forEach(Re),this.contents.length=0,O.prototype.stop.apply(this)}});var ei={async:h,autofocus:h,autoplay:h,controls:h,defer:h,disabled:h,formnovalidate:h,hidden:h,ismap:h,itemscope:h,loop:h,multiple:h,muted:h,nomodule:h,novalidate:h,open:h,readonly:h,required:h,reversed:h,selected:h,default:h,checked:qt,class:Vt,value:Wt,datetime:function(t,e,r,o,i){},"inner-html":function(t,e,r,o,i){return e.removeAttribute(r),new Y(o,0,rt(t),e.childNodes[0],i)}};function zt(t,e,r,o,i=""){let s=r.localName,a=r.value;if(!ot(a))return;let u=ei[s]||g;return t.push(new u(o,s,a,e,i)),t}function je(t,e,r,o=""){let i=Array.from(e.childNodes);if(i){let s=-1;for(;i[++s];){if(i[s].content){let a=i[s];a.before(a.content),a.remove()}rr(t,i[s],r,o)}}return t}function Ce(t,e,r,o=""){let i=Array.from(e.attributes),s=-1,a;for(;a=i[++s];)zt(t,e,a,r,o);return t}var ni=p((t,e)=>e.tagName.toLowerCase(),{defs:f,template:f,script:Ce,textarea:(t,e,r,o)=>(Ce(t,e,r,o),zt(t,e,{localName:"value",value:e.textContent},r,o),e.textContent="",t),default:(t,e,r,o)=>(je(t,e,r,o),Ce(t,e,r,o),t)}),rr=p((t,e)=>he(e),{comment:f,doctype:f,document:je,fragment:je,element:(t,e,r,o="")=>(ni(t,e,(r?r+lt:"")+Nt(e),o=""),t),text:(t,e,r,o="")=>{let i=e.nodeValue;if(!ot(i))return t;let s=rt(i);return t.push(new Y(r,Nt(e),s,e,o)),t},default:()=>{throw new Error("Literal: Cannot compile node")}}),or=rr;var It=[];function Le(t,e){It.length=0;let r=t;for(;r!==e;){if(!r)throw new Error("getNodes(first, last) last not found after first");It.push(r),r=r.nextSibling}return It.push(e),It}var ri=Object.assign;var ir={},Xt=[];function oi(){return this.data+""}function ii(t,e){return t.childNodes[e]}function si(t,e){return t.split(lt).reduce(ii,e)}function sr(t){if(!nt(t))return!1;let e=t.nodeValue;return/^\s*/.exec(e)[0].length===e.length}function ai(t){let e=t.childNodes[0],r=t.childNodes[t.childNodes.length-1];(!e||!sr(e))&&t.prepend(L("text")),(!r||!sr(r))&&t.append(L("text"))}function ui(t,e){return ai(t),or([],t,"",e)}function ci(t){let e=t.path?t.create(si(t.path,this.content),this.parameters):t.create(this.element,this.parameters,this.content);return this.done(e),e}function M(t,e=t.parentElement,r={}){let o=le(t),i=t.content||L("fragment",t.childNodes,t),s=ir[o]||(ir[o]=ui(i,"#"+o));this.element=e,this.parameters=r,this.content=i.cloneNode(!0),this.first=this.content.childNodes[0],this.last=this.content.childNodes[this.content.childNodes.length-1],this.contents=s.map(ci,this)}ri(M.prototype,{push:function(t){if(this.status==="done")throw new Error("Renderer is done, cannot .push() data");let e=I(t)||t;this.data!==e&&(this.data=e,this.update())},update:p(oi,{null:function(){let t=this.data;Xt.length=0;let e=this.first;for(;e!==this.last;)Xt.push(e),e=e.nextSibling;return this.content.prepend.apply(this.content,Xt),Xt.length},default:function(){let t=this.data;return this.mutations=this.contents.reduce((e,r)=>(r.data=t,e=e+r.update().mutations,e),0),this.content.lastChild&&this.last!==this.content.lastChild&&(this.last.before(this.content),++this.mutations),this}}),remove:function(){if(this.content.lastChild===this.last)return 0;let t=Le(this.first,this.last);return this.content.prepend.apply(this.content,t),t.length},replaceWith:function(){return this.content.lastChild===this.last?0:(this.last.after.apply(this.last,arguments),this.remove())},stop:function(){return Pt(this),l(this)},done:c.prototype.done});export{G as a,d as b,y as c,Jt as d,H as e,N as f,Qt as g,S as h,p as i,w as j,c as k,R as l,I as m,L as n,et as o,ie as p,ln as q,Be as r,ba as s,hn as t,fe as u,M as v}; diff --git a/build/chunk-XZJUXBZJ.js b/build/chunk-T2R3YWYH.js similarity index 98% rename from build/chunk-XZJUXBZJ.js rename to build/chunk-T2R3YWYH.js index 24f15a6..c6989f9 100644 --- a/build/chunk-XZJUXBZJ.js +++ b/build/chunk-T2R3YWYH.js @@ -1,6 +1,6 @@ /* Literal - 0.8.0 + 0.8.1 By Stephen Band - Built 2023-12-17 14:30 */ + Built 2023-12-17 15:00 */ -import{a as H,b as E,n as p}from"./chunk-UP3ZNJNM.js";var g=Symbol("internals");function S(e){var t;if(e.attachInternals){if(t=e.attachInternals(),t.setFormValue)return t}else t={shadowRoot:elem.shadowRoot};return t.polyfillInput=p("input",{type:"hidden",name:elem.name}),elem.appendChild(t.polyfillInput),t.setFormValue=function(n){this.input.value=n},t}function L(e,t,n){return t[g]=e.formAssociated?S(t):{shadowRoot:n}}function u(e){return e[g]}function T(e,t,n){let s;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(s=n,n=s.input.slice(n.index+n[0].length+(n.consumed||0)));let i=e.exec(n);if(!i)return;let d=t(i);return s&&(s.consumed=(s.consumed||0)+i.index+i[0].length+(i.consumed||0)),d}var K=E(T,!0);function k(e,t,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+(n.length>128?n.length.slice(0,128)+"…":n)+'"')}function O(e,t,n){let s=-1;for(;++sO(t,n,d),s);return i===void 0?t.catch?t.catch(n,s):k(e,t,s):i}var x=E(y,!0);var P={once:!0};function b(e){return new Promise((t,n)=>{e.addEventListener("load",t,P),e.addEventListener("error",n,P)})}var v=H(e=>{if(!e||e.includes("undefined"))throw new Error("ERRR?");let t=p("link",{rel:"preload",as:"style",href:e}),n=b(t);return document.head.append(t),n});var R=Object.defineProperties,V={},j={a:HTMLAnchorElement,article:HTMLElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,section:HTMLElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},B={name:{set:function(e){return this.setAttribute("name",e)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return u(this).form}},labels:{get:function(){return u(this).labels}},validity:{get:function(){return u(this).validity}},validationMessage:{get:function(){return u(this).validationMessage}},willValidate:{get:function(){return u(this).willValidate}},checkValidity:{value:function(){return u(this).checkValidity()}},reportValidity:{value:function(){return u(this).reportValidity()}}},C=0,I=!1;function D(e){return j[e]||window["HTML"+e[0].toUpperCase()+e.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+e+'"')})()}var F=x(/^\s*?\s*$|^\s*?\s*$/,{1:(e,t)=>({name:t[1]}),2:(e,t)=>({name:t[3],tag:t[2]}),catch:function(e,t){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+t+")")}},null);function U(e,t){if(e.hasOwnProperty(t)){let n=e[t];delete e[t],e[t]=n}return e}function A(e,t,n){let s=e.attachShadow({mode:t.mode||"closed",delegatesFocus:t.focusable||!1});if(n){let i=p("link",{rel:"stylesheet",href:n});s.append(i)}return s}function q(e){return!!e.attribute}function z(e){return e.set||e.get||e.hasOwnProperty("value")}function G(e,t){return q(t[1])&&(e.attributes[t[0]]=t[1].attribute),z(t[1])&&(e.properties[t[0]]=t[1]),e}function $(e,t,n,s,i=""){let{name:d,tag:c}=F(e),M=typeof c=="string"?D(c):HTMLElement,{attributes:h,properties:m}=n?Object.entries(n).reduce(G,{attributes:{},properties:{}}):V;function a(){let o=Reflect.construct(M,arguments,a),r=t.construct&&t.construct.length>C?A(o,t,s||t.stylesheet):void 0,l=L(a,o,r);if(l.unconnected=!0,t.template&&(r.innerHTML=t.template),c&&(I=!0),t.construct&&t.construct.call(o,r,l),m&&Object.keys(m).reduce(U,o),r){let f=r.querySelectorAll('link[rel="stylesheet"]');if(f.length){let w=p("style","*:not(:has(slot:not([name]))) { display: none !important; }");r.append(w),l.stylesheetsLoadPromise=Promise.all(Array.from(f,b)).finally(()=>w.remove())}}return o}return s&&(v(s),i=i),a.prototype=Object.create(M.prototype,m),m&&m.value&&(a.formAssociated=!0,R(a.prototype,B),(t.enable||t.disable)&&(a.prototype.formDisabledCallback=function(o){let r=u(this),l=r.shadowRoot;return o?t.disable&&t.disable.call(this,l,r):t.enable&&t.enable.call(this,l,r)}),t.reset&&(a.prototype.formResetCallback=function(){let o=u(this),r=o.shadowRoot;return t.reset.call(this,r,o)}),t.restore&&(a.prototype.formStateRestoreCallback=function(){let o=u(this),r=o.shadowRoot;return t.restore.call(this,r,o)})),h&&(a.observedAttributes=Object.keys(h),a.prototype.attributeChangedCallback=function(o,r,l){return h[o].call(this,l)}),a.prototype.connectedCallback=function(){let o=u(this),r=o.shadowRoot;o.polyfillInput&&elem.appendChild(o.polyfillInput),o.unconnected&&(t.load&&o.stylesheetsLoadPromise?o.stylesheetsLoadPromise.then(()=>t.load.call(this,r,o)):t.load&&Promise.resolve().then(()=>t.load.call(this,r,o)),delete o.unconnected),t.connect&&t.connect.call(this,r,o)},t.disconnect&&(a.prototype.disconnectedCallback=function(){let o=u(this),r=o.shadowRoot;return t.disconnect.call(this,r,o)}),window.console&&window.console.log("%c<"+(c?c+" is="+d:d)+">%c "+i,"color:#3a8ab0;font-weight:600;","color:#888888;font-weight:400;"),window.customElements.define(d,a,c&&{extends:c}),c&&!I&&document.querySelectorAll('[is="'+d+'"]').forEach(o=>{m&&R(o,m);let r=t.construct&&t.construct.length>C?A(o,t,s||t.stylesheet):void 0,l=L(a,o,r);t.construct&&t.construct.call(o,r);let f;for(f in h){let w=o.attributes[f];w&&h[f].call(o,w.value)}t.connect&&t.connect.apply(o)}),a}export{x as a,u as b,$ as c}; +import{a as H,b as E,n as p}from"./chunk-PRLZB5VS.js";var g=Symbol("internals");function S(e){var t;if(e.attachInternals){if(t=e.attachInternals(),t.setFormValue)return t}else t={shadowRoot:elem.shadowRoot};return t.polyfillInput=p("input",{type:"hidden",name:elem.name}),elem.appendChild(t.polyfillInput),t.setFormValue=function(n){this.input.value=n},t}function L(e,t,n){return t[g]=e.formAssociated?S(t):{shadowRoot:n}}function u(e){return e[g]}function T(e,t,n){let s;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(s=n,n=s.input.slice(n.index+n[0].length+(n.consumed||0)));let i=e.exec(n);if(!i)return;let d=t(i);return s&&(s.consumed=(s.consumed||0)+i.index+i[0].length+(i.consumed||0)),d}var K=E(T,!0);function k(e,t,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+(n.length>128?n.length.slice(0,128)+"…":n)+'"')}function O(e,t,n){let s=-1;for(;++sO(t,n,d),s);return i===void 0?t.catch?t.catch(n,s):k(e,t,s):i}var x=E(y,!0);var P={once:!0};function b(e){return new Promise((t,n)=>{e.addEventListener("load",t,P),e.addEventListener("error",n,P)})}var v=H(e=>{if(!e||e.includes("undefined"))throw new Error("ERRR?");let t=p("link",{rel:"preload",as:"style",href:e}),n=b(t);return document.head.append(t),n});var R=Object.defineProperties,V={},j={a:HTMLAnchorElement,article:HTMLElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,section:HTMLElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},B={name:{set:function(e){return this.setAttribute("name",e)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return u(this).form}},labels:{get:function(){return u(this).labels}},validity:{get:function(){return u(this).validity}},validationMessage:{get:function(){return u(this).validationMessage}},willValidate:{get:function(){return u(this).willValidate}},checkValidity:{value:function(){return u(this).checkValidity()}},reportValidity:{value:function(){return u(this).reportValidity()}}},C=0,I=!1;function D(e){return j[e]||window["HTML"+e[0].toUpperCase()+e.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+e+'"')})()}var F=x(/^\s*?\s*$|^\s*?\s*$/,{1:(e,t)=>({name:t[1]}),2:(e,t)=>({name:t[3],tag:t[2]}),catch:function(e,t){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+t+")")}},null);function U(e,t){if(e.hasOwnProperty(t)){let n=e[t];delete e[t],e[t]=n}return e}function A(e,t,n){let s=e.attachShadow({mode:t.mode||"closed",delegatesFocus:t.focusable||!1});if(n){let i=p("link",{rel:"stylesheet",href:n});s.append(i)}return s}function q(e){return!!e.attribute}function z(e){return e.set||e.get||e.hasOwnProperty("value")}function G(e,t){return q(t[1])&&(e.attributes[t[0]]=t[1].attribute),z(t[1])&&(e.properties[t[0]]=t[1]),e}function $(e,t,n,s,i=""){let{name:d,tag:c}=F(e),M=typeof c=="string"?D(c):HTMLElement,{attributes:h,properties:m}=n?Object.entries(n).reduce(G,{attributes:{},properties:{}}):V;function a(){let o=Reflect.construct(M,arguments,a),r=t.construct&&t.construct.length>C?A(o,t,s||t.stylesheet):void 0,l=L(a,o,r);if(l.unconnected=!0,t.template&&(r.innerHTML=t.template),c&&(I=!0),t.construct&&t.construct.call(o,r,l),m&&Object.keys(m).reduce(U,o),r){let f=r.querySelectorAll('link[rel="stylesheet"]');if(f.length){let w=p("style","*:not(:has(slot:not([name]))) { display: none !important; }");r.append(w),l.stylesheetsLoadPromise=Promise.all(Array.from(f,b)).finally(()=>w.remove())}}return o}return s&&(v(s),i=i),a.prototype=Object.create(M.prototype,m),m&&m.value&&(a.formAssociated=!0,R(a.prototype,B),(t.enable||t.disable)&&(a.prototype.formDisabledCallback=function(o){let r=u(this),l=r.shadowRoot;return o?t.disable&&t.disable.call(this,l,r):t.enable&&t.enable.call(this,l,r)}),t.reset&&(a.prototype.formResetCallback=function(){let o=u(this),r=o.shadowRoot;return t.reset.call(this,r,o)}),t.restore&&(a.prototype.formStateRestoreCallback=function(){let o=u(this),r=o.shadowRoot;return t.restore.call(this,r,o)})),h&&(a.observedAttributes=Object.keys(h),a.prototype.attributeChangedCallback=function(o,r,l){return h[o].call(this,l)}),a.prototype.connectedCallback=function(){let o=u(this),r=o.shadowRoot;o.polyfillInput&&elem.appendChild(o.polyfillInput),o.unconnected&&(t.load&&o.stylesheetsLoadPromise?o.stylesheetsLoadPromise.then(()=>t.load.call(this,r,o)):t.load&&Promise.resolve().then(()=>t.load.call(this,r,o)),delete o.unconnected),t.connect&&t.connect.call(this,r,o)},t.disconnect&&(a.prototype.disconnectedCallback=function(){let o=u(this),r=o.shadowRoot;return t.disconnect.call(this,r,o)}),window.console&&window.console.log("%c<"+(c?c+" is="+d:d)+">%c "+i,"color:#3a8ab0;font-weight:600;","color:#888888;font-weight:400;"),window.customElements.define(d,a,c&&{extends:c}),c&&!I&&document.querySelectorAll('[is="'+d+'"]').forEach(o=>{m&&R(o,m);let r=t.construct&&t.construct.length>C?A(o,t,s||t.stylesheet):void 0,l=L(a,o,r);t.construct&&t.construct.call(o,r);let f;for(f in h){let w=o.attributes[f];w&&h[f].call(o,w.value)}t.connect&&t.connect.apply(o)}),a}export{x as a,u as b,$ as c}; diff --git a/build/data/clock.js b/build/data/clock.js index a6422fc..52267ae 100644 --- a/build/data/clock.js +++ b/build/data/clock.js @@ -1,6 +1,6 @@ /* Literal - 0.8.0 + 0.8.1 By Stephen Band - Built 2023-12-17 14:30 */ + Built 2023-12-17 15:00 */ -import"../chunk-CBNPKG4R.js";import{m as t}from"../chunk-UP3ZNJNM.js";var e=t({time:0});setInterval(()=>e.time=window.performance.now()/1e3,1e3);var r=e;export{r as default}; +import"../chunk-MXP7PCLU.js";import{m as t}from"../chunk-PRLZB5VS.js";var e=t({time:0});setInterval(()=>e.time=window.performance.now()/1e3,1e3);var r=e;export{r as default}; diff --git a/build/debug.css b/build/debug.css new file mode 100644 index 0000000..c29b272 --- /dev/null +++ b/build/debug.css @@ -0,0 +1,6 @@ +/* Literal + 0.8.1 + By Stephen Band + Built 2023-12-17 15:00 */ + +.literal-print{box-sizing:border-box;position:relative;display:block;width:100%;justify-self:stretch;align-self:start;font-size:.8125rem!important;font-family:Fira Mono,Andale Mono,courier,monospace;font-weight:400;letter-spacing:-.05em;line-height:1.25rem!important;color:#000;background-color:#f7d213;border-radius:.25rem;border:1px solid #ad9911;padding:0 .25rem;box-shadow:inset 0 4px 8px 2px #ffe456,inset 0 -4px 8px -1px #d4b100;overflow:hidden}.literal-print+*{margin-top:.5rem}.literal-print>small{box-sizing:border-box;letter-spacing:-.08em}.literal-print>code{box-sizing:border-box;display:block;font-family:inherit;line-height:1.4375em;white-space:normal;border-top:inherit;border-bottom:inherit;border-radius:0;background-color:#fff8d5;margin-left:-.25rem;margin-right:-.25rem;padding:.25rem;width:auto;color:inherit}.literal-print>code+code{margin-top:-1px}.literal-print>code:last-child{margin-bottom:-1px;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.literal-print>.literal-count{box-sizing:border-box;position:absolute;top:0;right:.375rem}.literal-print-error{box-sizing:border-box;color:#fff;background-color:#f02f2f;border-color:#ba4029;box-shadow:inset 0 4px 8px 2px #ff3939,inset 0 -4px 8px -1px #d82020}.literal-print-error>code{box-sizing:border-box;color:#141b1e;background-color:#fdd} diff --git a/build/literal-element/module.js b/build/literal-element/module.js index 6f5b56a..3d2cf45 100644 --- a/build/literal-element/module.js +++ b/build/literal-element/module.js @@ -1,6 +1,6 @@ /* Literal - 0.8.0 + 0.8.1 By Stephen Band - Built 2023-12-17 14:30 */ + Built 2023-12-17 15:00 */ -import{a as I,b as r,c as m}from"../chunk-XZJUXBZJ.js";import{f as u,g as O,h as p,i as d,o as x,p as j,r as D,t as v,u as E,v as L}from"../chunk-UP3ZNJNM.js";var B=Object.assign;function h(t,e){this.element=t,this.definitions=e,this.tokens=[]}B(h.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)||(this.tokens.push(e),this.supports(e)&&this.definitions[e].enable(this.element))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(x(this.tokens,e),this.supports(e)&&this.definitions[e].disable(this.element))}},supports:function(t){return!!this.definitions&&!!this.definitions[t]}});var U=Array.prototype;function k(t,e){let n=t.tokens.slice(),i=U.slice.apply(e),o=n.length;for(;o--;)i.includes(n[o])&&n.splice(o,1);t.remove.apply(t,n),t.add.apply(t,i)}var G=/^\.*\/|^https?:\/\//,w=d((t,e,n)=>typeof n,{string:function(t,e,n){let i=r(e);return G.test(n)?E(n).then(o=>i.data[t]=o).catch(o=>console.error(o)):i.data[t]=JSON.parse(n),i.data},default:function(t,e,n){r(e)[t]=n}}),P=d((t,e)=>typeof e,{string:d((t,e)=>e,{attribute:t=>({attribute:function(e){r(this).data[t]=e}}),string:t=>({attribute:function(e){this[t]=e},get:function(){return r(this).data[t]},set:function(e){r(this).data[t]=e},default:""}),boolean:t=>({attribute:function(e){this[t]=e!==null},get:function(){return!!r(this).data[t]||!1},set:function(e){r(this).data[t]=!!e},default:!1}),number:t=>({attribute:function(e){this[t]=e},get:function(){return r(this).data[t]||0},set:function(e){r(this).data[t]=Number(e)},default:0}),tokens:t=>({attribute:function(e){this[t]=e||""},get:function(){let e=r(this);if(e[t])return e[t];let n=e[t]=new h;return e.data[t]=n.tokens=u(n.tokens),n},set:function(e){let n=this[t];k(n,(e+"").trim().split(/\s+/))},default:p}),src:t=>({attribute:function(e){this[t]=e},get:function(){return r(this).renderer.data[t]},set:function(e){w(t,this,e)},default:null}),module:t=>({attribute:function(e){this[t]=e},get:function(){return r(this).renderer.data[t]},set:function(e){w(t,this,e)},default:null}),json:t=>({attribute:function(e){this[t]=e},get:function(){return r(this).renderer.data[t]},set:function(e){w(t,this,e)},default:null}),default:(t,e)=>{throw new SyntaxError('Literal type not supported in attribute definition "'+t+":"+e+'"')}}),object:O(1),undefined:t=>({attribute:function(e){r(this).data[t]=e}})});var J=Object.assign,R=Object.entries;function V(t,e){return t[e[0]]=P(e[0],e[1]),t}function q(t){try{return JSON.parse(t)}catch{return t}}function F(t,e){let n=Object.keys(t);Object.values(t).map(q).reduce((o,f,b)=>(o[n[b]]=f,o),{})}function g(t,e,n={},i,o={}){let f=i?R(i).reduce(V,{}):{},b=typeof e=="string"?D(e):e;return m(t,{construct:function(c){let a=r(this),y=a.renderer=new L(b,this,J({},o,{host:this,shadow:c})),s=a.data={};c.append(y.content),n.construct&&n.construct.call(this,c,u(s),a)},connect:function(c){let a=r(this),{renderer:y,data:s}=a,l;for(l in i)l in s||(s[l]=f[l].default);F(this.dataset,s),a.data=u(s),n.connect&&n.connect.call(this,c,u(s),a),y.push(s)}},f,null,"")}var $=Object.assign,z={is:!0,loading:!0};var kt=Promise.resolve();function C(t){return!z[t.name]}function H(t,e){return C(e)&&(t[e.name]=e.value),t}var S={connect:function(){let t=r(this);if(!t.tag)throw new SyntaxError('