mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-27 10:31:42 +00:00
10 lines
134 KiB
JavaScript
10 lines
134 KiB
JavaScript
|
function Ne(e,t){const n=Object.create(null),s=e.split(",");for(let r=0;r<s.length;r++)n[s[r]]=!0;return t?r=>!!n[r.toLowerCase()]:r=>!!n[r]}const wf="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",Nf=Ne(wf),Pf="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Of=Ne(Pf);function Go(e){return!!e||e===""}function Un(e){if(V(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=z(s)?el(s):Un(s);if(r)for(const i in r)t[i]=r[i]}return t}else{if(z(e))return e;if(fe(e))return e}}const Rf=/;(?![^(]*\))/g,Af=/:(.+)/;function el(e){const t={};return e.split(Rf).forEach(n=>{if(n){const s=n.split(Af);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function jn(e){let t="";if(z(e))t=e;else if(V(e))for(let n=0;n<e.length;n++){const s=jn(e[n]);s&&(t+=s+" ")}else if(fe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function If(e){if(!e)return null;let{class:t,style:n}=e;return t&&!z(t)&&(e.class=jn(t)),n&&(e.style=Un(n)),e}const Mf="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",kf="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Ff="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Lf=Ne(Mf),Bf=Ne(kf),$f=Ne(Ff);function Df(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=ht(e[s],t[s]);return n}function ht(e,t){if(e===t)return!0;let n=Qi(e),s=Qi(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=gt(e),s=gt(t),n||s)return e===t;if(n=V(e),s=V(t),n||s)return n&&s?Df(e,t):!1;if(n=fe(e),s=fe(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,i=Object.keys(t).length;if(r!==i)return!1;for(const o in e){const l=e.hasOwnProperty(o),c=t.hasOwnProperty(o);if(l&&!c||!l&&c||!ht(e[o],t[o]))return!1}}return String(e)===String(t)}function $s(e,t){return e.findIndex(n=>ht(n,t))}const Hf=e=>z(e)?e:e==null?"":V(e)||fe(e)&&(e.toString===nl||!W(e.toString))?JSON.stringify(e,tl,2):String(e),tl=(e,t)=>t&&t.__v_isRef?tl(e,t.value):Qt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r])=>(n[`${s} =>`]=r,n),{})}:Dt(t)?{[`Set(${t.size})`]:[...t.values()]}:fe(t)&&!V(t)&&!sl(t)?String(t):t,Q={},Xt=[],Me=()=>{},us=()=>!1,Vf=/^on[^a-z]/,$t=e=>Vf.test(e),Jr=e=>e.startsWith("onUpdate:"),ee=Object.assign,Yr=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Uf=Object.prototype.hasOwnProperty,Z=(e,t)=>Uf.call(e,t),V=Array.isArray,Qt=e=>Kn(e)==="[object Map]",Dt=e=>Kn(e)==="[object Set]",Qi=e=>Kn(e)==="[object Date]",W=e=>typeof e=="function",z=e=>typeof e=="string",gt=e=>typeof e=="symbol",fe=e=>e!==null&&typeof e=="object",Zr=e=>fe(e)&&W(e.then)&&W(e.catch),nl=Object.prototype.toString,Kn=e=>nl.call(e),jf=e=>Kn(e).slice(8,-1),sl=e=>Kn(e)==="[object Object]",Xr=e=>z(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ot=Ne(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,o
|
||
|
`),r]);else{const i=[`[Vue warn]: ${e}`,...t];r.length&&i.push(`
|
||
|
`,...Ba(r)),console.warn(...i)}Ut()}function La(){let e=Cn[Cn.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function Ba(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
|
||
|
`],...$a(n))}),t}function $a({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${dc(e.component,e.type,s)}`,i=">"+n;return e.props?[r,...Da(e.props),i]:[r+i]}function Da(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...Tl(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Tl(e,t,n){return z(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:de(t)?(t=Tl(e,Y(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):W(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Y(t),n?t:[`${e}=`,t])}function Ye(e,t,n,s){let r;try{r=s?e(...s):e()}catch(i){jt(i,t,n)}return r}function ke(e,t,n,s){if(W(e)){const i=Ye(e,t,n,s);return i&&Zr(i)&&i.catch(o=>{jt(o,t,n)}),i}const r=[];for(let i=0;i<e.length;i++)r.push(ke(e[i],t,n,s));return r}function jt(e,t,n,s=!0){const r=t?t.vnode:null;if(t){let i=t.parent;const o=t.proxy,l=n;for(;i;){const f=i.ec;if(f){for(let a=0;a<f.length;a++)if(f[a](e,o,l)===!1)return}i=i.parent}const c=t.appContext.config.errorHandler;if(c){Ye(c,null,10,[e,o,l]);return}}Ha(e,n,r,s)}function Ha(e,t,n,s=!0){console.error(e)}let _s=!1,wr=!1;const Ae=[];let et=0;const Tn=[];let _n=null,zt=0;const Sn=[];let ft=null,Jt=0;const Sl=Promise.resolve();let li=null,Nr=null;function ci(e){const t=li||Sl;return e?t.then(this?e.bind(this):e):t}function Va(e){let t=et+1,n=Ae.length;for(;t<n;){const s=t+n>>>1;Mn(Ae[s])<e?t=s+1:n=s}return t}function fi(e){(!Ae.length||!Ae.includes(e,_s&&e.allowRecurse?et+1:et))&&e!==Nr&&(e.id==null?Ae.push(e):Ae.splice(Va(e.id),0,e),vl())}function vl(){!_s&&!wr&&(wr=!0,li=Sl.then(Nl))}function Ua(e){const t=Ae.indexOf(e);t>et&&Ae.splice(t,1)}function wl(e,t,n,s){V(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?s+1:s))&&n.push(e),vl()}function ja(e){wl(e,_n,Tn,zt)}function ai(e){wl(e,ft,Sn,Jt)}function Ws(e,t=null){if(Tn.length){for(Nr=t,_n=[...new Set(Tn)],Tn.length=0,zt=0;zt<_n.length;zt++)_n[zt]();_n=null,zt=0,Nr=null,Ws(e,t)}}function Es(e){if(Ws(),Sn.length){const t=[...new Set(Sn)];if(Sn.length=0,ft){ft.push(...t);return}for(ft=t,ft.sort((n,s)=>Mn(n)-Mn(s)),Jt=0;Jt<ft.length;Jt++)ft[Jt]();ft=null,Jt=0}}const Mn=e=>e.id==null?1/0:e.id;function Nl(e){wr=!1,_s=!0,Ws(e),Ae.sort((n,s)=>Mn(n)-Mn(s));const t=Me;try{for(et=0;et<Ae.length;et++){const n=Ae[et];n&&n.active!==!1&&Ye(n,null,14)}}finally{et=0,Ae.length=0,Es(),_s=!1,li=null,(Ae.length||Tn.length||Sn.length)&&Nl(e)}}let Yt,rs=[];function Pl(e,t){var n,s;Yt=e,Yt?(Yt.enabled=!0,rs.forEach(({event:r,args:i})=>Yt.emit(r,...i)),rs=[]):typeof window!="undefined"&&window.HTMLElement&&!(!((s=(n=window.navigator)===null||n===void 0?void 0:n.userAgent)===null||s===void 0)&&s.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{Pl(i,t)}),setTimeout(()=>{Yt||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,rs=[])},3e3)):rs=[]}function Ka(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Q;let r=n;const i=t.startsWith("update:"),o=i&&t.slice(7);if(o&&o in s){const a=`${o==="modelValue"?"model":o}Modifiers`,{number:u,trim:d}=s[a]||Q;d&&(r=n.map(m=>m.trim())),u&&(r=n.map(mt))}let l,c=s[l=Gt(t)]||s[l=Gt(Te(t))];!c&&i&&(c=s[l=Gt(xe(t))]),c&&ke(c,e,6,r);const f=s[l+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,ke(f,e,6,r)}}function Ol(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!W(e)){const c=f=>{const a=Ol(f,t,!0);a&&(l=!0,ee(o,a))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(s.set(e,null),null):(V(i)?i.forEach(c=>o[c]=null):ee(o,i),s.set(e,o),o)}function qs(e,t){return!e||!$t(t)?!1:(t=t.slice(2).replace(/Once$/,""),Z(e,t[0].toLowerCase()+t.slice(1))||Z(e,xe(t))||Z(e,t))}let be=null,zs=null;function kn(e){const t=be;return be=e,zs=e&&e.type.__scopeId||null,t}function xa(e){zs=e}function Wa(){zs=null}const qa=e=>ui;function ui(e,t=be,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&kr(-1);const i=kn(t),o=e(...r);return kn(i),s._d&&kr(1),o};return
|
||
|
`+" ".repeat(T))}return m}function Ud(e,t={}){const n=Vd(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:s,push:r,prefixIdentifiers:i,indent:o,deindent:l,newline:c,scopeId:f,ssr:a}=n,u=e.helpers.length>0,d=!i&&s!=="module";jd(e,n);const b=a?"ssrRender":"render",N=(a?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(r(`function ${b}(${N}) {`),o(),d&&(r("with (_ctx) {"),o(),u&&(r(`const { ${e.helpers.map(sf).join(", ")} } = _Vue`),r(`
|
||
|
`),c())),e.components.length&&(br(e.components,"component",n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(br(e.directives,"directive",n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),br(e.filters,"filter",n),c()),e.temps>0){r("let ");for(let y=0;y<e.temps;y++)r(`${y>0?", ":""}_temp${y}`)}return(e.components.length||e.directives.length||e.temps)&&(r(`
|
||
|
`),c()),a||r("return "),e.codegenNode?Ce(e.codegenNode,n):r("null"),d&&(l(),r("}")),l(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function jd(e,t){const{ssr:n,prefixIdentifiers:s,push:r,newline:i,runtimeModuleName:o,runtimeGlobalName:l,ssrRuntimeModuleName:c}=t,f=l;if(e.helpers.length>0&&(r(`const _Vue = ${f}
|
||
|
`),e.hoists.length)){const a=[Ai,Ii,Jn,Mi,jc].filter(u=>e.helpers.includes(u)).map(sf).join(", ");r(`const { ${a} } = _Vue
|
||
|
`)}Kd(e.hoists,t),i(),r("return ")}function br(e,t,{helper:n,push:s,newline:r,isTS:i}){const o=n(t==="filter"?Li:t==="component"?ki:Fi);for(let l=0;l<e.length;l++){let c=e[l];const f=c.endsWith("__self");f&&(c=c.slice(0,-6)),s(`const ${Dn(c,t)} = ${o}(${JSON.stringify(c)}${f?", true":""})${i?"!":""}`),l<e.length-1&&r()}}function Kd(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:s,helper:r,scopeId:i,mode:o}=t;s();for(let l=0;l<e.length;l++){const c=e[l];c&&(n(`const _hoisted_${l+1} = `),Ce(c,t),s())}t.pure=!1}function qi(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Xn(e,t,n),n&&t.deindent(),t.push("]")}function Xn(e,t,n=!1,s=!0){const{push:r,newline:i}=t;for(let o=0;o<e.length;o++){const l=e[o];z(l)?r(l):V(l)?qi(l,t):Ce(l,t),o<e.length-1&&(n?(s&&r(","),i()):s&&r(", "))}}function Ce(e,t){if(z(e)){t.push(e);return}if(gt(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:Ce(e.codegenNode,t);break;case 2:xd(e,t);break;case 4:rf(e,t);break;case 5:Wd(e,t);break;case 12:Ce(e.codegenNode,t);break;case 8:of(e,t);break;case 3:zd(e,t);break;case 13:Jd(e,t);break;case 14:Zd(e,t);break;case 15:Xd(e,t);break;case 17:Qd(e,t);break;case 18:Gd(e,t);break;case 19:eh(e,t);break;case 20:th(e,t);break;case 21:Xn(e.body,t,!0,!1);break}}function xd(e,t){t.push(JSON.stringify(e.content),e)}function rf(e,t){const{content:n,isStatic:s}=e;t.push(s?JSON.stringify(n):n,e)}function Wd(e,t){const{push:n,helper:s,pure:r}=t;r&&n(lr),n(`${s(sr)}(`),Ce(e.content,t),n(")")}function of(e,t){for(let n=0;n<e.children.length;n++){const s=e.children[n];z(s)?t.push(s):Ce(s,t)}}function qd(e,t){const{push:n}=t;if(e.type===8)n("["),of(e,t),n("]");else if(e.isStatic){const s=Ki(e.content)?e.content:JSON.stringify(e.content);n(s,e)}else n(`[${e.content}]`,e)}function zd(e,t){const{push:n,helper:s,pure:r}=t;r&&n(lr),n(`${s(Jn)}(${JSON.stringify(e.content)})`,e)}function Jd(e,t){const{push:n,helper:s,pure:r}=t,{tag:i,props:o,children:l,patchFlag:c,dynamicProps:f,directives:a,isBlock:u,disableTracking:d,isComponent:m}=e;a&&n(s(Bi)+"("),u&&n(`(${s(Bt)}(${d?"true":""}), `),r&&n(lr);const b=u?pn(t.inSSR,m):un(t.inSSR,m);n(s(b)+"(",e),Xn(Yd([i,o,l,c,f]),t),n(")"),u&&n(")"),a&&(n(", "),Ce(a,t),n(")"))}function Yd(e){let t=e.length;for(;t--&&e[t]==null;);return e.slice(0,t+1).map(n=>n||"null")}function Zd(e,t){const{push:n,helper:s,pure:r}=t,i=z(e.callee)?e.callee:s(e.callee);r&&n(lr),n(i+"(",e),Xn(e.arguments,t),n(")")}function Xd(e,t){const{push:n,indent:s,deindent:r,newline:i}=t,{properties:o}=e;if(!o.length){n("{}",e);return}const l=o.length>1||!1;n(l?"{":"{ "),l&&s();for(let c=0;c<o.length;c++){const{key:f,value:a}=o[c];qd(f,t),n(": "),Ce(a,t),c<o.length-1&&(n(","),i())}l&&r(),n(l?"}":" }")}function Qd(e,t){qi(e.elements,t)}function Gd(e,t){const{push:n,indent:s,deindent:r}=t,{params:i,returns:o,body:l,newline:c,isSlot:f}=e;f&&n(`_${fn[Ui]}(`),n("(",e),V(i)?Xn(i,t):i&&Ce(i,t),n(") => "),(c||l)&&(n("{"),s()),o?(c&&n("return "),V(o)?qi(o,t):Ce(o,t)):l&&Ce(l,t),(c||l)&&(r(),n("}")),f&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}function eh(e,t){const{test:n,consequent:s,alternate:r,newline:i}=e,{push:o,indent:l,deindent:c,newline:f}=t;if(n.type===4){const u=!Ki(n.content);u&&o("("),rf(n,t),u&&o(")")}else o("("),Ce(n,t),o(")");i&&l(),t.indentLevel++,i||o(" "),o("? "),Ce(s,t),t.indentLevel--,i&&f(),i||o(" "),o(": ");const a=r.type===19;a||t.indentLevel++,Ce(r,t),a||t.indentLevel--,i&&c(!0)}function th(e,t){const{push:n,helper:s,indent:r,deindent:i,newline:o}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(r(),n(`${s(As)}(-1),`),o()),n(`_cache[${e.index}] = `),Ce(e.value,t),e.isVNode&&(n(","),o(),n(`${s(As)}(1),`),o(),n(`_cache[${e.index}]`),i()),n(")")}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments,typeof,void".split(",").join("\\b|\\b")+"\\b");const nh=nf(/^(if|else|else-if)$/,(e,t,n)=>sh(e,t,n,(s,r,i)=>{const o=n.parent.children;let l=o.indexOf(s),c=0;for(;l-->=0;){const f=o[l]
|