Files
obsidian-workflow-template/.obsidian/plugins/obsidian-mkdocs-publisher/main.js
Mathis Gauthey f366d5b7b6 Initial commit
2023-08-05 19:14:53 +01:00

65 lines
343 KiB
JavaScript

/** GENERATED BY OBSIDIAN-PLUGIN-CLI, DO NOT EDIT */
var oc=Object.create;var tn=Object.defineProperty;var uc=Object.getOwnPropertyDescriptor;var lc=Object.getOwnPropertyNames;var cc=Object.getPrototypeOf,dc=Object.prototype.hasOwnProperty;var As=t=>tn(t,"__esModule",{value:!0});var at=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ei=(t,e)=>{As(t);for(var r in e)tn(t,r,{get:e[r],enumerable:!0})},hc=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of lc(e))!dc.call(t,n)&&n!=="default"&&tn(t,n,{get:()=>e[n],enumerable:!(r=uc(e,n))||r.enumerable});return t},W=t=>hc(As(tn(t!=null?oc(cc(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var g=(t,e,r)=>new Promise((n,i)=>{var s=u=>{try{o(r.next(u))}catch(c){i(c)}},a=u=>{try{o(r.throw(u))}catch(c){i(c)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((r=r.apply(t,e)).next())});var ns=at(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});require("obsidian");var bt=class extends Error{},Ba=class extends bt{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},Ia=class extends bt{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},ja=class extends bt{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},ar=class extends bt{},Pi=class extends bt{constructor(e){super(`Invalid unit ${e}`)}},ke=class extends bt{},ut=class extends bt{constructor(){super("Zone is an abstract class")}},P="numeric",Ve="short",Ce="long",wn={year:P,month:P,day:P},Ga={year:P,month:Ve,day:P},Dd={year:P,month:Ve,day:P,weekday:Ve},_a={year:P,month:Ce,day:P},Va={year:P,month:Ce,day:P,weekday:Ce},$a={hour:P,minute:P},Ha={hour:P,minute:P,second:P},Ua={hour:P,minute:P,second:P,timeZoneName:Ve},qa={hour:P,minute:P,second:P,timeZoneName:Ce},Wa={hour:P,minute:P,hourCycle:"h23"},Ka={hour:P,minute:P,second:P,hourCycle:"h23"},za={hour:P,minute:P,second:P,hourCycle:"h23",timeZoneName:Ve},Ya={hour:P,minute:P,second:P,hourCycle:"h23",timeZoneName:Ce},Za={year:P,month:P,day:P,hour:P,minute:P},Ja={year:P,month:P,day:P,hour:P,minute:P,second:P},Qa={year:P,month:Ve,day:P,hour:P,minute:P},Xa={year:P,month:Ve,day:P,hour:P,minute:P,second:P},vd={year:P,month:Ve,day:P,weekday:Ve,hour:P,minute:P},eo={year:P,month:Ce,day:P,hour:P,minute:P,timeZoneName:Ve},to={year:P,month:Ce,day:P,hour:P,minute:P,second:P,timeZoneName:Ve},ro={year:P,month:Ce,day:P,weekday:Ce,hour:P,minute:P,timeZoneName:Ce},no={year:P,month:Ce,day:P,weekday:Ce,hour:P,minute:P,second:P,timeZoneName:Ce},or=class{get type(){throw new ut}get name(){throw new ut}get ianaName(){return this.name}get isUniversal(){throw new ut}offsetName(e,r){throw new ut}formatOffset(e,r){throw new ut}offset(e){throw new ut}equals(e){throw new ut}get isValid(){throw new ut}},Ri=null,Rr=class extends or{static get instance(){return Ri===null&&(Ri=new Rr),Ri}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:r,locale:n}){return Do(e,r,n)}formatOffset(e,r){return Mr(this.offset(e),r)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},Fn={};function wd(t){return Fn[t]||(Fn[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Fn[t]}var Fd={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function xd(t,e){let r=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,i,s,a,o,u,c,d]=n;return[a,i,s,o,u,c,d]}function Ed(t,e){let r=t.formatToParts(e),n=[];for(let i=0;i<r.length;i++){let{type:s,value:a}=r[i],o=Fd[s];s==="era"?n[o]=a:H(o)||(n[o]=parseInt(a,10))}return n}var xn={},Xe=class extends or{static create(e){return xn[e]||(xn[e]=new Xe(e)),xn[e]}static resetCache(){xn={},Fn={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(r){return!1}}constructor(e){super();this.zoneName=e,this.valid=Xe.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:r,locale:n}){return Do(e,r,n,this.name)}formatOffset(e,r){return Mr(this.offset(e),r)}offset(e){let r=new Date(e);if(isNaN(r))return NaN;let n=wd(this.name),[i,s,a,o,u,c,d]=n.formatToParts?Ed(n,r):xd(n,r);o==="BC"&&(i=-Math.abs(i)+1);let m=Gi({year:i,month:s,day:a,hour:u===24?0:u,minute:c,second:d,millisecond:0}),y=+r,w=y%1e3;return y-=w>=0?w:1e3+w,(m-y)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},io={};function kd(t,e={}){let r=JSON.stringify([t,e]),n=io[r];return n||(n=new Intl.ListFormat(t,e),io[r]=n),n}var Ai={};function Ni(t,e={}){let r=JSON.stringify([t,e]),n=Ai[r];return n||(n=new Intl.DateTimeFormat(t,e),Ai[r]=n),n}var Li={};function Cd(t,e={}){let r=JSON.stringify([t,e]),n=Li[r];return n||(n=new Intl.NumberFormat(t,e),Li[r]=n),n}var Mi={};function Sd(t,e={}){let{base:r,...n}=e,i=JSON.stringify([t,n]),s=Mi[i];return s||(s=new Intl.RelativeTimeFormat(t,e),Mi[i]=s),s}var Ar=null;function Td(){return Ar||(Ar=new Intl.DateTimeFormat().resolvedOptions().locale,Ar)}function Od(t){let e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));let r=t.indexOf("-u-");if(r===-1)return[t];{let n,i;try{n=Ni(t).resolvedOptions(),i=t}catch(o){let u=t.substring(0,r);n=Ni(u).resolvedOptions(),i=u}let{numberingSystem:s,calendar:a}=n;return[i,s,a]}}function Pd(t,e,r){return(r||e)&&(t.includes("-u-")||(t+="-u"),r&&(t+=`-ca-${r}`),e&&(t+=`-nu-${e}`)),t}function Rd(t){let e=[];for(let r=1;r<=12;r++){let n=M.utc(2016,r,1);e.push(t(n))}return e}function Ad(t){let e=[];for(let r=1;r<=7;r++){let n=M.utc(2016,11,13+r);e.push(t(n))}return e}function En(t,e,r,n,i){let s=t.listingMode(r);return s==="error"?null:s==="en"?n(e):i(e)}function Nd(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}var so=class{constructor(e,r,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:i,floor:s,...a}=n;if(!r||Object.keys(a).length>0){let o={useGrouping:!1,...n};n.padTo>0&&(o.minimumIntegerDigits=n.padTo),this.inf=Cd(e,o)}}format(e){if(this.inf){let r=this.floor?Math.floor(e):e;return this.inf.format(r)}else{let r=this.floor?Math.floor(e):ji(e,3);return ee(r,this.padTo)}}},ao=class{constructor(e,r,n){this.opts=n;let i;if(e.zone.isUniversal){let a=-1*(e.offset/60),o=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&Xe.create(o).valid?(i=o,this.dt=e):(i="UTC",n.timeZoneName?this.dt=e:this.dt=e.offset===0?e:M.fromMillis(e.ts+e.offset*60*1e3))}else e.zone.type==="system"?this.dt=e:(this.dt=e,i=e.zone.name);let s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=Ni(r,s)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}},oo=class{constructor(e,r,n){this.opts={style:"long",...n},!r&&bo()&&(this.rtf=Sd(e,n))}format(e,r){return this.rtf?this.rtf.format(e,r):Yd(r,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,r){return this.rtf?this.rtf.formatToParts(e,r):[]}},z=class{static fromOpts(e){return z.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,r,n,i=!1){let s=e||X.defaultLocale,a=s||(i?"en-US":Td()),o=r||X.defaultNumberingSystem,u=n||X.defaultOutputCalendar;return new z(a,o,u,s)}static resetCache(){Ar=null,Ai={},Li={},Mi={}}static fromObject({locale:e,numberingSystem:r,outputCalendar:n}={}){return z.create(e,r,n)}constructor(e,r,n,i){let[s,a,o]=Od(e);this.locale=s,this.numberingSystem=r||a||null,this.outputCalendar=n||o||null,this.intl=Pd(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Nd(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&r?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:z.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,r=!1,n=!0){return En(this,e,n,Fo,()=>{let i=r?{month:e,day:"numeric"}:{month:e},s=r?"format":"standalone";return this.monthsCache[s][e]||(this.monthsCache[s][e]=Rd(a=>this.extract(a,i,"month"))),this.monthsCache[s][e]})}weekdays(e,r=!1,n=!0){return En(this,e,n,ko,()=>{let i=r?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=r?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=Ad(a=>this.extract(a,i,"weekday"))),this.weekdaysCache[s][e]})}meridiems(e=!0){return En(this,void 0,e,()=>Co,()=>{if(!this.meridiemCache){let r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[M.utc(2016,11,13,9),M.utc(2016,11,13,19)].map(n=>this.extract(n,r,"dayperiod"))}return this.meridiemCache})}eras(e,r=!0){return En(this,e,r,So,()=>{let n={era:e};return this.eraCache[e]||(this.eraCache[e]=[M.utc(-40,1,1),M.utc(2017,1,1)].map(i=>this.extract(i,n,"era"))),this.eraCache[e]})}extract(e,r,n){let i=this.dtFormatter(e,r),s=i.formatToParts(),a=s.find(o=>o.type.toLowerCase()===n);return a?a.value:null}numberFormatter(e={}){return new so(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,r={}){return new ao(e,this.intl,r)}relFormatter(e={}){return new oo(this.intl,this.isEnglish(),e)}listFormatter(e={}){return kd(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}},Bi=null,me=class extends or{static get utcInstance(){return Bi===null&&(Bi=new me(0)),Bi}static instance(e){return e===0?me.utcInstance:new me(e)}static parseSpecifier(e){if(e){let r=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new me(Tn(r[1],r[2]))}return null}constructor(e){super();this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Mr(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Mr(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,r){return Mr(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},uo=class extends or{constructor(e){super();this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function yt(t,e){if(H(t)||t===null)return e;if(t instanceof or)return t;if(Ld(t)){let r=t.toLowerCase();return r==="default"?e:r==="local"||r==="system"?Rr.instance:r==="utc"||r==="gmt"?me.utcInstance:me.parseSpecifier(r)||Xe.create(t)}else return Bt(t)?me.instance(t):typeof t=="object"&&t.offset&&typeof t.offset=="number"?t:new uo(t)}var lo=()=>Date.now(),co="system",ho=null,fo=null,po=null,mo=60,go,X=class{static get now(){return lo}static set now(e){lo=e}static set defaultZone(e){co=e}static get defaultZone(){return yt(co,Rr.instance)}static get defaultLocale(){return ho}static set defaultLocale(e){ho=e}static get defaultNumberingSystem(){return fo}static set defaultNumberingSystem(e){fo=e}static get defaultOutputCalendar(){return po}static set defaultOutputCalendar(e){po=e}static get twoDigitCutoffYear(){return mo}static set twoDigitCutoffYear(e){mo=e%100}static get throwOnInvalid(){return go}static set throwOnInvalid(e){go=e}static resetCaches(){z.resetCache(),Xe.resetCache()}};function H(t){return typeof t=="undefined"}function Bt(t){return typeof t=="number"}function kn(t){return typeof t=="number"&&t%1==0}function Ld(t){return typeof t=="string"}function Md(t){return Object.prototype.toString.call(t)==="[object Date]"}function bo(){try{return typeof Intl!="undefined"&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function Bd(t){return Array.isArray(t)?t:[t]}function yo(t,e,r){if(t.length!==0)return t.reduce((n,i)=>{let s=[e(i),i];return n&&r(n[0],s[0])===n[0]?n:s},null)[1]}function Id(t,e){return e.reduce((r,n)=>(r[n]=t[n],r),{})}function ur(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function lt(t,e,r){return kn(t)&&t>=e&&t<=r}function jd(t,e){return t-e*Math.floor(t/e)}function ee(t,e=2){let r=t<0,n;return r?n="-"+(""+-t).padStart(e,"0"):n=(""+t).padStart(e,"0"),n}function Dt(t){if(!(H(t)||t===null||t===""))return parseInt(t,10)}function It(t){if(!(H(t)||t===null||t===""))return parseFloat(t)}function Ii(t){if(!(H(t)||t===null||t==="")){let e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function ji(t,e,r=!1){let n=10**e;return(r?Math.trunc:Math.round)(t*n)/n}function Nr(t){return t%4==0&&(t%100!=0||t%400==0)}function Lr(t){return Nr(t)?366:365}function Cn(t,e){let r=jd(e-1,12)+1,n=t+(e-r)/12;return r===2?Nr(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function Gi(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function Sn(t){let e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,r=t-1,n=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return e===4||n===3?53:52}function _i(t){return t>99?t:t>X.twoDigitCutoffYear?1900+t:2e3+t}function Do(t,e,r,n=null){let i=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(s.timeZone=n);let a={timeZoneName:e,...s},o=new Intl.DateTimeFormat(r,a).formatToParts(i).find(u=>u.type.toLowerCase()==="timezonename");return o?o.value:null}function Tn(t,e){let r=parseInt(t,10);Number.isNaN(r)&&(r=0);let n=parseInt(e,10)||0,i=r<0||Object.is(r,-0)?-n:n;return r*60+i}function vo(t){let e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new ke(`Invalid unit value ${t}`);return e}function On(t,e){let r={};for(let n in t)if(ur(t,n)){let i=t[n];if(i==null)continue;r[e(n)]=vo(i)}return r}function Mr(t,e){let r=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${ee(r,2)}:${ee(n,2)}`;case"narrow":return`${i}${r}${n>0?`:${n}`:""}`;case"techie":return`${i}${ee(r,2)}${ee(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Pn(t){return Id(t,["hour","minute","second","millisecond"])}var Gd=["January","February","March","April","May","June","July","August","September","October","November","December"],wo=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],_d=["J","F","M","A","M","J","J","A","S","O","N","D"];function Fo(t){switch(t){case"narrow":return[..._d];case"short":return[...wo];case"long":return[...Gd];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var xo=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Eo=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Vd=["M","T","W","T","F","S","S"];function ko(t){switch(t){case"narrow":return[...Vd];case"short":return[...Eo];case"long":return[...xo];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Co=["AM","PM"],$d=["Before Christ","Anno Domini"],Hd=["BC","AD"],Ud=["B","A"];function So(t){switch(t){case"narrow":return[...Ud];case"short":return[...Hd];case"long":return[...$d];default:return null}}function qd(t){return Co[t.hour<12?0:1]}function Wd(t,e){return ko(e)[t.weekday-1]}function Kd(t,e){return Fo(e)[t.month-1]}function zd(t,e){return So(e)[t.year<0?0:1]}function Yd(t,e,r="always",n=!1){let i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(t)===-1;if(r==="auto"&&s){let f=t==="days";switch(e){case 1:return f?"tomorrow":`next ${i[t][0]}`;case-1:return f?"yesterday":`last ${i[t][0]}`;case 0:return f?"today":`this ${i[t][0]}`}}let a=Object.is(e,-0)||e<0,o=Math.abs(e),u=o===1,c=i[t],d=n?u?c[1]:c[2]||c[1]:u?i[t][0]:t;return a?`${o} ${d} ago`:`in ${o} ${d}`}function To(t,e){let r="";for(let n of t)n.literal?r+=n.val:r+=e(n.val);return r}var Zd={D:wn,DD:Ga,DDD:_a,DDDD:Va,t:$a,tt:Ha,ttt:Ua,tttt:qa,T:Wa,TT:Ka,TTT:za,TTTT:Ya,f:Za,ff:Qa,fff:eo,ffff:ro,F:Ja,FF:Xa,FFF:to,FFFF:no},ue=class{static create(e,r={}){return new ue(e,r)}static parseFormat(e){let r=null,n="",i=!1,s=[];for(let a=0;a<e.length;a++){let o=e.charAt(a);o==="'"?(n.length>0&&s.push({literal:i,val:n}),r=null,n="",i=!i):i||o===r?n+=o:(n.length>0&&s.push({literal:!1,val:n}),n=o,r=o)}return n.length>0&&s.push({literal:i,val:n}),s}static macroTokenToFormatOpts(e){return Zd[e]}constructor(e,r){this.opts=r,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...r}).format()}formatDateTime(e,r={}){return this.loc.dtFormatter(e,{...this.opts,...r}).format()}formatDateTimeParts(e,r={}){return this.loc.dtFormatter(e,{...this.opts,...r}).formatToParts()}formatInterval(e,r={}){return this.loc.dtFormatter(e.start,{...this.opts,...r}).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,r={}){return this.loc.dtFormatter(e,{...this.opts,...r}).resolvedOptions()}num(e,r=0){if(this.opts.forceSimple)return ee(e,r);let n={...this.opts};return r>0&&(n.padTo=r),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,r){let n=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(y,w)=>this.loc.extract(e,y,w),a=y=>e.isOffsetFixed&&e.offset===0&&y.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,y.format):"",o=()=>n?qd(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(y,w)=>n?Kd(e,y):s(w?{month:y}:{month:y,day:"numeric"},"month"),c=(y,w)=>n?Wd(e,y):s(w?{weekday:y}:{weekday:y,month:"long",day:"numeric"},"weekday"),d=y=>{let w=ue.macroTokenToFormatOpts(y);return w?this.formatWithSystemDefault(e,w):y},f=y=>n?zd(e,y):s({era:y},"era"),m=y=>{switch(y){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return i?s({day:"numeric"},"day"):this.num(e.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return i?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(e.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(e.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return d(y)}};return To(ue.parseFormat(r),m)}formatDurationFromString(e,r){let n=u=>{switch(u[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=u=>c=>{let d=n(c);return d?this.num(u.get(d),c.length):c},s=ue.parseFormat(r),a=s.reduce((u,{literal:c,val:d})=>c?u:u.concat(d),[]),o=e.shiftTo(...a.map(n).filter(u=>u));return To(s,i(o))}},Re=class{constructor(e,r){this.reason=e,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},Oo=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function lr(...t){let e=t.reduce((r,n)=>r+n.source,"");return RegExp(`^${e}$`)}function cr(...t){return e=>t.reduce(([r,n,i],s)=>{let[a,o,u]=s(e,i);return[{...r,...a},o||n,u]},[{},null,1]).slice(0,2)}function dr(t,...e){if(t==null)return[null,null];for(let[r,n]of e){let i=r.exec(t);if(i)return n(i)}return[null,null]}function Po(...t){return(e,r)=>{let n={},i;for(i=0;i<t.length;i++)n[t[i]]=Dt(e[r+i]);return[n,null,r+i]}}var Ro=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Jd=`(?:${Ro.source}?(?:\\[(${Oo.source})\\])?)?`,Vi=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Ao=RegExp(`${Vi.source}${Jd}`),$i=RegExp(`(?:T${Ao.source})?`),Qd=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Xd=/(\d{4})-?W(\d\d)(?:-?(\d))?/,eh=/(\d{4})-?(\d{3})/,th=Po("weekYear","weekNumber","weekDay"),rh=Po("year","ordinal"),nh=/(\d{4})-(\d\d)-(\d\d)/,No=RegExp(`${Vi.source} ?(?:${Ro.source}|(${Oo.source}))?`),ih=RegExp(`(?: ${No.source})?`);function hr(t,e,r){let n=t[e];return H(n)?r:Dt(n)}function sh(t,e){return[{year:hr(t,e),month:hr(t,e+1,1),day:hr(t,e+2,1)},null,e+3]}function fr(t,e){return[{hours:hr(t,e,0),minutes:hr(t,e+1,0),seconds:hr(t,e+2,0),milliseconds:Ii(t[e+3])},null,e+4]}function Br(t,e){let r=!t[e]&&!t[e+1],n=Tn(t[e+1],t[e+2]),i=r?null:me.instance(n);return[{},i,e+3]}function Ir(t,e){let r=t[e]?Xe.create(t[e]):null;return[{},r,e+1]}var ah=RegExp(`^T?${Vi.source}$`),oh=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function uh(t){let[e,r,n,i,s,a,o,u,c]=t,d=e[0]==="-",f=u&&u[0]==="-",m=(y,w=!1)=>y!==void 0&&(w||y&&d)?-y:y;return[{years:m(It(r)),months:m(It(n)),weeks:m(It(i)),days:m(It(s)),hours:m(It(a)),minutes:m(It(o)),seconds:m(It(u),u==="-0"),milliseconds:m(Ii(c),f)}]}var lh={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Hi(t,e,r,n,i,s,a){let o={year:e.length===2?_i(Dt(e)):Dt(e),month:wo.indexOf(r)+1,day:Dt(n),hour:Dt(i),minute:Dt(s)};return a&&(o.second=Dt(a)),t&&(o.weekday=t.length>3?xo.indexOf(t)+1:Eo.indexOf(t)+1),o}var ch=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function dh(t){let[,e,r,n,i,s,a,o,u,c,d,f]=t,m=Hi(e,i,n,r,s,a,o),y;return u?y=lh[u]:c?y=0:y=Tn(d,f),[m,new me(y)]}function hh(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var fh=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,ph=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,mh=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Lo(t){let[,e,r,n,i,s,a,o]=t;return[Hi(e,i,n,r,s,a,o),me.utcInstance]}function gh(t){let[,e,r,n,i,s,a,o]=t;return[Hi(e,o,r,n,i,s,a),me.utcInstance]}var bh=lr(Qd,$i),yh=lr(Xd,$i),Dh=lr(eh,$i),vh=lr(Ao),Mo=cr(sh,fr,Br,Ir),wh=cr(th,fr,Br,Ir),Fh=cr(rh,fr,Br,Ir),xh=cr(fr,Br,Ir);function Eh(t){return dr(t,[bh,Mo],[yh,wh],[Dh,Fh],[vh,xh])}function kh(t){return dr(hh(t),[ch,dh])}function Ch(t){return dr(t,[fh,Lo],[ph,Lo],[mh,gh])}function Sh(t){return dr(t,[oh,uh])}var Th=cr(fr);function Oh(t){return dr(t,[ah,Th])}var Ph=lr(nh,ih),Rh=lr(No),Ah=cr(fr,Br,Ir);function Nh(t){return dr(t,[Ph,Mo],[Rh,Ah])}var Lh="Invalid Duration",Bo={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Mh={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Bo},Ae=146097/400,pr=146097/4800,Bh={years:{quarters:4,months:12,weeks:Ae/7,days:Ae,hours:Ae*24,minutes:Ae*24*60,seconds:Ae*24*60*60,milliseconds:Ae*24*60*60*1e3},quarters:{months:3,weeks:Ae/28,days:Ae/4,hours:Ae*24/4,minutes:Ae*24*60/4,seconds:Ae*24*60*60/4,milliseconds:Ae*24*60*60*1e3/4},months:{weeks:pr/7,days:pr,hours:pr*24,minutes:pr*24*60,seconds:pr*24*60*60,milliseconds:pr*24*60*60*1e3},...Bo},jt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Ih=jt.slice(0).reverse();function vt(t,e,r=!1){let n={values:r?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new A(n)}function jh(t){return t<0?Math.floor(t):Math.ceil(t)}function Io(t,e,r,n,i){let s=t[i][r],a=e[r]/s,o=Math.sign(a)===Math.sign(n[i]),u=!o&&n[i]!==0&&Math.abs(a)<=1?jh(a):Math.trunc(a);n[i]+=u,e[r]-=u*s}function Gh(t,e){Ih.reduce((r,n)=>H(e[n])?r:(r&&Io(t,e,r,e,n),n),null)}function _h(t){let e={};for(let[r,n]of Object.entries(t))n!==0&&(e[r]=n);return e}var A=class{constructor(e){let r=e.conversionAccuracy==="longterm"||!1,n=r?Bh:Mh;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||z.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,r){return A.fromObject({milliseconds:e},r)}static fromObject(e,r={}){if(e==null||typeof e!="object")throw new ke(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new A({values:On(e,A.normalizeUnit),loc:z.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(e){if(Bt(e))return A.fromMillis(e);if(A.isDuration(e))return e;if(typeof e=="object")return A.fromObject(e);throw new ke(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,r){let[n]=Sh(e);return n?A.fromObject(n,r):A.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,r){let[n]=Oh(e);return n?A.fromObject(n,r):A.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,r=null){if(!e)throw new ke("need to specify a reason the Duration is invalid");let n=e instanceof Re?e:new Re(e,r);if(X.throwOnInvalid)throw new ja(n);return new A({invalid:n})}static normalizeUnit(e){let r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!r)throw new Pi(e);return r}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,r={}){let n={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?ue.create(this.loc,n).formatDurationFromString(this,e):Lh}toHuman(e={}){let r=jt.map(n=>{let i=this.values[n];return H(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(i)}).filter(n=>n);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=ji(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let r=this.toMillis();if(r<0||r>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};let n=this.shiftTo("hours","minutes","seconds","milliseconds"),i=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||n.seconds!==0||n.milliseconds!==0)&&(i+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||n.milliseconds!==0)&&(i+=".SSS"));let s=n.toFormat(i);return e.includePrefix&&(s="T"+s),s}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let r=A.fromDurationLike(e),n={};for(let i of jt)(ur(r.values,i)||ur(this.values,i))&&(n[i]=r.get(i)+this.get(i));return vt(this,{values:n},!0)}minus(e){if(!this.isValid)return this;let r=A.fromDurationLike(e);return this.plus(r.negate())}mapUnits(e){if(!this.isValid)return this;let r={};for(let n of Object.keys(this.values))r[n]=vo(e(this.values[n],n));return vt(this,{values:r},!0)}get(e){return this[A.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let r={...this.values,...On(e,A.normalizeUnit)};return vt(this,{values:r})}reconfigure({locale:e,numberingSystem:r,conversionAccuracy:n,matrix:i}={}){let a={loc:this.loc.clone({locale:e,numberingSystem:r}),matrix:i,conversionAccuracy:n};return vt(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return Gh(this.matrix,e),vt(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=_h(this.normalize().shiftToAll().toObject());return vt(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>A.normalizeUnit(a));let r={},n={},i=this.toObject(),s;for(let a of jt)if(e.indexOf(a)>=0){s=a;let o=0;for(let c in n)o+=this.matrix[c][a]*n[c],n[c]=0;Bt(i[a])&&(o+=i[a]);let u=Math.trunc(o);r[a]=u,n[a]=(o*1e3-u*1e3)/1e3;for(let c in i)jt.indexOf(c)>jt.indexOf(a)&&Io(this.matrix,i,c,r,a)}else Bt(i[a])&&(n[a]=i[a]);for(let a in n)n[a]!==0&&(r[s]+=a===s?n[a]:n[a]/this.matrix[s][a]);return vt(this,{values:r},!0).normalize()}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let r of Object.keys(this.values))e[r]=this.values[r]===0?0:-this.values[r];return vt(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function r(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(let n of jt)if(!r(this.values[n],e.values[n]))return!1;return!0}},mr="Invalid Interval";function Vh(t,e){return!t||!t.isValid?J.invalid("missing or invalid start"):!e||!e.isValid?J.invalid("missing or invalid end"):e<t?J.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}var J=class{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,r=null){if(!e)throw new ke("need to specify a reason the Interval is invalid");let n=e instanceof Re?e:new Re(e,r);if(X.throwOnInvalid)throw new Ia(n);return new J({invalid:n})}static fromDateTimes(e,r){let n=Vr(e),i=Vr(r),s=Vh(n,i);return s??new J({start:n,end:i})}static after(e,r){let n=A.fromDurationLike(r),i=Vr(e);return J.fromDateTimes(i,i.plus(n))}static before(e,r){let n=A.fromDurationLike(r),i=Vr(e);return J.fromDateTimes(i.minus(n),i)}static fromISO(e,r){let[n,i]=(e||"").split("/",2);if(n&&i){let s,a;try{s=M.fromISO(n,r),a=s.isValid}catch(c){a=!1}let o,u;try{o=M.fromISO(i,r),u=o.isValid}catch(c){u=!1}if(a&&u)return J.fromDateTimes(s,o);if(a){let c=A.fromISO(i,r);if(c.isValid)return J.after(s,c)}else if(u){let c=A.fromISO(n,r);if(c.isValid)return J.before(o,c)}}return J.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds"){if(!this.isValid)return NaN;let r=this.start.startOf(e),n=this.end.startOf(e);return Math.floor(n.diff(r,e).get(e))+1}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:r}={}){return this.isValid?J.fromDateTimes(e||this.s,r||this.e):this}splitAt(...e){if(!this.isValid)return[];let r=e.map(Vr).filter(a=>this.contains(a)).sort(),n=[],{s:i}=this,s=0;for(;i<this.e;){let a=r[s]||this.e,o=+a>+this.e?this.e:a;n.push(J.fromDateTimes(i,o)),i=o,s+=1}return n}splitBy(e){let r=A.fromDurationLike(e);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:n}=this,i=1,s,a=[];for(;n<this.e;){let o=this.start.plus(r.mapUnits(u=>u*i));s=+o>+this.e?this.e:o,a.push(J.fromDateTimes(n,s)),n=s,i+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let r=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return r>=n?null:J.fromDateTimes(r,n)}union(e){if(!this.isValid)return this;let r=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return J.fromDateTimes(r,n)}static merge(e){let[r,n]=e.sort((i,s)=>i.s-s.s).reduce(([i,s],a)=>s?s.overlaps(a)||s.abutsStart(a)?[i,s.union(a)]:[i.concat([s]),a]:[i,a],[[],null]);return n&&r.push(n),r}static xor(e){let r=null,n=0,i=[],s=e.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...s),o=a.sort((u,c)=>u.time-c.time);for(let u of o)n+=u.type==="s"?1:-1,n===1?r=u.time:(r&&+r!=+u.time&&i.push(J.fromDateTimes(r,u.time)),r=null);return J.merge(i)}difference(...e){return J.xor([this].concat(e)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:mr}toLocaleString(e=wn,r={}){return this.isValid?ue.create(this.s.loc.clone(r),e).formatInterval(this):mr}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:mr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:mr}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:mr}toFormat(e,{separator:r=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${r}${this.e.toFormat(e)}`:mr}toDuration(e,r){return this.isValid?this.e.diff(this.s,e,r):A.invalid(this.invalidReason)}mapEndpoints(e){return J.fromDateTimes(e(this.s),e(this.e))}},jr=class{static hasDST(e=X.defaultZone){let r=M.now().setZone(e).set({month:12});return!e.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(e){return Xe.isValidZone(e)}static normalizeZone(e){return yt(e,X.defaultZone)}static months(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||z.create(r,n,s)).months(e)}static monthsFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||z.create(r,n,s)).months(e,!0)}static weekdays(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||z.create(r,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||z.create(r,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return z.create(e).meridiems()}static eras(e="short",{locale:r=null}={}){return z.create(r,null,"gregory").eras(e)}static features(){return{relative:bo()}}};function jo(t,e){let r=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=r(e)-r(t);return Math.floor(A.fromMillis(n).as("days"))}function $h(t,e,r){let n=[["years",(u,c)=>c.year-u.year],["quarters",(u,c)=>c.quarter-u.quarter+(c.year-u.year)*4],["months",(u,c)=>c.month-u.month+(c.year-u.year)*12],["weeks",(u,c)=>{let d=jo(u,c);return(d-d%7)/7}],["days",jo]],i={},s=t,a,o;for(let[u,c]of n)r.indexOf(u)>=0&&(a=u,i[u]=c(t,e),o=s.plus(i),o>e?(i[u]--,t=s.plus(i)):t=o);return[t,i,o,a]}function Hh(t,e,r,n){let[i,s,a,o]=$h(t,e,r),u=e-i,c=r.filter(f=>["hours","minutes","seconds","milliseconds"].indexOf(f)>=0);c.length===0&&(a<e&&(a=i.plus({[o]:1})),a!==i&&(s[o]=(s[o]||0)+u/(a-i)));let d=A.fromObject(s,n);return c.length>0?A.fromMillis(u,n).shiftTo(...c).plus(d):d}var Ui={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},Go={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Uh=Ui.hanidec.replace(/[\[|\]]/g,"").split("");function qh(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let r=0;r<t.length;r++){let n=t.charCodeAt(r);if(t[r].search(Ui.hanidec)!==-1)e+=Uh.indexOf(t[r]);else for(let i in Go){let[s,a]=Go[i];n>=s&&n<=a&&(e+=n-s)}}return parseInt(e,10)}else return e}function $e({numberingSystem:t},e=""){return new RegExp(`${Ui[t||"latn"]}${e}`)}var Wh="missing Intl.DateTimeFormat.formatToParts support";function q(t,e=r=>r){return{regex:t,deser:([r])=>e(qh(r))}}var Kh=String.fromCharCode(160),_o=`[ ${Kh}]`,Vo=new RegExp(_o,"g");function zh(t){return t.replace(/\./g,"\\.?").replace(Vo,_o)}function $o(t){return t.replace(/\./g,"").replace(Vo," ").toLowerCase()}function He(t,e){return t===null?null:{regex:RegExp(t.map(zh).join("|")),deser:([r])=>t.findIndex(n=>$o(r)===$o(n))+e}}function Ho(t,e){return{regex:t,deser:([,r,n])=>Tn(r,n),groups:e}}function qi(t){return{regex:t,deser:([e])=>e}}function Yh(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Zh(t,e){let r=$e(e),n=$e(e,"{2}"),i=$e(e,"{3}"),s=$e(e,"{4}"),a=$e(e,"{6}"),o=$e(e,"{1,2}"),u=$e(e,"{1,3}"),c=$e(e,"{1,6}"),d=$e(e,"{1,9}"),f=$e(e,"{2,4}"),m=$e(e,"{4,6}"),y=k=>({regex:RegExp(Yh(k.val)),deser:([F])=>F,literal:!0}),C=(k=>{if(t.literal)return y(k);switch(k.val){case"G":return He(e.eras("short",!1),0);case"GG":return He(e.eras("long",!1),0);case"y":return q(c);case"yy":return q(f,_i);case"yyyy":return q(s);case"yyyyy":return q(m);case"yyyyyy":return q(a);case"M":return q(o);case"MM":return q(n);case"MMM":return He(e.months("short",!0,!1),1);case"MMMM":return He(e.months("long",!0,!1),1);case"L":return q(o);case"LL":return q(n);case"LLL":return He(e.months("short",!1,!1),1);case"LLLL":return He(e.months("long",!1,!1),1);case"d":return q(o);case"dd":return q(n);case"o":return q(u);case"ooo":return q(i);case"HH":return q(n);case"H":return q(o);case"hh":return q(n);case"h":return q(o);case"mm":return q(n);case"m":return q(o);case"q":return q(o);case"qq":return q(n);case"s":return q(o);case"ss":return q(n);case"S":return q(u);case"SSS":return q(i);case"u":return qi(d);case"uu":return qi(o);case"uuu":return q(r);case"a":return He(e.meridiems(),0);case"kkkk":return q(s);case"kk":return q(f,_i);case"W":return q(o);case"WW":return q(n);case"E":case"c":return q(r);case"EEE":return He(e.weekdays("short",!1,!1),1);case"EEEE":return He(e.weekdays("long",!1,!1),1);case"ccc":return He(e.weekdays("short",!0,!1),1);case"cccc":return He(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Ho(new RegExp(`([+-]${o.source})(?::(${n.source}))?`),2);case"ZZZ":return Ho(new RegExp(`([+-]${o.source})(${n.source})?`),2);case"z":return qi(/[a-z_+-/]{1,256}?/i);default:return y(k)}})(t)||{invalidReason:Wh};return C.token=t,C}var Jh={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Qh(t,e){let{type:r,value:n}=t;if(r==="literal")return{literal:!0,val:n};let i=e[r],s=Jh[r];if(typeof s=="object"&&(s=s[i]),s)return{literal:!1,val:s}}function Xh(t){return[`^${t.map(r=>r.regex).reduce((r,n)=>`${r}(${n.source})`,"")}$`,t]}function ef(t,e,r){let n=t.match(e);if(n){let i={},s=1;for(let a in r)if(ur(r,a)){let o=r[a],u=o.groups?o.groups+1:1;!o.literal&&o.token&&(i[o.token.val[0]]=o.deser(n.slice(s,s+u))),s+=u}return[n,i]}else return[n,{}]}function tf(t){let e=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},r=null,n;return H(t.z)||(r=Xe.create(t.z)),H(t.Z)||(r||(r=new me(t.Z)),n=t.Z),H(t.q)||(t.M=(t.q-1)*3+1),H(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),H(t.u)||(t.S=Ii(t.u)),[Object.keys(t).reduce((s,a)=>{let o=e(a);return o&&(s[o]=t[a]),s},{}),r,n]}var Wi=null;function rf(){return Wi||(Wi=M.fromMillis(1555555555555)),Wi}function nf(t,e){if(t.literal)return t;let r=ue.macroTokenToFormatOpts(t.val),n=Wo(r,e);return n==null||n.includes(void 0)?t:n}function Uo(t,e){return Array.prototype.concat(...t.map(r=>nf(r,e)))}function qo(t,e,r){let n=Uo(ue.parseFormat(r),t),i=n.map(a=>Zh(a,t)),s=i.find(a=>a.invalidReason);if(s)return{input:e,tokens:n,invalidReason:s.invalidReason};{let[a,o]=Xh(i),u=RegExp(a,"i"),[c,d]=ef(e,u,o),[f,m,y]=d?tf(d):[null,null,void 0];if(ur(d,"a")&&ur(d,"H"))throw new ar("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:u,rawMatches:c,matches:d,result:f,zone:m,specificOffset:y}}}function sf(t,e,r){let{result:n,zone:i,specificOffset:s,invalidReason:a}=qo(t,e,r);return[n,i,s,a]}function Wo(t,e){return t?ue.create(e,t).formatDateTimeParts(rf()).map(i=>Qh(i,t)):null}var Ko=[0,31,59,90,120,151,181,212,243,273,304,334],zo=[0,31,60,91,121,152,182,213,244,274,305,335];function Ne(t,e){return new Re("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Yo(t,e,r){let n=new Date(Date.UTC(t,e-1,r));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);let i=n.getUTCDay();return i===0?7:i}function Zo(t,e,r){return r+(Nr(t)?zo:Ko)[e-1]}function Jo(t,e){let r=Nr(t)?zo:Ko,n=r.findIndex(s=>s<e),i=e-r[n];return{month:n+1,day:i}}function Ki(t){let{year:e,month:r,day:n}=t,i=Zo(e,r,n),s=Yo(e,r,n),a=Math.floor((i-s+10)/7),o;return a<1?(o=e-1,a=Sn(o)):a>Sn(e)?(o=e+1,a=1):o=e,{weekYear:o,weekNumber:a,weekday:s,...Pn(t)}}function Qo(t){let{weekYear:e,weekNumber:r,weekday:n}=t,i=Yo(e,1,4),s=Lr(e),a=r*7+n-i-3,o;a<1?(o=e-1,a+=Lr(o)):a>s?(o=e+1,a-=Lr(e)):o=e;let{month:u,day:c}=Jo(o,a);return{year:o,month:u,day:c,...Pn(t)}}function zi(t){let{year:e,month:r,day:n}=t,i=Zo(e,r,n);return{year:e,ordinal:i,...Pn(t)}}function Xo(t){let{year:e,ordinal:r}=t,{month:n,day:i}=Jo(e,r);return{year:e,month:n,day:i,...Pn(t)}}function af(t){let e=kn(t.weekYear),r=lt(t.weekNumber,1,Sn(t.weekYear)),n=lt(t.weekday,1,7);return e?r?n?!1:Ne("weekday",t.weekday):Ne("week",t.week):Ne("weekYear",t.weekYear)}function of(t){let e=kn(t.year),r=lt(t.ordinal,1,Lr(t.year));return e?r?!1:Ne("ordinal",t.ordinal):Ne("year",t.year)}function eu(t){let e=kn(t.year),r=lt(t.month,1,12),n=lt(t.day,1,Cn(t.year,t.month));return e?r?n?!1:Ne("day",t.day):Ne("month",t.month):Ne("year",t.year)}function tu(t){let{hour:e,minute:r,second:n,millisecond:i}=t,s=lt(e,0,23)||e===24&&r===0&&n===0&&i===0,a=lt(r,0,59),o=lt(n,0,59),u=lt(i,0,999);return s?a?o?u?!1:Ne("millisecond",i):Ne("second",n):Ne("minute",r):Ne("hour",e)}var Yi="Invalid DateTime",ru=864e13;function Rn(t){return new Re("unsupported zone",`the zone "${t.name}" is not supported`)}function Zi(t){return t.weekData===null&&(t.weekData=Ki(t.c)),t.weekData}function Gr(t,e){let r={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new M({...r,...e,old:r})}function nu(t,e,r){let n=t-e*60*1e3,i=r.offset(n);if(e===i)return[n,e];n-=(i-e)*60*1e3;let s=r.offset(n);return i===s?[n,i]:[t-Math.min(i,s)*60*1e3,Math.max(i,s)]}function iu(t,e){t+=e*60*1e3;let r=new Date(t);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function An(t,e,r){return nu(Gi(t),e,r)}function su(t,e){let r=t.o,n=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,s={...t.c,year:n,month:i,day:Math.min(t.c.day,Cn(n,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=A.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=Gi(s),[u,c]=nu(o,r,t.zone);return a!==0&&(u+=a,c=t.zone.offset(u)),{ts:u,o:c}}function _r(t,e,r,n,i,s){let{setZone:a,zone:o}=r;if(t&&Object.keys(t).length!==0){let u=e||o,c=M.fromObject(t,{...r,zone:u,specificOffset:s});return a?c:c.setZone(o)}else return M.invalid(new Re("unparsable",`the input "${i}" can't be parsed as ${n}`))}function Nn(t,e,r=!0){return t.isValid?ue.create(z.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(t,e):null}function Ji(t,e){let r=t.c.year>9999||t.c.year<0,n="";return r&&t.c.year>=0&&(n+="+"),n+=ee(t.c.year,r?6:4),e?(n+="-",n+=ee(t.c.month),n+="-",n+=ee(t.c.day)):(n+=ee(t.c.month),n+=ee(t.c.day)),n}function au(t,e,r,n,i,s){let a=ee(t.c.hour);return e?(a+=":",a+=ee(t.c.minute),(t.c.second!==0||!r)&&(a+=":")):a+=ee(t.c.minute),(t.c.second!==0||!r)&&(a+=ee(t.c.second),(t.c.millisecond!==0||!n)&&(a+=".",a+=ee(t.c.millisecond,3))),i&&(t.isOffsetFixed&&t.offset===0&&!s?a+="Z":t.o<0?(a+="-",a+=ee(Math.trunc(-t.o/60)),a+=":",a+=ee(Math.trunc(-t.o%60))):(a+="+",a+=ee(Math.trunc(t.o/60)),a+=":",a+=ee(Math.trunc(t.o%60)))),s&&(a+="["+t.zone.ianaName+"]"),a}var ou={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},uf={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},lf={ordinal:1,hour:0,minute:0,second:0,millisecond:0},uu=["year","month","day","hour","minute","second","millisecond"],cf=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],df=["year","ordinal","hour","minute","second","millisecond"];function lu(t){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new Pi(t);return e}function cu(t,e){let r=yt(e.zone,X.defaultZone),n=z.fromObject(e),i=X.now(),s,a;if(H(t.year))s=i;else{for(let c of uu)H(t[c])&&(t[c]=ou[c]);let o=eu(t)||tu(t);if(o)return M.invalid(o);let u=r.offset(i);[s,a]=An(t,u,r)}return new M({ts:s,zone:r,loc:n,o:a})}function du(t,e,r){let n=H(r.round)?!0:r.round,i=(a,o)=>(a=ji(a,n||r.calendary?0:2,!0),e.loc.clone(r).relFormatter(r).format(a,o)),s=a=>r.calendary?e.hasSame(t,a)?0:e.startOf(a).diff(t.startOf(a),a).get(a):e.diff(t,a).get(a);if(r.unit)return i(s(r.unit),r.unit);for(let a of r.units){let o=s(a);if(Math.abs(o)>=1)return i(o,a)}return i(t>e?-0:0,r.units[r.units.length-1])}function hu(t){let e={},r;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],r=Array.from(t).slice(0,t.length-1)):r=Array.from(t),[e,r]}var M=class{constructor(e){let r=e.zone||X.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Re("invalid input"):null)||(r.isValid?null:Rn(r));this.ts=H(e.ts)?X.now():e.ts;let i=null,s=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(r))[i,s]=[e.old.c,e.old.o];else{let o=r.offset(this.ts);i=iu(this.ts,o),n=Number.isNaN(i.year)?new Re("invalid input"):null,i=n?null:i,s=n?null:o}this._zone=r,this.loc=e.loc||z.create(),this.invalid=n,this.weekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new M({})}static local(){let[e,r]=hu(arguments),[n,i,s,a,o,u,c]=r;return cu({year:n,month:i,day:s,hour:a,minute:o,second:u,millisecond:c},e)}static utc(){let[e,r]=hu(arguments),[n,i,s,a,o,u,c]=r;return e.zone=me.utcInstance,cu({year:n,month:i,day:s,hour:a,minute:o,second:u,millisecond:c},e)}static fromJSDate(e,r={}){let n=Md(e)?e.valueOf():NaN;if(Number.isNaN(n))return M.invalid("invalid input");let i=yt(r.zone,X.defaultZone);return i.isValid?new M({ts:n,zone:i,loc:z.fromObject(r)}):M.invalid(Rn(i))}static fromMillis(e,r={}){if(Bt(e))return e<-ru||e>ru?M.invalid("Timestamp out of range"):new M({ts:e,zone:yt(r.zone,X.defaultZone),loc:z.fromObject(r)});throw new ke(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,r={}){if(Bt(e))return new M({ts:e*1e3,zone:yt(r.zone,X.defaultZone),loc:z.fromObject(r)});throw new ke("fromSeconds requires a numerical input")}static fromObject(e,r={}){e=e||{};let n=yt(r.zone,X.defaultZone);if(!n.isValid)return M.invalid(Rn(n));let i=X.now(),s=H(r.specificOffset)?n.offset(i):r.specificOffset,a=On(e,lu),o=!H(a.ordinal),u=!H(a.year),c=!H(a.month)||!H(a.day),d=u||c,f=a.weekYear||a.weekNumber,m=z.fromObject(r);if((d||o)&&f)throw new ar("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&o)throw new ar("Can't mix ordinal dates with month/day");let y=f||a.weekday&&!d,w,C,k=iu(i,s);y?(w=cf,C=uf,k=Ki(k)):o?(w=df,C=lf,k=zi(k)):(w=uu,C=ou);let F=!1;for(let V of w){let j=a[V];H(j)?F?a[V]=C[V]:a[V]=k[V]:F=!0}let E=y?af(a):o?of(a):eu(a),L=E||tu(a);if(L)return M.invalid(L);let D=y?Qo(a):o?Xo(a):a,[R,_]=An(D,s,n),N=new M({ts:R,zone:n,o:_,loc:m});return a.weekday&&d&&e.weekday!==N.weekday?M.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${N.toISO()}`):N}static fromISO(e,r={}){let[n,i]=Eh(e);return _r(n,i,r,"ISO 8601",e)}static fromRFC2822(e,r={}){let[n,i]=kh(e);return _r(n,i,r,"RFC 2822",e)}static fromHTTP(e,r={}){let[n,i]=Ch(e);return _r(n,i,r,"HTTP",r)}static fromFormat(e,r,n={}){if(H(e)||H(r))throw new ke("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:s=null}=n,a=z.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[o,u,c,d]=sf(a,e,r);return d?M.invalid(d):_r(o,u,n,`format ${r}`,e,c)}static fromString(e,r,n={}){return M.fromFormat(e,r,n)}static fromSQL(e,r={}){let[n,i]=Nh(e);return _r(n,i,r,"SQL",e)}static invalid(e,r=null){if(!e)throw new ke("need to specify a reason the DateTime is invalid");let n=e instanceof Re?e:new Re(e,r);if(X.throwOnInvalid)throw new Ba(n);return new M({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,r={}){let n=Wo(e,z.fromObject(r));return n?n.map(i=>i?i.val:null).join(""):null}static expandFormat(e,r={}){return Uo(ue.parseFormat(e),z.fromObject(r)).map(i=>i.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Zi(this).weekYear:NaN}get weekNumber(){return this.isValid?Zi(this).weekNumber:NaN}get weekday(){return this.isValid?Zi(this).weekday:NaN}get ordinal(){return this.isValid?zi(this.c).ordinal:NaN}get monthShort(){return this.isValid?jr.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?jr.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?jr.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?jr.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Nr(this.year)}get daysInMonth(){return Cn(this.year,this.month)}get daysInYear(){return this.isValid?Lr(this.year):NaN}get weeksInWeekYear(){return this.isValid?Sn(this.weekYear):NaN}resolvedLocaleOptions(e={}){let{locale:r,numberingSystem:n,calendar:i}=ue.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:r,numberingSystem:n,outputCalendar:i}}toUTC(e=0,r={}){return this.setZone(me.instance(e),r)}toLocal(){return this.setZone(X.defaultZone)}setZone(e,{keepLocalTime:r=!1,keepCalendarTime:n=!1}={}){if(e=yt(e,X.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(r||n){let s=e.offset(this.ts),a=this.toObject();[i]=An(a,s,e)}return Gr(this,{ts:i,zone:e})}else return M.invalid(Rn(e))}reconfigure({locale:e,numberingSystem:r,outputCalendar:n}={}){let i=this.loc.clone({locale:e,numberingSystem:r,outputCalendar:n});return Gr(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let r=On(e,lu),n=!H(r.weekYear)||!H(r.weekNumber)||!H(r.weekday),i=!H(r.ordinal),s=!H(r.year),a=!H(r.month)||!H(r.day),o=s||a,u=r.weekYear||r.weekNumber;if((o||i)&&u)throw new ar("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&i)throw new ar("Can't mix ordinal dates with month/day");let c;n?c=Qo({...Ki(this.c),...r}):H(r.ordinal)?(c={...this.toObject(),...r},H(r.day)&&(c.day=Math.min(Cn(c.year,c.month),c.day))):c=Xo({...zi(this.c),...r});let[d,f]=An(c,this.o,this.zone);return Gr(this,{ts:d,o:f})}plus(e){if(!this.isValid)return this;let r=A.fromDurationLike(e);return Gr(this,su(this,r))}minus(e){if(!this.isValid)return this;let r=A.fromDurationLike(e).negate();return Gr(this,su(this,r))}startOf(e){if(!this.isValid)return this;let r={},n=A.normalizeUnit(e);switch(n){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(n==="weeks"&&(r.weekday=1),n==="quarters"){let i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,r={}){return this.isValid?ue.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,e):Yi}toLocaleString(e=wn,r={}){return this.isValid?ue.create(this.loc.clone(r),e).formatDateTime(this):Yi}toLocaleParts(e={}){return this.isValid?ue.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:r=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:s=!1}={}){if(!this.isValid)return null;let a=e==="extended",o=Ji(this,a);return o+="T",o+=au(this,a,r,n,i,s),o}toISODate({format:e="extended"}={}){return this.isValid?Ji(this,e==="extended"):null}toISOWeekDate(){return Nn(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:r=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:s=!1,format:a="extended"}={}){return this.isValid?(i?"T":"")+au(this,a==="extended",r,e,n,s):null}toRFC2822(){return Nn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Nn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Ji(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:r=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(r||e)&&(n&&(i+=" "),r?i+="z":e&&(i+="ZZ")),Nn(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Yi}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let r={...this.c};return e.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,r="milliseconds",n={}){if(!this.isValid||!e.isValid)return A.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...n},s=Bd(r).map(A.normalizeUnit),a=e.valueOf()>this.valueOf(),o=a?this:e,u=a?e:this,c=Hh(o,u,s,i);return a?c.negate():c}diffNow(e="milliseconds",r={}){return this.diff(M.now(),e,r)}until(e){return this.isValid?J.fromDateTimes(this,e):this}hasSame(e,r){if(!this.isValid)return!1;let n=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(r)<=n&&n<=i.endOf(r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let r=e.base||M.fromObject({},{zone:this.zone}),n=e.padding?this<r?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(i=e.unit,s=void 0),du(r,this.plus(n),{...e,numeric:"always",units:i,unit:s})}toRelativeCalendar(e={}){return this.isValid?du(e.base||M.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(M.isDateTime))throw new ke("min requires all arguments be DateTimes");return yo(e,r=>r.valueOf(),Math.min)}static max(...e){if(!e.every(M.isDateTime))throw new ke("max requires all arguments be DateTimes");return yo(e,r=>r.valueOf(),Math.max)}static fromFormatExplain(e,r,n={}){let{locale:i=null,numberingSystem:s=null}=n,a=z.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return qo(a,e,r)}static fromStringExplain(e,r,n={}){return M.fromFormatExplain(e,r,n)}static get DATE_SHORT(){return wn}static get DATE_MED(){return Ga}static get DATE_MED_WITH_WEEKDAY(){return Dd}static get DATE_FULL(){return _a}static get DATE_HUGE(){return Va}static get TIME_SIMPLE(){return $a}static get TIME_WITH_SECONDS(){return Ha}static get TIME_WITH_SHORT_OFFSET(){return Ua}static get TIME_WITH_LONG_OFFSET(){return qa}static get TIME_24_SIMPLE(){return Wa}static get TIME_24_WITH_SECONDS(){return Ka}static get TIME_24_WITH_SHORT_OFFSET(){return za}static get TIME_24_WITH_LONG_OFFSET(){return Ya}static get DATETIME_SHORT(){return Za}static get DATETIME_SHORT_WITH_SECONDS(){return Ja}static get DATETIME_MED(){return Qa}static get DATETIME_MED_WITH_SECONDS(){return Xa}static get DATETIME_MED_WITH_WEEKDAY(){return vd}static get DATETIME_FULL(){return eo}static get DATETIME_FULL_WITH_SECONDS(){return to}static get DATETIME_HUGE(){return ro}static get DATETIME_HUGE_WITH_SECONDS(){return no}};function Vr(t){if(M.isDateTime(t))return t;if(t&&t.valueOf&&Bt(t.valueOf()))return M.fromJSDate(t);if(t&&typeof t=="object")return M.fromObject(t);throw new ke(`Unknown datetime argument: ${t}, of type ${typeof t}`)}var Qi={renderNullAs:"\\-",taskCompletionTracking:!1,taskCompletionUseEmojiShorthand:!1,taskCompletionText:"completion",taskCompletionDateFormat:"yyyy-MM-dd",recursiveSubTaskCompletion:!1,warnOnEmptyResult:!0,refreshEnabled:!0,refreshInterval:2500,defaultDateFormat:"MMMM dd, yyyy",defaultDateTimeFormat:"h:mm a - MMMM dd, yyyy",maxRecursiveRenderDepth:4,tableIdColumnName:"File",tableGroupColumnName:"Group",showResultCount:!0},hf={allowHtml:!0};({...Qi,...hf});var Ln=class{constructor(e){this.value=e,this.successful=!0}map(e){return new Ln(e(this.value))}flatMap(e){return e(this.value)}mapErr(e){return this}bimap(e,r){return this.map(e)}orElse(e){return this.value}cast(){return this}orElseThrow(e){return this.value}},Mn=class{constructor(e){this.error=e,this.successful=!1}map(e){return this}flatMap(e){return this}mapErr(e){return new Mn(e(this.error))}bimap(e,r){return this.mapErr(r)}orElse(e){return e}cast(){return this}orElseThrow(e){throw e?new Error(e(this.error)):new Error(""+this.error)}},Bn;(function(t){function e(s){return new Ln(s)}t.success=e;function r(s){return new Mn(s)}t.failure=r;function n(s,a,o){return s.successful?a.successful?o(s.value,a.value):r(a.error):r(s.error)}t.flatMap2=n;function i(s,a,o){return n(s,a,(u,c)=>e(o(u,c)))}t.map2=i})(Bn||(Bn={}));var ff=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},p={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(typeof self!="undefined"?self:ff,function(){return function(r){var n={};function i(s){if(n[s])return n[s].exports;var a=n[s]={i:s,l:!1,exports:{}};return r[s].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=r,i.c=n,i.d=function(s,a,o){i.o(s,a)||Object.defineProperty(s,a,{configurable:!1,enumerable:!0,get:o})},i.r=function(s){Object.defineProperty(s,"__esModule",{value:!0})},i.n=function(s){var a=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(a,"a",a),a},i.o=function(s,a){return Object.prototype.hasOwnProperty.call(s,a)},i.p="",i(i.s=0)}([function(r,n,i){function s(h){if(!(this instanceof s))return new s(h);this._=h}var a=s.prototype;function o(h,b){for(var v=0;v<h;v++)b(v)}function u(h,b,v){return function(x,S){o(S.length,function(T){x(S[T],T,S)})}(function(x,S,T){b=h(b,x,S,T)},v),b}function c(h,b){return u(function(v,x,S,T){return v.concat([h(x,S,T)])},[],b)}function d(h,b){var v={v:0,buf:b};return o(h,function(){var x;v={v:v.v<<1|(x=v.buf,x[0]>>7),buf:function(S){var T=u(function(O,G,K,be){return O.concat(K===be.length-1?Buffer.from([G,0]).readUInt16BE(0):be.readUInt16BE(K))},[],S);return Buffer.from(c(function(O){return(O<<1&65535)>>8},T))}(v.buf)}}),v}function f(){return typeof Buffer!="undefined"}function m(){if(!f())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function y(h){m();var b=u(function(T,O){return T+O},0,h);if(b%8!=0)throw new Error("The bits ["+h.join(", ")+"] add up to "+b+" which is not an even number of bytes; the total should be divisible by 8");var v,x=b/8,S=(v=function(T){return T>48},u(function(T,O){return T||(v(O)?O:T)},null,h));if(S)throw new Error(S+" bit range requested exceeds 48 bit (6 byte) Number max.");return new s(function(T,O){var G=x+O;return G>T.length?V(O,x.toString()+" bytes"):N(G,u(function(K,be){var se=d(be,K.buf);return{coll:K.coll.concat(se.v),buf:se.buf}},{coll:[],buf:T.slice(O,G)},h).coll)})}function w(h,b){return new s(function(v,x){return m(),x+b>v.length?V(x,b+" bytes for "+h):N(x+b,v.slice(x,x+b))})}function C(h,b){if(typeof(v=b)!="number"||Math.floor(v)!==v||b<0||b>6)throw new Error(h+" requires integer length in range [0, 6].");var v}function k(h){return C("uintBE",h),w("uintBE("+h+")",h).map(function(b){return b.readUIntBE(0,h)})}function F(h){return C("uintLE",h),w("uintLE("+h+")",h).map(function(b){return b.readUIntLE(0,h)})}function E(h){return C("intBE",h),w("intBE("+h+")",h).map(function(b){return b.readIntBE(0,h)})}function L(h){return C("intLE",h),w("intLE("+h+")",h).map(function(b){return b.readIntLE(0,h)})}function D(h){return h instanceof s}function R(h){return{}.toString.call(h)==="[object Array]"}function _(h){return f()&&Buffer.isBuffer(h)}function N(h,b){return{status:!0,index:h,value:b,furthest:-1,expected:[]}}function V(h,b){return R(b)||(b=[b]),{status:!1,index:-1,value:null,furthest:h,expected:b}}function j(h,b){if(!b||h.furthest>b.furthest)return h;var v=h.furthest===b.furthest?function(x,S){if(function(){if(s._supportsSet!==void 0)return s._supportsSet;var st=typeof Set!="undefined";return s._supportsSet=st,st}()&&Array.from){for(var T=new Set(x),O=0;O<S.length;O++)T.add(S[O]);var G=Array.from(T);return G.sort(),G}for(var K={},be=0;be<x.length;be++)K[x[be]]=!0;for(var se=0;se<S.length;se++)K[S[se]]=!0;var it=[];for(var Fe in K)({}).hasOwnProperty.call(K,Fe)&&it.push(Fe);return it.sort(),it}(h.expected,b.expected):b.expected;return{status:h.status,index:h.index,value:h.value,furthest:b.furthest,expected:v}}var $={};function Se(h,b){if(_(h))return{offset:b,line:-1,column:-1};h in $||($[h]={});for(var v=$[h],x=0,S=0,T=0,O=b;O>=0;){if(O in v){x=v[O].line,T===0&&(T=v[O].lineStart);break}(h.charAt(O)===`
`||h.charAt(O)==="\r"&&h.charAt(O+1)!==`
`)&&(S++,T===0&&(T=O+1)),O--}var G=x+S,K=b-T;return v[b]={line:G,lineStart:T},{offset:b,line:G+1,column:K+1}}function ie(h){if(!D(h))throw new Error("not a parser: "+h)}function rt(h,b){return typeof h=="string"?h.charAt(b):h[b]}function ce(h){if(typeof h!="number")throw new Error("not a number: "+h)}function we(h){if(typeof h!="function")throw new Error("not a function: "+h)}function ve(h){if(typeof h!="string")throw new Error("not a string: "+h)}var Le=2,xt=3,ge=8,Et=5*ge,Ke=4*ge,kt=" ";function de(h,b){return new Array(b+1).join(h)}function he(h,b,v){var x=b-h.length;return x<=0?h:de(v,x)+h}function vr(h,b,v,x){return{from:h-b>0?h-b:0,to:h+v>x?x:h+v}}function Ct(h,b){var v,x,S,T,O,G=b.index,K=G.offset,be=1;if(K===h.length)return"Got the end of the input";if(_(h)){var se=K-K%ge,it=K-se,Fe=vr(se,Et,Ke+ge,h.length),st=c(function(te){return c(function(Kt){return he(Kt.toString(16),2,"0")},te)},function(te,Kt){var zt=te.length,Pt=[],Yt=0;if(zt<=Kt)return[te.slice()];for(var Zt=0;Zt<zt;Zt++)Pt[Yt]||Pt.push([]),Pt[Yt].push(te[Zt]),(Zt+1)%Kt==0&&Yt++;return Pt}(h.slice(Fe.from,Fe.to).toJSON().data,ge));T=function(te){return te.from===0&&te.to===1?{from:te.from,to:te.to}:{from:te.from/ge,to:Math.floor(te.to/ge)}}(Fe),x=se/ge,v=3*it,it>=4&&(v+=1),be=2,S=c(function(te){return te.length<=4?te.join(" "):te.slice(0,4).join(" ")+" "+te.slice(4).join(" ")},st),(O=(8*(T.to>0?T.to-1:T.to)).toString(16).length)<2&&(O=2)}else{var Wt=h.split(/\r\n|[\n\r\u2028\u2029]/);v=G.column-1,x=G.line-1,T=vr(x,Le,xt,Wt.length),S=Wt.slice(T.from,T.to),O=T.to.toString().length}var ac=x-T.from;return _(h)&&(O=(8*(T.to>0?T.to-1:T.to)).toString(16).length)<2&&(O=2),u(function(te,Kt,zt){var Pt,Yt=zt===ac,Zt=Yt?"> ":kt;return Pt=_(h)?he((8*(T.from+zt)).toString(16),O,"0"):he((T.from+zt+1).toString(),O," "),[].concat(te,[Zt+Pt+" | "+Kt],Yt?[kt+de(" ",O)+" | "+he("",v," ")+de("^",be)]:[])},[],S).join(`
`)}function St(h,b){return[`
`,"-- PARSING FAILED "+de("-",50),`
`,Ct(h,b),`
`,(v=b.expected,v.length===1?`Expected:
`+v[0]:`Expected one of the following:
`+v.join(", ")),`
`].join("");var v}function Ht(h){return h.flags!==void 0?h.flags:[h.global?"g":"",h.ignoreCase?"i":"",h.multiline?"m":"",h.unicode?"u":"",h.sticky?"y":""].join("")}function Tt(){for(var h=[].slice.call(arguments),b=h.length,v=0;v<b;v+=1)ie(h[v]);return s(function(x,S){for(var T,O=new Array(b),G=0;G<b;G+=1){if(!(T=j(h[G]._(x,S),T)).status)return T;O[G]=T.value,S=T.index}return j(N(S,O),T)})}function Me(){var h=[].slice.call(arguments);if(h.length===0)throw new Error("seqMap needs at least one argument");var b=h.pop();return we(b),Tt.apply(null,h).map(function(v){return b.apply(null,v)})}function Be(){var h=[].slice.call(arguments),b=h.length;if(b===0)return Qr("zero alternates");for(var v=0;v<b;v+=1)ie(h[v]);return s(function(x,S){for(var T,O=0;O<h.length;O+=1)if((T=j(h[O]._(x,S),T)).status)return T;return T})}function Ut(h,b){return qt(h,b).or(Ot([]))}function qt(h,b){return ie(h),ie(b),Me(h,b.then(h).many(),function(v,x){return[v].concat(x)})}function ht(h){ve(h);var b="'"+h+"'";return s(function(v,x){var S=x+h.length,T=v.slice(x,S);return T===h?N(S,T):V(x,b)})}function nt(h,b){(function(S){if(!(S instanceof RegExp))throw new Error("not a regexp: "+S);for(var T=Ht(S),O=0;O<T.length;O++){var G=T.charAt(O);if(G!=="i"&&G!=="m"&&G!=="u"&&G!=="s")throw new Error('unsupported regexp flag "'+G+'": '+S)}})(h),arguments.length>=2?ce(b):b=0;var v=function(S){return RegExp("^(?:"+S.source+")",Ht(S))}(h),x=""+h;return s(function(S,T){var O=v.exec(S.slice(T));if(O){if(0<=b&&b<=O.length){var G=O[0],K=O[b];return N(T+G.length,K)}return V(T,"valid match group (0 to "+O.length+") in "+x)}return V(T,x)})}function Ot(h){return s(function(b,v){return N(v,h)})}function Qr(h){return s(function(b,v){return V(v,h)})}function Xr(h){if(D(h))return s(function(b,v){var x=h._(b,v);return x.index=v,x.value="",x});if(typeof h=="string")return Xr(ht(h));if(h instanceof RegExp)return Xr(nt(h));throw new Error("not a string, regexp, or parser: "+h)}function Cs(h){return ie(h),s(function(b,v){var x=h._(b,v),S=b.slice(v,x.index);return x.status?V(v,'not "'+S+'"'):N(v,null)})}function en(h){return we(h),s(function(b,v){var x=rt(b,v);return v<b.length&&h(x)?N(v+1,x):V(v,"a character/byte matching "+h)})}function Ss(h,b){arguments.length<2&&(b=h,h=void 0);var v=s(function(x,S){return v._=b()._,v._(x,S)});return h?v.desc(h):v}function Qn(){return Qr("fantasy-land/empty")}a.parse=function(h){if(typeof h!="string"&&!_(h))throw new Error(".parse must be called with a string or Buffer as its argument");var b,v=this.skip(Xn)._(h,0);return b=v.status?{status:!0,value:v.value}:{status:!1,index:Se(h,v.furthest),expected:v.expected},delete $[h],b},a.tryParse=function(h){var b=this.parse(h);if(b.status)return b.value;var v=St(h,b),x=new Error(v);throw x.type="ParsimmonError",x.result=b,x},a.assert=function(h,b){return this.chain(function(v){return h(v)?Ot(v):Qr(b)})},a.or=function(h){return Be(this,h)},a.trim=function(h){return this.wrap(h,h)},a.wrap=function(h,b){return Me(h,this,b,function(v,x){return x})},a.thru=function(h){return h(this)},a.then=function(h){return ie(h),Tt(this,h).map(function(b){return b[1]})},a.many=function(){var h=this;return s(function(b,v){for(var x=[],S=void 0;;){if(!(S=j(h._(b,v),S)).status)return j(N(v,x),S);if(v===S.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");v=S.index,x.push(S.value)}})},a.tieWith=function(h){return ve(h),this.map(function(b){if(function(S){if(!R(S))throw new Error("not an array: "+S)}(b),b.length){ve(b[0]);for(var v=b[0],x=1;x<b.length;x++)ve(b[x]),v+=h+b[x];return v}return""})},a.tie=function(){return this.tieWith("")},a.times=function(h,b){var v=this;return arguments.length<2&&(b=h),ce(h),ce(b),s(function(x,S){for(var T=[],O=void 0,G=void 0,K=0;K<h;K+=1){if(G=j(O=v._(x,S),G),!O.status)return G;S=O.index,T.push(O.value)}for(;K<b&&(G=j(O=v._(x,S),G),O.status);K+=1)S=O.index,T.push(O.value);return j(N(S,T),G)})},a.result=function(h){return this.map(function(){return h})},a.atMost=function(h){return this.times(0,h)},a.atLeast=function(h){return Me(this.times(h),this.many(),function(b,v){return b.concat(v)})},a.map=function(h){we(h);var b=this;return s(function(v,x){var S=b._(v,x);return S.status?j(N(S.index,h(S.value)),S):S})},a.contramap=function(h){we(h);var b=this;return s(function(v,x){var S=b.parse(h(v.slice(x)));return S.status?N(x+v.length,S.value):S})},a.promap=function(h,b){return we(h),we(b),this.contramap(h).map(b)},a.skip=function(h){return Tt(this,h).map(function(b){return b[0]})},a.mark=function(){return Me(wr,this,wr,function(h,b,v){return{start:h,value:b,end:v}})},a.node=function(h){return Me(wr,this,wr,function(b,v,x){return{name:h,value:v,start:b,end:x}})},a.sepBy=function(h){return Ut(this,h)},a.sepBy1=function(h){return qt(this,h)},a.lookahead=function(h){return this.skip(Xr(h))},a.notFollowedBy=function(h){return this.skip(Cs(h))},a.desc=function(h){R(h)||(h=[h]);var b=this;return s(function(v,x){var S=b._(v,x);return S.status||(S.expected=h),S})},a.fallback=function(h){return this.or(Ot(h))},a.ap=function(h){return Me(h,this,function(b,v){return b(v)})},a.chain=function(h){var b=this;return s(function(v,x){var S=b._(v,x);return S.status?j(h(S.value)._(v,S.index),S):S})},a.concat=a.or,a.empty=Qn,a.of=Ot,a["fantasy-land/ap"]=a.ap,a["fantasy-land/chain"]=a.chain,a["fantasy-land/concat"]=a.concat,a["fantasy-land/empty"]=a.empty,a["fantasy-land/of"]=a.of,a["fantasy-land/map"]=a.map;var wr=s(function(h,b){return N(b,Se(h,b))}),Jl=s(function(h,b){return b>=h.length?V(b,"any character/byte"):N(b+1,rt(h,b))}),Ql=s(function(h,b){return N(h.length,h.slice(b))}),Xn=s(function(h,b){return b<h.length?V(b,"EOF"):N(b,null)}),Xl=nt(/[0-9]/).desc("a digit"),ec=nt(/[0-9]*/).desc("optional digits"),tc=nt(/[a-z]/i).desc("a letter"),rc=nt(/[a-z]*/i).desc("optional letters"),nc=nt(/\s*/).desc("optional whitespace"),ic=nt(/\s+/).desc("whitespace"),Ts=ht("\r"),Os=ht(`
`),Ps=ht(`\r
`),Rs=Be(Ps,Os,Ts).desc("newline"),sc=Be(Rs,Xn);s.all=Ql,s.alt=Be,s.any=Jl,s.cr=Ts,s.createLanguage=function(h){var b={};for(var v in h)({}).hasOwnProperty.call(h,v)&&function(x){b[x]=Ss(function(){return h[x](b)})}(v);return b},s.crlf=Ps,s.custom=function(h){return s(h(N,V))},s.digit=Xl,s.digits=ec,s.empty=Qn,s.end=sc,s.eof=Xn,s.fail=Qr,s.formatError=St,s.index=wr,s.isParser=D,s.lazy=Ss,s.letter=tc,s.letters=rc,s.lf=Os,s.lookahead=Xr,s.makeFailure=V,s.makeSuccess=N,s.newline=Rs,s.noneOf=function(h){return en(function(b){return h.indexOf(b)<0}).desc("none of '"+h+"'")},s.notFollowedBy=Cs,s.of=Ot,s.oneOf=function(h){for(var b=h.split(""),v=0;v<b.length;v++)b[v]="'"+b[v]+"'";return en(function(x){return h.indexOf(x)>=0}).desc(b)},s.optWhitespace=nc,s.Parser=s,s.range=function(h,b){return en(function(v){return h<=v&&v<=b}).desc(h+"-"+b)},s.regex=nt,s.regexp=nt,s.sepBy=Ut,s.sepBy1=qt,s.seq=Tt,s.seqMap=Me,s.seqObj=function(){for(var h,b={},v=0,x=(h=arguments,Array.prototype.slice.call(h)),S=x.length,T=0;T<S;T+=1){var O=x[T];if(!D(O)){if(R(O)&&O.length===2&&typeof O[0]=="string"&&D(O[1])){var G=O[0];if(Object.prototype.hasOwnProperty.call(b,G))throw new Error("seqObj: duplicate key "+G);b[G]=!0,v++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(v===0)throw new Error("seqObj expects at least one named parser, found zero");return s(function(K,be){for(var se,it={},Fe=0;Fe<S;Fe+=1){var st,Wt;if(R(x[Fe])?(st=x[Fe][0],Wt=x[Fe][1]):(st=null,Wt=x[Fe]),!(se=j(Wt._(K,be),se)).status)return se;st&&(it[st]=se.value),be=se.index}return j(N(be,it),se)})},s.string=ht,s.succeed=Ot,s.takeWhile=function(h){return we(h),s(function(b,v){for(var x=v;x<b.length&&h(rt(b,x));)x++;return N(x,b.slice(v,x))})},s.test=en,s.whitespace=ic,s["fantasy-land/empty"]=Qn,s["fantasy-land/of"]=Ot,s.Binary={bitSeq:y,bitSeqObj:function(h){m();var b={},v=0,x=c(function(T){if(R(T)){var O=T;if(O.length!==2)throw new Error("["+O.join(", ")+"] should be length 2, got length "+O.length);if(ve(O[0]),ce(O[1]),Object.prototype.hasOwnProperty.call(b,O[0]))throw new Error("duplicate key in bitSeqObj: "+O[0]);return b[O[0]]=!0,v++,O}return ce(T),[null,T]},h);if(v<1)throw new Error("bitSeqObj expects at least one named pair, got ["+h.join(", ")+"]");var S=c(function(T){return T[0]},x);return y(c(function(T){return T[1]},x)).map(function(T){return u(function(O,G){return G[0]!==null&&(O[G[0]]=G[1]),O},{},c(function(O,G){return[O,T[G]]},S))})},byte:function(h){if(m(),ce(h),h>255)throw new Error("Value specified to byte constructor ("+h+"=0x"+h.toString(16)+") is larger in value than a single byte.");var b=(h>15?"0x":"0x0")+h.toString(16);return s(function(v,x){var S=rt(v,x);return S===h?N(x+1,S):V(x,b)})},buffer:function(h){return w("buffer",h).map(function(b){return Buffer.from(b)})},encodedString:function(h,b){return w("string",b).map(function(v){return v.toString(h)})},uintBE:k,uint8BE:k(1),uint16BE:k(2),uint32BE:k(4),uintLE:F,uint8LE:F(1),uint16LE:F(2),uint32LE:F(4),intBE:E,int8BE:E(1),int16BE:E(2),int32BE:E(4),intLE:L,int8LE:L(1),int16LE:L(2),int32LE:L(4),floatBE:w("floatBE",4).map(function(h){return h.readFloatBE(0)}),floatLE:w("floatLE",4).map(function(h){return h.readFloatLE(0)}),doubleBE:w("doubleBE",8).map(function(h){return h.readDoubleBE(0)}),doubleLE:w("doubleLE",8).map(function(h){return h.readDoubleLE(0)})},r.exports=s}])})})(p);var Xi=()=>/(?:[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDD-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF6](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC2\uDED0-\uDED9\uDEE0-\uDEE7]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?))/g;function fu(t){return t==null?t:t.shiftToAll().normalize()}function pu(t){return t.includes("/")&&(t=t.substring(t.lastIndexOf("/")+1)),t.endsWith(".md")&&(t=t.substring(0,t.length-3)),t}p.exports.alt(p.exports.regex(new RegExp(Xi(),"")),p.exports.regex(/[0-9\p{Letter}_-]+/u).map(t=>t.toLocaleLowerCase()),p.exports.whitespace.map(t=>"-"),p.exports.any.map(t=>"")).many().map(t=>t.join(""));var pf=p.exports.alt(p.exports.regex(new RegExp(Xi(),"")),p.exports.regex(/[0-9\p{Letter}_-]+/u),p.exports.whitespace.map(t=>" "),p.exports.any.map(t=>" ")).many().map(t=>t.join("").split(/\s+/).join(" ").trim());function mf(t){return pf.tryParse(t)}function gf(t){return t=fu(t),t=A.fromObject(Object.fromEntries(Object.entries(t.toObject()).filter(([,e])=>e>0))),t.toHuman()}var $r;(function(t){function e(D,R=Qi,_=!1){let N=r(D);if(!N)return R.renderNullAs;switch(N.type){case"null":return R.renderNullAs;case"string":return N.value;case"number":case"boolean":return""+N.value;case"html":return N.value.outerHTML;case"widget":return N.value.markdown();case"link":return N.value.markdown();case"function":return"<function>";case"array":let V="";return _&&(V+="["),V+=N.value.map(j=>e(j,R,!0)).join(", "),_&&(V+="]"),V;case"object":return"{ "+Object.entries(N.value).map(j=>j[0]+": "+e(j[1],R,!0)).join(", ")+" }";case"date":return N.value.second==0&&N.value.hour==0&&N.value.minute==0?N.value.toFormat(R.defaultDateFormat):N.value.toFormat(R.defaultDateTimeFormat);case"duration":return gf(N.value)}}t.toString=e;function r(D){return m(D)?{type:"null",value:D}:c(D)?{type:"number",value:D}:u(D)?{type:"string",value:D}:w(D)?{type:"boolean",value:D}:f(D)?{type:"duration",value:D}:d(D)?{type:"date",value:D}:k(D)?{type:"widget",value:D}:y(D)?{type:"array",value:D}:C(D)?{type:"link",value:D}:L(D)?{type:"function",value:D}:F(D)?{type:"html",value:D}:E(D)?{type:"object",value:D}:void 0}t.wrapValue=r;function n(D,R){if(E(D)){let _={};for(let[N,V]of Object.entries(D))_[N]=n(V,R);return _}else if(y(D)){let _=[];for(let N of D)_.push(n(N,R));return _}else return R(D)}t.mapLeaves=n;function i(D,R,_){var N,V;if(D===void 0&&(D=null),R===void 0&&(R=null),D===null&&R===null)return 0;if(D===null)return-1;if(R===null)return 1;let j=r(D),$=r(R);if(j===void 0&&$===void 0)return 0;if(j===void 0)return-1;if($===void 0)return 1;if(j.type!=$.type)return j.type.localeCompare($.type);if(j.value===$.value)return 0;switch(j.type){case"string":return j.value.localeCompare($.value);case"number":return j.value<$.value?-1:j.value==$.value?0:1;case"null":return 0;case"boolean":return j.value==$.value?0:j.value?1:-1;case"link":let Se=j.value,ie=$.value,rt=_??(de=>de),ce=rt(Se.path).localeCompare(rt(ie.path));if(ce!=0)return ce;let we=Se.type.localeCompare(ie.type);return we!=0?we:Se.subpath&&!ie.subpath?1:!Se.subpath&&ie.subpath?-1:!Se.subpath&&!ie.subpath?0:((N=Se.subpath)!==null&&N!==void 0?N:"").localeCompare((V=ie.subpath)!==null&&V!==void 0?V:"");case"date":return j.value<$.value?-1:j.value.equals($.value)?0:1;case"duration":return j.value<$.value?-1:j.value.equals($.value)?0:1;case"array":let ve=j.value,Le=$.value;for(let de=0;de<Math.min(ve.length,Le.length);de++){let he=i(ve[de],Le[de]);if(he!=0)return he}return ve.length-Le.length;case"object":let xt=j.value,ge=$.value,Et=Array.from(Object.keys(xt)),Ke=Array.from(Object.keys(ge));Et.sort(),Ke.sort();let kt=i(Et,Ke);if(kt!=0)return kt;for(let de of Et){let he=i(xt[de],ge[de]);if(he!=0)return he}return 0;case"widget":case"html":case"function":return 0}}t.compareValue=i;function s(D){var R;return(R=r(D))===null||R===void 0?void 0:R.type}t.typeOf=s;function a(D){let R=r(D);if(!R)return!1;switch(R.type){case"number":return R.value!=0;case"string":return R.value.length>0;case"boolean":return R.value;case"link":return!!R.value.path;case"date":return R.value.toMillis()!=0;case"duration":return R.value.as("seconds")!=0;case"object":return Object.keys(R.value).length>0;case"array":return R.value.length>0;case"null":return!1;case"html":case"widget":case"function":return!0}}t.isTruthy=a;function o(D){if(D==null)return D;if(t.isArray(D))return[].concat(D.map(R=>o(R)));if(t.isObject(D)){let R={};for(let[_,N]of Object.entries(D))R[_]=o(N);return R}else return D}t.deepCopy=o;function u(D){return typeof D=="string"}t.isString=u;function c(D){return typeof D=="number"}t.isNumber=c;function d(D){return D instanceof M}t.isDate=d;function f(D){return D instanceof A}t.isDuration=f;function m(D){return D==null}t.isNull=m;function y(D){return Array.isArray(D)}t.isArray=y;function w(D){return typeof D=="boolean"}t.isBoolean=w;function C(D){return D instanceof le}t.isLink=C;function k(D){return D instanceof In}t.isWidget=k;function F(D){return typeof HTMLElement!="undefined"?D instanceof HTMLElement:!1}t.isHtml=F;function E(D){return typeof D=="object"&&!F(D)&&!k(D)&&!y(D)&&!f(D)&&!d(D)&&!C(D)&&D!==void 0&&!m(D)}t.isObject=E;function L(D){return typeof D=="function"}t.isFunction=L})($r||($r={}));var mu;(function(t){function e(i){return $r.isObject(i)&&Object.keys(i).length==2&&"key"in i&&"rows"in i}t.isElementGroup=e;function r(i){for(let s of i)if(!e(s))return!1;return!0}t.isGrouping=r;function n(i){if(r(i)){let s=0;for(let a of i)s+=n(a.rows);return s}else return i.length}t.count=n})(mu||(mu={}));var le=class{constructor(e){Object.assign(this,e)}static file(e,r=!1,n){return new le({path:e,embed:r,display:n,subpath:void 0,type:"file"})}static infer(e,r=!1,n){if(e.includes("#^")){let i=e.split("#^");return le.block(i[0],i[1],r,n)}else if(e.includes("#")){let i=e.split("#");return le.header(i[0],i[1],r,n)}else return le.file(e,r,n)}static header(e,r,n,i){return new le({path:e,embed:n,display:i,subpath:mf(r),type:"header"})}static block(e,r,n,i){return new le({path:e,embed:n,display:i,subpath:r,type:"block"})}static fromObject(e){return new le(e)}equals(e){return e==null||e==null?!1:this.path==e.path&&this.type==e.type&&this.subpath==e.subpath}toString(){return this.markdown()}toObject(){return{path:this.path,type:this.type,subpath:this.subpath,display:this.display,embed:this.embed}}withPath(e){return new le(Object.assign({},this,{path:e}))}withDisplay(e){return new le(Object.assign({},this,{display:e}))}withHeader(e){return le.header(this.path,e,this.embed,this.display)}toFile(){return le.file(this.path,this.embed,this.display)}toEmbed(){if(this.embed)return this;{let e=new le(this);return e.embed=!0,e}}fromEmbed(){if(this.embed){let e=new le(this);return e.embed=!1,e}else return this}markdown(){let e=(this.embed?"!":"")+"[["+this.obsidianLink();return this.display?e+="|"+this.display:(e+="|"+pu(this.path),(this.type=="header"||this.type=="block")&&(e+=" > "+this.subpath)),e+="]]",e}obsidianLink(){var e,r;let n=this.path.replace("|","\\|");return this.type=="header"?n+"#"+((e=this.subpath)===null||e===void 0?void 0:e.replace("|","\\|")):this.type=="block"?n+"#^"+((r=this.subpath)===null||r===void 0?void 0:r.replace("|","\\|")):n}fileName(){return pu(this.path).replace(".md","")}},In=class{constructor(e){this.$widget=e}},gu=class extends In{constructor(e,r){super("dataview:list-pair");this.key=e,this.value=r}markdown(){return`${$r.toString(this.key)}: ${$r.toString(this.value)}`}},bu=class extends In{constructor(e,r){super("dataview:external-link");this.url=e,this.display=r}markdown(){var e;return`[${(e=this.display)!==null&&e!==void 0?e:this.url}](${this.url})`}},yu;(function(t){function e(a,o){return new gu(a,o)}t.listPair=e;function r(a,o){return new bu(a,o)}t.externalLink=r;function n(a){return a.$widget==="dataview:list-pair"}t.isListPair=n;function i(a){return a.$widget==="dataview:external-link"}t.isExternalLink=i;function s(a){return n(a)||i(a)}t.isBuiltin=s})(yu||(yu={}));var Q;(function(t){function e(m){return{type:"variable",name:m}}t.variable=e;function r(m){return{type:"literal",value:m}}t.literal=r;function n(m,y,w){return{type:"binaryop",left:m,op:y,right:w}}t.binaryOp=n;function i(m,y){return{type:"index",object:m,index:y}}t.index=i;function s(m){let y=m.split("."),w=t.variable(y[0]);for(let C=1;C<y.length;C++)w=t.index(w,t.literal(y[C]));return w}t.indexVariable=s;function a(m,y){return{type:"lambda",arguments:m,value:y}}t.lambda=a;function o(m,y){return{type:"function",func:m,arguments:y}}t.func=o;function u(m){return{type:"list",values:m}}t.list=u;function c(m){return{type:"object",values:m}}t.object=c;function d(m){return{type:"negated",child:m}}t.negate=d;function f(m){return m=="<="||m=="<"||m==">"||m==">="||m=="!="||m=="="}t.isCompareOp=f,t.NULL=t.literal(null)})(Q||(Q={}));var et;(function(t){function e(d){return{type:"tag",tag:d}}t.tag=e;function r(d){return{type:"csv",path:d}}t.csv=r;function n(d){return{type:"folder",folder:d}}t.folder=n;function i(d,f){return{type:"link",file:d,direction:f?"incoming":"outgoing"}}t.link=i;function s(d,f,m){return{type:"binaryop",left:d,op:f,right:m}}t.binaryOp=s;function a(d,f){return{type:"binaryop",left:d,op:"&",right:f}}t.and=a;function o(d,f){return{type:"binaryop",left:d,op:"|",right:f}}t.or=o;function u(d){return{type:"negate",child:d}}t.negate=u;function c(){return{type:"empty"}}t.empty=c})(et||(et={}));var Du=new RegExp(Xi(),""),es={year:A.fromObject({years:1}),years:A.fromObject({years:1}),yr:A.fromObject({years:1}),yrs:A.fromObject({years:1}),month:A.fromObject({months:1}),months:A.fromObject({months:1}),mo:A.fromObject({months:1}),mos:A.fromObject({months:1}),week:A.fromObject({weeks:1}),weeks:A.fromObject({weeks:1}),wk:A.fromObject({weeks:1}),wks:A.fromObject({weeks:1}),w:A.fromObject({weeks:1}),day:A.fromObject({days:1}),days:A.fromObject({days:1}),d:A.fromObject({days:1}),hour:A.fromObject({hours:1}),hours:A.fromObject({hours:1}),hr:A.fromObject({hours:1}),hrs:A.fromObject({hours:1}),h:A.fromObject({hours:1}),minute:A.fromObject({minutes:1}),minutes:A.fromObject({minutes:1}),min:A.fromObject({minutes:1}),mins:A.fromObject({minutes:1}),m:A.fromObject({minutes:1}),second:A.fromObject({seconds:1}),seconds:A.fromObject({seconds:1}),sec:A.fromObject({seconds:1}),secs:A.fromObject({seconds:1}),s:A.fromObject({seconds:1})},ts={now:()=>M.local(),today:()=>M.local().startOf("day"),yesterday:()=>M.local().startOf("day").minus(A.fromObject({days:1})),tomorrow:()=>M.local().startOf("day").plus(A.fromObject({days:1})),sow:()=>M.local().startOf("week"),"start-of-week":()=>M.local().startOf("week"),eow:()=>M.local().endOf("week"),"end-of-week":()=>M.local().endOf("week"),soy:()=>M.local().startOf("year"),"start-of-year":()=>M.local().startOf("year"),eoy:()=>M.local().endOf("year"),"end-of-year":()=>M.local().endOf("year"),som:()=>M.local().startOf("month"),"start-of-month":()=>M.local().startOf("month"),eom:()=>M.local().endOf("month"),"end-of-month":()=>M.local().endOf("month")},rs=["FROM","WHERE","LIMIT","GROUP","FLATTEN"];function bf(t){let e=-1;for(;(e=t.indexOf("|",e+1))>=0;)if(!(e>0&&t[e-1]=="\\"))return[t.substring(0,e).replace(/\\\|/g,"|"),t.substring(e+1)];return[t.replace(/\\\|/g,"|"),void 0]}function yf(t){let[e,r]=bf(t);return le.infer(e,!1,r)}function Hr(t,e,r){return p.exports.seqMap(t,p.exports.seq(p.exports.optWhitespace,e,p.exports.optWhitespace,t).many(),(n,i)=>{if(i.length==0)return n;let s=r(n,i[0][1],i[0][3]);for(let a=1;a<i.length;a++)s=r(s,i[a][1],i[a][3]);return s})}function Df(t,...e){return p.exports.custom((r,n)=>(i,s)=>{let a=t._(i,s);if(!a.status)return a;for(let o of e){let u=o(a.value)._(i,a.index);if(!u.status)return a;a=u}return a})}var Ue=p.exports.createLanguage({number:t=>p.exports.regexp(/-?[0-9]+(\.[0-9]+)?/).map(e=>Number.parseFloat(e)).desc("number"),string:t=>p.exports.string('"').then(p.exports.alt(t.escapeCharacter,p.exports.noneOf('"\\')).atLeast(0).map(e=>e.join(""))).skip(p.exports.string('"')).desc("string"),escapeCharacter:t=>p.exports.string("\\").then(p.exports.any).map(e=>e==='"'?'"':e==="\\"?"\\":"\\"+e),bool:t=>p.exports.regexp(/true|false|True|False/).map(e=>e.toLowerCase()=="true").desc("boolean ('true' or 'false')"),tag:t=>p.exports.seqMap(p.exports.string("#"),p.exports.alt(p.exports.regexp(/[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]/).desc("text")).many(),(e,r)=>e+r.join("")).desc("tag ('#hello/stuff')"),identifier:t=>p.exports.seqMap(p.exports.alt(p.exports.regexp(/\p{Letter}/u),p.exports.regexp(Du).desc("text")),p.exports.alt(p.exports.regexp(/[0-9\p{Letter}_-]/u),p.exports.regexp(Du).desc("text")).many(),(e,r)=>e+r.join("")).desc("variable identifier"),link:t=>p.exports.regexp(/\[\[([^\[\]]*?)\]\]/u,1).map(e=>yf(e)).desc("file link"),embedLink:t=>p.exports.seqMap(p.exports.string("!").atMost(1),t.link,(e,r)=>(e.length>0&&(r.embed=!0),r)).desc("file link"),binaryPlusMinus:t=>p.exports.regexp(/\+|-/).map(e=>e).desc("'+' or '-'"),binaryMulDiv:t=>p.exports.regexp(/\*|\/|%/).map(e=>e).desc("'*' or '/' or '%'"),binaryCompareOp:t=>p.exports.regexp(/>=|<=|!=|>|<|=/).map(e=>e).desc("'>=' or '<=' or '!=' or '=' or '>' or '<'"),binaryBooleanOp:t=>p.exports.regexp(/and|or|&|\|/i).map(e=>e.toLowerCase()=="and"?"&":e.toLowerCase()=="or"?"|":e).desc("'and' or 'or'"),rootDate:t=>p.exports.seqMap(p.exports.regexp(/\d{4}/),p.exports.string("-"),p.exports.regexp(/\d{2}/),(e,r,n)=>M.fromObject({year:Number.parseInt(e),month:Number.parseInt(n)})).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),dateShorthand:t=>p.exports.alt(...Object.keys(ts).sort((e,r)=>r.length-e.length).map(p.exports.string)),date:t=>Df(t.rootDate,e=>p.exports.seqMap(p.exports.string("-"),p.exports.regexp(/\d{2}/),(r,n)=>e.set({day:Number.parseInt(n)})),e=>p.exports.seqMap(p.exports.string("T"),p.exports.regexp(/\d{2}/),(r,n)=>e.set({hour:Number.parseInt(n)})),e=>p.exports.seqMap(p.exports.string(":"),p.exports.regexp(/\d{2}/),(r,n)=>e.set({minute:Number.parseInt(n)})),e=>p.exports.seqMap(p.exports.string(":"),p.exports.regexp(/\d{2}/),(r,n)=>e.set({second:Number.parseInt(n)})),e=>p.exports.alt(p.exports.seqMap(p.exports.string("."),p.exports.regexp(/\d{3}/),(r,n)=>e.set({millisecond:Number.parseInt(n)})),p.exports.succeed(e)),e=>p.exports.alt(p.exports.seqMap(p.exports.string("+").or(p.exports.string("-")),p.exports.regexp(/\d{1,2}(:\d{2})?/),(r,n)=>e.setZone("UTC"+r+n,{keepLocalTime:!0})),p.exports.seqMap(p.exports.string("Z"),()=>e.setZone("utc",{keepLocalTime:!0})),p.exports.seqMap(p.exports.string("["),p.exports.regexp(/[0-9A-Za-z+-\/]+/u),p.exports.string("]"),(r,n,i)=>e.setZone(n,{keepLocalTime:!0})))).assert(e=>e.isValid,"valid date").desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),datePlus:t=>p.exports.alt(t.dateShorthand.map(e=>ts[e]()),t.date).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS] or in shorthand"),durationType:t=>p.exports.alt(...Object.keys(es).sort((e,r)=>r.length-e.length).map(p.exports.string)),duration:t=>p.exports.seqMap(t.number,p.exports.optWhitespace,t.durationType,(e,r,n)=>es[n].mapUnits(i=>i*e)).sepBy1(p.exports.string(",").trim(p.exports.optWhitespace).or(p.exports.optWhitespace)).map(e=>e.reduce((r,n)=>r.plus(n))).desc("duration like 4hr2min"),rawNull:t=>p.exports.string("null"),tagSource:t=>t.tag.map(e=>et.tag(e)),csvSource:t=>p.exports.seqMap(p.exports.string("csv(").skip(p.exports.optWhitespace),t.string,p.exports.string(")"),(e,r,n)=>et.csv(r)),linkIncomingSource:t=>t.link.map(e=>et.link(e.path,!0)),linkOutgoingSource:t=>p.exports.seqMap(p.exports.string("outgoing(").skip(p.exports.optWhitespace),t.link,p.exports.string(")"),(e,r,n)=>et.link(r.path,!1)),folderSource:t=>t.string.map(e=>et.folder(e)),parensSource:t=>p.exports.seqMap(p.exports.string("("),p.exports.optWhitespace,t.source,p.exports.optWhitespace,p.exports.string(")"),(e,r,n,i,s)=>n),negateSource:t=>p.exports.seqMap(p.exports.alt(p.exports.string("-"),p.exports.string("!")),t.atomSource,(e,r)=>et.negate(r)),atomSource:t=>p.exports.alt(t.parensSource,t.negateSource,t.linkOutgoingSource,t.linkIncomingSource,t.folderSource,t.tagSource,t.csvSource),binaryOpSource:t=>Hr(t.atomSource,t.binaryBooleanOp.map(e=>e),et.binaryOp),source:t=>t.binaryOpSource,variableField:t=>t.identifier.chain(e=>rs.includes(e.toUpperCase())?p.exports.fail("Variable fields cannot be a keyword ("+rs.join(" or ")+")"):p.exports.succeed(Q.variable(e))).desc("variable"),numberField:t=>t.number.map(e=>Q.literal(e)).desc("number"),stringField:t=>t.string.map(e=>Q.literal(e)).desc("string"),boolField:t=>t.bool.map(e=>Q.literal(e)).desc("boolean"),dateField:t=>p.exports.seqMap(p.exports.string("date("),p.exports.optWhitespace,t.datePlus,p.exports.optWhitespace,p.exports.string(")"),(e,r,n,i,s)=>Q.literal(n)).desc("date"),durationField:t=>p.exports.seqMap(p.exports.string("dur("),p.exports.optWhitespace,t.duration,p.exports.optWhitespace,p.exports.string(")"),(e,r,n,i,s)=>Q.literal(n)).desc("duration"),nullField:t=>t.rawNull.map(e=>Q.NULL),linkField:t=>t.link.map(e=>Q.literal(e)),listField:t=>t.field.sepBy(p.exports.string(",").trim(p.exports.optWhitespace)).wrap(p.exports.string("[").skip(p.exports.optWhitespace),p.exports.optWhitespace.then(p.exports.string("]"))).map(e=>Q.list(e)).desc("list ('[1, 2, 3]')"),objectField:t=>p.exports.seqMap(t.identifier.or(t.string),p.exports.string(":").trim(p.exports.optWhitespace),t.field,(e,r,n)=>({name:e,value:n})).sepBy(p.exports.string(",").trim(p.exports.optWhitespace)).wrap(p.exports.string("{").skip(p.exports.optWhitespace),p.exports.optWhitespace.then(p.exports.string("}"))).map(e=>{let r={};for(let n of e)r[n.name]=n.value;return Q.object(r)}).desc("object ('{ a: 1, b: 2 }')"),atomInlineField:t=>p.exports.alt(t.date,t.duration.map(e=>fu(e)),t.string,t.tag,t.embedLink,t.bool,t.number,t.rawNull),inlineFieldList:t=>t.atomInlineField.sepBy(p.exports.string(",").trim(p.exports.optWhitespace).lookahead(t.atomInlineField)),inlineField:t=>p.exports.alt(p.exports.seqMap(t.atomInlineField,p.exports.string(",").trim(p.exports.optWhitespace),t.inlineFieldList,(e,r,n)=>[e].concat(n)),t.atomInlineField),atomField:t=>p.exports.alt(t.embedLink.map(e=>Q.literal(e)),t.negatedField,t.linkField,t.listField,t.objectField,t.lambdaField,t.parensField,t.boolField,t.numberField,t.stringField,t.dateField,t.durationField,t.nullField,t.variableField),indexField:t=>p.exports.seqMap(t.atomField,p.exports.alt(t.dotPostfix,t.indexPostfix,t.functionPostfix).many(),(e,r)=>{let n=e;for(let i of r)switch(i.type){case"dot":n=Q.index(n,Q.literal(i.field));break;case"index":n=Q.index(n,i.field);break;case"function":n=Q.func(n,i.fields);break}return n}),negatedField:t=>p.exports.seqMap(p.exports.string("!"),t.indexField,(e,r)=>Q.negate(r)).desc("negated field"),parensField:t=>p.exports.seqMap(p.exports.string("("),p.exports.optWhitespace,t.field,p.exports.optWhitespace,p.exports.string(")"),(e,r,n,i,s)=>n),lambdaField:t=>p.exports.seqMap(t.identifier.sepBy(p.exports.string(",").trim(p.exports.optWhitespace)).wrap(p.exports.string("(").trim(p.exports.optWhitespace),p.exports.string(")").trim(p.exports.optWhitespace)),p.exports.string("=>").trim(p.exports.optWhitespace),t.field,(e,r,n)=>({type:"lambda",arguments:e,value:n})),dotPostfix:t=>p.exports.seqMap(p.exports.string("."),t.identifier,(e,r)=>({type:"dot",field:r})),indexPostfix:t=>p.exports.seqMap(p.exports.string("["),p.exports.optWhitespace,t.field,p.exports.optWhitespace,p.exports.string("]"),(e,r,n,i,s)=>({type:"index",field:n})),functionPostfix:t=>p.exports.seqMap(p.exports.string("("),p.exports.optWhitespace,t.field.sepBy(p.exports.string(",").trim(p.exports.optWhitespace)),p.exports.optWhitespace,p.exports.string(")"),(e,r,n,i,s)=>({type:"function",fields:n})),binaryMulDivField:t=>Hr(t.indexField,t.binaryMulDiv,Q.binaryOp),binaryPlusMinusField:t=>Hr(t.binaryMulDivField,t.binaryPlusMinus,Q.binaryOp),binaryCompareField:t=>Hr(t.binaryPlusMinusField,t.binaryCompareOp,Q.binaryOp),binaryBooleanField:t=>Hr(t.binaryCompareField,t.binaryBooleanOp,Q.binaryOp),binaryOpField:t=>t.binaryBooleanField,field:t=>t.binaryOpField});function vf(t){try{return Bn.success(Ue.field.tryParse(t))}catch(e){return Bn.failure(""+e)}}var jn;(function(t){function e(n,i){return{name:n,field:i}}t.named=e;function r(n,i){return{field:n,direction:i}}t.sortBy=r})(jn||(jn={}));function wf(t){return p.exports.custom((e,r)=>(n,i)=>{let s=t._(n,i);return s.status?Object.assign({},s,{value:[s.value,n.substring(i,s.index)]}):s})}function Ff(t){return t.split(/[\r\n]+/).map(e=>e.trim()).join("")}var xf=p.exports.createLanguage({queryType:t=>p.exports.alt(p.exports.regexp(/TABLE|LIST|TASK|CALENDAR/i)).map(e=>e.toLowerCase()).desc("query type ('TABLE', 'LIST', 'TASK', or 'CALENDAR')"),explicitNamedField:t=>p.exports.seqMap(Ue.field.skip(p.exports.whitespace),p.exports.regexp(/AS/i).skip(p.exports.whitespace),Ue.identifier.or(Ue.string),(e,r,n)=>jn.named(n,e)),namedField:t=>p.exports.alt(t.explicitNamedField,wf(Ue.field).map(([e,r])=>jn.named(Ff(r),e))),sortField:t=>p.exports.seqMap(Ue.field.skip(p.exports.optWhitespace),p.exports.regexp(/ASCENDING|DESCENDING|ASC|DESC/i).atMost(1),(e,r)=>{let n=r.length==0?"ascending":r[0].toLowerCase();return n=="desc"&&(n="descending"),n=="asc"&&(n="ascending"),{field:e,direction:n}}),headerClause:t=>t.queryType.skip(p.exports.whitespace).chain(e=>{switch(e){case"table":return p.exports.seqMap(p.exports.regexp(/WITHOUT\s+ID/i).skip(p.exports.optWhitespace).atMost(1),p.exports.sepBy(t.namedField,p.exports.string(",").trim(p.exports.optWhitespace)),(r,n)=>({type:"table",fields:n,showId:r.length==0}));case"list":return p.exports.seqMap(p.exports.regexp(/WITHOUT\s+ID/i).skip(p.exports.optWhitespace).atMost(1),Ue.field.atMost(1),(r,n)=>({type:"list",format:n.length==1?n[0]:void 0,showId:r.length==0}));case"task":return p.exports.succeed({type:"task"});case"calendar":return p.exports.seqMap(t.namedField,r=>({type:"calendar",showId:!0,field:r}));default:return p.exports.fail(`Unrecognized query type '${e}'`)}}).desc("TABLE or LIST or TASK or CALENDAR"),fromClause:t=>p.exports.seqMap(p.exports.regexp(/FROM/i),p.exports.whitespace,Ue.source,(e,r,n)=>n),whereClause:t=>p.exports.seqMap(p.exports.regexp(/WHERE/i),p.exports.whitespace,Ue.field,(e,r,n)=>({type:"where",clause:n})).desc("WHERE <expression>"),sortByClause:t=>p.exports.seqMap(p.exports.regexp(/SORT/i),p.exports.whitespace,t.sortField.sepBy1(p.exports.string(",").trim(p.exports.optWhitespace)),(e,r,n)=>({type:"sort",fields:n})).desc("SORT field [ASC/DESC]"),limitClause:t=>p.exports.seqMap(p.exports.regexp(/LIMIT/i),p.exports.whitespace,Ue.field,(e,r,n)=>({type:"limit",amount:n})).desc("LIMIT <value>"),flattenClause:t=>p.exports.seqMap(p.exports.regexp(/FLATTEN/i).skip(p.exports.whitespace),t.namedField,(e,r)=>({type:"flatten",field:r})).desc("FLATTEN <value> [AS <name>]"),groupByClause:t=>p.exports.seqMap(p.exports.regexp(/GROUP BY/i).skip(p.exports.whitespace),t.namedField,(e,r)=>({type:"group",field:r})).desc("GROUP BY <value> [AS <name>]"),clause:t=>p.exports.alt(t.fromClause,t.whereClause,t.sortByClause,t.limitClause,t.groupByClause,t.flattenClause),query:t=>p.exports.seqMap(t.headerClause.trim(p.exports.optWhitespace),t.fromClause.trim(p.exports.optWhitespace).atMost(1),t.clause.trim(p.exports.optWhitespace).many(),(e,r,n)=>({header:e,source:r.length==0?et.folder(""):r[0],operations:n,settings:Qi}))}),Ef=t=>{var e;return t?(e=t.plugins.plugins.dataview)===null||e===void 0?void 0:e.api:window.DataviewAPI},kf=t=>t.plugins.enabledPlugins.has("dataview");tt.DATE_SHORTHANDS=ts;tt.DURATION_TYPES=es;tt.EXPRESSION=Ue;tt.KEYWORDS=rs;tt.QUERY_LANGUAGE=xf;tt.getAPI=Ef;tt.isPluginEnabled=kf;tt.parseField=vf});var vu=at((is,ss)=>{(function(t,e,r){typeof is=="object"?(ss.exports=r(),ss.exports.default=r()):typeof define=="function"&&define.amd?define(r):e[t]=r()})("slugify",is,function(){var t=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`),e=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');function r(n,i){if(typeof n!="string")throw new Error("slugify: string argument expected");i=typeof i=="string"?{replacement:i}:i||{};var s=e[i.locale]||{},a=i.replacement===void 0?"-":i.replacement,o=i.trim===void 0?!0:i.trim,u=n.normalize().split("").reduce(function(c,d){var f=s[d];return f===void 0&&(f=t[d]),f===void 0&&(f=d),f===a&&(f=" "),c+f.replace(i.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return i.strict&&(u=u.replace(/[^A-Za-z0-9\s]/g,"")),o&&(u=u.trim()),u=u.replace(/\s+/g,a),i.lower&&(u=u.toLowerCase()),u}return r.extend=function(n){Object.assign(t,n)},r})});var Pu=at((ly,Ou)=>{Ou.exports=Tu;function Tu(t,e,r,n){if(typeof r!="function")throw new Error("method for before hook must be a function");return n||(n={}),Array.isArray(e)?e.reverse().reduce(function(i,s){return Tu.bind(null,t,s,i,n)},r)():Promise.resolve().then(function(){return t.registry[e]?t.registry[e].reduce(function(i,s){return s.hook.bind(null,i,n)},r)():r(n)})}});var Au=at((cy,Ru)=>{Ru.exports=Rf;function Rf(t,e,r,n){var i=n;t.registry[r]||(t.registry[r]=[]),e==="before"&&(n=function(s,a){return Promise.resolve().then(i.bind(null,a)).then(s.bind(null,a))}),e==="after"&&(n=function(s,a){var o;return Promise.resolve().then(s.bind(null,a)).then(function(u){return o=u,i(o,a)}).then(function(){return o})}),e==="error"&&(n=function(s,a){return Promise.resolve().then(s.bind(null,a)).catch(function(o){return i(o,a)})}),t.registry[r].push({hook:n,orig:i})}});var Lu=at((dy,Nu)=>{Nu.exports=Af;function Af(t,e,r){if(!!t.registry[e]){var n=t.registry[e].map(function(i){return i.orig}).indexOf(r);n!==-1&&t.registry[e].splice(n,1)}}});var Vu=at((hy,Wr)=>{var Mu=Pu(),Nf=Au(),Lf=Lu(),Bu=Function.bind,Iu=Bu.bind(Bu);function ju(t,e,r){var n=Iu(Lf,null).apply(null,r?[e,r]:[e]);t.api={remove:n},t.remove=n,["before","error","after","wrap"].forEach(function(i){var s=r?[e,i,r]:[e,i];t[i]=t.api[i]=Iu(Nf,null).apply(null,s)})}function Mf(){var t="h",e={registry:{}},r=Mu.bind(null,e,t);return ju(r,e,t),r}function Gu(){var t={registry:{}},e=Mu.bind(null,t);return ju(e,t),e}var _u=!1;function gr(){return _u||(console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4'),_u=!0),Gu()}gr.Singular=Mf.bind();gr.Collection=Gu.bind();Wr.exports=gr;Wr.exports.Hook=gr;Wr.exports.Singular=gr.Singular;Wr.exports.Collection=gr.Collection});var Ju=at((Dr,Zu)=>{"use strict";var zf=function(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global;throw new Error("unable to locate global object")},_t=zf();Zu.exports=Dr=_t.fetch;_t.fetch&&(Dr.default=_t.fetch.bind(_t));Dr.Headers=_t.Headers;Dr.Request=_t.Request;Dr.Response=_t.Response});var el=at((yy,Xu)=>{Xu.exports=Qu;function Qu(t,e){if(t&&e)return Qu(t)(e);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(n){r[n]=t[n]}),r;function r(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var s=t.apply(this,n),a=n[n.length-1];return typeof s=="function"&&s!==a&&Object.keys(a).forEach(function(o){s[o]=a[o]}),s}}});var nl=at((Dy,fs)=>{var tl=el();fs.exports=tl($n);fs.exports.strict=tl(rl);$n.proto=$n(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return $n(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return rl(this)},configurable:!0})});function $n(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function rl(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}});ei(exports,{default:()=>ks});var Jn=W(require("obsidian"));var I=W(require("obsidian"));var Ee=W(require("obsidian"));var ye;(function(r){r.path="path",r.title="title"})(ye||(ye={}));var ft;(function(a){a.github="github-configuration",a.upload="upload-configuration",a.text="text-conversion",a.embed="embed-configuration",a.plugin="plugin-settings",a.help="help"})(ft||(ft={}));var U;(function(n){n.yaml="yaml",n.obsidian="obsidian",n.fixed="fixed"})(U||(U={}));var xe;(function(r){r.free="Github Free/Pro/Team (default)",r.entreprise="Enterprise"})(xe||(xe={}));var pt="%configDir%/plugins/%pluginID%/env",Ns={github:{user:"",repo:"",branch:"main",automaticallyMergePR:!0,tokenPath:pt,api:{tiersForApi:xe.free,hostname:""},workflow:{commitMessage:"[PUBLISHER] Merge",name:""},otherRepo:[],verifiedRepo:!1,rateLimit:0},upload:{behavior:U.fixed,defaultName:"",rootFolder:"",yamlFolderKey:"",frontmatterTitle:{enable:!1,key:"title"},replaceTitle:[],replacePath:[],autoclean:{enable:!1,excluded:[]},folderNote:{enable:!1,rename:"index.md"},metadataExtractorPath:""},conversion:{hardbreak:!1,dataview:!0,censorText:[],tags:{inline:!1,exclude:[],fields:[]},links:{internal:!1,unshared:!1,wiki:!1,slugify:!1}},embed:{attachments:!0,keySendFile:[],notes:!1,folder:""},plugin:{shareKey:"share",fileMenu:!1,editorMenu:!1,excludedFolder:[],copyLink:{enable:!1,links:"",removePart:[],addCmd:!1},noticeError:!1,displayModalRepoEditing:!1}};function ae(t){return ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ae(t)}function Te(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ti(t,e){if(ae(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ae(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Fr(t){var e=ti(t,"string");return ae(e)==="symbol"?e:String(e)}function Ls(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Fr(n.key),n)}}function Oe(t,e,r){return e&&Ls(t.prototype,e),r&&Ls(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ie(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xr(t,e){return xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},xr(t,e)}function Jt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xr(t,e)}function Rt(t,e){if(e&&(ae(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ie(t)}function Pe(t){return Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pe(t)}function ze(t,e,r){return e=Fr(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ri(t){if(Array.isArray(t))return t}function ni(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function rn(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ii(t,e){if(!!t){if(typeof t=="string")return rn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rn(t,e)}}function si(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ai(t){return ri(t)||ni(t)||ii(t)||si()}function Ms(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Bs(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ms(Object(r),!0).forEach(function(n){ze(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ms(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var fc={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,r){console&&console[e]&&console[e].apply(console,r)}},pc=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Te(this,t),this.init(e,r)}return Oe(t,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=r||fc,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(r,n,i,s){return s&&!this.debug?null:(typeof r[0]=="string"&&(r[0]="".concat(i).concat(this.prefix," ").concat(r[0])),this.logger[n](r))}},{key:"create",value:function(r){return new t(this.logger,Bs(Bs({},{prefix:"".concat(this.prefix,":").concat(r,":")}),this.options))}},{key:"clone",value:function(r){return r=r||this.options,r.prefix=r.prefix||this.prefix,new t(this.logger,r)}}]),t}(),Ye=new pc,mt=function(){function t(){Te(this,t),this.observers={}}return Oe(t,[{key:"on",value:function(r,n){var i=this;return r.split(" ").forEach(function(s){i.observers[s]=i.observers[s]||[],i.observers[s].push(n)}),this}},{key:"off",value:function(r,n){if(!!this.observers[r]){if(!n){delete this.observers[r];return}this.observers[r]=this.observers[r].filter(function(i){return i!==n})}}},{key:"emit",value:function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];if(this.observers[r]){var a=[].concat(this.observers[r]);a.forEach(function(u){u.apply(void 0,i)})}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach(function(u){u.apply(u,[r].concat(i))})}}}]),t}();function Er(){var t,e,r=new Promise(function(n,i){t=n,e=i});return r.resolve=t,r.reject=e,r}function Is(t){return t==null?"":""+t}function mc(t,e,r){t.forEach(function(n){e[n]&&(r[n]=e[n])})}function oi(t,e,r){function n(o){return o&&o.indexOf("###")>-1?o.replace(/###/g,"."):o}function i(){return!t||typeof t=="string"}for(var s=typeof e!="string"?[].concat(e):e.split(".");s.length>1;){if(i())return{};var a=n(s.shift());!t[a]&&r&&(t[a]=new r),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={}}return i()?{}:{obj:t,k:n(s.shift())}}function js(t,e,r){var n=oi(t,e,Object),i=n.obj,s=n.k;i[s]=r}function gc(t,e,r,n){var i=oi(t,e,Object),s=i.obj,a=i.k;s[a]=s[a]||[],n&&(s[a]=s[a].concat(r)),n||s[a].push(r)}function nn(t,e){var r=oi(t,e),n=r.obj,i=r.k;if(!!n)return n[i]}function bc(t,e,r){var n=nn(t,r);return n!==void 0?n:nn(e,r)}function Gs(t,e,r){for(var n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?typeof t[n]=="string"||t[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?r&&(t[n]=e[n]):Gs(t[n],e[n],r):t[n]=e[n]);return t}function Qt(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var yc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Dc(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return yc[e]}):t}var sn=typeof window!="undefined"&&window.navigator&&typeof window.navigator.userAgentData=="undefined"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,vc=[" ",",","?","!",";"];function wc(t,e,r){e=e||"",r=r||"";var n=vc.filter(function(o){return e.indexOf(o)<0&&r.indexOf(o)<0});if(n.length===0)return!0;var i=new RegExp("(".concat(n.map(function(o){return o==="?"?"\\?":o}).join("|"),")")),s=!i.test(t);if(!s){var a=t.indexOf(r);a>0&&!i.test(t.substring(0,a))&&(s=!0)}return s}function an(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!!t){if(t[e])return t[e];for(var n=e.split(r),i=t,s=0;s<n.length;++s){if(!i||typeof i[n[s]]=="string"&&s+1<n.length)return;if(i[n[s]]===void 0){for(var a=2,o=n.slice(s,s+a).join(r),u=i[o];u===void 0&&n.length>s+a;)a++,o=n.slice(s,s+a).join(r),u=i[o];if(u===void 0)return;if(u===null)return null;if(e.endsWith(o)){if(typeof u=="string")return u;if(o&&typeof u[o]=="string")return u[o]}var c=n.slice(s+a).join(r);return c?an(u,c,r):void 0}i=i[n[s]]}return i}}function _s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function on(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?_s(Object(r),!0).forEach(function(n){ze(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_s(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Fc(t){var e=xc();return function(){var n=Pe(t),i;if(e){var s=Pe(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return Rt(this,i)}}function xc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var Ec=function(t){Jt(r,t);var e=Fc(r);function r(n){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Te(this,r),i=e.call(this),sn&&mt.call(Ie(i)),i.data=n||{},i.options=s,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return Oe(r,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var s=this.options.ns.indexOf(i);s>-1&&this.options.ns.splice(s,1)}},{key:"getResource",value:function(i,s,a){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,c=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure,d=[i,s];a&&typeof a!="string"&&(d=d.concat(a)),a&&typeof a=="string"&&(d=d.concat(u?a.split(u):a)),i.indexOf(".")>-1&&(d=i.split("."));var f=nn(this.data,d);return f||!c||typeof a!="string"?f:an(this.data&&this.data[i]&&this.data[i][s],a,u)}},{key:"addResource",value:function(i,s,a,o){var u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator,d=[i,s];a&&(d=d.concat(c?a.split(c):a)),i.indexOf(".")>-1&&(d=i.split("."),o=s,s=d[1]),this.addNamespaces(s),js(this.data,d,o),u.silent||this.emit("added",i,s,a,o)}},{key:"addResources",value:function(i,s,a){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var u in a)(typeof a[u]=="string"||Object.prototype.toString.apply(a[u])==="[object Array]")&&this.addResource(i,s,u,a[u],{silent:!0});o.silent||this.emit("added",i,s,a)}},{key:"addResourceBundle",value:function(i,s,a,o,u){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},d=[i,s];i.indexOf(".")>-1&&(d=i.split("."),o=a,a=s,s=d[1]),this.addNamespaces(s);var f=nn(this.data,d)||{};o?Gs(f,a,u):f=on(on({},f),a),js(this.data,d,f),c.silent||this.emit("added",i,s,a)}},{key:"removeResourceBundle",value:function(i,s){this.hasResourceBundle(i,s)&&delete this.data[i][s],this.removeNamespaces(s),this.emit("removed",i,s)}},{key:"hasResourceBundle",value:function(i,s){return this.getResource(i,s)!==void 0}},{key:"getResourceBundle",value:function(i,s){return s||(s=this.options.defaultNS),this.options.compatibilityAPI==="v1"?on(on({},{}),this.getResource(i,s)):this.getResource(i,s)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var s=this.getDataByLanguage(i),a=s&&Object.keys(s)||[];return!!a.find(function(o){return s[o]&&Object.keys(s[o]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(mt),Vs={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,r,n,i,s){var a=this;return e.forEach(function(o){a.processors[o]&&(r=a.processors[o].process(r,n,i,s))}),r}};function $s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$s(Object(r),!0).forEach(function(n){ze(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$s(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function kc(t){var e=Cc();return function(){var n=Pe(t),i;if(e){var s=Pe(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return Rt(this,i)}}function Cc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var Hs={},Us=function(t){Jt(r,t);var e=kc(r);function r(n){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Te(this,r),i=e.call(this),sn&&mt.call(Ie(i)),mc(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,Ie(i)),i.options=s,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Ye.create("translator"),i}return Oe(r,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var a=this.resolve(i,s);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(i,s){var a=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ns||this.options.defaultNS||[],c=a&&i.indexOf(a)>-1,d=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!wc(i,a,o);if(c&&!d){var f=i.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:i,namespaces:u};var m=i.split(a);(a!==o||a===o&&this.options.ns.indexOf(m[0])>-1)&&(u=m.shift()),i=m.join(o)}return typeof u=="string"&&(u=[u]),{key:i,namespaces:u}}},{key:"translate",value:function(i,s,a){var o=this;if(ae(s)!=="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),ae(s)==="object"&&(s=fe({},s)),s||(s={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var u=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,d=this.extractFromKey(i[i.length-1],s),f=d.key,m=d.namespaces,y=m[m.length-1],w=s.lng||this.language,C=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(w&&w.toLowerCase()==="cimode"){if(C){var k=s.nsSeparator||this.options.nsSeparator;return u?{res:"".concat(y).concat(k).concat(f),usedKey:f,exactUsedKey:f,usedLng:w,usedNS:y}:"".concat(y).concat(k).concat(f)}return u?{res:f,usedKey:f,exactUsedKey:f,usedLng:w,usedNS:y}:f}var F=this.resolve(i,s),E=F&&F.res,L=F&&F.usedKey||f,D=F&&F.exactUsedKey||f,R=Object.prototype.toString.apply(E),_=["[object Number]","[object Function]","[object RegExp]"],N=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,V=!this.i18nFormat||this.i18nFormat.handleAsObject,j=typeof E!="string"&&typeof E!="boolean"&&typeof E!="number";if(V&&E&&j&&_.indexOf(R)<0&&!(typeof N=="string"&&R==="[object Array]")){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var $=this.options.returnedObjectHandler?this.options.returnedObjectHandler(L,E,fe(fe({},s),{},{ns:m})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return u?(F.res=$,F):$}if(c){var Se=R==="[object Array]",ie=Se?[]:{},rt=Se?D:L;for(var ce in E)if(Object.prototype.hasOwnProperty.call(E,ce)){var we="".concat(rt).concat(c).concat(ce);ie[ce]=this.translate(we,fe(fe({},s),{joinArrays:!1,ns:m})),ie[ce]===we&&(ie[ce]=E[ce])}E=ie}}else if(V&&typeof N=="string"&&R==="[object Array]")E=E.join(N),E&&(E=this.extendTranslation(E,i,s,a));else{var ve=!1,Le=!1,xt=s.count!==void 0&&typeof s.count!="string",ge=r.hasDefaultValue(s),Et=xt?this.pluralResolver.getSuffix(w,s.count,s):"",Ke=s["defaultValue".concat(Et)]||s.defaultValue;!this.isValidLookup(E)&&ge&&(ve=!0,E=Ke),this.isValidLookup(E)||(Le=!0,E=f);var kt=s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,de=kt&&Le?void 0:E,he=ge&&Ke!==E&&this.options.updateMissing;if(Le||ve||he){if(this.logger.log(he?"updateKey":"missingKey",w,y,f,he?Ke:E),c){var vr=this.resolve(f,fe(fe({},s),{},{keySeparator:!1}));vr&&vr.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var Ct=[],St=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&St&&St[0])for(var Ht=0;Ht<St.length;Ht++)Ct.push(St[Ht]);else this.options.saveMissingTo==="all"?Ct=this.languageUtils.toResolveHierarchy(s.lng||this.language):Ct.push(s.lng||this.language);var Tt=function(Be,Ut,qt){var ht=ge&&qt!==E?qt:de;o.options.missingKeyHandler?o.options.missingKeyHandler(Be,y,Ut,ht,he,s):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(Be,y,Ut,ht,he,s),o.emit("missingKey",Be,y,Ut,E)};this.options.saveMissing&&(this.options.saveMissingPlurals&&xt?Ct.forEach(function(Me){o.pluralResolver.getSuffixes(Me,s).forEach(function(Be){Tt([Me],f+Be,s["defaultValue".concat(Be)]||Ke)})}):Tt(Ct,f,Ke))}E=this.extendTranslation(E,i,s,F,a),Le&&E===f&&this.options.appendNamespaceToMissingKey&&(E="".concat(y,":").concat(f)),(Le||ve)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?E=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(y,":").concat(f):f,ve?E:void 0):E=this.options.parseMissingKeyHandler(E))}return u?(F.res=E,F):E}},{key:"extendTranslation",value:function(i,s,a,o,u){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,fe(fe({},this.options.interpolation.defaultVariables),a),o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(fe(fe({},a),{interpolation:fe(fe({},this.options.interpolation),a.interpolation)}));var d=typeof i=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),f;if(d){var m=i.match(this.interpolator.nestingRegexp);f=m&&m.length}var y=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(y=fe(fe({},this.options.interpolation.defaultVariables),y)),i=this.interpolator.interpolate(i,y,a.lng||this.language,a),d){var w=i.match(this.interpolator.nestingRegexp),C=w&&w.length;f<C&&(a.nest=!1)}!a.lng&&this.options.compatibilityAPI!=="v1"&&o&&o.res&&(a.lng=o.usedLng),a.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var E=arguments.length,L=new Array(E),D=0;D<E;D++)L[D]=arguments[D];return u&&u[0]===L[0]&&!a.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(L[0]," in key: ").concat(s[0])),null):c.translate.apply(c,L.concat([s]))},a)),a.interpolation&&this.interpolator.reset()}var k=a.postProcess||this.options.postProcess,F=typeof k=="string"?[k]:k;return i!=null&&F&&F.length&&a.applyPostProcessor!==!1&&(i=Vs.handle(F,i,s,this.options&&this.options.postProcessPassResolved?fe({i18nResolved:o},a):a,this)),i}},{key:"resolve",value:function(i){var s=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,u,c,d,f;return typeof i=="string"&&(i=[i]),i.forEach(function(m){if(!s.isValidLookup(o)){var y=s.extractFromKey(m,a),w=y.key;u=w;var C=y.namespaces;s.options.fallbackNS&&(C=C.concat(s.options.fallbackNS));var k=a.count!==void 0&&typeof a.count!="string",F=k&&!a.ordinal&&a.count===0&&s.pluralResolver.shouldUseIntlApi(),E=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",L=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);C.forEach(function(D){s.isValidLookup(o)||(f=D,!Hs["".concat(L[0],"-").concat(D)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(f)&&(Hs["".concat(L[0],"-").concat(D)]=!0,s.logger.warn('key "'.concat(u,'" for languages "').concat(L.join(", "),`" won't get resolved as namespace "`).concat(f,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),L.forEach(function(R){if(!s.isValidLookup(o)){d=R;var _=[w];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(_,w,R,D,a);else{var N;k&&(N=s.pluralResolver.getSuffix(R,a.count,a));var V="".concat(s.options.pluralSeparator,"zero");if(k&&(_.push(w+N),F&&_.push(w+V)),E){var j="".concat(w).concat(s.options.contextSeparator).concat(a.context);_.push(j),k&&(_.push(j+N),F&&_.push(j+V))}}for(var $;$=_.pop();)s.isValidLookup(o)||(c=$,o=s.getResource(R,D,$,a))}}))})}}),{res:o,usedKey:u,exactUsedKey:c,usedLng:d,usedNS:f}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,s,a){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,s,a,o):this.resourceStore.getResource(i,s,a,o)}}],[{key:"hasDefaultValue",value:function(i){var s="defaultValue";for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&s===a.substring(0,s.length)&&i[a]!==void 0)return!0;return!1}}]),r}(mt);function ui(t){return t.charAt(0).toUpperCase()+t.slice(1)}var qs=function(){function t(e){Te(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ye.create("languageUtils")}return Oe(t,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var n=r.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var n=r.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],i=r.split("-");return this.options.lowerCaseLng?i=i.map(function(s){return s.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=ui(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=ui(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=ui(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isSupportedCode",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}},{key:"getBestMatchFromCodes",value:function(r){var n=this;if(!r)return null;var i;return r.forEach(function(s){if(!i){var a=n.formatLanguageCode(s);(!n.options.supportedLngs||n.isSupportedCode(a))&&(i=a)}}),!i&&this.options.supportedLngs&&r.forEach(function(s){if(!i){var a=n.getLanguagePartFromCode(s);if(n.isSupportedCode(a))return i=a;i=n.options.supportedLngs.find(function(o){if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&o.indexOf(a)===0)return o})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(r,n){if(!r)return[];if(typeof r=="function"&&(r=r(n)),typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!n)return r.default||[];var i=r[n];return i||(i=r[this.getScriptPartFromCode(n)]),i||(i=r[this.formatLanguageCode(n)]),i||(i=r[this.getLanguagePartFromCode(n)]),i||(i=r.default),i||[]}},{key:"toResolveHierarchy",value:function(r,n){var i=this,s=this.getFallbackCodes(n||this.options.fallbackLng||[],r),a=[],o=function(c){!c||(i.isSupportedCode(c)?a.push(c):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(r))):typeof r=="string"&&o(this.formatLanguageCode(r)),s.forEach(function(u){a.indexOf(u)<0&&o(i.formatLanguageCode(u))}),a}}]),t}(),Sc=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Tc={1:function(e){return Number(e>1)},2:function(e){return Number(e!=1)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(e==1?0:e>=2&&e<=4?1:2)},7:function(e){return Number(e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(e==1?0:e==2?1:e!=8&&e!=11?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(e==1?0:e==2?1:e<7?2:e<11?3:4)},11:function(e){return Number(e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(e!==0)},14:function(e){return Number(e==1?0:e==2?1:e==3?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:e!==0?1:2)},17:function(e){return Number(e==1||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(e==0?0:e==1?1:2)},19:function(e){return Number(e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(e==1?0:e==0||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3)}},Oc=["v1","v2","v3"],Ws={zero:0,one:1,two:2,few:3,many:4,other:5};function Pc(){var t={};return Sc.forEach(function(e){e.lngs.forEach(function(r){t[r]={numbers:e.nr,plurals:Tc[e.fc]}})}),t}var Rc=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Te(this,t),this.languageUtils=e,this.options=r,this.logger=Ye.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl=="undefined"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Pc()}return Oe(t,[{key:"addRule",value:function(r,n){this.rules[r]=n}},{key:"getRule",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(r,{type:n.ordinal?"ordinal":"cardinal"})}catch(i){return}return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(r,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(r,i).map(function(s){return"".concat(n).concat(s)})}},{key:"getSuffixes",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(r,i);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort(function(a,o){return Ws[a]-Ws[o]}).map(function(a){return"".concat(n.options.prepend).concat(a)}):s.numbers.map(function(a){return n.getSuffix(r,a,i)}):[]}},{key:"getSuffix",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.getRule(r,i);return s?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(s.select(n)):this.getSuffixRetroCompatible(s,n):(this.logger.warn("no plural rule found for: ".concat(r)),"")}},{key:"getSuffixRetroCompatible",value:function(r,n){var i=this,s=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),a=r.numbers[s];this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var o=function(){return i.options.prepend&&a.toString()?i.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1?o():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}},{key:"shouldUseIntlApi",value:function(){return!Oc.includes(this.options.compatibilityJSON)}}]),t}();function Ks(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function je(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ks(Object(r),!0).forEach(function(n){ze(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ks(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function zs(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=bc(t,e,r);return!s&&i&&typeof r=="string"&&(s=an(t,r,n),s===void 0&&(s=an(e,r,n))),s}var Ac=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Te(this,t),this.logger=Ye.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(r){return r},this.init(e)}return Oe(t,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.interpolation||(r.interpolation={escapeValue:!0});var n=r.interpolation;this.escape=n.escape!==void 0?n.escape:Dc,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?Qt(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Qt(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?Qt(n.nestingPrefix):n.nestingPrefixEscaped||Qt("$t("),this.nestingSuffix=n.nestingSuffix?Qt(n.nestingSuffix):n.nestingSuffixEscaped||Qt(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(r,n,i,s){var a=this,o,u,c,d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(k){return k.replace(/\$/g,"$$$$")}var m=function(F){if(F.indexOf(a.formatSeparator)<0){var E=zs(n,d,F,a.options.keySeparator,a.options.ignoreJSONStructure);return a.alwaysFormat?a.format(E,void 0,i,je(je(je({},s),n),{},{interpolationkey:F})):E}var L=F.split(a.formatSeparator),D=L.shift().trim(),R=L.join(a.formatSeparator).trim();return a.format(zs(n,d,D,a.options.keySeparator,a.options.ignoreJSONStructure),R,i,je(je(je({},s),n),{},{interpolationkey:D}))};this.resetRegExp();var y=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,w=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,C=[{regex:this.regexpUnescape,safeValue:function(F){return f(F)}},{regex:this.regexp,safeValue:function(F){return a.escapeValue?f(a.escape(F)):f(F)}}];return C.forEach(function(k){for(c=0;o=k.regex.exec(r);){var F=o[1].trim();if(u=m(F),u===void 0)if(typeof y=="function"){var E=y(r,o,s);u=typeof E=="string"?E:""}else if(s&&Object.prototype.hasOwnProperty.call(s,F))u="";else if(w){u=o[0];continue}else a.logger.warn("missed to pass in variable ".concat(F," for interpolating ").concat(r)),u="";else typeof u!="string"&&!a.useRawValueToEscape&&(u=Is(u));var L=k.safeValue(u);if(r=r.replace(o[0],L),w?(k.regex.lastIndex+=u.length,k.regex.lastIndex-=o[0].length):k.regex.lastIndex=0,c++,c>=a.maxReplaces)break}}),r}},{key:"nest",value:function(r,n){var i=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,o,u;function c(y,w){var C=this.nestingOptionsSeparator;if(y.indexOf(C)<0)return y;var k=y.split(new RegExp("".concat(C,"[ ]*{"))),F="{".concat(k[1]);y=k[0],F=this.interpolate(F,u);var E=F.match(/'/g),L=F.match(/"/g);(E&&E.length%2==0&&!L||L.length%2!=0)&&(F=F.replace(/'/g,'"'));try{u=JSON.parse(F),w&&(u=je(je({},w),u))}catch(D){return this.logger.warn("failed parsing options string in nesting for key ".concat(y),D),"".concat(y).concat(C).concat(F)}return delete u.defaultValue,y}for(;a=this.nestingRegexp.exec(r);){var d=[];u=je({},s),u=u.replace&&typeof u.replace!="string"?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;var f=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var m=a[1].split(this.formatSeparator).map(function(y){return y.trim()});a[1]=m.shift(),d=m,f=!0}if(o=n(c.call(this,a[1].trim(),u),u),o&&a[0]===r&&typeof o!="string")return o;typeof o!="string"&&(o=Is(o)),o||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(r)),o=""),f&&(o=d.reduce(function(y,w){return i.format(y,w,s.lng,je(je({},s),{},{interpolationkey:a[1].trim()}))},o.trim())),r=r.replace(a[0],o),this.regexp.lastIndex=0}return r}}]),t}();function Ys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ot(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ys(Object(r),!0).forEach(function(n){ze(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ys(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Nc(t){var e=t.toLowerCase().trim(),r={};if(t.indexOf("(")>-1){var n=t.split("(");e=n[0].toLowerCase().trim();var i=n[1].substring(0,n[1].length-1);if(e==="currency"&&i.indexOf(":")<0)r.currency||(r.currency=i.trim());else if(e==="relativetime"&&i.indexOf(":")<0)r.range||(r.range=i.trim());else{var s=i.split(";");s.forEach(function(a){if(!!a){var o=a.split(":"),u=ai(o),c=u[0],d=u.slice(1),f=d.join(":").trim().replace(/^'+|'+$/g,"");r[c.trim()]||(r[c.trim()]=f),f==="false"&&(r[c.trim()]=!1),f==="true"&&(r[c.trim()]=!0),isNaN(f)||(r[c.trim()]=parseInt(f,10))}})}}return{formatName:e,formatOptions:r}}function Xt(t){var e={};return function(n,i,s){var a=i+JSON.stringify(s),o=e[a];return o||(o=t(i,s),e[a]=o),o(n)}}var Lc=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Te(this,t),this.logger=Ye.create("formatter"),this.options=e,this.formats={number:Xt(function(r,n){var i=new Intl.NumberFormat(r,ot({},n));return function(s){return i.format(s)}}),currency:Xt(function(r,n){var i=new Intl.NumberFormat(r,ot(ot({},n),{},{style:"currency"}));return function(s){return i.format(s)}}),datetime:Xt(function(r,n){var i=new Intl.DateTimeFormat(r,ot({},n));return function(s){return i.format(s)}}),relativetime:Xt(function(r,n){var i=new Intl.RelativeTimeFormat(r,ot({},n));return function(s){return i.format(s,n.range||"day")}}),list:Xt(function(r,n){var i=new Intl.ListFormat(r,ot({},n));return function(s){return i.format(s)}})},this.init(e)}return Oe(t,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=n.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(r,n){this.formats[r.toLowerCase().trim()]=n}},{key:"addCached",value:function(r,n){this.formats[r.toLowerCase().trim()]=Xt(n)}},{key:"format",value:function(r,n,i){var s=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=n.split(this.formatSeparator),u=o.reduce(function(c,d){var f=Nc(d),m=f.formatName,y=f.formatOptions;if(s.formats[m]){var w=c;try{var C=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},k=C.locale||C.lng||a.locale||a.lng||i;w=s.formats[m](c,k,ot(ot(ot({},y),a),C))}catch(F){s.logger.warn(F)}return w}else s.logger.warn("there was no format function for ".concat(m));return c},r);return u}}]),t}();function Zs(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Js(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Zs(Object(r),!0).forEach(function(n){ze(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zs(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Mc(t){var e=Bc();return function(){var n=Pe(t),i;if(e){var s=Pe(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return Rt(this,i)}}function Bc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function Ic(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var jc=function(t){Jt(r,t);var e=Mc(r);function r(n,i,s){var a,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Te(this,r),a=e.call(this),sn&&mt.call(Ie(a)),a.backend=n,a.store=i,a.services=s,a.languageUtils=s.languageUtils,a.options=o,a.logger=Ye.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=o.maxParallelReads||10,a.readingCalls=0,a.maxRetries=o.maxRetries>=0?o.maxRetries:5,a.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(s,o.backend,o),a}return Oe(r,[{key:"queueLoad",value:function(i,s,a,o){var u=this,c={},d={},f={},m={};return i.forEach(function(y){var w=!0;s.forEach(function(C){var k="".concat(y,"|").concat(C);!a.reload&&u.store.hasResourceBundle(y,C)?u.state[k]=2:u.state[k]<0||(u.state[k]===1?d[k]===void 0&&(d[k]=!0):(u.state[k]=1,w=!1,d[k]===void 0&&(d[k]=!0),c[k]===void 0&&(c[k]=!0),m[C]===void 0&&(m[C]=!0)))}),w||(f[y]=!0)}),(Object.keys(c).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(c),pending:Object.keys(d),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(m)}}},{key:"loaded",value:function(i,s,a){var o=i.split("|"),u=o[0],c=o[1];s&&this.emit("failedLoading",u,c,s),a&&this.store.addResourceBundle(u,c,a),this.state[i]=s?-1:2;var d={};this.queue.forEach(function(f){gc(f.loaded,[u],c),Ic(f,i),s&&f.errors.push(s),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(m){d[m]||(d[m]={});var y=f.loaded[m];y.length&&y.forEach(function(w){d[m][w]===void 0&&(d[m][w]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(i,s,a){var o=this,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,d=arguments.length>5?arguments[5]:void 0;if(!i.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:s,fcName:a,tried:u,wait:c,callback:d});return}this.readingCalls++;var f=function(C,k){if(o.readingCalls--,o.waitingReads.length>0){var F=o.waitingReads.shift();o.read(F.lng,F.ns,F.fcName,F.tried,F.wait,F.callback)}if(C&&k&&u<o.maxRetries){setTimeout(function(){o.read.call(o,i,s,a,u+1,c*2,d)},c);return}d(C,k)},m=this.backend[a].bind(this.backend);if(m.length===2){try{var y=m(i,s);y&&typeof y.then=="function"?y.then(function(w){return f(null,w)}).catch(f):f(null,y)}catch(w){f(w)}return}return m(i,s,f)}},{key:"prepareLoading",value:function(i,s){var a=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),u&&u();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof s=="string"&&(s=[s]);var c=this.queueLoad(i,s,o,u);if(!c.toLoad.length)return c.pending.length||u(),null;c.toLoad.forEach(function(d){a.loadOne(d)})}},{key:"load",value:function(i,s,a){this.prepareLoading(i,s,{},a)}},{key:"reload",value:function(i,s,a){this.prepareLoading(i,s,{reload:!0},a)}},{key:"loadOne",value:function(i){var s=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=i.split("|"),u=o[0],c=o[1];this.read(u,c,"read",void 0,void 0,function(d,f){d&&s.logger.warn("".concat(a,"loading namespace ").concat(c," for language ").concat(u," failed"),d),!d&&f&&s.logger.log("".concat(a,"loaded namespace ").concat(c," for language ").concat(u),f),s.loaded(i,d,f)})}},{key:"saveMissing",value:function(i,s,a,o,u){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(s)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(s,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend&&this.backend.create){var f=Js(Js({},c),{},{isUpdate:u}),m=this.backend.create.bind(this.backend);if(m.length<6)try{var y;m.length===5?y=m(i,s,a,o,f):y=m(i,s,a,o),y&&typeof y.then=="function"?y.then(function(w){return d(null,w)}).catch(d):d(null,y)}catch(w){d(w)}else m(i,s,a,o,d,f)}!i||!i[0]||this.store.addResource(i[0],s,a,o)}}}]),r}(mt);function Qs(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var r={};if(ae(e[1])==="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),ae(e[2])==="object"||ae(e[3])==="object"){var n=e[3]||e[2];Object.keys(n).forEach(function(i){r[i]=n[i]})}return r},interpolation:{escapeValue:!0,format:function(e,r,n,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Xs(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function ea(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ze(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ea(Object(r),!0).forEach(function(n){ze(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ea(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Gc(t){var e=_c();return function(){var n=Pe(t),i;if(e){var s=Pe(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return Rt(this,i)}}function _c(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function un(){}function Vc(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(r){typeof t[r]=="function"&&(t[r]=t[r].bind(t))})}var ln=function(t){Jt(r,t);var e=Gc(r);function r(){var n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(Te(this,r),n=e.call(this),sn&&mt.call(Ie(n)),n.options=Xs(i),n.services={},n.logger=Ye,n.modules={external:[]},Vc(Ie(n)),s&&!n.isInitialized&&!i.isClone){if(!n.options.initImmediate)return n.init(i,s),Rt(n,Ie(n));setTimeout(function(){n.init(i,s)},0)}return n}return Oe(r,[{key:"init",value:function(){var i=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof s=="function"&&(a=s,s={}),!s.defaultNS&&s.defaultNS!==!1&&s.ns&&(typeof s.ns=="string"?s.defaultNS=s.ns:s.ns.indexOf("translation")<0&&(s.defaultNS=s.ns[0]));var o=Qs();this.options=Ze(Ze(Ze({},o),this.options),Xs(s)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Ze(Ze({},o.interpolation),this.options.interpolation)),s.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=s.keySeparator),s.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=s.nsSeparator);function u(F){return F?typeof F=="function"?new F:F:null}if(!this.options.isClone){this.modules.logger?Ye.init(u(this.modules.logger),this.options):Ye.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=Lc);var d=new qs(this.options);this.store=new Ec(this.options.resources,this.options);var f=this.services;f.logger=Ye,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new Rc(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(f.formatter=u(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Ac(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new jc(u(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(F){for(var E=arguments.length,L=new Array(E>1?E-1:0),D=1;D<E;D++)L[D-1]=arguments[D];i.emit.apply(i,[F].concat(L))}),this.modules.languageDetector&&(f.languageDetector=u(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=u(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new Us(this.services,this.options),this.translator.on("*",function(F){for(var E=arguments.length,L=new Array(E>1?E-1:0),D=1;D<E;D++)L[D-1]=arguments[D];i.emit.apply(i,[F].concat(L))}),this.modules.external.forEach(function(F){F.init&&F.init(i)})}if(this.format=this.options.interpolation.format,a||(a=un),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var y=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];y.forEach(function(F){i[F]=function(){var E;return(E=i.store)[F].apply(E,arguments)}});var w=["addResource","addResources","addResourceBundle","removeResourceBundle"];w.forEach(function(F){i[F]=function(){var E;return(E=i.store)[F].apply(E,arguments),i}});var C=Er(),k=function(){var E=function(D,R){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),C.resolve(R),a(D,R)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return E(null,i.t.bind(i));i.changeLanguage(i.options.lng,E)};return this.options.resources||!this.options.initImmediate?k():setTimeout(k,0),C}},{key:"loadResources",value:function(i){var s=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:un,o=a,u=typeof i=="string"?i:this.language;if(typeof i=="function"&&(o=i),!this.options.resources||this.options.partialBundledLanguages){if(u&&u.toLowerCase()==="cimode")return o();var c=[],d=function(y){if(!!y){var w=s.services.languageUtils.toResolveHierarchy(y);w.forEach(function(C){c.indexOf(C)<0&&c.push(C)})}};if(u)d(u);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(m){return d(m)})}this.options.preload&&this.options.preload.forEach(function(m){return d(m)}),this.services.backendConnector.load(c,this.options.ns,function(m){!m&&!s.resolvedLanguage&&s.language&&s.setResolvedLanguage(s.language),o(m)})}else o(null)}},{key:"reloadResources",value:function(i,s,a){var o=Er();return i||(i=this.languages),s||(s=this.options.ns),a||(a=un),this.services.backendConnector.reload(i,s,function(u){o.resolve(),a(u)}),o}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&Vs.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var s=0;s<this.languages.length;s++){var a=this.languages[s];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(i,s){var a=this;this.isLanguageChangingTo=i;var o=Er();this.emit("languageChanging",i);var u=function(m){a.language=m,a.languages=a.services.languageUtils.toResolveHierarchy(m),a.resolvedLanguage=void 0,a.setResolvedLanguage(m)},c=function(m,y){y?(u(y),a.translator.changeLanguage(y),a.isLanguageChangingTo=void 0,a.emit("languageChanged",y),a.logger.log("languageChanged",y)):a.isLanguageChangingTo=void 0,o.resolve(function(){return a.t.apply(a,arguments)}),s&&s(m,function(){return a.t.apply(a,arguments)})},d=function(m){!i&&!m&&a.services.languageDetector&&(m=[]);var y=typeof m=="string"?m:a.services.languageUtils.getBestMatchFromCodes(m);y&&(a.language||u(y),a.translator.language||a.translator.changeLanguage(y),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage&&a.services.languageDetector.cacheUserLanguage(y)),a.loadResources(y,function(w){c(w,y)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(d):this.services.languageDetector.detect(d):d(i),o}},{key:"getFixedT",value:function(i,s,a){var o=this,u=function c(d,f){var m;if(ae(f)!=="object"){for(var y=arguments.length,w=new Array(y>2?y-2:0),C=2;C<y;C++)w[C-2]=arguments[C];m=o.options.overloadTranslationOptionHandler([d,f].concat(w))}else m=Ze({},f);m.lng=m.lng||c.lng,m.lngs=m.lngs||c.lngs,m.ns=m.ns||c.ns,m.keyPrefix=m.keyPrefix||a||c.keyPrefix;var k=o.options.keySeparator||".",F;return m.keyPrefix&&Array.isArray(d)?F=d.map(function(E){return"".concat(m.keyPrefix).concat(k).concat(E)}):F=m.keyPrefix?"".concat(m.keyPrefix).concat(k).concat(d):d,o.t(F,m)};return typeof i=="string"?u.lng=i:u.lngs=i,u.ns=s,u.keyPrefix=a,u}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var s=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var o=a.lng||this.resolvedLanguage||this.languages[0],u=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;var d=function(y,w){var C=s.services.backendConnector.state["".concat(y,"|").concat(w)];return C===-1||C===2};if(a.precheck){var f=a.precheck(this,d);if(f!==void 0)return f}return!!(this.hasResourceBundle(o,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(o,i)&&(!u||d(c,i)))}},{key:"loadNamespaces",value:function(i,s){var a=this,o=Er();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(u){a.options.ns.indexOf(u)<0&&a.options.ns.push(u)}),this.loadResources(function(u){o.resolve(),s&&s(u)}),o):(s&&s(),Promise.resolve())}},{key:"loadLanguages",value:function(i,s){var a=Er();typeof i=="string"&&(i=[i]);var o=this.options.preload||[],u=i.filter(function(c){return o.indexOf(c)<0});return u.length?(this.options.preload=o.concat(u),this.loadResources(function(c){a.resolve(),s&&s(c)}),a):(s&&s(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],a=this.services&&this.services.languageUtils||new qs(Qs());return s.indexOf(a.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:un,o=Ze(Ze(Ze({},this.options),s),{isClone:!0}),u=new r(o);(s.debug!==void 0||s.prefix!==void 0)&&(u.logger=u.logger.clone(s));var c=["store","services","language"];return c.forEach(function(d){u[d]=i[d]}),u.services=Ze({},this.services),u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u.translator=new Us(u.services,u.options),u.translator.on("*",function(d){for(var f=arguments.length,m=new Array(f>1?f-1:0),y=1;y<f;y++)m[y-1]=arguments[y];u.emit.apply(u,[d].concat(m))}),u.init(o,a),u.translator.options=u.options,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),r}(mt);ze(ln,"createInstance",function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new ln(t,e)});var l=ln.createInstance();l.createInstance=ln.createInstance;var nm=l.createInstance,im=l.dir,sm=l.init,am=l.loadResources,om=l.reloadResources,um=l.use,lm=l.changeLanguage,cm=l.getFixedT,dm=l.t,hm=l.exists,fm=l.setDefaultNamespace,pm=l.hasLoadedNamespace,mm=l.loadNamespaces,gm=l.loadLanguages;var li=class extends Ee.Modal{constructor(e,r,n,i){super(e);this.allRegex=n,this.settings=r,this.onSubmit=i}classValue(e){this.settings.upload.replacePath=e.filter(r=>r.type===ye.path),this.settings.upload.replaceTitle=e.filter(r=>r.type===ye.title)}forbiddenValue(e,r){let n=/\/(.*)(\\[dwstrnvfb0cxup])(.*)\//i,i=r===ye.path?l.t("common.path.folder"):l.t("common.path.file");i=i.toLowerCase();let s=!1;return e=="/"?(new Ee.Notice(l.t("settings.regexReplacing.forbiddenValue",{what:i,forbiddenChar:e})),e="",s=!0):e.match(/[><:"|?*]|(\\\/)|(^\w+\/\w+)|(\\)/)&&r===ye.title&&!e.match(n)?(new Ee.Notice(l.t("settings.regexReplacing.forbiddenValue",{what:i,forbiddenChar:e.match(/[><:"|?*]|(\\\/)|(^\w+\/\w+)|(\\)/)[0]})),e="",s=!0):r===ye.path&&(e.match(/[\\><:"|?*]/)?(new Ee.Notice(l.t("settings.regexReplacing.forbiddenValue",{what:i,forbiddenChar:e.match(/[\\><:"|?*]/)[0]})),e="",s=!0):e.match(/(^\w+\/\w+)|(\\\/)/)&&!e.match(n)&&new Ee.Notice(l.t("settings.regexReplacing.warningPath"))),[e,s]}onOpen(){let{contentEl:e}=this;e.empty(),this.settings.upload.behavior===U.fixed?e.createEl("h2",{text:l.t("settings.regexReplacing.modal.title.only")}):e.createEl("h2",{text:l.t("settings.regexReplacing.modal.title.all")}),this.settings.upload.replacePath?this.settings.upload.replaceTitle||(this.settings.upload.replaceTitle=[]):this.settings.upload.replacePath=[],this.settings.upload.replacePath.forEach(r=>{r.type||(r.type=ye.path)}),this.settings.upload.replaceTitle.forEach(r=>{r.type||(r.type=ye.title)});for(let r of this.allRegex){let n=new Ee.Setting(e).setClass("github-publisher-censor-entry").addText(i=>{i.inputEl.style.width="100%",i.setPlaceholder(l.t("regex.entry")).setValue(r.regex).onChange(s=>{r.regex=s})}).addText(i=>{i.inputEl.style.width="100%",i.setPlaceholder(l.t("regex.replace")).setValue(r.replacement).onChange(s=>{r.replacement=s})});this.settings.upload.behavior!==U.fixed?n.addDropdown(i=>{i.addOption("path",l.t("common.path.folder")).addOption("title",l.t("common.path.file")).setValue(r.type).onChange(s=>{r.type=s})}):n.addButton(i=>{i.buttonEl.classList.add("github-publisher-disabled-button"),i.setButtonText(l.t("common.path.file"))}),n.addExtraButton(i=>{i.setIcon("trash").onClick(()=>{this.allRegex.splice(this.allRegex.indexOf(r),1),this.onOpen()})})}new Ee.Setting(e).setClass("github-publisher-modals").addButton(r=>{r.setIcon("plus").onClick(()=>{this.allRegex.push({regex:"",replacement:"",type:ye.title}),this.onOpen()})}).addButton(r=>{r.setButtonText(l.t("common.save")).onClick(()=>{let n=[];this.allRegex.forEach(i=>{let s=this.forbiddenValue(i.regex,i.type),a=this.forbiddenValue(i.replacement,i.type);n.push(s[1]),n.push(a[1]),(s[1]||a[1])&&(i.regex=s[0],i.replacement=a[0])}),n.includes(!0)||(this.onSubmit(this.allRegex),this.close())})})}onClose(){let{contentEl:e}=this;e.empty()}},ci=class extends Ee.Modal{constructor(e,r,n){super(e);this.settings=r,this.onSubmit=n}onOpen(){let{contentEl:e}=this;e.empty(),e.createEl("p",{text:l.t("settings.regexReplacing.modal.title.text")}).createEl("p",{text:l.t("settings.regexReplacing.modal.desc")}).createEl("p",{text:l.t("settings.regexReplacing.empty")});for(let r of this.settings.conversion.censorText){let n=r.after?"arrow-down":"arrow-up",i=r.after?l.t("common.after").toLowerCase():l.t("common.before").toLowerCase(),s=l.t("settings.regexReplacing.momentReplaceRegex",{moment:i});new Ee.Setting(e).setClass("github-publisher-censor-entry").addText(a=>{a.inputEl.style.width="100%",a.setPlaceholder(l.t("regex.entry")).setValue(r.entry).onChange(o=>g(this,null,function*(){r.entry=o}))}).addText(a=>{a.inputEl.style.width="100%",a.setPlaceholder(l.t("regex.replace")).setValue(r.replace).onChange(o=>g(this,null,function*(){r.replace=o}))}).addExtraButton(a=>{a.setIcon("trash").setTooltip(l.t("common.delete",{things:"Regex"})).onClick(()=>g(this,null,function*(){this.settings.conversion.censorText.splice(this.settings.conversion.censorText.indexOf(r),1),this.onOpen()}))}).addExtraButton(a=>{a.setTooltip(s).setIcon(n).onClick(()=>g(this,null,function*(){r.after=!r.after,this.onOpen()}))})}new Ee.Setting(e).addButton(r=>{r.setIcon("plus").setTooltip(l.t("common.add",{things:"Regex"})).onClick(()=>g(this,null,function*(){let n={entry:"",replace:"",flags:"",after:!1};this.settings.conversion.censorText.push(n),this.onOpen()}))}).addButton(r=>{r.setButtonText(l.t("common.save")).onClick(()=>{this.onSubmit(this.settings),this.close()})})}onClose(){let{contentEl:e}=this;e.empty()}};function At(t){for(let[e,r]of Object.entries(t))e!="components"&&r.show()}function er(t){for(let[e,r]of Object.entries(t))e!="components"&&r.hide()}function ta(t,e,r,n){let i=t.upload;i.behavior===U.yaml?(At(e),At(r),At(n)):(er(e),er(r),i.behavior===U.obsidian?At(n):er(n))}function cn(t,e,r){return g(this,null,function*(){let n=r.settings.upload;t.length===0&&n.defaultName?(n.autoclean.enable=!1,yield r.saveSettings(),e.setDisabled(!0),e.components[0].toggleEl.classList.remove("is-enabled")):t.length===0&&n.behavior!==U.yaml?(n.autoclean.enable=!1,e.setDisabled(!0),e.components[0].toggleEl.classList.remove("is-enabled")):(e.setDisabled(!1),n.autoclean.enable&&e.components[0].toggleEl.classList.add("is-enabled"))})}function di(t,e,r,n,i){return g(this,null,function*(){let s=i.settings.upload;n===U.yaml?(At(t),At(e),cn(s.rootFolder,r,i).then()):(s.defaultName.length>0&&(r.setDisabled(!1),s.autoclean.enable&&r.components[0].toggleEl.classList.add("is-enabled")),er(t),er(e))})}function ra(t,e,r){let n=r.settings.upload;t?(e.setDisabled(!0),e.components[0].toggleEl.classList.remove("is-enabled"),n.autoclean.enable=!1,r.saveSettings().then()):(e.setDisabled(!1),n.autoclean.enable&&e.components[0].toggleEl.classList.add("is-enabled"))}function na(t,e){t?At(e):er(e)}function ia(t){let e="";t.upload.behavior===U.yaml&&(e=`${t.upload.yamlFolderKey}: ${t.upload.defaultName}
`);let r=t.github.otherRepo.length>0?"shortRepo: "+t.github.otherRepo[0].smartKey+`
`:"";return`${t.plugin.shareKey}: true
`+e+`links:
mdlinks: ${t.conversion.links.wiki}
convert: true
internals: ${t.conversion.links.internal}
nonShared: ${t.conversion.links.unshared}
embed:
send: ${t.embed.notes}
remove: false
attachment:
send: ${t.embed.attachments}
folder: ${t.embed.folder}
dataview: ${t.conversion.dataview}
hardBreak: ${t.conversion.hardbreak}
`+r+`repo:
owner: ${t.github.user}
repo: ${t.github.repo}
branch: ${t.github.branch}
autoclean: ${t.upload.autoclean.enable}
copylink:
base: ${t.plugin.copyLink.links}
remove: [${t.plugin.copyLink.removePart.map(n=>`"${n}"`).join(", ")}]
`}function sa(t){let e=document.createDocumentFragment();return e.createEl("ul",null,r=>{r.createEl("li",null,n=>{n.createEl("code",{text:`${t.plugin.shareKey}:`,cls:"code-title"}),n.createEl("span",{text:`${l.t("settings.help.frontmatter.share.title")}`}),n.createEl("ul",null,i=>{i.createEl("span",{text:l.t("settings.help.frontmatter.share.other")})})}),r.createEl("li",null,n=>{n.createEl("code",{text:"path:",cls:"code-title"}),n.createEl("span",{text:` ${l.t("settings.help.frontmatter.path")}`})}),r.createEl("li",null,n=>{n.createEl("code",{text:"links:",cls:"code-title"})}),r.createEl("ul",null,n=>{n.createEl("li",null,i=>{i.createEl("code",{text:"mdlinks"}),i.createEl("span",{text:`: ${l.t("settings.help.frontmatter.mdlinks")}`})}),n.createEl("li",null,i=>{i.createEl("code",{text:"convert"}),i.createEl("span",null,s=>{s.createEl("span",{text:`: ${l.t("settings.help.frontmatter.convert.enableOrDisable")} `}),s.createEl("code",{text:" [[link]] "}),s.createEl("span",{text:l.t("common.or")}),s.createEl("code",{text:" [](link) "}),s.createEl("span",{text:l.t("settings.help.frontmatter.convert.syntax")})})}),n.createEl("li",null,i=>{i.createEl("code",{text:"internals"}),i.createEl("span",{text:`: ${l.t("settings.help.frontmatter.internals")}`})}),n.createEl("li",null,i=>{i.createEl("code",{text:"nonShared"}),i.createEl("span",{text:`: ${l.t("settings.help.frontmatter.nonShared")}`})})}),r.createEl("li",{text:"embed:",cls:"code code-title"}),r.createEl("ul",null,n=>{n.createEl("li",null,i=>{i.createEl("code",{text:"send"}),i.createEl("span",{text:`: ${l.t("settings.help.frontmatter.embed.send")}`})}),n.createEl("li",null,i=>{i.createEl("code",{text:"remove"}),i.createEl("span",{text:`: ${l.t("settings.help.frontmatter.embed.remove")}`})})}),r.createEl("li",{text:"attachment:",cls:"code code-title"}),r.createEl("ul",null,n=>{n.createEl("li",null,i=>{i.createEl("code",{text:"send"}),i.createEl("span",{text:`: ${l.t("settings.help.frontmatter.attachment.send")}`})}),n.createEl("li",null,i=>{i.createEl("code",{text:"folder"}),i.createEl("span",{text:`: ${l.t("settings.help.frontmatter.attachment.folder")}`})})}),r.createEl("li",null,n=>{n.createEl("code",{text:"dataview",cls:"code-title"}),n.createEl("span",{text:`: ${l.t("settings.help.frontmatter.dataview")}`})}),r.createEl("li",null,n=>{n.createEl("code",{text:"hardbreak",cls:"code-title"}),n.createEl("span",{text:`: ${l.t("settings.help.frontmatter.hardBreak")}`})}),r.createEl("li",null,n=>{n.createEl("code",{text:"shortRepo",cls:"code-title"}),n.createEl("span",{text:`: ${l.t("settings.help.frontmatter.shortRepo")}`})}),r.createEl("li",null,n=>{n.createEl("code",{text:"repo",cls:"code-title"}),n.createEl("span",{text:`: ${l.t("settings.help.frontmatter.repo.desc")}`}),n.createEl("ul",null,i=>{i.createEl("li",null,s=>{s.createEl("code",{text:"owner"}),s.createEl("span",{text:`: ${l.t("settings.help.frontmatter.repo.owner")}`})}),i.createEl("li",null,s=>{s.createEl("code",{text:"repo"}),s.createEl("span",{text:`: ${l.t("settings.github.repoName.title")}`})}),i.createEl("li",null,s=>{s.createEl("code",{text:"branch"}),s.createEl("span",{text:`: ${l.t("settings.help.frontmatter.repo.branch")}`})}),i.createEl("li",null,s=>{s.createEl("code",{text:"autoclean"}),s.createEl("span",{text:`: ${l.t("settings.help.frontmatter.autoclean")}`})})})}),r.createEl("li",null,n=>{n.createEl("code",{text:`${t.upload.frontmatterTitle.key}`,cls:"code-title"}),n.createEl("span",{text:`: ${l.t("settings.help.frontmatter.titleKey")}`})}),r.createEl("li",null,n=>{n.createEl("code",{text:"baseLink",cls:"code-title"}),n.createEl("span",{text:`: ${l.t("settings.help.frontmatter.baselink.desc")}`}),n.createEl("code",{text:"copylink:",cls:"code-title"}),n.createEl("ul",null,i=>{i.createEl("li",null,s=>{s.createEl("code",{text:"base"}),s.createEl("span",{text:`: ${l.t("settings.plugin.copyLink.baselink.title")}`})}),i.createEl("li",null,s=>{s.createEl("code",{text:"remove"}),s.createEl("span",{text:`: ${l.t("settings.help.frontmatter.baselink.remove")}`})})})})}),e}function aa(){let t=document.createDocumentFragment();return t.createEl("ul",null,e=>{e.createEl("li",null,r=>{r.createEl("a",{text:l.t("settings.help.usefulLinks.documentation"),href:l.t("settings.help.usefulLinks.links")})}),e.createEl("li",null,r=>{r.createEl("a",{text:l.t("common.repository"),href:"https://github.com/ObsidianPublisher/obsidian-github-publisher"})}),e.createEl("li",null,r=>{r.createEl("a",{text:l.t("settings.help.usefulLinks.issue"),href:"https://github.com/ObsidianPublisher/obsidian-github-publisher/issues"})}),e.createEl("li",null,r=>{r.createEl("a",{text:l.t("settings.help.usefulLinks.discussion"),href:"https://github.com/ObsidianPublisher/obsidian-github-publisher/discussions"})})}),t}function oa(t){let e=document.createDocumentFragment();return e.createEl("p",null,r=>{r.createEl("span",{text:l.t("settings.help.multiRepoHelp.desc")}),r.createEl("code",{text:"multipleRepo"}),r.createEl("span",{text:` ${l.t("settings.help.multiRepoHelp.desc2")}:`}),r.createEl("ul",null,n=>{n.createEl("li",{text:"owner"}).addClass("code"),n.createEl("li",{text:"repo"}).addClass("code"),n.createEl("li",{text:"branch"}).addClass("code"),n.createEl("li",{text:"autoclean"}).addClass("code")}),r.createEl("span",{text:l.t("settings.help.multiRepoHelp.exampleDesc")})}),e.createEl("pre",{cls:"language-yaml"}).createEl("code",{text:`multipleRepo:
- owner: ${t.github.user}
repo: ${t.github.repo}
branch: ${t.github.branch}
autoclean: false
- owner: ${t.github.user}
repo: my_second_brain
branch: master
autoclean: false`,cls:"language-yaml"}),e}function ua(){let t=document.createDocumentFragment();return t.createEl("p",null,e=>{e.createEl("a",null,r=>{r.createEl("img",null,n=>{n.setAttr("src","https://storage.ko-fi.com/cdn/kofi2.png?v=3"),n.setAttr("alt","Buy Me A Coffee"),n.setAttr("style","height: 60px !important;width: 217px !important;")}),r.setAttr("href","https://ko-fi.com/lisandra_dev")}),e.setAttr("style","text-align: center;")}),t}var Cr=W(require("obsidian"));var Ge=W(require("obsidian"));var hn=W(require("obsidian"));function hi(t,e){let r=e;if(!e){let n=t.match(/\/([gimy]+)$/);r=n?Array.from(new Set(n[1].split(""))).join(""):""}return new RegExp(t.replace(/\/(.+)\/.*/,"$1"),r)}function dn(t,e,r){if(!e.conversion.censorText)return t;let n=e.conversion.censorText.filter(i=>!i.after);r&&(n=e.conversion.censorText.filter(i=>i.after));for(let i of n)if(i.entry.trim().length>0){let s=i.entry,a=i.replace;if(s.match(/^\/.+\/[gimy]*$/)){let o=hi(s,i.flags);t=t.replace(o,a)}else t=t.replaceAll(s,a)}return t}function la(t,e,r){if(!e.conversion.dataview)return[];let n=/\[\[(.*?)\]\]/gim,i=t.matchAll(n),s=[];if(!i)return[];if(i)for(let a of i){let o=a[1].replace(/(.*)\\?\|/i,""),u=a[1].replace(/\\?\|(.*)/,""),c=r.getAbstractFileByPath(u)instanceof hn.TFile?r.getAbstractFileByPath(u):null;c&&s.push({linked:c,linkFrom:u,altText:o})}return s}function ca(t,e,r,n,i,s,a,o,u){return g(this,null,function*(){let c=Je(t,n,r,i,u),d=yield r.getFileCache(e.linked).frontmatter,f=yield Z(n,u,d),m=pn(a,f),y=u?u.shareKey:n.plugin.shareKey,w=ha(y,d,o);if(e.linked.extension==="md"&&(m===!1||w===!1))return e.destinationFilePath?e.destinationFilePath:e.linked.basename;if(e.linked.path===t.path)return Je(e.linked,n,r,i,u).split("/").at(-1);let C=e.linked.extension==="md"?Je(e.linked,n,r,i,u):kr(e.linked,n,fn(s,n)),k=c.split("/"),F=C.split("/"),E=(V,j)=>{let $=0;for(;V[$]===j[$];)$++;return V.slice($)},L=E(k,F),D=E(F,k),_=function(V){let j=[];for(let $ of V)$!=V.at(-1)&&j.push("..");return j}(L);_.length===0&&_.push(".");let N=_.concat(D).join("/");return(N.trim()==="."||N.trim()==="")&&(N=Je(e.linked,n,r,i,u).split("/").at(-1)),N})}function $c(t,e,r,n){let i=r.upload.folderNote.rename,a=`${t.parent.path!=="/"?`/${t.parent.path}/`:"/"}${tr(n,r)}`;if(!r.upload.folderNote.enable)return a;let o=t.parent.name;if(n.replace(".md","")===o)return`/${t.parent.path}/${i}`;let u=e.getAbstractFileByPath(t.path.replace(".md",""));return u&&u instanceof hn.TFolder?`/${u.path}/${i}`:a}function Hc(t,e,r,n){n=$c(t,r,e,n);let s=(e.upload.defaultName.length>0?e.upload.defaultName:"")+n,a=s.split("/").slice(0,-1).join("/"),o=s.split("/").at(-1);return a=da(a,e),a.trim().length===0?o:(a+"/"+o).replace(/^\//,"")}function Uc(t,e,r){let n=pi(e,r),i=n.endsWith("/")?n.split("/").at(-2):n.split("/").at(-1);return r.upload.folderNote.enable&&t.replace(".md","").toLowerCase()===i.toLowerCase()?r.upload.folderNote.rename:tr(t,r)}function qc(t,e,r){let n=t.upload,i=pi(e,t),s=Uc(r,e,t),a="";if(n.rootFolder.length>0&&!i.includes(n.rootFolder)&&(a=n.rootFolder+"/"),i.trim().length===0)return s;let o=da(a+i,t);return o.trim().length===0?s:(o+"/"+s).replace(/^\//,"")}function tr(t,e){let r=e.upload;if(t===r.folderNote.rename&&r.folderNote.enable||r.replaceTitle.length===0)return t;t=t.replace(".md","");for(let n of r.replaceTitle)if(n.regex.trim().length>0){let i=n.regex,s=n.replacement;if(i.match(/\/.+\//)){let a=hi(i);t=t.replace(a,s)}else t=t.replaceAll(i,s)}return t+".md"}function da(t,e){let r=e.upload;if(r.behavior===U.fixed||r.replacePath.length===0)return t;for(let n of r.replacePath)if(n.regex.trim().length>0){let i=n.regex,s=n.replacement;if(i.match(/\/.+\//)){let a=i.match(/\/([gimy]+)$/),o=a?Array.from(new Set(a[1].split(""))).join(""):"",u=new RegExp(i.replace(/\/(.+)\/.*/,"$1"),o);t=t.replace(u,s)}else t=t.replaceAll(i,s)}return t}function fi(t,e,r){let n=e.name;return t&&r.upload.frontmatterTitle.enable&&t[r.upload.frontmatterTitle.key]&&t[r.upload.frontmatterTitle.key]!==e.name&&(n=t[r.upload.frontmatterTitle.key]+".md"),n}function Je(t,e,r,n,i){var s;if(t.extension==="md"){let a=(s=r.getCache(t.path))==null?void 0:s.frontmatter,o=fi(a,t,e),u=tr(o,e);if(!pe(a,e,t,i))return o;if(a.path){let c=a.path instanceof Array?a.path.join("/"):a.path;return c==""||c=="/"?u:c+"/"+u}else return e.upload.behavior===U.yaml?qc(e,a,o):e.upload.behavior===U.obsidian?Hc(t,e,n,o):e.upload.defaultName.length>0?e.upload.defaultName+"/"+u:u}}function kr(t,e,r){if(!r||!r.attachmentLinks){let n=e.embed.folder;return n.length>0?n+"/"+t.name:e.upload.defaultName.length>0?e.upload.defaultName+"/"+t.name:t.path}else if(r&&r.attachmentLinks)return r.attachmentLinks+"/"+t.name;return t.path}function B(t,e){e.plugin.noticeError?new Ge.Notice(t):console.log("[GITHUB PUBLISHER]",t)}function gt(...t){var n;let e=(n=new Error().stack)==null?void 0:n.split(`
`)[2].trim();e=e==null?void 0:e.substring(e.indexOf("at ")+3,e.lastIndexOf(" (")),e=e.replace("Object.callback",""),e=e.length>0?e:"main";let r=new Date().toISOString().slice(11,23);console.log(`[${r}](${e}):
`,...t)}function mi(t,e,r){let n={added:[],edited:[],deleted:[],unpublished:[],notDeleted:[]};return t.forEach(i=>{i.isUpdated?n.edited.push(i.file):n.added.push(i.file)}),n.unpublished=r,e&&(n.deleted=e.deleted,n.notDeleted=e.undeleted),n}function gi(t,e){return g(this,null,function*(){if(Ge.Platform.isMobile||!t.plugins.enabledPlugins.has("metadata-extractor")||e.upload.metadataExtractorPath.length===0)return null;let r={allExceptMdFile:null,metadataFile:null,tagsFile:null},n=`${t.vault.configDir}/plugins/metadata-extractor`,i=t.plugins.plugins["metadata-extractor"];return i&&i.settings?(i.settings.allExceptMdFile.length>0&&(r.allExceptMdFile=n+"/"+i.settings.allExceptMdFile),i.settings.metadataFile.length>0&&(r.metadataFile=n+"/"+i.settings.metadataFile),i.settings.tagFile.length>0&&(r.tagsFile=n+"/"+i.settings.tagFile),r):null})}function bi(t){return t.match(/\/*$/)[0].length!=1&&(t=t.replace(/\/*$/,"")+"/"),t}function rr(t,e,r,n,i,s){return g(this,null,function*(){var w,C;let a=s?s.copyLink:i.plugin.copyLink,o=s||i.github;if(!i.plugin.copyLink.enable)return;let u=Je(t,i,r,n,s),c=a.links;c.length===0&&(e instanceof Array?c=`https://${o.user}.github.io/${i.github.repo}/`:c=`https://${e.owner}.github.io/${e.repo}/`);let d=(w=r.getFileCache(t))==null?void 0:w.frontmatter,f=d.baselink,m=a.removePart;if(d.baselink!==void 0?(c=f,m=[]):d.copylink&&typeof d.copylink=="object"&&(c=d.copylink.base,m=(C=d.copylink.remove)!=null?C:[]),c=bi(c),m.length>0)for(let k of m)k.length>0&&(u=u.replace(k.trim(),""));u=bi(u);let y=bi(encodeURI(c+u));yield navigator.clipboard.writeText(y)})}function yi(t,e,r,n){return g(this,null,function*(){n=Array.isArray(n)?n:[n];for(let i of n)yield Wc(t,e,r,i)})}function Wc(t,e,r,n){return g(this,null,function*(){let i=e instanceof Ge.TFile?'"'+e.basename+'"':e,s="";if(e instanceof String?s=l.t("informations.successfulPublish",{nbNotes:i,repo:n}):(gt("file published :",i),s=l.t("informations.successPublishOneNote",{file:i,repo:n})),r.github.workflow.name.length>0){let a=l.t("informations.sendMessage",{nbNotes:i,repo:n})+`.
`+l.t("informations.waitingWorkflow");new Ge.Notice(a),(yield t.workflowGestion(n))&&new Ge.Notice(s)}else new Ge.Notice(s)})}function fa(t){let e=JSON.stringify(t,(r,n)=>typeof n=="string"?n.trim().toLowerCase():n);return JSON.parse(e)}function fn(t,e){let r=null;e.embed.folder.length>0?r=e.embed.folder:e.upload.defaultName.length>0&&(r=e.upload.defaultName);let n={convertWiki:e.conversion.links.wiki,attachment:e.embed.attachments,embed:e.embed.notes,attachmentLinks:r,links:!0,removeEmbed:!1,dataview:e.conversion.dataview,hardbreak:e.conversion.hardbreak,convertInternalNonShared:e.conversion.links.unshared,convertInternalLinks:e.conversion.links.internal};return t.links!==void 0&&(typeof t.links=="object"?(t.links.convert!==void 0&&(n.links=t.links.convert),t.links.internals!==void 0&&(n.convertInternalLinks=t.links.internals),t.links.mdlinks!==void 0&&(n.convertWiki=t.links.mdlinks),t.links.nonShared!==void 0&&(n.convertInternalNonShared=t.links.nonShared)):n.links=t.links),t.embed!==void 0&&(typeof t.embed=="object"?(t.embed.send!==void 0&&(n.embed=t.embed.send),t.embed.remove!==void 0&&(n.removeEmbed=t.embed.remove)):n.embed=t.embed),t.attachment!==void 0&&(typeof t.attachment=="object"?(t.attachment.send!==void 0&&(n.attachment=t.attachment.send),t.attachment.folder!==void 0&&(n.attachmentLinks=t.attachment.folder)):n.attachment=t.attachment),t.attachmentLinks!==void 0&&(n.attachmentLinks=t.attachmentLinks.toString().replace(/\/$/,"")),t.mdlinks!==void 0&&(n.convertWiki=t.mdlinks),t.removeEmbed!==void 0&&(n.removeEmbed=t.removeEmbed),t.dataview!==void 0&&(n.dataview=t.dataview),t.hardbreak!==void 0&&(n.hardbreak=t.hardbreak),t.internals!==void 0&&(n.convertInternalLinks=t.internals),t.nonShared!==void 0&&(n.convertInternalNonShared=t.nonShared),n}function Z(t,e,r){var a;let n=e!=null?e:t.github;if(r&&typeof r.shortRepo=="string"&&r.shortRepo!=="default"){let o=r.shortRepo.toLowerCase(),c=t.github.otherRepo.filter(d=>d.smartKey.toLowerCase()===o)[0];n=c!=null?c:n}let i={branch:n.branch,repo:n.repo,owner:n.user,autoclean:t.upload.autoclean.enable,workflowName:n.workflow.name,commitMsg:n.workflow.commitMessage,automaticallyMergePR:n.automaticallyMergePR,verifiedRepo:(a=n.verifiedRepo)!=null?a:!1};if(t.upload.behavior===U.fixed&&(i.autoclean=!1),!r||r.multipleRepo===void 0&&r.repo===void 0&&r.shortRepo===void 0)return i;let s=null;if(r.multipleRepo){let o=Kc(r,i);return o.length===1?o[0]:o}else if(r.repo)if(typeof r.repo=="object")r.repo.branch!==void 0&&(i.branch=r.repo.branch),r.repo.repo!==void 0&&(i.repo=r.repo.repo),r.repo.owner!==void 0&&(i.owner=r.repo.owner),r.repo.autoclean!==void 0&&(i.autoclean=r.repo.autoclean,s=!0);else{let o=r.repo.split("/");s=o.length>4?!0:null,i=pa(o,i)}else if(r.shortRepo instanceof Array)return zc(r,t.github.otherRepo,i);return r.autoclean!==void 0&&s===null&&(i.autoclean=r.autoclean),i}function Kc(t,e){let r=[];if(t.multipleRepo instanceof Array&&t.multipleRepo.length>0)for(let n of t.multipleRepo)if(typeof n=="object"){let i={branch:e.branch,repo:e.repo,owner:e.owner,autoclean:!1,automaticallyMergePR:e.automaticallyMergePR,workflowName:e.workflowName,commitMsg:e.commitMsg};n.branch!==void 0&&(i.branch=n.branch),n.repo!==void 0&&(i.repo=n.repo),n.owner!==void 0&&(i.owner=n.owner),n.autoclean!==void 0&&(i.autoclean=n.autoclean),r.push(i)}else{let i=n.split("/"),s={branch:e.branch,repo:e.repo,owner:e.owner,autoclean:!1,automaticallyMergePR:e.automaticallyMergePR,workflowName:e.workflowName,commitMsg:e.commitMsg};r.push(pa(i,s))}return r.filter((n,i,s)=>s.findIndex(a=>a.repo===n.repo&&a.owner===n.owner&&a.branch===n.branch&&a.autoclean===n.autoclean)===i)}function zc(t,e,r){if(t.shortRepo instanceof Array){let n=[];for(let i of t.shortRepo){let s=i.toLowerCase();if(s==="default")n.push(r);else{let a=e.filter(o=>o.smartKey.toLowerCase()===s)[0];a&&n.push({branch:a.branch,repo:a.repo,owner:a.user,autoclean:r.autoclean,automaticallyMergePR:a.automaticallyMergePR,workflowName:a.workflow.name,commitMsg:a.workflow.commitMessage})}}return n}return r}function pa(t,e){let r={branch:e.branch,repo:e.repo,owner:e.owner,autoclean:!1,automaticallyMergePR:e.automaticallyMergePR,workflowName:e.workflowName,commitMsg:e.commitMsg};return t.length>=4&&(r.branch=t[2],r.repo=t[1],r.owner=t[0],r.autoclean=t[3]==="true"),t.length===3?(r.branch=t[2],r.repo=t[1],r.owner=t[0]):t.length===2?(r.repo=t[1],r.owner=t[0]):t.length===1&&(r.repo=t[0]),r}function pi(t,e){var i;let r=e.upload.yamlFolderKey,n=(i=t[r])!=null?i:e.upload.defaultName;return n instanceof Array&&(n=n.join("/")),n}function _e(t,e,r=!1,n=1){return g(this,null,function*(){let i=yield t.request("GET /rate_limit"),s=i.data.resources.core.remaining,a=i.data.resources.core.reset,u=new Date(a*1e3).toLocaleTimeString();return s<=n?(new Ge.Notice(l.t("commands.checkValidity.rateLimit.limited",{resetTime:u})),0):(r?new Ge.Notice(l.t("commands.checkValidity.rateLimit.notLimited",{remaining:s,resetTime:u})):B(l.t("commands.checkValidity.rateLimit.notLimited",{remaining:s,resetTime:u}),e),s)})}function nr(t,e){let r=t.app.vault;return e||(e=pt),e=e.replace("%configDir%",r.configDir),e=e.replace("%pluginID%",t.manifest.id),e}function ha(t,e,r){let n=e&&e[t]?e[t]:!1;return n?!0:!n&&r.convertInternalNonShared===!0}function mn(t,e){let r=t.github.otherRepo;if(!e)return null;for(let n of r)if(e[n.shareKey])return n;return null}function pe(t,e,r,n){if(!r||r.extension!=="md"||t===null)return!1;let i=e.plugin.excludedFolder,s=n?n.shareKey:e.plugin.shareKey;if(t===void 0||t[s]===void 0)return!1;if(i.length>0)for(let a=0;a<i.length;a++){let o=i[a].match(/^\/(.*)\/[igmsuy]*$/),u=o?new RegExp(o[1],o[2]):null;if(u&&u.test(r.path)||r.path.contains(i[a].trim()))return!1}return t[s]}function De(t){return t.match(/(png|jpe?g|gif|bmp|svg|mp[34]|web[mp]|wav|m4a|ogg|3gp|flac|ogv|mov|mkv|pdf)$/i)}function pn(t,e){t=t instanceof Array?t:[t],e=e instanceof Array?e:[e];let r=(n,i)=>n.owner===i.owner&&n.repo===i.repo&&n.branch===i.branch;for(let n of e)for(let i of t)if(r(n,i))return!0;for(let n of t)for(let i of e)if(r(n,i))return!0;return!1}function gn(t,e,r=!1){return g(this,null,function*(){t=Array.isArray(t)?t:[t];let n=[];if((yield e.loadToken()).length===0){n.push(!0);let a=l.t("common.ghToken");r||new Cr.Notice(l.t("error.isEmpty",{what:a}))}else for(let a of t)if(a.repo.length===0){n.push(!0);let o=l.t("common.repository");r||new Cr.Notice(l.t("error.isEmpty",{what:o}))}else if(a.owner.length===0){n.push(!0);let o=l.t("error.whatEmpty.owner");r||new Cr.Notice(l.t("error.isEmpty",{what:o}))}else if(a.branch.length===0){n.push(!0);let o=l.t("error.whatEmpty.branch");r||new Cr.Notice(l.t("error.isEmpty",{what:o}))}else n.push(!1);return!n.every(a=>a===!0)})}function ma(t){let e=t.convertWiki,r=t.attachment,n=t.embed,i=t.links;return!e&&i&&r&&n&&!t.removeEmbed}function Qe(t,e,r=null,n,i,s=!1){return g(this,null,function*(){var a;try{let o=n?(a=i.getFileCache(n))==null?void 0:a.frontmatter:null,u=Z(e,r,o);if(gn(u,t.plugin,s))return yield t.checkRepository(u,s),!0}catch(o){return B(o,e),!1}})}function Nt(t,e,r,n=1){return g(this,null,function*(){try{let i=!1;if(r instanceof Array?i=r.every(a=>a.verifiedRepo):r.verifiedRepo&&(i=!0),i&&e.github.rateLimit>0)return!0;if(yield gn(r,t.plugin))return yield t.checkRepository(r,!0),e.github.rateLimit===0||n>20?(yield _e(t.octokit,e,!1,n))>0:!0}catch(i){return B(i,e),!1}})}var re=W(require("obsidian"));function bn(t,e){return g(this,null,function*(){yield ed(e,t),yield Yc(e),yield Zc(e),yield Jc(e),yield Qc(e),yield Lt(e),yield Xc(e)})}function Yc(t){return g(this,null,function*(){t.settings.upload.replaceTitle instanceof Array||(B(l.t("informations.migrating.fileReplace"),t.settings),t.settings.upload.replaceTitle=[t.settings.upload.replaceTitle],yield t.saveSettings())})}function Zc(t){return g(this,null,function*(){t.settings.upload.subFolder&&!t.settings.upload.replacePath.find(e=>e.regex==="/"+t.settings.upload.subFolder)&&(B(l.t("informations.migrating.subFolder"),t.settings),t.settings.upload.subFolder.length>0&&t.settings.upload.replacePath.push({regex:"/"+t.settings.upload.subFolder,replacement:"",type:ye.path}),delete t.settings.upload.subFolder,yield t.saveSettings())})}function Jc(t){return g(this,null,function*(){for(let e of t.settings.conversion.censorText)e.flags&&(e.entry="/"+e.entry+"/"+e.flags,delete e.flags,yield t.saveSettings())})}function Qc(t){return g(this,null,function*(){if(B("migrating workflow",t.settings),t.settings.github.worflow){let e=t.settings.github.worflow;t.settings.github.workflow={name:e.workflowName,commitMessage:e.customCommitMsg},delete t.settings.github.worflow,yield t.saveSettings()}})}function Lt(t,e){return g(this,null,function*(){console.log("migrating token");let r=nr(t,t.settings.github.tokenPath);if(t.settings.github.token&&!e&&(B(`Moving the GitHub Token in the file : ${r}`,t.settings),e=t.settings.github.token,delete t.settings.github.token,yield t.saveSettings()),e===void 0)return;B(`Moving the GitHub Token in the file : ${r}`,t.settings);let n=`GITHUB_TOKEN=${e}`;yield t.app.vault.adapter.write(r,n)})}function Xc(t){return g(this,null,function*(){var r,n,i,s,a,o;B("Configuring other repositories",t.settings);let e=(n=(r=t.settings.github)==null?void 0:r.otherRepo)!=null?n:[];for(let u of e){let c={name:(s=(i=t.settings.github.worflow)==null?void 0:i.workflowName)!=null?s:t.settings.github.workflow.name,commitMessage:(o=(a=t.settings.github.worflow)==null?void 0:a.customCommitMsg)!=null?o:t.settings.github.workflow.commitMessage};if(u.workflow||(u.workflow=c,yield t.saveSettings()),u.worflow){let d=u.worflow;d.workflowName&&(u.workflow.name=d.workflowName),d.customCommitMsg&&(u.workflow.commitMessage=d.customCommitMsg),delete u.worflow,yield t.saveSettings()}u.copyLink||(u.copyLink={links:"",removePart:[]},yield t.saveSettings())}})}function ed(t,e){return g(this,null,function*(){var r,n;if(Object.keys(e).includes("editorMenu")){B(l.t("informations.migrating.oldSettings"),t.settings),t.settings={github:{user:e.githubName?e.githubName:t.settings.github.user?t.settings.github.user:"",repo:e.githubRepo?e.githubRepo:t.settings.github.repo?t.settings.github.repo:"",branch:e.githubBranch,automaticallyMergePR:e.automaticallyMergePR,tokenPath:pt,api:{tiersForApi:e.tiersForApi,hostname:e.hostname},workflow:{name:e.workflowName,commitMessage:(n=(r=e.customCommitMsg)!=null?r:t.settings.github.workflow.commitMessage)!=null?n:"[PUBLISHER] MERGE"},otherRepo:[],rateLimit:0,verifiedRepo:!1},upload:{behavior:e.downloadedFolder,defaultName:e.folderDefaultName,rootFolder:e.rootFolder,yamlFolderKey:e.yamlFolderKey,frontmatterTitle:{enable:e.useFrontmatterTitle,key:e.frontmatterTitleKey},replaceTitle:[{regex:e.frontmatterTitleRegex,replacement:e.frontmatterTitleReplacement,type:ye.title}],replacePath:[{regex:e.subFolder,replacement:"",type:ye.path}],autoclean:{enable:e.autoCleanUp,excluded:e.autoCleanUpExcluded},folderNote:{enable:e.folderNote,rename:e.folderNoteRename},metadataExtractorPath:e.metadataExtractorPath},conversion:{hardbreak:e.hardBreak,dataview:e.migrateDataview,censorText:e.censorText,tags:{inline:e.inlineTags,exclude:e.excludeDataviewValue,fields:e.dataviewFields},links:{internal:e.migrateForGithub,unshared:e.migrateInternalNonShared,wiki:e.migrateWikiLinks,slugify:!1}},embed:{attachments:e.embedImage,keySendFile:e.metadataFileFields,notes:e.embedNotes,folder:e.defaultImageFolder},plugin:{shareKey:e.shareKey,fileMenu:e.fileMenu,editorMenu:e.editorMenu,excludedFolder:e.excludedFolder,copyLink:{enable:e.copyLink,links:e.mainLink,removePart:e.linkRemover.split(/[,\n]\W*/).map(s=>s.trim()),addCmd:!1},noticeError:e.logNotice,displayModalRepoEditing:!1}};let i=e.GhToken?e.GhToken:t.settings.github.token?t.settings.github.token:"";yield Lt(t,i),yield t.saveSettings()}})}function Di(t){return JSON.parse(JSON.stringify(t))}var vi=class extends re.Modal{constructor(e,r,n,i){super(e);this.plugin=r,this.settingsPage=n,this.settingsTab=i}censorRepositoryData(e){return g(this,null,function*(){gt("original settings",e),this.plugin.settings.plugin=e.plugin,this.plugin.settings.github.repo=e.github.repo,this.plugin.settings.github.user=e.github.user,this.plugin.settings.github.otherRepo=e.github.otherRepo,yield this.plugin.saveSettings()})}onOpen(){let{contentEl:e}=this;new re.Setting(e).setName(l.t("modals.import.title")).setDesc(l.t("modals.import.desc")),new re.Setting(e).then(r=>{let n=createSpan({cls:"github-publisher-import-error",text:l.t("modals.import.error.span")});r.nameEl.appendChild(n);let i=a=>g(this,null,function*(){if(a)try{let o=JSON.parse(a);if(Object.keys(o).includes("editorMenu"))yield bn(o,this.plugin),B(l.t("informations.migrating.oldSettings"),this.plugin.settings);else{B(l.t("informations.migrating.normalFormat"),this.plugin.settings),o=o;let u=Di(this.plugin.settings);o.upload.replaceTitle instanceof Array||(o.upload.replaceTitle=[o.upload.replaceTitle]);for(let[c,d]of Object.entries(o))this.plugin.settings[c]=d;yield this.censorRepositoryData(u),yield this.plugin.saveSettings()}this.close()}catch(o){n.addClass("active"),n.setText(`${l.t("modals.import.error.span")}${o}`)}else n.addClass("active"),n.setText(`${l.t("modals.import.error.span")}: ${l.t("modals.import.error.isEmpty")}`)});r.controlEl.createEl("input",{cls:"github-publisher-import-input",attr:{id:"github-publisher-import-input",name:"github-publisher-import-input",type:"file",accept:".json"}},a=>{a.addEventListener("change",o=>{let u=new FileReader;u.onload=c=>g(this,null,function*(){yield i(c.target.result.toString().trim())}),u.readAsText(o.target.files[0])})}),r.controlEl.createEl("label",{cls:"github-publisher-import-label",text:l.t("modals.import.importFromFile"),attr:{for:"github-publisher-import-input"}}),new re.TextAreaComponent(e).setPlaceholder(l.t("modals.import.paste")).then(a=>{new re.ButtonComponent(e).setButtonText(l.t("common.save")).onClick(()=>g(this,null,function*(){yield i(a.getValue().trim())})).buttonEl.addClass("github-publisher-import-save-button")}).inputEl.addClass("github-publisher-import-textarea")})}onClose(){let{contentEl:e}=this;e.empty(),this.settingsPage.empty();let r=document.querySelector(".settings-tab-active.github-publisher")?document.querySelector(".settings-tab-active.github-publisher").innerText:l.t("settings.github.title");switch(r=r.trim(),r){case l.t("settings.github.title"):this.settingsTab.renderGithubConfiguration();break;case l.t("settings.upload.title"):this.settingsTab.renderUploadConfiguration();break;case l.t("settings.conversion.title"):this.settingsTab.renderTextConversion();break;case l.t("settings.embed.title"):this.settingsTab.renderEmbedConfiguration();break;case l.t("settings.plugin.title"):this.settingsTab.renderPluginSettings();break;case l.t("settings.help.title"):this.settingsTab.renderHelp();break}}},wi=class extends re.Modal{constructor(e,r){super(e);this.plugin=r}censorGithubSettingsData(e){return delete e.github.repo,delete e.github.user,delete e.plugin,delete e.github.otherRepo,delete e.github.rateLimit,e}onOpen(){let{contentEl:e,modalEl:r}=this;r.addClass("modal-github-publisher"),new re.Setting(e).setName(l.t("modals.export.title")).setDesc(l.t("modals.export.desc")).then(n=>{let i=this.censorGithubSettingsData(Di(this.plugin.settings)),s=JSON.stringify(i,null,2);n.controlEl.createEl("a",{cls:"github-publisher-copy",text:l.t("modals.export.copy"),href:"#"},a=>{new re.TextAreaComponent(e).setValue(s).then(u=>{a.addEventListener("click",c=>{c.preventDefault(),u.inputEl.select(),u.inputEl.setSelectionRange(0,99999),document.execCommand("copy"),a.addClass("success"),setTimeout(()=>{a.parentNode&&a.removeClass("success")},2e3)})}).inputEl.addClass("github-publisher-export-textarea")}),re.Platform.isDesktop?n.controlEl.createEl("a",{cls:"github-publisher-download",text:l.t("modals.export.download"),attr:{download:"github-publisher.json",href:`data:application/json;charset=utf-8,${encodeURIComponent(s)}`}}):re.Platform.isMobile&&n.addButton(a=>a.setButtonText(l.t("modals.export.download")).onClick(()=>{this.app.vault.adapter.write(`${app.vault.configDir}/plugins/obsidian-mkdocs-publisher/._tempSettings.json`,s),this.app.openWithDefaultApp(`${app.vault.configDir}/plugins/obsidian-mkdocs-publisher/._tempSettings.json`)}))})}onClose(){try{this.app.vault.adapter.trashSystem(`${app.vault.configDir}/plugins/obsidian-mkdocs-publisher/._tempSettings.json`)}catch(r){}let{contentEl:e}=this;e.empty()}},Fi=class extends re.FuzzySuggestModal{constructor(e,r,n,i,s){super(e);this.plugin=r,this.presetList=n,this.octokit=i,this.page=s}getItems(){return this.presetList}getItemText(e){return e.name}onChooseItem(e,r){let n=e.settings;gt("onChooseItem",n);try{let i=Di(this.plugin.settings);n.upload.replaceTitle instanceof Array||(n.upload.replaceTitle=[n.upload.replaceTitle]);for(let[s,a]of Object.entries(n))this.plugin.settings[s]=a;this.plugin.settings.plugin=i.plugin,this.plugin.settings.github.repo=i.github.repo,this.plugin.settings.github.user=i.github.user,this.plugin.settings.github.otherRepo=i.github.otherRepo,this.plugin.settings.github.rateLimit=i.github.rateLimit,this.plugin.saveSettings(),this.page.renderSettingsPage("github-configuration")}catch(i){new re.Notice(l.t("modals.import.error.span")+i),gt("onChooseItem",i)}}};function ga(t,e){return g(this,null,function*(){let r=yield t.request("GET /repos/{owner}/{repo}/contents/{path}",{owner:"ObsidianPublisher",repo:"plugin-presets",path:"presets"}),n=[];if(!Array.isArray(r.data))return n;gt("LoadAllPreset",r);for(let i of r.data)if(i.name.endsWith(".json")){let s=i.name.replace(".json","");n.push({name:s,settings:yield td(i.path,t,e)})}return n})}function td(t,e,r){return g(this,null,function*(){var s;let n=yield e.request("GET /repos/{owner}/{repo}/contents/{path}",{owner:"ObsidianPublisher",repo:"plugin-presets",path:t});if(!((s=n.data)==null?void 0:s.content))return r.settings;let i=atob(n.data.content);return JSON.parse(i)})}var Y=W(require("obsidian"));var xi=class extends Y.Modal{constructor(e,r,n,i,s,a){super(e);this.settings=r,this.repository=s,this.plugin=i,this.onSubmit=a,this.branchName=n}onOpen(){let{contentEl:e}=this;e.empty(),e.createEl("h2",{text:l.t("settings.github.smartRepo.modals.title")}),e.createEl("p",{text:l.t("settings.github.smartRepo.modals.desc")}),e.createEl("p",{text:l.t("settings.github.smartRepo.modals.frontmatterInfo")}),e.createEl("p",{text:l.t("settings.plugin.shareKey.otherRepo")});let r={smartKey:"",user:this.settings.github.user,repo:this.settings.github.repo,branch:this.settings.github.branch,automaticallyMergePR:this.settings.github.automaticallyMergePR,api:{tiersForApi:this.settings.github.api.tiersForApi,hostname:this.settings.github.api.hostname},workflow:{commitMessage:this.settings.github.workflow.commitMessage,name:""},createShortcuts:!1,shareKey:this.settings.plugin.shareKey,copyLink:{links:this.settings.plugin.copyLink.links,removePart:[]}};new Y.Setting(e).addButton(n=>{n.setButtonText(l.t("common.add",{things:l.t("settings.github.smartRepo.modals.newRepo").toLowerCase()})).onClick(()=>{this.repository.push(r),this.onOpen()}).buttonEl.style.width="100%"}).infoEl.style.display="none";for(let n of this.repository)new Y.Setting(e).addText(i=>{i.setPlaceholder("smartKey").setValue(n.smartKey).onChange(s=>{n.smartKey=s.toLowerCase(),this.plugin.settings.github.otherRepo.filter(a=>a.smartKey===n.smartKey).length>1?(new Y.Notice(l.t("settings.github.smartRepo.modals.duplicate")),i.inputEl.style.border="1px solid red",n.smartKey=""):n.smartKey==="default"?(i.inputEl.style.border="1px solid red",n.smartKey="",new Y.Notice(l.t("settings.github.smartRepo.modals.default"))):i.inputEl.style.border="0"}).inputEl.style.width="100%"}).addExtraButton(i=>{i.setIcon("trash").onClick(()=>{this.repository.splice(this.repository.indexOf(n),1),this.onOpen()})}).addExtraButton(i=>{i.setIcon("pencil").onClick(()=>{new ba(this.app,n,this.plugin,this.branchName,s=>{this.repository[this.repository.indexOf(n)]=s}).open()})}).infoEl.style.display="none";new Y.Setting(e).addButton(n=>{n.setButtonText(l.t("common.save")).onClick(()=>{this.onSubmit(this.repository),this.close()})})}onClose(){let{contentEl:e}=this;e.empty(),this.onSubmit(this.repository)}},ba=class extends Y.Modal{constructor(e,r,n,i,s){super(e);this.repository=r,this.onSubmit=s,this.branchName=i,this.plugin=n}onOpen(){let{contentEl:e}=this;e.empty(),e.createEl("h2",{text:l.t("common.edit",{things:this.repository.smartKey})}),new Y.Setting(e).setName(l.t("settings.github.apiType.title")).setDesc(l.t("settings.github.apiType.desc")).addDropdown(r=>{r.addOption(xe.free,l.t("settings.github.apiType.dropdown.free")).addOption(xe.entreprise,l.t("settings.github.apiType.dropdown.enterprise")).setValue(this.repository.api.tiersForApi).onChange(n=>{this.repository.api.tiersForApi=n,this.onOpen()})}),this.repository.api.tiersForApi===xe.entreprise&&new Y.Setting(e).setName(l.t("settings.github.apiType.hostname.title")).setDesc(l.t("settings.github.apiType.hostname.desc")).addText(r=>r.setPlaceholder("https://github.mycompany.com").setValue(this.repository.api.hostname).onChange(n=>g(this,null,function*(){this.repository.api.hostname=n.trim()}))),new Y.Setting(e).setName(l.t("settings.github.repoName.title")).setDesc(l.t("settings.github.repoName.desc")).addText(r=>r.setPlaceholder(l.t("settings.github.repoName.placeholder")).setValue(this.repository.repo).onChange(n=>g(this,null,function*(){this.repository.repo=n.trim()}))),new Y.Setting(e).setName(l.t("settings.github.username.title")).setDesc(l.t("settings.github.username.desc")).addText(r=>r.setPlaceholder(l.t("settings.github.username.title")).setValue(this.repository.user).onChange(n=>g(this,null,function*(){this.repository.user=n.trim()}))),new Y.Setting(e).setName(l.t("settings.github.branch.title")).setDesc(l.t("settings.github.branch.desc")).addText(r=>r.setPlaceholder("main").setValue(this.repository.branch).onChange(n=>g(this,null,function*(){this.repository.branch=n.trim()}))),new Y.Setting(e).setName(l.t("settings.github.automaticallyMergePR")).addToggle(r=>r.setValue(this.repository.automaticallyMergePR).onChange(n=>g(this,null,function*(){this.repository.automaticallyMergePR=n}))),new Y.Setting(e).setClass("github-publisher-no-display").addButton(r=>r.setButtonText(l.t("settings.github.testConnection")).setClass("github-publisher-connect-button").onClick(()=>g(this,null,function*(){let n=yield this.plugin.reloadOctokit();this.repository.verifiedRepo=yield Qe(n,this.plugin.settings,this.repository,null,this.app.metadataCache),this.plugin.settings.github.rateLimit=yield _e(n.octokit,this.plugin.settings)}))),new Y.Setting(e).setName(l.t("settings.github.smartRepo.modals.shortcuts.title")).setDesc(l.t("settings.github.smartRepo.modals.shortcuts.desc")).addToggle(r=>r.setValue(this.repository.createShortcuts).onChange(n=>g(this,null,function*(){this.repository.createShortcuts=n}))),e.createEl("h3",{text:"Github Workflow"}),new Y.Setting(e).setName(l.t("settings.githubWorkflow.prRequest.title")).setDesc(l.t("settings.githubWorkflow.prRequest.desc")).addText(r=>r.setPlaceholder("[PUBLISHER] MERGE").setValue(this.repository.workflow.commitMessage).onChange(n=>g(this,null,function*(){n.trim().length===0&&(n="[PUBLISHER] MERGE",new Y.Notice(l.t("settings.githubWorkflow.prRequest.error"))),this.repository.workflow.commitMessage=n}))),new Y.Setting(e).setName(l.t("settings.githubWorkflow.githubAction.title")).setDesc(l.t("settings.githubWorkflow.githubAction.desc")).addText(r=>{r.setPlaceholder("ci").setValue(this.repository.workflow.name).onChange(n=>g(this,null,function*(){if(n.length>0){n=n.trim();let i=[".yml",".yaml"];i.some(s=>n.endsWith(s))||(n+=i[0])}this.repository.workflow.name=n}))}),e.createEl("h3",{text:l.t("settings.github.smartRepo.modals.otherConfig")}),new Y.Setting(e).setName(l.t("settings.plugin.shareKey.title")).setDesc(l.t("settings.plugin.shareKey.desc")).addText(r=>r.setPlaceholder("share").setValue(this.repository.shareKey).onChange(n=>g(this,null,function*(){this.repository.shareKey=n.trim(),yield this.plugin.saveSettings()}))),this.plugin.settings.plugin.copyLink.enable&&(new Y.Setting(e).setName(l.t("settings.plugin.copyLink.baselink.title")).setDesc(l.t("settings.plugin.copyLink.baselink.desc")).setClass("github-publisher").addText(r=>r.setPlaceholder(this.plugin.settings.plugin.copyLink.links).setValue(this.repository.copyLink.links).onChange(n=>g(this,null,function*(){this.repository.copyLink.links=n.trim()}))),new Y.Setting(e).setName(l.t("settings.plugin.copyLink.linkPathRemover.title")).setDesc(l.t("settings.plugin.copyLink.linkPathRemover.desc")).setClass("github-publisher").addText(r=>{r.setPlaceholder("docs").setValue(this.repository.copyLink.removePart.join(", ")).onChange(n=>g(this,null,function*(){this.repository.copyLink.removePart=n.split(/[,\n]\s*/).map(i=>i.trim()).filter(i=>i.length>0),yield this.plugin.saveSettings()}))})),new Y.Setting(e).addButton(r=>r.setButtonText(l.t("common.save")).onClick(()=>g(this,null,function*(){this.onSubmit(this.repository),this.close()})))}onClose(){let{contentEl:e}=this;e.empty(),this.onSubmit(this.repository)}};var Mt=W(require("obsidian"));var Ei=class extends Mt.Modal{constructor(e,r,n){super(e);this.plugin=r,this.token=n,this.tokenPath=""}onOpen(){let{contentEl:e}=this;e.empty();let r=nr(this.plugin,pt),n=e.createEl("p",null,s=>{s.appendText(l.t("settings.github.ghToken.button.description")),s.createDiv({text:l.t("settings.github.ghToken.button.default")}).createEl("code",{text:` ${r}`},o=>{o.classList.add("cm-inline-code"),o.style.fontFamily="var(--font-monospace)"})});n.createEl("br"),n.createEl("p",{text:l.t("settings.github.ghToken.button.variables")}),n.createEl("ul",null,s=>{s.createEl("li",null,a=>{a.createEl("code",{text:"%configDir%"},o=>{o.classList.add("cm-inline-code"),o.style.fontFamily="var(--font-monospace)"}),a.createEl("span",null,o=>{o.appendText(`${l.t("settings.github.ghToken.button.configDir")} (`),o.createEl("code",{text:this.app.vault.configDir},u=>{u.classList.add("cm-inline-code"),u.style.fontFamily="var(--font-monospace)"}),o.appendText(")")})}),s.createEl("li",null,a=>{a.createEl("code",{text:"%pluginID%"},o=>{o.classList.add("cm-inline-code"),o.style.fontFamily="var(--font-monospace)"}),a.createEl("span",null,o=>{o.appendText(`${l.t("settings.github.ghToken.button.pluginID")} (`),o.createEl("code",{text:this.plugin.manifest.id},u=>{u.classList.add("cm-inline-code"),u.style.fontFamily="var(--font-monospace)"}),o.appendText(")")})})});let i=new Mt.Setting(e).addText(s=>{var o;let a=(o=this.plugin.settings.github.tokenPath)!=null?o:r;s.setPlaceholder(r).setValue(a).onChange(u=>g(this,null,function*(){let c=u.trim();c.length===0&&(c=r),this.plugin.settings.github.tokenPath=c,this.tokenPath=c}))});i.infoEl.style.display="none",i.controlEl.querySelector("input").style.width="100%",new Mt.Setting(e).addButton(s=>{s.setButtonText(l.t("common.save")).onClick(()=>g(this,null,function*(){try{yield this.plugin.saveSettings(),yield Lt(this.plugin,this.token),this.close()}catch(a){i.controlEl.querySelector("input").style.border="1px solid red",new Mt.Notice(l.t("error.reading-token-file")),this.tokenPath="error"}}))})}onClose(){return g(this,null,function*(){let{contentEl:e}=this;e.empty(),this.tokenPath==="error"&&(this.plugin.settings.github.tokenPath=pt,yield this.plugin.saveSettings(),yield Lt(this.plugin,this.token))})}};var ki=class extends I.PluginSettingTab{constructor(e,r,n){super(e,r);this.plugin=r,this.branchName=n}display(){let{containerEl:e}=this;e.empty();let r={"github-configuration":{name:l.t("settings.github.title"),icon:"cloud"},"upload-configuration":{name:l.t("settings.upload.title"),icon:"upload"},"text-conversion":{name:l.t("settings.conversion.title"),icon:"file-text"},"embed-configuration":{name:l.t("settings.embed.title"),icon:"link"},"plugin-settings":{name:l.t("settings.plugin.title"),icon:"gear"},help:{name:l.t("settings.help.title"),icon:"info"}};new I.Setting(e).setClass("github-publisher-export-import").addButton(i=>{i.setButtonText(l.t("modals.export.title")).setClass("github-publisher-export").onClick(()=>{new wi(this.app,this.plugin).open()})}).addButton(i=>{i.setButtonText(l.t("modals.import.title")).setClass("github-publisher-import").onClick(()=>{new vi(this.app,this.plugin,this.settingsPage,this).open()})}).addButton(i=>{i.setButtonText(l.t("modals.import.presets.title")).setTooltip(l.t("modals.import.presets.desc")).setClass("github-publisher-add-new-repository").onClick(()=>g(this,null,function*(){let s=yield this.plugin.reloadOctokit(),a=yield ga(s.octokit,this.plugin);new Fi(this.app,this.plugin,a,s.octokit,this).open()}))});let n=e.createEl("nav",{cls:"settings-tab-bar github-publisher"});for(let[i,s]of Object.entries(r)){let a=n.createEl("div",{cls:"settings-tab github-publisher"}),o=a.createEl("div",{cls:"settings-tab-icon github-publisher"});(0,I.setIcon)(o,s.icon),a.createEl("div",{cls:"settings-tab-name github-publisher",text:s.name}),i==="github-configuration"&&a.addClass("settings-tab-active"),a.addEventListener("click",()=>g(this,null,function*(){for(let u of n.children)u.removeClass("settings-tab-active");a.addClass("settings-tab-active"),this.renderSettingsPage(i)}))}this.settingsPage=e.createEl("div",{cls:"settings-tab-page github-publisher"}),this.renderSettingsPage("github-configuration")}renderSettingsPage(e){switch(this.settingsPage.empty(),e){case"github-configuration":this.renderGithubConfiguration();break;case"upload-configuration":this.renderUploadConfiguration();break;case"text-conversion":this.renderTextConversion();break;case"embed-configuration":this.renderEmbedConfiguration();break;case"plugin-settings":this.renderPluginSettings();break;case"help":this.renderHelp();break}}renderGithubConfiguration(){let e=this.plugin.settings.github;new I.Setting(this.settingsPage).setName(l.t("settings.github.apiType.title")).setDesc(l.t("settings.github.apiType.desc")).addDropdown(i=>{i.addOption(xe.free,l.t("settings.github.apiType.dropdown.free")).addOption(xe.entreprise,l.t("settings.github.apiType.dropdown.enterprise")).setValue(e.api.tiersForApi).onChange(s=>g(this,null,function*(){e.api.tiersForApi=s,yield this.plugin.saveSettings(),this.renderSettingsPage(ft.github)}))}),e.api.tiersForApi===xe.entreprise&&new I.Setting(this.settingsPage).setName(l.t("settings.github.apiType.hostname.title")).setDesc(l.t("settings.github.apiType.hostname.desc")).addText(i=>i.setPlaceholder("https://github.mycompany.com").setValue(e.api.hostname).onChange(s=>g(this,null,function*(){e.api.hostname=s.trim(),yield this.plugin.saveSettings()}))),new I.Setting(this.settingsPage).setName(l.t("settings.github.repoName.title")).setDesc(l.t("settings.github.repoName.desc")).addText(i=>i.setPlaceholder(l.t("settings.github.repoName.placeholder")).setValue(e.repo).onChange(s=>g(this,null,function*(){e.repo=s.trim(),yield this.plugin.saveSettings()}))),new I.Setting(this.settingsPage).setName(l.t("settings.github.username.title")).setDesc(l.t("settings.github.username.desc")).addText(i=>i.setPlaceholder(l.t("settings.github.username.title")).setValue(e.user).onChange(s=>g(this,null,function*(){e.user=s.trim(),yield this.plugin.saveSettings()})));let r=document.createDocumentFragment();r.createEl("span",null,i=>{i.innerText=l.t("settings.github.ghToken.desc"),i.createEl("a",null,s=>{s.innerText=l.t("common.here")+".",s.href="https://github.com/settings/tokens/new?scopes=repo,workflow"})});let n=new I.Setting(this.settingsPage).setName(l.t("common.ghToken")).setDesc(r).addText(i=>g(this,null,function*(){let s=yield this.plugin.loadToken();i.setPlaceholder("ghp_15457498545647987987112184").setValue(s).onChange(a=>g(this,null,function*(){a.trim().length===0?(n.controlEl.querySelector("input").style.border="1px solid red",new I.Notice(l.t("settings.github.ghToken.error"))):(n.controlEl.querySelector("input").style.border="",yield Lt(this.plugin,a.trim())),yield this.plugin.saveSettings()}))})).addExtraButton(i=>{i.setIcon("edit").setTooltip(l.t("settings.github.ghToken.button.tooltip")).onClick(()=>g(this,null,function*(){let s=yield this.plugin.loadToken();new Ei(this.app,this.plugin,s).open(),yield this.plugin.saveSettings()}))});new I.Setting(this.settingsPage).setName(l.t("settings.github.branch.title")).setDesc(l.t("settings.github.branch.desc")).addText(i=>i.setPlaceholder("main").setValue(e.branch).onChange(s=>g(this,null,function*(){e.branch=s.trim(),yield this.plugin.saveSettings()}))),new I.Setting(this.settingsPage).setName(l.t("settings.github.automaticallyMergePR")).addToggle(i=>i.setValue(e.automaticallyMergePR).onChange(s=>g(this,null,function*(){e.automaticallyMergePR=s,yield this.plugin.saveSettings()}))),new I.Setting(this.settingsPage).setClass("github-publisher-no-display").addButton(i=>i.setButtonText(l.t("settings.github.testConnection")).setClass("github-publisher-connect-button").onClick(()=>g(this,null,function*(){let s=yield this.plugin.reloadOctokit();this.plugin.settings.github.verifiedRepo=yield Qe(s,this.plugin.settings,null,null,this.app.metadataCache),this.plugin.settings.github.rateLimit=yield _e(s.octokit,this.plugin.settings),yield this.plugin.saveSettings()}))).addButton(i=>i.setButtonText(l.t("settings.github.smartRepo.button")).onClick(()=>g(this,null,function*(){var a,o;let s=(o=(a=this.plugin.settings.github)==null?void 0:a.otherRepo)!=null?o:[];new xi(this.app,this.plugin.settings,this.branchName,this.plugin,s,u=>{this.plugin.settings.github.otherRepo=u,this.plugin.saveSettings(),this.plugin.reloadCommands(this.branchName)}).open()}))),this.settingsPage.createEl("h3",{text:"Github Workflow"}),new I.Setting(this.settingsPage).setName(l.t("settings.githubWorkflow.prRequest.title")).setDesc(l.t("settings.githubWorkflow.prRequest.desc")).addText(i=>i.setPlaceholder("[PUBLISHER] MERGE").setValue(e.workflow.commitMessage).onChange(s=>g(this,null,function*(){s.trim().length===0&&(s="[PUBLISHER] MERGE",new I.Notice(l.t("settings.githubWorkflow.prRequest.error"))),e.workflow.commitMessage=s,yield this.plugin.saveSettings()}))),new I.Setting(this.settingsPage).setName(l.t("settings.githubWorkflow.githubAction.title")).setDesc(l.t("settings.githubWorkflow.githubAction.desc")).addText(i=>{i.setPlaceholder("ci").setValue(e.workflow.name).onChange(s=>g(this,null,function*(){if(s.length>0){s=s.trim();let a=[".yml",".yaml"];a.some(o=>s.endsWith(o))||(s+=a[0])}e.workflow.name=s,yield this.plugin.saveSettings()}))})}renderUploadConfiguration(){let e=this.plugin.settings.upload;new I.Setting(this.settingsPage).setName(l.t("settings.upload.folderBehavior.title")).setDesc(l.t("settings.upload.folderBehavior.desc")).addDropdown(c=>{c.addOptions({fixed:l.t("settings.upload.folderBehavior.fixedFolder"),yaml:l.t("settings.upload.folderBehavior.yaml"),obsidian:l.t("settings.upload.folderBehavior.obsidianPath")}).setValue(e.behavior).onChange(d=>g(this,null,function*(){e.behavior=d,yield di(r,n,u,d,this.plugin),yield this.plugin.saveSettings(),this.renderSettingsPage(ft.upload)}))}),new I.Setting(this.settingsPage).setName(l.t("settings.upload.defaultFolder.title")).setDesc(l.t("settings.upload.defaultFolder.desc")).addText(c=>{c.setPlaceholder(l.t("settings.upload.defaultFolder.placeholder")).setValue(e.defaultName).onChange(d=>g(this,null,function*(){e.defaultName=d.replace(/\/$/,""),yield cn(d,u,this.plugin),yield this.plugin.saveSettings()}))});let r=new I.Setting(this.settingsPage).setName(l.t("settings.upload.frontmatterKey.title")).setClass("github-publisher").setDesc(l.t("settings.upload.frontmatterKey.desc")).addText(c=>{c.setPlaceholder(l.t("settings.upload.frontmatterKey.placeholder")).setValue(e.yamlFolderKey).onChange(d=>g(this,null,function*(){e.yamlFolderKey=d.trim(),yield this.plugin.saveSettings()}))}),n=new I.Setting(this.settingsPage).setName(l.t("settings.upload.rootFolder.title")).setClass("github-publisher").setDesc(l.t("settings.upload.rootFolder.desc")).addText(c=>{c.setPlaceholder("docs").setValue(e.rootFolder).onChange(d=>g(this,null,function*(){e.rootFolder=d.replace(/\/$/,""),yield cn(d,u,this.plugin),yield this.plugin.saveSettings()}))}),i=new I.Setting(this.settingsPage).setName(l.t("settings.upload.useFrontmatterTitle.title")).setDesc(l.t("settings.upload.useFrontmatterTitle.desc")).setClass("github-publisher-title").addToggle(c=>{c.setValue(e.frontmatterTitle.enable).onChange(d=>g(this,null,function*(){e.frontmatterTitle.enable=d,yield this.plugin.saveSettings(),this.renderSettingsPage(ft.upload)}))});e.frontmatterTitle.enable&&i.addText(c=>{c.setPlaceholder("title").setValue(e.frontmatterTitle.key).onChange(d=>g(this,null,function*(){e.frontmatterTitle.key=d.trim(),yield this.plugin.saveSettings()}))});let s=l.t("settings.upload.regexFilePathTitle.title.FolderPathTitle");e.behavior===U.fixed&&(s=l.t("settings.upload.regexFilePathTitle.title.titleOnly")),new I.Setting(this.settingsPage).setName(s).setDesc(l.t("settings.upload.regexFilePathTitle.desc")).addButton(c=>{c.setIcon("pencil").onClick(()=>g(this,null,function*(){let d=e.replaceTitle;e.behavior!==U.fixed&&(d=d.concat(e.replacePath)),new li(this.app,this.plugin.settings,d,f=>{e.replacePath=f.filter(m=>m.type==="path"),e.replaceTitle=f.filter(m=>m.type==="title"),this.plugin.saveSettings()}).open()}))});let a=new I.Setting(this.settingsPage).setName(l.t("settings.conversion.links.folderNote.title")).setClass("github-publisher-folderNote").setDesc(l.t("settings.conversion.links.folderNote.desc")).addToggle(c=>{c.setValue(e.folderNote.enable).onChange(d=>g(this,null,function*(){e.folderNote.enable=d,yield this.plugin.saveSettings(),this.renderSettingsPage("upload-configuration")}))});e.folderNote.enable&&a.addText(c=>{c.setPlaceholder("folderNote").setValue(e.folderNote.rename).onChange(d=>g(this,null,function*(){e.folderNote.rename=d,yield this.plugin.saveSettings()}))}),ta(this.plugin.settings,r,n,a),app.plugins.enabledPlugins.has("metadata-extractor")&&new I.Setting(this.settingsPage).setName(l.t("settings.githubWorkflow.useMetadataExtractor.title")).setDesc(l.t("settings.githubWorkflow.useMetadataExtractor.desc")).addText(c=>{c.setPlaceholder("docs/_assets/metadata").setValue(e.metadataExtractorPath).onChange(d=>g(this,null,function*(){e.metadataExtractorPath=d.trim(),yield this.plugin.saveSettings()}))});let o=e.behavior===U.yaml&&e.rootFolder.length===0||e.defaultName.length===0,u=new I.Setting(this.settingsPage).setName(l.t("settings.githubWorkflow.autoCleanUp.title")).setDesc(l.t("settings.githubWorkflow.autoCleanUp.desc")).setDisabled(o).addToggle(c=>{c.setValue(e.autoclean.enable).onChange(d=>g(this,null,function*(){e.autoclean.enable=d,yield this.plugin.saveSettings(),this.renderSettingsPage(ft.upload)}))});e.autoclean.enable&&new I.Setting(this.settingsPage).setName(l.t("settings.githubWorkflow.excludedFiles.title")).setDesc(l.t("settings.githubWorkflow.excludedFiles.desc")).setClass("github-publisher-textarea").addTextArea(c=>{c.setPlaceholder("docs/assets/js, docs/assets/logo, /\\.js$/").setValue(e.autoclean.excluded.join(", ")).onChange(d=>g(this,null,function*(){e.autoclean.excluded=d.split(/[,\n]\W*/).map(f=>f.trim()).filter(f=>f.length>0),yield this.plugin.saveSettings()}))}),ra(o,u,this.plugin),di(r,n,u,e.behavior,this.plugin)}renderTextConversion(){let e=this.plugin.settings.conversion;this.settingsPage.createEl("p",{text:l.t("settings.conversion.desc")}),this.settingsPage.createEl("h5",{text:l.t("settings.conversion.sectionTitle")}),new I.Setting(this.settingsPage).setName(l.t("settings.conversion.hardBreak.title")).setDesc(l.t("settings.conversion.hardBreak.desc")).addToggle(r=>{r.setValue(e.hardbreak).onChange(n=>g(this,null,function*(){e.hardbreak=n,yield this.plugin.saveSettings()}))}),new I.Setting(this.settingsPage).setName(l.t("settings.conversion.dataview.title")).setDesc(l.t("settings.conversion.dataview.desc")).addToggle(r=>{r.setValue(e.dataview).onChange(n=>g(this,null,function*(){e.dataview=n,yield this.plugin.saveSettings()}))}),new I.Setting(this.settingsPage).setName(l.t("settings.regexReplacing.modal.title.text")).setDesc(l.t("settings.regexReplacing.modal.desc")).addButton(r=>{r.setIcon("pencil").onClick(()=>g(this,null,function*(){new ci(this.app,this.plugin.settings,n=>{this.plugin.settings.conversion.censorText=n.conversion.censorText,this.plugin.saveSettings()}).open()}))}),this.settingsPage.createEl("h5",{text:"Tags"}),new I.Setting(this.settingsPage).setName(l.t("settings.conversion.tags.inlineTags.title")).setDesc(l.t("settings.conversion.tags.inlineTags.desc")).addToggle(r=>{r.setValue(e.tags.inline).onChange(n=>g(this,null,function*(){e.tags.inline=n,yield this.plugin.saveSettings()}))}),new I.Setting(this.settingsPage).setName(l.t("settings.conversion.tags.title")).setDesc(l.t("settings.conversion.tags.desc")).setClass("github-publisher-textarea").addTextArea(r=>{r.inputEl.style.width="50%",r.setPlaceholder("field_name").setValue(e.tags.fields.join(",")).onChange(n=>g(this,null,function*(){e.tags.fields=n.split(/[,\n]\W*/).map(i=>i.trim()).filter(i=>i.length>0),yield this.plugin.saveSettings()}))}),new I.Setting(this.settingsPage).setName(l.t("settings.conversion.tags.exclude.title")).setDesc(l.t("settings.conversion.tags.exclude.desc")).setClass("github-publisher-textarea").addTextArea(r=>{r.setPlaceholder("field value").setValue(e.tags.exclude.join(",")).onChange(n=>g(this,null,function*(){e.tags.exclude=n.split(/[,\n]\W*/).map(i=>i.trim()).filter(i=>i.length>0),yield this.plugin.saveSettings()}))}),this.settingsPage.createEl("h5",{text:l.t("settings.conversion.links.title")}),this.settingsPage.createEl("p",{text:l.t("settings.conversion.links.desc")}),new I.Setting(this.settingsPage).setName(l.t("settings.conversion.links.internals.title")).setDesc(l.t("settings.conversion.links.internals.desc")).addToggle(r=>{r.setValue(e.links.internal).onChange(n=>g(this,null,function*(){e.links.internal=n,yield this.plugin.saveSettings(),this.renderSettingsPage("text-conversion")}))}),e.links.internal&&new I.Setting(this.settingsPage).setName(l.t("settings.conversion.links.nonShared.title")).setDesc(l.t("settings.conversion.links.nonShared.desc")).addToggle(r=>{r.setValue(e.links.unshared).onChange(n=>g(this,null,function*(){e.links.unshared=n,yield this.plugin.saveSettings()}))}),new I.Setting(this.settingsPage).setName(l.t("settings.conversion.links.wikilinks.title")).setDesc(l.t("settings.conversion.links.wikilinks.desc")).addToggle(r=>{r.setValue(e.links.wiki).onChange(n=>g(this,null,function*(){e.links.wiki=n,yield this.plugin.saveSettings(),this.renderSettingsPage("text-conversion")}))}),(e.links.wiki||e.links.internal)&&new I.Setting(this.settingsPage).setName(l.t("settings.conversion.links.slugify.title")).setDesc(l.t("settings.conversion.links.slugify.desc")).addToggle(r=>{r.setValue(e.links.slugify).onChange(n=>g(this,null,function*(){e.links.slugify=n,yield this.plugin.saveSettings()}))})}renderEmbedConfiguration(){let e=this.plugin.settings.embed;new I.Setting(this.settingsPage).setName(l.t("settings.embed.transferImage.title")).setDesc(l.t("settings.embed.transferImage.desc")).addToggle(n=>{n.setValue(e.attachments).onChange(i=>g(this,null,function*(){e.attachments=i,na(i,r),yield this.plugin.saveSettings()}))});let r=new I.Setting(this.settingsPage).setName(l.t("settings.embed.defaultImageFolder.title")).setDesc(l.t("settings.embed.defaultImageFolder.desc")).addText(n=>{n.setPlaceholder("docs/images").setValue(e.folder).onChange(i=>g(this,null,function*(){e.folder=i.replace(/\/$/,""),yield this.plugin.saveSettings()}))});new I.Setting(this.settingsPage).setName(l.t("settings.embed.transferMetaFile.title")).setDesc(l.t("settings.embed.transferMetaFile.desc")).setClass("github-publisher-textarea").addTextArea(n=>{n.setPlaceholder("banner").setValue(e.keySendFile.join(", ")).onChange(i=>g(this,null,function*(){e.keySendFile=i.split(/[,\n]\W*/).map(s=>s.trim()).filter(s=>s.length>0),yield this.plugin.saveSettings()}))}),new I.Setting(this.settingsPage).setName(l.t("settings.embed.transferNotes.title")).setDesc(l.t("settings.embed.transferNotes.desc")).addToggle(n=>{n.setValue(e.notes).onChange(i=>g(this,null,function*(){e.notes=i,yield this.plugin.saveSettings()}))})}renderPluginSettings(){let e=this.plugin.settings.plugin;new I.Setting(this.settingsPage).setName(l.t("settings.plugin.shareKey.title")).setDesc(l.t("settings.plugin.shareKey.desc")).addText(r=>r.setPlaceholder("share").setValue(e.shareKey).onChange(n=>g(this,null,function*(){e.shareKey=n.trim(),yield this.plugin.saveSettings()}))),new I.Setting(this.settingsPage).setName(l.t("settings.plugin.excludedFolder.title")).setDesc(l.t("settings.plugin.excludedFolder.desc")).setClass("github-publisher-textarea").addTextArea(r=>r.setPlaceholder("_assets, Archive, /^_(.*)/gi").setValue(e.excludedFolder.join(", ")).onChange(n=>g(this,null,function*(){e.excludedFolder=n.split(/[,\n]\W*/).map(i=>i.trim()).filter(i=>i.length>0),yield this.plugin.saveSettings()}))),new I.Setting(this.settingsPage).setName(l.t("settings.plugin.fileMenu.title")).setDesc(l.t("settings.plugin.fileMenu.desc")).addToggle(r=>r.setValue(e.fileMenu).onChange(n=>g(this,null,function*(){e.fileMenu=n,yield this.plugin.saveSettings()}))),new I.Setting(this.settingsPage).setName(l.t("settings.plugin.editorMenu.title")).setDesc(l.t("settings.plugin.editorMenu.desc")).addToggle(r=>r.setValue(e.editorMenu).onChange(n=>g(this,null,function*(){e.editorMenu=n,yield this.plugin.saveSettings()}))),new I.Setting(this.settingsPage).setName(l.t("settings.plugin.copyLink.title")).setDesc(l.t("settings.plugin.copyLink.desc")).addToggle(r=>r.setValue(e.copyLink.enable).onChange(n=>g(this,null,function*(){e.copyLink.enable=n,yield this.plugin.saveSettings(),this.renderSettingsPage(ft.plugin)}))),e.copyLink.enable&&(new I.Setting(this.settingsPage).setName(l.t("settings.plugin.copyLink.baselink.title")).setDesc(l.t("settings.plugin.copyLink.baselink.desc")).setClass("github-publisher").addText(r=>{r.setPlaceholder("my_blog.com").setValue(e.copyLink.links).onChange(n=>g(this,null,function*(){e.copyLink.links=n,yield this.plugin.saveSettings()}))}),new I.Setting(this.settingsPage).setName(l.t("settings.plugin.copyLink.linkPathRemover.title")).setDesc(l.t("settings.plugin.copyLink.linkPathRemover.desc")).setClass("github-publisher").addText(r=>{r.setPlaceholder("docs").setValue(e.copyLink.removePart.join(", ")).onChange(n=>g(this,null,function*(){e.copyLink.removePart=n.split(/[,\n]\s*/).map(i=>i.trim()).filter(i=>i.length>0),yield this.plugin.saveSettings()}))}),new I.Setting(this.settingsPage).setName(l.t("settings.plugin.copyLink.command.desc")).addToggle(r=>r.setValue(e.copyLink.addCmd).onChange(n=>g(this,null,function*(){e.copyLink.addCmd=n,yield this.plugin.saveSettings()})))),new I.Setting(this.settingsPage).setName(l.t("settings.plugin.logNoticeHeader.title")).setDesc(l.t("settings.plugin.logNoticeHeader.desc")).addToggle(r=>r.setValue(e.noticeError).onChange(n=>g(this,null,function*(){e.noticeError=n,yield this.plugin.saveSettings()}))),new I.Setting(this.settingsPage).setName(l.t("settings.plugin.embedEditRepo.title")).setDesc(l.t("settings.plugin.embedEditRepo.desc")).addToggle(r=>r.setValue(e.displayModalRepoEditing).onChange(n=>g(this,null,function*(){e.displayModalRepoEditing=n,yield this.plugin.saveSettings()})))}renderHelp(){this.settingsPage.createEl("h2",{text:l.t("settings.help.usefulLinks.title")}),this.settingsPage.appendChild(aa()),this.settingsPage.createEl("hr"),this.settingsPage.createEl("h2",{text:l.t("settings.help.frontmatter.title")}),this.settingsPage.createEl("p",{text:l.t("settings.help.frontmatter.desc")}),this.settingsPage.createEl("pre",{cls:"language-yaml"}).createEl("code",{text:ia(this.plugin.settings),cls:"language-yaml"}),this.settingsPage.appendChild(sa(this.plugin.settings)),this.settingsPage.createEl("h2",{text:l.t("settings.help.multiRepoHelp.title")}),this.settingsPage.appendChild(oa(this.plugin.settings)),this.settingsPage.appendChild(ua())}};var qr=W(require("obsidian"));var Gt=W(require("obsidian"));var ya="3.7.5",rd=ya,nd=typeof atob=="function",id=typeof btoa=="function",ir=typeof Buffer=="function",Da=typeof TextDecoder=="function"?new TextDecoder:void 0,va=typeof TextEncoder=="function"?new TextEncoder:void 0,sd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Sr=Array.prototype.slice.call(sd),yn=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(Sr),ad=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,oe=String.fromCharCode.bind(String),wa=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),Fa=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),xa=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),Ea=t=>{let e,r,n,i,s="",a=t.length%3;for(let o=0;o<t.length;){if((r=t.charCodeAt(o++))>255||(n=t.charCodeAt(o++))>255||(i=t.charCodeAt(o++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,s+=Sr[e>>18&63]+Sr[e>>12&63]+Sr[e>>6&63]+Sr[e&63]}return a?s.slice(0,a-3)+"===".substring(a):s},Ci=id?t=>btoa(t):ir?t=>Buffer.from(t,"binary").toString("base64"):Ea,Si=ir?t=>Buffer.from(t).toString("base64"):t=>{let e=4096,r=[];for(let n=0,i=t.length;n<i;n+=e)r.push(oe.apply(null,t.subarray(n,n+e)));return Ci(r.join(""))},Dn=(t,e=!1)=>e?Fa(Si(t)):Si(t),od=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?oe(192|e>>>6)+oe(128|e&63):oe(224|e>>>12&15)+oe(128|e>>>6&63)+oe(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return oe(240|e>>>18&7)+oe(128|e>>>12&63)+oe(128|e>>>6&63)+oe(128|e&63)}},ud=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ka=t=>t.replace(ud,od),Ca=ir?t=>Buffer.from(t,"utf8").toString("base64"):va?t=>Si(va.encode(t)):t=>Ci(ka(t)),sr=(t,e=!1)=>e?Fa(Ca(t)):Ca(t),Sa=t=>sr(t,!0),ld=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cd=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return oe((r>>>10)+55296)+oe((r&1023)+56320);case 3:return oe((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return oe((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},Ta=t=>t.replace(ld,cd),Oa=t=>{if(t=t.replace(/\s+/g,""),!ad.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,i;for(let s=0;s<t.length;)e=yn[t.charAt(s++)]<<18|yn[t.charAt(s++)]<<12|(n=yn[t.charAt(s++)])<<6|(i=yn[t.charAt(s++)]),r+=n===64?oe(e>>16&255):i===64?oe(e>>16&255,e>>8&255):oe(e>>16&255,e>>8&255,e&255);return r},Ti=nd?t=>atob(xa(t)):ir?t=>Buffer.from(t,"base64").toString("binary"):Oa,Pa=ir?t=>wa(Buffer.from(t,"base64")):t=>wa(Ti(t).split("").map(e=>e.charCodeAt(0))),Ra=t=>Pa(Aa(t)),dd=ir?t=>Buffer.from(t,"base64").toString("utf8"):Da?t=>Da.decode(Pa(t)):t=>Ta(Ti(t)),Aa=t=>xa(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),Oi=t=>dd(Aa(t)),hd=t=>{if(typeof t!="string")return!1;let e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},Na=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),La=function(){let t=(e,r)=>Object.defineProperty(String.prototype,e,Na(r));t("fromBase64",function(){return Oi(this)}),t("toBase64",function(e){return sr(this,e)}),t("toBase64URI",function(){return sr(this,!0)}),t("toBase64URL",function(){return sr(this,!0)}),t("toUint8Array",function(){return Ra(this)})},Ma=function(){let t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,Na(r));t("toBase64",function(e){return Dn(this,e)}),t("toBase64URI",function(){return Dn(this,!0)}),t("toBase64URL",function(){return Dn(this,!0)})},fd=()=>{La(),Ma()},vn={version:ya,VERSION:rd,atob:Ti,atobPolyfill:Oa,btoa:Ci,btoaPolyfill:Ea,fromBase64:Oi,toBase64:sr,encode:sr,encodeURI:Sa,encodeURL:Sa,utob:ka,btou:Ta,decode:Oi,isValid:hd,fromUint8Array:Dn,toUint8Array:Ra,extendString:La,extendUint8Array:Ma,extendBuiltins:fd};var Tr=W(require("obsidian"));function Or(t=!1,e,r,n,i,s,a){return g(this,null,function*(){s=Array.isArray(s)?s:[s];let o=[];for(let u of s)o.push(yield pd(t,e,r,n,i,u,a));return o[0]})}function pd(t=!1,e,r,n,i,s,a){return g(this,null,function*(){if(!s.autoclean)return;let o=yield i.getAllFileFromRepo(n,r,e,s),u=yield gd(o,e);if((e.github.rateLimit===0||u.length>e.github.rateLimit)&&(yield _e(r,e,!1,u.length))===0)return{success:!1,deleted:[],undeleted:[]};if(!u){let k="";return e.upload.defaultName.length>0&&(e.upload.defaultName.length>0?k=l.t("deletion.defaultFolder"):e.upload.behavior===U.yaml&&e.upload.rootFolder.length===0&&(k=l.t("deletion.rootFolder"))),t||new Tr.Notice("Error : "+k),{success:!1,deleted:[],undeleted:[]}}let d=i.getAllFileWithPath(a).map(k=>({converted:k.converted,repo:k.repoFrontmatter})),f=0,m=0,y={deleted:[],undeleted:[],success:!1};for(let k of u){let F=d.some(D=>D.converted===k.file),E=k.file.trim().endsWith(".md")?!d.some(D=>D.converted===k.file&&JSON.stringify(D.repo)==JSON.stringify(s)):!1;if(F?E:!0){let D=k.file.contains(e.upload.folderNote.rename)?yield yd(r,e,k.file,s):!1;try{D||(B(`trying to delete file : ${k.file} from ${s.owner}/${s.repo}`,e),(yield r.request("DELETE /repos/{owner}/{repo}/contents/{path}",{owner:s.owner,repo:s.repo,path:k.file,message:`DELETE FILE : ${k.file}`,sha:k.sha,branch:n})).status===200?(f++,y.deleted.push(k.file)):(m++,y.undeleted.push(k.file)))}catch(R){R instanceof DOMException||B(R,e)}}}let w=l.t("deletion.noFile"),C="";return f>0&&(w=l.t("deletion.success",{nb:f.toString()})),m>0&&(C=l.t("deletion.failed",{nb:m.toString()})),t||new Tr.Notice(w+C),y.success=m===0,y})}function md(t,e){let r=e.upload.autoclean.excluded;if(r.length>0)for(let n of r){let i=n.match(/^\/(.*)\/[igmsuy]*$/),s=i?new RegExp(i[1],i[2]):null;if(s&&s.test(t))return!0;if(t.trim().includes(n.trim())&&n.length>0)return!0}return!1}function gd(t,e){return g(this,null,function*(){let r=[];for(let n of t){let i=e.upload.behavior,s=e.upload.rootFolder,a=e.upload.defaultName,o=e.embed.folder;if(i===U.yaml&&s.length===0||a.length===0||i===U.fixed)return null;(n.file.includes(a)||i===U.yaml&&n.file.includes(s)||o.length>0&&n.file.includes(o))&&!md(n.file,e)&&(De(n.file)||n.file.match("md$"))&&r.push(n)}return r})}function bd(t){let e=t.split("---")[1],r=(0,Tr.parseYaml)(e);return fa(r)}function yd(t,e,r,n){return g(this,null,function*(){try{let i=yield t.request("GET /repos/{owner}/{repo}/contents/{path}",{owner:n.owner,repo:n.repo,path:r});if(i.status===200){let s=vn.decode(i.data.content),a=bd(s);return a.index==="true"||a.delete==="false"||!a.share}}catch(i){if(!(i instanceof DOMException))return B(i,e),!1}})}var Pr=class{constructor(e,r,n=!1){this.attachment=!1;this.statusBarItem=e,this.counter=0,this.numberOfNotesToPublish=r,this.attachment=n,this.statusBarItem.createEl("span",{text:""});let i=l.t("common.files");this.attachment&&(i=l.t("common.attachments"));let s=l.t("statusBar.markedForSharing",{nb:this.numberOfNotesToPublish,type:i});this.status=this.statusBarItem.createEl("span",{text:`${s}`})}increment(){let e=l.t("common.files");this.attachment&&(e=l.t("common.attachments"));let r=l.t("statusBar.sharing",{type:e});this.status.setText(l.t("statusBar.counter",{msg:r,counter:++this.counter,nb:this.numberOfNotesToPublish}))}finish(e){let r=l.t("statusBar.success",{action:l.t("common.published"),type:l.t("common.files")});this.attachment&&(r=l.t("statusBar.success",{action:l.t("common.shared"),type:l.t("common.attachments")})),this.status.setText(l.t("statusBar.counter",{msg:r,counter:this.counter,nb:this.numberOfNotesToPublish})),setTimeout(()=>{this.statusBarItem.remove()},e)}error(){this.statusBarItem.remove()}};var wt=W(require("obsidian"));var ls=W(ns());var as=W(vu());function os(t,e,r,n){let i=e.convertWiki,s=e.attachment,a=e.links;if(ma(e))return t;let o=/!?\[\[.*?\]\]/g,u=t.match(o);if(u){let c=/(\[\[).*?([\]|])/;for(let d of u){let f=d.match(c),m=d.startsWith("!")?"!":"",y=d.startsWith("!");if(f){let w=d,C=f[0].replaceAll("[","").replaceAll("|","").replaceAll("]","").replaceAll("\\",""),k=f[0].replaceAll("[","").replaceAll("|","").replaceAll("]","").replaceAll("\\","").replaceAll("../","").replaceAll("./","").replace(/#.*/,""),F=r.find(E=>E.linkFrom.replace(/#.*/,"")===k);if(F){let E;F.linked.extension!=="md"?E=F.altText.length>0?F.altText:"":E=F.altText.length>0?F.altText:F.linked.basename;let L=e.removeEmbed&&y&&F.linked.extension==="md";if(i){let D=d.match(/(\|).*(]])/),R=C.split("/"),_=xu(D,R,C.split(".").at(-1),C);w=wu(C,m,_,n)}F.linked.extension==="md"&&!a&&!y&&(w=E),(!s&&De(F.linked.extension)||L)&&(w=""),t=t.replace(d,w)}else if(!C.startsWith("http")){let E=d.match(/(\|).*(]])/),L=C.split("/"),D=xu(E,L,C.split(".").at(-1),C),R=!De(C.trim())&&e.removeEmbed&&y;i&&(w=wu(C,m,D,n)),!De(C.trim())&&!a&&!y&&(w=D),(!s&&De(C.trim())||R)&&(w=""),t=t.replace(d,w)}}}}return t}function wu(t,e,r,n){let i=De(t.trim())?t.trim():t.replace(/#.*/,"").trim()+".md",s=t.match(/(#.*)/)?t.match(/(#.*)/)[0].replaceAll(" ","%20"):"",a=encodeURI(i);return n.conversion.links.slugify&&(s=t.match(/(#.*)/)?(0,as.default)(t.match(/(#.*)/)[0],{lower:!0,strict:!0}):"",s=`#${s}`),`${e}[${r}](${a}${s})`}function Cf(t,e){return t.match(/\[{2}.*\]{2}/)&&!t.match(/(\|).*(]])/)?t.replace("|","").replace("]]",`|${e.altText}]]`):t}function Fu(t){return t.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")}function us(t,e,r,n,i,s,a,o,u,c){return g(this,null,function*(){if(!u.convertInternalLinks)return t;for(let d of r){let f=yield ca(i,d,n,e,s,a,o,u,c);f=f.replace(".md","");let m=d.anchor?d.anchor:"",y=Fu(d.linkFrom.replace(d.anchor,"")).replaceAll(" ","%20")+m.replace("^","\\^");y=y.replaceAll(" ","%20");let w=Fu(d.linkFrom),C=new RegExp(`(\\[{2}${w}(\\\\?\\|.*)?\\]{2})|(\\[.*\\]\\((${w}|${y})\\))`,"g"),k=t.match(C);if(k)for(let F of k){let E=new RegExp(`((${w})|(${y}))`),L=f;d.anchor&&(f=f.replace(/#.*/,""),L+=d.anchor);let D=F.replace(E,L);F.match(/\[.*\]\(.*\)/)&&(d.linked.extension==="md"&&(m=e.conversion.links.slugify?(0,as.default)(m,{lower:!0,strict:!0}):m,f=f.replaceAll(" ","%20")+".md#"+m,f=!f.match(/(#.*)/)&&!f.endsWith(".md")?f+".md":f),D=`[${F.match(/\[(.*)\]/)[1]}](${f})`),D=Cf(D,d),t=t.replace(F,D)}}return t})}function xu(t,e,r,n){return t?t[0].replace("]]","").replace("|",""):r==="md"?e.length>1?e[e.length-1]:e[0]:n.split("/").at(-1)}function Sf(t,e,r){try{return t=t.replace(/^\s*\\\s*$/gim,"<br/>"),r.hardbreak&&(t=t.replace(/\n/gm,`
`)),t}catch(n){return B(n,e),t}}function Eu(t,e,r){return g(this,null,function*(){let n=t.split("---")[1],i=(0,wt.parseYaml)(n);if(i.tag)try{e=[...new Set([...e,...i.tag.map(o=>o.replaceAll("/","_"))])],delete i.tag}catch(o){B(o,r)}if(i.tags)try{i.tags=[...new Set([...i.tags.map(o=>o.replaceAll("/","_")),...e])]}catch(o){B(o,r)}else i.tags=e;let s=(0,wt.stringifyYaml)(i),a=t.split("---").slice(2).join("---");return`---
${s}---
${a}`})}function Tf(t,e,r,n,i,s){return g(this,null,function*(){var f;if(!t.conversion.tags.inline)return s;let a=(f=r.getFileCache(e))==null?void 0:f.tags,o=a?a.map(m=>m.tag.replace("#","").replaceAll("/","_")):[],u=(0,wt.parseFrontMatterTags)(i),c=u?u.map(m=>m.replace("#","").replaceAll("/","_")):[],d=[...new Set([...o,...c])];return d.length>0?yield Eu(s,d,t):s})}function ku(t,e){let n=(s=>/([^/\\.]*)(\..*)?$/.exec(s)[1])(t.path).toString(),i=t.display?t.display.toString():n;return!e.conversion.tags.exclude.includes(i)&&!e.conversion.tags.fields.includes(n)?i:null}function Of(t,e,r,n){return g(this,null,function*(){if(e.conversion.tags.fields.length===0||!n.plugins.enabledPlugins.has("dataview"))return t;let s=yield(0,ls.getAPI)().page(r.path),a=[];for(let o of e.conversion.tags.fields){let u=s[o];if(u)if(u.constructor.name==="Link"){let c=ku(u,e);a.push(c)}else if(u.constructor.name==="Array")for(let c of u){let d=c;c.constructor.name==="Link"?(d=ku(c,e),a.push(d)):e.conversion.tags.exclude.includes(d.toString())||a.push(d.toString())}else e.conversion.tags.exclude.includes(u.toString())||a.push(u.toString())}return a.length>0?yield Eu(t,a.filter(Boolean),e):t})}function Pf(t,e,r,n,i,s,a,o,u,c){return g(this,null,function*(){if(!n.plugins.enabledPlugins.has("dataview"))return t;let d=n.vault,f=t,m=/```dataview(.+?)```/gms,y=(0,ls.getAPI)(),w=t.matchAll(m);if(!w)return;let C=s.dataview;for(let k of w)try{let F=k[0],E=k[1],L=C?yield y.tryQueryMarkdown(E,e):"",D=la(L,r,d);L=yield us(L,r,D,i,o,d,a,u,s,c),L=os(L,s,D,r),f=f.replace(F,L)}catch(F){return B(F,r),k[1].match("js")||new wt.Notice(l.t("error.dataview")),t}return f})}function Cu(t,e,r,n,i,s,a,o,u,c,d,f){return g(this,null,function*(){return t=dn(t,e,!1),t=yield Tf(e,n,s,u.app,a,t),t=yield Pf(t,n.path,e,u.app,s,r,a,n,d,f),t=yield Of(t,e,n,u.app),t=Sf(t,e,r),t=yield us(t,e,o,s,n,c,a,d,r,f),t=os(t,r,o,e),t=dn(t,e,!0),t})}var Gn=class{constructor(e,r,n,i,s){this.vault=e,this.metadataCache=r,this.settings=n,this.octokit=i,this.plugin=s}statusBarForEmbed(e,r,n,i,s,a,o){return g(this,null,function*(){let u=[],c=[];if(e.length>0)if(e.length>1){let d=this.plugin.addStatusBarItem(),f=new Pr(d,e.length,!0);try{for(let m of e)try{if(!r.includes(m)){if(m.extension==="md"&&i){let y=yield this.publish(m,!1,n,a,o,r,!0);y&&u.push(...y.uploaded)}else if(De(m.extension)&&s.attachment){let y=yield this.uploadImage(m,n,s,a);r.push(m),y&&u.push(y)}}f.increment()}catch(y){new Gt.Notice(l.t("error.unablePublishNote",{file:m.name})),c.push(m.name),console.error(y)}f.finish(8e3)}catch(m){B(m,this.settings),new Gt.Notice(l.t("error.errorPublish",{repo:a})),f.error()}}else{let d=e[0];if(!r.includes(d)){if(d.extension==="md"&&i){let f=yield this.publish(d,!1,n,a,o,r,!0);f&&u.push(...f.uploaded)}else if(De(d.extension)&&s.attachment){let f=yield this.uploadImage(d,n,s,a);r.push(d),f&&u.push(f)}}}return{fileHistory:r,uploaded:u,error:c}})}publish(u){return g(this,arguments,function*(e,r=!1,n,i,s,a=[],o=!1){let c=new Ur(this.vault,this.metadataCache,this.settings,this.octokit,this.plugin),d=this.metadataCache.getFileCache(e).frontmatter,f=gn(Z(this.settings,s,d),this.plugin);if(!pe(d,this.settings,e,s)||a.includes(e)||!pn(Z(this.settings,s,d),i)||!f)return!1;try{B("Publishing file: "+e.path,this.settings),a.push(e);let m=fn(d,this.settings),y=c.getSharedEmbed(e,m);y=yield c.getMetadataLinks(e,y,d,m);let w=c.getLinkedByEmbedding(e),C=yield app.vault.cachedRead(e);C=yield Cu(C,this.settings,m,e,app,this.metadataCache,d,w,this.plugin,this.vault,i,s);let k=Je(e,this.settings,this.metadataCache,this.vault,s);i=Array.isArray(i)?i:[i];let F="";for(let _ of i)F+=`[${_.owner}/${_.repo}/${_.branch}] `;let E=`Publishing ${e.name} to ${F}`;B(E,this.settings);let L=[],D=[],R=[];for(let _ of i){let N=yield this.uploadOnMultipleRepo(e,C,n,m,k,_,y,a,o,c,r,s);L.push(N.deleted),D.push(N.uploaded),R.push(...N.error)}return{deleted:L[0],uploaded:D[0],error:R}}catch(m){return B(m,this.settings),!1}})}uploadOnMultipleRepo(e,r,n,i,s,a,o,u,c,d,f,m){return g(this,null,function*(){B(`Upload ${e.name}:${s} on ${a.owner}/${a.repo}:${n}`,this.settings);let y=yield this.uploadText(r,s,e.name,n,a),w,C=yield this.statusBarForEmbed(o,u,n,c,i,a,m),k=C.uploaded;return k.push(y),f&&a.autoclean&&(w=yield Or(!0,this.settings,this.octokit,n,d,a,m)),{deleted:w,uploaded:k,error:C.error}})}upload(e,r,n="",i,s){return g(this,null,function*(){if(!s.repo)throw new Gt.Notice("Config error : You need to define a github repo in the plugin settings"),{};if(!s.owner)throw new Gt.Notice("Config error : You need to define your github username in the plugin settings"),{};let a=this.octokit,o=`PUSH NOTE : ${n}`;De(r)&&(n=r.split("/")[r.split("/").length-1],o=`PUSH ATTACHMENT : ${n}`);let u={owner:s.owner,repo:s.repo,path:r,message:`Adding ${n}`,content:e,sha:"",branch:i},c={isUpdated:!1,file:n};try{let d=yield a.request("GET /repos/{owner}/{repo}/contents/{path}",{owner:s.owner,repo:s.repo,path:r,ref:i});d.status===200&&d.data.type==="file"&&(u.sha=d.data.sha,c.isUpdated=!0)}catch(d){B(l.t("error.normal"),this.settings)}return u.message=o,yield a.request("PUT /repos/{owner}/{repo}/contents/{path}",u),c})}uploadImage(e,r,n,i){return g(this,null,function*(){let s=yield this.vault.readBinary(e),a=(0,Gt.arrayBufferToBase64)(s),o=kr(e,this.settings,n);return yield this.upload(a,o,"",r,i)})}uploadText(e,r,n="",i,s){return g(this,null,function*(){try{let a=vn.encode(e).toString();return yield this.upload(a,r,n,i,s)}catch(a){console.error(a);return}})}uploadMetadataExtractorFiles(e,r,n){return g(this,null,function*(){if(e){for(let i of Object.values(e))if(i){let s=yield app.vault.adapter.read(i),a=this.settings.upload.metadataExtractorPath+"/"+i.split("/").pop();n=Array.isArray(n)?n:[n];for(let o of n)yield this.uploadText(s,a,i.split("/").pop(),r,o)}}})}workflowGestion(e){return g(this,null,function*(){let r=!1;if(e.workflowName.length===0)return!1;{let n=this.octokit;for(yield n.request("POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches",{owner:e.owner,repo:e.repo,workflow_id:e.workflowName,ref:e.branch});!r;){yield sleep(1e4);let i=yield n.request("GET /repos/{owner}/{repo}/actions/runs",{owner:e.owner,repo:e.repo});if(i.data.workflow_runs.length>0&&i.data.workflow_runs.find(a=>a.name===e.workflowName.replace(".yml","")).status==="completed")return r=!0,!0}}})}};var Su=W(ns()),Ur=class extends Gn{constructor(e,r,n,i,s){super(e,r,n,i,s);this.vault=e,this.metadataCache=r,this.settings=n,this.octokit=i,this.plugin=s}getSharedFiles(e){let r=this.vault.getMarkdownFiles(),n=[];for(let i of r)try{let s=this.metadataCache.getCache(i.path).frontmatter;pe(s,this.settings,i,e)&&n.push(i)}catch(s){}return n}getSharedFileOfFolder(e,r){let n=[];for(let i of e.children)if(i instanceof qr.TFolder)n.push(...this.getSharedFileOfFolder(i,r));else try{let s=this.metadataCache.getCache(i.path).frontmatter;pe(s,this.settings,i,r)&&n.push(i)}catch(s){}return gt(n),n}getAllFileWithPath(e){let r=this.vault.getFiles(),n=[];for(let i of r)if(De(i.extension)){let s=kr(i,this.settings,null);n.push({converted:s,real:i.path})}else if(i.extension=="md"){let s=this.metadataCache.getCache(i.path).frontmatter;if(pe(s,this.settings,i,e)){let a=Je(i,this.settings,this.metadataCache,this.vault,e);n.push({converted:a,real:i.path,repoFrontmatter:Z(this.settings,e,s)})}}return n}getLinkedByEmbedding(e){let r=this.getLinkedFiles(e),n=this.metadataCache.getFileCache(e).embeds;if(n!=null)for(let i of n)try{let s=this.metadataCache.getFirstLinkpathDest(i.link.replace(/#.*/,""),e.path);if(s!==null){let a=i.displayText!==s.path.replace(".md","")?i.displayText:s.basename,o;if(this.settings.upload.frontmatterTitle.enable){let c=this.metadataCache.getCache(s.path).frontmatter;c&&c[this.settings.upload.frontmatterTitle.key]&&(o=c[this.settings.upload.frontmatterTitle.key],a===s.basename&&(a=o))}let u={linked:s,linkFrom:i.link,altText:a,destinationFilePath:o};i.link.includes("#")&&(u.anchor="#"+i.link.split("#")[1]),r.push(u)}}catch(s){}return[...new Set(r)]}getLinkedFiles(e){let r=this.metadataCache.getCache(e.path).links,n=[];if(r!=null){for(let i of r)try{let s=this.metadataCache.getFirstLinkpathDest(i.link.replace(/#.*/,""),e.path);if(s){let a=i.displayText!==s.path.replace(".md","")?i.displayText:s.basename;i.original.match(/\[.*\]\(.*\)/)&&(a=i.original.match(/\[(.*)\]/)[1]);let o;if(this.settings.upload.frontmatterTitle.enable){let c=this.metadataCache.getCache(s.path).frontmatter;c&&c[this.settings.upload.frontmatterTitle.key]&&(o=c[this.settings.upload.frontmatterTitle.key],a===s.basename&&(a=o))}let u={linked:s,linkFrom:i.link,altText:a,destinationFilePath:o};i.link.includes("#")&&(u.anchor="#"+i.link.split("#")[1]),n.push(u)}}catch(s){B(s,this.settings),B("Error with this links : "+i.link,this.settings)}return[...new Set(n)]}return[]}getSharedEmbed(e,r){let n=this.metadataCache.getCache(e.path).embeds,i=[];if(n!=null){for(let s of n)try{let a=this.metadataCache.getFirstLinkpathDest(s.link.replace(/#(.*)/,""),e.path);i.push(this.imageSharedOrNote(a,r))}catch(a){B(a,this.settings),B("Error with this file : "+s.displayText,this.settings)}return[...new Set(i)].filter(s=>s!==null)}return[]}getLastEditedTimeRepo(e,r,n){return g(this,null,function*(){let s=(yield e.request("GET /repos/{owner}/{repo}/commits",{owner:n.github.user,repo:n.github.repo,path:r.file})).data[0];return new Date(s.commit.committer.date)})}getAllFileFromRepo(e,r,n,i){return g(this,null,function*(){let s=[];try{let a=yield r.request("GET /repos/{owner}/{repo}/git/trees/{tree_sha}",{owner:i.owner,repo:i.repo,tree_sha:e,recursive:"true"});if(a.status===200){let o=a.data.tree;for(let u of o){let c=d=>/([^/\\.]*)(\..*)?$/.exec(d)[1];u.type==="blob"&&c(u.path).length>0&&s.push({file:u.path,sha:u.sha})}}}catch(a){B(a,n)}return s})}getNewFiles(e,r,n){let i=[];for(let s of e)if(!r.some(a=>a.file===s.converted.trim())){let a=n.getAbstractFileByPath(s.real.trim());a&&a instanceof qr.TFile&&a.extension==="md"&&i.push(a)}return i}getImageByPath(e,r,n){r.constructor.name==="Link"&&(r=r.path),e.constructor.name==="Link"&&(e=e.path);let i=this.metadataCache.getFirstLinkpathDest(r,e);return i!==null?this.imageSharedOrNote(i,n):null}imageSharedOrNote(e,r){let n=r.attachment,i=r.embed;return De(e.extension)&&n||i&&e.extension==="md"?e:null}getMetadataLinks(e,r,n,i){return g(this,null,function*(){var s;for(let a of this.settings.embed.keySendFile)n[a]!=null&&((s=this.metadataCache.getFirstLinkpathDest(n[a],e.path))!=null?s:this.vault.getAbstractFileByPath(n[a]))!==null&&r.push(this.imageSharedOrNote(e,i));if(this.plugin.app.plugins.enabledPlugins.has("dataview")){let o=yield(0,Su.getAPI)().page(e.path);for(let u of this.settings.embed.keySendFile){let c=o[u];if(c!=null)if(c.constructor.name==="Array")for(let d of c)r.push(this.getImageByPath(d,c,i));else r.push(this.getImageByPath(c,c,i))}}return[...new Set(r)].filter(a=>a!=null)})}getEditedFiles(e,r,n,i){return g(this,null,function*(){for(let s of e)if(r.some(a=>a.file===s.converted.trim())){let a=r.find(c=>c.file===s.converted.trim()),o=yield this.getLastEditedTimeRepo(this.octokit,a,this.settings),u=n.getAbstractFileByPath(s.real.trim());if(u&&u instanceof qr.TFile&&u.extension==="md"){let c=new Date(u.stat.mtime);c>o&&(B(`edited file : ${u.path} / ${c} vs ${o}`,this.settings),i.push(u))}}return i})}};var ct=W(require("obsidian"));var cs=class extends Ur{constructor(e,r,n,i,s){super(n,i,e,r,s);this.settings=e,this.octokit=r,this.plugin=s}newBranch(e,r){return g(this,null,function*(){r=Array.isArray(r)?r:[r];for(let n of r)yield this.newBranchOnRepo(e,n)})}newBranchOnRepo(e,r){return g(this,null,function*(){let i=(yield this.octokit.request("GET /repos/{owner}/{repo}/branches",{owner:r.owner,repo:r.repo})).data.find(s=>s.name===r.branch);try{let s=i.commit.sha,a=yield this.octokit.request("POST /repos/{owner}/{repo}/git/refs",{owner:r.owner,repo:r.repo,ref:"refs/heads/"+e,sha:s});return B(l.t("publish.branch.success",{branchStatus:a.status,repo:r}),this.settings),a.status===201}catch(s){try{B(s,this.settings);let o=(yield this.octokit.request("GET /repos/{owner}/{repo}/branches",{owner:r.owner,repo:r.repo})).data.find(u=>u.name===e);return B(l.t("publish.branch.alreadyExists",{branchName:e,repo:r}),this.settings),!!o}catch(a){return B(a,this.settings),!1}}})}pullRequestOnRepo(e,r){return g(this,null,function*(){try{return(yield this.octokit.request("POST /repos/{owner}/{repo}/pulls",{owner:r.owner,repo:r.repo,title:l.t("publish.branch.prMessage",{branchName:e}),body:"",head:e,base:r.branch})).data.number}catch(n){B(n,this.settings);try{return(yield this.octokit.request("GET /repos/{owner}/{repo}/pulls",{owner:r.owner,repo:r.repo,state:"open"})).data[0].number}catch(i){return B(l.t("publish.branch.error",{error:i,repo:r}),this.settings),0}}})}deleteBranchOnRepo(e,r){return g(this,null,function*(){try{return(yield this.octokit.request("DELETE /repos/{owner}/{repo}/git/refs/heads/"+e,{owner:r.owner,repo:r.repo})).status===200}catch(n){return!1}})}mergePullRequestOnRepo(e,r){return g(this,null,function*(){let n=r.commitMsg||r.commitMsg.trim().length>0?`${r.commitMsg} #${e}`:`[PUBLISHER] Merge #${e}`;try{return(yield this.octokit.request("PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge",{owner:r.owner,repo:r.repo,pull_number:e,commit_title:n,merge_method:"squash"})).status===200}catch(i){return B(i,this.settings),new ct.Notice(l.t("error.mergeconflic")),!1}})}updateRepository(e,r){return g(this,null,function*(){r=Array.isArray(r)?r:[r];let n=[];for(let i of r)n.push(yield this.updateRepositoryOnOne(e,i));return!n.every(i=>i===!1)})}updateRepositoryOnOne(e,r){return g(this,null,function*(){try{let n=yield this.pullRequestOnRepo(e,r);return r.automaticallyMergePR&&n!==0?(yield this.mergePullRequestOnRepo(n,r))?(yield this.deleteBranchOnRepo(e,r),!0):!1:!0}catch(n){return B(n,this.settings),new ct.Notice(l.t("error.errorConfig",{repo:r})),!1}})}checkRepository(e,r=!0){return g(this,null,function*(){e=Array.isArray(e)?e:[e];for(let n of e)try{(yield this.octokit.request("GET /repos/{owner}/{repo}",{owner:n.owner,repo:n.repo}).catch(s=>{s.status===404?new ct.Notice(l.t("commands.checkValidity.inRepo.error404",{repo:n})):s.status===403?new ct.Notice(l.t("commands.checkValidity.inRepo.error403",{repo:n})):s.status===301&&new ct.Notice(l.t("commands.checkValidity.inRepo.error301",{repo:n}))})).status===200&&(B(l.t("commands.checkValidity.repoExistsTestBranch",{repo:n}),this.settings),(yield this.octokit.request("GET /repos/{owner}/{repo}/branches/{branch}",{owner:n.owner,repo:n.repo,branch:n.branch}).catch(a=>{a.status===404?new ct.Notice(l.t("commands.checkValidity.inBranch.error404",{repo:n})):a.status===403&&new ct.Notice(l.t("commands.checkValidity.inBranch.error403",{repo:n}))})).status===200&&!r&&new ct.Notice(l.t("commands.checkValidity.success",{repo:n})))}catch(i){break}})}};function Ft(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof process=="object"&&"version"in process?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:"<environment undetectable>"}var ll=W(Vu());function $u(t){return Object.prototype.toString.call(t)==="[object Object]"}function _n(t){var e,r;return $u(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!($u(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function Bf(t){return t?Object.keys(t).reduce((e,r)=>(e[r.toLowerCase()]=t[r],e),{}):{}}function Hu(t,e){let r=Object.assign({},t);return Object.keys(e).forEach(n=>{_n(e[n])?n in t?r[n]=Hu(t[n],e[n]):Object.assign(r,{[n]:e[n]}):Object.assign(r,{[n]:e[n]})}),r}function Uu(t){for(let e in t)t[e]===void 0&&delete t[e];return t}function ds(t,e,r){if(typeof e=="string"){let[i,s]=e.split(" ");r=Object.assign(s?{method:i,url:s}:{url:i},r)}else r=Object.assign({},e);r.headers=Bf(r.headers),Uu(r),Uu(r.headers);let n=Hu(t||{},r);return t&&t.mediaType.previews.length&&(n.mediaType.previews=t.mediaType.previews.filter(i=>!n.mediaType.previews.includes(i)).concat(n.mediaType.previews)),n.mediaType.previews=n.mediaType.previews.map(i=>i.replace(/-preview/,"")),n}function If(t,e){let r=/\?/.test(t)?"&":"?",n=Object.keys(e);return n.length===0?t:t+r+n.map(i=>i==="q"?"q="+e.q.split("+").map(encodeURIComponent).join("+"):`${i}=${encodeURIComponent(e[i])}`).join("&")}var jf=/\{[^}]+\}/g;function Gf(t){return t.replace(/^\W+|\W+$/g,"").split(/,/)}function _f(t){let e=t.match(jf);return e?e.map(Gf).reduce((r,n)=>r.concat(n),[]):[]}function qu(t,e){return Object.keys(t).filter(r=>!e.includes(r)).reduce((r,n)=>(r[n]=t[n],r),{})}function Wu(t){return t.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e}).join("")}function br(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function Kr(t,e,r){return e=t==="+"||t==="#"?Wu(e):br(e),r?br(r)+"="+e:e}function yr(t){return t!=null}function hs(t){return t===";"||t==="&"||t==="?"}function Vf(t,e,r,n){var i=t[r],s=[];if(yr(i)&&i!=="")if(typeof i=="string"||typeof i=="number"||typeof i=="boolean")i=i.toString(),n&&n!=="*"&&(i=i.substring(0,parseInt(n,10))),s.push(Kr(e,i,hs(e)?r:""));else if(n==="*")Array.isArray(i)?i.filter(yr).forEach(function(a){s.push(Kr(e,a,hs(e)?r:""))}):Object.keys(i).forEach(function(a){yr(i[a])&&s.push(Kr(e,i[a],a))});else{let a=[];Array.isArray(i)?i.filter(yr).forEach(function(o){a.push(Kr(e,o))}):Object.keys(i).forEach(function(o){yr(i[o])&&(a.push(br(o)),a.push(Kr(e,i[o].toString())))}),hs(e)?s.push(br(r)+"="+a.join(",")):a.length!==0&&s.push(a.join(","))}else e===";"?yr(i)&&s.push(br(r)):i===""&&(e==="&"||e==="?")?s.push(br(r)+"="):i===""&&s.push("");return s}function $f(t){return{expand:Hf.bind(null,t)}}function Hf(t,e){var r=["+","#",".","/",";","?","&"];return t.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(n,i,s){if(i){let o="",u=[];if(r.indexOf(i.charAt(0))!==-1&&(o=i.charAt(0),i=i.substr(1)),i.split(/,/g).forEach(function(c){var d=/([^:\*]*)(?::(\d+)|(\*))?/.exec(c);u.push(Vf(e,o,d[1],d[2]||d[3]))}),o&&o!=="+"){var a=",";return o==="?"?a="&":o!=="#"&&(a=o),(u.length!==0?o:"")+u.join(a)}else return u.join(",")}else return Wu(s)})}function Ku(t){let e=t.method.toUpperCase(),r=(t.url||"/").replace(/:([a-z]\w+)/g,"{$1}"),n=Object.assign({},t.headers),i,s=qu(t,["method","baseUrl","url","headers","request","mediaType"]),a=_f(r);r=$f(r).expand(s),/^http/.test(r)||(r=t.baseUrl+r);let o=Object.keys(t).filter(d=>a.includes(d)).concat("baseUrl"),u=qu(s,o);if(!/application\/octet-stream/i.test(n.accept)&&(t.mediaType.format&&(n.accept=n.accept.split(/,/).map(d=>d.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${t.mediaType.format}`)).join(",")),t.mediaType.previews.length)){let d=n.accept.match(/[\w-]+(?=-preview)/g)||[];n.accept=d.concat(t.mediaType.previews).map(f=>{let m=t.mediaType.format?`.${t.mediaType.format}`:"+json";return`application/vnd.github.${f}-preview${m}`}).join(",")}return["GET","HEAD"].includes(e)?r=If(r,u):"data"in u?i=u.data:Object.keys(u).length&&(i=u),!n["content-type"]&&typeof i!="undefined"&&(n["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(e)&&typeof i=="undefined"&&(i=""),Object.assign({method:e,url:r,headers:n},typeof i!="undefined"?{body:i}:null,t.request?{request:t.request}:null)}function Uf(t,e,r){return Ku(ds(t,e,r))}function zu(t,e){let r=ds(t,e),n=Uf.bind(null,r);return Object.assign(n,{DEFAULTS:r,defaults:zu.bind(null,r),merge:ds.bind(null,r),parse:Ku})}var qf="7.0.6",Wf=`octokit-endpoint.js/${qf} ${Ft()}`,Kf={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":Wf},mediaType:{format:"",previews:[]}},Yu=zu(null,Kf);var il=W(Ju());var Vn=class extends Error{constructor(e){super(e);Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="Deprecation"}};var ps=W(nl()),Yf=(0,ps.default)(t=>console.warn(t)),Zf=(0,ps.default)(t=>console.warn(t)),Vt=class extends Error{constructor(e,r,n){super(e);Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="HttpError",this.status=r;let i;"headers"in n&&typeof n.headers!="undefined"&&(i=n.headers),"response"in n&&(this.response=n.response,i=n.response.headers);let s=Object.assign({},n.request);n.request.headers.authorization&&(s.headers=Object.assign({},n.request.headers,{authorization:n.request.headers.authorization.replace(/ .*$/," [REDACTED]")})),s.url=s.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]"),this.request=s,Object.defineProperty(this,"code",{get(){return Yf(new Vn("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")),r}}),Object.defineProperty(this,"headers",{get(){return Zf(new Vn("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")),i||{}}})}};var Jf="6.2.8";function Qf(t){return t.arrayBuffer()}function sl(t){let e=t.request&&t.request.log?t.request.log:console;(_n(t.body)||Array.isArray(t.body))&&(t.body=JSON.stringify(t.body));let r={},n,i;return(t.request&&t.request.fetch||globalThis.fetch||il.default)(t.url,Object.assign({method:t.method,body:t.body,headers:t.headers,redirect:t.redirect,...t.body&&{duplex:"half"}},t.request)).then(async a=>{i=a.url,n=a.status;for(let o of a.headers)r[o[0]]=o[1];if("deprecation"in r){let o=r.link&&r.link.match(/<([^>]+)>; rel="deprecation"/),u=o&&o.pop();e.warn(`[@octokit/request] "${t.method} ${t.url}" is deprecated. It is scheduled to be removed on ${r.sunset}${u?`. See ${u}`:""}`)}if(!(n===204||n===205)){if(t.method==="HEAD"){if(n<400)return;throw new Vt(a.statusText,n,{response:{url:i,status:n,headers:r,data:void 0},request:t})}if(n===304)throw new Vt("Not modified",n,{response:{url:i,status:n,headers:r,data:await ms(a)},request:t});if(n>=400){let o=await ms(a);throw new Vt(Xf(o),n,{response:{url:i,status:n,headers:r,data:o},request:t})}return ms(a)}}).then(a=>({status:n,url:i,headers:r,data:a})).catch(a=>{throw a instanceof Vt||a.name==="AbortError"?a:new Vt(a.message,500,{request:t})})}async function ms(t){let e=t.headers.get("content-type");return/application\/json/.test(e)?t.json():!e||/^text\/|charset=utf-8$/.test(e)?t.text():Qf(t)}function Xf(t){return typeof t=="string"?t:"message"in t?Array.isArray(t.errors)?`${t.message}: ${t.errors.map(JSON.stringify).join(", ")}`:t.message:`Unknown error: ${JSON.stringify(t)}`}function gs(t,e){let r=t.defaults(e);return Object.assign(function(i,s){let a=r.merge(i,s);if(!a.request||!a.request.hook)return sl(r.parse(a));let o=(u,c)=>sl(r.parse(r.merge(u,c)));return Object.assign(o,{endpoint:r,defaults:gs.bind(null,r)}),a.request.hook(o,a)},{endpoint:r,defaults:gs.bind(null,r)})}var zr=gs(Yu,{headers:{"user-agent":`octokit-request.js/${Jf} ${Ft()}`}});var ep="5.0.6";function tp(t){return`Request failed due to following response errors:
`+t.errors.map(e=>` - ${e.message}`).join(`
`)}var rp=class extends Error{constructor(t,e,r){super(tp(r));this.request=t,this.headers=e,this.response=r,this.name="GraphqlResponseError",this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},np=["method","baseUrl","url","headers","request","query","mediaType"],ip=["query","method","url"],al=/\/api\/v3\/?$/;function sp(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let a in r)if(!!ip.includes(a))return Promise.reject(new Error(`[@octokit/graphql] "${a}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,i=Object.keys(n).reduce((a,o)=>np.includes(o)?(a[o]=n[o],a):(a.variables||(a.variables={}),a.variables[o]=n[o],a),{}),s=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return al.test(s)&&(i.url=s.replace(al,"/api/graphql")),t(i).then(a=>{if(a.data.errors){let o={};for(let u of Object.keys(a.headers))o[u]=a.headers[u];throw new rp(i,o,a.data)}return a.data.data})}function bs(t,e){let r=t.defaults(e);return Object.assign((i,s)=>sp(r,i,s),{defaults:bs.bind(null,r),endpoint:r.endpoint})}var Oy=bs(zr,{headers:{"user-agent":`octokit-graphql.js/${ep} ${Ft()}`},method:"POST",url:"/graphql"});function ol(t){return bs(t,{method:"POST",url:"/graphql"})}var ap=/^v1\./,op=/^ghs_/,up=/^ghu_/;async function lp(t){let e=t.split(/\./).length===3,r=ap.test(t)||op.test(t),n=up.test(t);return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}function cp(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}async function dp(t,e,r,n){let i=e.endpoint.merge(r,n);return i.headers.authorization=cp(t),e(i)}var ul=function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(lp.bind(null,e),{hook:dp.bind(null,e)})};var cl="4.2.4",Yr=class{static defaults(t){return class extends this{constructor(...r){let n=r[0]||{};if(typeof t=="function"){super(t(n));return}super(Object.assign({},t,n,n.userAgent&&t.userAgent?{userAgent:`${n.userAgent} ${t.userAgent}`}:null))}}}static plugin(...t){var e;let r=this.plugins;return e=class extends this{},e.plugins=r.concat(t.filter(i=>!r.includes(i))),e}constructor(t={}){let e=new ll.Collection,r={baseUrl:zr.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},t.request,{hook:e.bind(null,"request")}),mediaType:{previews:[],format:""}};if(r.headers["user-agent"]=[t.userAgent,`octokit-core.js/${cl} ${Ft()}`].filter(Boolean).join(" "),t.baseUrl&&(r.baseUrl=t.baseUrl),t.previews&&(r.mediaType.previews=t.previews),t.timeZone&&(r.headers["time-zone"]=t.timeZone),this.request=zr.defaults(r),this.graphql=ol(this.request).defaults(r),this.log=Object.assign({debug:()=>{},info:()=>{},warn:console.warn.bind(console),error:console.error.bind(console)},t.log),this.hook=e,t.authStrategy){let{authStrategy:i,...s}=t,a=i(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:s},t.auth));e.wrap("request",a.hook),this.auth=a}else if(!t.auth)this.auth=async()=>({type:"unauthenticated"});else{let i=ul(t.auth);e.wrap("request",i.hook),this.auth=i}this.constructor.plugins.forEach(i=>{Object.assign(this,i(this,t))})}};Yr.VERSION=cl;Yr.plugins=[];var vs=W(require("obsidian"));var ys={};ei(ys,{commands:()=>dl,common:()=>hl,default:()=>hp,deletion:()=>fl,error:()=>pl,informations:()=>ml,modals:()=>gl,publish:()=>bl,regex:()=>yl,settings:()=>Dl,statusBar:()=>vl});var dl={checkValidity:{inBranch:{error403:"Error 403: {{- repo.owner}}/{{- repo.repo}} was moved permanently (from {{- branchInfo}}).",error404:"Error 404: The branch {{- branchInfo}} was not found in {{- repo.owner}}/{{- repo.repo}}."},inRepo:{error301:"Error 301: {{- repo.owner}}/{{- repo.repo}} was moved permanently.",error403:"Error 403: this action is forbidden for {{- repo.owner}}/{{- repo.repo}}.",error404:"Error 404: {{- repo.owner}}/{{- repo.repo}}: is not found."},rateLimit:{command:"Check the rate limit of the GitHub API",limited:"You have reached the rate limit of the GitHub API. The limit will be reset at {{- resetTime}}.",notLimited:"You are not rate limited. You can make {{- remaining}} requests before the limit is reset at {{- resetTime}}."},repoExistsTestBranch:"Repository {{- repo.owner}}/{{- repo.repo}} exists. Now testing the {{- main}} branch.",success:"{{- repo.owner}}/{{- repo.repo}} seems to be valid!",title:"Test the connection to the configured repository"},copyLink:{onActivation:"Link copied to your clipboard",title:"Create a link to this note"},publisherDeleteClean:"Purge depublished and deleted files",runOtherRepo:{noFile:"No file is active or the file is not shared",title:"Run command for a repository"},shareActiveFile:"Upload single current active note",shareViewFiles:{default:"Github Publisher: Upload {{- viewFile}}",multiple:{on:"Upload {{- doc}} to {{- smartKey }}",other:"Upload to\u2026"}},uploadAllEditedNote:"Refresh all published notes",uploadAllNewEditedNote:"Refresh published and upload new notes",uploadAllNotes:"Upload all shared notes",uploadNewNotes:"Upload unpublished notes"},hl={add:"Add {{- things}}",after:"After",attachments:"attachments",before:"Before",cancel:"Cancel",close:"Close",default:"default",delete:"Delete {{- things}}",edit:"Edit {{- things}}",error:"Error",files:"files",ghToken:"GitHub Token",here:"here",or:"or",path:{file:"File name",folder:"Folder path",full:"Filepath"},published:"Published",regex:"regex",repository:"Repository",save:"Save",shared:"Shared",text:"text",warning:"Warning"},fl={defaultFolder:"You need a default folder name in the settings to use this command.",failed:"Failed to delete {{- nb}} files.",noFile:"No files have been deleted.",rootFolder:"You need to configure a root folder in the settings to use this command.",success:"Successfully deleted {{- nb}} files."},pl={dataview:"Unable to render dataview query. Please update the dataview plugin to the last version.",errorConfig:"Error configuring {{- repo.owner}}/{{- repo.repo}}. Please check your settings.",errorPublish:"Error during upload to {{- repo.owner}}/{{- repo.repo}}",isEmpty:"{{- what}} is empty.",mergeconflic:"Pull-request is not mergeable, you need to do it manually.",normal:"The 404 error is normal ! It means that the file does not exist yet. Don't worry \u2764\uFE0F.","reading-token-file":"Error: the path seems incorrect.",unablePublishMultiNotes:"Unable to upload multiple notes, something went wrong.",unablePublishNote:"Unable to upload note {{- file}}, skipping it",whatEmpty:{branch:"Branch",owner:"Owner"}},ml={foundNoteToSend:"Found {{- nbNotes}} new notes to send",migrating:{fileReplace:"Migration of filename replace to the new format...",normalFormat:"Migrating settings...",oldSettings:"Migration of old settings to new settings format...",subFolder:"Adding replacing subfolder to the folderpath replacement..."},noNewNote:"No new notes to upload.",scanningRepo:"Scanning the repository, may take a while...",sendMessage:"Upload {{- nbNotes}} notes to {{- repo.owner}}/{{- repo.repo}}",startingClean:"Starting cleaning {{- repo.owner}}/{{- repo.repo}}",successPublishOneNote:"Successfully uploaded {{- file}} to {{- repo.owner}}/{{- repo.repo}}",successfulPublish:"Successfully uploaded {{- nbNotes}} to {{- repo.owner}}/{{- repo.repo}}",waitingWorkflow:"Now, waiting for the workflow to be completed..."},gl={export:{copy:"Copy to clipboard",desc:"Export settings to clipboard or a file.",download:"Download",title:"Export settings"},import:{desc:"Import settings from text or a file. Note : this will overwrite your current settings (except for username, repo name and token).",error:{isEmpty:"the configuration is empty.",span:"Error importing configuration: "},importFromFile:"Import from file",paste:"Paste configuration here...",presets:{desc:'Load presets from the repository "plugin-presets"',title:"Presets"},title:"Import settings"},listChangedFiles:{added:"Added",deleted:"Deleted",edited:"Edited",error:"Errors",notDeleted:"Cannot be deleted",title:"List of files edited in the repository",unpublished:"Cannot be published"}},bl={branch:{alreadyExists:"Branch already exists ({{- branchName}} on {{- repo.owner}}/{{- repo.repo}} - Using it.",error:"Error with {{- repo.owner}}/{{- repo.repo}}: {{- error}}",prMessage:"Pull-Request [{{- branchName}}] from Obsidian",success:"Branch successfully created (status: {{- branchStatus}}) on {{- repo.owner}}/{{- repo.repo}}"}},yl={entry:"Value to replace",replace:"Replacement"},Dl={conversion:{dataview:{desc:"Convert dataview to markdown.",title:"Dataview"},desc:"Theses option won't change the content of the file in your Obsidian Vault, but will change the content of the file in Github.",hardBreak:{desc:"Add a markdown hard line break (double whitespace) after each line.",title:"Markdown hard line break"},links:{desc:'You can prevent links to be converted and keep the alt text (or filename) by using the frontmatter key "links" with the value "false".',folderNote:{desc:"Rename files to a specified name (default: index.md) if it has the same name as their parent folder/category (also works if the note is outside of the folder).",title:"Folder note"},internals:{desc:"Convert internal links to their counterpart in the repository, with relative path.",title:"Internals Links"},nonShared:{desc:"Same option as internals, but for notes that are not yet published. Disabled, only the filename will be conserved.",title:"Convert internal links pointing to unpublished notes"},slugify:{desc:"Standardize the slug of anchor links (pointing to heading title). Transform the slug into all lower case. Replace space with hyphen. Applicable only for anchor links in markdown link syntax.",title:"Sluglify anchor in markdown links"},title:"Links",wikilinks:{desc:"Convert Wikilinks to MDlinks, without changing the contents.",title:"[[Wikilinks]] to [MDlinks](links)"}},sectionTitle:"Main text",tags:{desc:"This will convert any frontmatter or dataview inline field into frontmatter tags. Separate fields with a comma.",exclude:{desc:"This will exclude value from being converted. Separate fields with a comma.",title:"Exclude value from conversion"},inlineTags:{desc:'Add your inline tags in your frontmatter tags field and converting nested tags with replacing "/" with "_"',title:"Inline tags"},title:"Convert frontmatter/dataview field into tags"},title:"Content's conversion"},embed:{defaultImageFolder:{desc:"To use a folder different from default",title:"Default attachment folder"},title:"Embed",transferImage:{desc:"Send attachments embedded in a file to GitHub.",title:"Transfer attachments"},transferMetaFile:{desc:"Set the names of the metadata field you want to use to send files. Separate fields with a comma. Dataview inline field are supported.",title:"Send files using a metadata field"},transferNotes:{desc:"Send embedded notes in a shared file to GitHub. Only shared files will be send!",title:"Transfer embedded notes"}},github:{apiType:{desc:"Choose between the Github API or the Github Enterprise API (only Github Enterprise users \u2014 Advanced user!).",dropdown:{enterprise:"Enterprise",free:"Free/Pro/Team (default)"},hostname:{desc:"The hostname of your Github Enterprise instance.",title:"Github Enterprise Hostname"},title:"API Type"},automaticallyMergePR:"Automatically merge pull requests",branch:{desc:'If you use a different branch than "main"',title:"Main branch"},ghToken:{button:{configDir:": The configuration folder of Obsidian",default:"By default, it will be in:",description:"You can edit the file path where the token will be stored.",pluginID:": The plugin ID",tooltip:"Modify the path of the file containing the token",variables:"You can use the following variables:"},desc:"A GitHub token with repository permission. You can generate it ",error:"The token mustn't be empty!"},repoName:{desc:"The name of the repository where you store your blog.",placeholder:"mkdocs-template",title:"Repository Name"},smartRepo:{button:"Manage more repository",modals:{default:'The name "default" is reserved for your primary configuration.',desc:'These "other repositories" allow you to use all the commands on the repositories added below.',duplicate:"Smartkey must be unique!",frontmatterInfo:'Using the "shortRepo" frontmatter key with the "smartKey" also allows you to use this repository in a file without having to write its path.',newRepo:"a new repository",otherConfig:"Other settings",shortcuts:{desc:"Add all commands for this repository in the command palette",title:"Shortcuts"},title:"Manage others repositories"}},testConnection:"Test connection",title:"GitHub Configuration",username:{desc:"The username or organization hosting the repo in GitHub",title:"GitHub Username"}},githubWorkflow:{autoCleanUp:{desc:"If the plugin must remove from GitHub the depublished files (stop share or deleted)",title:"Auto clean up"},excludedFiles:{desc:'If you want to exclude some folder or file from the autoclean, add them here. You can use regex by surrounding the string with "/". Separate files with a comma.',title:"Excluded files and folder"},githubAction:{desc:'If you want to activate a GitHub action when the plugin push the file, set the name of the file (in your .github/worfklows folder). Only workflow with the "workflow_dispatch" event will be triggered.',title:"Github action name"},prRequest:{desc:"The message send when the pull-request is merged. Will always followed by the pull-request number.",error:"You can't use an empty string here!",title:"Commit message"},useMetadataExtractor:{desc:"Send the files generated by the metadata-extractor plugin in this folder.",title:"Metadata-extractor files"}},help:{frontmatter:{attachment:{folder:"Change the default folder for the attachments",send:"Send all attachments to GitHub"},autoclean:"Disable or enable autocleaning",baselink:{desc:"Change the base link for the copy link command. Also disable the link replacer part. Can be used as an YAML object with the name ",remove:"Remove part of the link. It must be a list!"},convert:{enableOrDisable:"Enable or disable the conversion of links. Disabling this will remove the",syntax:"syntax, while keeping the file name or the alternative text."},dataview:"Convert dataview queries to markdown.",desc:"Moreover, there are some frontmatter YAML keys that can be usefull for your workflow. The YAML code below show the default settings, but feel free to change it to your needs in each notes!",embed:{remove:"Remove the embed from the note, leaving empty line.",send:"Send embedded note to GitHub"},hardBreak:"Convert all linebreaks to markdown \xABhard break\xBB.",internals:"Convert internals links to their counterpart in the website, with relative path. Disabled, the plugin will keep the internal link as is.",mdlinks:"Convert all [[wikilinks]] to [markdown](links)",nonShared:"Convert internal links pointing to a unshared file to their counterpart in the website, with relative path. Disabled, the plugin will keep the filename.",path:"You can override all path settings using this key. The path will be relative to the root of your repository.",repo:{branch:"Branch of the repo",desc:"Change the default repo for the note.",owner:"Owner of the repo"},share:{other:"You could also use another shareKey based on the key set in \xAB Manage other repo \xBB. It allows you to separate your different repository. If the main and secondaries key are used, the main repo will be used.",title:"This key is used to share a note with the plugin."},shortRepo:"Allow to use one of the repo set in other repo settings.",title:"Frontmatter keys cheatsheet",titleKey:"Change the title of the note."},multiRepoHelp:{desc:"If you want to send your notes to multiple repository, you can use the ",desc2:"key in your frontmatter. The value of this key must be a list of repository. Each repository must have the following keys ",exampleDesc:"The YAML code below show an example based on your settings.",title:"Send to multiple repository"},title:"Help",usefulLinks:{discussion:"Discussion",documentation:"Documentation",issue:"Issue",links:"https://obsidian-publisher.netlify.app/",title:"Useful links"}},plugin:{copyLink:{baselink:{desc:"The base link of your website. By default : https://username.github.io/repo/",title:"Base link"},command:{desc:"Add a command to copy the link of the note (need reloading the plugin to take effect)"},desc:"Send a link to your note in your clipboard",linkPathRemover:{desc:"Delete this part of the links created. Separate with a comma if several values are to be deleted.",title:"Deleting part of the link"},title:"Copy link"},editorMenu:{desc:"Add a sharing commands in the right-click menu",title:"Editor Menu"},embedEditRepo:{desc:"Display the editions on the repository",title:"Allows to display the list of edited, added, deleted files... From the main repository (in a modal)."},excludedFolder:{desc:"Never publish file in these folder, regardless of the share key. Separate folder name by comma.",title:"Excluded Folder"},fileMenu:{desc:"Add an sharing commands in the file menu",title:"File Menu"},logNoticeHeader:{desc:"On mobile, it can be hard to debug the plugin. Enable this option to log every error in a Notice.",title:"Notice every error"},shareKey:{desc:"The frontmatter key to publish your file on the website.",otherRepo:"You can also define a share key to separate with others, without using the shortRepo key.",title:"Share Key"},title:"Plugin Settings"},regexReplacing:{empty:"Replacement can be empty to remove the whole string.",forbiddenValue:"The {{- what}} cannont contain the character: {{- forbiddenChar}}",modal:{desc:'Replace text in the file with the given value. Enclose the text with "//" to use regex.',title:{all:"Folder path & filename replacer",only:"Replace filename",text:"Text replacer"}},momentReplaceRegex:"Run replacement {{- moment}} the other plugin conversion (dataview, internals links...)",warningPath:'Warning! Using the character "/" will edit the path, be careful with this option.'},upload:{defaultFolder:{desc:"Set the default reception folder. Let it empty to use the root of the repository.",placeholder:"docs",title:"Default Folder"},folderBehavior:{desc:"Choose the file tree in the repository, with using a frontmatter key, a fixed folder or your Obsidian file tree.",fixedFolder:"Fixed Folder",obsidianPath:"Obsidian Path",title:"File tree in repository",yaml:"YAML frontmatter"},frontmatterKey:{desc:"Set the key where to get the folder's value.",placeholder:"category",title:"Frontmatter key"},regexFilePathTitle:{desc:'If the text is between "//", it will be used as a regex. Otherwise, it will be used as a string.',title:{FolderPathTitle:"Apply edit on the folder path or the filename (automatically)",titleOnly:"Apply edit on the filename (automatically)"}},rootFolder:{desc:"Append this path to the folder set by the frontmatter key",title:"Root folder"},title:"Upload configuration",useFrontmatterTitle:{desc:'Use a frontmatter value to generate the filename. By default, "title" is used. ',title:"Set the key where to get the value of the filename"}}},vl={counter:"{{- msg}}: {{- counter}}/{{- nb}}",markedForSharing:"{{- nb}} {{- type}} marked for sharing",sharing:"\u231BSharing {{- type}}",success:"\u2705 {{- action}} {{- type}}"},hp={commands:dl,common:hl,deletion:fl,error:pl,informations:ml,modals:gl,publish:bl,regex:yl,settings:Dl,statusBar:vl};var Ds={};ei(Ds,{commands:()=>wl,common:()=>Fl,default:()=>fp,deletion:()=>xl,error:()=>El,informations:()=>kl,modals:()=>Cl,publish:()=>Sl,regex:()=>Tl,settings:()=>Ol,statusBar:()=>Pl});var wl={checkValidity:{inBranch:{error403:"Erreur 403: {{- repo.owner}}/{{- repo.repo}} a \xE9t\xE9 d\xE9plac\xE9 de mani\xE8re permanente (depuis {{- branchInfo}}",error404:"Erreur 404 : La branche {{- repo.branch}} est introuvable depuis {{- repo.owner}}/{{- repo.repo}}"},inRepo:{error301:"Erreur 301 : {{- repo.owner}}/{{- repo.repo}} a \xE9t\xE9 d\xE9plac\xE9 de mani\xE8re permanente",error403:"Erreur 403 : Cette action est interdite pour {{- repo.owner}}/{{- repo.repo}}",error404:"Erreur 404 : {{- repo.owner}}/{{- repo.repo}} est introuvable"},rateLimit:{command:"V\xE9rifier la limite de requ\xEAtes de l'API GitHub",limited:"Vous avez atteint la limite de requ\xEAtes Github. La limite sera r\xE9initialis\xE9e \xE0 {{- resetTime}}. minutes.",notLimited:"Vous n'\xEAtes pas limit\xE9 par Github. Vous pouvez encore faire {{- remaining}} requ\xEAtes, et la limite sera r\xE9initialis\xE9e \xE0 {{- resetTime}}."},repoExistsTestBranch:"Le d\xE9p\xF4t {{- repo.owner}}/{{- repo.repo}} existe. Maintenant, nous allons tester la branche {{- repo.branch}}",success:"{{- repo.owner}}/{{- repo.repo}} semble valide !",title:"Tester la connexion au d\xE9p\xF4t configur\xE9"},copyLink:{onActivation:"Lien copi\xE9 dans le presse-papier !",title:"Cr\xE9er un lien vers cette note"},publisherDeleteClean:"Purger les fichiers d\xE9publi\xE9s et supprim\xE9s",runOtherRepo:{noFile:"Aucun fichier actif, ou le fichier n'est pas partag\xE9.",title:"Lancer une commande pour un d\xE9p\xF4t"},shareActiveFile:"Transf\xE9rer la note active",shareViewFiles:{default:"Github Publisher : Transf\xE9rer {{- viewFile}}",multiple:{on:"Transf\xE9rer {{- doc}} vers {{- smartKey }}",other:"Transf\xE9rer vers\u2026"}},uploadAllEditedNote:"Rafra\xEEchir toutes les notes publi\xE9es",uploadAllNewEditedNote:"Rafra\xEEchir les notes publi\xE9es et transf\xE9rer les nouvelles notes",uploadAllNotes:"Transf\xE9rer toutes les notes",uploadNewNotes:"Transf\xE9rer les nouvelles notes"},Fl={add:"Ajouter {{- things}}",after:"Apr\xE8s",attachments:"pi\xE8ces-jointes",before:"Avant",cancel:"Annuler",close:"Fermer",default:"d\xE9faut",delete:"Supprimer {{- things}}",edit:"\xC9diter {{- things}}",error:"Erreur",files:"fichiers",ghToken:"Token GitHub",here:"ici",or:"ou",path:{file:"Nom du fichier",folder:"Chemin du dossier",full:"Chemin du fichier"},published:"publi\xE9s",regex:"regex",repository:"D\xE9p\xF4t",save:"Sauvegarder",shared:"partag\xE9s",text:"texte",warning:"Attention"},xl={defaultFolder:"Vous avez besoin d'un dossier par d\xE9faut dans les param\xE8tres pour utiliser cette commande.",failed:"\xC9chec de la suppression de {{- nb}} notes.",noFile:"Aucun fichier n'a \xE9t\xE9 supprim\xE9.",rootFolder:"Vous devez configurer un dossier racine dans les param\xE8tres pour utiliser cette commande.",success:"Suppression r\xE9ussie de {{- nb}} fichiers."},El={dataview:"Impossible de convertir la requ\xEAte Dataview. Veuillez mettre \xE0 jour le module Dataview \xE0 la derni\xE8re version;",errorConfig:"Erreur de configuration pour {{- repo.owner}}/{{- repo.repo}}:{{- repo.branch}}. Merci de v\xE9rifier vos param\xE8tres.",errorPublish:"Erreur lors de la publication sur {{- repo.owner}}/{{- repo.repo}}:{{- repo.branch}}",isEmpty:"{{- what}} est vide.",mergeconflic:"La Pull-Request n'est pas fusionnable, vous avez besoin de le faire manuellement.",normal:"L'erreur 404 est normale ! Elle signifie que le fichier n'existe pas encore. Ne vous inqui\xE9tez pas \u2764\uFE0F.","reading-token-file":"Erreur : Le chemin est incorrect.",unablePublishMultiNotes:"Impossible de transf\xE9rer plusieurs notes, quelque chose s'est mal pass\xE9.",unablePublishNote:"Impossible de transf\xE9rer {{- file}}, le fichier a \xE9t\xE9 ignor\xE9.",whatEmpty:{branch:"Branch",owner:"Propri\xE9taire"}},kl={foundNoteToSend:"Trouv\xE9 {{- nbNotes}} nouvelles notes \xE0 transf\xE9rer.",migrating:{fileReplace:"Migration du remplacement du nom du fichier au nouveau format...",normalFormat:"Migration des param\xE8tres...",oldSettings:"Migration des anciens param\xE8tres au nouveau format...",subFolder:"Ajout du remplacement du sous-dossier au remplacement de chemin de fichier..."},noNewNote:"Aucune note \xE0 transf\xE9rer.",scanningRepo:"Scan du d\xE9p\xF4t, veuillez patienter...",sendMessage:"Transfert de {{- nbNotes}} notes vers {{- repo.owner}}/{{- repo.repo}}",startingClean:"D\xE9but du nettoyage de {{- repo.owner}}/{{- repo.repo}}",successPublishOneNote:"Transfert r\xE9ussi de {{- file}} vers {{- repo.owner}}/{{- repo.repo}}",successfulPublish:"Transfert r\xE9ussi de {{- nbNotes}} notes vers {{- repo.owner}}/{{- repo.repo}}",waitingWorkflow:"Maintenant, attente de la fin du workflow..."},Cl={export:{copy:"Copier vers le presse-papier",desc:"Exporter les param\xE8tres vers un fichier ou dans le presse-papier.",download:"T\xE9l\xE9charger",title:"Exporter les param\xE8tres"},import:{desc:"Importer des param\xE8tres depuis un fichier ou un texte. Cela \xE9crasera vos param\xE8tres actuels (sauf le nom du d\xE9p\xF4t, le nom d'utilisateur et votre token)",error:{isEmpty:"la configuration est vide",span:"Erreur lors de l'importation de la configuration :"},importFromFile:"Import depuis le fichier",paste:"Coller la configuration ici...",presets:{desc:'Charger des pr\xE9-r\xE9glages du d\xE9p\xF4t "plugin-presets"',title:"Pr\xE9-r\xE9glages"},title:"Importer des param\xE8tres"},listChangedFiles:{added:"Ajout\xE9",deleted:"Supprim\xE9",edited:"Modifi\xE9",error:"Erreurs",notDeleted:"Impossible \xE0 supprimer",title:"Liste des fichiers \xE9dit\xE9s sur le d\xE9p\xF4t",unpublished:"Impossible \xE0 publier"}},Sl={branch:{alreadyExists:"La branche {{- branchName}} sur {{- repo.owner}}/{{- repo.repo}} existe d\xE9j\xE0 - Utilisation de celle-ci.",error:"Erreur avec {{- repo.owner}}/{{- repo.repo}} : {{- error}}",prMessage:"Pull-Request [{{- branchName}}] depuis Obsidian",success:"La branche a \xE9t\xE9 cr\xE9e avec succ\xE8s (status: {{- branchStatus}} sur {{- repo.owner}}/{{- repo.repo}})"}},Tl={entry:"Valeur \xE0 remplacer",replace:"Remplacement"},Ol={conversion:{dataview:{desc:"Convertir les requ\xEAtes Dataview en markdown.",title:"Dataview"},desc:"Ces options ne changent pas le contenu du fichier dans votre coffre Obsidian, mais changeront le contenu du fichier publi\xE9 sur GitHub.",hardBreak:{desc:"Ajoutez un retour \xE0 la ligne Markdown (double espace) apr\xE8s chaque ligne.",title:"Saut de ligne strict"},links:{desc:'Vous pouvez emp\xEAcher la conversion des liens et conserver le texte alt (ou le nom du fichier) en utilisant la cl\xE9 frontmatter "links" avec la valeur "false".',folderNote:{desc:`Renommer les fichiers en un nom sp\xE9cifique (d\xE9faut : "index.md") s'il porte le m\xEAme nom que leur dossier/cat\xE9gorie parent (fonctionne aussi si la note est \xE0 l'ext\xE9rieur du dossier).`,title:"Folder Note"},internals:{desc:"Convertir les liens internes pointant vers les notes publi\xE9es vers leur homologue dans le d\xE9p\xF4t, sous forme de chemin relatif.",title:"Liens internes"},nonShared:{desc:"L'option pr\xE9c\xE9dente, mais appliqu\xE9es aux liens internes pointant vers des notes non-publi\xE9es. D\xE9sactiv\xE9, seul le nom du fichier sera conserv\xE9.",title:"Conversion des liens internes pointant vers des notes non-publi\xE9es"},slugify:{desc:"Normaliser le lien (slug) des liens d'ancrage (pointant vers le titre de la rubrique). Transforme le texte en minuscules. Remplace l'espace par un tiret. Applicable uniquement aux liens d'ancrage dans la syntaxe de lien markdown.",title:"Slugifier l'ancre des liens markdown"},title:"Liens",wikilinks:{desc:"Conversion des liens wikilinks en liens Markdown, sans en modifier le contenu.",title:"Convertir [[WikiLinks]] en [liens](Markdown)"}},sectionTitle:"Texte principal",tags:{desc:"Ceci convertira tous les champs du frontmatter/dataview en tags. S\xE9parez les champs par une virgule.",exclude:{desc:"Exclusion de champs de la conversion. S\xE9parer les valeurs par une virgule.",title:"Exclusion de tags"},inlineTags:{desc:'Ajoute vos inlines tags dans votre bloc frontmatter et converti les tags imbriqu\xE9s en rempla\xE7ant "/" par "_".',title:"Inlines tags"},title:"Convertir des champs dataview ou frontmatter en tags"},title:"Conversion du contenu"},embed:{defaultImageFolder:{desc:"Pour utiliser un dossier diff\xE9rent de celui par d\xE9faut pour les pi\xE8ces-jointes.",title:"Dossier de pi\xE8ces-jointes par d\xE9faut"},title:"Embed",transferImage:{desc:"Transf\xE9rer les pi\xE8ces-jointes",title:"Envoyer les pi\xE8ces-jointes int\xE9gr\xE9es dans un fichier dans le d\xE9p\xF4t."},transferMetaFile:{desc:"Permet d'envoyer des fichiers en utilisant une cl\xE9 frontmatter/dataview. S\xE9parer les champs par une virgule.",title:"Envoyer des fichiers en utilisant une cl\xE9 frontmatter/dataview"},transferNotes:{desc:"Envoyer les notes int\xE9gr\xE9es dans un fichier publi\xE9 dans le d\xE9p\xF4t. Seul les fichiers publi\xE9s seront envoy\xE9s !",title:"Transf\xE9rer les notes int\xE9gr\xE9es"}},github:{apiType:{desc:"Choisir entre l'API GitHub ou l'API pour GitHub Entreprise (uniquement pour les utilisateurs de GitHub Enterprise \u2014 Utilisateur avanc\xE9 !).",dropdown:{enterprise:"Entreprise",free:"Free/Pro/Team (d\xE9faut)"},hostname:{desc:"Le nom de l'instance Github de votre entreprise.",title:"Instance Github Entreprise"},title:"Type d'API"},automaticallyMergePR:"Fusionner automatiquement les pull-request",branch:{desc:'Dans le cas o\xF9 vous souhaitez utiliser une branche diff\xE9rente de "main".',title:"Branche principale"},ghToken:{button:{configDir:" : Le dossier de configuration d'Obsidian",default:"Par d\xE9faut, il sera dans :",description:"Vous pouvez \xE9diter le chemin du fichier dans lequel sera stock\xE9 le token.",pluginID:" : L'ID du plugin",tooltip:"Modifier le chemin du fichier contenant le token",variables:"Vous pouvez utiliser les variables suivantes :"},desc:"Un token GitHub avec autorisation de d\xE9p\xF4t. Vous pouvez le g\xE9n\xE9rer ",error:"Le token ne doit pas \xEAtre vide !"},repoName:{desc:"Le nom du d\xE9p\xF4t dans lequel vos fichiers seront transf\xE9r\xE9s.",placeholder:"mkdocs-template",title:"Nom du d\xE9p\xF4t"},smartRepo:{button:"G\xE9rer plus de d\xE9p\xF4t",modals:{default:'Le nom "default" est r\xE9serv\xE9 pour votre configuration principale.',desc:`Ces "autres d\xE9p\xF4ts" vous permettent d'utiliser toutes les commandes sur les d\xE9p\xF4ts ajout\xE9s ci-dessous.`,duplicate:"Les smartKey doivent \xEAtre uniques !",frontmatterInfo:`L'utilisation de la cl\xE9 frontmatter "shortRepo" avec la "smartKey" permet \xE9galement d'utiliser ce d\xE9p\xF4t dans un fichier sans avoir \xE0 \xE9crire son chemin.`,newRepo:"un nouveau d\xE9p\xF4t",otherConfig:"Autres param\xE8tres",shortcuts:{desc:"Ajoute toutes les commandes de ce d\xE9p\xF4t dans la palette de commandes",title:"Raccourci"},title:"G\xE9rer d'autres d\xE9p\xF4ts"}},testConnection:"Tester la connexion",title:"Configuration GitHub",username:{desc:"Votre username sur GitHub.",title:"Nom d'utilisateur GitHub"}},githubWorkflow:{autoCleanUp:{desc:"Si le plugin doit supprimer de votre d\xE9p\xF4t les fichiers d\xE9publi\xE9s (arr\xEAt du partage ou suppression).",title:"Auto-nettoyage"},excludedFiles:{desc:"Si vous voulez exclure certains dossier ou fichier du nettoyage automatique, d\xE9finissez leur chemin. Les regex sont accept\xE9es en les encadrant par des slashs. S\xE9parer les valeurs par une virgule.",title:"fichiers et dossier exclus"},githubAction:{desc:"Si vous souhaitez activer une action GitHub lorsque le plugin push les fichiers dans le d\xE9p\xF4t, il vous faut indiquer le nom du fichier issus du dossier .github/workflows/. Seules les actions activ\xE9es par un workflow_dispatch sont activ\xE9es.",title:"Nom de l'action GitHub"},prRequest:{desc:"Le message envoy\xE9 lorsque la pull-request est fusionn\xE9e. Sera toujours suivi par le num\xE9ro de la pull-request.",error:"Vous ne pouvez pas utiliser une valeur vide pour le message de commit.",title:"Message de commit"},useMetadataExtractor:{desc:"Envoyer les fichiers g\xE9n\xE9r\xE9s par metadata-extractor dans ce dossier.",title:"Fichier de metadata-extractor"}},help:{frontmatter:{attachment:{folder:"Change le dossier par d\xE9faut pour les pi\xE8ces-jointes.",send:"Envoie toutes les pi\xE8ces-jointes dans le d\xE9p\xF4t GitHub."},autoclean:"D\xE9sactive ou active le nettoyage automatique du d\xE9p\xF4t GitHub.",baselink:{desc:"Change le lien de base pour la commande de copie de lien. D\xE9sactive aussi la suppression de partie de lien. Peut \xEAtre utilis\xE9e en tant qu'objet sous le nom de ",remove:"Supprime les parties de lien. \xC0 mettre sous forme de liste !"},convert:{enableOrDisable:"Active ou d\xE9sactive la conversion des liens. En d\xE9sactivant cette option, vous supprimez les",syntax:"syntaxes, tout en gardant le nom du fichier ou son text alternatif."},dataview:"Convertit les requ\xEAtes dataview en markdown.",desc:"Il existe quelques cl\xE9s YAML qui peuvent vous \xEAtes utile. Le code ci-dessous montre les param\xE8tres par d\xE9faut, mais n'h\xE9sitez pas \xE0 le modifier selon vos besoins pour chaque note !",embed:{remove:"Supprime les notes int\xE9gr\xE9es du fichier partag\xE9s en ne laissant qu'une ligne vide.",send:"Envoie les notes int\xE9gr\xE9es de la note publi\xE9es dans le d\xE9p\xF4t. Seules les notes partag\xE9es seront envoy\xE9es !"},hardBreak:'Convertit tous les sauts de lignes en "hard break" markdown.',internals:"Convertit les liens internes vers leur homologue du d\xE9p\xF4t, sous forme de liens relatifs. D\xE9sactiv\xE9s, les liens seront conserv\xE9s tels quels.",mdlinks:"Convertir tous les liens [[wikilinks]] en [liens](Markdown)",nonShared:"Convertit les liens internes pointant vers une notes non publi\xE9es vers son futur homologue. D\xE9sactiv\xE9, le plugin conservera le nom du fichier ou son texte alternatif.",path:"Vous pouvez \xE9craser tous les param\xE8tres de chemins en utilisant cette cl\xE9. Le chemin sera cr\xE9\xE9e \xE0 partir de la racine du d\xE9p\xF4t.",repo:{branch:"Nom de la branche",desc:"Changer le d\xE9p\xF4t GitHub pour cette note",owner:"Pseudo GitHub du propri\xE9taire du d\xE9p\xF4t"},share:{other:"Vous pouvez \xE9galement utiliser une autre shareKey bas\xE9e sur la cl\xE9 d\xE9finie dans \xAB G\xE9rer plus de d\xE9p\xF4t \xBB. Cela vous permet de s\xE9parer vos diff\xE9rents d\xE9p\xF4ts. Si vous utilisez les cl\xE9s principales et secondaires, le d\xE9p\xF4t principal sera utilis\xE9.",title:"La cl\xE9 utilis\xE9e pour partager une note"},shortRepo:"Autorise l'utilisation de l'un des d\xE9p\xF4ts d\xE9finis dans les param\xE8tres",title:"Aide-m\xE9moire frontmatter",titleKey:"Change le titre de la note"},multiRepoHelp:{desc:"Si vous souhaitez envoyer vos notes dans plusieurs d\xE9p\xF4t en m\xEAme temps, vous pouvez utiliser la cl\xE9 ",desc2:"dans votre frontmatter. La valeur de cette cl\xE9 doit \xEAtre une liste. Chaque d\xE9p\xF4t doit avoir les cl\xE9s suivantes :",exampleDesc:"Le code YAML ci-dessous montre un exemple bas\xE9 sur vos param\xE8tres.",title:"Envoie dans plusieurs d\xE9p\xF4t"},title:"Aide",usefulLinks:{discussion:"Discussion",documentation:"Documentation (en anglais)",issue:"Issue",links:"https://obsidian-publisher.netlify.app",title:"Liens utiles"}},plugin:{copyLink:{baselink:{desc:'Permet de cr\xE9er un lien dans le presse-papier avec cette base. Par d\xE9faut : "https://username.github.io/repo/"',title:"Lien du d\xE9p\xF4t/blog"},command:{desc:"Ajouter une commande permettant de copier le lien de la note publi\xE9e dans le presse-papier (n\xE9cessite de recharger le plugin pour prendre effet)"},desc:"Envoie d'un lien vers la note publi\xE9es dans votre presse-papier.",linkPathRemover:{desc:"Supprimer cette partie des liens cr\xE9\xE9s. S\xE9parer par une virgule si plusieurs valeurs doivent \xEAtre supprim\xE9es.",title:"Suppression d'une partie du lien"},title:"Copie de lien"},editorMenu:{desc:"Ajouter une commande de partage dans le menu du clic droit.",title:'Menu "Edition"'},embedEditRepo:{desc:"Permet d'afficher la liste des fichiers \xE9diter, ajout\xE9, supprim\xE9... Du d\xE9p\xF4t principal (dans un modal).",title:"Afficher les \xE9ditions sur le d\xE9p\xF4t"},excludedFolder:{desc:"Les fichiers dans ses dossiers ne seront jamais publi\xE9s, quelle que soit l'\xE9tat de la cl\xE9 de partage. S\xE9parez les noms de dossier par une virgule.",title:"Dossiers exclus"},fileMenu:{desc:'Ajouter une commande de partage dans le menu "Fichier"',title:'Menu "Fichier"'},logNoticeHeader:{desc:"Sur mobile, il peut \xEAtre difficile de debug le module. Activer cette option pour notifier toutes les erreurs via une notification Obsidian.",title:"Notifier toutes les erreurs"},shareKey:{desc:"Cl\xE9 de partage",otherRepo:"Vous pouvez \xE9galement d\xE9finir une cl\xE9 de partage pour s\xE9parer avec des autres, sans utiliser la cl\xE9 shortRepo.",title:"La cl\xE9 frontmatter pour publier la note sur le d\xE9p\xF4t."},title:"Param\xE8tres du plugin"},regexReplacing:{empty:"Le remplacement peut \xEAtre vide pour supprimer l'ensemble de la cha\xEEne de caract\xE8re.",forbiddenValue:"Le {{- what}} ne peut contenir le caract\xE8re : {{- forbiddenChar}}.",modal:{desc:'Replace des textes dans le fichier par la valeur donn\xE9e. Vous pouvez encadrer le texte \xE0 remplacer avec "//" pour utiliser un regex.',title:{all:"Remplacement du nom ou du chemin du fichier",only:"Remplacement du titre uniquement",text:"Remplacement de texte"}},momentReplaceRegex:"Ex\xE9cuter le remplacement {{- moment}} les autres conversions (dataview, liens internes...)",warningPath:'Attention ! Utiliser le caract\xE8re "/" modifiera le chemin du fichier. Veuillez faire attention avec cette option.'},upload:{defaultFolder:{desc:"D\xE9finir le dossier de r\xE9ception par d\xE9faut. Laisser vide pour utiliser la racine du d\xE9p\xF4t.",placeholder:"docs",title:"Dossier par d\xE9faut"},folderBehavior:{desc:"Choisir la hi\xE9rarchie des dossiers dans le d\xE9p\xF4t, en se basant sur une cl\xE9 frontmatter, un dossier fixe ou la hi\xE9rarchie des dossiers dans Obsidian.",fixedFolder:"Dossier fix\xE9",obsidianPath:"Chemin Obsidian",title:"Hi\xE9rarchie des dossiers",yaml:"Valeur d'une cl\xE9 frontmatter"},frontmatterKey:{desc:"D\xE9finir le nom de la cl\xE9 o\xF9 obtenir le dossier",placeholder:"category",title:"Cl\xE9 frontmatter"},regexFilePathTitle:{desc:'Si le texte est entre "//", il sera interpr\xE9t\xE9 comme une expression r\xE9guli\xE8re. Sinon, il sera interpr\xE9t\xE9 comme du texte brut.',title:{FolderPathTitle:"\xC9diter le titre et le chemin du dossier (automatiquement)",titleOnly:"\xC9diter le titre (automatiquement)"}},rootFolder:{desc:"Ajouter ce chemin au dossier d\xE9finit par la cl\xE9 frontmatter.",title:"Dossier racine"},title:"Configuration du transfert",useFrontmatterTitle:{desc:'Utiliser un champ du frontmatter pour g\xE9n\xE9rer le nom du fichier. Par d\xE9faut, "title" est utilis\xE9.',title:"Utiliser une cl\xE9 frontmatter pour d\xE9finir le titre"}}},Pl={counter:"{{- msg}} : {{- counter}}/{{- nb}}",markedForSharing:"{{- nb}} {{- type}} \xE0 partager",sharing:"\u231BPartage de {{- type}}",success:"\u2705{{- action}} {{- type}}"},fp={commands:wl,common:Fl,deletion:xl,error:El,informations:kl,modals:Cl,publish:Sl,regex:Tl,settings:Ol,statusBar:Pl};var ws={en:{translation:ys},fr:{translation:Ds}},Fs=Object.keys(ws).find(t=>t==vs.moment.locale())?vs.moment.locale():"en";var zn=W(require("obsidian"));var ne=W(require("obsidian"));var Rl=W(require("obsidian"));var Zr=class extends Rl.Modal{constructor(e,r){super(e);this.listChanged=r}displayListOfFile(e,r){if(!e.length)return;let n=r.createEl("ul");e.forEach(i=>{let s="\u2753",a=i.split(".").pop();["md"].includes(a)?s="\u{1F5D2}\uFE0F":[".png",".jpg",".jpeg",".gif",".svg",".webp"].includes(`.${a}`)?s="\u{1F5BC}\uFE0F":[".mp3",".wav",".ogg",".flac",".aac"].includes(`.${a}`)?s="\u{1F3B5}":[".mp4",".avi",".mov",".mkv",".webm"].includes(`.${a}`)?s="\u{1F3A5}":[".pdf"].includes(`.${a}`)&&(s="\u{1F4C4}");let o=n.createEl("li");o.createEl("span",{text:s,cls:"github-publisher emoji"}),o.createEl("code",{text:i,cls:"code-title github-publisher list-changed"})})}onOpen(){let{contentEl:e}=this;e.empty(),e.createEl("h2",{text:l.t("modals.listChangedFiles.title"),cls:"github-publisher title"}),Object.keys(this.listChanged).contains("edited")?(this.listChanged=this.listChanged,e.createEl("h3",{text:`\u{1F4E4} ${l.t("modals.listChangedFiles.added")}`}),this.displayListOfFile(this.listChanged.added,e),e.createEl("h3",{text:`\u2712\uFE0F ${l.t("modals.listChangedFiles.edited")}`}),this.displayListOfFile(this.listChanged.edited,e),e.createEl("h3",{text:`\u{1F5D1}\uFE0F ${l.t("modals.listChangedFiles.deleted")}`}),this.displayListOfFile(this.listChanged.deleted,e),e.createEl("h2",{text:`\u274C ${l.t("modals.listChangedFiles.error")}`,cls:"github-publisher title error"}),e.createEl("h3",{text:`\u{1F4E4} ${l.t("modals.listChangedFiles.unpublished")}`}),this.displayListOfFile(this.listChanged.unpublished,e),e.createEl("h3",{text:`\u267B\uFE0F ${l.t("modals.listChangedFiles.notDeleted")}`}),this.displayListOfFile(this.listChanged.notDeleted,e)):(this.listChanged=this.listChanged,e.createEl("h3",{text:`\u{1F5D1}\uFE0F ${l.t("modals.listChangedFiles.deleted")}`}),this.displayListOfFile(this.listChanged.deleted,e),e.createEl("h3",{text:`\u274C ${l.t("modals.listChangedFiles.error")}`,cls:"github-publisher error"}),e.createEl("h3",{text:`\u267B\uFE0F ${l.t("modals.listChangedFiles.notDeleted")}`}),this.displayListOfFile(this.listChanged.undeleted,e))}onClose(){let{contentEl:e}=this;e.empty()}};function $t(t,e,r,n,i,s,a,o=!0,u,c){return g(this,null,function*(){let d=new Pr(n,a.length);try{let f=0,m=[],y=[];if(a.length>0){let w=a.map(E=>E.name);if(o){if(!Nt(t,e,s,a.length))return!1;yield t.newBranch(i,s)}for(let E=0;E<a.length;E++)try{let L=a[E];d.increment();let D=yield t.publish(L,!1,i,s,c);D&&y.push(...D.uploaded)}catch(L){f++,m.push(a[E].name),new ne.Notice(l.t("error.unablePublishNote",{file:a[E].name}))}d.finish(8e3);let C=`${w.length-f} notes`,k=yield Or(!0,e,r,i,t,s,c);if(e.upload.metadataExtractorPath.length>0&&ne.Platform.isDesktop){let E=yield gi(app,e);E&&(yield t.uploadMetadataExtractorFiles(E,i,s))}if(yield t.updateRepository(i,s)){if(yield yi(t,C,e,s),e.plugin.displayModalRepoEditing){let E=mi(y,k,m);new Zr(u.app,E).open()}}else new ne.Notice(l.t("error.errorPublish",{repo:s}))}}catch(f){console.error(f),new ne.Notice(l.t("error.unablePublishMultiNotes")),d.error()}})}function Hn(t,e,r,n,i,s){return g(this,null,function*(){try{if(new ne.Notice(l.t("informations.startingClean",{repo:i})),!Nt(t,e,i))return!1;yield t.newBranch(n,i);let o=yield Or(!1,e,r,n,t,i,s);yield t.updateRepository(n,i),e.plugin.displayModalRepoEditing&&new Zr(app,o).open()}catch(a){console.error(a)}})}function dt(t,e,r,n,i=null,s,a,o){return g(this,null,function*(){try{let u=s.getFileCache(n).frontmatter,c=Z(r,i,u);if(!(yield Nt(e,r,c)))return!1;yield e.newBranch(t,c);let f=yield e.publish(n,!0,t,c,i,[],!0);if(f){if(r.upload.metadataExtractorPath.length>0&&ne.Platform.isDesktop){let y=yield gi(app,r);y&&(yield e.uploadMetadataExtractorFiles(y,t,c))}if(yield e.updateRepository(t,c)){if(yield yi(e,o,r,c),yield rr(n,c,s,a,r,i),r.plugin.displayModalRepoEditing){let y=mi(f.uploaded,f.deleted,f.error);new Zr(app,y).open()}}else new ne.Notice(l.t("error.errorPublish",{repo:c}))}}catch(u){u instanceof DOMException||(B(u,r),new ne.Notice(l.t("error.errorPublish",{repo:Z(r,i,s.getFileCache(n).frontmatter)})))}})}function Al(t,e,r,n,i,s,a){return g(this,null,function*(){let o=i.settings;new ne.Notice(l.t("informations.scanningRepo"));let u=t.getAllFileWithPath(a),c=yield t.getAllFileFromRepo(s.branch,e,o,s),d=t.getNewFiles(u,c,n);if(d.length>0){new ne.Notice(l.t("informations.foundNoteToSend",{nbNotes:d.length}));let f=i.addStatusBarItem();if(!Nt(t,o,s,d.length))return!1;yield t.newBranch(r,s),yield $t(t,i.settings,e,f,r,s,d,!1,i,a)}else new ne.Notice(l.t("informations.noNewNote"))})}function Nl(t,e,r,n,i,s,a){return g(this,null,function*(){let o=i.settings;new ne.Notice(l.t("informations.scanningRepo"));let u=t.getAllFileWithPath(a),c=yield t.getAllFileFromRepo(s.branch,e,o,s),d=t.getNewFiles(u,c,n),f=yield t.getEditedFiles(u,c,n,d);if(f.length>0){new ne.Notice(l.t("informations.foundNoteToSend",{nbNotes:f.length}));let m=i.addStatusBarItem();if(!Nt(t,o,s,f.length))return!1;yield t.newBranch(r,s),yield $t(t,o,e,m,r,s,f,!1,i,a)}else new ne.Notice(l.t("informations.noNewNote"))})}function Ll(t,e,r,n,i,s,a){return g(this,null,function*(){let o=i.settings;new ne.Notice(l.t("informations.scanningRepo"));let u=t.getAllFileWithPath(a),c=yield t.getAllFileFromRepo(s.branch,e,o,s),d=[],f=yield t.getEditedFiles(u,c,n,d);if(f.length>0){new ne.Notice(l.t("informations.foundNoteToSend",{nbNotes:f.length}));let m=i.addStatusBarItem();if(!Nt(t,o,s,f.length))return!1;yield t.newBranch(r,s),yield $t(t,o,e,m,r,s,f,!1,i,a)}else new ne.Notice(l.t("informations.noNewNote"))})}var Jr=W(require("obsidian"));function Ml(t,e,r){return g(this,null,function*(){let n=r.app.workspace.getActiveFile(),i=n?r.app.metadataCache.getFileCache(n).frontmatter:null;n&&i&&pe(i,r.settings,n,e)?(yield rr(n,Z(r.settings,e,i),r.app.metadataCache,r.app.vault,r.settings,e),new Jr.Notice(l.t("commands.copyLink.onActivation"))):new Jr.Notice(l.t("commands.runOtherRepo.noFile"))})}function Bl(t,e,r){return g(this,null,function*(){var s;let n=t.app.workspace.getActiveFile(),i=n?(s=t.app.metadataCache.getFileCache(n))==null?void 0:s.frontmatter:null;n&&i&&pe(i,t.settings,n,e)?yield dt(r,yield t.reloadOctokit(),t.settings,n,e,t.app.metadataCache,t.app.vault):new Jr.Notice(l.t("commands.runOtherRepo.noFile"))})}function Il(t,e,r){return g(this,null,function*(){let n=Z(t.settings,e),i=yield t.reloadOctokit();yield Hn(i,t.settings,i.octokit,r,n,e)})}function Un(t,e,r){return g(this,null,function*(){let n=t.addStatusBarItem(),i=yield t.reloadOctokit(),s=i.getSharedFiles(e);yield $t(i,t.settings,i.octokit,n,r,Z(t.settings,e),s,!0,t,e)})}function qn(t,e,r){return g(this,null,function*(){let n=yield t.reloadOctokit();yield Al(n,n.octokit,e,t.app.vault,t,Z(t.settings,r),r)})}function jl(t,e,r){return g(this,null,function*(){let n=t.app.workspace.getActiveFile();n?yield Qe(yield t.reloadOctokit(),t.settings,r,n,t.app.metadataCache):new Jr.Notice("No file is active")})}function Wn(t,e,r=null){return g(this,null,function*(){let n=yield t.reloadOctokit();yield Nl(n,n.octokit,e,t.app.vault,t,Z(t.settings,r),r)})}function Kn(t,e,r){return g(this,null,function*(){let n=yield r.reloadOctokit();yield Ll(n,n.octokit,t,r.app.vault,r,Z(r.settings,e),e)})}var xs=class extends zn.FuzzySuggestModal{constructor(e,r,n){super(e);this.plugin=r,this.branchName=n}getItems(){return this.plugin.settings.github.otherRepo}getItemText(e){return e.smartKey}onChooseItem(e,r){new Gl(app,this.plugin,this.branchName,e).open()}},Yn=class extends zn.FuzzySuggestModal{constructor(e,r,n=null,i,s){super(e);this.plugin=r,this.branchName=i,this.keyToFind=n,this.onSubmit=s}getItems(){return this.keyToFind?this.plugin.settings.github.otherRepo.filter(e=>e.shareKey==this.keyToFind):this.plugin.settings.github.otherRepo}getItemText(e){return e.smartKey}onChooseItem(e,r){this.onSubmit(e)}},Gl=class extends zn.FuzzySuggestModal{constructor(e,r,n,i){super(e);this.plugin=r,this.branchName=n,this.repo=i}getItems(){let e=[{commands:"shareAllMarkedNotes",name:l.t("commands.uploadAllNotes")},{commands:"shareOneNote",name:l.t("commands.shareActiveFile")},{commands:"shareNewNote",name:l.t("commands.uploadNewNotes")},{commands:"shareAllEditedNotes",name:l.t("commands.uploadAllNewEditedNote")},{commands:"shareOnlyEdited",name:l.t("commands.uploadAllEditedNote")},{commands:"checkRepositoryValidity",name:l.t("commands.checkValidity.title")}];return this.plugin.settings.plugin.copyLink&&e.push({commands:"createLink",name:l.t("commands.copyLink.title")}),this.plugin.settings.upload.autoclean.enable&&this.plugin.settings.upload.behavior!==U.fixed&&e.push({commands:"deleteUnsharedDeletedNotes",name:l.t("commands.publisherDeleteClean")}),e}getItemText(e){return e.name}onChooseItem(e,r){switch(e.commands){case"shareAllMarkedNotes":Un(this.plugin,this.repo,this.branchName);break;case"deleteUnsharedDeletedNotes":Il(this.plugin,this.repo,this.branchName);break;case"shareNewNote":qn(this.plugin,this.branchName,this.repo);break;case"shareAllEditedNotes":Wn(this.plugin,this.branchName,this.repo);break;case"shareOnlyEdited":Kn(this.branchName,this.repo,this.plugin);break;case"shareOneNote":Bl(this.plugin,this.repo,this.branchName);break;case"createLink":Ml(this.branchName,this.repo,this.plugin);break;case"checkRepositoryValidity":jl(this.plugin,this.branchName,this.repo);break}B(`run command ${e.commands}`,this.plugin.settings)}};var _l=W(require("obsidian"));function Vl(t,e,r){return g(this,null,function*(){let n=t?`publisher-copy-link-K${t.smartKey}`:"publisher-copy-link",i=l.t("common.repository"),s=l.t("commands.copyLink.title");return s=t?`${s} (${i} : ${t.smartKey})`:s,{id:n,name:s,hotkeys:[],checkCallback:a=>{let o=r.app.workspace.getActiveFile(),u=o?r.app.metadataCache.getFileCache(o).frontmatter:null;return o&&u&&pe(u,r.settings,o,t)?(a||(rr(o,Z(r.settings,t,u),r.app.metadataCache,r.app.vault,r.settings,t),new _l.Notice(l.t("commands.copyLink.onActivation"))),!0):!1}}})}function $l(t,e,r){return g(this,null,function*(){let n=e?`publisher-delete-clean-K${e.smartKey}`:"publisher-delete-clean",i=l.t("commands.publisherDeleteClean"),s=l.t("common.repository");return i=e?`${i} (${s} : ${e.smartKey})`:i,{id:n,name:i,hotkeys:[],checkCallback:a=>g(this,null,function*(){if(t.settings.upload.autoclean.enable&&t.settings.upload.behavior!==U.fixed){if(!a){let o=yield t.reloadOctokit();Hn(o,t.settings,o.octokit,r,Z(t.settings,e),e)}return!0}return!1})}})}function Hl(t,e,r){return g(this,null,function*(){let n=t?`publisher-one-K${t.smartKey}`:"publisher-one",i=l.t("commands.shareActiveFile"),s=l.t("common.repository");return i=t?`${i} (${s} : ${t.smartKey})`:i,{id:n,name:i,hotkeys:[],checkCallback:a=>g(this,null,function*(){let o=e.app.workspace.getActiveFile(),u=o?e.app.metadataCache.getFileCache(o).frontmatter:null;return o&&u&&pe(u,e.settings,o,t)?(a||dt(r,yield e.reloadOctokit(),e.settings,o,t,e.app.metadataCache,e.app.vault),!0):!1})}})}function Ul(t,e,r){return g(this,null,function*(){let n=e?`publisher-publish-all-K${e.smartKey}`:"publisher-publish-all",i=l.t("commands.uploadAllNotes"),s=l.t("common.repository");return i=e?`${i} (${s} : ${e.smartKey})`:i,{id:n,name:i,callback:()=>g(this,null,function*(){yield Un(t,e,r)})}})}function ql(t,e,r){return g(this,null,function*(){let n=e?`publisher-upload-new-K${e.smartKey}`:"publisher-upload-new",i=l.t("commands.uploadNewNotes"),s=l.t("common.repository");return i=e?`${i} (${s} : ${e.smartKey})`:i,{id:n,name:i,callback:()=>g(this,null,function*(){yield qn(t,r,e)})}})}function Wl(t,e,r){return g(this,null,function*(){let n=e?`publisher-upload-all-edited-new-K${e.smartKey}`:"publisher-upload-all-edited-new",i=l.t("commands.uploadAllNewEditedNote"),s=l.t("common.repository");return i=e?`${i} (${s} : ${e.smartKey})`:i,{id:n,name:i,callback:()=>g(this,null,function*(){yield Wn(t,r,e)})}})}function Kl(t,e,r){return g(this,null,function*(){let n=t?`publisher-upload-edited-K${t.smartKey}`:"publisher-upload-edited",i=l.t("commands.uploadAllEditedNote"),s=l.t("common.repository");return i=t?`${i} (${s} : ${t.smartKey})`:i,{id:n,name:i,callback:()=>g(this,null,function*(){yield Kn(e,t,r)})}})}function zl(t,e){return g(this,null,function*(){let r=e?`check-plugin-repo-validy-K${e.smartKey}`:"check-plugin-repo-validy",n=l.t("commands.checkValidity.title"),i=l.t("common.repository");return n=e?`${n} (${i} : ${e.smartKey})`:n,{id:r,name:n,checkCallback:s=>g(this,null,function*(){return t.app.workspace.getActiveFile()?(s||(yield Qe(yield t.reloadOctokit(),t.settings,e,t.app.workspace.getActiveFile(),t.app.metadataCache)),!0):!1})}})}var Yl=W(require("obsidian"));function Zn(t,e,r,n){return g(this,null,function*(){let i=yield t.reloadOctokit(),s=t.addStatusBarItem();yield $t(i,t.settings,i.octokit,s,r,Z(t.settings,n),i.getSharedFileOfFolder(e,n),!0,t,n)})}function pp(t,e,r,n){let i=e.setSubmenu();i.addItem(a=>{a.setTitle(l.t("commands.shareViewFiles.multiple.on",{smartKey:l.t("common.default").toUpperCase(),doc:r.name})).setIcon("folder-up").onClick(()=>g(this,null,function*(){let o=mn(t.settings,null);yield Zn(t,r,n,o)}))});let s=t.settings.github.otherRepo.filter(a=>a.createShortcuts);return s.length>0&&s.forEach(a=>{i.addItem(o=>{o.setTitle(l.t("commands.shareViewFiles.multiple.on",{smartKey:a.smartKey.toUpperCase(),doc:r.name})).setIcon("folder-up").onClick(()=>g(this,null,function*(){yield Zn(t,r,n,a)}))})}),i.addItem(a=>{a.setTitle(l.t("commands.shareViewFiles.multiple.other")).setIcon("folder-symlink").onClick(()=>g(this,null,function*(){new Yn(t.app,t,null,n,o=>g(this,null,function*(){yield Zn(t,r,n,o)})).open()}))}),i}function Es(t,e,r,n){let i=e instanceof Yl.TFile?t.app.metadataCache.getFileCache(e).frontmatter:null,s=mn(t.settings,i);pe(i,t.settings,e,s)&&t.settings.plugin.fileMenu&&n.addItem(a=>{var o,u;if(((u=(o=t.settings.github)==null?void 0:o.otherRepo)==null?void 0:u.length)>0)a.setTitle("Github Publisher").setIcon("upload-cloud"),mp(t,a,e,r,s);else{let c=t.getTitleFieldForCommand(e,t.app.metadataCache.getFileCache(e).frontmatter).replace(".md","");a.setTitle(l.t("commands.shareViewFiles.multiple.on",{doc:c,smartKey:l.t("common.default").toUpperCase()})).setIcon("file-up").onClick(()=>g(this,null,function*(){yield dt(r,yield t.reloadOctokit(),t.settings,e,s,t.app.metadataCache,t.app.vault,c)}))}})}function mp(t,e,r,n,i){let s=t.getTitleFieldForCommand(r,t.app.metadataCache.getFileCache(r).frontmatter).replace(".md",""),a=e.setSubmenu();i.shareKey===t.settings.plugin.shareKey&&a.addItem(u=>{u.setTitle(l.t("commands.shareViewFiles.multiple.on",{smartKey:l.t("common.default").toUpperCase(),doc:s})).setIcon("file-up").onClick(()=>g(this,null,function*(){yield dt(n,yield t.reloadOctokit(),t.settings,r,i,t.app.metadataCache,t.app.vault,s)}))});let o=t.settings.github.otherRepo.filter(u=>u.createShortcuts);return o.length>0&&o.forEach(u=>{u.shareKey===i.shareKey&&a.addItem(c=>{c.setTitle(l.t("commands.shareViewFiles.multiple.on",{smartKey:u.smartKey.toUpperCase(),doc:s})).setIcon("file-up").onClick(()=>g(this,null,function*(){yield dt(n,yield t.reloadOctokit(),t.settings,r,u,t.app.metadataCache,t.app.vault,s)}))})}),a.addItem(u=>{u.setTitle(l.t("commands.shareViewFiles.multiple.other")).setIcon("file-input").onClick(()=>g(this,null,function*(){new Yn(t.app,t,i.shareKey,n,c=>g(this,null,function*(){yield dt(n,yield t.reloadOctokit(),t.settings,r,c,t.app.metadataCache,t.app.vault,s)})).open()}))}),a}function Zl(t,e,r,n){return g(this,null,function*(){t.addItem(i=>{var a,o;((o=(a=n.settings.github)==null?void 0:a.otherRepo)==null?void 0:o.length)>0?(i.setTitle("Github Publisher"),i.setIcon("upload-cloud"),pp(n,i,e,r)):(i.setSection("action"),i.setTitle(l.t("commands.shareViewFiles.multiple.on",{smartKey:l.t("common.default").toUpperCase(),doc:e.name})).setIcon("folder-up").onClick(()=>g(this,null,function*(){let u=mn(n.settings,null);yield Zn(n,e,r,u)})))})})}var ks=class extends Jn.Plugin{getTitleFieldForCommand(e,r){return tr(fi(r,e,this.settings),this.settings)}chargeAllCommands(e,r,n){return g(this,null,function*(){r.settings.plugin.copyLink.addCmd&&this.addCommand(yield Vl(e,n,this)),this.addCommand(yield Hl(e,this,n)),this.addCommand(yield $l(this,e,n)),this.addCommand(yield Ul(this,e,n)),this.addCommand(yield ql(this,e,n)),this.addCommand(yield Wl(this,e,n)),this.addCommand(yield Kl(e,n,this)),this.addCommand(yield zl(this,e))})}cleanSpecificCommands(e){let r=this.app.commands.listCommands();for(let n of r)if(n.id.startsWith("obsidian-mkdocs-publisher")){let i=n.id.replace("obsidian-mkdocs-publisher:","").split("-"),s=i[i.length-1];s.startsWith("K")&&e.smartKey===s.replace("K","")&&this.app.commands.removeCommand(n.id)}}cleanOldCommands(){var n,i;let e=(i=(n=this.settings.github)==null?void 0:n.otherRepo)!=null?i:[],r=this.app.commands.listCommands();for(let s of r)if(s.id.startsWith("obsidian-mkdocs-publisher")){let a=s.id.replace("obsidian-mkdocs-publisher:","").split("-"),o=a[a.length-1];o.startsWith("K")&&e.findIndex(c=>c.smartKey===o.replace("K",""))===-1&&this.app.commands.removeCommand(s.id)}}reloadCommands(e){return g(this,null,function*(){var n,i;B("Reloading commands",this.settings);let r=(i=(n=this.settings.github)==null?void 0:n.otherRepo)!=null?i:[];this.cleanOldCommands();for(let s of r)s.createShortcuts?yield this.chargeAllCommands(s,this,e):this.cleanSpecificCommands(s)})}loadToken(){return g(this,null,function*(){let e=nr(this,this.settings.github.tokenPath);if(!(yield this.app.vault.adapter.exists(`${e}`)))return"";try{let n=yield this.app.vault.adapter.read(`${e}`);if(n)return n.split("=")[1]}catch(n){return""}})}reloadOctokit(){return g(this,null,function*(){let e,r=this.settings.github.api,n=yield this.loadToken();return r.tiersForApi===xe.entreprise&&r.hostname.length>0?e=new Yr({baseUrl:`${r.hostname}/api/v3`,auth:n}):e=new Yr({auth:n}),new cs(this.settings,e,this.app.vault,this.app.metadataCache,this)})}onload(){return g(this,null,function*(){console.log(`[GITHUB PUBLISHER] v.${this.manifest.version} (lang: ${Fs}) loaded`),yield l.init({lng:Fs,fallbackLng:"en",resources:ws,returnNull:!1}),yield this.loadSettings();let e=this.settings;yield bn(e,this);let r=app.vault.getName().replaceAll(" ","-").replaceAll(".","-")+"-"+new Date().toLocaleDateString("en-US").replace(/\//g,"-");if(this.addSettingTab(new ki(this.app,this,r)),!this.settings.github.verifiedRepo&&(yield this.loadToken())!==""){let i=yield this.reloadOctokit();this.settings.github.verifiedRepo=yield Qe(i,this.settings,null,null,this.app.metadataCache,!0),this.settings.github.rateLimit=yield _e(i.octokit,this.settings,!1),yield this.saveSettings()}this.registerEvent(this.app.workspace.on("file-menu",(i,s)=>{Es(this,s,r,i)})),this.registerEvent(this.app.workspace.on("file-menu",(i,s)=>{this.settings.plugin.fileMenu&&s instanceof Jn.TFolder&&Zl(i,s,r,this)})),this.registerEvent(this.app.workspace.on("editor-menu",(i,s,a)=>{Es(this,a.file,r,i)})),yield this.chargeAllCommands(null,this,r),this.addCommand({id:"check-rate-limit",name:l.t("commands.checkValidity.rateLimit.command"),callback:()=>g(this,null,function*(){let i=yield this.reloadOctokit();this.settings.github.rateLimit=yield _e(i.octokit,this.settings),yield this.saveSettings()})}),this.settings.github.otherRepo.length>0&&this.addCommand({id:"run-cmd-for-repo",name:l.t("commands.runOtherRepo.title"),callback:()=>g(this,null,function*(){new xs(this.app,this,r).open()})});let n=this.settings.github.otherRepo.filter(i=>i.createShortcuts);for(let i of n)yield this.chargeAllCommands(i,this,r)})}onunload(){console.log("[Github Publisher] unloaded")}loadSettings(){return g(this,null,function*(){this.settings=Object.assign({},Ns,yield this.loadData())})}saveSettings(){return g(this,null,function*(){yield this.saveData(this.settings)})}};0&&(module.exports={});
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/