diff --git "a/_app/immutable/nodes/8.7FYwEOQO.js" "b/_app/immutable/nodes/8.7FYwEOQO.js" new file mode 100644--- /dev/null +++ "b/_app/immutable/nodes/8.7FYwEOQO.js" @@ -0,0 +1,63 @@ +import{s as be,e as b,t as Z,a as M,d as y,g as D,i as Q,f as h,c as q,j as _,k as N,l as m,ag as ce,B as de,u as ee,L as Ye,m as he,N as Xe,H as K,I as Ae,A as Fe,ah as Ve,ai as es,aj as We,ak as Oe,a7 as vn,al as $t,b as me,am as bn,J as nl,Q as yn,R as kn,U as vs,K as ts,z as ll,D as il,E as rl,F as ol}from"../chunks/scheduler.B2FSa8mv.js";import{S as ye,i as ke,k as Ze,c as Y,a as X,m as z,t as F,f as Be,b as H,e as J,g as _e,d as ve,j as yt}from"../chunks/index.CzNnnxDZ.js";import{k as pe,ar as wn,j as He,as as Qe,at as Cn,au as ot,av as $n,aw as Tn,ax as Le,ay as rt,az as ss,aA as ns,aB as ls,aC as al,aD as et,aE as cl,aF as ul,aG as It,aH as Dt,aI as bs,aJ as fl,aK as ys,aL as ks,aM as Ot,aN as dl,aO as hl,aP as is,aQ as ml,aR as Ge,aS as wt,aT as Nt,aU as at,aV as ws,aW as pl,aX as gl,aY as _l,aZ as rs,a_ as jt,a$ as vl,b0 as bl,b1 as En,b2 as lt,b3 as Sn,b4 as yl,b5 as Pt,b6 as kl,b7 as In,b8 as wl,b9 as Cl,ba as $l,bb as Tl,bc as El,bd as Sl,be as Nn,bf as Il,bg as Nl,I as Me,l as Al,bh as Ll,bi as Ol,bj as kt,bk as An,bl as Pl,a as Dl,bm as ct,bn as ut,bo as jl,u as Ml,bp as ql,bq as os,ah as Xt,br as Fl,bs as Tt,bt as Ln,bu as On}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";import{p as Vl,i as Bl,a as Hl}from"../chunks/entry.CmEkywbK.js";import{B as ft}from"../chunks/Button.DWcgwDfR.js";import{s as Wt}from"../chunks/index.CqVitEmB.js";import{A as Rl,a as Ul}from"../chunks/AccordionItem.BAM5BvX8.js";import{C as Kl,P as Kt}from"../chunks/Prismjs.DElG_ecN.js";function Cs(l){let e,t;return{c(){e=b("span"),t=Z(l[1]),this.h()},l(s){e=y(s,"SPAN",{class:!0});var n=D(e);t=Q(n,l[1]),n.forEach(h),this.h()},h(){_(e,"class","text-negative font-bold text-sm")},m(s,n){N(s,e,n),m(e,t)},p(s,n){n&2&&he(t,s[1])},d(s){s&&h(e)}}}function xl(l){let e,t,s,n,i,r,o,a=l[1]&&Cs(l);return{c(){e=b("label"),t=Z(`Source name + `),s=b("input"),n=M(),i=b("div"),a&&a.c(),this.h()},l(c){e=y(c,"LABEL",{for:!0,class:!0});var u=D(e);t=Q(u,`Source name + `),s=y(u,"INPUT",{name:!0,class:!0}),u.forEach(h),n=q(c),i=y(c,"DIV",{class:!0});var f=D(i);a&&a.l(f),f.forEach(h),this.h()},h(){s.required=!0,_(s,"name","sourceName"),_(s,"class","rounded border border-base-300 bg-base-100 p-1 ml-auto w-2/3 align-middle text-sm"),_(e,"for","sourceName"),_(e,"class","flex justify-between w-full"),_(i,"class","flex justify-end w-full")},m(c,u){N(c,e,u),m(e,t),m(e,s),ce(s,l[0]),N(c,n,u),N(c,i,u),a&&a.m(i,null),r||(o=[de(s,"input",l[2]),de(s,"change",l[3])],r=!0)},p(c,[u]){u&1&&s.value!==c[0]&&ce(s,c[0]),c[1]?a?a.p(c,u):(a=Cs(c),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},i:ee,o:ee,d(c){c&&(h(e),h(n),h(i)),a&&a.d(),r=!1,Ye(o)}}}const Gl=/^[\w_]+$/,Pn=(l,e)=>l.length<1?"Source name must be set.":Gl.test(l)?l&&e.some(t=>t.name===l)?`A source named ${l} already exists.`:"":"Source names can only contain letters, numbers, and underscores.";function Yl(l,e,t){let{sourceName:s}=e,{nameError:n}=e;function i(){s=this.value,t(0,s)}const r=()=>t(1,n="");return l.$$set=o=>{"sourceName"in o&&t(0,s=o.sourceName),"nameError"in o&&t(1,n=o.nameError)},[s,n,i,r]}class Dn extends ye{constructor(e){super(),ke(this,e,Yl,xl,be,{sourceName:0,nameError:1})}}function $s(l,e,t){const s=l.slice();s[11]=e[t][0],s[12]=e[t][1];const n=s[12].package.package.evidence.datasources;return s[13]=n,s}function Ts(l,e,t){const s=l.slice();return s[16]=e[t],s}function zl(l){let e,t=l[16]+"",s,n;return{c(){e=b("option"),s=Z(t),this.h()},l(i){e=y(i,"OPTION",{});var r=D(e);s=Q(r,t),r.forEach(h),this.h()},h(){e.__value=n=l[16],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s)},p(i,r){r&1&&t!==(t=i[16]+"")&&he(s,t),r&1&&n!==(n=i[16])&&(e.__value=n,ce(e,e.__value))},d(i){i&&h(e)}}}function Jl(l){let e;function t(i,r){return i[16].length?Wl:Xl}let s=t(l),n=s(l);return{c(){n.c(),e=me()},l(i){n.l(i),e=me()},m(i,r){n.m(i,r),N(i,e,r)},p(i,r){s===(s=t(i))&&n?n.p(i,r):(n.d(1),n=s(i),n&&(n.c(),n.m(e.parentNode,e)))},d(i){i&&h(e),n.d(i)}}}function Xl(l){return{c:ee,l:ee,m:ee,p:ee,d:ee}}function Wl(l){let e,t=l[16][0]+"",s,n;return{c(){e=b("option"),s=Z(t),this.h()},l(i){e=y(i,"OPTION",{});var r=D(e);s=Q(r,t),r.forEach(h),this.h()},h(){e.__value=n=l[16][0],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s)},p(i,r){r&1&&t!==(t=i[16][0]+"")&&he(s,t),r&1&&n!==(n=i[16][0])&&(e.__value=n,ce(e,e.__value))},d(i){i&&h(e)}}}function Es(l){let e,t;function s(r,o){return o&1&&(e=null),e==null&&(e=!!Array.isArray(r[16])),e?Jl:zl}let n=s(l,-1),i=n(l);return{c(){i.c(),t=me()},l(r){i.l(r),t=me()},m(r,o){i.m(r,o),N(r,t,o)},p(r,o){n===(n=s(r,o))&&i?i.p(r,o):(i.d(1),i=n(r),i&&(i.c(),i.m(t.parentNode,t)))},d(r){r&&h(t),i.d(r)}}}function Ss(l){let e,t,s=pe(l[13]),n=[];for(let i=0;iZe(f,"sourceName",R)),Xe.push(()=>Ze(f,"nameError",L)),v=new ft({props:{size:"md",icon:wn,variant:"positive",type:"submit",$$slots:{default:[Zl]},$$scope:{ctx:l}}}),{c(){e=b("div"),t=b("form"),s=b("h3"),s.textContent=n,i=M(),r=b("label"),o=Z(`Datasource Type + `),a=b("select");for(let S=0;S<$.length;S+=1)$[S].c();c=M(),u=b("div"),Y(f.$$.fragment),g=M(),k=b("div"),Y(v.$$.fragment),this.h()},l(S){e=y(S,"DIV",{class:!0});var I=D(e);t=y(I,"FORM",{class:!0});var O=D(t);s=y(O,"H3",{class:!0,"data-svelte-h":!0}),K(s)!=="svelte-1ooj2sn"&&(s.textContent=n),i=q(O),r=y(O,"LABEL",{for:!0,class:!0});var P=D(r);o=Q(P,`Datasource Type + `),a=y(P,"SELECT",{name:!0,class:!0});var T=D(a);for(let W=0;W<$.length;W+=1)$[W].l(T);T.forEach(h),P.forEach(h),c=q(O),u=y(O,"DIV",{});var B=D(u);X(f.$$.fragment,B),B.forEach(h),g=q(O),k=y(O,"DIV",{class:!0});var U=D(k);X(v.$$.fragment,U),U.forEach(h),O.forEach(h),I.forEach(h),this.h()},h(){_(s,"class","text-sm uppercase font-bold text-left"),a.required=!0,_(a,"name","sourceType"),_(a,"class","rounded border border-base-300 bg-base-100 p-1 ml-auto w-2/3 align-middle text-sm"),l[2]===void 0&&Ae(()=>l[7].call(a)),_(r,"for","sourceType"),_(r,"class","flex justify-between w-full"),_(k,"class","ml-auto"),_(t,"class","flex flex-col w-full gap-4"),_(e,"class","col-span-4 w-full flex justify-end items-end flex-col py-4 px-4 rounded"),Fe(e,"bg-base-200",!l[1])},m(S,I){N(S,e,I),m(e,t),m(t,s),m(t,i),m(t,r),m(r,o),m(r,a);for(let O=0;O<$.length;O+=1)$[O]&&$[O].m(a,null);Ve(a,l[2],!0),m(t,c),m(t,u),z(f,u,null),m(t,g),m(t,k),z(v,k,null),C=!0,E||(A=[de(a,"change",l[7]),de(t,"submit",es(l[5]))],E=!0)},p(S,[I]){if(I&1){j=pe(Object.entries(S[0]));let T;for(T=0;Td=!1)),!p&&I&16&&(p=!0,O.nameError=S[4],We(()=>p=!1)),f.$set(O);const P={};I&524288&&(P.$$scope={dirty:I,ctx:S}),v.$set(P),(!C||I&2)&&Fe(e,"bg-base-200",!S[1])},i(S){C||(F(f.$$.fragment,S),F(v.$$.fragment,S),S&&Ae(()=>{C&&(w||(w=Be(e,He,{},!0)),w.run(1))}),C=!0)},o(S){H(f.$$.fragment,S),H(v.$$.fragment,S),S&&(w||(w=Be(e,He,{},!1)),w.run(0)),C=!1},d(S){S&&h(e),Oe($,S),J(f),J(v),S&&w&&w.end(),E=!1,Ye(A)}}}function ei(l,e,t){let{availablePackages:s}=e,{ghost:n=!1}=e,{existingSources:i=[]}=e,r="",o="";const a=vn();let c="";function u(){t(4,c=Pn(o,i)),!c&&(a("newSource",{newSourceType:r,newSourceName:o}),t(3,o=""))}function f(){r=$t(this),t(2,r),t(0,s)}function d(g){o=g,t(3,o)}function p(g){c=g,t(4,c)}return l.$$set=g=>{"availablePackages"in g&&t(0,s=g.availablePackages),"ghost"in g&&t(1,n=g.ghost),"existingSources"in g&&t(6,i=g.existingSources)},[s,n,r,o,c,u,i,f,d,p]}class jn extends ye{constructor(e){super(),ke(this,e,ei,Ql,be,{availablePackages:0,ghost:1,existingSources:6})}}var ti={default:{a:{viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"},{d:"M9 17v-4"},{d:"M12 17v-1"},{d:"M15 17v-2"},{d:"M12 17v-1"}]}},si={default:{a:{viewBox:"0 0 200 200",style:"enable-background:new 0 0 791.9 221.6;"},path:[{fill:"currentColor",d:"M 13.53 126.114 C 13.53 126.114 64.492 162.546 67.591 164.363 C 70.582 166.179 74.963 166.606 78.808 165.111 C 82.655 163.615 85.54 160.196 86.395 156.777 C 87.356 153.358 99.002 91.819 99.002 91.819 C 99.108 90.964 99.428 88.507 98.147 86.156 C 96.331 82.951 92.271 81.242 88.638 82.31 C 85.754 83.165 84.258 85.302 83.83 86.049 C 83.19 87.224 82.014 89.148 79.877 90.857 C 78.275 92.139 76.672 92.887 75.924 93.208 C 69.407 95.879 62.142 93.635 57.975 88.293 C 55.411 84.981 50.817 83.699 46.757 85.302 C 42.697 86.904 40.347 91.071 40.667 95.238 C 41.415 101.862 37.676 108.486 31.052 111.156 C 27.526 112.546 23.787 112.546 20.475 111.477 C 19.727 111.263 17.056 110.623 14.385 112.118 C 11.073 113.828 9.363 117.887 10.218 121.52 C 10.859 123.978 12.783 125.58 13.53 126.114 Z",style:"transform-origin: 122.948px 117.753px;"},{fill:"currentColor",d:"M 98.467 46.305 C 98.467 46.305 116.63 106.349 117.912 109.554 C 119.194 112.866 122.399 115.858 126.352 117.032 C 130.306 118.101 134.686 117.247 137.463 115.11 C 140.242 112.973 187.143 71.412 187.143 71.412 C 187.785 70.879 189.494 69.062 189.922 66.391 C 190.455 62.759 188.212 58.912 184.793 57.523 C 182.015 56.455 179.451 57.203 178.703 57.523 C 177.528 58.057 175.391 58.805 172.72 58.912 C 170.583 59.019 168.981 58.592 168.126 58.378 C 161.395 56.455 156.908 50.259 156.908 43.528 C 156.802 39.361 154.023 35.515 149.857 34.339 C 145.583 33.164 141.203 34.98 138.959 38.506 C 135.434 44.275 128.489 47.16 121.651 45.237 C 118.019 44.168 115.027 41.925 113.104 39.04 C 112.57 38.399 110.86 36.263 107.869 35.728 C 104.236 35.087 100.283 37.224 98.788 40.536 C 97.612 43.1 98.254 45.451 98.467 46.305 Z",style:"transform-origin: 122.948px 117.753px;"}]}},ni={default:{a:{role:"img",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},title:[{}],path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"},{d:"M13.5 6.5l4 4"}]}};const Zt=Object.freeze(Object.defineProperty({__proto__:null,Clipboard:ti,Motherduck:si,Pencil:ni},Symbol.toStringTag,{value:"Module"}));function li(l){const e=JSON.parse(l);return e.data&&(e.data=Vl(e.data)),e}function xt(l){return HTMLElement.prototype.cloneNode.call(l)}function ii(l,e=()=>{}){const t=async({action:n,result:i,reset:r=!0,invalidateAll:o=!0})=>{i.type==="success"&&(r&&HTMLFormElement.prototype.reset.call(l),o&&await Bl()),(location.origin+location.pathname===n.origin+n.pathname||i.type==="redirect"||i.type==="error")&&Hl(i)};async function s(n){var k,v,w,C,E;if(((k=n.submitter)!=null&&k.hasAttribute("formmethod")?n.submitter.formMethod:xt(l).method)!=="post")return;n.preventDefault();const r=new URL((v=n.submitter)!=null&&v.hasAttribute("formaction")?n.submitter.formAction:xt(l).action),o=(w=n.submitter)!=null&&w.hasAttribute("formenctype")?n.submitter.formEnctype:xt(l).enctype,a=new FormData(l),c=(C=n.submitter)==null?void 0:C.getAttribute("name");c&&a.append(c,((E=n.submitter)==null?void 0:E.getAttribute("value"))??"");const u=new AbortController;let f=!1;const p=await e({action:r,cancel:()=>f=!0,controller:u,formData:a,formElement:l,submitter:n.submitter})??t;if(f)return;let g;try{const A=new Headers({accept:"application/json","x-sveltekit-action":"true"});o!=="multipart/form-data"&&A.set("Content-Type",/^(:?application\/x-www-form-urlencoded|text\/plain)$/.test(o)?o:"application/x-www-form-urlencoded");const j=o==="multipart/form-data"?a:new URLSearchParams(a),$=await fetch(r,{method:"POST",headers:A,cache:"no-store",body:j,signal:u.signal});g=li(await $.text()),g.type==="error"&&(g.status=$.status)}catch(A){if((A==null?void 0:A.name)==="AbortError")return;g={type:"error",error:A}}p({action:r,formData:a,formElement:l,update:A=>t({action:r,result:g,reset:A==null?void 0:A.reset,invalidateAll:A==null?void 0:A.invalidateAll}),result:g})}return HTMLFormElement.prototype.addEventListener.call(l,"submit",s),{destroy(){HTMLFormElement.prototype.removeEventListener.call(l,"submit",s)}}}const ht={collection:"map",default:!0,nodeClass:Qe,tag:"tag:yaml.org,2002:map",resolve(l,e){return Cn(l)||e("Expected a mapping for this tag"),l},createNode:(l,e,t)=>Qe.from(l,e,t)},mt={collection:"seq",default:!0,nodeClass:ot,tag:"tag:yaml.org,2002:seq",resolve(l,e){return $n(l)||e("Expected a sequence for this tag"),l},createNode:(l,e,t)=>ot.from(l,e,t)},Mt={identify:l=>typeof l=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:l=>l,stringify(l,e,t,s){return e=Object.assign({actualString:!0},e),Tn(l,e,t,s)}},qt={identify:l=>l==null,createNode:()=>new Le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Le(null),stringify:({source:l},e)=>typeof l=="string"&&qt.test.test(l)?l:e.options.nullStr},as={identify:l=>typeof l=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:l=>new Le(l[0]==="t"||l[0]==="T"),stringify({source:l,value:e},t){if(l&&as.test.test(l)){const s=l[0]==="t"||l[0]==="T";if(e===s)return l}return e?t.options.trueStr:t.options.falseStr}};function qe({format:l,minFractionDigits:e,tag:t,value:s}){if(typeof s=="bigint")return String(s);const n=typeof s=="number"?s:Number(s);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let i=JSON.stringify(s);if(!l&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let r=i.indexOf(".");r<0&&(r=i.length,i+=".");let o=e-(i.length-r-1);for(;o-- >0;)i+="0"}return i}const Mn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:l=>l.slice(-3).toLowerCase()==="nan"?NaN:l[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:qe},qn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:l=>parseFloat(l),stringify(l){const e=Number(l.value);return isFinite(e)?e.toExponential():qe(l)}},Fn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(l){const e=new Le(parseFloat(l)),t=l.indexOf(".");return t!==-1&&l[l.length-1]==="0"&&(e.minFractionDigits=l.length-t-1),e},stringify:qe},Ft=l=>typeof l=="bigint"||Number.isInteger(l),cs=(l,e,t,{intAsBigInt:s})=>s?BigInt(l):parseInt(l.substring(e),t);function Vn(l,e,t){const{value:s}=l;return Ft(s)&&s>=0?t+s.toString(e):qe(l)}const Bn={identify:l=>Ft(l)&&l>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(l,e,t)=>cs(l,2,8,t),stringify:l=>Vn(l,8,"0o")},Hn={identify:Ft,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(l,e,t)=>cs(l,0,10,t),stringify:qe},Rn={identify:l=>Ft(l)&&l>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(l,e,t)=>cs(l,2,16,t),stringify:l=>Vn(l,16,"0x")},ri=[ht,mt,Mt,qt,as,Bn,Hn,Rn,Mn,qn,Fn];function Is(l){return typeof l=="bigint"||Number.isInteger(l)}const At=({value:l})=>JSON.stringify(l),oi=[{identify:l=>typeof l=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:l=>l,stringify:At},{identify:l=>l==null,createNode:()=>new Le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:At},{identify:l=>typeof l=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:l=>l==="true",stringify:At},{identify:Is,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(l,e,{intAsBigInt:t})=>t?BigInt(l):parseInt(l,10),stringify:({value:l})=>Is(l)?l.toString():JSON.stringify(l)},{identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:l=>parseFloat(l),stringify:At}],ai={default:!0,tag:"",test:/^/,resolve(l,e){return e(`Unresolved plain scalar ${JSON.stringify(l)}`),l}},ci=[ht,mt].concat(oi,ai),us={identify:l=>l instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(l,e){if(typeof Buffer=="function")return Buffer.from(l,"base64");if(typeof atob=="function"){const t=atob(l.replace(/[\n\r]/g,"")),s=new Uint8Array(t.length);for(let n=0;nl===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Le(!0),stringify:Un},xn={identify:l=>l===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Le(!1),stringify:Un},ui={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:l=>l.slice(-3).toLowerCase()==="nan"?NaN:l[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:qe},fi={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:l=>parseFloat(l.replace(/_/g,"")),stringify(l){const e=Number(l.value);return isFinite(e)?e.toExponential():qe(l)}},di={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(l){const e=new Le(parseFloat(l.replace(/_/g,""))),t=l.indexOf(".");if(t!==-1){const s=l.substring(t+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:qe},Et=l=>typeof l=="bigint"||Number.isInteger(l);function Vt(l,e,t,{intAsBigInt:s}){const n=l[0];if((n==="-"||n==="+")&&(e+=1),l=l.substring(e).replace(/_/g,""),s){switch(t){case 2:l=`0b${l}`;break;case 8:l=`0o${l}`;break;case 16:l=`0x${l}`;break}const r=BigInt(l);return n==="-"?BigInt(-1)*r:r}const i=parseInt(l,t);return n==="-"?-1*i:i}function fs(l,e,t){const{value:s}=l;if(Et(s)){const n=s.toString(e);return s<0?"-"+t+n.substr(1):t+n}return qe(l)}const hi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(l,e,t)=>Vt(l,2,2,t),stringify:l=>fs(l,2,"0b")},mi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(l,e,t)=>Vt(l,1,8,t),stringify:l=>fs(l,8,"0")},pi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(l,e,t)=>Vt(l,0,10,t),stringify:qe},gi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(l,e,t)=>Vt(l,2,16,t),stringify:l=>fs(l,16,"0x")};function ds(l,e){const t=l[0],s=t==="-"||t==="+"?l.substring(1):l,n=r=>e?BigInt(r):Number(r),i=s.replace(/_/g,"").split(":").reduce((r,o)=>r*n(60)+n(o),n(0));return t==="-"?n(-1)*i:i}function Gn(l){let{value:e}=l,t=r=>r;if(typeof e=="bigint")t=r=>BigInt(r);else if(isNaN(e)||!isFinite(e))return qe(l);let s="";e<0&&(s="-",e*=t(-1));const n=t(60),i=[e%n];return e<60?i.unshift(0):(e=(e-i[0])/n,i.unshift(e%n),e>=60&&(e=(e-i[0])/n,i.unshift(e))),s+i.map(r=>String(r).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Yn={identify:l=>typeof l=="bigint"||Number.isInteger(l),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(l,e,{intAsBigInt:t})=>ds(l,t),stringify:Gn},zn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:l=>ds(l,!1),stringify:Gn},Bt={identify:l=>l instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(l){const e=l.match(Bt.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,s,n,i,r,o]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0;let c=Date.UTC(t,s-1,n,i||0,r||0,o||0,a);const u=e[8];if(u&&u!=="Z"){let f=ds(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:l})=>l.toISOString().replace(/(T00:00:00)?\.000Z$/,"")},Ns=[ht,mt,Mt,qt,Kn,xn,hi,mi,pi,gi,ui,fi,di,us,rt,ss,ns,ls,Yn,zn,Bt],As=new Map([["core",ri],["failsafe",[ht,mt,Mt]],["json",ci],["yaml11",Ns],["yaml-1.1",Ns]]),Ls={binary:us,bool:as,float:Fn,floatExp:qn,floatNaN:Mn,floatTime:zn,int:Hn,intHex:Rn,intOct:Bn,intTime:Yn,map:ht,merge:rt,null:qt,omap:ss,pairs:ns,seq:mt,set:ls,timestamp:Bt},_i={"tag:yaml.org,2002:binary":us,"tag:yaml.org,2002:merge":rt,"tag:yaml.org,2002:omap":ss,"tag:yaml.org,2002:pairs":ns,"tag:yaml.org,2002:set":ls,"tag:yaml.org,2002:timestamp":Bt};function Gt(l,e,t){const s=As.get(e);if(s&&!l)return t&&!s.includes(rt)?s.concat(rt):s.slice();let n=s;if(!n)if(Array.isArray(l))n=[];else{const i=Array.from(As.keys()).filter(r=>r!=="yaml11").map(r=>JSON.stringify(r)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(l))for(const i of l)n=n.concat(i);else typeof l=="function"&&(n=l(n.slice()));return t&&(n=n.concat(rt)),n.reduce((i,r)=>{const o=typeof r=="string"?Ls[r]:r;if(!o){const a=JSON.stringify(r),c=Object.keys(Ls).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${a}; use one of ${c}`)}return i.includes(o)||i.push(o),i},[])}const vi=(l,e)=>l.keye.key?1:0;class Ht{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:n,schema:i,sortMapEntries:r,toStringDefaults:o}){this.compat=Array.isArray(e)?Gt(e,"compat"):e?Gt(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=n?_i:{},this.tags=Gt(t,this.name,s),this.toStringOptions=o??null,Object.defineProperty(this,al,{value:ht}),Object.defineProperty(this,et,{value:Mt}),Object.defineProperty(this,cl,{value:mt}),this.sortMapEntries=typeof r=="function"?r:r===!0?vi:null}clone(){const e=Object.create(Ht.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function bi(l,e){var a;const t=[];let s=e.directives===!0;if(e.directives!==!1&&l.directives){const c=l.directives.toString(l);c?(t.push(c),s=!0):l.directives.docStart&&(s=!0)}s&&t.push("---");const n=ul(l,e),{commentString:i}=n.options;if(l.commentBefore){t.length!==1&&t.unshift("");const c=i(l.commentBefore);t.unshift(It(c,""))}let r=!1,o=null;if(l.contents){if(Dt(l.contents)){if(l.contents.spaceBefore&&s&&t.push(""),l.contents.commentBefore){const f=i(l.contents.commentBefore);t.push(It(f,""))}n.forceBlockIndent=!!l.comment,o=l.contents.comment}const c=o?void 0:()=>r=!0;let u=bs(l.contents,n,()=>o=null,c);o&&(u+=fl(u,"",i(o))),(u[0]==="|"||u[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${u}`:t.push(u)}else t.push(bs(l.contents,n));if((a=l.directives)!=null&&a.docEnd)if(l.comment){const c=i(l.comment);c.includes(` +`)?(t.push("..."),t.push(It(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=l.comment;c&&r&&(c=c.replace(/^\n+/,"")),c&&((!r||o)&&t[t.length-1]!==""&&t.push(""),t.push(It(i(c),"")))}return t.join(` +`)+` +`}class pt{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ys,{value:ks});let n=null;typeof t=="function"||Array.isArray(t)?n=t:s===void 0&&t&&(s=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=i;let{version:r}=i;s!=null&&s._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(r=this.directives.yaml.version)):this.directives=new Ot({version:r}),this.setSchema(r,s),this.contents=e===void 0?null:this.createNode(e,n,s)}clone(){const e=Object.create(pt.prototype,{[ys]:{value:ks}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Dt(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){st(this.contents)&&this.contents.add(e)}addIn(e,t){st(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const s=dl(this);e.anchor=!t||s.has(t)?hl(t||"a",s):t}return new is(e.anchor)}createNode(e,t,s){let n;if(typeof t=="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const v=C=>typeof C=="number"||C instanceof String||C instanceof Number,w=t.filter(v).map(String);w.length>0&&(t=t.concat(w)),n=t}else s===void 0&&t&&(s=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:r,flow:o,keepUndefined:a,onTagObj:c,tag:u}=s??{},{onAnchor:f,setAnchors:d,sourceObjects:p}=_l(this,r||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:a??!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:p},k=ml(e,u,g);return o&&Ge(k)&&(k.flow=!0),d(),k}createPair(e,t,s={}){const n=this.createNode(e,null,s),i=this.createNode(t,null,s);return new wt(n,i)}delete(e){return st(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Nt(e)?this.contents==null?!1:(this.contents=null,!0):st(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Ge(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Nt(e)?!t&&at(this.contents)?this.contents.value:this.contents:Ge(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Ge(this.contents)?this.contents.has(e):!1}hasIn(e){return Nt(e)?this.contents!==void 0:Ge(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=ws(this.schema,[e],t):st(this.contents)&&this.contents.set(e,t)}setIn(e,t){Nt(e)?this.contents=t:this.contents==null?this.contents=ws(this.schema,Array.from(e),t):st(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Ot({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Ot({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(s)this.schema=new Ht(Object.assign(s,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:n,onAnchor:i,reviver:r}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=pl(this.contents,t??"",o);if(typeof i=="function")for(const{count:c,res:u}of o.anchors.values())i(u,c);return typeof r=="function"?gl(r,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return bi(this,e)}}function st(l){if(Ge(l))return!0;throw new Error("Expected a YAML collection as document contents")}function dt(l,{flow:e,indicator:t,next:s,offset:n,onError:i,parentIndent:r,startOnNewline:o}){let a=!1,c=o,u=o,f="",d="",p=!1,g=!1,k=null,v=null,w=null,C=null,E=null,A=null,j=null;for(const L of l)switch(g&&(L.type!=="space"&&L.type!=="newline"&&L.type!=="comma"&&i(L.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),k&&(c&&L.type!=="comment"&&L.type!=="newline"&&i(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),k=null),L.type){case"space":!e&&(t!=="doc-start"||(s==null?void 0:s.type)!=="flow-collection")&&L.source.includes(" ")&&(k=L),u=!0;break;case"comment":{u||i(L,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const V=L.source.substring(1)||" ";f?f+=d+V:f=V,d="",c=!1;break}case"newline":c?f?f+=L.source:a=!0:d+=L.source,c=!0,p=!0,(v||w)&&(C=L),u=!0;break;case"anchor":v&&i(L,"MULTIPLE_ANCHORS","A node can have at most one anchor"),L.source.endsWith(":")&&i(L.offset+L.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=L,j===null&&(j=L.offset),c=!1,u=!1,g=!0;break;case"tag":{w&&i(L,"MULTIPLE_TAGS","A node can have at most one tag"),w=L,j===null&&(j=L.offset),c=!1,u=!1,g=!0;break}case t:(v||w)&&i(L,"BAD_PROP_ORDER",`Anchors and tags must be after the ${L.source} indicator`),A&&i(L,"UNEXPECTED_TOKEN",`Unexpected ${L.source} in ${e??"collection"}`),A=L,c=t==="seq-item-ind"||t==="explicit-key-ind",u=!1;break;case"comma":if(e){E&&i(L,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),E=L,c=!1,u=!1;break}default:i(L,"UNEXPECTED_TOKEN",`Unexpected ${L.type} token`),c=!1,u=!1}const $=l[l.length-1],R=$?$.offset+$.source.length:n;return g&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&i(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),k&&(c&&k.indent<=r||(s==null?void 0:s.type)==="block-map"||(s==null?void 0:s.type)==="block-seq")&&i(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:E,found:A,spaceBefore:a,comment:f,hasNewline:p,anchor:v,tag:w,newlineAfterProp:C,end:R,start:j??R}}function Ct(l){if(!l)return null;switch(l.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(l.source.includes(` +`))return!0;if(l.end){for(const e of l.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of l.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(Ct(e.key)||Ct(e.value))return!0}return!1;default:return!0}}function Qt(l,e,t){if((e==null?void 0:e.type)==="flow-collection"){const s=e.end[0];s.indent===l&&(s.source==="]"||s.source==="}")&&Ct(e)&&t(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Jn(l,e,t){const{uniqueKeys:s}=l.options;if(s===!1)return!1;const n=typeof s=="function"?s:(i,r)=>i===r||at(i)&&at(r)&&i.value===r.value;return e.some(i=>n(i.key,t))}const Os="All mapping items must start at the same column";function yi({composeNode:l,composeEmptyNode:e},t,s,n,i){var u;const r=(i==null?void 0:i.nodeClass)??Qe,o=new r(t.schema);t.atRoot&&(t.atRoot=!1);let a=s.offset,c=null;for(const f of s.items){const{start:d,key:p,sep:g,value:k}=f,v=dt(d,{indicator:"explicit-key-ind",next:p??(g==null?void 0:g[0]),offset:a,onError:n,parentIndent:s.indent,startOnNewline:!0}),w=!v.found;if(w){if(p&&(p.type==="block-seq"?n(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==s.indent&&n(a,"BAD_INDENT",Os)),!v.anchor&&!v.tag&&!g){c=v.end,v.comment&&(o.comment?o.comment+=` +`+v.comment:o.comment=v.comment);continue}(v.newlineAfterProp||Ct(p))&&n(p??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((u=v.found)==null?void 0:u.indent)!==s.indent&&n(a,"BAD_INDENT",Os);t.atKey=!0;const C=v.end,E=p?l(t,p,v,n):e(t,C,d,null,v,n);t.schema.compat&&Qt(s.indent,p,n),t.atKey=!1,Jn(t,o.items,E)&&n(C,"DUPLICATE_KEY","Map keys must be unique");const A=dt(g??[],{indicator:"map-value-ind",next:k,offset:E.range[2],onError:n,parentIndent:s.indent,startOnNewline:!p||p.type==="block-scalar"});if(a=A.end,A.found){w&&((k==null?void 0:k.type)==="block-map"&&!A.hasNewline&&n(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&v.startl&&(l.type==="block-map"||l.type==="block-seq");function wi({composeNode:l,composeEmptyNode:e},t,s,n,i){const r=s.start.source==="{",o=r?"flow map":"flow sequence",a=(i==null?void 0:i.nodeClass)??(r?Qe:ot),c=new a(t.schema);c.flow=!0;const u=t.atRoot;u&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=s.offset+s.start.source.length;for(let v=0;v0){const v=jt(g,k,t.options.strict,n);v.comment&&(c.comment?c.comment+=` +`+v.comment:c.comment=v.comment),c.range=[s.offset,k,v.offset]}else c.range=[s.offset,k,k];return c}function Jt(l,e,t,s,n,i){const r=t.type==="block-map"?yi(l,e,t,s,i):t.type==="block-seq"?ki(l,e,t,s,i):wi(l,e,t,s,i),o=r.constructor;return n==="!"||n===o.tagName?(r.tag=o.tagName,r):(n&&(r.tag=n),r)}function Ci(l,e,t,s,n){var d;const i=s.tag,r=i?e.directives.tagName(i.source,p=>n(i,"TAG_RESOLVE_FAILED",p)):null;if(t.type==="block-seq"){const{anchor:p,newlineAfterProp:g}=s,k=p&&i?p.offset>i.offset?p:i:p??i;k&&(!g||g.offsetp.tag===r&&p.collection===o);if(!a){const p=e.schema.knownTags[r];if(p&&p.collection===o)e.schema.tags.push(Object.assign({},p,{default:!1})),a=p;else return p!=null&&p.collection?n(i,"BAD_COLLECTION_TYPE",`${p.tag} used for ${o} collection, but expects ${p.collection}`,!0):n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,!0),Jt(l,e,t,n,r)}const c=Jt(l,e,t,n,r,a),u=((d=a.resolve)==null?void 0:d.call(a,c,p=>n(i,"TAG_RESOLVE_FAILED",p),e.options))??c,f=Dt(u)?u:new Le(u);return f.range=c.range,f.tag=r,a!=null&&a.format&&(f.format=a.format),f}function Xn(l,e,t,s){const{value:n,type:i,comment:r,range:o}=e.type==="block-scalar"?vl(l,e,s):bl(e,l.options.strict,s),a=t?l.directives.tagName(t.source,f=>s(t,"TAG_RESOLVE_FAILED",f)):null;let c;l.options.stringKeys&&l.atKey?c=l.schema[et]:a?c=$i(l.schema,n,a,t,s):e.type==="scalar"?c=Ti(l,n,e,s):c=l.schema[et];let u;try{const f=c.resolve(n,d=>s(t??e,"TAG_RESOLVE_FAILED",d),l.options);u=at(f)?f:new Le(f)}catch(f){const d=f instanceof Error?f.message:String(f);s(t??e,"TAG_RESOLVE_FAILED",d),u=new Le(n)}return u.range=o,u.source=n,i&&(u.type=i),a&&(u.tag=a),c.format&&(u.format=c.format),r&&(u.comment=r),u}function $i(l,e,t,s,n){var o;if(t==="!")return l[et];const i=[];for(const a of l.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)i.push(a);else return a;for(const a of i)if((o=a.test)!=null&&o.test(e))return a;const r=l.knownTags[t];return r&&!r.collection?(l.tags.push(Object.assign({},r,{default:!1,test:void 0})),r):(n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),l[et])}function Ti({atKey:l,directives:e,schema:t},s,n,i){const r=t.tags.find(o=>{var a;return(o.default===!0||l&&o.default==="key")&&((a=o.test)==null?void 0:a.test(s))})||t[et];if(t.compat){const o=t.compat.find(a=>{var c;return a.default&&((c=a.test)==null?void 0:c.test(s))})??t[et];if(r.tag!==o.tag){const a=e.tagString(r.tag),c=e.tagString(o.tag),u=`Value may be parsed as either ${a} or ${c}`;i(n,"TAG_RESOLVE_FAILED",u,!0)}}return r}function Ei(l,e,t){if(e){t===null&&(t=e.length);for(let s=t-1;s>=0;--s){let n=e[s];switch(n.type){case"space":case"comment":case"newline":l-=n.source.length;continue}for(n=e[++s];(n==null?void 0:n.type)==="space";)l+=n.source.length,n=e[++s];break}}return l}const Si={composeNode:Wn,composeEmptyNode:hs};function Wn(l,e,t,s){const n=l.atKey,{spaceBefore:i,comment:r,anchor:o,tag:a}=t;let c,u=!0;switch(e.type){case"alias":c=Ii(l,e,s),(o||a)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Xn(l,e,a,s),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=Ci(Si,l,e,t,s),o&&(c.anchor=o.source.substring(1));break;default:{const f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",f),c=hs(l,e.offset,void 0,null,t,s),u=!1}}return o&&c.anchor===""&&s(o,"BAD_ALIAS","Anchor cannot be an empty string"),n&&l.options.stringKeys&&(!at(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&s(a??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),r&&(e.type==="scalar"&&e.source===""?c.comment=r:c.commentBefore=r),l.options.keepSourceTokens&&u&&(c.srcToken=e),c}function hs(l,e,t,s,{spaceBefore:n,comment:i,anchor:r,tag:o,end:a},c){const u={type:"scalar",offset:Ei(e,t,s),indent:-1,source:""},f=Xn(l,u,o,c);return r&&(f.anchor=r.source.substring(1),f.anchor===""&&c(r,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),i&&(f.comment=i,f.range[2]=a),f}function Ii({options:l},{offset:e,source:t,end:s},n){const i=new is(t.substring(1));i.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&n(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const r=e+t.length,o=jt(s,r,l.strict,n);return i.range=[e,r,o.offset],o.comment&&(i.comment=o.comment),i}function Ni(l,e,{offset:t,start:s,value:n,end:i},r){const o=Object.assign({_directives:e},l),a=new pt(void 0,o),c={atKey:!1,atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},u=dt(s,{indicator:"doc-start",next:n??(i==null?void 0:i[0]),offset:t,onError:r,parentIndent:0,startOnNewline:!0});u.found&&(a.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&r(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=n?Wn(c,n,u,r):hs(c,u.end,s,null,u,r);const f=a.contents.range[2],d=jt(i,f,!1,r);return d.comment&&(a.comment=d.comment),a.range=[t,f,d.offset],a}function bt(l){if(typeof l=="number")return[l,l+1];if(Array.isArray(l))return l.length===2?l:[l[0],l[1]];const{offset:e,source:t}=l;return[e,e+(typeof t=="string"?t.length:1)]}function Ps(l){var n;let e="",t=!1,s=!1;for(let i=0;i{const r=bt(t);i?this.warnings.push(new En(r,s,n)):this.errors.push(new lt(r,s,n))},this.directives=new Ot({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:s,afterEmptyLine:n}=Ps(this.prelude);if(s){const i=e.contents;if(t)e.comment=e.comment?`${e.comment} +${s}`:s;else if(n||e.directives.docStart||!i)e.commentBefore=s;else if(Ge(i)&&!i.flow&&i.items.length>0){let r=i.items[0];rs(r)&&(r=r.key);const o=r.commentBefore;r.commentBefore=o?`${s} +${o}`:s}else{const r=i.commentBefore;i.commentBefore=r?`${s} +${r}`:s}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Ps(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(const n of e)yield*this.next(n);yield*this.end(t,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,s,n)=>{const i=bt(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",s,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=Ni(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new lt(bt(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const s="Unexpected doc-end without preceding document";this.errors.push(new lt(bt(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const t=jt(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const s=this.doc.comment;this.doc.comment=s?`${s} +${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new lt(bt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const s=Object.assign({_directives:this.directives},this.options),n=new pt(void 0,s);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}}class Zn{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,s=this.lineStarts.length;for(;t>1;this.lineStarts[i]=0;)switch(l[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=l[++e])==null?void 0:t.type)==="space";);return l.splice(e,l.length)}function js(l){if(l.start.type==="flow-seq-start")for(const e of l.items)e.sep&&!e.value&&!Je(e.start,"explicit-key-ind")&&!Je(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Qn(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class ps{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Sn,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(e,t))yield*this.next(s);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=yl(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{const s=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in s?s.indent:0:t.type==="flow-collection"&&s.type==="document"&&(t.indent=0),t.type==="flow-collection"&&js(t),s.type){case"document":s.value=t;break;case"block-scalar":s.props.push(t);break;case"block-map":{const n=s.items[s.items.length-1];if(n.value){s.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{const n=s.items[s.items.length-1];n.value?s.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=s.items[s.items.length-1];!n||n.value?s.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&Ds(n.start)===-1&&(t.indent===0||n.start.every(i=>i.type!=="comment"||i.indent=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let r=[];if(i&&t.sep&&!t.value){const o=[];for(let a=0;ae.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Je(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(Qn(t.key)&&!Je(t.sep,"newline")){const o=nt(t.start),a=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:c}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(Je(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const o=nt(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):Je(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);i||t.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(e);if(o){n&&o.type!=="block-seq"&&e.items.push({start:r}),this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var s;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,i=Array.isArray(n)?n[n.length-1]:void 0;(i==null?void 0:i.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],i=(s=n==null?void 0:n.value)==null?void 0:s.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Je(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s&&s.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{const s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){const n=Lt(s),i=nt(n);js(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(` +`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(` +`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=Lt(e),s=nt(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=Lt(e),s=nt(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function el(l){const e=l.prettyErrors!==!1;return{lineCounter:l.lineCounter||e&&new Zn||null,prettyErrors:e}}function Ai(l,e={}){const{lineCounter:t,prettyErrors:s}=el(e),n=new ps(t==null?void 0:t.addNewLine),i=new ms(e),r=Array.from(i.compose(n.parse(l)));if(s&&t)for(const o of r)o.errors.forEach(Pt(l,t)),o.warnings.forEach(Pt(l,t));return r.length>0?r:Object.assign([],{empty:!0},i.streamInfo())}function tl(l,e={}){const{lineCounter:t,prettyErrors:s}=el(e),n=new ps(t==null?void 0:t.addNewLine),i=new ms(e);let r=null;for(const o of i.compose(n.parse(l),!0,l.length))if(!r)r=o;else if(r.options.logLevel!=="silent"){r.errors.push(new lt(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&t&&(r.errors.forEach(Pt(l,t)),r.warnings.forEach(Pt(l,t))),r}function Li(l,e,t){let s;typeof e=="function"?s=e:t===void 0&&e&&typeof e=="object"&&(t=e);const n=tl(l,t);if(!n)return null;if(n.warnings.forEach(i=>kl(n.options.logLevel,i)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:s},t))}function Oi(l,e,t){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const n=Math.round(t);t=n<1?void 0:n>8?{indent:8}:{indent:n}}if(l===void 0){const{keepUndefined:n}=t??e??{};if(!n)return}return In(l)&&!s?l.toString(t):new pt(l,s,t).toString(t)}const Ms=Object.freeze(Object.defineProperty({__proto__:null,Alias:is,CST:wl,Composer:ms,Document:pt,Lexer:Sn,LineCounter:Zn,Pair:wt,Parser:ps,Scalar:Le,Schema:Ht,YAMLError:Cl,YAMLMap:Qe,YAMLParseError:lt,YAMLSeq:ot,YAMLWarning:En,isAlias:$l,isCollection:Ge,isDocument:In,isMap:Cn,isNode:Dt,isPair:rs,isScalar:at,isSeq:$n,parse:Li,parseAllDocuments:Ai,parseDocument:tl,stringify:Oi,visit:Tl,visitAsync:El},Symbol.toStringTag,{value:"Module"}));function qs(l,e,t){const s=l.slice();return s[23]=e[t],s}function Fs(l){let e,t;return e=new Nn({props:{$$slots:{default:[Pi]},$$scope:{ctx:l}}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p(s,n){const i={};n&67108865&&(i.$$scope={dirty:n,ctx:s}),e.$set(i)},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function Pi(l){let e=l[0].description+"",t;return{c(){t=Z(e)},l(s){t=Q(s,e)},m(s,n){N(s,t,n)},p(s,n){n&1&&e!==(e=s[0].description+"")&&he(t,e)},d(s){s&&h(t)}}}function Vs(l){let e,t="*";return{c(){e=b("sup"),e.textContent=t,this.h()},l(s){e=y(s,"SUP",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-3dq1r8"&&(e.textContent=t),this.h()},h(){_(e,"class","text-negative")},m(s,n){N(s,e,n)},d(s){s&&h(e)}}}function Di(l){let e,t,s;return{c(){e=b("input"),this.h()},l(n){e=y(n,"INPUT",{type:!0,class:!0}),this.h()},h(){e.disabled=l[6],_(e,"type","file"),_(e,"class","svelte-11j8m88")},m(n,i){N(n,e,i),t||(s=de(e,"change",l[8]),t=!0)},p(n,i){i&64&&(e.disabled=n[6])},d(n){n&&h(e),t=!1,s()}}}function ji(l){let e,t,s,n,i,r=pe(l[0].options),o=[];for(let a=0;al[20].call(e))},m(a,c){N(a,e,c),m(e,t);for(let u=0;uZe(t,"options",i)),{c(){e=b("section"),Y(t.$$.fragment),this.h()},l(a){e=y(a,"SECTION",{class:!0});var c=D(e);X(t.$$.fragment,c),c.forEach(h),this.h()},h(){_(e,"class","ml-4 flex flex-col gap-2 mt-2")},m(a,c){N(a,e,c),z(t,e,null),n=!0},p(a,c){var f;const u={};c&2&&(u.rootOptions=a[1]),c&4&&(u.reveal=a[2]),c&64&&(u.disabled=a[6]),c&17&&(u.optionSpec=(f=a[0].children)==null?void 0:f[a[4]]),!s&&c&8&&(s=!0,u.options=a[3],We(()=>s=!1)),t.$set(u)},i(a){n||(F(t.$$.fragment,a),n=!0)},o(a){H(t.$$.fragment,a),n=!1},d(a){a&&h(e),J(t)}}}function Ki(l){var R,L;let e,t,s,n,i,r,o,a,c,u,f,d,p,g,k=Object.keys(((L=(R=l[0])==null?void 0:R.children)==null?void 0:L[l[4]])??{}).length,v,w=l[0].description&&Fs(l),C=l[0].required&&Vs();function E(V,S){if(S&1&&(p=null),V[0].type==="string")return Vi;if(V[0].type==="multiline")return Fi;if(V[0].type==="boolean")return qi;if(V[0].type==="number")return Mi;if(p==null&&(p=!!(V[0].type==="select"&&Array.isArray(V[0].options))),p)return ji;if(V[0].type==="file")return Di}let A=E(l,-1),j=A&&A(l),$=k&&Hs(l);return{c(){e=b("div"),t=b("label"),s=b("div"),n=b("p"),w&&w.c(),i=M(),r=b("span"),o=Z(l[7]),a=M(),C&&C.c(),c=M(),u=b("p"),f=Z(l[5]),d=M(),j&&j.c(),g=M(),$&&$.c(),this.h()},l(V){e=y(V,"DIV",{class:!0});var S=D(e);t=y(S,"LABEL",{class:!0});var I=D(t);s=y(I,"DIV",{class:!0});var O=D(s);n=y(O,"P",{class:!0});var P=D(n);w&&w.l(P),i=q(P),r=y(P,"SPAN",{});var T=D(r);o=Q(T,l[7]),a=q(T),C&&C.l(T),T.forEach(h),P.forEach(h),c=q(O),u=y(O,"P",{class:!0});var B=D(u);f=Q(B,l[5]),B.forEach(h),O.forEach(h),d=q(I),j&&j.l(I),I.forEach(h),g=q(S),$&&$.l(S),S.forEach(h),this.h()},h(){_(n,"class","flex items-center gap-1"),_(u,"class","text-negative text-xs font-bold"),_(s,"class","mr-2 inline-flex flex-col gap-1"),_(t,"class","flex justify-between w-full items-start"),Fe(t,"h-11",l[0].type!=="multiline"),Fe(t,"h-auto",l[0].type==="multiline"),_(e,"class","w-full")},m(V,S){N(V,e,S),m(e,t),m(t,s),m(s,n),w&&w.m(n,null),m(n,i),m(n,r),m(r,o),m(r,a),C&&C.m(r,null),m(s,c),m(s,u),m(u,f),m(t,d),j&&j.m(t,null),m(e,g),$&&$.m(e,null),v=!0},p(V,[S]){var I,O;V[0].description?w?(w.p(V,S),S&1&&F(w,1)):(w=Fs(V),w.c(),F(w,1),w.m(n,i)):w&&(_e(),H(w,1,1,()=>{w=null}),ve()),(!v||S&128)&&he(o,V[7]),V[0].required?C||(C=Vs(),C.c(),C.m(r,null)):C&&(C.d(1),C=null),(!v||S&32)&&he(f,V[5]),A===(A=E(V,S))&&j?j.p(V,S):(j&&j.d(1),j=A&&A(V),j&&(j.c(),j.m(t,null))),(!v||S&1)&&Fe(t,"h-11",V[0].type!=="multiline"),(!v||S&1)&&Fe(t,"h-auto",V[0].type==="multiline"),S&17&&(k=Object.keys(((O=(I=V[0])==null?void 0:I.children)==null?void 0:O[V[4]])??{}).length),k?$?($.p(V,S),S&17&&F($,1)):($=Hs(V),$.c(),F($,1),$.m(e,null)):$&&(_e(),H($,1,1,()=>{$=null}),ve())},i(V){v||(F(w),F($),v=!0)},o(V){H(w),H($),v=!1},d(V){V&&h(e),w&&w.d(),C&&C.d(),j&&j.d(),$&&$.d()}}}function xi(l,e,t){let s,n,i,{spec:r}=e,{key:o}=e,{options:a}=e,{disabled:c}=e,{rootOptions:u}=e,{reveal:f}=e;const d=`_${o}`;let p,g;r.children?r.nest?(p=d,g=a[o]??{}):(p=o,g=a):(p=o,g={});let k=a[p],v={};async function w(S){if(!S.target)return;const{files:I}=S.target;if(!I)return;const[O]=I;switch(r.fileFormat){case"json":try{t(9,a[p]=await O.text().then(P=>JSON.parse(P)),a)}catch(P){t(5,C="Failed to parse YAML file"),console.warn(P)}break;case"yaml":try{t(9,a[p]=await O.text().then(P=>Ms.parse(P)),a)}catch(P){t(5,C="Failed to parse JSON file"),console.warn(P)}break;default:{const P=await O.text();try{t(9,a[p]=JSON.parse(P),a);break}catch{}try{t(9,a[p]=Ms.parse(P),a);break}catch{}t(9,a[p]=await O.text(),a);break}}}let C="";function E(){k=this.value,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function A(){k=this.value,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function j(){k=this.value,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function $(){k=this.checked,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function R(){k=bn(this.value),t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function L(){k=$t(this),t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function V(S){g=S,t(3,g),t(0,r),t(4,k),t(10,o),t(9,a),t(13,v),t(12,p),t(14,n),t(1,u)}return l.$$set=S=>{"spec"in S&&t(0,r=S.spec),"key"in S&&t(10,o=S.key),"options"in S&&t(9,a=S.options),"disabled"in S&&t(11,c=S.disabled),"rootOptions"in S&&t(1,u=S.rootOptions),"reveal"in S&&t(2,f=S.reveal)},l.$$.update=()=>{var S,I,O;if(l.$$.dirty&1025&&t(7,s=r.title??o),l.$$.dirty&3&&t(14,n=r.references?Sl.query(u,r.references):null),l.$$.dirty&16384&&n!=null&&n.length&&t(4,k=n[0]),l.$$.dirty&13849)if(r!=null&&r.children&&!Object.keys(r.children[k]??{}).length){if(t(9,a[o]=k,a),delete a[d],typeof g=="object")for(const P of Object.keys(v))delete g[P];else console.warn(`child_value_target was unexpectedly not an object ${g}`,{key:o,options:a,spec:r});t(13,v=((S=r==null?void 0:r.children)==null?void 0:S[k])??{})}else(I=r==null?void 0:r.children)!=null&&I[k]&&(r.nest?(t(12,p=d),typeof a[o]!="object"&&t(9,a[o]={},a),t(3,g=a[o])):(t(12,p=o),t(3,g=a)),t(9,a[p]=k,a),t(13,v=((O=r==null?void 0:r.children)==null?void 0:O[k])??{}));l.$$.dirty&4112&&t(9,a[p]=k,a),l.$$.dirty&18433&&t(6,i=c||r.forceReference||r.references&&n!==null)},[r,u,f,g,k,C,i,s,w,a,o,c,p,v,n,E,A,j,$,R,L,V]}class Gi extends ye{constructor(e){super(),ke(this,e,xi,Ki,be,{spec:0,key:10,options:9,disabled:11,rootOptions:1,reveal:2})}}function Rs(l,e,t){const s=l.slice();return s[6]=e[t][0],s[7]=e[t][1],s}function Us(l){let e,t,s;function n(r){l[5](r)}let i={reveal:l[4],disabled:l[2],key:l[6],spec:l[7],rootOptions:l[3]};return l[0]!==void 0&&(i.options=l[0]),e=new Gi({props:i}),Xe.push(()=>Ze(e,"options",n)),{c(){Y(e.$$.fragment)},l(r){X(e.$$.fragment,r)},m(r,o){z(e,r,o),s=!0},p(r,o){const a={};o&16&&(a.reveal=r[4]),o&4&&(a.disabled=r[2]),o&2&&(a.key=r[6]),o&2&&(a.spec=r[7]),o&8&&(a.rootOptions=r[3]),!t&&o&1&&(t=!0,a.options=r[0],We(()=>t=!1)),e.$set(a)},i(r){s||(F(e.$$.fragment,r),s=!0)},o(r){H(e.$$.fragment,r),s=!1},d(r){J(e,r)}}}function Yi(l){let e,t,s=pe(Object.entries(l[1])),n=[];for(let r=0;rH(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;r{"optionSpec"in c&&t(1,s=c.optionSpec),"options"in c&&t(0,n=c.options),"disabled"in c&&t(2,i=c.disabled),"rootOptions"in c&&t(3,r=c.rootOptions),"reveal"in c&&t(4,o=c.reveal)},[n,s,i,r,o,a]}class sl extends ye{constructor(e){super(),ke(this,e,zi,Yi,be,{optionSpec:1,options:0,disabled:2,rootOptions:3,reveal:4})}}function Ji(l){let e,t="Configuration Updated";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-cwyj9v"&&(e.textContent=t),this.h()},h(){_(e,"class","text-positive font-bold text-xs")},m(s,n){N(s,e,n)},p:ee,d(s){s&&h(e)}}}function Xi(l){let e,t;return{c(){e=b("p"),t=Z(l[3]),this.h()},l(s){e=y(s,"P",{class:!0});var n=D(e);t=Q(n,l[3]),n.forEach(h),this.h()},h(){_(e,"class","text-negative font-bold text-xs")},m(s,n){N(s,e,n),m(e,t)},p(s,n){n&8&&he(t,s[3])},d(s){s&&h(e)}}}function Ks(l){let e,t,s,n="Source Options",i,r,o,a;function c(f){l[15](f)}let u={reveal:l[2],disabled:l[4]||l[7],rootOptions:l[0].options,optionSpec:l[1].options};return l[0].options!==void 0&&(u.options=l[0].options),r=new sl({props:u}),Xe.push(()=>Ze(r,"options",c)),{c(){e=b("hr"),t=M(),s=b("h4"),s.textContent=n,i=M(),Y(r.$$.fragment),this.h()},l(f){e=y(f,"HR",{}),t=q(f),s=y(f,"H4",{class:!0,"data-svelte-h":!0}),K(s)!=="svelte-sfnd7i"&&(s.textContent=n),i=q(f),X(r.$$.fragment,f),this.h()},h(){_(s,"class","text-xs uppercase font-bold")},m(f,d){N(f,e,d),N(f,t,d),N(f,s,d),N(f,i,d),z(r,f,d),a=!0},p(f,d){const p={};d&4&&(p.reveal=f[2]),d&144&&(p.disabled=f[4]||f[7]),d&1&&(p.rootOptions=f[0].options),d&2&&(p.optionSpec=f[1].options),!o&&d&1&&(o=!0,p.options=f[0].options,We(()=>o=!1)),r.$set(p)},i(f){a||(F(r.$$.fragment,f),a=!0)},o(f){H(r.$$.fragment,f),a=!1},d(f){f&&(h(e),h(t),h(s),h(i)),J(r,f)}}}function Wi(l){let e,t="Connection Successful!";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-owd79t"&&(e.textContent=t),this.h()},h(){_(e,"class","text-positive font-bold text-xs")},m(s,n){N(s,e,n)},p:ee,d(s){s&&h(e)}}}function Zi(l){let e,t;return{c(){e=b("p"),t=Z(l[6]),this.h()},l(s){e=y(s,"P",{class:!0});var n=D(e);t=Q(n,l[6]),n.forEach(h),this.h()},h(){_(e,"class","text-negative font-bold text-xs")},m(s,n){N(s,e,n),m(e,t)},p(s,n){n&64&&he(t,s[6])},d(s){s&&h(e)}}}function Qi(l){let e=l[7]?"Loading...":"Test Connection",t;return{c(){t=Z(e)},l(s){t=Q(s,e)},m(s,n){N(s,t,n)},p(s,n){n&128&&e!==(e=s[7]?"Loading...":"Test Connection")&&he(t,e)},d(s){s&&h(t)}}}function er(l){let e;return{c(){e=Z("Confirm Changes")},l(t){e=Q(t,"Confirm Changes")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function tr(l){let e,t,s,n=l[0].name+"",i,r,o,a,c,u="Source Info",f,d,p,g,k,v,w,C,E,A,j,$,R,L,V=Object.keys(l[1].options).length,S,I,O,P,T,B,U,W,x,G,se,ne;function $e(te,le){if(te[3])return Xi;if(te[5])return Ji}let Ee=$e(l),ae=Ee&&Ee(l);function Se(te){l[12](te)}function ie(te){l[13](te)}let ue={};l[0].name!==void 0&&(ue.sourceName=l[0].name),l[9]!==void 0&&(ue.nameError=l[9]),d=new Dn({props:ue}),Xe.push(()=>Ze(d,"sourceName",Se)),Xe.push(()=>Ze(d,"nameError",ie));let oe=V&&Ks(l);function we(te,le){if(te[6])return Zi;if(te[8])return Wi}let Ce=we(l),re=Ce&&Ce(l);return U=new ft({props:{outline:!0,size:"md",formaction:"?/testSource",disabled:l[7]||l[4],icon:Il,$$slots:{default:[Qi]},$$scope:{ctx:l}}}),x=new ft({props:{variant:"positive",icon:wn,size:"md",disabled:l[4]||l[7],type:"submit",$$slots:{default:[er]},$$scope:{ctx:l}}}),{c(){e=b("form"),t=b("h3"),s=Z("Configure "),i=Z(n),r=M(),o=b("section"),ae&&ae.c(),a=M(),c=b("h4"),c.textContent=u,f=M(),Y(d.$$.fragment),k=M(),v=b("label"),w=Z(`Source Type + `),C=b("input"),A=M(),j=b("label"),$=Z(`Reveal Secret Values + `),R=b("input"),L=M(),oe&&oe.c(),S=M(),I=b("input"),P=M(),T=b("div"),re&&re.c(),B=M(),Y(U.$$.fragment),W=M(),Y(x.$$.fragment),this.h()},l(te){e=y(te,"FORM",{action:!0,method:!0,class:!0});var le=D(e);t=y(le,"H3",{class:!0});var Ne=D(t);s=Q(Ne,"Configure "),i=Q(Ne,n),Ne.forEach(h),r=q(le),o=y(le,"SECTION",{class:!0});var Te=D(o);ae&&ae.l(Te),a=q(Te),c=y(Te,"H4",{class:!0,"data-svelte-h":!0}),K(c)!=="svelte-1xu9nu4"&&(c.textContent=u),f=q(Te),X(d.$$.fragment,Te),k=q(Te),v=y(Te,"LABEL",{class:!0});var De=D(v);w=Q(De,`Source Type + `),C=y(De,"INPUT",{class:!0}),De.forEach(h),A=q(Te),j=y(Te,"LABEL",{class:!0});var je=D(j);$=Q(je,`Reveal Secret Values + `),R=y(je,"INPUT",{type:!0,class:!0}),je.forEach(h),L=q(Te),oe&&oe.l(Te),Te.forEach(h),S=q(le),I=y(le,"INPUT",{type:!0,name:!0}),P=q(le),T=y(le,"DIV",{class:!0});var Re=D(T);re&&re.l(Re),B=q(Re),X(U.$$.fragment,Re),W=q(Re),X(x.$$.fragment,Re),Re.forEach(h),le.forEach(h),this.h()},h(){_(t,"class","text-sm uppercase font-bold"),_(c,"class","text-xs uppercase font-bold"),C.disabled=!0,C.value=E=l[0].type,_(C,"class","rounded border border-base-300 p-1 ml-auto w-2/3 bg-base-100 align-middle text-sm"),_(v,"class","flex justify-between"),_(R,"type","checkbox"),_(R,"class","rounded border border-base-300 p-1 ml-auto w-5 bg-base-100 align-middle text-sm"),_(j,"class","flex justify-between"),_(o,"class","flex flex-col gap-2"),_(I,"type","hidden"),I.value=O=JSON.stringify(l[0]),_(I,"name","source"),_(T,"class","flex gap-2 justify-end items-center mt-4"),_(e,"action","?/updateSource"),_(e,"method","POST"),_(e,"class","w-full bg-base-200 px-4 py-2 rounded")},m(te,le){N(te,e,le),m(e,t),m(t,s),m(t,i),m(e,r),m(e,o),ae&&ae.m(o,null),m(o,a),m(o,c),m(o,f),z(d,o,null),m(o,k),m(o,v),m(v,w),m(v,C),m(o,A),m(o,j),m(j,$),m(j,R),R.checked=l[2],m(o,L),oe&&oe.m(o,null),m(e,S),m(e,I),m(e,P),m(e,T),re&&re.m(T,null),m(T,B),z(U,T,null),m(T,W),z(x,T,null),G=!0,se||(ne=[de(R,"change",l[14]),nl(ii.call(null,e,l[10]))],se=!0)},p(te,[le]){(!G||le&1)&&n!==(n=te[0].name+"")&&he(i,n),Ee===(Ee=$e(te))&&ae?ae.p(te,le):(ae&&ae.d(1),ae=Ee&&Ee(te),ae&&(ae.c(),ae.m(o,a)));const Ne={};!p&&le&1&&(p=!0,Ne.sourceName=te[0].name,We(()=>p=!1)),!g&&le&512&&(g=!0,Ne.nameError=te[9],We(()=>g=!1)),d.$set(Ne),(!G||le&1&&E!==(E=te[0].type)&&C.value!==E)&&(C.value=E),le&4&&(R.checked=te[2]),le&2&&(V=Object.keys(te[1].options).length),V?oe?(oe.p(te,le),le&2&&F(oe,1)):(oe=Ks(te),oe.c(),F(oe,1),oe.m(o,null)):oe&&(_e(),H(oe,1,1,()=>{oe=null}),ve()),(!G||le&1&&O!==(O=JSON.stringify(te[0])))&&(I.value=O),Ce===(Ce=we(te))&&re?re.p(te,le):(re&&re.d(1),re=Ce&&Ce(te),re&&(re.c(),re.m(T,B)));const Te={};le&144&&(Te.disabled=te[7]||te[4]),le&131200&&(Te.$$scope={dirty:le,ctx:te}),U.$set(Te);const De={};le&144&&(De.disabled=te[4]||te[7]),le&131072&&(De.$$scope={dirty:le,ctx:te}),x.$set(De)},i(te){G||(F(d.$$.fragment,te),F(oe),F(U.$$.fragment,te),F(x.$$.fragment,te),G=!0)},o(te){H(d.$$.fragment,te),H(oe),H(U.$$.fragment,te),H(x.$$.fragment,te),G=!1},d(te){te&&h(e),ae&&ae.d(),J(d),oe&&oe.d(),re&&re.d(),J(U),J(x),se=!1,Ye(ne)}}}function sr(l,e,t){let{sourcePlugin:s}=e,{source:n}=e,{sources:i}=e;const r=vn();let o;n.initialName=n.name;let a="",c=!1,u=!1,f="",d=!1,p=!1,g="";const k=({action:A,cancel:j})=>{if(t(4,c=!1),t(7,d=!1),t(9,g=Pn(n.name,i.filter($=>$!==n))),g){j();return}switch(A.search){case"?/updateSource":t(4,c=!0),t(3,a=""),t(5,u=!1);break;case"?/testSource":t(7,d=!0),t(6,f=""),t(8,p=!1);break}return({result:$,action:R})=>{var L;if($.type==="failure"){if(typeof $.data=="string")t(3,a=$.data);else if(typeof $.data=="object"&&"message"in $.data)switch(R.search){case"?/updateSource":t(3,a=$.data.message);break;case"?/testSource":t(6,f=$.data.message);break}else t(3,a="Error saving datasource.");t(4,c=!1),t(5,u=!1),t(7,d=!1),t(8,p=!1);return}switch(R.search){case"?/updateSource":$.type==="success"&&Object.assign(n,(L=$.data)==null?void 0:L.updatedSource),t(4,c=!1),t(5,u=!0),r("sourceUpdated",n);break;case"?/testSource":$.type==="success"&&t(6,f=""),t(7,d=!1),t(8,p=!0);break}}};function v(A){l.$$.not_equal(n.name,A)&&(n.name=A,t(0,n))}function w(A){g=A,t(9,g)}function C(){o=this.checked,t(2,o)}function E(A){l.$$.not_equal(n.options,A)&&(n.options=A,t(0,n))}return l.$$set=A=>{"sourcePlugin"in A&&t(1,s=A.sourcePlugin),"source"in A&&t(0,n=A.source),"sources"in A&&t(11,i=A.sources)},[n,s,o,a,c,u,f,d,p,g,k,i,v,w,C,E]}class nr extends ye{constructor(e){super(),ke(this,e,sr,tr,be,{sourcePlugin:1,source:0,sources:11})}}function lr(l){let e,t;return e=new Me({props:{src:Al,class:"w-6 h-6"}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p:ee,i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function ir(l){let e,t;return e=new Me({props:{src:Ll,class:"w-6 h-6 text-negative"}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p:ee,i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function rr(l){let e,t;return e=new Me({props:{src:Zt[l[4]],class:"w-6 h-6"}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p(s,n){const i={};n&16&&(i.src=Zt[s[4]]),e.$set(i)},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function or(l){let e,t;return e=new Me({props:{src:Wt[l[4]],class:"w-6 h-6"}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p(s,n){const i={};n&16&&(i.src=Wt[s[4]]),e.$set(i)},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function xs(l){let e,t,s=l[0].type+"",n,i,r,o,a;return o=new Nn({props:{$$slots:{default:[ar]},$$scope:{ctx:l}}}),{c(){e=b("p"),t=Z("No connector for "),n=Z(s),i=Z(" is available"),r=M(),Y(o.$$.fragment),this.h()},l(c){e=y(c,"P",{class:!0});var u=D(e);t=Q(u,"No connector for "),n=Q(u,s),i=Q(u," is available"),u.forEach(h),r=q(c),X(o.$$.fragment,c),this.h()},h(){_(e,"class","text-negative font-bold")},m(c,u){N(c,e,u),m(e,t),m(e,n),m(e,i),N(c,r,u),z(o,c,u),a=!0},p(c,u){(!a||u&1)&&s!==(s=c[0].type+"")&&he(n,s);const f={};u&2048&&(f.$$scope={dirty:u,ctx:c}),o.$set(f)},i(c){a||(F(o.$$.fragment,c),a=!0)},o(c){H(o.$$.fragment,c),a=!1},d(c){c&&(h(e),h(r)),J(o,c)}}}function ar(l){let e;return{c(){e=Z("Make sure you have installed it, and included it in your evidence.plugins.yaml file")},l(t){e=Q(t,"Make sure you have installed it, and included it in your evidence.plugins.yaml file")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function cr(l){let e;return{c(){e=Z("Edit")},l(t){e=Q(t,"Edit")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function Gs(l){let e,t,s,n;return t=new nr({props:{sources:l[1],source:l[0],sourcePlugin:l[2]}}),t.$on("sourceUpdated",l[10]),{c(){e=b("div"),Y(t.$$.fragment),this.h()},l(i){e=y(i,"DIV",{class:!0});var r=D(e);X(t.$$.fragment,r),r.forEach(h),this.h()},h(){_(e,"class","col-span-4")},m(i,r){N(i,e,r),z(t,e,null),n=!0},p(i,r){const o={};r&2&&(o.sources=i[1]),r&1&&(o.source=i[0]),r&4&&(o.sourcePlugin=i[2]),t.$set(o)},i(i){n||(F(t.$$.fragment,i),i&&Ae(()=>{n&&(s||(s=Be(e,He,{},!0)),s.run(1))}),n=!0)},o(i){H(t.$$.fragment,i),i&&(s||(s=Be(e,He,{},!1)),s.run(0)),n=!1},d(i){i&&h(e),J(t),i&&s&&s.end()}}}function ur(l){let e,t,s,n,i,r,o,a=l[0].name+"",c,u,f,d,p=l[0].type+"",g,k,v,w,C,E,A,j,$;const R=[or,rr,ir,lr],L=[];function V(O,P){return P&16&&(t=null),P&16&&(s=null),t==null&&(t=!!O[5](O[4])),t?0:(s==null&&(s=!!O[6](O[4])),s?1:O[2]?3:2)}n=V(l,-1),i=L[n]=R[n](l);let S=!l[2]&&xs(l);E=new ft({props:{size:"md",icon:Nl,disabled:!l[2],$$slots:{default:[cr]},$$scope:{ctx:l}}}),E.$on("click",l[9]);let I=l[3]&&Gs(l);return{c(){e=b("div"),i.c(),r=M(),o=b("p"),c=Z(a),u=M(),f=b("div"),d=b("p"),g=Z(p),v=M(),S&&S.c(),w=M(),C=b("div"),Y(E.$$.fragment),A=M(),I&&I.c(),j=me(),this.h()},l(O){e=y(O,"DIV",{class:!0});var P=D(e);i.l(P),r=q(P),o=y(P,"P",{});var T=D(o);c=Q(T,a),T.forEach(h),u=q(P),f=y(P,"DIV",{class:!0});var B=D(f);d=y(B,"P",{title:!0});var U=D(d);g=Q(U,p),U.forEach(h),v=q(B),S&&S.l(B),B.forEach(h),w=q(P),C=y(P,"DIV",{class:!0});var W=D(C);X(E.$$.fragment,W),W.forEach(h),P.forEach(h),A=q(O),I&&I.l(O),j=me(),this.h()},h(){var O;_(d,"title",k=(O=l[2])==null?void 0:O.package.package.name),_(f,"class","flex gap-2 items-center"),_(C,"class","flex justify-end"),_(e,"class","contents text-xs odd:bg-base-300")},m(O,P){N(O,e,P),L[n].m(e,null),m(e,r),m(e,o),m(o,c),m(e,u),m(e,f),m(f,d),m(d,g),m(f,v),S&&S.m(f,null),m(e,w),m(e,C),z(E,C,null),N(O,A,P),I&&I.m(O,P),N(O,j,P),$=!0},p(O,[P]){var U;let T=n;n=V(O,P),n===T?L[n].p(O,P):(_e(),H(L[T],1,1,()=>{L[T]=null}),ve(),i=L[n],i?i.p(O,P):(i=L[n]=R[n](O),i.c()),F(i,1),i.m(e,r)),(!$||P&1)&&a!==(a=O[0].name+"")&&he(c,a),(!$||P&1)&&p!==(p=O[0].type+"")&&he(g,p),(!$||P&4&&k!==(k=(U=O[2])==null?void 0:U.package.package.name))&&_(d,"title",k),O[2]?S&&(_e(),H(S,1,1,()=>{S=null}),ve()):S?(S.p(O,P),P&4&&F(S,1)):(S=xs(O),S.c(),F(S,1),S.m(f,null));const B={};P&4&&(B.disabled=!O[2]),P&2048&&(B.$$scope={dirty:P,ctx:O}),E.$set(B),O[3]?I?(I.p(O,P),P&8&&F(I,1)):(I=Gs(O),I.c(),F(I,1),I.m(j.parentNode,j)):I&&(_e(),H(I,1,1,()=>{I=null}),ve())},i(O){$||(F(i),F(S),F(E.$$.fragment,O),F(I),$=!0)},o(O){H(i),H(S),H(E.$$.fragment,O),H(I),$=!1},d(O){O&&(h(e),h(A),h(j)),L[n].d(),S&&S.d(),J(E),I&&I.d(O)}}}function fr(l,e,t){let s,n,{source:i}=e,{sources:r}=e,{availableSourcePlugins:o}=e,{startOpen:a=!1}=e,c=a;const u=g=>typeof g<"u"&&g in Wt,f=g=>typeof g<"u"&&g in Zt,d=()=>t(3,c=!c),p=g=>t(0,i=g.detail);return l.$$set=g=>{"source"in g&&t(0,i=g.source),"sources"in g&&t(1,r=g.sources),"availableSourcePlugins"in g&&t(7,o=g.availableSourcePlugins),"startOpen"in g&&t(8,a=g.startOpen)},l.$$.update=()=>{l.$$.dirty&129&&t(2,s=o==null?void 0:o[i.type]),l.$$.dirty&4&&t(4,n=s==null?void 0:s.package.package.evidence.icon)},[i,r,s,c,n,u,f,o,a,d,p]}class dr extends ye{constructor(e){super(),ke(this,e,fr,ur,be,{source:0,sources:1,availableSourcePlugins:7,startOpen:8})}}function Ys(l,e,t){const s=l.slice();return s[8]=e[t],s}function zs(l,e,t){const s=l.slice();return s[11]=e[t],s}function hr(l){let e,t,s;return t=new jn({props:{ghost:!0,availablePackages:l[5]}}),t.$on("newSource",l[6]),{c(){e=b("section"),Y(t.$$.fragment),this.h()},l(n){e=y(n,"SECTION",{class:!0});var i=D(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","col-span-4")},m(n,i){N(n,e,i),z(t,e,null),s=!0},p(n,i){const r={};i&32&&(r.availablePackages=n[5]),t.$set(r)},i(n){s||(F(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function mr(l){let e,t='

Name

Type

',s,n,i,r,o,a,c,u,f=l[4].length&&Js(l),d=pe(l[1]),p=[];for(let v=0;vH(p[v],1,1,()=>{p[v]=null});o=new ft({props:{icon:Ol,size:"md",variant:"positive",$$slots:{default:[pr]},$$scope:{ctx:l}}}),o.$on("click",l[7]);let k=l[2]&&Zs(l);return{c(){e=b("div"),e.innerHTML=t,s=M(),f&&f.c(),n=M();for(let v=0;v{k=null}),ve())},i(v){if(!u){for(let w=0;wConfiguring Data Sources →`,g;const k=[mr,hr],v=[];function w(C,E){return C[1].length>0?0:1}return o=w(l),a=v[o]=k[o](l),{c(){e=b("section"),t=b("div"),s=b("h2"),s.textContent=n,i=M(),r=b("div"),a.c(),c=M(),u=b("div"),f=M(),d=b("div"),d.innerHTML=p,this.h()},l(C){e=y(C,"SECTION",{class:!0});var E=D(e);t=y(E,"DIV",{class:!0});var A=D(t);s=y(A,"H2",{class:!0,"data-svelte-h":!0}),K(s)!=="svelte-timue1"&&(s.textContent=n),i=q(A),r=y(A,"DIV",{class:!0});var j=D(r);a.l(j),j.forEach(h),c=q(A),u=y(A,"DIV",{}),D(u).forEach(h),A.forEach(h),f=q(E),d=y(E,"DIV",{class:!0,"data-svelte-h":!0}),K(d)!=="svelte-1gscl52"&&(d.innerHTML=p),E.forEach(h),this.h()},h(){_(s,"class","font-semibold text-lg mb-2"),_(r,"class","grid grid-rows-auto source-config-table gap-x-2 gap-y-2 justify-center items-center w-full svelte-2j5e0k"),_(t,"class","p-3 rounded-t w-full border-base-300 border-t border-l border-r"),_(d,"class","p-4 rounded-b w-full bg-base-200 text-sm border-[1px] border-base-300"),_(e,"class","w-full mt-8")},m(C,E){N(C,e,E),m(e,t),m(t,s),m(t,i),m(t,r),v[o].m(r,null),m(t,c),m(t,u),m(e,f),m(e,d),g=!0},p(C,[E]){let A=o;o=w(C),o===A?v[o].p(C,E):(_e(),H(v[A],1,1,()=>{v[A]=null}),ve(),a=v[o],a?a.p(C,E):(a=v[o]=k[o](C),a.c()),F(a,1),a.m(r,null))},i(C){g||(F(a),g=!0)},o(C){H(a),g=!1},d(C){C&&h(e),v[o].d()}}}function _r(l,e,t){let s,{availableSourcePlugins:n={}}=e,{sources:i=[]}=e,r=i.length===0,o;function a(f){const{newSourceType:d,newSourceName:p}=f.detail;d&&(i.push({name:p,type:d,options:{},environmentVariables:{}}),t(3,o=p),t(2,r=!1))}let c=[];const u=()=>t(2,r=!r);return l.$$set=f=>{"availableSourcePlugins"in f&&t(0,n=f.availableSourcePlugins),"sources"in f&&t(1,i=f.sources)},l.$$.update=()=>{if(l.$$.dirty&1&&t(5,s=Object.values(n).reduce((f,d)=>{const p=d.package.package;return f[p.name]||(f[p.name]=d),f},{})),l.$$.dirty&2&&i.length){const f=i.reduce((d,p)=>(d.sourceNames.has(p.name)&&d.duplicateNames.add(p.name),d.sourceNames.add(p.name),d),{sourceNames:new Set,duplicateNames:new Set});t(4,c=Array.from(f.duplicateNames))}},[n,i,r,o,c,s,a,u]}class vr extends ye{constructor(e){super(),ke(this,e,_r,gr,be,{availableSourcePlugins:0,sources:1})}}function br(l){let e,t="Deploying to Evidence Cloud",s,n,i="Evidence Cloud allows you to:",r,o,a,c,u,f="<",d,p,g=">",k,v,w,C,E="Authenticate users",A,j,$="Schedule updates to your data",R,L,V="Re-build when you push changes to your project",S,I,O='';return{c(){e=b("h2"),e.textContent=t,s=M(),n=b("p"),n.textContent=i,r=M(),o=b("ul"),a=b("li"),c=Z("Host your project at "),u=b("code"),d=Z(f),p=Z("project-name"),k=Z(g),v=Z(".evidence.app"),w=M(),C=b("li"),C.textContent=E,A=M(),j=b("li"),j.textContent=$,R=M(),L=b("li"),L.textContent=V,S=M(),I=b("div"),I.innerHTML=O,this.h()},l(P){e=y(P,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-18vqxr8"&&(e.textContent=t),s=q(P),n=y(P,"P",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-1p7rrak"&&(n.textContent=i),r=q(P),o=y(P,"UL",{class:!0});var T=D(o);a=y(T,"LI",{class:!0});var B=D(a);c=Q(B,"Host your project at "),u=y(B,"CODE",{});var U=D(u);d=Q(U,f),p=Q(U,"project-name"),k=Q(U,g),v=Q(U,".evidence.app"),U.forEach(h),B.forEach(h),w=q(T),C=y(T,"LI",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-19f0lwd"&&(C.textContent=E),A=q(T),j=y(T,"LI",{class:!0,"data-svelte-h":!0}),K(j)!=="svelte-lawnhl"&&(j.textContent=$),R=q(T),L=y(T,"LI",{class:!0,"data-svelte-h":!0}),K(L)!=="svelte-1q65sxp"&&(L.textContent=V),T.forEach(h),S=q(P),I=y(P,"DIV",{class:!0,"data-svelte-h":!0}),K(I)!=="svelte-1827t5n"&&(I.innerHTML=O),this.h()},h(){_(e,"class","svelte-lmhsq3"),_(n,"class","svelte-lmhsq3"),_(a,"class","svelte-lmhsq3"),_(C,"class","svelte-lmhsq3"),_(j,"class","svelte-lmhsq3"),_(L,"class","svelte-lmhsq3"),_(o,"class","svelte-lmhsq3"),_(I,"class","new-format-buttons my-3 svelte-lmhsq3")},m(P,T){N(P,e,T),N(P,s,T),N(P,n,T),N(P,r,T),N(P,o,T),m(o,a),m(a,c),m(a,u),m(u,d),m(u,p),m(u,k),m(u,v),m(o,w),m(o,C),m(o,A),m(o,j),m(o,R),m(o,L),N(P,S,T),N(P,I,T)},p:ee,i:ee,o:ee,d(P){P&&(h(e),h(s),h(n),h(r),h(o),h(S),h(I))}}}class yr extends ye{constructor(e){super(),ke(this,e,null,br,be,{})}}function kr(l){let e,t,s=(l[1]?"····················":l[0])+"",n;return{c(){e=b("span"),t=new yn(!1),this.h()},l(i){e=y(i,"SPAN",{});var r=D(e);t=kn(r,!1),r.forEach(h),this.h()},h(){t.a=null,Fe(e,"text-xs",l[2])},m(i,r){N(i,e,r),t.m(s,e)},p(i,r){r&3&&s!==(s=(i[1]?"····················":i[0])+"")&&t.p(s),r&4&&Fe(e,"text-xs",i[2])},i(i){i&&(n||Ae(()=>{n=yt(e,kt,{}),n.start()}))},o:ee,d(i){i&&h(e)}}}function wr(l){let e,t="Copied",s;return{c(){e=b("span"),e.textContent=t},l(n){e=y(n,"SPAN",{"data-svelte-h":!0}),K(e)!=="svelte-18eylsc"&&(e.textContent=t)},m(n,i){N(n,e,i)},p:ee,i(n){n&&(s||Ae(()=>{s=yt(e,kt,{}),s.start()}))},o:ee,d(n){n&&h(e)}}}function Cr(l){let e,t;return e=new An({props:{class:"bx--snippet__icon"}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function $r(l){let e,t;return e=new An({props:{class:"bx--snippet__icon"}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function Tr(l){let e,t,s,n,i,r,o,a,c;function u(v,w){return v[4]?wr:kr}let f=u(l),d=f(l);const p=[$r,Cr],g=[];function k(v,w){return v[4]?0:1}return i=k(l),r=g[i]=p[i](l),{c(){e=b("button"),t=b("span"),d.c(),s=M(),n=b("div"),r.c(),this.h()},l(v){e=y(v,"BUTTON",{type:!0,class:!0});var w=D(e);t=y(w,"SPAN",{class:!0});var C=D(t);d.l(C),C.forEach(h),s=q(w),n=y(w,"DIV",{class:!0});var E=D(n);r.l(E),E.forEach(h),w.forEach(h),this.h()},h(){_(t,"class","var-value svelte-exlw3k"),_(n,"class","w-4 h-4"),_(e,"type","button"),_(e,"class","container h-6 w-6 svelte-exlw3k"),Fe(e,"copied",l[4])},m(v,w){N(v,e,w),m(e,t),d.m(t,null),m(e,s),m(e,n),g[i].m(n,null),o=!0,a||(c=de(e,"click",l[5]),a=!0)},p(v,[w]){f===(f=u(v))&&d?d.p(v,w):(d.d(1),d=f(v),d&&(d.c(),F(d,1),d.m(t,null)));let C=i;i=k(v),i!==C&&(_e(),H(g[C],1,1,()=>{g[C]=null}),ve(),r=g[i],r||(r=g[i]=p[i](v),r.c()),F(r,1),r.m(n,null)),(!o||w&16)&&Fe(e,"copied",v[4])},i(v){o||(F(d),F(r),o=!0)},o(v){H(r),o=!1},d(v){v&&h(e),d.d(),g[i].d(),a=!1,c()}}}function Er(l,e,t){let{text:s=void 0}=e,{hideText:n=!1}=e,{small:i=!1}=e,r=!1;const o=function(){t(4,r=!1)};let{copy:a=async u=>{try{r||(await navigator.clipboard.writeText(u),t(4,r=!0),setTimeout(o,2e3))}catch{}}}=e;const c=()=>{s!==void 0&&a(s)};return l.$$set=u=>{"text"in u&&t(0,s=u.text),"hideText"in u&&t(1,n=u.hideText),"small"in u&&t(2,i=u.small),"copy"in u&&t(3,a=u.copy)},[s,n,i,a,r,c]}class Ke extends ye{constructor(e){super(),ke(this,e,Er,Tr,be,{text:0,hideText:1,small:2,copy:3})}}function Sr(l){let e,t="Deploying to Netlify",s,n,i='
  • Start a new netlify project →
  • Choose the repo containing this project
  • Update the site settings to match those below
  • ',r,o,a="Basic Build Settings",c,u,f,d="Build command",p,g,k,v,w,C,E="Publish directory",A,j,$,R,L,V="Advanced Build Settings",S,I,O=`Click 'Show Advanced' add your + environment variables.`,P;return k=new Ke({props:{text:"npm run sources && npm run build"}}),$=new Ke({props:{text:"build/"}}),{c(){e=b("h2"),e.textContent=t,s=M(),n=b("ol"),n.innerHTML=i,r=M(),o=b("div"),o.textContent=a,c=M(),u=b("div"),f=b("span"),f.textContent=d,p=M(),g=b("div"),Y(k.$$.fragment),v=M(),w=b("div"),C=b("span"),C.textContent=E,A=M(),j=b("div"),Y($.$$.fragment),R=M(),L=b("div"),L.textContent=V,S=M(),I=b("p"),I.innerHTML=O,this.h()},l(T){e=y(T,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-a8hbx"&&(e.textContent=t),s=q(T),n=y(T,"OL",{"data-svelte-h":!0}),K(n)!=="svelte-1krc6dk"&&(n.innerHTML=i),r=q(T),o=y(T,"DIV",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-dxwvxl"&&(o.textContent=a),c=q(T),u=y(T,"DIV",{class:!0});var B=D(u);f=y(B,"SPAN",{class:!0,"data-svelte-h":!0}),K(f)!=="svelte-1fx13w6"&&(f.textContent=d),p=q(B),g=y(B,"DIV",{class:!0});var U=D(g);X(k.$$.fragment,U),U.forEach(h),B.forEach(h),v=q(T),w=y(T,"DIV",{class:!0});var W=D(w);C=y(W,"SPAN",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-pc7ih"&&(C.textContent=E),A=q(W),j=y(W,"DIV",{class:!0});var x=D(j);X($.$$.fragment,x),x.forEach(h),W.forEach(h),R=q(T),L=y(T,"DIV",{class:!0,"data-svelte-h":!0}),K(L)!=="svelte-1rcjgh9"&&(L.textContent=V),S=q(T),I=y(T,"P",{class:!0,"data-svelte-h":!0}),K(I)!=="svelte-9upacm"&&(I.innerHTML=O),this.h()},h(){_(e,"class","svelte-uhtp23"),_(o,"class","separator svelte-uhtp23"),_(f,"class","setting svelte-uhtp23"),_(g,"class","setting-value svelte-uhtp23"),_(u,"class","setting-row svelte-uhtp23"),_(C,"class","setting svelte-uhtp23"),_(j,"class","setting-value svelte-uhtp23"),_(w,"class","setting-row svelte-uhtp23"),_(L,"class","separator svelte-uhtp23"),_(I,"class","svelte-uhtp23")},m(T,B){N(T,e,B),N(T,s,B),N(T,n,B),N(T,r,B),N(T,o,B),N(T,c,B),N(T,u,B),m(u,f),m(u,p),m(u,g),z(k,g,null),N(T,v,B),N(T,w,B),m(w,C),m(w,A),m(w,j),z($,j,null),N(T,R,B),N(T,L,B),N(T,S,B),N(T,I,B),P=!0},i(T){P||(F(k.$$.fragment,T),F($.$$.fragment,T),P=!0)},o(T){H(k.$$.fragment,T),H($.$$.fragment,T),P=!1},d(T){T&&(h(e),h(s),h(n),h(r),h(o),h(c),h(u),h(v),h(w),h(R),h(L),h(S),h(I)),J(k),J($)}}}function Ir(l){let e,t="You'll need to set up a git repo before deploying to netlify.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-drfbb5"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-uhtp23")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function Nr(l){let e,t="You'll need to connect to at least one datasource before deploying to netlify.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1wqvgt"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-uhtp23")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function Ar(l){let e,t,s,n;const i=[Nr,Ir,Sr],r=[];function o(a,c){return a[1].length?a[0].gitRepo?2:1:0}return e=o(l),t=r[e]=i[e](l),{c(){t.c(),s=me()},l(a){t.l(a),s=me()},m(a,c){r[e].m(a,c),N(a,s,c),n=!0},p(a,[c]){let u=e;e=o(a),e!==u&&(_e(),H(r[u],1,1,()=>{r[u]=null}),ve(),t=r[e],t||(t=r[e]=i[e](a),t.c()),F(t,1),t.m(s.parentNode,s))},i(a){n||(F(t),n=!0)},o(a){H(t),n=!1},d(a){a&&h(s),r[e].d(a)}}}function Lr(l,e,t){let{settings:s}=e,{sources:n}=e;return l.$$set=i=>{"settings"in i&&t(0,s=i.settings),"sources"in i&&t(1,n=i.sources)},[s,n]}class Or extends ye{constructor(e){super(),ke(this,e,Lr,Ar,be,{settings:0,sources:1})}}function Pr(l){let e,t="Deploying to Vercel",s,n,i='
  • Start a new Vercel project →
  • Choose the repo containing this project
  • Configure your project to match the settings below
  • ',r,o,a="Build and Output Settings",c,u,f,d="Build Command",p,g,k,v,w,C,E="Output Directory",A,j,$,R,L,V,S="Install Command",I,O,P,T;return k=new Ke({props:{text:"npm run sources && npm run build"}}),$=new Ke({props:{text:"build/"}}),P=new Ke({props:{text:"npm install"}}),{c(){e=b("h2"),e.textContent=t,s=M(),n=b("ol"),n.innerHTML=i,r=M(),o=b("div"),o.textContent=a,c=M(),u=b("div"),f=b("span"),f.textContent=d,p=M(),g=b("div"),Y(k.$$.fragment),v=M(),w=b("div"),C=b("span"),C.textContent=E,A=M(),j=b("div"),Y($.$$.fragment),R=M(),L=b("div"),V=b("span"),V.textContent=S,I=M(),O=b("div"),Y(P.$$.fragment),this.h()},l(B){e=y(B,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-ly0hw5"&&(e.textContent=t),s=q(B),n=y(B,"OL",{"data-svelte-h":!0}),K(n)!=="svelte-13j0dqb"&&(n.innerHTML=i),r=q(B),o=y(B,"DIV",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-fbi9z5"&&(o.textContent=a),c=q(B),u=y(B,"DIV",{class:!0});var U=D(u);f=y(U,"SPAN",{class:!0,"data-svelte-h":!0}),K(f)!=="svelte-2ttm1i"&&(f.textContent=d),p=q(U),g=y(U,"DIV",{class:!0});var W=D(g);X(k.$$.fragment,W),W.forEach(h),U.forEach(h),v=q(B),w=y(B,"DIV",{class:!0});var x=D(w);C=y(x,"SPAN",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-wq73qv"&&(C.textContent=E),A=q(x),j=y(x,"DIV",{class:!0});var G=D(j);X($.$$.fragment,G),G.forEach(h),x.forEach(h),R=q(B),L=y(B,"DIV",{class:!0});var se=D(L);V=y(se,"SPAN",{class:!0,"data-svelte-h":!0}),K(V)!=="svelte-xn7157"&&(V.textContent=S),I=q(se),O=y(se,"DIV",{class:!0});var ne=D(O);X(P.$$.fragment,ne),ne.forEach(h),se.forEach(h),this.h()},h(){_(e,"class","svelte-1ifbe9h"),_(o,"class","separator svelte-1ifbe9h"),_(f,"class","setting svelte-1ifbe9h"),_(g,"class","setting-value svelte-1ifbe9h"),_(u,"class","setting-row svelte-1ifbe9h"),_(C,"class","setting svelte-1ifbe9h"),_(j,"class","setting-value svelte-1ifbe9h"),_(w,"class","setting-row svelte-1ifbe9h"),_(V,"class","setting svelte-1ifbe9h"),_(O,"class","setting-value svelte-1ifbe9h"),_(L,"class","setting-row svelte-1ifbe9h")},m(B,U){N(B,e,U),N(B,s,U),N(B,n,U),N(B,r,U),N(B,o,U),N(B,c,U),N(B,u,U),m(u,f),m(u,p),m(u,g),z(k,g,null),N(B,v,U),N(B,w,U),m(w,C),m(w,A),m(w,j),z($,j,null),N(B,R,U),N(B,L,U),m(L,V),m(L,I),m(L,O),z(P,O,null),T=!0},i(B){T||(F(k.$$.fragment,B),F($.$$.fragment,B),F(P.$$.fragment,B),T=!0)},o(B){H(k.$$.fragment,B),H($.$$.fragment,B),H(P.$$.fragment,B),T=!1},d(B){B&&(h(e),h(s),h(n),h(r),h(o),h(c),h(u),h(v),h(w),h(R),h(L)),J(k),J($),J(P)}}}function Dr(l){let e,t="You'll need to set up a git repo before deploying to Vercel.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1urjqdt"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-1ifbe9h")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function jr(l){let e,t="You'll need to connect to at least one datasource before deploying to Vercel.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1evai4d"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-1ifbe9h")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function Mr(l){let e,t,s,n;const i=[jr,Dr,Pr],r=[];function o(a,c){return a[1].length?a[0].gitRepo?2:1:0}return e=o(l),t=r[e]=i[e](l),{c(){t.c(),s=me()},l(a){t.l(a),s=me()},m(a,c){r[e].m(a,c),N(a,s,c),n=!0},p(a,[c]){let u=e;e=o(a),e!==u&&(_e(),H(r[u],1,1,()=>{r[u]=null}),ve(),t=r[e],t||(t=r[e]=i[e](a),t.c()),F(t,1),t.m(s.parentNode,s))},i(a){n||(F(t),n=!0)},o(a){H(t),n=!1},d(a){a&&h(s),r[e].d(a)}}}function qr(l,e,t){let{settings:s}=e,{sources:n}=e;return l.$$set=i=>{"settings"in i&&t(0,s=i.settings),"sources"in i&&t(1,n=i.sources)},[s,n]}class Fr extends ye{constructor(e){super(),ke(this,e,qr,Mr,be,{settings:0,sources:1})}}function Vr(l){let e,t="Deploying your Project",s,n,i="In production, Evidence functions like a static site generator:",r,o,a=`
  • Running npm run build will build a static site in the /build directory + using the credentials in the datasource connections panel, which you can host in a variety of environments
  • `,c,u,f="Building Your Project",d,p,g,k="Build command",v,w,C,E,A,j,$="Publish directory",R,L,V,S;return C=new Ke({props:{text:"npm run sources && npm run build"}}),V=new Ke({props:{text:"build/"}}),{c(){e=b("h2"),e.textContent=t,s=M(),n=b("p"),n.textContent=i,r=M(),o=b("ol"),o.innerHTML=a,c=M(),u=b("div"),u.textContent=f,d=M(),p=b("div"),g=b("span"),g.textContent=k,v=M(),w=b("div"),Y(C.$$.fragment),E=M(),A=b("div"),j=b("span"),j.textContent=$,R=M(),L=b("div"),Y(V.$$.fragment),this.h()},l(I){e=y(I,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1bt7a83"&&(e.textContent=t),s=q(I),n=y(I,"P",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-1gcreas"&&(n.textContent=i),r=q(I),o=y(I,"OL",{"data-svelte-h":!0}),K(o)!=="svelte-1dvvhh6"&&(o.innerHTML=a),c=q(I),u=y(I,"DIV",{class:!0,"data-svelte-h":!0}),K(u)!=="svelte-1sj8kng"&&(u.textContent=f),d=q(I),p=y(I,"DIV",{class:!0});var O=D(p);g=y(O,"SPAN",{class:!0,"data-svelte-h":!0}),K(g)!=="svelte-1fx13w6"&&(g.textContent=k),v=q(O),w=y(O,"DIV",{class:!0});var P=D(w);X(C.$$.fragment,P),P.forEach(h),O.forEach(h),E=q(I),A=y(I,"DIV",{class:!0});var T=D(A);j=y(T,"SPAN",{class:!0,"data-svelte-h":!0}),K(j)!=="svelte-pc7ih"&&(j.textContent=$),R=q(T),L=y(T,"DIV",{class:!0});var B=D(L);X(V.$$.fragment,B),B.forEach(h),T.forEach(h),this.h()},h(){_(e,"class","svelte-oz5mco"),_(n,"class","svelte-oz5mco"),_(u,"class","separator svelte-oz5mco"),_(g,"class","setting svelte-oz5mco"),_(w,"class","setting-value svelte-oz5mco"),_(p,"class","setting-row svelte-oz5mco"),_(j,"class","setting svelte-oz5mco"),_(L,"class","setting-value svelte-oz5mco"),_(A,"class","setting-row svelte-oz5mco")},m(I,O){N(I,e,O),N(I,s,O),N(I,n,O),N(I,r,O),N(I,o,O),N(I,c,O),N(I,u,O),N(I,d,O),N(I,p,O),m(p,g),m(p,v),m(p,w),z(C,w,null),N(I,E,O),N(I,A,O),m(A,j),m(A,R),m(A,L),z(V,L,null),S=!0},p:ee,i(I){S||(F(C.$$.fragment,I),F(V.$$.fragment,I),S=!0)},o(I){H(C.$$.fragment,I),H(V.$$.fragment,I),S=!1},d(I){I&&(h(e),h(s),h(n),h(r),h(o),h(c),h(u),h(d),h(p),h(E),h(A)),J(C),J(V)}}}class Br extends ye{constructor(e){super(),ke(this,e,null,Vr,be,{})}}function Qs(l,e,t){const s=l.slice();return s[3]=e[t],s}function en(l,e,t){const s=l.slice();return s[6]=e[t][0],s[7]=e[t][1],s}function Hr(l){let e,t;return e=new Rl({props:{$$slots:{default:[Gr]},$$scope:{ctx:l}}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p(s,n){const i={};n&1025&&(i.$$scope={dirty:n,ctx:s}),e.$set(i)},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function Rr(l){let e,t,s,n=`GCloud authentication isn't supported in cloud deployments, as it needs access to a browser. Set + up one of the other authentication options for a deployment.`;return{c(){e=b("hr"),t=M(),s=b("p"),s.textContent=n},l(i){e=y(i,"HR",{}),t=q(i),s=y(i,"P",{"data-svelte-h":!0}),K(s)!=="svelte-x2laf0"&&(s.textContent=n)},m(i,r){N(i,e,r),N(i,t,r),N(i,s,r)},p:ee,i:ee,o:ee,d(i){i&&(h(e),h(t),h(s))}}}function Ur(l){let e,t,s,n=`External browser authentication isn't supported in cloud deployments, as it needs access to a + browser. Set up one of the other authentication options for a deployment.`;return{c(){e=b("hr"),t=M(),s=b("p"),s.textContent=n},l(i){e=y(i,"HR",{}),t=q(i),s=y(i,"P",{"data-svelte-h":!0}),K(s)!=="svelte-1m8xj5p"&&(s.textContent=n)},m(i,r){N(i,e,r),N(i,t,r),N(i,s,r)},p:ee,i:ee,o:ee,d(i){i&&(h(e),h(t),h(s))}}}function Kr(l){let e;return{c(){e=Z("Copy All")},l(t){e=Q(t,"Copy All")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function tn(l){let e,t,s,n,i,r,o,a;return s=new Ke({props:{text:l[6]}}),r=new Ke({props:{text:l[7],hideText:!0}}),{c(){e=b("div"),t=b("div"),Y(s.$$.fragment),n=M(),i=b("div"),Y(r.$$.fragment),o=M(),this.h()},l(c){e=y(c,"DIV",{class:!0});var u=D(e);t=y(u,"DIV",{class:!0});var f=D(t);X(s.$$.fragment,f),f.forEach(h),n=q(u),i=y(u,"DIV",{class:!0});var d=D(i);X(r.$$.fragment,d),d.forEach(h),o=q(u),u.forEach(h),this.h()},h(){_(t,"class","var-name svelte-jy9xey"),_(i,"class","var-value svelte-jy9xey"),_(e,"class","environment-variable svelte-jy9xey")},m(c,u){N(c,e,u),m(e,t),z(s,t,null),m(e,n),m(e,i),z(r,i,null),m(e,o),a=!0},p(c,u){const f={};u&1&&(f.text=c[6]),s.$set(f);const d={};u&1&&(d.text=c[7]),r.$set(d)},i(c){a||(F(s.$$.fragment,c),F(r.$$.fragment,c),a=!0)},o(c){H(s.$$.fragment,c),H(r.$$.fragment,c),a=!1},d(c){c&&h(e),J(s),J(r)}}}function sn(l){let e,t,s=pe(Object.entries(l[3].environmentVariables)),n=[];for(let r=0;rH(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;rH(u[d],1,1,()=>{u[d]=null});return{c(){e=b("div"),Y(t.$$.fragment),s=M(),n=b("div"),n.innerHTML=i,r=M();for(let d=0;duse different environment variable values.`,s,n,i,r,o;const a=[Ur,Rr,Hr],c=[];function u(f,d){return f[1].authenticator==="externalbrowser"?0:f[1].authenticator==="gcloud-cli"?1:2}return n=u(l),i=c[n]=a[n](l),{c(){e=b("p"),e.innerHTML=t,s=M(),i.c(),r=me()},l(f){e=y(f,"P",{"data-svelte-h":!0}),K(e)!=="svelte-14iladh"&&(e.innerHTML=t),s=q(f),i.l(f),r=me()},m(f,d){N(f,e,d),N(f,s,d),c[n].m(f,d),N(f,r,d),o=!0},p(f,[d]){i.p(f,d)},i(f){o||(F(i),o=!0)},o(f){H(i),o=!1},d(f){f&&(h(e),h(s),h(r)),c[n].d(f)}}}function zr(l,e,t){let{sources:s}=e,n={};function i(){const r=s.reduce((o,a)=>[o,Object.entries(a.environmentVariables).map(([c,u])=>`${c}="${u.replace(/\\n/g,` +`)}"`).join(` +`)].join(` +`),"");navigator.clipboard.writeText(r),Pl.add({title:"",status:"positive",message:"Copied environment variables to clipboard"})}return l.$$set=r=>{"sources"in r&&t(0,s=r.sources)},[s,n,i]}class Jr extends ye{constructor(e){super(),ke(this,e,zr,Yr,be,{sources:0})}}function nn(l,e,t){const s=l.slice();return s[5]=e[t],s}function ln(l){let e,t=l[5].name+"",s,n;return{c(){e=b("option"),s=Z(t),n=M(),this.h()},l(i){e=y(i,"OPTION",{});var r=D(e);s=Q(r,t),n=q(r),r.forEach(h),this.h()},h(){e.__value=l[5],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s),m(e,n)},p:ee,d(i){i&&h(e)}}}function rn(l){let e,t,s,n;var i=l[2].FormComponent;function r(o,a){return{props:{settings:o[0],sources:o[1]}}}return i&&(t=vs(i,r(l))),{c(){e=b("div"),t&&Y(t.$$.fragment),this.h()},l(o){e=y(o,"DIV",{class:!0});var a=D(e);t&&X(t.$$.fragment,a),a.forEach(h),this.h()},h(){_(e,"class","panel svelte-1ukb5v1")},m(o,a){N(o,e,a),t&&z(t,e,null),n=!0},p(o,a){if(a&4&&i!==(i=o[2].FormComponent)){if(t){_e();const c=t;H(c.$$.fragment,1,0,()=>{J(c,1)}),ve()}i?(t=vs(i,r(o)),Y(t.$$.fragment),F(t.$$.fragment,1),z(t,e,null)):t=null}else if(i){const c={};a&1&&(c.settings=o[0]),a&2&&(c.sources=o[1]),t.$set(c)}},i(o){n||(t&&F(t.$$.fragment,o),o&&Ae(()=>{n&&(s||(s=Be(e,He,{},!0)),s.run(1))}),n=!0)},o(o){t&&H(t.$$.fragment,o),o&&(s||(s=Be(e,He,{},!1)),s.run(0)),n=!1},d(o){o&&h(e),t&&J(t),o&&s&&s.end()}}}function Xr(l){let e,t,s,n,i="Deployment",r,o,a=`Evidence projects can be deployed to a variety of cloud environments. The easiest way to + deploy your project is with Evidence Cloud.`,c,u,f="Environment Variables",d,p,g,k,v,w="Deployment Environment",C,E,A,j,$,R='Learn more about Deploying your Project →',L,V,S;g=new Jr({props:{sources:l[1]}});let I=pe(l[3]),O=[];for(let T=0;Tl[4].call(E)),_(s,"class","panel svelte-1ukb5v1"),_(t,"class","deploy-settings-box svelte-1ukb5v1"),_($,"class","svelte-1ukb5v1"),_(e,"id","deploy"),_(e,"class","svelte-1ukb5v1")},m(T,B){N(T,e,B),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),m(s,c),m(s,u),m(s,d),m(s,p),z(g,p,null),m(s,k),m(s,v),m(s,C),m(s,E);for(let U=0;U{P=null}),ve())},i(T){L||(F(g.$$.fragment,T),F(P),L=!0)},o(T){H(g.$$.fragment,T),H(P),L=!1},d(T){T&&h(e),J(g),Oe(O,T),P&&P.d(),V=!1,S()}}}function Wr(l,e,t){let{settings:s}=e,{sources:n}=e,i=[{id:"evidence",name:"Evidence Cloud",FormComponent:yr},{id:"netlify",name:"Netlify",FormComponent:Or},{id:"vercel",name:"Vercel",FormComponent:Fr},{id:"other",name:"Self-host (other)",FormComponent:Br}],r=i[0];function o(){r=$t(this),t(2,r),t(3,i)}return l.$$set=a=>{"settings"in a&&t(0,s=a.settings),"sources"in a&&t(1,n=a.sources)},[s,n,r,i,o]}class Zr extends ye{constructor(e){super(),ke(this,e,Wr,Xr,be,{settings:0,sources:1})}}function on(l,e,t){const s=l.slice();return s[2]=e[t],s[3]=e,s[4]=t,s}function an(l){let e,t,s=l[2].formatTag+"",n,i,r,o=l[2].formatCode+"",a,c,u,f,d,p,g,k,v=ct(l[2])+"",w,C,E,A;function j(){l[1].call(f,l[3],l[4])}return{c(){e=b("tr"),t=b("td"),n=Z(s),i=M(),r=b("td"),a=Z(o),c=M(),u=b("td"),f=b("input"),g=M(),k=b("td"),w=Z(v),C=M(),this.h()},l($){e=y($,"TR",{});var R=D(e);t=y(R,"TD",{class:!0});var L=D(t);n=Q(L,s),L.forEach(h),i=q(R),r=y(R,"TD",{class:!0});var V=D(r);a=Q(V,o),V.forEach(h),c=q(R),u=y(R,"TD",{class:!0});var S=D(u);f=y(S,"INPUT",{id:!0,placeholder:!0,class:!0}),S.forEach(h),g=q(R),k=y(R,"TD",{class:!0});var I=D(k);w=Q(I,v),I.forEach(h),C=q(R),R.forEach(h),this.h()},h(){_(t,"class","svelte-51mr58"),_(r,"class","svelte-51mr58"),_(f,"id",d="id_format_row"+l[2].formatTag),_(f,"placeholder",p=l[2].exampleInput||ut(l[2].valueType)),_(f,"class","align_left input_box svelte-51mr58"),_(u,"class","svelte-51mr58"),_(k,"class","align_right svelte-51mr58")},m($,R){N($,e,R),m(e,t),m(t,n),m(e,i),m(e,r),m(r,a),m(e,c),m(e,u),m(u,f),ce(f,l[2].userInput),m(e,g),m(e,k),m(k,w),m(e,C),E||(A=[de(f,"input",j),de(f,"blur",function(){ts(l[2].userInput=void 0)&&(l[2].userInput=void 0).apply(this,arguments)})],E=!0)},p($,R){l=$,R&1&&s!==(s=l[2].formatTag+"")&&he(n,s),R&1&&o!==(o=l[2].formatCode+"")&&he(a,o),R&1&&d!==(d="id_format_row"+l[2].formatTag)&&_(f,"id",d),R&1&&p!==(p=l[2].exampleInput||ut(l[2].valueType))&&_(f,"placeholder",p),R&1&&f.value!==l[2].userInput&&ce(f,l[2].userInput),R&1&&v!==(v=ct(l[2])+"")&&he(w,v)},d($){$&&h(e),E=!1,Ye(A)}}}function Qr(l){let e,t,s='Format Name Format Code Example Input Example Output',n,i=pe(l[0]),r=[];for(let o=0;o{"formats"in i&&t(0,s=i.formats)},[s,n]}class gs extends ye{constructor(e){super(),ke(this,e,eo,Qr,be,{formats:0})}}function cn(l){let e,t,s,n;const i=l[4].default,r=ll(i,l,l[3],null);return{c(){e=b("div"),r&&r.c(),this.h()},l(o){e=y(o,"DIV",{class:!0});var a=D(e);r&&r.l(a),a.forEach(h),this.h()},h(){_(e,"class","collapsibleContents svelte-16b384t"),e.hidden=t=!l[0]},m(o,a){N(o,e,a),r&&r.m(e,null),n=!0},p(o,a){r&&r.p&&(!n||a&8)&&il(r,i,o,o[3],n?ol(i,o[3],a,null):rl(o[3]),null),(!n||a&1&&t!==(t=!o[0]))&&(e.hidden=t)},i(o){n||(F(r,o),o&&Ae(()=>{n&&(s||(s=Be(e,He,{},!0)),s.run(1))}),n=!0)},o(o){H(r,o),o&&(s||(s=Be(e,He,{},!1)),s.run(0)),n=!1},d(o){o&&h(e),r&&r.d(o),o&&s&&s.end()}}}function to(l){let e,t,s,n,i,r,o,a,c,u,f;o=new Kl({props:{toggled:l[0],size:"16"}});let d=l[0]&&cn(l);return{c(){e=b("div"),t=b("collapsibleHeader"),s=b("button"),n=b("h3"),i=Z(l[1]),r=M(),Y(o.$$.fragment),a=M(),d&&d.c(),this.h()},l(p){e=y(p,"DIV",{class:!0});var g=D(e);t=y(g,"COLLAPSIBLEHEADER",{class:!0});var k=D(t);s=y(k,"BUTTON",{"area-expanded":!0,class:!0});var v=D(s);n=y(v,"H3",{class:!0});var w=D(n);i=Q(w,l[1]),w.forEach(h),r=q(v),X(o.$$.fragment,v),v.forEach(h),k.forEach(h),a=q(g),d&&d.l(g),g.forEach(h),this.h()},h(){_(n,"class","svelte-16b384t"),_(s,"area-expanded",l[0]),_(s,"class","svelte-16b384t"),_(t,"class","svelte-16b384t"),_(e,"class","collapsibleSection svelte-16b384t")},m(p,g){N(p,e,g),m(e,t),m(t,s),m(s,n),m(n,i),m(s,r),z(o,s,null),m(e,a),d&&d.m(e,null),c=!0,u||(f=de(s,"click",es(l[2])),u=!0)},p(p,[g]){(!c||g&2)&&he(i,p[1]);const k={};g&1&&(k.toggled=p[0]),o.$set(k),(!c||g&1)&&_(s,"area-expanded",p[0]),p[0]?d?(d.p(p,g),g&1&&F(d,1)):(d=cn(p),d.c(),F(d,1),d.m(e,null)):d&&(_e(),H(d,1,1,()=>{d=null}),ve())},i(p){c||(F(o.$$.fragment,p),F(d),c=!0)},o(p){H(o.$$.fragment,p),H(d),c=!1},d(p){p&&h(e),J(o),d&&d.d(),u=!1,f()}}}function so(l,e,t){let{$$slots:s={},$$scope:n}=e,{headerText:i}=e,{expanded:r=!0}=e,o=()=>{t(0,r=!r)};return l.$$set=a=>{"headerText"in a&&t(1,i=a.headerText),"expanded"in a&&t(0,r=a.expanded),"$$scope"in a&&t(3,n=a.$$scope)},[r,i,o,n,s]}class it extends ye{constructor(e){super(),ke(this,e,so,to,be,{headerText:1,expanded:0})}}function un(l,e,t){const s=l.slice();return s[5]=e[t],s[6]=e,s[7]=t,s}function no(l,e,t){const s=l.slice();return s[8]=e[t],s}function lo(l){let e,t=l[8].displayName+"",s;return{c(){e=b("option"),s=Z(t),this.h()},l(n){e=y(n,"OPTION",{name:!0,id:!0});var i=D(e);s=Q(i,t),i.forEach(h),this.h()},h(){_(e,"name",l[8].primaryCode),_(e,"id",l[8].primaryCode),e.__value=l[8].primaryCode,ce(e,e.__value)},m(n,i){N(n,e,i),m(e,s)},p:ee,d(n){n&&h(e)}}}function fn(l){let e,t,s,n='Format Name Format Code Example Input Example Output',i,r=[],o=new Map,a,c,u=pe(l[0].filter(l[3]));const f=d=>d[5].formatTag;for(let d=0;d{c&&(a||(a=Be(e,He,{},!0)),a.run(1))}),c=!0}},o(d){d&&(a||(a=Be(e,He,{},!1)),a.run(0)),c=!1},d(d){d&&h(e);for(let p=0;p{r=yt(s,kt,{}),r.start()})),S&&(f||Ae(()=>{f=yt(a,kt,{}),f.start()})),S&&(j||Ae(()=>{j=yt(C,kt,{}),j.start()}))},o:ee,d(S){S&&h(t),R=!1,Ye(L)}}}function io(l){let e,t,s="Choose a currency",n,i,r,o,a,c=pe(jl),u=[];for(let d=0;dl[2].call(e))},m(d,p){N(d,e,p),m(e,t),m(e,n);for(let g=0;g{f=null}),ve())},i(d){F(f)},o(d){H(f)},d(d){d&&(h(e),h(i),h(r)),Oe(u,d),f&&f.d(d),o=!1,a()}}}function ro(l,e,t){let{formats:s}=e,n="Choose a currency";function i(){n=$t(this),t(1,n)}const r=a=>a.parentFormat===n;function o(a,c){a[c].userInput=this.value,t(0,s),t(1,n)}return l.$$set=a=>{"formats"in a&&t(0,s=a.formats)},[s,n,i,r,o]}class oo extends ye{constructor(e){super(),ke(this,e,ro,io,be,{formats:0})}}function hn(l,e,t){const s=l.slice();return s[4]=e[t],s[5]=e,s[6]=t,s}function mn(l){let e,t,s=l[4].formatTag+"",n,i,r,o=l[4].formatCode+"",a,c,u,f,d,p,g,k,v=ct(l[4])+"",w,C,E,A,j,$,R,L,V,S;function I(){l[2].call(f,l[5],l[6])}$=new Me({props:{src:os}});function O(){return l[3](l[4])}return{c(){e=b("tr"),t=b("td"),n=Z(s),i=M(),r=b("td"),a=Z(o),c=M(),u=b("td"),f=b("input"),g=M(),k=b("td"),w=Z(v),C=M(),E=b("td"),A=b("button"),j=b("div"),Y($.$$.fragment),R=M(),this.h()},l(P){e=y(P,"TR",{});var T=D(e);t=y(T,"TD",{class:!0});var B=D(t);n=Q(B,s),B.forEach(h),i=q(T),r=y(T,"TD",{class:!0});var U=D(r);a=Q(U,o),U.forEach(h),c=q(T),u=y(T,"TD",{class:!0});var W=D(u);f=y(W,"INPUT",{id:!0,placeholder:!0,class:!0}),W.forEach(h),g=q(T),k=y(T,"TD",{class:!0});var x=D(k);w=Q(x,v),x.forEach(h),C=q(T),E=y(T,"TD",{class:!0});var G=D(E);A=y(G,"BUTTON",{type:!0,tooltip:!0,class:!0});var se=D(A);j=y(se,"DIV",{class:!0});var ne=D(j);X($.$$.fragment,ne),ne.forEach(h),se.forEach(h),G.forEach(h),R=q(T),T.forEach(h),this.h()},h(){_(t,"class","svelte-1dnj419"),_(r,"class","svelte-1dnj419"),_(f,"id",d="id_format_row"+l[4].formatTag),_(f,"placeholder",p=l[4].exampleInput||ut(l[4].valueType)),_(f,"class","align_left input_box svelte-1dnj419"),_(u,"class","svelte-1dnj419"),_(k,"class","align_right svelte-1dnj419"),_(j,"class","deleteIcon svelte-1dnj419"),_(A,"type","button"),_(A,"tooltip","Remove"),_(A,"class","mb-0.5 svelte-1dnj419"),_(E,"class","svelte-1dnj419")},m(P,T){N(P,e,T),m(e,t),m(t,n),m(e,i),m(e,r),m(r,a),m(e,c),m(e,u),m(u,f),ce(f,l[4].userInput),m(e,g),m(e,k),m(k,w),m(e,C),m(e,E),m(E,A),m(A,j),z($,j,null),m(e,R),L=!0,V||(S=[de(f,"input",I),de(f,"blur",function(){ts(l[4].userInput=void 0)&&(l[4].userInput=void 0).apply(this,arguments)}),de(A,"click",O)],V=!0)},p(P,T){l=P,(!L||T&1)&&s!==(s=l[4].formatTag+"")&&he(n,s),(!L||T&1)&&o!==(o=l[4].formatCode+"")&&he(a,o),(!L||T&1&&d!==(d="id_format_row"+l[4].formatTag))&&_(f,"id",d),(!L||T&1&&p!==(p=l[4].exampleInput||ut(l[4].valueType)))&&_(f,"placeholder",p),T&1&&f.value!==l[4].userInput&&ce(f,l[4].userInput),(!L||T&1)&&v!==(v=ct(l[4])+"")&&he(w,v)},i(P){L||(F($.$$.fragment,P),L=!0)},o(P){H($.$$.fragment,P),L=!1},d(P){P&&h(e),J($),V=!1,Ye(S)}}}function ao(l){let e,t,s='Format Name Format Code Example Input Example Output ',n,i,r=pe(l[0]),o=[];for(let c=0;cH(o[c],1,1,()=>{o[c]=null});return{c(){e=b("table"),t=b("thead"),t.innerHTML=s,n=M();for(let c=0;cn(o);return l.$$set=o=>{"formats"in o&&t(0,s=o.formats),"deleteHandler"in o&&t(1,n=o.deleteHandler)},[s,n,i,r]}class uo extends ye{constructor(e){super(),ke(this,e,co,ao,be,{formats:0,deleteHandler:1})}}function pn(l,e,t){const s=l.slice();return s[14]=e[t],s}function gn(l){let e,t;return e=new it({props:{headerText:"Saved Custom Formats",expanded:!1,$$slots:{default:[fo]},$$scope:{ctx:l}}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p(s,n){const i={};n&131073&&(i.$$scope={dirty:n,ctx:s}),e.$set(i)},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function fo(l){let e,t;return e=new uo({props:{formats:l[0].customFormats,deleteHandler:l[6]}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p(s,n){const i={};n&1&&(i.formats=s[0].customFormats),e.$set(i)},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function _n(l){let e,t=l[14]+"",s,n;return{c(){e=b("option"),s=Z(t),n=M(),this.h()},l(i){e=y(i,"OPTION",{});var r=D(e);s=Q(r,t),n=q(r),r.forEach(h),this.h()},h(){e.__value=l[14],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s),m(e,n)},p:ee,d(i){i&&h(e)}}}function ho(l){let e,t,s,n,i="Value Type",r,o,a,c,u,f="Format Name",d,p,g,k,v,w="Format Code",C,E,A,j,$,R,L,V,S,I,O,P,T,B,U=l[0].customFormats&&l[0].customFormats.length>0&&gn(l),W=pe(l[5]),x=[];for(let G=0;Gl[9].call(o)),_(s,"class","input-item svelte-ylbsw4"),_(u,"for","formatTag"),_(u,"class","svelte-ylbsw4"),_(p,"id","formatTag"),_(p,"type","text"),_(p,"placeholder","myformat"),_(p,"class","svelte-ylbsw4"),_(c,"class","input-item svelte-ylbsw4"),_(v,"for","formatCode"),_(v,"class","svelte-ylbsw4"),_(E,"id","formatCode"),_(E,"type","text"),_(E,"placeholder",A=l[3]==="date"?"mm/dd/yyyy":"$#,##0.0"),_(E,"class","svelte-ylbsw4"),_(k,"class","input-item svelte-ylbsw4"),_(R,"id","submitCustomFormatButton"),_(R,"type","submit"),R.disabled=V=!(l[1]&&l[2]),_(R,"class","svelte-ylbsw4"),_($,"class","new-format-buttons svelte-ylbsw4"),O.a=null,_(I,"class","error svelte-ylbsw4"),_(t,"autocomplete","off"),_(t,"class","addFormatForm")},m(G,se){U&&U.m(G,se),N(G,e,se),N(G,t,se),m(t,s),m(s,n),m(s,r),m(s,o);for(let ne=0;ne0?U?(U.p(G,se),se&1&&F(U,1)):(U=gn(G),U.c(),F(U,1),U.m(e.parentNode,e)):U&&(_e(),H(U,1,1,()=>{U=null}),ve()),se&32){W=pe(G[5]);let ne;for(ne=0;ne0)t(4,c=w.join("
    "));else{let E=await(await fetch(Xt("/api/customFormattingSettings.json"),{method:"POST",body:JSON.stringify({newCustomFormat:{formatTag:r,formatCode:o,valueType:a}})})).json();E?(t(0,n=E),d()):t(4,c=`Unable to create new custom format ${r}`)}}function d(){t(1,r=""),t(2,o=""),t(3,a="number"),t(4,c="")}function p(){var j;let w=[];/^[a-zA-Z][a-zA-Z0-9]*$/.test(r)||w.push(`"${r}" is not a valid format name. The format name should always start with a letter and only contain letters and numbers.`);let C=10,E,A;a==="date"&&(C=new Date);try{E=Fl.format(o,C)}catch($){A=$}return E||w.push(`Format "${o}" is invalid for type "${a}".`),A&&w.push(A),(s.find($=>$.formatTag===r)||(j=n.customFormats)!=null&&j.find($=>$.formatTag===r))&&w.push(`The format name "${r}"" is already assigned to an existing format.`),w}function g(){a=$t(this),t(3,a),t(5,i)}function k(){r=this.value,t(1,r)}function v(){o=this.value,t(2,o)}return l.$$set=w=>{"builtInFormats"in w&&t(8,s=w.builtInFormats),"customFormattingSettings"in w&&t(0,n=w.customFormattingSettings)},[n,r,o,a,c,i,u,f,s,g,k,v]}class po extends ye{constructor(e){super(),ke(this,e,mo,ho,be,{builtInFormats:8,customFormattingSettings:0})}}function go(l){let e,t;return e=new gs({props:{formats:Tt.filter(ko)}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p:ee,i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function _o(l){let e,t;return e=new oo({props:{formats:Tt.filter(wo)}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p:ee,i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function vo(l){let e,t;return e=new gs({props:{formats:Tt.filter(Co)}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p:ee,i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function bo(l){let e,t;return e=new gs({props:{formats:Tt.filter($o)}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p:ee,i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function yo(l){let e,t,s,n,i="Value Formatting",r,o,a=`Evidence supports built-in formats (like usd and pct) and + Excel-style formats (like $#,##0.0). The easiest way to apply these formats is + using component props. For example:`,c,u,f="In the Value component, you can use the fmt prop",d,p,g,k,v,w,C,E="In charts, you can use the xFmt and yFmt props",A,j,$,R,L,V,S,I=`You can also set formats within your SQL queries using SQL format tags. Use these by + aliasing your column names and appending a format. For example:`,O,P,T,B,U,W,x,G,se="Built-in Formats",ne,$e,Ee="All built-in formats are listed below for reference.",ae,Se,ie,ue,oe,we,Ce,re,te,le,Ne,Te="Custom Formats",De,je,Re='Add new formats to your project. Custom formats use excel-style format codes.',Rt,xe,Ut,ze,_s='Learn more about formatting in Evidence →',St;return g=new Kt({props:{code:l[3]}}),$=new Kt({props:{code:l[2]}}),T=new Kt({props:{code:l[1]}}),Se=new it({props:{headerText:"Dates",expanded:!1,$$slots:{default:[go]},$$scope:{ctx:l}}}),ue=new it({props:{headerText:"Currencies",expanded:!1,$$slots:{default:[_o]},$$scope:{ctx:l}}}),we=new it({props:{headerText:"Numbers",expanded:!1,$$slots:{default:[vo]},$$scope:{ctx:l}}}),re=new it({props:{headerText:"Percentages",expanded:!1,$$slots:{default:[bo]},$$scope:{ctx:l}}}),xe=new po({props:{builtInFormats:Tt,customFormattingSettings:l[0]}}),{c(){e=b("form"),t=b("div"),s=b("div"),n=b("h2"),n.textContent=i,r=M(),o=b("p"),o.innerHTML=a,c=M(),u=b("p"),u.innerHTML=f,d=M(),p=b("div"),Y(g.$$.fragment),k=M(),v=b("br"),w=M(),C=b("p"),C.innerHTML=E,A=M(),j=b("div"),Y($.$$.fragment),R=M(),L=b("br"),V=M(),S=b("p"),S.textContent=I,O=M(),P=b("div"),Y(T.$$.fragment),B=M(),U=b("p"),W=M(),x=b("div"),G=b("h2"),G.textContent=se,ne=M(),$e=b("p"),$e.textContent=Ee,ae=M(),Y(Se.$$.fragment),ie=M(),Y(ue.$$.fragment),oe=M(),Y(we.$$.fragment),Ce=M(),Y(re.$$.fragment),te=M(),le=b("div"),Ne=b("h2"),Ne.textContent=Te,De=M(),je=b("p"),je.innerHTML=Re,Rt=M(),Y(xe.$$.fragment),Ut=M(),ze=b("footer"),ze.innerHTML=_s,this.h()},l(fe){e=y(fe,"FORM",{id:!0,class:!0});var Ie=D(e);t=y(Ie,"DIV",{class:!0});var Ue=D(t);s=y(Ue,"DIV",{class:!0});var ge=D(s);n=y(ge,"H2",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-1pt91sq"&&(n.textContent=i),r=q(ge),o=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-y867uy"&&(o.innerHTML=a),c=q(ge),u=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(u)!=="svelte-1b5sps4"&&(u.innerHTML=f),d=q(ge),p=y(ge,"DIV",{class:!0});var gt=D(p);X(g.$$.fragment,gt),gt.forEach(h),k=q(ge),v=y(ge,"BR",{}),w=q(ge),C=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-1uln7kb"&&(C.innerHTML=E),A=q(ge),j=y(ge,"DIV",{class:!0});var _t=D(j);X($.$$.fragment,_t),_t.forEach(h),R=q(ge),L=y(ge,"BR",{}),V=q(ge),S=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(S)!=="svelte-146t22d"&&(S.textContent=I),O=q(ge),P=y(ge,"DIV",{class:!0});var vt=D(P);X(T.$$.fragment,vt),vt.forEach(h),B=q(ge),U=y(ge,"P",{class:!0}),D(U).forEach(h),ge.forEach(h),W=q(Ue),x=y(Ue,"DIV",{class:!0});var Pe=D(x);G=y(Pe,"H2",{class:!0,"data-svelte-h":!0}),K(G)!=="svelte-ef4j4e"&&(G.textContent=se),ne=q(Pe),$e=y(Pe,"P",{class:!0,"data-svelte-h":!0}),K($e)!=="svelte-1uuy1j1"&&($e.textContent=Ee),ae=q(Pe),X(Se.$$.fragment,Pe),ie=q(Pe),X(ue.$$.fragment,Pe),oe=q(Pe),X(we.$$.fragment,Pe),Ce=q(Pe),X(re.$$.fragment,Pe),Pe.forEach(h),te=q(Ue),le=y(Ue,"DIV",{class:!0});var tt=D(le);Ne=y(tt,"H2",{class:!0,"data-svelte-h":!0}),K(Ne)!=="svelte-1avfhcl"&&(Ne.textContent=Te),De=q(tt),je=y(tt,"P",{class:!0,"data-svelte-h":!0}),K(je)!=="svelte-zf74ph"&&(je.innerHTML=Re),Rt=q(tt),X(xe.$$.fragment,tt),tt.forEach(h),Ue.forEach(h),Ut=q(Ie),ze=y(Ie,"FOOTER",{class:!0,"data-svelte-h":!0}),K(ze)!=="svelte-104hjhg"&&(ze.innerHTML=_s),Ie.forEach(h),this.h()},h(){_(n,"class","svelte-q2acau"),_(o,"class","svelte-q2acau"),_(u,"class","svelte-q2acau"),_(p,"class","code-container p-2 svelte-q2acau"),_(C,"class","svelte-q2acau"),_(j,"class","code-container p-2 svelte-q2acau"),_(S,"class","svelte-q2acau"),_(P,"class","code-container p-2 svelte-q2acau"),_(U,"class","svelte-q2acau"),_(s,"class","panel svelte-q2acau"),_(G,"class","svelte-q2acau"),_($e,"class","svelte-q2acau"),_(x,"class","panel svelte-q2acau"),_(Ne,"class","svelte-q2acau"),_(je,"class","svelte-q2acau"),_(le,"class","panel svelte-q2acau"),_(t,"class","formatting-settings-box svelte-q2acau"),_(ze,"class","svelte-q2acau"),_(e,"id","formatting"),_(e,"class","svelte-q2acau")},m(fe,Ie){N(fe,e,Ie),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),m(s,c),m(s,u),m(s,d),m(s,p),z(g,p,null),m(s,k),m(s,v),m(s,w),m(s,C),m(s,A),m(s,j),z($,j,null),m(s,R),m(s,L),m(s,V),m(s,S),m(s,O),m(s,P),z(T,P,null),m(s,B),m(s,U),m(t,W),m(t,x),m(x,G),m(x,ne),m(x,$e),m(x,ae),z(Se,x,null),m(x,ie),z(ue,x,null),m(x,oe),z(we,x,null),m(x,Ce),z(re,x,null),m(t,te),m(t,le),m(le,Ne),m(le,De),m(le,je),m(le,Rt),z(xe,le,null),m(e,Ut),m(e,ze),St=!0},p(fe,[Ie]){const Ue={};Ie&16&&(Ue.$$scope={dirty:Ie,ctx:fe}),Se.$set(Ue);const ge={};Ie&16&&(ge.$$scope={dirty:Ie,ctx:fe}),ue.$set(ge);const gt={};Ie&16&&(gt.$$scope={dirty:Ie,ctx:fe}),we.$set(gt);const _t={};Ie&16&&(_t.$$scope={dirty:Ie,ctx:fe}),re.$set(_t);const vt={};Ie&1&&(vt.customFormattingSettings=fe[0]),xe.$set(vt)},i(fe){St||(F(g.$$.fragment,fe),F($.$$.fragment,fe),F(T.$$.fragment,fe),F(Se.$$.fragment,fe),F(ue.$$.fragment,fe),F(we.$$.fragment,fe),F(re.$$.fragment,fe),F(xe.$$.fragment,fe),St=!0)},o(fe){H(g.$$.fragment,fe),H($.$$.fragment,fe),H(T.$$.fragment,fe),H(Se.$$.fragment,fe),H(ue.$$.fragment,fe),H(we.$$.fragment,fe),H(re.$$.fragment,fe),H(xe.$$.fragment,fe),St=!1},d(fe){fe&&h(e),J(g),J($),J(T),J(Se),J(ue),J(we),J(re),J(xe)}}}const ko=l=>l.formatCategory==="date",wo=l=>l.formatCategory==="currency",Co=l=>l.formatCategory==="number",$o=l=>l.formatCategory==="percent";function To(l,e,t){let{customFormattingSettings:s}=e,n=`select + growth as growth_pct, -- formatted as a percentage + sales as sales_usd -- formatted as US dollars +from table`,i=``,r="";return l.$$set=o=>{"customFormattingSettings"in o&&t(0,s=o.customFormattingSettings)},[s,n,i,r]}class Eo extends ye{constructor(e){super(),ke(this,e,To,yo,be,{customFormattingSettings:0})}}function So(l){let e,t,s="Each time you run a query, we get the following pieces of information:",n,i,r="
  • A random identifier that is stored in .evidence/customization/.profile.json
  • An anonymized identifier based on the git repository you're using for the project
  • Whether your project is running in development or build mode
  • Whether your query returned from the cache, from your datasource, or returned an error
  • The type of Evidence datasource connectors you are using (postgres, snowflake, etc.)
  • The operating system your project is running on (windows, mac, etc.)
  • ",o,a,c="Sharing anonymous usage data is one of the best ways you can support Evidence.",u,f,d,p="Share anonymous usage data",g,k,v,w,C,E,A;return{c(){e=b("div"),t=b("p"),t.textContent=s,n=M(),i=b("ol"),i.innerHTML=r,o=M(),a=b("p"),a.textContent=c,u=M(),f=b("div"),d=b("label"),d.textContent=p,g=M(),k=b("label"),v=b("input"),w=M(),C=b("span"),this.h()},l(j){e=y(j,"DIV",{});var $=D(e);t=y($,"P",{class:!0,"data-svelte-h":!0}),K(t)!=="svelte-5h9nz3"&&(t.textContent=s),n=q($),i=y($,"OL",{class:!0,"data-svelte-h":!0}),K(i)!=="svelte-1yd05qf"&&(i.innerHTML=r),o=q($),a=y($,"P",{class:!0,"data-svelte-h":!0}),K(a)!=="svelte-1o2o3k3"&&(a.textContent=c),u=q($),f=y($,"DIV",{class:!0});var R=D(f);d=y(R,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),K(d)!=="svelte-2u0hrt"&&(d.textContent=p),g=q(R),k=y(R,"LABEL",{class:!0});var L=D(k);v=y(L,"INPUT",{type:!0,id:!0,class:!0}),w=q(L),C=y(L,"SPAN",{class:!0}),D(C).forEach(h),L.forEach(h),R.forEach(h),$.forEach(h),this.h()},h(){_(t,"class","svelte-kgapno"),_(i,"class","list-decimal px-8"),_(a,"class","svelte-kgapno"),_(d,"for","telemetry-toggle"),_(d,"class","svelte-kgapno"),_(v,"type","checkbox"),_(v,"id","telemetry-toggle"),_(v,"class","svelte-kgapno"),_(C,"class","slider svelte-kgapno"),_(k,"class","switch svelte-kgapno"),_(f,"class","input-item svelte-kgapno")},m(j,$){N(j,e,$),m(e,t),m(e,n),m(e,i),m(e,o),m(e,a),m(e,u),m(e,f),m(f,d),m(f,g),m(f,k),m(k,v),v.checked=l[0],m(k,w),m(k,C),E||(A=[de(v,"change",l[3]),de(v,"change",l[1])],E=!0)},p(j,$){$&1&&(v.checked=j[0])},d(j){j&&h(e),E=!1,Ye(A)}}}function Io(l){let e,t,s,n,i="Telemetry",r,o,a=`Evidence collects anonymous usage data to help us understand how often the tool is being + used.`,c,u,f,d,p='The source code for our telemetry can be found here →',g;return u=new it({props:{headerText:"More",expanded:!1,$$slots:{default:[So]},$$scope:{ctx:l}}}),{c(){e=b("form"),t=b("div"),s=b("div"),n=b("h2"),n.textContent=i,r=M(),o=b("p"),o.textContent=a,c=M(),Y(u.$$.fragment),f=M(),d=b("footer"),d.innerHTML=p,this.h()},l(k){e=y(k,"FORM",{id:!0,class:!0});var v=D(e);t=y(v,"DIV",{class:!0});var w=D(t);s=y(w,"DIV",{class:!0});var C=D(s);n=y(C,"H2",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-picrrj"&&(n.textContent=i),r=q(C),o=y(C,"P",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-1tknaya"&&(o.textContent=a),c=q(C),X(u.$$.fragment,C),C.forEach(h),w.forEach(h),f=q(v),d=y(v,"FOOTER",{class:!0,"data-svelte-h":!0}),K(d)!=="svelte-ichbwf"&&(d.innerHTML=p),v.forEach(h),this.h()},h(){_(n,"class","svelte-kgapno"),_(o,"class","svelte-kgapno"),_(s,"class","panel svelte-kgapno"),_(t,"class","telemetry-settings-box svelte-kgapno"),_(d,"class","svelte-kgapno"),_(e,"id","telemetry"),_(e,"class","svelte-kgapno")},m(k,v){N(k,e,v),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),m(s,c),z(u,s,null),m(e,f),m(e,d),g=!0},p(k,[v]){const w={};v&17&&(w.$$scope={dirty:v,ctx:k}),u.$set(w)},i(k){g||(F(u.$$.fragment,k),g=!0)},o(k){H(u.$$.fragment,k),g=!1},d(k){k&&h(e),J(u)}}}function No(l,e,t){let{settings:s}=e,n=(s.send_anonymous_usage_stats??"yes")==="yes";async function i(){t(2,s.send_anonymous_usage_stats=n?"yes":"no",s),await fetch(Xt("/api/settings.json"),{method:"POST",body:JSON.stringify({settings:s})})}function r(){n=this.checked,t(0,n)}return l.$$set=o=>{"settings"in o&&t(2,s=o.settings)},[n,i,s,r]}class Ao extends ye{constructor(e){super(),ke(this,e,No,Io,be,{settings:2})}}function Lo(l){let e,t,s;return t=new Me({props:{src:os,theme:"filled",class:"h-6 w-6 text-negative"}}),{c(){e=b("span"),Y(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=D(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitx-icon svelte-1xfec5")},m(n,i){N(n,e,i),z(t,e,null),s=!0},i(n){s||(F(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function Oo(l){let e,t,s;return t=new Me({props:{src:Ln,theme:"filled",class:"h-6 w-6 text-positive"}}),{c(){e=b("span"),Y(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=D(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitcheck-icon svelte-1xfec5")},m(n,i){N(n,e,i),z(t,e,null),s=!0},i(n){s||(F(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function Po(l){let e,t,s,n,i="Use your code editor to initialize a repo or run `git init` in a terminal",r;return t=new Me({props:{src:On,class:"h-5 w-5 pb-0.5"}}),{c(){e=b("span"),Y(t.$$.fragment),s=M(),n=b("span"),n.textContent=i,this.h()},l(o){e=y(o,"SPAN",{class:!0});var a=D(e);X(t.$$.fragment,a),s=q(a),n=y(a,"SPAN",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-qlaf2o"&&(n.textContent=i),a.forEach(h),this.h()},h(){_(n,"class","info-msg svelte-1xfec5"),_(e,"class","help-icon svelte-1xfec5")},m(o,a){N(o,e,a),z(t,e,null),m(e,s),m(e,n),r=!0},p:ee,i(o){r||(F(t.$$.fragment,o),r=!0)},o(o){H(t.$$.fragment,o),r=!1},d(o){o&&h(e),J(t)}}}function Do(l){let e,t,s,n=l[0].localGitRepo+"",i;return{c(){e=b("div"),t=b("span"),s=Z("Tracking "),i=Z(n),this.h()},l(r){e=y(r,"DIV",{class:!0});var o=D(e);t=y(o,"SPAN",{class:!0});var a=D(t);s=Q(a,"Tracking "),i=Q(a,n),a.forEach(h),o.forEach(h),this.h()},h(){_(t,"class","repo-location svelte-1xfec5"),_(e,"class","result-msg svelte-1xfec5")},m(r,o){N(r,e,o),m(e,t),m(t,s),m(t,i)},p(r,o){o&1&&n!==(n=r[0].localGitRepo+"")&&he(i,n)},i:ee,o:ee,d(r){r&&h(e)}}}function jo(l){let e,t,s;return t=new Me({props:{src:os,theme:"filled",class:"h-6 w-6 text-negative"}}),{c(){e=b("span"),Y(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=D(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitx-icon svelte-1xfec5")},m(n,i){N(n,e,i),z(t,e,null),s=!0},i(n){s||(F(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function Mo(l){let e,t,s;return t=new Me({props:{src:Ln,theme:"filled",class:"h-6 w-6 text-positive"}}),{c(){e=b("span"),Y(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=D(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitcheck-icon svelte-1xfec5")},m(n,i){N(n,e,i),z(t,e,null),s=!0},i(n){s||(F(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function qo(l){let e,t,s,n,i="Publish your git repo to a platform like GitHub or GitLab",r;return t=new Me({props:{src:On,class:"h-5 w-5 pb-0.5"}}),{c(){e=b("span"),Y(t.$$.fragment),s=M(),n=b("span"),n.textContent=i,this.h()},l(o){e=y(o,"SPAN",{class:!0});var a=D(e);X(t.$$.fragment,a),s=q(a),n=y(a,"SPAN",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-mv1gko"&&(n.textContent=i),a.forEach(h),this.h()},h(){_(n,"class","info-msg svelte-1xfec5"),_(e,"class","help-icon svelte-1xfec5")},m(o,a){N(o,e,a),z(t,e,null),m(e,s),m(e,n),r=!0},p:ee,i(o){r||(F(t.$$.fragment,o),r=!0)},o(o){H(t.$$.fragment,o),r=!1},d(o){o&&h(e),J(t)}}}function Fo(l){let e,t,s,n=l[0].gitRepo.replace(".git","")+"",i,r;return{c(){e=b("div"),t=b("a"),s=b("span"),i=Z(n),this.h()},l(o){e=y(o,"DIV",{class:!0});var a=D(e);t=y(a,"A",{href:!0,target:!0,rel:!0});var c=D(t);s=y(c,"SPAN",{class:!0});var u=D(s);i=Q(u,n),u.forEach(h),c.forEach(h),a.forEach(h),this.h()},h(){_(s,"class","repo-location svelte-1xfec5"),_(t,"href",r=l[0].gitRepo.replace(".git","")),_(t,"target","_blank"),_(t,"rel","noreferrer"),_(e,"class","result-msg svelte-1xfec5")},m(o,a){N(o,e,a),m(e,t),m(t,s),m(s,i)},p(o,a){a&1&&n!==(n=o[0].gitRepo.replace(".git","")+"")&&he(i,n),a&1&&r!==(r=o[0].gitRepo.replace(".git",""))&&_(t,"href",r)},i:ee,o:ee,d(o){o&&h(e)}}}function Vo(l){let e,t,s,n,i="Version Control",r,o,a,c,u,f,d="Local Git Repo",p,g,k,v,w,C,E,A,j,$="Git Repo Published",R,L,V,S,I,O='Learn more about Setting Up Version Control →',P;const T=[Oo,Lo],B=[];function U(ie,ue){return ie[0].localGitRepo?0:1}a=U(l),c=B[a]=T[a](l);const W=[Do,Po],x=[];function G(ie,ue){return ie[0].localGitRepo?0:1}g=G(l),k=x[g]=W[g](l);const se=[Mo,jo],ne=[];function $e(ie,ue){return ie[0].gitRepo?0:1}C=$e(l),E=ne[C]=se[C](l);const Ee=[Fo,qo],ae=[];function Se(ie,ue){return ie[0].gitRepo?0:1}return L=Se(l),V=ae[L]=Ee[L](l),{c(){e=b("form"),t=b("div"),s=b("div"),n=b("h2"),n.textContent=i,r=Z(` + Use version control to keep track of changes to your project. A published git repo is needed if + you want to deploy your Evidence project online. + + `),o=b("div"),c.c(),u=M(),f=b("span"),f.textContent=d,p=M(),k.c(),v=M(),w=b("div"),E.c(),A=M(),j=b("span"),j.textContent=$,R=M(),V.c(),S=M(),I=b("footer"),I.innerHTML=O,this.h()},l(ie){e=y(ie,"FORM",{id:!0,class:!0});var ue=D(e);t=y(ue,"DIV",{class:!0});var oe=D(t);s=y(oe,"DIV",{class:!0});var we=D(s);n=y(we,"H2",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-n9hgtt"&&(n.textContent=i),r=Q(we,` + Use version control to keep track of changes to your project. A published git repo is needed if + you want to deploy your Evidence project online. + + `),o=y(we,"DIV",{class:!0});var Ce=D(o);c.l(Ce),u=q(Ce),f=y(Ce,"SPAN",{class:!0,"data-svelte-h":!0}),K(f)!=="svelte-moy7v6"&&(f.textContent=d),p=q(Ce),k.l(Ce),Ce.forEach(h),v=q(we),w=y(we,"DIV",{class:!0});var re=D(w);E.l(re),A=q(re),j=y(re,"SPAN",{class:!0,"data-svelte-h":!0}),K(j)!=="svelte-1wsobt7"&&(j.textContent=$),R=q(re),V.l(re),re.forEach(h),we.forEach(h),oe.forEach(h),S=q(ue),I=y(ue,"FOOTER",{class:!0,"data-svelte-h":!0}),K(I)!=="svelte-1e01ncp"&&(I.innerHTML=O),ue.forEach(h),this.h()},h(){_(n,"class","svelte-1xfec5"),_(f,"class","item-label svelte-1xfec5"),_(o,"class","git-item svelte-1xfec5"),_(j,"class","item-label svelte-1xfec5"),_(w,"class","git-item svelte-1xfec5"),_(s,"class","panel svelte-1xfec5"),_(t,"class","version-control-box svelte-1xfec5"),_(I,"class","svelte-1xfec5"),_(e,"id","version-control"),_(e,"class","svelte-1xfec5")},m(ie,ue){N(ie,e,ue),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),B[a].m(o,null),m(o,u),m(o,f),m(o,p),x[g].m(o,null),m(s,v),m(s,w),ne[C].m(w,null),m(w,A),m(w,j),m(w,R),ae[L].m(w,null),m(e,S),m(e,I),P=!0},p(ie,[ue]){let oe=a;a=U(ie),a!==oe&&(_e(),H(B[oe],1,1,()=>{B[oe]=null}),ve(),c=B[a],c||(c=B[a]=T[a](ie),c.c()),F(c,1),c.m(o,u));let we=g;g=G(ie),g===we?x[g].p(ie,ue):(_e(),H(x[we],1,1,()=>{x[we]=null}),ve(),k=x[g],k?k.p(ie,ue):(k=x[g]=W[g](ie),k.c()),F(k,1),k.m(o,null));let Ce=C;C=$e(ie),C!==Ce&&(_e(),H(ne[Ce],1,1,()=>{ne[Ce]=null}),ve(),E=ne[C],E||(E=ne[C]=se[C](ie),E.c()),F(E,1),E.m(w,A));let re=L;L=Se(ie),L===re?ae[L].p(ie,ue):(_e(),H(ae[re],1,1,()=>{ae[re]=null}),ve(),V=ae[L],V?V.p(ie,ue):(V=ae[L]=Ee[L](ie),V.c()),F(V,1),V.m(w,null))},i(ie){P||(F(c),F(k),F(E),F(V),P=!0)},o(ie){H(c),H(k),H(E),H(V),P=!1},d(ie){ie&&h(e),B[a].d(),x[g].d(),ne[C].d(),ae[L].d()}}}function Bo(l,e,t){let{settings:s}=e;return l.$$set=n=>{"settings"in n&&t(0,s=n.settings)},[s]}class Ho extends ye{constructor(e){super(),ke(this,e,Bo,Vo,be,{settings:0})}}const Ro=async({fetch:l,data:e})=>({...e,settings:{},gitIgnore:""}),ta=Object.freeze(Object.defineProperty({__proto__:null,load:Ro},Symbol.toStringTag,{value:"Module"}));function Uo(l){let e,t="Settings are only available in development mode.";return{c(){e=b("p"),e.textContent=t},l(s){e=y(s,"P",{"data-svelte-h":!0}),K(e)!=="svelte-591hpj"&&(e.textContent=t)},m(s,n){N(s,e,n)},p:ee,i:ee,o:ee,d(s){s&&h(e)}}}function Ko(l){let e,t,s,n,i,r,o,a,c,u,f,d,p;return t=new Ho({props:{settings:l[0]}}),n=new vr({props:{availableSourcePlugins:l[3],sources:l[2]}}),r=new Zr({props:{settings:l[0],sources:l[2]}}),a=new Eo({props:{customFormattingSettings:l[1]}}),u=new Ao({props:{settings:l[0]}}),{c(){e=b("div"),Y(t.$$.fragment),s=M(),Y(n.$$.fragment),i=M(),Y(r.$$.fragment),o=M(),Y(a.$$.fragment),c=M(),Y(u.$$.fragment),f=M(),d=b("br"),this.h()},l(g){e=y(g,"DIV",{class:!0});var k=D(e);X(t.$$.fragment,k),s=q(k),X(n.$$.fragment,k),i=q(k),X(r.$$.fragment,k),o=q(k),X(a.$$.fragment,k),c=q(k),X(u.$$.fragment,k),k.forEach(h),f=q(g),d=y(g,"BR",{}),this.h()},h(){_(e,"class","mt-12")},m(g,k){N(g,e,k),z(t,e,null),m(e,s),z(n,e,null),m(e,i),z(r,e,null),m(e,o),z(a,e,null),m(e,c),z(u,e,null),N(g,f,k),N(g,d,k),p=!0},p(g,k){const v={};k&1&&(v.settings=g[0]),t.$set(v);const w={};k&8&&(w.availableSourcePlugins=g[3]),k&4&&(w.sources=g[2]),n.$set(w);const C={};k&1&&(C.settings=g[0]),k&4&&(C.sources=g[2]),r.$set(C);const E={};k&2&&(E.customFormattingSettings=g[1]),a.$set(E);const A={};k&1&&(A.settings=g[0]),u.$set(A)},i(g){p||(F(t.$$.fragment,g),F(n.$$.fragment,g),F(r.$$.fragment,g),F(a.$$.fragment,g),F(u.$$.fragment,g),p=!0)},o(g){H(t.$$.fragment,g),H(n.$$.fragment,g),H(r.$$.fragment,g),H(a.$$.fragment,g),H(u.$$.fragment,g),p=!1},d(g){g&&(h(e),h(f),h(d)),J(t),J(n),J(r),J(a),J(u)}}}function xo(l){let e,t,s,n;const i=[Ko,Uo],r=[];function o(a,c){return 1}return e=o(),t=r[e]=i[e](l),{c(){t.c(),s=me()},l(a){t.l(a),s=me()},m(a,c){r[e].m(a,c),N(a,s,c),n=!0},p(a,[c]){t.p(a,c)},i(a){n||(F(t),n=!0)},o(a){H(t),n=!1},d(a){a&&h(s),r[e].d(a)}}}function Go(l,e,t){let{data:s}=e,{settings:n,customFormattingSettings:i,sources:r,plugins:o}=s;return l.$$set=a=>{"data"in a&&t(4,s=a.data)},l.$$.update=()=>{l.$$.dirty&16&&t(0,{settings:n,customFormattingSettings:i,sources:r,plugins:o}=s,n,(t(1,i),t(4,s)),(t(2,r),t(4,s)),(t(3,o),t(4,s)))},[n,i,r,o,s]}class sa extends ye{constructor(e){super(),ke(this,e,Go,xo,be,{data:4})}}export{sa as component,ta as universal};