"use strict";var _c=Object.defineProperty;var pc=(t,e,s)=>e in t?_c(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var Le=(t,e,s)=>pc(t,typeof e!="symbol"?e+"":e,s);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const ca=require("siyuan");function Ct(){}function wc(t,e){for(const s in e)t[s]=e[s];return t}function To(t){return t()}function zr(){return Object.create(null)}function st(t){t.forEach(To)}function Oo(t){return typeof t=="function"}function an(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function bc(t){return Object.keys(t).length===0}function Qs(t,e,s,n){if(t){const i=Yo(t,e,s,n);return t[0](i)}}function Yo(t,e,s,n){return t[1]&&n?wc(s.ctx.slice(),t[1](n(e))):s.ctx}function Xs(t,e,s,n){if(t[2]&&n){const i=t[2](n(s));if(e.dirty===void 0)return i;if(typeof i=="object"){const o=[],f=Math.max(e.dirty.length,i.length);for(let c=0;c32){const e=[],s=t.ctx.length/32;for(let n=0;nt.removeEventListener(e,s,n)}function V(t,e,s){s==null?t.removeAttribute(e):t.getAttribute(e)!==s&&t.setAttribute(e,s)}function Zr(t,e,s){t.setAttributeNS("http://www.w3.org/1999/xlink",e,s)}function pi(t){return t===""?null:+t}function yc(t){return Array.from(t.childNodes)}function Ri(t,e){e=""+e,t.data!==e&&(t.data=e)}function ht(t,e){t.value=e??""}function la(t,e,s,n){s==null?t.style.removeProperty(e):t.style.setProperty(e,s,"")}function Jr(t,e,s){for(let n=0;n{const i=t.$$.callbacks[e];if(i){const o=Dc(e,s,{cancelable:n});return i.slice().forEach(f=>{f.call(t,o)}),!o.defaultPrevented}return!0}}const Vs=[],Qr=[];let zs=[];const Xr=[],Mc=Promise.resolve();let wi=!1;function Sc(){wi||(wi=!0,Mc.then($o))}function wa(t){zs.push(t)}const fi=new Set;let Us=0;function $o(){if(Us!==0)return;const t=Pn;do{try{for(;Ust.indexOf(n)===-1?e.push(n):s.push(n)),s.forEach(n=>n()),zs=e}const ha=new Set;let Ss;function ba(){Ss={r:0,c:[],p:Ss}}function ya(){Ss.r||st(Ss.c),Ss=Ss.p}function P(t,e){t&&t.i&&(ha.delete(t),t.i(e))}function R(t,e,s,n){if(t&&t.o){if(ha.has(t))return;ha.add(t),Ss.c.push(()=>{ha.delete(t),n&&(s&&t.d(1),n())}),t.o(e)}else n&&n()}function ka(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function Yc(t,e){t.d(1),e.delete(t.key)}function Cc(t,e){R(t,1,1,()=>{e.delete(t.key)})}function No(t,e,s,n,i,o,f,c,h,_,k,$){let p=t.length,b=o.length,g=p;const y={};for(;g--;)y[t[g].key]=g;const w=[],H=new Map,be=new Map,v=[];for(g=b;g--;){const S=$(i,o,g),M=s(S);let ye=f.get(M);ye?v.push(()=>ye.p(S,e)):(ye=_(M,S),ye.c()),H.set(M,w[g]=ye),M in y&&be.set(M,Math.abs(g-y[M]))}const T=new Set,ne=new Set;function _e(S){P(S,1),S.m(c,k),f.set(S.key,S),k=S.first,b--}for(;p&&b;){const S=w[b-1],M=t[p-1],ye=S.key,me=M.key;S===M?(k=S.first,p--,b--):H.has(me)?!f.has(ye)||T.has(ye)?_e(S):ne.has(me)?p--:be.get(ye)>be.get(me)?(ne.add(ye),_e(S)):(T.add(me),p--):(h(M,f),p--)}for(;p--;){const S=t[p];H.has(S.key)||h(S,f)}for(;b;)_e(w[b-1]);return st(v),w}function U(t){t&&t.c()}function L(t,e,s){const{fragment:n,after_update:i}=t.$$;n&&n.m(e,s),wa(()=>{const o=t.$$.on_mount.map(To).filter(Oo);t.$$.on_destroy?t.$$.on_destroy.push(...o):st(o),t.$$.on_mount=[]}),i.forEach(wa)}function W(t,e){const s=t.$$;s.fragment!==null&&(Oc(s.after_update),st(s.on_destroy),s.fragment&&s.fragment.d(e),s.on_destroy=s.fragment=null,s.ctx=[])}function $c(t,e){t.$$.dirty[0]===-1&&(Vs.push(t),Sc(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const g=b.length?b[0]:p;return _.ctx&&i(_.ctx[$],_.ctx[$]=g)&&(!_.skip_bound&&_.bound[$]&&_.bound[$](g),k&&$c(t,$)),p}):[],_.update(),k=!0,st(_.before_update),_.fragment=n?n(_.ctx):!1,e.target){if(e.hydrate){const $=yc(e.target);_.fragment&&_.fragment.l($),$.forEach(B)}else _.fragment&&_.fragment.c();e.intro&&P(t.$$.fragment),L(t,e.target,e.anchor),$o()}On(h)}class ln{constructor(){Le(this,"$$");Le(this,"$$set")}$destroy(){W(this,1),this.$destroy=Ct}$on(e,s){if(!Oo(s))return Ct;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(s),()=>{const i=n.indexOf(s);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!bc(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Nc="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Nc);const Kr={id:/^\d{14}-[0-9a-z]{7}$/},dt={embedded:new RegExp("(?<=!\\[\\[).*?(?=]])","g"),tag:new RegExp("(?<=#)[^\\s#].*?(?=\\s|$)","g"),href:/[a-zA-z]+:\/\/\S*/g,backlinks:new RegExp("(?<=\\(\\().*?(?=\\)\\))","g"),mdLink:/\[.*?]\([a-zA-z]+:\/\/\S*\)/g};function Pc(t){let e,s;return{c(){e=qr("svg"),s=qr("use"),Zr(s,"xlink:href",t[0]),V(e,"class",t[2]),V(e,"data-id",t[1]),V(e,"style",t[3]),z(e,"popover__block",Kr.id.test(t[1]))},m(n,i){j(n,e,i),He(e,s)},p(n,[i]){i&1&&Zr(s,"xlink:href",n[0]),i&4&&V(e,"class",n[2]),i&2&&V(e,"data-id",n[1]),i&8&&V(e,"style",n[3]),i&6&&z(e,"popover__block",Kr.id.test(n[1]))},i:Ct,o:Ct,d(n){n&&B(e)}}}function Rc(t,e,s){let{icon:n}=e,{id:i=""}=e,{className:o=""}=e,{style:f=""}=e;return t.$$set=c=>{"icon"in c&&s(0,n=c.icon),"id"in c&&s(1,i=c.id),"className"in c&&s(2,o=c.className),"style"in c&&s(3,f=c.style)},[n,i,o,f]}class Ic extends ln{constructor(e){super(),on(this,e,Rc,Pc,an,{icon:0,id:1,className:2,style:3})}}const xc=t=>({focus:t&1}),eo=t=>({focus:t[0]});function to(t,e,s){const n=t.slice();return n[7]=e[s],n}function so(t,e){let s,n,i,o,f=e[7].text+"",c,h,_,k,$,p;n=new Ic({props:{icon:e[7].icon,className:"b3-list-item__graphic"}});function b(){return e[5](e[7])}return{key:t,first:null,c(){s=$e("li"),U(n.$$.fragment),i=te(),o=$e("span"),c=rn(f),h=te(),V(o,"class","b3-list-item__text"),V(s,"data-name",_=e[7].text),V(s,"class","b3-list-item svelte-1fh5pey"),z(s,"b3-list-item--focus",e[7].key===e[0]),this.first=s},m(g,y){j(g,s,y),L(n,s,null),He(s,i),He(s,o),He(o,c),He(s,h),k=!0,$||(p=[We(s,"click",b),We(s,"keydown",Lc)],$=!0)},p(g,y){e=g;const w={};y&2&&(w.icon=e[7].icon),n.$set(w),(!k||y&2)&&f!==(f=e[7].text+"")&&Ri(c,f),(!k||y&2&&_!==(_=e[7].text))&&V(s,"data-name",_),(!k||y&3)&&z(s,"b3-list-item--focus",e[7].key===e[0])},i(g){k||(P(n.$$.fragment,g),k=!0)},o(g){R(n.$$.fragment,g),k=!1},d(g){g&&B(s),W(n),$=!1,st(p)}}}function Ec(t){let e;return{c(){e=rn("Container")},m(s,n){j(s,e,n)},d(s){s&&B(e)}}}function Fc(t){let e,s,n=[],i=new Map,o,f,c,h=ka(t[1]);const _=b=>b[7].key;for(let b=0;b{};function Wc(t,e,s){let{$$slots:n={},$$scope:i}=e,{panels:o}=e,{focus:f}=e;const c=Co();function h(k){c("changed",{key:k}),s(0,f=k)}const _=k=>h(k.key);return t.$$set=k=>{"panels"in k&&s(1,o=k.panels),"focus"in k&&s(0,f=k.focus),"$$scope"in k&&s(3,i=k.$$scope)},[f,o,h,i,n,_]}class Ac extends ln{constructor(e){super(),on(this,e,Wc,Fc,an,{panels:1,focus:0})}}function Uc(t){let e,s;const n=t[4].default,i=Qs(n,t,t[3],null);return{c(){e=$e("div"),i&&i.c(),V(e,"class","config__tab-container"),V(e,"data-name",t[2]),z(e,"config__tab-container--top",t[1]),z(e,"fn__none",!t[0])},m(o,f){j(o,e,f),i&&i.m(e,null),s=!0},p(o,[f]){i&&i.p&&(!s||f&8)&&Ks(i,n,o,o[3],s?Xs(n,o[3],f,null):en(o[3]),null),(!s||f&4)&&V(e,"data-name",o[2]),(!s||f&2)&&z(e,"config__tab-container--top",o[1]),(!s||f&1)&&z(e,"fn__none",!o[0])},i(o){s||(P(i,o),s=!0)},o(o){R(i,o),s=!1},d(o){o&&B(e),i&&i.d(o)}}}function Hc(t,e,s){let{$$slots:n={},$$scope:i}=e,{display:o=!0}=e,{top:f=!1}=e,{name:c=""}=e;return t.$$set=h=>{"display"in h&&s(0,o=h.display),"top"in h&&s(1,f=h.top),"name"in h&&s(2,c=h.name),"$$scope"in h&&s(3,i=h.$$scope)},[o,f,c,i,n]}class ua extends ln{constructor(e){super(),on(this,e,Hc,Uc,an,{display:0,top:1,name:2})}}const Vc=t=>({}),no=t=>({}),Bc=t=>({}),ao=t=>({}),Gc=t=>({}),io=t=>({}),jc=t=>({}),ro=t=>({});function oo(t){let e,s,n,i,o,f,c;const h=t[8].title,_=Qs(h,t,t[7],ro),k=_||zc(t),$=t[8].text,p=Qs($,t,t[7],io),b=p||qc(t);let g=t[2]&&fo(t),y=!t[2]&&co(t);return{c(){e=$e("label"),s=$e("div"),k&&k.c(),n=te(),i=$e("div"),b&&b.c(),o=te(),g&&g.c(),f=te(),y&&y.c(),V(i,"class","b3-label__text"),V(s,"class","fn__flex-1 svelte-s3t9tw"),z(s,"visible",t[2]),V(e,"class","fn__flex b3-label")},m(w,H){j(w,e,H),He(e,s),k&&k.m(s,null),He(s,n),He(s,i),b&&b.m(i,null),He(s,o),g&&g.m(s,null),He(e,f),y&&y.m(e,null),c=!0},p(w,H){_?_.p&&(!c||H&128)&&Ks(_,h,w,w[7],c?Xs(h,w[7],H,jc):en(w[7]),ro):k&&k.p&&(!c||H&9)&&k.p(w,c?H:-1),p?p.p&&(!c||H&128)&&Ks(p,$,w,w[7],c?Xs($,w[7],H,Gc):en(w[7]),io):b&&b.p&&(!c||H&50)&&b.p(w,c?H:-1),w[2]?g?(g.p(w,H),H&4&&P(g,1)):(g=fo(w),g.c(),P(g,1),g.m(s,null)):g&&(ba(),R(g,1,1,()=>{g=null}),ya()),(!c||H&4)&&z(s,"visible",w[2]),w[2]?y&&(ba(),R(y,1,1,()=>{y=null}),ya()):y?(y.p(w,H),H&4&&P(y,1)):(y=co(w),y.c(),P(y,1),y.m(e,null))},i(w){c||(P(k,w),P(b,w),P(g),P(y),c=!0)},o(w){R(k,w),R(b,w),R(g),R(y),c=!1},d(w){w&&B(e),k&&k.d(w),b&&b.d(w),g&&g.d(),y&&y.d()}}}function lo(t){let e;return{c(){e=$e("span"),e.textContent="*",V(e,"class","required svelte-s3t9tw")},m(s,n){j(s,e,n)},d(s){s&&B(e)}}}function zc(t){let e,s,n,i=t[3]&&lo();return{c(){e=$e("span"),s=te(),i&&i.c(),n=$a()},m(o,f){j(o,e,f),e.innerHTML=t[0],j(o,s,f),i&&i.m(o,f),j(o,n,f)},p(o,f){f&1&&(e.innerHTML=o[0]),o[3]?i||(i=lo(),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(o){o&&(B(e),B(s),B(n)),i&&i.d(o)}}}function uo(t){let e,s=`
请注意:${t[5]}`;return{c(){e=$e("span"),V(e,"class","required svelte-s3t9tw")},m(n,i){j(n,e,i),e.innerHTML=s},p(n,i){i&32&&s!==(s=`
请注意:${n[5]}`)&&(e.innerHTML=s)},d(n){n&&B(e)}}}function qc(t){let e,s,n,i=t[4]&&uo(t);return{c(){e=$e("span"),s=te(),i&&i.c(),n=$a()},m(o,f){j(o,e,f),e.innerHTML=t[1],j(o,s,f),i&&i.m(o,f),j(o,n,f)},p(o,f){f&2&&(e.innerHTML=o[1]),o[4]?i?i.p(o,f):(i=uo(o),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(o){o&&(B(e),B(s),B(n)),i&&i.d(o)}}}function fo(t){let e,s,n;const i=t[8].input,o=Qs(i,t,t[7],ao);return{c(){e=$e("div"),s=te(),o&&o.c(),V(e,"class","fn__hr")},m(f,c){j(f,e,c),j(f,s,c),o&&o.m(f,c),n=!0},p(f,c){o&&o.p&&(!n||c&128)&&Ks(o,i,f,f[7],n?Xs(i,f[7],c,Bc):en(f[7]),ao)},i(f){n||(P(o,f),n=!0)},o(f){R(o,f),n=!1},d(f){f&&(B(e),B(s)),o&&o.d(f)}}}function co(t){let e,s,n;const i=t[8].input,o=Qs(i,t,t[7],no);return{c(){e=$e("span"),s=te(),o&&o.c(),V(e,"class","fn__space")},m(f,c){j(f,e,c),j(f,s,c),o&&o.m(f,c),n=!0},p(f,c){o&&o.p&&(!n||c&128)&&Ks(o,i,f,f[7],n?Xs(i,f[7],c,Vc):en(f[7]),no)},i(f){n||(P(o,f),n=!0)},o(f){R(o,f),n=!1},d(f){f&&(B(e),B(s)),o&&o.d(f)}}}function Zc(t){let e,s,n=t[6]&&oo(t);return{c(){n&&n.c(),e=$a()},m(i,o){n&&n.m(i,o),j(i,e,o),s=!0},p(i,[o]){i[6]?n?(n.p(i,o),o&64&&P(n,1)):(n=oo(i),n.c(),P(n,1),n.m(e.parentNode,e)):n&&(ba(),R(n,1,1,()=>{n=null}),ya())},i(i){s||(P(n),s=!0)},o(i){R(n),s=!1},d(i){i&&B(e),n&&n.d(i)}}}function Jc(t,e,s){let{$$slots:n={},$$scope:i}=e,{title:o=""}=e,{text:f=""}=e,{block:c=!1}=e,{isRequired:h=!1}=e,{isTip:_=!1}=e,{tipTest:k=""}=e,{isShow:$=!0}=e;return t.$$set=p=>{"title"in p&&s(0,o=p.title),"text"in p&&s(1,f=p.text),"block"in p&&s(2,c=p.block),"isRequired"in p&&s(3,h=p.isRequired),"isTip"in p&&s(4,_=p.isTip),"tipTest"in p&&s(5,k=p.tipTest),"isShow"in p&&s(6,$=p.isShow),"$$scope"in p&&s(7,i=p.$$scope)},[o,f,c,h,_,k,$,i,n]}class ke extends ln{constructor(e){super(),on(this,e,Jc,Zc,an,{title:0,text:1,block:2,isRequired:3,isTip:4,tipTest:5,isShow:6})}}var re=(t=>(t[t.checkbox=0]="checkbox",t[t.text=1]="text",t[t.number=2]="number",t[t.slider=3]="slider",t[t.button=4]="button",t[t.select=5]="select",t[t.textarea=6]="textarea",t[t.longText=7]="longText",t))(re||{});function ho(t,e,s){const n=t.slice();return n[21]=e[s],n}function Qc(t){let e,s,n;return{c(){e=$e("textarea"),e.disabled=t[2],V(e,"class","b3-text-field"),V(e,"placeholder",t[5]),z(e,"fn__block",t[3]),z(e,"fn__size200",!t[3]&&t[4]),la(e,"height",t[8]>0?`${t[8]}px`:void 0),la(e,"font-family",t[9]?t[9]:void 0)},m(i,o){j(i,e,o),ht(e,t[0]),s||(n=[We(e,"input",t[19]),We(e,"change",t[11])],s=!0)},p(i,o){o&4&&(e.disabled=i[2]),o&32&&V(e,"placeholder",i[5]),o&65&&ht(e,i[0]),o&8&&z(e,"fn__block",i[3]),o&24&&z(e,"fn__size200",!i[3]&&i[4]),o&256&&la(e,"height",i[8]>0?`${i[8]}px`:void 0),o&512&&la(e,"font-family",i[9]?i[9]:void 0)},d(i){i&&B(e),s=!1,st(n)}}}function Xc(t){let e,s=[],n=new Map,i,o,f=ka(t[6]);const c=h=>h[21].key;for(let h=0;ht[18].call(e)),z(e,"fn__block",t[3]),z(e,"fn__size200",!t[3]&&t[4]),z(e,"fn__flex-center",!t[3])},m(h,_){j(h,e,_);for(let k=0;k{"type"in M&&s(1,n=M.type),"settingKey"in M&&s(12,i=M.settingKey),"settingValue"in M&&s(0,o=M.settingValue),"disabled"in M&&s(2,f=M.disabled),"block"in M&&s(3,c=M.block),"normal"in M&&s(4,h=M.normal),"placeholder"in M&&s(5,_=M.placeholder),"options"in M&&s(6,k=M.options),"limits"in M&&s(7,$=M.limits),"height"in M&&s(8,p=M.height),"fontFamily"in M&&s(9,b=M.fontFamily)},[o,n,f,c,h,_,k,$,p,b,y,w,i,H,be,v,T,ne,_e,S]}class De extends ln{constructor(e){super(),on(this,e,rh,ih,an,{type:1,settingKey:12,settingValue:0,disabled:2,block:3,normal:4,placeholder:5,options:6,limits:7,height:8,fontFamily:9})}}var Po=(t=>(t[t.base=0]="base",t[t.advanced=1]="advanced",t[t.special=2]="special",t[t.debug=3]="debug",t))(Po||{});const jt=[{key:0,text:"基础配置",icon:"#iconSettings"},{key:1,text:"高级配置",icon:"#iconPlugin"},{key:2,text:"过滤配置",icon:"#iconFilter"},{key:3,text:"调试配置",icon:"#iconBug"}];var rt=(t=>(t[t.v0_21_0=0]="v0_21_0",t[t.v0_22_0=1]="v0_22_0",t[t.v0_22_1=2]="v0_22_1",t[t.v0_23_0=3]="v0_23_0",t[t.v0_24_0=4]="v0_24_0",t))(rt||{});const oh=[{key:0,text:"v0.21.0 及以下"},{key:1,text:"v0.22.0"},{key:2,text:"v0.22.1~0.22.5"},{key:3,text:"v0.23.0"},{key:4,text:"v0.24.0 及以上"}];var ot=(t=>(t[t.dailyNotes=0]="dailyNotes",t[t.singleDoc=1]="singleDoc",t[t.sameDoc=2]="sameDoc",t))(ot||{});const Ro=[{key:0,text:"同步至 Daily Notes"},{key:1,text:"同步为单独的文档"},{key:2,text:"同步至同一份文档"}];var ds=(t=>(t[t.desc=0]="desc",t[t.asc=1]="asc",t))(ds||{});const lh=[{key:0,text:"降序"},{key:1,text:"升序"}];var Ii=(t=>(t[t.no=0]="no",t[t.start=1]="start",t))(Ii||{});const uh=[{key:1,text:"启动后检查可同步的数据"},{key:0,text:"禁止检查可同步的数据"}];var ze=(t=>(t[t.all=0]="all",t[t.syncNoTag=1]="syncNoTag",t[t.notSyncNoTag=2]="notSyncNoTag",t[t.syncSpecTag=3]="syncSpecTag",t[t.notSyncSpecTag=4]="notSyncSpecTag",t[t.syncSpecTagAndNoTag=5]="syncSpecTagAndNoTag",t[t.notSyncSpecTagAndNoTag=6]="notSyncSpecTagAndNoTag",t))(ze||{});const fh=[{key:0,text:"同步所有数据"},{key:1,text:"仅同步无标签的数据"},{key:2,text:"不同步无标签的数据"},{key:3,text:"仅同步指定标签的数据"},{key:4,text:"不同步指定标签的数据"},{key:5,text:"同步指定标签及无标签的数据"},{key:6,text:"不同步指定标签及无标签的数据"}],Se={V1:[rt.v0_21_0],V2:[rt.v0_22_0,rt.v0_22_1,rt.v0_23_0,rt.v0_24_0],V2_LabelFilter:[rt.v0_22_1,rt.v0_23_0,rt.v0_24_0],V2_DownloadResourceByName:[rt.v0_22_0],V2_MemosViewFull:[rt.v0_23_0],V2_Y2025_M02_D05:[rt.v0_24_0]},dh=rt.v0_24_0,ch={comment:"COMMENT"},Da="Memos 同步助手",bi="plugin-memos-sync-helper";var zt=(t=>(t[t.waiting=0]="waiting",t[t.downloading=1]="downloading",t[t.completed=2]="completed",t))(zt||{});const Pe=class Pe{static getUseIcon(e){return``}static getIcon(){return{completed:{name:Pe.iconsDict.completed.name,icon:Pe.iconsDict.completed.icon,use:Pe.getUseIcon(Pe.iconsDict.completed.name)},waiting:{name:Pe.iconsDict.waiting.name,icon:Pe.iconsDict.waiting.icon,use:Pe.getUseIcon(Pe.iconsDict.waiting.name)},downloading:{name:Pe.iconsDict.downloading.name,icon:Pe.iconsDict.downloading.icon,use:Pe.getUseIcon(Pe.iconsDict.downloading.name)},default:{name:Pe.iconsDict.completed.name,icon:Pe.iconsDict.completed.icon,use:Pe.getUseIcon(Pe.iconsDict.completed.name)}}}static getIconsString(){let e='',s="";for(const n in Pe.iconsDict)e+=Pe.iconsDict[n].icon;return e+s}};Le(Pe,"iconsDict",{completed:{name:"iconMemosCompleted",icon:''},waiting:{name:"iconMemosWaiting",icon:''},downloading:{name:"iconMemosDownloading",icon:''}});let Os=Pe;async function Fe(t,e){let s=await ca.fetchSyncPost(t,e);return s.code===0?s.data:null}async function Io(){return Fe("/api/notebook/lsNotebooks","")}async function di(t){return Fe("/api/notebook/getNotebookConf",{notebook:t})}async function yi(t,e,s){return Fe("/api/filetree/createDocWithMd",{notebook:t,path:e,markdown:s})}async function hh(t,e){return Fe("/api/filetree/removeDoc",{notebook:t,path:e})}async function mh(t,e){return Fe("/api/filetree/getIDsByHPath",{notebook:t,path:e})}async function ki(t,e,s){return Fe("/api/block/prependBlock",{dataType:t,data:e,parentID:s})}async function ma(t,e,s){return Fe("/api/block/appendBlock",{dataType:t,data:e,parentID:s})}async function gh(t,e,s){return Fe("/api/block/updateBlock",{dataType:t,data:e,id:s})}async function _h(t){return Fe("/api/block/deleteBlock",{id:t})}async function go(t){return Fe("/api/block/getChildBlocks",{id:t})}async function xi(t,e){return Fe("/api/attr/setBlockAttrs",{id:t,attrs:e})}async function ph(t){return Fe("/api/attr/getBlockAttrs",{id:t})}async function ci(t){return Fe("/api/query/sql",{stmt:t})}async function wh(t,e){return Fe("/api/template/render",{id:t,path:e})}async function bh(t){return Fe("/api/template/renderSprig",{template:t})}async function xo(t,e,s){let n=new FormData;return n.append("path",t),n.append("isDir",e.toString()),n.append("modTime",Math.floor(Date.now()/1e3).toString()),n.append("file",s),Fe("/api/file/putFile",n)}async function tt(t,e=7e3){let s={msg:`${Da}:${t}`,timeout:e};return Fe("/api/notification/pushMsg",s)}async function tn(t,e=7e3){let s={msg:`${Da}:${t}`,timeout:e};return Fe("/api/notification/pushErrMsg",s)}const je={GET:"GET",POST:"POST",PUT:"PUT",DELETE:"DELETE"},Eo={OK:200};function K(t){return t==null||t===""}function us(t,e){const s=new Set(t);for(const n of e)if(s.has(n))return!0;return!1}function C(t,e,s,n=!1){t&&(n?console.log(`【${e}】`):K(s)?console.log(`${e}`):(console.log(`${e}:`),console.log(s)))}var Fo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Di={exports:{}};(function(t,e){(function(s,n){var i="1.0.40",o="",f="?",c="function",h="undefined",_="object",k="string",$="major",p="model",b="name",g="type",y="vendor",w="version",H="architecture",be="console",v="mobile",T="tablet",ne="smarttv",_e="wearable",S="embedded",M=500,ye="Amazon",me="Apple",qe="ASUS",nt="BlackBerry",ve="Browser",_t="Chrome",Ze="Edge",Je="Firefox",Qe="Google",It="Huawei",St="LG",Ae="Microsoft",ss="Motorola",ut="Opera",pt="Samsung",wt="Sharp",F="Sony",A="Xiaomi",cn="Zebra",ps="Facebook",hn="Chromium OS",Vn="Mac OS",Bn=" Browser",Ha=function(Z,oe){var J={};for(var ge in Z)oe[ge]&&oe[ge].length%2===0?J[ge]=oe[ge].concat(Z[ge]):J[ge]=Z[ge];return J},Ns=function(Z){for(var oe={},J=0;J0?fe.length===2?typeof fe[1]==c?this[fe[0]]=fe[1].call(this,Xe):this[fe[0]]=fe[1]:fe.length===3?typeof fe[1]===c&&!(fe[1].exec&&fe[1].test)?this[fe[0]]=Xe?fe[1].call(this,Xe,fe[2]):n:this[fe[0]]=Xe?Xe.replace(fe[1],fe[2]):n:fe.length===4&&(this[fe[0]]=Xe?fe[3].call(this,Xe.replace(fe[1],fe[2])):n):this[fe]=Xe||n;J+=2}},Ps=function(Z,oe){for(var J in oe)if(typeof oe[J]===_&&oe[J].length>0){for(var ge=0;ge2&&(q[p]="iPad",q[g]=T),q},this.getEngine=function(){var q={};return q[b]=n,q[w]=n,ws.call(q,ge,it.engine),q},this.getOS=function(){var q={};return q[b]=n,q[w]=n,ws.call(q,ge,it.os),fe&&!q[b]&&ae&&ae.platform&&ae.platform!="Unknown"&&(q[b]=ae.platform.replace(/chrome os/i,hn).replace(/macos/i,Vn)),q},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return ge},this.setUA=function(q){return ge=typeof q===k&&q.length>M?mn(q,M):q,this},this.setUA(ge),this};at.VERSION=i,at.BROWSER=Ns([b,w,$]),at.CPU=Ns([H]),at.DEVICE=Ns([p,y,g,be,v,ne,T,_e,S]),at.ENGINE=at.OS=Ns([b,w]),t.exports&&(e=t.exports=at),e.UAParser=at;var as=typeof s!==h&&(s.jQuery||s.Zepto);if(as&&!as.ua){var bs=new at;as.ua=bs.getResult(),as.ua.get=function(){return bs.getUA()},as.ua.set=function(Z){bs.setUA(Z);var oe=bs.getResult();for(var J in oe)as.ua[J]=oe[J]}}})(typeof window=="object"?window:Fo)})(Di,Di.exports);var yh=Di.exports;const kh=new yh.UAParser,vi=kh.getResult();class Nt{static async removeEmptyValues(e){for(let s in e)K(e[s])&&delete e[s]}static getUrl(e){return`${exports.pluginConfigData.base.host}${e}`}static getHeaders(){return new Headers({"User-Agent":vi.ua,Authorization:`Bearer ${exports.pluginConfigData.base.token}`})}static async get(e,s){await this.removeEmptyValues(s);let n=new URL(this.getUrl(e));return n.search=new URLSearchParams(s).toString(),await fetch(n,{method:je.GET,headers:this.getHeaders()})}static async post(e,s){await this.removeEmptyValues(s);let n=this.getUrl(e);return await fetch(n,{method:je.POST,body:s,headers:this.getHeaders()})}static async put(e,s){await this.removeEmptyValues(s);let n=this.getUrl(e);return await fetch(n,{method:je.PUT,body:s,headers:this.getHeaders()})}static async delete(e,s){await this.removeEmptyValues(s);let n=new URL(this.getUrl(e));return n.search=new URLSearchParams(s).toString(),await fetch(n,{method:je.DELETE,headers:this.getHeaders()})}static async send(e,s,n){let i=null;return e===je.GET?i=await this.get(s,n):e===je.POST?i=await this.post(s,n):e===je.PUT?i=await this.put(s,n):e===je.DELETE&&(i=await this.delete(s,n)),i!==null&&i.status===Eo.OK?await i.json():null}}async function Dh(){return await Nt.send(je.GET,"/api/v1/user/me")}async function vh(t){return await Nt.send(je.GET,"/api/v1/memo",t)}async function Mh(t){return await Nt.get(`/o/r/${t}`)}async function Sh(t){return await Nt.send(je.GET,`/api/v1/memo/${t}`)}function Th(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Wo={exports:{}};(function(t,e){(function(s,n){t.exports=n()})(Fo,function(){var s;function n(){return s.apply(null,arguments)}function i(a){s=a}function o(a){return a instanceof Array||Object.prototype.toString.call(a)==="[object Array]"}function f(a){return a!=null&&Object.prototype.toString.call(a)==="[object Object]"}function c(a,r){return Object.prototype.hasOwnProperty.call(a,r)}function h(a){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(a).length===0;var r;for(r in a)if(c(a,r))return!1;return!0}function _(a){return a===void 0}function k(a){return typeof a=="number"||Object.prototype.toString.call(a)==="[object Number]"}function $(a){return a instanceof Date||Object.prototype.toString.call(a)==="[object Date]"}function p(a,r){var l=[],u,d=a.length;for(u=0;u>>0,u;for(u=0;u0)for(l=0;l=0;return(m?l?"+":"":"-")+Math.pow(10,Math.max(0,d)).toString().substr(1)+u}var ss=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ut=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,pt={},wt={};function F(a,r,l,u){var d=u;typeof u=="string"&&(d=function(){return this[u]()}),a&&(wt[a]=d),r&&(wt[r[0]]=function(){return Ae(d.apply(this,arguments),r[1],r[2])}),l&&(wt[l]=function(){return this.localeData().ordinal(d.apply(this,arguments),a)})}function A(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function cn(a){var r=a.match(ss),l,u;for(l=0,u=r.length;l=0&&ut.test(a);)a=a.replace(ut,u),ut.lastIndex=0,l-=1;return a}var Vn={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Bn(a){var r=this._longDateFormat[a],l=this._longDateFormat[a.toUpperCase()];return r||!l?r:(this._longDateFormat[a]=l.match(ss).map(function(u){return u==="MMMM"||u==="MM"||u==="DD"||u==="dddd"?u.slice(1):u}).join(""),this._longDateFormat[a])}var Ha="Invalid date";function Ns(){return this._invalidDate}var Gn="%d",ns=/\d{1,2}/;function Va(a){return this._ordinal.replace("%d",a)}var mn={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ws(a,r,l,u){var d=this._relativeTime[l];return ve(d)?d(a,r,l,u):d.replace(/%d/i,a)}function Ps(a,r){var l=this._relativeTime[a>0?"future":"past"];return ve(l)?l(r):l.replace(/%s/i,r)}var jn={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Be(a){return typeof a=="string"?jn[a]||jn[a.toLowerCase()]:void 0}function Rs(a){var r={},l,u;for(u in a)c(a,u)&&(l=Be(u),l&&(r[l]=a[u]));return r}var at={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function as(a){var r=[],l;for(l in a)c(a,l)&&r.push({unit:l,priority:at[l]});return r.sort(function(u,d){return u.priority-d.priority}),r}var bs=/\d/,Z=/\d\d/,oe=/\d{3}/,J=/\d{4}/,ge=/[+-]?\d{6}/,ae=/\d\d?/,it=/\d\d\d\d?/,fe=/\d\d\d\d\d\d?/,q=/\d{1,3}/,Xe=/\d{1,4}/,is=/[+-]?\d{1,6}/,xt=/\d+/,zn=/[+-]?\d+/,Il=/Z|[+-]\d\d:?\d\d/gi,qn=/Z|[+-]\d\d(?::?\d\d)?/gi,xl=/[+-]?\d+(\.\d{1,3})?/,gn=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Is=/^[1-9]\d?/,Ba=/^([1-9]\d|\d)/,Zn;Zn={};function x(a,r,l){Zn[a]=ve(r)?r:function(u,d){return u&&l?l:r}}function El(a,r){return c(Zn,a)?Zn[a](r._strict,r._locale):new RegExp(Fl(a))}function Fl(a){return Et(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(r,l,u,d,m){return l||u||d||m}))}function Et(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ft(a){return a<0?Math.ceil(a)||0:Math.floor(a)}function ee(a){var r=+a,l=0;return r!==0&&isFinite(r)&&(l=ft(r)),l}var Ga={};function pe(a,r){var l,u=r,d;for(typeof a=="string"&&(a=[a]),k(r)&&(u=function(m,D){D[r]=ee(m)}),d=a.length,l=0;l68?1900:2e3)};var lr=xs("FullYear",!0);function Ul(){return Jn(this.year())}function xs(a,r){return function(l){return l!=null?(ur(this,a,l),n.updateOffset(this,r),this):wn(this,a)}}function wn(a,r){if(!a.isValid())return NaN;var l=a._d,u=a._isUTC;switch(r){case"Milliseconds":return u?l.getUTCMilliseconds():l.getMilliseconds();case"Seconds":return u?l.getUTCSeconds():l.getSeconds();case"Minutes":return u?l.getUTCMinutes():l.getMinutes();case"Hours":return u?l.getUTCHours():l.getHours();case"Date":return u?l.getUTCDate():l.getDate();case"Day":return u?l.getUTCDay():l.getDay();case"Month":return u?l.getUTCMonth():l.getMonth();case"FullYear":return u?l.getUTCFullYear():l.getFullYear();default:return NaN}}function ur(a,r,l){var u,d,m,D,I;if(!(!a.isValid()||isNaN(l))){switch(u=a._d,d=a._isUTC,r){case"Milliseconds":return void(d?u.setUTCMilliseconds(l):u.setMilliseconds(l));case"Seconds":return void(d?u.setUTCSeconds(l):u.setSeconds(l));case"Minutes":return void(d?u.setUTCMinutes(l):u.setMinutes(l));case"Hours":return void(d?u.setUTCHours(l):u.setHours(l));case"Date":return void(d?u.setUTCDate(l):u.setDate(l));case"FullYear":break;default:return}m=l,D=a.month(),I=a.date(),I=I===29&&D===1&&!Jn(m)?28:I,d?u.setUTCFullYear(m,D,I):u.setFullYear(m,D,I)}}function Hl(a){return a=Be(a),ve(this[a])?this[a]():this}function Vl(a,r){if(typeof a=="object"){a=Rs(a);var l=as(a),u,d=l.length;for(u=0;u=0?(I=new Date(a+400,r,l,u,d,m,D),isFinite(I.getFullYear())&&I.setFullYear(a)):I=new Date(a,r,l,u,d,m,D),I}function bn(a){var r,l;return a<100&&a>=0?(l=Array.prototype.slice.call(arguments),l[0]=a+400,r=new Date(Date.UTC.apply(null,l)),isFinite(r.getUTCFullYear())&&r.setUTCFullYear(a)):r=new Date(Date.UTC.apply(null,arguments)),r}function Qn(a,r,l){var u=7+r-l,d=(7+bn(a,0,u).getUTCDay()-r)%7;return-d+u-1}function gr(a,r,l,u,d){var m=(7+l-u)%7,D=Qn(a,u,d),I=1+7*(r-1)+m+D,Q,ie;return I<=0?(Q=a-1,ie=pn(Q)+I):I>pn(a)?(Q=a+1,ie=I-pn(a)):(Q=a,ie=I),{year:Q,dayOfYear:ie}}function yn(a,r,l){var u=Qn(a.year(),r,l),d=Math.floor((a.dayOfYear()-u-1)/7)+1,m,D;return d<1?(D=a.year()-1,m=d+Wt(D,r,l)):d>Wt(a.year(),r,l)?(m=d-Wt(a.year(),r,l),D=a.year()+1):(D=a.year(),m=d),{week:m,year:D}}function Wt(a,r,l){var u=Qn(a,r,l),d=Qn(a+1,r,l);return(pn(a)-u+d)/7}F("w",["ww",2],"wo","week"),F("W",["WW",2],"Wo","isoWeek"),x("w",ae,Is),x("ww",ae,Z),x("W",ae,Is),x("WW",ae,Z),_n(["w","ww","W","WW"],function(a,r,l,u){r[u.substr(0,1)]=ee(a)});function su(a){return yn(a,this._week.dow,this._week.doy).week}var nu={dow:0,doy:6};function au(){return this._week.dow}function iu(){return this._week.doy}function ru(a){var r=this.localeData().week(this);return a==null?r:this.add((a-r)*7,"d")}function ou(a){var r=yn(this,1,4).week;return a==null?r:this.add((a-r)*7,"d")}F("d",0,"do","day"),F("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),F("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),F("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),F("e",0,0,"weekday"),F("E",0,0,"isoWeekday"),x("d",ae),x("e",ae),x("E",ae),x("dd",function(a,r){return r.weekdaysMinRegex(a)}),x("ddd",function(a,r){return r.weekdaysShortRegex(a)}),x("dddd",function(a,r){return r.weekdaysRegex(a)}),_n(["dd","ddd","dddd"],function(a,r,l,u){var d=l._locale.weekdaysParse(a,u,l._strict);d!=null?r.d=d:w(l).invalidWeekday=a}),_n(["d","e","E"],function(a,r,l,u){r[u]=ee(a)});function lu(a,r){return typeof a!="string"?a:isNaN(a)?(a=r.weekdaysParse(a),typeof a=="number"?a:null):parseInt(a,10)}function uu(a,r){return typeof a=="string"?r.weekdaysParse(a)%7||7:isNaN(a)?null:a}function za(a,r){return a.slice(r,7).concat(a.slice(0,r))}var fu="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),_r="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),du="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),cu=gn,hu=gn,mu=gn;function gu(a,r){var l=o(this._weekdays)?this._weekdays:this._weekdays[a&&a!==!0&&this._weekdays.isFormat.test(r)?"format":"standalone"];return a===!0?za(l,this._week.dow):a?l[a.day()]:l}function _u(a){return a===!0?za(this._weekdaysShort,this._week.dow):a?this._weekdaysShort[a.day()]:this._weekdaysShort}function pu(a){return a===!0?za(this._weekdaysMin,this._week.dow):a?this._weekdaysMin[a.day()]:this._weekdaysMin}function wu(a,r,l){var u,d,m,D=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],u=0;u<7;++u)m=g([2e3,1]).day(u),this._minWeekdaysParse[u]=this.weekdaysMin(m,"").toLocaleLowerCase(),this._shortWeekdaysParse[u]=this.weekdaysShort(m,"").toLocaleLowerCase(),this._weekdaysParse[u]=this.weekdays(m,"").toLocaleLowerCase();return l?r==="dddd"?(d=Ne.call(this._weekdaysParse,D),d!==-1?d:null):r==="ddd"?(d=Ne.call(this._shortWeekdaysParse,D),d!==-1?d:null):(d=Ne.call(this._minWeekdaysParse,D),d!==-1?d:null):r==="dddd"?(d=Ne.call(this._weekdaysParse,D),d!==-1||(d=Ne.call(this._shortWeekdaysParse,D),d!==-1)?d:(d=Ne.call(this._minWeekdaysParse,D),d!==-1?d:null)):r==="ddd"?(d=Ne.call(this._shortWeekdaysParse,D),d!==-1||(d=Ne.call(this._weekdaysParse,D),d!==-1)?d:(d=Ne.call(this._minWeekdaysParse,D),d!==-1?d:null)):(d=Ne.call(this._minWeekdaysParse,D),d!==-1||(d=Ne.call(this._weekdaysParse,D),d!==-1)?d:(d=Ne.call(this._shortWeekdaysParse,D),d!==-1?d:null))}function bu(a,r,l){var u,d,m;if(this._weekdaysParseExact)return wu.call(this,a,r,l);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),u=0;u<7;u++){if(d=g([2e3,1]).day(u),l&&!this._fullWeekdaysParse[u]&&(this._fullWeekdaysParse[u]=new RegExp("^"+this.weekdays(d,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[u]=new RegExp("^"+this.weekdaysShort(d,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[u]=new RegExp("^"+this.weekdaysMin(d,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[u]||(m="^"+this.weekdays(d,"")+"|^"+this.weekdaysShort(d,"")+"|^"+this.weekdaysMin(d,""),this._weekdaysParse[u]=new RegExp(m.replace(".",""),"i")),l&&r==="dddd"&&this._fullWeekdaysParse[u].test(a))return u;if(l&&r==="ddd"&&this._shortWeekdaysParse[u].test(a))return u;if(l&&r==="dd"&&this._minWeekdaysParse[u].test(a))return u;if(!l&&this._weekdaysParse[u].test(a))return u}}function yu(a){if(!this.isValid())return a!=null?this:NaN;var r=wn(this,"Day");return a!=null?(a=lu(a,this.localeData()),this.add(a-r,"d")):r}function ku(a){if(!this.isValid())return a!=null?this:NaN;var r=(this.day()+7-this.localeData()._week.dow)%7;return a==null?r:this.add(a-r,"d")}function Du(a){if(!this.isValid())return a!=null?this:NaN;if(a!=null){var r=uu(a,this.localeData());return this.day(this.day()%7?r:r-7)}else return this.day()||7}function vu(a){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||qa.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=cu),this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex)}function Mu(a){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||qa.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=hu),this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Su(a){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||qa.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=mu),this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function qa(){function a(Ge,Bt){return Bt.length-Ge.length}var r=[],l=[],u=[],d=[],m,D,I,Q,ie;for(m=0;m<7;m++)D=g([2e3,1]).day(m),I=Et(this.weekdaysMin(D,"")),Q=Et(this.weekdaysShort(D,"")),ie=Et(this.weekdays(D,"")),r.push(I),l.push(Q),u.push(ie),d.push(I),d.push(Q),d.push(ie);r.sort(a),l.sort(a),u.sort(a),d.sort(a),this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Za(){return this.hours()%12||12}function Tu(){return this.hours()||24}F("H",["HH",2],0,"hour"),F("h",["hh",2],0,Za),F("k",["kk",2],0,Tu),F("hmm",0,0,function(){return""+Za.apply(this)+Ae(this.minutes(),2)}),F("hmmss",0,0,function(){return""+Za.apply(this)+Ae(this.minutes(),2)+Ae(this.seconds(),2)}),F("Hmm",0,0,function(){return""+this.hours()+Ae(this.minutes(),2)}),F("Hmmss",0,0,function(){return""+this.hours()+Ae(this.minutes(),2)+Ae(this.seconds(),2)});function pr(a,r){F(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),r)})}pr("a",!0),pr("A",!1);function wr(a,r){return r._meridiemParse}x("a",wr),x("A",wr),x("H",ae,Ba),x("h",ae,Is),x("k",ae,Is),x("HH",ae,Z),x("hh",ae,Z),x("kk",ae,Z),x("hmm",it),x("hmmss",fe),x("Hmm",it),x("Hmmss",fe),pe(["H","HH"],xe),pe(["k","kk"],function(a,r,l){var u=ee(a);r[xe]=u===24?0:u}),pe(["a","A"],function(a,r,l){l._isPm=l._locale.isPM(a),l._meridiem=a}),pe(["h","hh"],function(a,r,l){r[xe]=ee(a),w(l).bigHour=!0}),pe("hmm",function(a,r,l){var u=a.length-2;r[xe]=ee(a.substr(0,u)),r[bt]=ee(a.substr(u)),w(l).bigHour=!0}),pe("hmmss",function(a,r,l){var u=a.length-4,d=a.length-2;r[xe]=ee(a.substr(0,u)),r[bt]=ee(a.substr(u,2)),r[Lt]=ee(a.substr(d)),w(l).bigHour=!0}),pe("Hmm",function(a,r,l){var u=a.length-2;r[xe]=ee(a.substr(0,u)),r[bt]=ee(a.substr(u))}),pe("Hmmss",function(a,r,l){var u=a.length-4,d=a.length-2;r[xe]=ee(a.substr(0,u)),r[bt]=ee(a.substr(u,2)),r[Lt]=ee(a.substr(d))});function Ou(a){return(a+"").toLowerCase().charAt(0)==="p"}var Yu=/[ap]\.?m?\.?/i,Cu=xs("Hours",!0);function $u(a,r,l){return a>11?l?"pm":"PM":l?"am":"AM"}var br={calendar:It,longDateFormat:Vn,invalidDate:Ha,ordinal:Gn,dayOfMonthOrdinalParse:ns,relativeTime:mn,months:Gl,monthsShort:fr,week:nu,weekdays:fu,weekdaysMin:du,weekdaysShort:_r,meridiemParse:Yu},Ye={},kn={},Dn;function Nu(a,r){var l,u=Math.min(a.length,r.length);for(l=0;l0;){if(d=Xn(m.slice(0,l).join("-")),d)return d;if(u&&u.length>=l&&Nu(m,u)>=l-1)break;l--}r++}return Dn}function Ru(a){return!!(a&&a.match("^[^/\\\\]*$"))}function Xn(a){var r=null,l;if(Ye[a]===void 0&&t&&t.exports&&Ru(a))try{r=Dn._abbr,l=Th,l("./locale/"+a),rs(r)}catch{Ye[a]=null}return Ye[a]}function rs(a,r){var l;return a&&(_(r)?l=At(a):l=Ja(a,r),l?Dn=l:typeof console<"u"&&console.warn&&console.warn("Locale "+a+" not found. Did you forget to load it?")),Dn._abbr}function Ja(a,r){if(r!==null){var l,u=br;if(r.abbr=a,Ye[a]!=null)nt("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),u=Ye[a]._config;else if(r.parentLocale!=null)if(Ye[r.parentLocale]!=null)u=Ye[r.parentLocale]._config;else if(l=Xn(r.parentLocale),l!=null)u=l._config;else return kn[r.parentLocale]||(kn[r.parentLocale]=[]),kn[r.parentLocale].push({name:a,config:r}),null;return Ye[a]=new Je(Ze(u,r)),kn[a]&&kn[a].forEach(function(d){Ja(d.name,d.config)}),rs(a),Ye[a]}else return delete Ye[a],null}function Iu(a,r){if(r!=null){var l,u,d=br;Ye[a]!=null&&Ye[a].parentLocale!=null?Ye[a].set(Ze(Ye[a]._config,r)):(u=Xn(a),u!=null&&(d=u._config),r=Ze(d,r),u==null&&(r.abbr=a),l=new Je(r),l.parentLocale=Ye[a],Ye[a]=l),rs(a)}else Ye[a]!=null&&(Ye[a].parentLocale!=null?(Ye[a]=Ye[a].parentLocale,a===rs()&&rs(a)):Ye[a]!=null&&delete Ye[a]);return Ye[a]}function At(a){var r;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return Dn;if(!o(a)){if(r=Xn(a),r)return r;a=[a]}return Pu(a)}function xu(){return Qe(Ye)}function Qa(a){var r,l=a._a;return l&&w(a).overflow===-2&&(r=l[Ft]<0||l[Ft]>11?Ft:l[Tt]<1||l[Tt]>ja(l[Ue],l[Ft])?Tt:l[xe]<0||l[xe]>24||l[xe]===24&&(l[bt]!==0||l[Lt]!==0||l[ys]!==0)?xe:l[bt]<0||l[bt]>59?bt:l[Lt]<0||l[Lt]>59?Lt:l[ys]<0||l[ys]>999?ys:-1,w(a)._overflowDayOfYear&&(rTt)&&(r=Tt),w(a)._overflowWeeks&&r===-1&&(r=Wl),w(a)._overflowWeekday&&r===-1&&(r=Al),w(a).overflow=r),a}var Eu=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Fu=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Lu=/Z|[+-]\d\d(?::?\d\d)?/,Kn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Xa=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Wu=/^\/?Date\((-?\d+)/i,Au=/^(?:(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{4}))$/,Uu={UT:0,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 kr(a){var r,l,u=a._i,d=Eu.exec(u)||Fu.exec(u),m,D,I,Q,ie=Kn.length,Ge=Xa.length;if(d){for(w(a).iso=!0,r=0,l=ie;rpn(D)||a._dayOfYear===0)&&(w(a)._overflowDayOfYear=!0),l=bn(D,0,a._dayOfYear),a._a[Ft]=l.getUTCMonth(),a._a[Tt]=l.getUTCDate()),r=0;r<3&&a._a[r]==null;++r)a._a[r]=u[r]=d[r];for(;r<7;r++)a._a[r]=u[r]=a._a[r]==null?r===2?1:0:a._a[r];a._a[xe]===24&&a._a[bt]===0&&a._a[Lt]===0&&a._a[ys]===0&&(a._nextDay=!0,a._a[xe]=0),a._d=(a._useUTC?bn:tu).apply(null,u),m=a._useUTC?a._d.getUTCDay():a._d.getDay(),a._tzm!=null&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[xe]=24),a._w&&typeof a._w.d<"u"&&a._w.d!==m&&(w(a).weekdayMismatch=!0)}}function Zu(a){var r,l,u,d,m,D,I,Q,ie;r=a._w,r.GG!=null||r.W!=null||r.E!=null?(m=1,D=4,l=Es(r.GG,a._a[Ue],yn(Me(),1,4).year),u=Es(r.W,1),d=Es(r.E,1),(d<1||d>7)&&(Q=!0)):(m=a._locale._week.dow,D=a._locale._week.doy,ie=yn(Me(),m,D),l=Es(r.gg,a._a[Ue],ie.year),u=Es(r.w,ie.week),r.d!=null?(d=r.d,(d<0||d>6)&&(Q=!0)):r.e!=null?(d=r.e+m,(r.e<0||r.e>6)&&(Q=!0)):d=m),u<1||u>Wt(l,m,D)?w(a)._overflowWeeks=!0:Q!=null?w(a)._overflowWeekday=!0:(I=gr(l,u,d,m,D),a._a[Ue]=I.year,a._dayOfYear=I.dayOfYear)}n.ISO_8601=function(){},n.RFC_2822=function(){};function ei(a){if(a._f===n.ISO_8601){kr(a);return}if(a._f===n.RFC_2822){Dr(a);return}a._a=[],w(a).empty=!0;var r=""+a._i,l,u,d,m,D,I=r.length,Q=0,ie,Ge;for(d=hn(a._f,a._locale).match(ss)||[],Ge=d.length,l=0;l0&&w(a).unusedInput.push(D),r=r.slice(r.indexOf(u)+u.length),Q+=u.length),wt[m]?(u?w(a).empty=!1:w(a).unusedTokens.push(m),Ll(m,u,a)):a._strict&&!u&&w(a).unusedTokens.push(m);w(a).charsLeftOver=I-Q,r.length>0&&w(a).unusedInput.push(r),a._a[xe]<=12&&w(a).bigHour===!0&&a._a[xe]>0&&(w(a).bigHour=void 0),w(a).parsedDateParts=a._a.slice(0),w(a).meridiem=a._meridiem,a._a[xe]=Ju(a._locale,a._a[xe],a._meridiem),ie=w(a).era,ie!==null&&(a._a[Ue]=a._locale.erasConvertYear(ie,a._a[Ue])),Ka(a),Qa(a)}function Ju(a,r,l){var u;return l==null?r:a.meridiemHour!=null?a.meridiemHour(r,l):(a.isPM!=null&&(u=a.isPM(l),u&&r<12&&(r+=12),!u&&r===12&&(r=0)),r)}function Qu(a){var r,l,u,d,m,D,I=!1,Q=a._f.length;if(Q===0){w(a).invalidFormat=!0,a._d=new Date(NaN);return}for(d=0;dthis?this:a:v()});function Sr(a,r){var l,u;if(r.length===1&&o(r[0])&&(r=r[0]),!r.length)return Me();for(l=r[0],u=1;uthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function bf(){if(!_(this._isDSTShifted))return this._isDSTShifted;var a={},r;return _e(a,this),a=vr(a),a._a?(r=a._isUTC?g(a._a):Me(a._a),this._isDSTShifted=this.isValid()&&ff(a._a,r.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function yf(){return this.isValid()?!this._isUTC:!1}function kf(){return this.isValid()?this._isUTC:!1}function Or(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Df=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,vf=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function yt(a,r){var l=a,u=null,d,m,D;return ta(a)?l={ms:a._milliseconds,d:a._days,M:a._months}:k(a)||!isNaN(+a)?(l={},r?l[r]=+a:l.milliseconds=+a):(u=Df.exec(a))?(d=u[1]==="-"?-1:1,l={y:0,d:ee(u[Tt])*d,h:ee(u[xe])*d,m:ee(u[bt])*d,s:ee(u[Lt])*d,ms:ee(ti(u[ys]*1e3))*d}):(u=vf.exec(a))?(d=u[1]==="-"?-1:1,l={y:ks(u[2],d),M:ks(u[3],d),w:ks(u[4],d),d:ks(u[5],d),h:ks(u[6],d),m:ks(u[7],d),s:ks(u[8],d)}):l==null?l={}:typeof l=="object"&&("from"in l||"to"in l)&&(D=Mf(Me(l.from),Me(l.to)),l={},l.ms=D.milliseconds,l.M=D.months),m=new ea(l),ta(a)&&c(a,"_locale")&&(m._locale=a._locale),ta(a)&&c(a,"_isValid")&&(m._isValid=a._isValid),m}yt.fn=ea.prototype,yt.invalid=uf;function ks(a,r){var l=a&&parseFloat(a.replace(",","."));return(isNaN(l)?0:l)*r}function Yr(a,r){var l={};return l.months=r.month()-a.month()+(r.year()-a.year())*12,a.clone().add(l.months,"M").isAfter(r)&&--l.months,l.milliseconds=+r-+a.clone().add(l.months,"M"),l}function Mf(a,r){var l;return a.isValid()&&r.isValid()?(r=ni(r,a),a.isBefore(r)?l=Yr(a,r):(l=Yr(r,a),l.milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0}}function Cr(a,r){return function(l,u){var d,m;return u!==null&&!isNaN(+u)&&(nt(r,"moment()."+r+"(period, number) is deprecated. Please use moment()."+r+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),m=l,l=u,u=m),d=yt(l,u),$r(this,d,a),this}}function $r(a,r,l,u){var d=r._milliseconds,m=ti(r._days),D=ti(r._months);a.isValid()&&(u=u??!0,D&&cr(a,wn(a,"Month")+D*l),m&&ur(a,"Date",wn(a,"Date")+m*l),d&&a._d.setTime(a._d.valueOf()+d*l),u&&n.updateOffset(a,m||D))}var Sf=Cr(1,"add"),Tf=Cr(-1,"subtract");function Nr(a){return typeof a=="string"||a instanceof String}function Of(a){return M(a)||$(a)||Nr(a)||k(a)||Cf(a)||Yf(a)||a===null||a===void 0}function Yf(a){var r=f(a)&&!h(a),l=!1,u=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],d,m,D=u.length;for(d=0;dl.valueOf():l.valueOf()9999?ps(l,r?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ve(Date.prototype.toISOString)?r?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ps(l,"Z")):ps(l,r?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Vf(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var a="moment",r="",l,u,d,m;return this.isLocal()||(a=this.utcOffset()===0?"moment.utc":"moment.parseZone",r="Z"),l="["+a+'("]',u=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",d="-MM-DD[T]HH:mm:ss.SSS",m=r+'[")]',this.format(l+u+d+m)}function Bf(a){a||(a=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var r=ps(this,a);return this.localeData().postformat(r)}function Gf(a,r){return this.isValid()&&(M(a)&&a.isValid()||Me(a).isValid())?yt({to:this,from:a}).locale(this.locale()).humanize(!r):this.localeData().invalidDate()}function jf(a){return this.from(Me(),a)}function zf(a,r){return this.isValid()&&(M(a)&&a.isValid()||Me(a).isValid())?yt({from:this,to:a}).locale(this.locale()).humanize(!r):this.localeData().invalidDate()}function qf(a){return this.to(Me(),a)}function Pr(a){var r;return a===void 0?this._locale._abbr:(r=At(a),r!=null&&(this._locale=r),this)}var Rr=me("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return a===void 0?this.localeData():this.locale(a)});function Ir(){return this._locale}var na=1e3,Fs=60*na,aa=60*Fs,xr=(365*400+97)*24*aa;function Ls(a,r){return(a%r+r)%r}function Er(a,r,l){return a<100&&a>=0?new Date(a+400,r,l)-xr:new Date(a,r,l).valueOf()}function Fr(a,r,l){return a<100&&a>=0?Date.UTC(a+400,r,l)-xr:Date.UTC(a,r,l)}function Zf(a){var r,l;if(a=Be(a),a===void 0||a==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Fr:Er,a){case"year":r=l(this.year(),0,1);break;case"quarter":r=l(this.year(),this.month()-this.month()%3,1);break;case"month":r=l(this.year(),this.month(),1);break;case"week":r=l(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":r=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":r=l(this.year(),this.month(),this.date());break;case"hour":r=this._d.valueOf(),r-=Ls(r+(this._isUTC?0:this.utcOffset()*Fs),aa);break;case"minute":r=this._d.valueOf(),r-=Ls(r,Fs);break;case"second":r=this._d.valueOf(),r-=Ls(r,na);break}return this._d.setTime(r),n.updateOffset(this,!0),this}function Jf(a){var r,l;if(a=Be(a),a===void 0||a==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Fr:Er,a){case"year":r=l(this.year()+1,0,1)-1;break;case"quarter":r=l(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":r=l(this.year(),this.month()+1,1)-1;break;case"week":r=l(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":r=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":r=l(this.year(),this.month(),this.date()+1)-1;break;case"hour":r=this._d.valueOf(),r+=aa-Ls(r+(this._isUTC?0:this.utcOffset()*Fs),aa)-1;break;case"minute":r=this._d.valueOf(),r+=Fs-Ls(r,Fs)-1;break;case"second":r=this._d.valueOf(),r+=na-Ls(r,na)-1;break}return this._d.setTime(r),n.updateOffset(this,!0),this}function Qf(){return this._d.valueOf()-(this._offset||0)*6e4}function Xf(){return Math.floor(this.valueOf()/1e3)}function Kf(){return new Date(this.valueOf())}function ed(){var a=this;return[a.year(),a.month(),a.date(),a.hour(),a.minute(),a.second(),a.millisecond()]}function td(){var a=this;return{years:a.year(),months:a.month(),date:a.date(),hours:a.hours(),minutes:a.minutes(),seconds:a.seconds(),milliseconds:a.milliseconds()}}function sd(){return this.isValid()?this.toISOString():null}function nd(){return be(this)}function ad(){return b({},w(this))}function id(){return w(this).overflow}function rd(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}F("N",0,0,"eraAbbr"),F("NN",0,0,"eraAbbr"),F("NNN",0,0,"eraAbbr"),F("NNNN",0,0,"eraName"),F("NNNNN",0,0,"eraNarrow"),F("y",["y",1],"yo","eraYear"),F("y",["yy",2],0,"eraYear"),F("y",["yyy",3],0,"eraYear"),F("y",["yyyy",4],0,"eraYear"),x("N",ii),x("NN",ii),x("NNN",ii),x("NNNN",pd),x("NNNNN",wd),pe(["N","NN","NNN","NNNN","NNNNN"],function(a,r,l,u){var d=l._locale.erasParse(a,u,l._strict);d?w(l).era=d:w(l).invalidEra=a}),x("y",xt),x("yy",xt),x("yyy",xt),x("yyyy",xt),x("yo",bd),pe(["y","yy","yyy","yyyy"],Ue),pe(["yo"],function(a,r,l,u){var d;l._locale._eraYearOrdinalRegex&&(d=a.match(l._locale._eraYearOrdinalRegex)),l._locale.eraYearOrdinalParse?r[Ue]=l._locale.eraYearOrdinalParse(a,d):r[Ue]=parseInt(a,10)});function od(a,r){var l,u,d,m=this._eras||At("en")._eras;for(l=0,u=m.length;l=0)return m[u]}function ud(a,r){var l=a.since<=a.until?1:-1;return r===void 0?n(a.since).year():n(a.since).year()+(r-a.offset)*l}function fd(){var a,r,l,u=this.localeData().eras();for(a=0,r=u.length;am&&(r=m),Td.call(this,a,r,l,u,d))}function Td(a,r,l,u,d){var m=gr(a,r,l,u,d),D=bn(m.year,0,m.dayOfYear);return this.year(D.getUTCFullYear()),this.month(D.getUTCMonth()),this.date(D.getUTCDate()),this}F("Q",0,"Qo","quarter"),x("Q",bs),pe("Q",function(a,r){r[Ft]=(ee(a)-1)*3});function Od(a){return a==null?Math.ceil((this.month()+1)/3):this.month((a-1)*3+this.month()%3)}F("D",["DD",2],"Do","date"),x("D",ae,Is),x("DD",ae,Z),x("Do",function(a,r){return a?r._dayOfMonthOrdinalParse||r._ordinalParse:r._dayOfMonthOrdinalParseLenient}),pe(["D","DD"],Tt),pe("Do",function(a,r){r[Tt]=ee(a.match(ae)[0])});var Wr=xs("Date",!0);F("DDD",["DDDD",3],"DDDo","dayOfYear"),x("DDD",q),x("DDDD",oe),pe(["DDD","DDDD"],function(a,r,l){l._dayOfYear=ee(a)});function Yd(a){var r=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return a==null?r:this.add(a-r,"d")}F("m",["mm",2],0,"minute"),x("m",ae,Ba),x("mm",ae,Z),pe(["m","mm"],bt);var Cd=xs("Minutes",!1);F("s",["ss",2],0,"second"),x("s",ae,Ba),x("ss",ae,Z),pe(["s","ss"],Lt);var $d=xs("Seconds",!1);F("S",0,0,function(){return~~(this.millisecond()/100)}),F(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),F(0,["SSS",3],0,"millisecond"),F(0,["SSSS",4],0,function(){return this.millisecond()*10}),F(0,["SSSSS",5],0,function(){return this.millisecond()*100}),F(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),F(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),F(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),F(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),x("S",q,bs),x("SS",q,Z),x("SSS",q,oe);var os,Ar;for(os="SSSS";os.length<=9;os+="S")x(os,xt);function Nd(a,r){r[ys]=ee(("0."+a)*1e3)}for(os="S";os.length<=9;os+="S")pe(os,Nd);Ar=xs("Milliseconds",!1),F("z",0,0,"zoneAbbr"),F("zz",0,0,"zoneName");function Pd(){return this._isUTC?"UTC":""}function Rd(){return this._isUTC?"Coordinated Universal Time":""}var O=S.prototype;O.add=Sf,O.calendar=Pf,O.clone=Rf,O.diff=Af,O.endOf=Jf,O.format=Bf,O.from=Gf,O.fromNow=jf,O.to=zf,O.toNow=qf,O.get=Hl,O.invalidAt=id,O.isAfter=If,O.isBefore=xf,O.isBetween=Ef,O.isSame=Ff,O.isSameOrAfter=Lf,O.isSameOrBefore=Wf,O.isValid=nd,O.lang=Rr,O.locale=Pr,O.localeData=Ir,O.max=sf,O.min=tf,O.parsingFlags=ad,O.set=Vl,O.startOf=Zf,O.subtract=Tf,O.toArray=ed,O.toObject=td,O.toDate=Kf,O.toISOString=Hf,O.inspect=Vf,typeof Symbol<"u"&&Symbol.for!=null&&(O[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),O.toJSON=sd,O.toString=Uf,O.unix=Xf,O.valueOf=Qf,O.creationData=rd,O.eraName=fd,O.eraNarrow=dd,O.eraAbbr=cd,O.eraYear=hd,O.year=lr,O.isLeapYear=Ul,O.weekYear=yd,O.isoWeekYear=kd,O.quarter=O.quarters=Od,O.month=hr,O.daysInMonth=Xl,O.week=O.weeks=ru,O.isoWeek=O.isoWeeks=ou,O.weeksInYear=Md,O.weeksInWeekYear=Sd,O.isoWeeksInYear=Dd,O.isoWeeksInISOWeekYear=vd,O.date=Wr,O.day=O.days=yu,O.weekday=ku,O.isoWeekday=Du,O.dayOfYear=Yd,O.hour=O.hours=Cu,O.minute=O.minutes=Cd,O.second=O.seconds=$d,O.millisecond=O.milliseconds=Ar,O.utcOffset=cf,O.utc=mf,O.local=gf,O.parseZone=_f,O.hasAlignedHourOffset=pf,O.isDST=wf,O.isLocal=yf,O.isUtcOffset=kf,O.isUtc=Or,O.isUTC=Or,O.zoneAbbr=Pd,O.zoneName=Rd,O.dates=me("dates accessor is deprecated. Use date instead.",Wr),O.months=me("months accessor is deprecated. Use month instead",hr),O.years=me("years accessor is deprecated. Use year instead",lr),O.zone=me("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",hf),O.isDSTShifted=me("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",bf);function Id(a){return Me(a*1e3)}function xd(){return Me.apply(null,arguments).parseZone()}function Ur(a){return a}var de=Je.prototype;de.calendar=St,de.longDateFormat=Bn,de.invalidDate=Ns,de.ordinal=Va,de.preparse=Ur,de.postformat=Ur,de.relativeTime=ws,de.pastFuture=Ps,de.set=_t,de.eras=od,de.erasParse=ld,de.erasConvertYear=ud,de.erasAbbrRegex=gd,de.erasNameRegex=md,de.erasNarrowRegex=_d,de.months=ql,de.monthsShort=Zl,de.monthsParse=Ql,de.monthsRegex=eu,de.monthsShortRegex=Kl,de.week=su,de.firstDayOfYear=iu,de.firstDayOfWeek=au,de.weekdays=gu,de.weekdaysMin=pu,de.weekdaysShort=_u,de.weekdaysParse=bu,de.weekdaysRegex=vu,de.weekdaysShortRegex=Mu,de.weekdaysMinRegex=Su,de.isPM=Ou,de.meridiem=$u;function ra(a,r,l,u){var d=At(),m=g().set(u,r);return d[l](m,a)}function Hr(a,r,l){if(k(a)&&(r=a,a=void 0),a=a||"",r!=null)return ra(a,r,l,"month");var u,d=[];for(u=0;u<12;u++)d[u]=ra(a,u,l,"month");return d}function oi(a,r,l,u){typeof a=="boolean"?(k(r)&&(l=r,r=void 0),r=r||""):(r=a,l=r,a=!1,k(r)&&(l=r,r=void 0),r=r||"");var d=At(),m=a?d._week.dow:0,D,I=[];if(l!=null)return ra(r,(l+m)%7,u,"day");for(D=0;D<7;D++)I[D]=ra(r,(D+m)%7,u,"day");return I}function Ed(a,r){return Hr(a,r,"months")}function Fd(a,r){return Hr(a,r,"monthsShort")}function Ld(a,r,l){return oi(a,r,l,"weekdays")}function Wd(a,r,l){return oi(a,r,l,"weekdaysShort")}function Ad(a,r,l){return oi(a,r,l,"weekdaysMin")}rs("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var r=a%10,l=ee(a%100/10)===1?"th":r===1?"st":r===2?"nd":r===3?"rd":"th";return a+l}}),n.lang=me("moment.lang is deprecated. Use moment.locale instead.",rs),n.langData=me("moment.langData is deprecated. Use moment.localeData instead.",At);var Ut=Math.abs;function Ud(){var a=this._data;return this._milliseconds=Ut(this._milliseconds),this._days=Ut(this._days),this._months=Ut(this._months),a.milliseconds=Ut(a.milliseconds),a.seconds=Ut(a.seconds),a.minutes=Ut(a.minutes),a.hours=Ut(a.hours),a.months=Ut(a.months),a.years=Ut(a.years),this}function Vr(a,r,l,u){var d=yt(r,l);return a._milliseconds+=u*d._milliseconds,a._days+=u*d._days,a._months+=u*d._months,a._bubble()}function Hd(a,r){return Vr(this,a,r,1)}function Vd(a,r){return Vr(this,a,r,-1)}function Br(a){return a<0?Math.floor(a):Math.ceil(a)}function Bd(){var a=this._milliseconds,r=this._days,l=this._months,u=this._data,d,m,D,I,Q;return a>=0&&r>=0&&l>=0||a<=0&&r<=0&&l<=0||(a+=Br(li(l)+r)*864e5,r=0,l=0),u.milliseconds=a%1e3,d=ft(a/1e3),u.seconds=d%60,m=ft(d/60),u.minutes=m%60,D=ft(m/60),u.hours=D%24,r+=ft(D/24),Q=ft(Gr(r)),l+=Q,r-=Br(li(Q)),I=ft(l/12),l%=12,u.days=r,u.months=l,u.years=I,this}function Gr(a){return a*4800/146097}function li(a){return a*146097/4800}function Gd(a){if(!this.isValid())return NaN;var r,l,u=this._milliseconds;if(a=Be(a),a==="month"||a==="quarter"||a==="year")switch(r=this._days+u/864e5,l=this._months+Gr(r),a){case"month":return l;case"quarter":return l/3;case"year":return l/12}else switch(r=this._days+Math.round(li(this._months)),a){case"week":return r/7+u/6048e5;case"day":return r+u/864e5;case"hour":return r*24+u/36e5;case"minute":return r*1440+u/6e4;case"second":return r*86400+u/1e3;case"millisecond":return Math.floor(r*864e5)+u;default:throw new Error("Unknown unit "+a)}}function Ht(a){return function(){return this.as(a)}}var jr=Ht("ms"),jd=Ht("s"),zd=Ht("m"),qd=Ht("h"),Zd=Ht("d"),Jd=Ht("w"),Qd=Ht("M"),Xd=Ht("Q"),Kd=Ht("y"),ec=jr;function tc(){return yt(this)}function sc(a){return a=Be(a),this.isValid()?this[a+"s"]():NaN}function Ds(a){return function(){return this.isValid()?this._data[a]:NaN}}var nc=Ds("milliseconds"),ac=Ds("seconds"),ic=Ds("minutes"),rc=Ds("hours"),oc=Ds("days"),lc=Ds("months"),uc=Ds("years");function fc(){return ft(this.days()/7)}var Vt=Math.round,Ws={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function dc(a,r,l,u,d){return d.relativeTime(r||1,!!l,a,u)}function cc(a,r,l,u){var d=yt(a).abs(),m=Vt(d.as("s")),D=Vt(d.as("m")),I=Vt(d.as("h")),Q=Vt(d.as("d")),ie=Vt(d.as("M")),Ge=Vt(d.as("w")),Bt=Vt(d.as("y")),ls=m<=l.ss&&["s",m]||m0,ls[4]=u,dc.apply(null,ls)}function hc(a){return a===void 0?Vt:typeof a=="function"?(Vt=a,!0):!1}function mc(a,r){return Ws[a]===void 0?!1:r===void 0?Ws[a]:(Ws[a]=r,a==="s"&&(Ws.ss=r-1),!0)}function gc(a,r){if(!this.isValid())return this.localeData().invalidDate();var l=!1,u=Ws,d,m;return typeof a=="object"&&(r=a,a=!1),typeof a=="boolean"&&(l=a),typeof r=="object"&&(u=Object.assign({},Ws,r),r.s!=null&&r.ss==null&&(u.ss=r.s-1)),d=this.localeData(),m=cc(this,!l,u,d),l&&(m=d.pastFuture(+this,m)),d.postformat(m)}var ui=Math.abs;function As(a){return(a>0)-(a<0)||+a}function oa(){if(!this.isValid())return this.localeData().invalidDate();var a=ui(this._milliseconds)/1e3,r=ui(this._days),l=ui(this._months),u,d,m,D,I=this.asSeconds(),Q,ie,Ge,Bt;return I?(u=ft(a/60),d=ft(u/60),a%=60,u%=60,m=ft(l/12),l%=12,D=a?a.toFixed(3).replace(/\.?0+$/,""):"",Q=I<0?"-":"",ie=As(this._months)!==As(I)?"-":"",Ge=As(this._days)!==As(I)?"-":"",Bt=As(this._milliseconds)!==As(I)?"-":"",Q+"P"+(m?ie+m+"Y":"")+(l?ie+l+"M":"")+(r?Ge+r+"D":"")+(d||u||a?"T":"")+(d?Bt+d+"H":"")+(u?Bt+u+"M":"")+(a?Bt+D+"S":"")):"P0D"}var le=ea.prototype;le.isValid=lf,le.abs=Ud,le.add=Hd,le.subtract=Vd,le.as=Gd,le.asMilliseconds=jr,le.asSeconds=jd,le.asMinutes=zd,le.asHours=qd,le.asDays=Zd,le.asWeeks=Jd,le.asMonths=Qd,le.asQuarters=Xd,le.asYears=Kd,le.valueOf=ec,le._bubble=Bd,le.clone=tc,le.get=sc,le.milliseconds=nc,le.seconds=ac,le.minutes=ic,le.hours=rc,le.days=oc,le.weeks=fc,le.months=lc,le.years=uc,le.humanize=gc,le.toISOString=oa,le.toString=oa,le.toJSON=oa,le.locale=Pr,le.localeData=Ir,le.toIsoString=me("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",oa),le.lang=Rr,F("X",0,0,"unix"),F("x",0,0,"valueOf"),x("x",zn),x("X",xl),pe("X",function(a,r,l){l._d=new Date(parseFloat(a)*1e3)}),pe("x",function(a,r,l){l._d=new Date(ee(a))});//! moment.js return n.version="2.30.1",i(Me),n.fn=O,n.min=nf,n.max=af,n.now=rf,n.utc=g,n.unix=Id,n.months=Ed,n.isDate=$,n.locale=rs,n.invalid=v,n.duration=yt,n.isMoment=M,n.weekdays=Ld,n.parseZone=xd,n.localeData=At,n.isDuration=ta,n.monthsShort=Fd,n.weekdaysMin=Ad,n.defineLocale=Ja,n.updateLocale=Iu,n.locales=xu,n.weekdaysShort=Wd,n.normalizeUnits=Be,n.relativeTimeRounding=hc,n.relativeTimeThreshold=mc,n.calendarFormat=Nf,n.prototype=O,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n})})(Wo);var Oh=Wo.exports;const Mi=Lo(Oh);//! moment.js //! version : 2.30.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com var Ao;function N(){return Ao.apply(null,arguments)}function Yh(t){Ao=t}function Dt(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function Ys(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function ce(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Ei(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var e;for(e in t)if(ce(t,e))return!1;return!0}function Ke(t){return t===void 0}function Kt(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function Wn(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function Uo(t,e){var s=[],n,i=t.length;for(n=0;n>>0,n;for(n=0;n0)for(s=0;s=0;return(o?s?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var Ai=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,fa=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,mi={},qs={};function G(t,e,s,n){var i=n;typeof n=="string"&&(i=function(){return this[n]()}),t&&(qs[t]=i),e&&(qs[e[0]]=function(){return $t(i.apply(this,arguments),e[1],e[2])}),s&&(qs[s]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function Rh(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function Ih(t){var e=t.match(Ai),s,n;for(s=0,n=e.length;s=0&&fa.test(t);)t=t.replace(fa,n),fa.lastIndex=0,s-=1;return t}var xh={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Eh(t){var e=this._longDateFormat[t],s=this._longDateFormat[t.toUpperCase()];return e||!s?e:(this._longDateFormat[t]=s.match(Ai).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[t])}var Fh="Invalid date";function Lh(){return this._invalidDate}var Wh="%d",Ah=/\d{1,2}/;function Uh(t){return this._ordinal.replace("%d",t)}var Hh={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Vh(t,e,s,n){var i=this._relativeTime[s];return Rt(i)?i(t,e,s,n):i.replace(/%d/i,t)}function Bh(t,e){var s=this._relativeTime[t>0?"future":"past"];return Rt(s)?s(e):s.replace(/%s/i,e)}var wo={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function gt(t){return typeof t=="string"?wo[t]||wo[t.toLowerCase()]:void 0}function Ui(t){var e={},s,n;for(n in t)ce(t,n)&&(s=gt(n),s&&(e[s]=t[n]));return e}var Gh={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function jh(t){var e=[],s;for(s in t)ce(t,s)&&e.push({unit:s,priority:Gh[s]});return e.sort(function(n,i){return n.priority-i.priority}),e}var Go=/\d/,lt=/\d\d/,jo=/\d{3}/,Hi=/\d{4}/,Pa=/[+-]?\d{6}/,Oe=/\d\d?/,zo=/\d\d\d\d?/,qo=/\d\d\d\d\d\d?/,Ra=/\d{1,3}/,Vi=/\d{1,4}/,Ia=/[+-]?\d{1,6}/,un=/\d+/,xa=/[+-]?\d+/,zh=/Z|[+-]\d\d:?\d\d/gi,Ea=/Z|[+-]\d\d(?::?\d\d)?/gi,qh=/[+-]?\d+(\.\d{1,3})?/,Un=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,fn=/^[1-9]\d?/,Bi=/^([1-9]\d|\d)/,va;va={};function E(t,e,s){va[t]=Rt(e)?e:function(n,i){return n&&s?s:e}}function Zh(t,e){return ce(va,t)?va[t](e._strict,e._locale):new RegExp(Jh(t))}function Jh(t){return Qt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,s,n,i,o){return s||n||i||o}))}function Qt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ct(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function se(t){var e=+t,s=0;return e!==0&&isFinite(e)&&(s=ct(e)),s}var Yi={};function we(t,e){var s,n=e,i;for(typeof t=="string"&&(t=[t]),Kt(e)&&(n=function(o,f){f[e]=se(o)}),i=t.length,s=0;s68?1900:2e3)};var Zo=dn("FullYear",!0);function em(){return Fa(this.year())}function dn(t,e){return function(s){return s!=null?(Jo(this,t,s),N.updateOffset(this,e),this):Rn(this,t)}}function Rn(t,e){if(!t.isValid())return NaN;var s=t._d,n=t._isUTC;switch(e){case"Milliseconds":return n?s.getUTCMilliseconds():s.getMilliseconds();case"Seconds":return n?s.getUTCSeconds():s.getSeconds();case"Minutes":return n?s.getUTCMinutes():s.getMinutes();case"Hours":return n?s.getUTCHours():s.getHours();case"Date":return n?s.getUTCDate():s.getDate();case"Day":return n?s.getUTCDay():s.getDay();case"Month":return n?s.getUTCMonth():s.getMonth();case"FullYear":return n?s.getUTCFullYear():s.getFullYear();default:return NaN}}function Jo(t,e,s){var n,i,o,f,c;if(!(!t.isValid()||isNaN(s))){switch(n=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?n.setUTCMilliseconds(s):n.setMilliseconds(s));case"Seconds":return void(i?n.setUTCSeconds(s):n.setSeconds(s));case"Minutes":return void(i?n.setUTCMinutes(s):n.setMinutes(s));case"Hours":return void(i?n.setUTCHours(s):n.setHours(s));case"Date":return void(i?n.setUTCDate(s):n.setDate(s));case"FullYear":break;default:return}o=s,f=t.month(),c=t.date(),c=c===29&&f===1&&!Fa(o)?28:c,i?n.setUTCFullYear(o,f,c):n.setFullYear(o,f,c)}}function tm(t){return t=gt(t),Rt(this[t])?this[t]():this}function sm(t,e){if(typeof t=="object"){t=Ui(t);var s=jh(t),n,i=s.length;for(n=0;n=0?(c=new Date(t+400,e,s,n,i,o,f),isFinite(c.getFullYear())&&c.setFullYear(t)):c=new Date(t,e,s,n,i,o,f),c}function In(t){var e,s;return t<100&&t>=0?(s=Array.prototype.slice.call(arguments),s[0]=t+400,e=new Date(Date.UTC.apply(null,s)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function Ma(t,e,s){var n=7+e-s,i=(7+In(t,0,n).getUTCDay()-e)%7;return-i+n-1}function sl(t,e,s,n,i){var o=(7+s-n)%7,f=Ma(t,n,i),c=1+7*(e-1)+o+f,h,_;return c<=0?(h=t-1,_=Yn(h)+c):c>Yn(t)?(h=t+1,_=c-Yn(t)):(h=t,_=c),{year:h,dayOfYear:_}}function xn(t,e,s){var n=Ma(t.year(),e,s),i=Math.floor((t.dayOfYear()-n-1)/7)+1,o,f;return i<1?(f=t.year()-1,o=i+Xt(f,e,s)):i>Xt(t.year(),e,s)?(o=i-Xt(t.year(),e,s),f=t.year()+1):(f=t.year(),o=i),{week:o,year:f}}function Xt(t,e,s){var n=Ma(t,e,s),i=Ma(t+1,e,s);return(Yn(t)-n+i)/7}G("w",["ww",2],"wo","week");G("W",["WW",2],"Wo","isoWeek");E("w",Oe,fn);E("ww",Oe,lt);E("W",Oe,fn);E("WW",Oe,lt);Hn(["w","ww","W","WW"],function(t,e,s,n){e[n.substr(0,1)]=se(t)});function gm(t){return xn(t,this._week.dow,this._week.doy).week}var _m={dow:0,doy:6};function pm(){return this._week.dow}function wm(){return this._week.doy}function bm(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function ym(t){var e=xn(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}G("d",0,"do","day");G("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)});G("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)});G("dddd",0,0,function(t){return this.localeData().weekdays(this,t)});G("e",0,0,"weekday");G("E",0,0,"isoWeekday");E("d",Oe);E("e",Oe);E("E",Oe);E("dd",function(t,e){return e.weekdaysMinRegex(t)});E("ddd",function(t,e){return e.weekdaysShortRegex(t)});E("dddd",function(t,e){return e.weekdaysRegex(t)});Hn(["dd","ddd","dddd"],function(t,e,s,n){var i=s._locale.weekdaysParse(t,n,s._strict);i!=null?e.d=i:X(s).invalidWeekday=t});Hn(["d","e","E"],function(t,e,s,n){e[n]=se(t)});function km(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function Dm(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function ji(t,e){return t.slice(e,7).concat(t.slice(0,e))}var vm="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),nl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Mm="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Sm=Un,Tm=Un,Om=Un;function Ym(t,e){var s=Dt(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?ji(s,this._week.dow):t?s[t.day()]:s}function Cm(t){return t===!0?ji(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function $m(t){return t===!0?ji(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Nm(t,e,s){var n,i,o,f=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=Pt([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return s?e==="dddd"?(i=Re.call(this._weekdaysParse,f),i!==-1?i:null):e==="ddd"?(i=Re.call(this._shortWeekdaysParse,f),i!==-1?i:null):(i=Re.call(this._minWeekdaysParse,f),i!==-1?i:null):e==="dddd"?(i=Re.call(this._weekdaysParse,f),i!==-1||(i=Re.call(this._shortWeekdaysParse,f),i!==-1)?i:(i=Re.call(this._minWeekdaysParse,f),i!==-1?i:null)):e==="ddd"?(i=Re.call(this._shortWeekdaysParse,f),i!==-1||(i=Re.call(this._weekdaysParse,f),i!==-1)?i:(i=Re.call(this._minWeekdaysParse,f),i!==-1?i:null)):(i=Re.call(this._minWeekdaysParse,f),i!==-1||(i=Re.call(this._weekdaysParse,f),i!==-1)?i:(i=Re.call(this._shortWeekdaysParse,f),i!==-1?i:null))}function Pm(t,e,s){var n,i,o;if(this._weekdaysParseExact)return Nm.call(this,t,e,s);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=Pt([2e3,1]).day(n),s&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),s&&e==="dddd"&&this._fullWeekdaysParse[n].test(t))return n;if(s&&e==="ddd"&&this._shortWeekdaysParse[n].test(t))return n;if(s&&e==="dd"&&this._minWeekdaysParse[n].test(t))return n;if(!s&&this._weekdaysParse[n].test(t))return n}}function Rm(t){if(!this.isValid())return t!=null?this:NaN;var e=Rn(this,"Day");return t!=null?(t=km(t,this.localeData()),this.add(t-e,"d")):e}function Im(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function xm(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=Dm(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function Em(t){return this._weekdaysParseExact?(ce(this,"_weekdaysRegex")||zi.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(ce(this,"_weekdaysRegex")||(this._weekdaysRegex=Sm),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Fm(t){return this._weekdaysParseExact?(ce(this,"_weekdaysRegex")||zi.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ce(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Tm),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Lm(t){return this._weekdaysParseExact?(ce(this,"_weekdaysRegex")||zi.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ce(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Om),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function zi(){function t(k,$){return $.length-k.length}var e=[],s=[],n=[],i=[],o,f,c,h,_;for(o=0;o<7;o++)f=Pt([2e3,1]).day(o),c=Qt(this.weekdaysMin(f,"")),h=Qt(this.weekdaysShort(f,"")),_=Qt(this.weekdays(f,"")),e.push(c),s.push(h),n.push(_),i.push(c),i.push(h),i.push(_);e.sort(t),s.sort(t),n.sort(t),i.sort(t),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function qi(){return this.hours()%12||12}function Wm(){return this.hours()||24}G("H",["HH",2],0,"hour");G("h",["hh",2],0,qi);G("k",["kk",2],0,Wm);G("hmm",0,0,function(){return""+qi.apply(this)+$t(this.minutes(),2)});G("hmmss",0,0,function(){return""+qi.apply(this)+$t(this.minutes(),2)+$t(this.seconds(),2)});G("Hmm",0,0,function(){return""+this.hours()+$t(this.minutes(),2)});G("Hmmss",0,0,function(){return""+this.hours()+$t(this.minutes(),2)+$t(this.seconds(),2)});function al(t,e){G(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}al("a",!0);al("A",!1);function il(t,e){return e._meridiemParse}E("a",il);E("A",il);E("H",Oe,Bi);E("h",Oe,fn);E("k",Oe,fn);E("HH",Oe,lt);E("hh",Oe,lt);E("kk",Oe,lt);E("hmm",zo);E("hmmss",qo);E("Hmm",zo);E("Hmmss",qo);we(["H","HH"],Ee);we(["k","kk"],function(t,e,s){var n=se(t);e[Ee]=n===24?0:n});we(["a","A"],function(t,e,s){s._isPm=s._locale.isPM(t),s._meridiem=t});we(["h","hh"],function(t,e,s){e[Ee]=se(t),X(s).bigHour=!0});we("hmm",function(t,e,s){var n=t.length-2;e[Ee]=se(t.substr(0,n)),e[kt]=se(t.substr(n)),X(s).bigHour=!0});we("hmmss",function(t,e,s){var n=t.length-4,i=t.length-2;e[Ee]=se(t.substr(0,n)),e[kt]=se(t.substr(n,2)),e[Jt]=se(t.substr(i)),X(s).bigHour=!0});we("Hmm",function(t,e,s){var n=t.length-2;e[Ee]=se(t.substr(0,n)),e[kt]=se(t.substr(n))});we("Hmmss",function(t,e,s){var n=t.length-4,i=t.length-2;e[Ee]=se(t.substr(0,n)),e[kt]=se(t.substr(n,2)),e[Jt]=se(t.substr(i))});function Am(t){return(t+"").toLowerCase().charAt(0)==="p"}var Um=/[ap]\.?m?\.?/i,Hm=dn("Hours",!0);function Vm(t,e,s){return t>11?s?"pm":"PM":s?"am":"AM"}var rl={calendar:Nh,longDateFormat:xh,invalidDate:Fh,ordinal:Wh,dayOfMonthOrdinalParse:Ah,relativeTime:Hh,months:am,monthsShort:Qo,week:_m,weekdays:vm,weekdaysMin:Mm,weekdaysShort:nl,meridiemParse:Um},Ce={},Mn={},En;function Bm(t,e){var s,n=Math.min(t.length,e.length);for(s=0;s0;){if(i=La(o.slice(0,s).join("-")),i)return i;if(n&&n.length>=s&&Bm(o,n)>=s-1)break;s--}e++}return En}function jm(t){return!!(t&&t.match("^[^/\\\\]*$"))}function La(t){var e=null,s;if(Ce[t]===void 0&&typeof module<"u"&&module&&module.exports&&jm(t))try{e=En._abbr,s=require,s("./locale/"+t),_s(e)}catch{Ce[t]=null}return Ce[t]}function _s(t,e){var s;return t&&(Ke(e)?s=es(t):s=Zi(t,e),s?En=s:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),En._abbr}function Zi(t,e){if(e!==null){var s,n=rl;if(e.abbr=t,Ce[t]!=null)Vo("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Ce[t]._config;else if(e.parentLocale!=null)if(Ce[e.parentLocale]!=null)n=Ce[e.parentLocale]._config;else if(s=La(e.parentLocale),s!=null)n=s._config;else return Mn[e.parentLocale]||(Mn[e.parentLocale]=[]),Mn[e.parentLocale].push({name:t,config:e}),null;return Ce[t]=new Wi(Ti(n,e)),Mn[t]&&Mn[t].forEach(function(i){Zi(i.name,i.config)}),_s(t),Ce[t]}else return delete Ce[t],null}function zm(t,e){if(e!=null){var s,n,i=rl;Ce[t]!=null&&Ce[t].parentLocale!=null?Ce[t].set(Ti(Ce[t]._config,e)):(n=La(t),n!=null&&(i=n._config),e=Ti(i,e),n==null&&(e.abbr=t),s=new Wi(e),s.parentLocale=Ce[t],Ce[t]=s),_s(t)}else Ce[t]!=null&&(Ce[t].parentLocale!=null?(Ce[t]=Ce[t].parentLocale,t===_s()&&_s(t)):Ce[t]!=null&&delete Ce[t]);return Ce[t]}function es(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return En;if(!Dt(t)){if(e=La(t),e)return e;t=[t]}return Gm(t)}function qm(){return Oi(Ce)}function Ji(t){var e,s=t._a;return s&&X(t).overflow===-2&&(e=s[Zt]<0||s[Zt]>11?Zt:s[Ot]<1||s[Ot]>Gi(s[Ve],s[Zt])?Ot:s[Ee]<0||s[Ee]>24||s[Ee]===24&&(s[kt]!==0||s[Jt]!==0||s[Ts]!==0)?Ee:s[kt]<0||s[kt]>59?kt:s[Jt]<0||s[Jt]>59?Jt:s[Ts]<0||s[Ts]>999?Ts:-1,X(t)._overflowDayOfYear&&(eOt)&&(e=Ot),X(t)._overflowWeeks&&e===-1&&(e=Xh),X(t)._overflowWeekday&&e===-1&&(e=Kh),X(t).overflow=e),t}var Zm=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Jm=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Qm=/Z|[+-]\d\d(?::?\d\d)?/,da=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],gi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Xm=/^\/?Date\((-?\d+)/i,Km=/^(?:(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{4}))$/,eg={UT:0,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 ol(t){var e,s,n=t._i,i=Zm.exec(n)||Jm.exec(n),o,f,c,h,_=da.length,k=gi.length;if(i){for(X(t).iso=!0,e=0,s=_;eYn(f)||t._dayOfYear===0)&&(X(t)._overflowDayOfYear=!0),s=In(f,0,t._dayOfYear),t._a[Zt]=s.getUTCMonth(),t._a[Ot]=s.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=n[e]=i[e];for(;e<7;e++)t._a[e]=n[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[Ee]===24&&t._a[kt]===0&&t._a[Jt]===0&&t._a[Ts]===0&&(t._nextDay=!0,t._a[Ee]=0),t._d=(t._useUTC?In:mm).apply(null,n),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Ee]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==o&&(X(t).weekdayMismatch=!0)}}function lg(t){var e,s,n,i,o,f,c,h,_;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(o=1,f=4,s=Bs(e.GG,t._a[Ve],xn(Te(),1,4).year),n=Bs(e.W,1),i=Bs(e.E,1),(i<1||i>7)&&(h=!0)):(o=t._locale._week.dow,f=t._locale._week.doy,_=xn(Te(),o,f),s=Bs(e.gg,t._a[Ve],_.year),n=Bs(e.w,_.week),e.d!=null?(i=e.d,(i<0||i>6)&&(h=!0)):e.e!=null?(i=e.e+o,(e.e<0||e.e>6)&&(h=!0)):i=o),n<1||n>Xt(s,o,f)?X(t)._overflowWeeks=!0:h!=null?X(t)._overflowWeekday=!0:(c=sl(s,n,i,o,f),t._a[Ve]=c.year,t._dayOfYear=c.dayOfYear)}N.ISO_8601=function(){};N.RFC_2822=function(){};function Xi(t){if(t._f===N.ISO_8601){ol(t);return}if(t._f===N.RFC_2822){ll(t);return}t._a=[],X(t).empty=!0;var e=""+t._i,s,n,i,o,f,c=e.length,h=0,_,k;for(i=Bo(t._f,t._locale).match(Ai)||[],k=i.length,s=0;s0&&X(t).unusedInput.push(f),e=e.slice(e.indexOf(n)+n.length),h+=n.length),qs[o]?(n?X(t).empty=!1:X(t).unusedTokens.push(o),Qh(o,n,t)):t._strict&&!n&&X(t).unusedTokens.push(o);X(t).charsLeftOver=c-h,e.length>0&&X(t).unusedInput.push(e),t._a[Ee]<=12&&X(t).bigHour===!0&&t._a[Ee]>0&&(X(t).bigHour=void 0),X(t).parsedDateParts=t._a.slice(0),X(t).meridiem=t._meridiem,t._a[Ee]=ug(t._locale,t._a[Ee],t._meridiem),_=X(t).era,_!==null&&(t._a[Ve]=t._locale.erasConvertYear(_,t._a[Ve])),Qi(t),Ji(t)}function ug(t,e,s){var n;return s==null?e:t.meridiemHour!=null?t.meridiemHour(e,s):(t.isPM!=null&&(n=t.isPM(s),n&&e<12&&(e+=12),!n&&e===12&&(e=0)),e)}function fg(t){var e,s,n,i,o,f,c=!1,h=t._f.length;if(h===0){X(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;ithis?this:t:Na()});function dl(t,e){var s,n;if(e.length===1&&Dt(e[0])&&(e=e[0]),!e.length)return Te();for(s=e[0],n=1;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ng(){if(!Ke(this._isDSTShifted))return this._isDSTShifted;var t={},e;return Li(t,this),t=ul(t),t._a?(e=t._isUTC?Pt(t._a):Te(t._a),this._isDSTShifted=this.isValid()&&Dg(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Pg(){return this.isValid()?!this._isUTC:!1}function Rg(){return this.isValid()?this._isUTC:!1}function hl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Ig=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,xg=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Mt(t,e){var s=t,n=null,i,o,f;return _a(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:Kt(t)||!isNaN(+t)?(s={},e?s[e]=+t:s.milliseconds=+t):(n=Ig.exec(t))?(i=n[1]==="-"?-1:1,s={y:0,d:se(n[Ot])*i,h:se(n[Ee])*i,m:se(n[kt])*i,s:se(n[Jt])*i,ms:se(Ci(n[Ts]*1e3))*i}):(n=xg.exec(t))?(i=n[1]==="-"?-1:1,s={y:vs(n[2],i),M:vs(n[3],i),w:vs(n[4],i),d:vs(n[5],i),h:vs(n[6],i),m:vs(n[7],i),s:vs(n[8],i)}):s==null?s={}:typeof s=="object"&&("from"in s||"to"in s)&&(f=Eg(Te(s.from),Te(s.to)),s={},s.ms=f.milliseconds,s.M=f.months),o=new Wa(s),_a(t)&&ce(t,"_locale")&&(o._locale=t._locale),_a(t)&&ce(t,"_isValid")&&(o._isValid=t._isValid),o}Mt.fn=Wa.prototype;Mt.invalid=kg;function vs(t,e){var s=t&&parseFloat(t.replace(",","."));return(isNaN(s)?0:s)*e}function yo(t,e){var s={};return s.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(s.months,"M").isAfter(e)&&--s.months,s.milliseconds=+e-+t.clone().add(s.months,"M"),s}function Eg(t,e){var s;return t.isValid()&&e.isValid()?(e=er(e,t),t.isBefore(e)?s=yo(t,e):(s=yo(e,t),s.milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0}}function ml(t,e){return function(s,n){var i,o;return n!==null&&!isNaN(+n)&&(Vo(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=s,s=n,n=o),i=Mt(s,n),gl(this,i,t),this}}function gl(t,e,s,n){var i=e._milliseconds,o=Ci(e._days),f=Ci(e._months);t.isValid()&&(n=n??!0,f&&Ko(t,Rn(t,"Month")+f*s),o&&Jo(t,"Date",Rn(t,"Date")+o*s),i&&t._d.setTime(t._d.valueOf()+i*s),n&&N.updateOffset(t,o||f))}var Fg=ml(1,"add"),Lg=ml(-1,"subtract");function _l(t){return typeof t=="string"||t instanceof String}function Wg(t){return vt(t)||Wn(t)||_l(t)||Kt(t)||Ug(t)||Ag(t)||t===null||t===void 0}function Ag(t){var e=Ys(t)&&!Ei(t),s=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,o,f=n.length;for(i=0;is.valueOf():s.valueOf()9999?ga(s,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Rt(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ga(s,"Z")):ga(s,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function t_(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",s,n,i,o;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),s="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",o=e+'[")]',this.format(s+n+i+o)}function s_(t){t||(t=this.isUtc()?N.defaultFormatUtc:N.defaultFormat);var e=ga(this,t);return this.localeData().postformat(e)}function n_(t,e){return this.isValid()&&(vt(t)&&t.isValid()||Te(t).isValid())?Mt({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function a_(t){return this.from(Te(),t)}function i_(t,e){return this.isValid()&&(vt(t)&&t.isValid()||Te(t).isValid())?Mt({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function r_(t){return this.to(Te(),t)}function pl(t){var e;return t===void 0?this._locale._abbr:(e=es(t),e!=null&&(this._locale=e),this)}var wl=mt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function bl(){return this._locale}var Sa=1e3,Zs=60*Sa,Ta=60*Zs,yl=(365*400+97)*24*Ta;function Js(t,e){return(t%e+e)%e}function kl(t,e,s){return t<100&&t>=0?new Date(t+400,e,s)-yl:new Date(t,e,s).valueOf()}function Dl(t,e,s){return t<100&&t>=0?Date.UTC(t+400,e,s)-yl:Date.UTC(t,e,s)}function o_(t){var e,s;if(t=gt(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?Dl:kl,t){case"year":e=s(this.year(),0,1);break;case"quarter":e=s(this.year(),this.month()-this.month()%3,1);break;case"month":e=s(this.year(),this.month(),1);break;case"week":e=s(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=s(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Js(e+(this._isUTC?0:this.utcOffset()*Zs),Ta);break;case"minute":e=this._d.valueOf(),e-=Js(e,Zs);break;case"second":e=this._d.valueOf(),e-=Js(e,Sa);break}return this._d.setTime(e),N.updateOffset(this,!0),this}function l_(t){var e,s;if(t=gt(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?Dl:kl,t){case"year":e=s(this.year()+1,0,1)-1;break;case"quarter":e=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=s(this.year(),this.month()+1,1)-1;break;case"week":e=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Ta-Js(e+(this._isUTC?0:this.utcOffset()*Zs),Ta)-1;break;case"minute":e=this._d.valueOf(),e+=Zs-Js(e,Zs)-1;break;case"second":e=this._d.valueOf(),e+=Sa-Js(e,Sa)-1;break}return this._d.setTime(e),N.updateOffset(this,!0),this}function u_(){return this._d.valueOf()-(this._offset||0)*6e4}function f_(){return Math.floor(this.valueOf()/1e3)}function d_(){return new Date(this.valueOf())}function c_(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function h_(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function m_(){return this.isValid()?this.toISOString():null}function g_(){return Fi(this)}function __(){return ms({},X(this))}function p_(){return X(this).overflow}function w_(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}G("N",0,0,"eraAbbr");G("NN",0,0,"eraAbbr");G("NNN",0,0,"eraAbbr");G("NNNN",0,0,"eraName");G("NNNNN",0,0,"eraNarrow");G("y",["y",1],"yo","eraYear");G("y",["yy",2],0,"eraYear");G("y",["yyy",3],0,"eraYear");G("y",["yyyy",4],0,"eraYear");E("N",tr);E("NN",tr);E("NNN",tr);E("NNNN",C_);E("NNNNN",$_);we(["N","NN","NNN","NNNN","NNNNN"],function(t,e,s,n){var i=s._locale.erasParse(t,n,s._strict);i?X(s).era=i:X(s).invalidEra=t});E("y",un);E("yy",un);E("yyy",un);E("yyyy",un);E("yo",N_);we(["y","yy","yyy","yyyy"],Ve);we(["yo"],function(t,e,s,n){var i;s._locale._eraYearOrdinalRegex&&(i=t.match(s._locale._eraYearOrdinalRegex)),s._locale.eraYearOrdinalParse?e[Ve]=s._locale.eraYearOrdinalParse(t,i):e[Ve]=parseInt(t,10)});function b_(t,e){var s,n,i,o=this._eras||es("en")._eras;for(s=0,n=o.length;s=0)return o[n]}function k_(t,e){var s=t.since<=t.until?1:-1;return e===void 0?N(t.since).year():N(t.since).year()+(e-t.offset)*s}function D_(){var t,e,s,n=this.localeData().eras();for(t=0,e=n.length;to&&(e=o),L_.call(this,t,e,s,n,i))}function L_(t,e,s,n,i){var o=sl(t,e,s,n,i),f=In(o.year,0,o.dayOfYear);return this.year(f.getUTCFullYear()),this.month(f.getUTCMonth()),this.date(f.getUTCDate()),this}G("Q",0,"Qo","quarter");E("Q",Go);we("Q",function(t,e){e[Zt]=(se(t)-1)*3});function W_(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}G("D",["DD",2],"Do","date");E("D",Oe,fn);E("DD",Oe,lt);E("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient});we(["D","DD"],Ot);we("Do",function(t,e){e[Ot]=se(t.match(Oe)[0])});var Ml=dn("Date",!0);G("DDD",["DDDD",3],"DDDo","dayOfYear");E("DDD",Ra);E("DDDD",jo);we(["DDD","DDDD"],function(t,e,s){s._dayOfYear=se(t)});function A_(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}G("m",["mm",2],0,"minute");E("m",Oe,Bi);E("mm",Oe,lt);we(["m","mm"],kt);var U_=dn("Minutes",!1);G("s",["ss",2],0,"second");E("s",Oe,Bi);E("ss",Oe,lt);we(["s","ss"],Jt);var H_=dn("Seconds",!1);G("S",0,0,function(){return~~(this.millisecond()/100)});G(0,["SS",2],0,function(){return~~(this.millisecond()/10)});G(0,["SSS",3],0,"millisecond");G(0,["SSSS",4],0,function(){return this.millisecond()*10});G(0,["SSSSS",5],0,function(){return this.millisecond()*100});G(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});G(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});G(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});G(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});E("S",Ra,Go);E("SS",Ra,lt);E("SSS",Ra,jo);var gs,Sl;for(gs="SSSS";gs.length<=9;gs+="S")E(gs,un);function V_(t,e){e[Ts]=se(("0."+t)*1e3)}for(gs="S";gs.length<=9;gs+="S")we(gs,V_);Sl=dn("Milliseconds",!1);G("z",0,0,"zoneAbbr");G("zz",0,0,"zoneName");function B_(){return this._isUTC?"UTC":""}function G_(){return this._isUTC?"Coordinated Universal Time":""}var Y=An.prototype;Y.add=Fg;Y.calendar=Bg;Y.clone=Gg;Y.diff=Xg;Y.endOf=l_;Y.format=s_;Y.from=n_;Y.fromNow=a_;Y.to=i_;Y.toNow=r_;Y.get=tm;Y.invalidAt=p_;Y.isAfter=jg;Y.isBefore=zg;Y.isBetween=qg;Y.isSame=Zg;Y.isSameOrAfter=Jg;Y.isSameOrBefore=Qg;Y.isValid=g_;Y.lang=wl;Y.locale=pl;Y.localeData=bl;Y.max=gg;Y.min=mg;Y.parsingFlags=__;Y.set=sm;Y.startOf=o_;Y.subtract=Lg;Y.toArray=c_;Y.toObject=h_;Y.toDate=d_;Y.toISOString=e_;Y.inspect=t_;typeof Symbol<"u"&&Symbol.for!=null&&(Y[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Y.toJSON=m_;Y.toString=Kg;Y.unix=f_;Y.valueOf=u_;Y.creationData=w_;Y.eraName=D_;Y.eraNarrow=v_;Y.eraAbbr=M_;Y.eraYear=S_;Y.year=Zo;Y.isLeapYear=em;Y.weekYear=P_;Y.isoWeekYear=R_;Y.quarter=Y.quarters=W_;Y.month=el;Y.daysInMonth=dm;Y.week=Y.weeks=bm;Y.isoWeek=Y.isoWeeks=ym;Y.weeksInYear=E_;Y.weeksInWeekYear=F_;Y.isoWeeksInYear=I_;Y.isoWeeksInISOWeekYear=x_;Y.date=Ml;Y.day=Y.days=Rm;Y.weekday=Im;Y.isoWeekday=xm;Y.dayOfYear=A_;Y.hour=Y.hours=Hm;Y.minute=Y.minutes=U_;Y.second=Y.seconds=H_;Y.millisecond=Y.milliseconds=Sl;Y.utcOffset=Mg;Y.utc=Tg;Y.local=Og;Y.parseZone=Yg;Y.hasAlignedHourOffset=Cg;Y.isDST=$g;Y.isLocal=Pg;Y.isUtcOffset=Rg;Y.isUtc=hl;Y.isUTC=hl;Y.zoneAbbr=B_;Y.zoneName=G_;Y.dates=mt("dates accessor is deprecated. Use date instead.",Ml);Y.months=mt("months accessor is deprecated. Use month instead",el);Y.years=mt("years accessor is deprecated. Use year instead",Zo);Y.zone=mt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Sg);Y.isDSTShifted=mt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ng);function j_(t){return Te(t*1e3)}function z_(){return Te.apply(null,arguments).parseZone()}function Tl(t){return t}var he=Wi.prototype;he.calendar=Ph;he.longDateFormat=Eh;he.invalidDate=Lh;he.ordinal=Uh;he.preparse=Tl;he.postformat=Tl;he.relativeTime=Vh;he.pastFuture=Bh;he.set=$h;he.eras=b_;he.erasParse=y_;he.erasConvertYear=k_;he.erasAbbrRegex=O_;he.erasNameRegex=T_;he.erasNarrowRegex=Y_;he.months=om;he.monthsShort=lm;he.monthsParse=fm;he.monthsRegex=hm;he.monthsShortRegex=cm;he.week=gm;he.firstDayOfYear=wm;he.firstDayOfWeek=pm;he.weekdays=Ym;he.weekdaysMin=$m;he.weekdaysShort=Cm;he.weekdaysParse=Pm;he.weekdaysRegex=Em;he.weekdaysShortRegex=Fm;he.weekdaysMinRegex=Lm;he.isPM=Am;he.meridiem=Vm;function Oa(t,e,s,n){var i=es(),o=Pt().set(n,e);return i[s](o,t)}function Ol(t,e,s){if(Kt(t)&&(e=t,t=void 0),t=t||"",e!=null)return Oa(t,e,s,"month");var n,i=[];for(n=0;n<12;n++)i[n]=Oa(t,n,s,"month");return i}function nr(t,e,s,n){typeof t=="boolean"?(Kt(e)&&(s=e,e=void 0),e=e||""):(e=t,s=e,t=!1,Kt(e)&&(s=e,e=void 0),e=e||"");var i=es(),o=t?i._week.dow:0,f,c=[];if(s!=null)return Oa(e,(s+o)%7,n,"day");for(f=0;f<7;f++)c[f]=Oa(e,(f+o)%7,n,"day");return c}function q_(t,e){return Ol(t,e,"months")}function Z_(t,e){return Ol(t,e,"monthsShort")}function J_(t,e,s){return nr(t,e,s,"weekdays")}function Q_(t,e,s){return nr(t,e,s,"weekdaysShort")}function X_(t,e,s){return nr(t,e,s,"weekdaysMin")}_s("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,s=se(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+s}});N.lang=mt("moment.lang is deprecated. Use moment.locale instead.",_s);N.langData=mt("moment.langData is deprecated. Use moment.localeData instead.",es);var Gt=Math.abs;function K_(){var t=this._data;return this._milliseconds=Gt(this._milliseconds),this._days=Gt(this._days),this._months=Gt(this._months),t.milliseconds=Gt(t.milliseconds),t.seconds=Gt(t.seconds),t.minutes=Gt(t.minutes),t.hours=Gt(t.hours),t.months=Gt(t.months),t.years=Gt(t.years),this}function Yl(t,e,s,n){var i=Mt(e,s);return t._milliseconds+=n*i._milliseconds,t._days+=n*i._days,t._months+=n*i._months,t._bubble()}function ep(t,e){return Yl(this,t,e,1)}function tp(t,e){return Yl(this,t,e,-1)}function ko(t){return t<0?Math.floor(t):Math.ceil(t)}function sp(){var t=this._milliseconds,e=this._days,s=this._months,n=this._data,i,o,f,c,h;return t>=0&&e>=0&&s>=0||t<=0&&e<=0&&s<=0||(t+=ko(Ni(s)+e)*864e5,e=0,s=0),n.milliseconds=t%1e3,i=ct(t/1e3),n.seconds=i%60,o=ct(i/60),n.minutes=o%60,f=ct(o/60),n.hours=f%24,e+=ct(f/24),h=ct(Cl(e)),s+=h,e-=ko(Ni(h)),c=ct(s/12),s%=12,n.days=e,n.months=s,n.years=c,this}function Cl(t){return t*4800/146097}function Ni(t){return t*146097/4800}function np(t){if(!this.isValid())return NaN;var e,s,n=this._milliseconds;if(t=gt(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+n/864e5,s=this._months+Cl(e),t){case"month":return s;case"quarter":return s/3;case"year":return s/12}else switch(e=this._days+Math.round(Ni(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return e*24+n/36e5;case"minute":return e*1440+n/6e4;case"second":return e*86400+n/1e3;case"millisecond":return Math.floor(e*864e5)+n;default:throw new Error("Unknown unit "+t)}}function ts(t){return function(){return this.as(t)}}var $l=ts("ms"),ap=ts("s"),ip=ts("m"),rp=ts("h"),op=ts("d"),lp=ts("w"),up=ts("M"),fp=ts("Q"),dp=ts("y"),cp=$l;function hp(){return Mt(this)}function mp(t){return t=gt(t),this.isValid()?this[t+"s"]():NaN}function $s(t){return function(){return this.isValid()?this._data[t]:NaN}}var gp=$s("milliseconds"),_p=$s("seconds"),pp=$s("minutes"),wp=$s("hours"),bp=$s("days"),yp=$s("months"),kp=$s("years");function Dp(){return ct(this.days()/7)}var qt=Math.round,Gs={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function vp(t,e,s,n,i){return i.relativeTime(e||1,!!s,t,n)}function Mp(t,e,s,n){var i=Mt(t).abs(),o=qt(i.as("s")),f=qt(i.as("m")),c=qt(i.as("h")),h=qt(i.as("d")),_=qt(i.as("M")),k=qt(i.as("w")),$=qt(i.as("y")),p=o<=s.ss&&["s",o]||o0,p[4]=n,vp.apply(null,p)}function Sp(t){return t===void 0?qt:typeof t=="function"?(qt=t,!0):!1}function Tp(t,e){return Gs[t]===void 0?!1:e===void 0?Gs[t]:(Gs[t]=e,t==="s"&&(Gs.ss=e-1),!0)}function Op(t,e){if(!this.isValid())return this.localeData().invalidDate();var s=!1,n=Gs,i,o;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(s=t),typeof e=="object"&&(n=Object.assign({},Gs,e),e.s!=null&&e.ss==null&&(n.ss=e.s-1)),i=this.localeData(),o=Mp(this,!s,n,i),s&&(o=i.pastFuture(+this,o)),i.postformat(o)}var _i=Math.abs;function Hs(t){return(t>0)-(t<0)||+t}function Ua(){if(!this.isValid())return this.localeData().invalidDate();var t=_i(this._milliseconds)/1e3,e=_i(this._days),s=_i(this._months),n,i,o,f,c=this.asSeconds(),h,_,k,$;return c?(n=ct(t/60),i=ct(n/60),t%=60,n%=60,o=ct(s/12),s%=12,f=t?t.toFixed(3).replace(/\.?0+$/,""):"",h=c<0?"-":"",_=Hs(this._months)!==Hs(c)?"-":"",k=Hs(this._days)!==Hs(c)?"-":"",$=Hs(this._milliseconds)!==Hs(c)?"-":"",h+"P"+(o?_+o+"Y":"")+(s?_+s+"M":"")+(e?k+e+"D":"")+(i||n||t?"T":"")+(i?$+i+"H":"")+(n?$+n+"M":"")+(t?$+f+"S":"")):"P0D"}var ue=Wa.prototype;ue.isValid=yg;ue.abs=K_;ue.add=ep;ue.subtract=tp;ue.as=np;ue.asMilliseconds=$l;ue.asSeconds=ap;ue.asMinutes=ip;ue.asHours=rp;ue.asDays=op;ue.asWeeks=lp;ue.asMonths=up;ue.asQuarters=fp;ue.asYears=dp;ue.valueOf=cp;ue._bubble=sp;ue.clone=hp;ue.get=mp;ue.milliseconds=gp;ue.seconds=_p;ue.minutes=pp;ue.hours=wp;ue.days=bp;ue.weeks=Dp;ue.months=yp;ue.years=kp;ue.humanize=Op;ue.toISOString=Ua;ue.toString=Ua;ue.toJSON=Ua;ue.locale=pl;ue.localeData=bl;ue.toIsoString=mt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ua);ue.lang=wl;G("X",0,0,"unix");G("x",0,0,"valueOf");E("x",xa);E("X",qh);we("X",function(t,e,s){s._d=new Date(parseFloat(t)*1e3)});we("x",function(t,e,s){s._d=new Date(se(t))});//! moment.js N.version="2.30.1";Yh(Te);N.fn=Y;N.min=_g;N.max=pg;N.now=wg;N.utc=Pt;N.unix=j_;N.months=q_;N.isDate=Wn;N.locale=_s;N.invalid=Na;N.duration=Mt;N.isMoment=vt;N.weekdays=J_;N.parseZone=z_;N.localeData=es;N.isDuration=_a;N.monthsShort=Z_;N.weekdaysMin=X_;N.defineLocale=Zi;N.updateLocale=zm;N.locales=qm;N.weekdaysShort=Q_;N.normalizeUnits=gt;N.relativeTimeRounding=Sp;N.relativeTimeThreshold=Tp;N.calendarFormat=Vg;N.prototype=Y;N.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Cn(t){return N(t).utcOffset("+08:00").format("YYYY-MM-DD HH:mm:ss")}function Yt(t){const e=typeof t=="number"?t*1e3:t;return N(e).format(exports.pluginConfigData.advanced.formatDataTime)}function Yp(t){const e=typeof t=="number"?t*1e3:t;return N(e).format("YYYY-MM-DD")}class $n{static async getAllMemos(){C(exports.pluginConfigData.debug.isDebug,"正在获取 Memos 数据...");const e=exports.pluginConfigData.filter.lastSyncTime,s=10;let n=0,i=[];for(;;){const f=await vh({offset:n,limit:s});C(exports.pluginConfigData.debug.isDebug,"resData",f);const c=f.filter(h=>Mi(Yt(h.updatedTs)).isSameOrAfter(Yt(e)));if(i.push(...c),C(exports.pluginConfigData.debug.isDebug,"memos",c),f.length===0)break;n+=s}return C(exports.pluginConfigData.debug.isDebug,"获取结果",i),i}static async checkAccessToken(){const e=await Dh();return!K(e)}static async checkNew(){return(await this.getAllMemos()).length>0}static async getMemos(){let e=await this.getAllMemos();C(exports.pluginConfigData.debug.isDebug,"正在整理 Memos 数据...");const s=exports.pluginConfigData.filter.lastSyncTime;let n=e.filter(o=>Mi(Yt(o.createdTs)).isBefore(Yt(s))),i={new:e,old:n};return C(exports.pluginConfigData.debug.isDebug,"整理结果",i),i}static async downloadResource(e){return await Mh(e)}}function Pi(t){return K(t)?null:t.join(" && ")}async function Do(){return await Nt.send(je.POST,"/api/v1/auth/status")}async function vo(t,e,s,n){return await Nt.send(je.GET,"/api/v1/memos",{pageSize:t,pageToken:e,filter:Pi(s),view:n})}async function Cp(t,e,s,n,i,o,f,c){return await Nt.send(je.GET,"/api/v1/memos",{parent:t,pageSize:e,pageToken:s,state:n,sort:i,direction:o,filter:Pi(f),oldFilter:Pi(c)})}async function $p(t,e){return await Nt.get(`/file/${t}/${e}`)}async function Np(t){return await Nt.get(`/file/${t}`)}async function Pp(t){return await Nt.send(je.GET,`/api/v1/memos/${t}`)}const Ca=class Ca{static async initData(){const e=await this.getUserData();this.username=e.name}static async tagFilter(e){const s=exports.pluginConfigData.filter.tagFilterMode;if(s===ze.all)return e;if(s===ze.syncNoTag)return console.log("仅同步无标签的数据"),Se.V2_Y2025_M02_D05.includes(exports.pluginConfigData.base.version)?e.filter(o=>o.tags.length===0):e.filter(o=>o.property.tags.length===0);if(s===ze.notSyncNoTag)return console.log("不同步无标签的数据"),Se.V2_Y2025_M02_D05.includes(exports.pluginConfigData.base.version)?e.filter(o=>o.tags.length>0):e.filter(o=>o.property.tags.length>0);let i=exports.pluginConfigData.filter.tagList.split(";");return s===ze.syncSpecTag?(console.log("仅同步指定标签的数据"),Se.V2_Y2025_M02_D05.includes(exports.pluginConfigData.base.version)?(console.log(i),e.filter(o=>us(o.tags,i))):e.filter(o=>us(o.property.tags,i))):s===ze.notSyncSpecTag?(console.log("不同步指定标签的数据"),Se.V2_Y2025_M02_D05.includes(exports.pluginConfigData.base.version)?e.filter(o=>!us(o.tags,i)):e.filter(o=>!us(o.property.tags,i))):s===ze.syncSpecTagAndNoTag?(console.log("同步指定标签及无标签的数据"),Se.V2_Y2025_M02_D05.includes(exports.pluginConfigData.base.version)?e.filter(o=>us(o.tags,i)||o.tags.length===0):e.filter(o=>us(o.property.tags,i)||o.property.tags.length===0)):s===ze.notSyncSpecTagAndNoTag?(console.log("不同步指定标签及无标签的数据"),Se.V2_Y2025_M02_D05.includes(exports.pluginConfigData.base.version)?e.filter(o=>!us(o.tags,i)&&o.tags.length>0):e.filter(o=>!us(o.property.tags,i)&&o.property.tags.length>0)):e}static async getAllMemos(){C(exports.pluginConfigData.debug.isDebug,"正在获取 Memos 数据..."),await this.initData();const e=exports.pluginConfigData.base.version,s=exports.pluginConfigData.filter.lastSyncTime,n=200;let i,o=[],f=[`creator == "${this.username}"`];for(;;){let c;Se.V2_Y2025_M02_D05.includes(e)?c=await Cp(this.username,n,i):Se.V2_MemosViewFull.includes(e)?c=await vo(n,i,f,"MEMO_VIEW_FULL"):c=await vo(n,i,f);const h=c.memos.filter(_=>N(Cn(_.updateTime)).isSameOrAfter(Yt(s)));if(o.push(...h),h.length0}static async getMemos(){let e=await this.getAllMemos();C(exports.pluginConfigData.debug.isDebug,"正在整理 Memos 数据...");const s=exports.pluginConfigData.filter.lastSyncTime;let n=e.filter(o=>N(Cn(o.createTime)).isBefore(Yt(s))),i={new:e,old:n};return C(exports.pluginConfigData.debug.isDebug,"整理结果",i),i}static async downloadResource(e){return Se.V2_DownloadResourceByName.includes(exports.pluginConfigData.base.version)?await Np(e.name):await $p(e.name,e.filename)}};Le(Ca,"username");let Cs=Ca;class ar{static async checkAccessToken(){let e=!1;const s=exports.pluginConfigData.base.version;return Se.V1.includes(s)?e=await $n.checkAccessToken():Se.V2.includes(s)&&(e=await Cs.checkAccessToken()),e}static async checkNew(){let e=!1;const s=exports.pluginConfigData.base.version;return Se.V1.includes(s)?e=await $n.checkNew():Se.V2.includes(s)&&(e=await Cs.checkNew()),e}static async getMemos(){let e;const s=exports.pluginConfigData.base.version;return Se.V1.includes(s)?e=await $n.getMemos():Se.V2.includes(s)&&(e=await Cs.getMemos()),e}}var cs=(t=>(t[t.text=0]="text",t[t.embedded=1]="embedded",t[t.href=2]="href",t[t.tag=3]="tag",t[t.backlinks=4]="backlinks",t[t.resource=5]="resource",t))(cs||{});const Mo={image:"image",video:"video"};var Ms=(t=>(t[t.blockId=0]="blockId",t[t.path=1]="path",t))(Ms||{});const Nn="custom-memo-id",Ya="custom-memo-uid";function Rp(t,e,s=!0){return s?t.split(e).filter(n=>!K(n.trim())):t.split(e)}class et{static async getDocumentBlockByName(e){let s=`SELECT * FROM blocks WHERE content='${e}' && type='d'`;return await ci(s)}static async getDocumentIdByName(e){let s=exports.pluginConfigData.base.notebook,n=await di(s);if(K(n))return;let i=n.conf.refCreateSaveBox===""?s:n.conf.refCreateSaveBox,o=n.conf.refCreateSavePath,f,c=await this.getDocumentBlockByName(e);if(K(c)||c.length===0){let h=`${o}/${e}`;f=await yi(i,h,"")}else f=c[0].id;return f}static async getDocumentIdByHPath(e,s){let n=await mh(e,s);if(!K(n)&&n.length>0)return n[0];const i=await yi(e,s,"");if(exports.pluginConfigData.base.syncPlan===ot.dailyNotes&&exports.pluginConfigData.base.useTemplate){let f=(await di(exports.pluginConfigData.base.notebook)).conf.dailyNoteTemplatePath;if(K(f))return i;f=(await Fe("/api/system/getConf")).conf.system.dataDir+"/templates"+f;const h=await wh(i,f);await ki("dom",h.content,i)}return i}static async getAttributes(e,s){let n=`SELECT * FROM attributes WHERE name='${e}' && value='${s}'`;return await ci(n)}static async getAttrByName(e){let s=`SELECT * FROM attributes WHERE name='${e}'`;return await ci(s)}static getBlockId(e){return e[0].doOperations[0].id}static async getDailyNotePath(e,s){let n="";if(K(exports.pluginConfigData.base.docPath)){let f=await di(e);if(K(f))return;n=f.conf.dailyNoteSavePath}else n=exports.pluginConfigData.base.docPath;let o=`toDate "2006-01-02" "${Yp(s)}"`;return n=n.replace(/now/g,o),await bh(n)}static async getDailyNotePageId(e,s){let n=await et.getDailyNotePath(e,s),i=await et.getDocumentIdByHPath(e,n);const o=N(s).format("YYYYMMDD");let f={},c=`custom-dailynote-${o}`;return f[c]=o,await xi(i,f),i}static async appendDailyNoteBlockByDatetime(e,s,n){let i=await et.getDailyNotePageId(e,n);return await ma("markdown",s,i)}static async prependDailyNoteBlockByDatetime(e,s,n){let i=await et.getDailyNotePageId(e,n);return await ki("markdown",s,i)}}class fs{static handleTags(e){let s=dt.tag,n;if(exports.pluginConfigData.advanced.isSuperLabel){const i=exports.pluginConfigData.advanced.labelName;n=e.replace(s,o=>`${i}/${o}#`)}else n=e.replace(s,i=>`${i}#`);return n}static handleTagBlock(e){const s=/([^#]*)(#)/;return e.replace(s,`$1 $2`)}static handleHref(e){let s=dt.href;return e.replace(s,n=>`[${n}](${n})`)}static async handleBacklinks(e){let s=dt.backlinks,n=e.match(s);for(let i of n){let o=await et.getDocumentIdByName(i);e=e.replace(`((${i}))`,`((${o} "${i}"))`)}return e}static handleEmbeddedContent(e){let s=dt.embedded;return e.match(s)[0].split("/").pop()}static handleImage(e,s){return`![${e}](${s})`}static handleResource(e,s){return`[${e}](${s})`}static handleVideo(e){return``}}class js{constructor(){Le(this,"relations");Le(this,"resources");Le(this,"newMemos");this.newMemos=[],this.relations=[],this.resources=[]}async handleMemos(e){for(let s of e)this.newMemos.push(await this.handelMemo(s))}async handelMemo(e){C(exports.pluginConfigData.debug.isDebug,"开始处理 Memos",e);let s=this.getMemoId(e),n=this.getMemoUid(e),i=this.getUpdateTime(e),o=`${i}・#${s}`,f=await this.getContents(e);this.handleResources(e,f),this.handleRelations(e);let c={id:s,uid:n,title:o,updateTime:i,contents:f,memo:e};return C(exports.pluginConfigData.debug.isDebug,"处理结果",c),c}async getContents(e){let s=[],n="",i=Rp(e.content,` `,!1);C(exports.pluginConfigData.debug.isDebug,"内容根据换行符拆分成列表",i);let o=dt.embedded;for(let f=0;f{const o=new Date(n.updateTime).getTime(),f=new Date(i.updateTime).getTime();return s?o-f:f-o})}}class Fn extends js{getMemoId(e){return e.id.toString()}getMemoUid(e){return e.name}getCreateTime(e){return Yt(e.createdTs)}getUpdateTime(e){return Yt(e.updatedTs)}handleRelations(e){let s=e.relationList;for(let n of s)this.relations.some(o=>n.memoId===o.memoId&&n.relatedMemoId===o.relatedMemoId)||this.relations.push(n)}handleResources(e,s){let n=e.resourceList;this.getResourceContents(s,n),this.resources=this.resources.concat(n)}getResourcePath(e){let s=e.filename,n=e.id.toString(),i=e.updatedTs,o=s.split(".").pop();return`${exports.pluginConfigData.base.resourceSavePath}/${n}_${i}.${o}`}static getResourcePathString(e){return new Fn().getResourcePath(e)}static async run(e){C(exports.pluginConfigData.debug.isDebug,"数据处理","",!0);let s=new Fn;await s.handleMemos(e.new);let n={resources:s.resources,relations:s.relations,oldMemos:e.old,newMemos:s.newMemos};return C(exports.pluginConfigData.debug.isDebug,"数据处理结果",n),n}}class Nl{constructor(e){Le(this,"memoIdLinkBlockId");Le(this,"memoUidLinkBlockId");Le(this,"blockIdLinkEmbeddedContent");Le(this,"data");Le(this,"deleteList");Le(this,"nowDeleteMode");this.memoIdLinkBlockId={},this.memoUidLinkBlockId={},this.blockIdLinkEmbeddedContent={},this.data=e,this.deleteList=[],exports.pluginConfigData.base.syncPlan===ot.singleDoc?this.nowDeleteMode=Ms.path:this.nowDeleteMode=Ms.blockId}async main(){await this.initData(),await this.saveData(),await this.clearData()}async initData(){C(exports.pluginConfigData.debug.isDebug,"正在初始化数据..."),await this.initDict(),C(exports.pluginConfigData.debug.isDebug,"初始化完成!"),C(exports.pluginConfigData.debug.isDebug,"正在更新删除列表..."),await this.updateDeleteList(),C(exports.pluginConfigData.debug.isDebug,"更新完成!")}async initDict(){await this.initDictByAttrName(Nn,this.memoIdLinkBlockId),C(exports.pluginConfigData.debug.isDebug,"MemoId: BlockId",this.memoIdLinkBlockId),await this.initDictByAttrName(Ya,this.memoUidLinkBlockId),C(exports.pluginConfigData.debug.isDebug,"MemoUid: BlockId",this.memoUidLinkBlockId)}async initDictByAttrName(e,s){let n=await et.getAttrByName(e);if(!K(n)&&n.length>0)for(let i of n)s[i.value]=i.block_id}async updateDeleteList(){this.nowDeleteMode===Ms.blockId?await this.updateDeleteListById():this.nowDeleteMode===Ms.path&&await this.updateDeleteListByPath(),C(exports.pluginConfigData.debug.isDebug,"删除列表",this.deleteList)}async updateDeleteListById(){for(let e of this.data.oldMemos){let s=this.getMemoId(e),n=this.memoIdLinkBlockId[s];K(n)?C(exports.pluginConfigData.debug.isDebug,"未找到对应删除数据",s):(C(exports.pluginConfigData.debug.isDebug,"已找到对应删除数据",s),this.deleteList.push(n))}}async updateDeleteListByPath(){for(let e of this.data.oldMemos){let s=this.getMemoId(e),n=await et.getAttributes(Nn,s);if(K(n)||n.length===0)C(exports.pluginConfigData.debug.isDebug,"未找到对应删除数据",s);else{C(exports.pluginConfigData.debug.isDebug,"已找到对应删除数据",s);let i=n[0].path;this.deleteList.push(i)}}}async saveData(){C(exports.pluginConfigData.debug.isDebug,"正在批量写入思源..."),await this.batchSave(),C(exports.pluginConfigData.debug.isDebug,"写入完成!"),C(exports.pluginConfigData.debug.isDebug,"正在批量处理引用..."),await this.handleRelations(),C(exports.pluginConfigData.debug.isDebug,"引用处理完成!"),C(exports.pluginConfigData.debug.isDebug,"正在批量处理嵌入内容..."),await this.handleEmbeddedContents(),C(exports.pluginConfigData.debug.isDebug,"嵌入内容处理完成!")}async batchSave(){exports.pluginConfigData.base.syncPlan===ot.singleDoc?await this.batchSaveSingleDocument():exports.pluginConfigData.base.syncPlan===ot.sameDoc?await this.batchSaveSameDocument():exports.pluginConfigData.base.syncPlan===ot.dailyNotes&&await this.batchSaveDailyNotes()}async batchSaveSingleDocument(){exports.pluginConfigData.base.memosSort===ds.asc?js.sortMemos(this.data.newMemos,!0):exports.pluginConfigData.base.memosSort===ds.desc&&js.sortMemos(this.data.newMemos,!1);for(let e of this.data.newMemos)await this.saveSingleDocument(e)}async saveSingleDocument(e){let s=exports.pluginConfigData.base.notebook,n=`${exports.pluginConfigData.base.docPath}/${e.title}`,i=e.contents,o=i.length>0?i[0].content:"",f=await yi(s,n,o);if(K(f)){C(exports.pluginConfigData.debug.isDebug,"获取页面失败!");return}if(i[0].type===cs.embedded){let h=await go(f);if(!K(h)&&h.length>0){let _=h[0].id;this.blockIdLinkEmbeddedContent[_]=i[0].content}}let c=i.slice(1);await this.saveContents(f,c),await this.saveAfter(f,e)}async batchSaveSameDocument(){js.sortMemos(this.data.newMemos,!0);for(let e of this.data.newMemos)C(exports.pluginConfigData.debug.isDebug,"正在写入",e),await this.saveSameDocument(e),C(exports.pluginConfigData.debug.isDebug,`Memos/${e.id} 写入完成`)}async saveSameDocument(e){let s=exports.pluginConfigData.base.notebook,n=exports.pluginConfigData.base.docPath,i,o=`- ${e.title}`,f=await et.getDocumentIdByHPath(s,n);if(K(f)){C(exports.pluginConfigData.debug.isDebug,"文档ID获取失败",f);return}if(exports.pluginConfigData.base.memosSort===ds.asc)i=await ma("markdown",o,f);else if(exports.pluginConfigData.base.memosSort===ds.desc)i=await ki("markdown",o,f);else return;await this.saveBlocks(i,e)}async batchSaveDailyNotes(){js.sortMemos(this.data.newMemos,!0);for(let e of this.data.newMemos)C(exports.pluginConfigData.debug.isDebug,"正在写入",e),await this.saveDailyNotes(e),C(exports.pluginConfigData.debug.isDebug,`Memos/${e.id} 写入完成`)}async saveDailyNotes(e){let s=exports.pluginConfigData.base.notebook,n=`- ${e.title}`,i=e.updateTime,o;if(exports.pluginConfigData.base.memosSort===ds.asc)o=await et.appendDailyNoteBlockByDatetime(s,n,i);else if(exports.pluginConfigData.base.memosSort===ds.desc)o=await et.prependDailyNoteBlockByDatetime(s,n,i);else return;await this.saveBlocks(o,e)}async saveBlocks(e,s){if(K(e)||e.length===0){C(exports.pluginConfigData.debug.isDebug,"列表块ID获取失败",e);return}let n=et.getBlockId(e),i=await go(n);if(K(i)||i.length===0){C(exports.pluginConfigData.debug.isDebug,"标题块ID获取失败",i);return}let o=i[0].id,f=s.contents;await this.saveContents(o,f),await this.saveAfter(o,s)}async saveContents(e,s){for(let n of s){let i=await ma("markdown",n.content,e);if(!K(i)&&n.type===cs.embedded){let o=et.getBlockId(i);this.blockIdLinkEmbeddedContent[o]=n.content}}}async saveAfter(e,s){await this.updateDict(e,s),await this.setCustomAttrs(e,s)}async updateDict(e,s){C(exports.pluginConfigData.debug.isDebug,"正在更新字典..."),this.memoIdLinkBlockId[s.id]=e,this.memoUidLinkBlockId[s.uid]=e,C(exports.pluginConfigData.debug.isDebug,"更新完成!")}async setCustomAttrs(e,s){C(exports.pluginConfigData.debug.isDebug,"正在设置块属性...");let n={};n[Nn]=s.id,n[Ya]=s.uid,await xi(e,n),C(exports.pluginConfigData.debug.isDebug,"设置完成!")}async handleRelation(e,s,n){const i=`((${s} "@${n}"))`;await ma("markdown",i,e)}async handleEmbeddedContents(){for(let e in this.blockIdLinkEmbeddedContent){let s=this.blockIdLinkEmbeddedContent[e],n=this.memoUidLinkBlockId[s];await this.handleEmbeddedContent(e,n)}}async handleEmbeddedContent(e,s){let n=`{{select * from blocks where id="${s}"}}`;await gh("markdown",n,e)}async clearData(){C(exports.pluginConfigData.debug.isDebug,"正在清理旧数据..."),this.nowDeleteMode===Ms.blockId?await this.deleteIdList():this.nowDeleteMode===Ms.path&&await this.deletePathList(),C(exports.pluginConfigData.debug.isDebug,"清理完成!")}async deleteIdList(){for(let e of this.deleteList)await _h(e)}async deletePathList(){for(let e of this.deleteList)await hh(exports.pluginConfigData.base.notebook,e)}}class ir extends Nl{getMemoId(e){return e.id.toString()}async handleRelations(){for(let e of this.data.relations){let s=e.memoId.toString(),n=e.relatedMemoId.toString(),i=this.memoIdLinkBlockId[s],o=this.memoIdLinkBlockId[n];await this.handleRelation(i,o,n)}}static async run(e){await new ir(e).main()}}class Ip{static async downloadResource(e){for(let s of e){if(!K(s.externalLink))continue;let n=s.uid,i=await $n.downloadResource(n);if(i.status!==Eo.OK){C(exports.pluginConfigData.debug.isDebug,"下载失败",i);continue}let o=await i.blob(),f=`data/${Fn.getResourcePathString(s)}`;await xo(f,!1,o)}}static async run(){C(exports.pluginConfigData.debug.isDebug,"数据拉取","",!0);let e=await $n.getMemos();C(exports.pluginConfigData.debug.isDebug,"数据拉取完成","",!0),C(exports.pluginConfigData.debug.isDebug,"数据处理","",!0);let s=await Fn.run(e);C(exports.pluginConfigData.debug.isDebug,"数据处理完成","",!0),C(exports.pluginConfigData.debug.isDebug,"资源下载","",!0),await this.downloadResource(s.resources),C(exports.pluginConfigData.debug.isDebug,"资源下载完成","",!0),C(exports.pluginConfigData.debug.isDebug,"数据同步","",!0),await ir.run(s),C(exports.pluginConfigData.debug.isDebug,"数据同步完成","",!0)}}class sn extends js{async handelMemoV0240(e){C(exports.pluginConfigData.debug.isDebug,"开始处理 Memos",e);let s=this.getMemoId(e),n=s,i=this.getUpdateTime(e),o;if(exports.pluginConfigData.advanced.showCreateTime){let h=this.getCreateTime(e);o=`${i} <${h}>`}else o=`${i}`;let f=await this.getContents(e);this.handleResources(e,f),this.handleRelations(e);let c={id:s,uid:n,title:o,updateTime:i,contents:f,memo:e};return C(exports.pluginConfigData.debug.isDebug,"处理结果",c),c}async handelMemo(e){return Se.V2_Y2025_M02_D05.includes(exports.pluginConfigData.base.version)?this.handelMemoV0240(e):super.handelMemo(e)}getMemoId(e){return e.name.split("/").pop()}getMemoUid(e){return e.uid}getCreateTime(e){return Yt(Cn(e.createTime))}getUpdateTime(e){return Yt(Cn(e.updateTime))}handleRelations(e){let s=e.relations;for(let n of s){let i;i=this.relations.some(o=>n.memo===o.memo&&n.relatedMemo===o.relatedMemo),i||this.relations.push(n)}}handleResources(e,s){let n=e.resources;this.getResourceContents(s,n),this.resources=this.resources.concat(n)}getResourcePath(e){let s=e.filename,n=e.name.split("/").pop(),i=Mi(Cn(e.createTime)).unix(),o=s.split(".").pop();return`${exports.pluginConfigData.base.resourceSavePath}/${n}_${i}.${o}`}static getResourcePathString(e){return new sn().getResourcePath(e)}static async run(e){let s=new sn;await s.handleMemos(e.new);let n={resources:s.resources,relations:s.relations,oldMemos:e.old,newMemos:s.newMemos};return C(exports.pluginConfigData.debug.isDebug,"数据处理结果",n),n}}class rr extends Nl{getMemoId(e){return e.name.split("/").pop()}async handleRelations(){C(exports.pluginConfigData.debug.isDebug,"需处理的引用列表",this.data.relations);for(let e of this.data.relations){if(e.type===ch.comment){C(exports.pluginConfigData.debug.isDebug,"该条引用位于评论,跳过处理",e);continue}let s,n;Se.V2_Y2025_M02_D05.includes(exports.pluginConfigData.base.version)?(s=e.memo.uid,n=e.relatedMemo.uid):(s=e.memo.split("/").pop(),n=e.relatedMemo.split("/").pop());let i=this.memoIdLinkBlockId[s],o=this.memoIdLinkBlockId[n];await this.handleRelation(i,o,n)}}static async run(e){await new rr(e).main()}}class or extends sn{handleRelations(e){let s=e.relations;for(let n of s){let i;i=this.relations.some(o=>n.memo.name===o.memo.name&&n.relatedMemo.name===o.relatedMemo.name),i||this.relations.push(n)}}static async run(e){let s=new or;await s.handleMemos(e.new);let n={resources:s.resources,relations:s.relations,oldMemos:e.old,newMemos:s.newMemos};return C(exports.pluginConfigData.debug.isDebug,"数据处理结果",n),n}}class xp{static async downloadResources(e){for(let s of e){let n=await Cs.downloadResource(s);if(C(exports.pluginConfigData.debug.isDebug,"响应结果",n),K(n))continue;let i=await n.blob(),o=`data/${sn.getResourcePathString(s)}`;await xo(o,!1,i)}}static async run(){C(exports.pluginConfigData.debug.isDebug,"数据拉取","",!0);let e=await Cs.getMemos();C(exports.pluginConfigData.debug.isDebug,"数据拉取完成","",!0),C(exports.pluginConfigData.debug.isDebug,"数据处理","",!0);let s;Se.V2_Y2025_M02_D05.includes(exports.pluginConfigData.base.version)?s=await or.run(e):s=await sn.run(e),C(exports.pluginConfigData.debug.isDebug,"数据处理完成","",!0),C(exports.pluginConfigData.debug.isDebug,"资源下载","",!0),await this.downloadResources(s.resources),C(exports.pluginConfigData.debug.isDebug,"资源下载完成","",!0),C(exports.pluginConfigData.debug.isDebug,"数据同步","",!0),await rr.run(s),C(exports.pluginConfigData.debug.isDebug,"数据同步完成","",!0)}}class Ep{static async runSync(){const e=exports.pluginConfigData.base.version;Se.V1.includes(e)?await Ip.run():Se.V2.includes(e)&&await xp.run()}}class Pl{static async check(){const e=[ze.all,ze.syncNoTag,ze.notSyncNoTag],s=[{value:exports.pluginConfigData.base.version,text:"Memos 版本"},{value:exports.pluginConfigData.base.host,text:"服务器地址"},{value:exports.pluginConfigData.base.token,text:"Access Token"},{value:exports.pluginConfigData.base.syncPlan,text:"同步方案"},{value:exports.pluginConfigData.base.notebook,text:"同步笔记本"},{value:exports.pluginConfigData.base.resourceSavePath,text:"资源保存路径"},{value:exports.pluginConfigData.base.memosSort,text:"数据排序"},{value:exports.pluginConfigData.base.checkSyncMemos,text:"检查同步数据"},{value:exports.pluginConfigData.advanced.formatDataTime,text:"格式化标题时间"},{value:exports.pluginConfigData.advanced.showCreateTime,text:"显示创建时间开关"},{value:exports.pluginConfigData.advanced.isHandleHref,text:"识别超链接开关"},{value:exports.pluginConfigData.advanced.isHandleBacklinks,text:"识别双向链接开关"},{value:exports.pluginConfigData.advanced.isHandleVideo,text:"优化视频样式开关"},{value:exports.pluginConfigData.advanced.isSuperLabel,text:"优化标签管理开头"},{value:exports.pluginConfigData.filter.lastSyncTime,text:"上次同步时间"},{value:exports.pluginConfigData.debug.isDebug,text:"调试模式开关"}],n=[{text:"是否使用模板",flag:exports.pluginConfigData.base.syncPlan===ot.dailyNotes,value:exports.pluginConfigData.base.useTemplate},{text:"文档路径",flag:exports.pluginConfigData.base.syncPlan===ot.sameDoc,value:exports.pluginConfigData.base.docPath},{text:"需要优化的视频样式",flag:exports.pluginConfigData.advanced.isHandleVideo,value:exports.pluginConfigData.advanced.videoFormats},{text:"标签名称",flag:exports.pluginConfigData.advanced.isSuperLabel,value:exports.pluginConfigData.advanced.labelName},{text:"是否允许自动更新上次同步时间",flag:exports.pluginConfigData.debug.isDebug,value:exports.pluginConfigData.debug.isAutoUpdateTime},{text:"标签过滤模式",flag:Se.V2_LabelFilter.includes(exports.pluginConfigData.base.version),value:exports.pluginConfigData.filter.tagFilterMode},{text:"标签列表",flag:!e.includes(exports.pluginConfigData.filter.tagFilterMode),value:exports.pluginConfigData.filter.tagList}],i=[{flag:!0,value:exports.pluginConfigData.base.host,text:"服务器路径",check:[null,!1]},{flag:exports.pluginConfigData.base.syncPlan===ot.sameDoc,value:exports.pluginConfigData.base.docPath,text:"文档路径",check:[!0,!1]},{flag:!0,value:exports.pluginConfigData.base.resourceSavePath,text:"资源保存路径",check:[!1,!1]},{flag:exports.pluginConfigData.advanced.isSuperLabel,value:exports.pluginConfigData.advanced.labelName,text:"标签名称",check:[!1,!1]}];for(const h of s)if(K(h.value))return{flag:!1,tip:`请检查 ${h.text} 是否配置!`};for(const h of n)if(h.flag&&K(h.value))return{flag:!1,tip:`请检查 ${h.text} 是否配置!`};for(let h of i)if(h.flag){if(h.check[0]!==null){if(h.check[0]===!0&&!K(h.value)&&h.value.charAt(0)!=="/")return C(exports.pluginConfigData.debug.isDebug,`${h.text} 应当以'/'开头`),{flag:!1,tip:`请检查 ${h.text} 是否配置正确!`};if(h.check[0]===!1&&!K(h.value)&&h.value.charAt(0)==="/")return C(exports.pluginConfigData.debug.isDebug,`${h.text} 不应以'/'开头`),{flag:!1,tip:`请检查 ${h.text} 是否配置正确!`}}if(h.check[1]!==null){if(h.check[1]===!0&&!K(h.value)&&h.value.charAt(h.value.length-1)!=="/")return C(exports.pluginConfigData.debug.isDebug,`${h.text} 应当以'/'结尾`),{flag:!1,tip:`请检查 ${h.text} 是否配置正确!`};if(h.check[1]===!1&&!K(h.value)&&h.value.charAt(h.value.length-1)==="/")return C(exports.pluginConfigData.debug.isDebug,`${h.text} 不应以'/'结尾`),{flag:!1,tip:`请检查 ${h.text} 是否配置正确!`}}}return(await Io()).notebooks.map(h=>h.id).includes(exports.pluginConfigData.base.notebook)?{flag:!0,tip:"插件配置检查通过"}:{flag:!1,tip:"请检查 同步笔记本 是否配置!"}}}const Ie=class Ie{static startSync(){Ie.status=zt.downloading,Ie.backupIcon(),Ie.updateIcon()}static syncError(){Ie.status=zt.completed,Ie.recoveryIcon()}static syncSuccess(){Ie.status=zt.completed,Ie.updateIcon()}static canSync(){Ie.status=zt.waiting,Ie.updateIcon()}static isSyncing(){return Ie.status===zt.downloading}static updateIcon(){let e;Ie.status===zt.waiting?e=Os.getIcon().waiting.use:Ie.status===zt.downloading?e=Os.getIcon().downloading.use:Ie.status===zt.completed&&(e=Os.getIcon().completed.use),exports.isMobile&&(e+='Memos 同步助手'),exports.topBarElement.innerHTML=e}static backupIcon(){Ie.iconBefore=exports.topBarElement.innerHTML}static recoveryIcon(){K(Ie.iconBefore)||(exports.topBarElement.innerHTML=Ie.iconBefore)}};Le(Ie,"status"),Le(Ie,"iconBefore");let hs=Ie;async function Fp(){C(exports.pluginConfigData.debug.isDebug,"正在检查插件配置...");const t=await Pl.check();return t.flag?await tt(t.tip):await tn(t.tip),C(exports.pluginConfigData.debug.isDebug,"检查完成"),t}async function Lp(){C(exports.pluginConfigData.debug.isDebug,"正在校验授权码...");try{await ar.checkAccessToken()?await tt("校验通过"):await tn("校验失败,请检查服务器地址和授权码是否配置正确")}catch(t){await tn(`校验失败: ${t.message}`)}C(exports.pluginConfigData.debug.isDebug,"校验完成")}async function Wp(){if(exports.pluginConfigData.base.checkSyncMemos===Ii.no)return;C(exports.pluginConfigData.debug.isDebug,"正在检查是否存在可同步的新数据...");const t=await Pl.check();if(!t.flag){C(exports.pluginConfigData.debug.isDebug,t.tip);return}await ar.checkNew()&&(hs.canSync(),await tt("检查到可同步的新数据")),C(exports.pluginConfigData.debug.isDebug,"检查完成")}async function Ap(){C(exports.pluginConfigData.debug.isDebug,"开始测试","",!0),C(exports.pluginConfigData.debug.isDebug,"测试结束","",!0)}async function Up(t){try{if(hs.isSyncing()){await tt("同步中,请稍候");return}else await tt("正在进行同步前检查"),hs.startSync();if(!(await Fp()).flag){hs.syncError();return}if(await ar.checkNew()?(await tt("开始同步"),await Ep.runSync(),await tt("同步完成!")):await tt("暂无新数据!"),!(exports.pluginConfigData.debug.isDebug&&exports.pluginConfigData.debug.isAutoUpdateTime===!1)){C(exports.pluginConfigData.debug.isDebug,"正在修改上次同步时间……");let n=exports.pluginConfigData;await new Promise(i=>{setTimeout(()=>{n.filter.lastSyncTime=N().format("YYYY-MM-DD HH:mm:ss"),C(exports.pluginConfigData.debug.isDebug,"配置",n),i()},1e3)}),await t.updateConfig(n),C(exports.pluginConfigData.debug.isDebug,"上次同步时间修改完成!")}hs.syncSuccess()}catch(e){throw hs.syncError(),await tn(`${bi}:${e}`),new Error(e)}finally{}}let Tn=!1;async function Hp(){if(Tn){await tt("修复中,请稍候……");return}else await tt("正在检测是否有可修复的数据"),Tn=!0;let t=await Vp();if(K(t)){Tn=!1;return}if(t.length===0){await tt("暂无可修复数据!"),Tn=!1;return}await tt("修复开始");let e=exports.pluginConfigData.base.version;if(Se.V1.includes(e))for(let s of t){let n=await Sh(s.memoId);K(n)||(s.uid=n.name)}else if(Se.V2.includes(e))for(let s of t){let n=await Pp(s.memoId);K(n)||(s.uid=n.uid)}else await tn("Memos 版本错误");for(let s of t){let n={};n[Ya]=s.uid,await xi(s.blockId,n)}await tt("修复完成"),Tn=!1}async function Vp(){let t=[],e=[Nn,Ya],s=await et.getAttrByName(Nn);if(K(s)){await tn("无法获取块属性!");return}if(s.length===0){await tt("暂无可修复数据!");return}for(let n of s){let i=n.block_id,o=await ph(i);if(K(o))return;if(!Bp(o,e)){let c={memoId:n.value,blockId:i};t.push(c)}}return t}function Bp(t,e){for(const s of e)if(!(s in t)||K(t[s]))return!1;return!0}function Gp(t){let e,s;return e=new De({props:{slot:"input",type:re.button,settingKey:"Check",settingValue:"校验"}}),e.$on("clicked",Lp),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p:Ct,i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function jp(t){let e,s;return e=new De({props:{slot:"input",type:re.select,settingKey:"Version",settingValue:t[0].base.version,options:oh}}),e.$on("changed",t[15]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].base.version),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function zp(t){let e,s;return e=new De({props:{slot:"input",type:re.text,settingKey:"Host",settingValue:t[0].base.host,placeholder:"支持域名和IP地址,注意不要以 '/' 结尾",block:!0}}),e.$on("changed",t[16]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].base.host),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function qp(t){let e,s;return e=new De({props:{slot:"input",type:re.text,settingKey:"Token",settingValue:t[0].base.token,block:!0}}),e.$on("changed",t[17]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].base.token),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function Zp(t){let e,s;return e=new De({props:{slot:"input",type:re.select,settingKey:"SyncPlan",settingValue:t[0].base.syncPlan,options:Ro}}),e.$on("changed",t[18]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].base.syncPlan),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function Jp(t){let e,s;return e=new De({props:{slot:"input",type:re.select,settingKey:"notebook",settingValue:t[0].base.notebook,options:t[1]}}),e.$on("changed",t[19]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].base.notebook),i[0]&2&&(o.options=n[1]),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function Qp(t){let e,s;return e=new De({props:{slot:"input",type:re.text,settingKey:"docPath",settingValue:t[0].base.docPath,placeholder:"请以'/'开头进行填写"}}),e.$on("changed",t[20]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].base.docPath),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function Xp(t){let e,s;return e=new De({props:{slot:"input",type:re.checkbox,settingKey:"UseTemplate",settingValue:t[0].base.useTemplate}}),e.$on("changed",t[21]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].base.useTemplate),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function Kp(t){let e,s;return e=new De({props:{slot:"input",type:re.text,settingKey:"resourceSavePath",settingValue:t[0].base.resourceSavePath,placeholder:"开头和结尾请不要保存 '/'"}}),e.$on("changed",t[22]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].base.resourceSavePath),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function e0(t){let e,s;return e=new De({props:{slot:"input",type:re.select,settingKey:"MemosSort",settingValue:t[0].base.memosSort,options:lh}}),e.$on("changed",t[23]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].base.memosSort),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function t0(t){let e,s;return e=new De({props:{slot:"input",type:re.select,settingKey:"checkMemosUpdate",settingValue:t[0].base.checkSyncMemos,options:uh}}),e.$on("changed",t[24]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].base.checkSyncMemos),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function s0(t){let e,s,n,i,o,f,c,h,_,k,$,p,b,g,y,w,H,be,v,T,ne,_e;return e=new ke({props:{title:"Access Token 校验",text:"校验 Access Token 是否有效",$$slots:{input:[Gp]},$$scope:{ctx:t}}}),n=new ke({props:{title:"Memos 版本",text:"当前服务器上运行的 Memos 版本",isTip:!1,tipTest:"v0.22及以上版本不适用于docker版思源笔记",$$slots:{input:[jp]},$$scope:{ctx:t}}}),o=new ke({props:{title:"服务器地址",text:"访问 Memos 的地址",block:!0,isRequired:!0,$$slots:{input:[zp]},$$scope:{ctx:t}}}),c=new ke({props:{title:"Access Token",text:"请在 Memos 设置页面获取",block:!0,isRequired:!0,$$slots:{input:[qp]},$$scope:{ctx:t}}}),_=new ke({props:{title:"同步方案",text:t[2],$$slots:{input:[Zp]},$$scope:{ctx:t}}}),$=new ke({props:{title:"同步笔记本",text:"保存同步数据的笔记本",isRequired:!0,$$slots:{input:[Jp]},$$scope:{ctx:t}}}),b=new ke({props:{title:t[3],text:t[6],isRequired:t[5],isShow:t[4],$$slots:{input:[Qp]},$$scope:{ctx:t}}}),y=new ke({props:{title:"是否使用模板",text:"需自动配置笔记本设置中的模板路径",isShow:t[7],isTip:!0,tipTest:"与降序排序功能冲突",$$slots:{input:[Xp]},$$scope:{ctx:t}}}),H=new ke({props:{title:"资源保存路径",text:"保存 Memos 资源的路径",isRequired:!0,isShow:!0,$$slots:{input:[Kp]},$$scope:{ctx:t}}}),v=new ke({props:{title:"数据排序",text:"根据更新日期对同步的数据进行升序或降序排序",isTip:!0,tipTest:"当同步方案为 "+Ro[1].text+" 时,本功能不生效",$$slots:{input:[e0]},$$scope:{ctx:t}}}),ne=new ke({props:{title:"检查可同步数据",text:"是否在思源笔记启动后自动检查可同步的数据",$$slots:{input:[t0]},$$scope:{ctx:t}}}),{c(){U(e.$$.fragment),s=te(),U(n.$$.fragment),i=te(),U(o.$$.fragment),f=te(),U(c.$$.fragment),h=te(),U(_.$$.fragment),k=te(),U($.$$.fragment),p=te(),U(b.$$.fragment),g=te(),U(y.$$.fragment),w=te(),U(H.$$.fragment),be=te(),U(v.$$.fragment),T=te(),U(ne.$$.fragment)},m(S,M){L(e,S,M),j(S,s,M),L(n,S,M),j(S,i,M),L(o,S,M),j(S,f,M),L(c,S,M),j(S,h,M),L(_,S,M),j(S,k,M),L($,S,M),j(S,p,M),L(b,S,M),j(S,g,M),L(y,S,M),j(S,w,M),L(H,S,M),j(S,be,M),L(v,S,M),j(S,T,M),L(ne,S,M),_e=!0},p(S,M){const ye={};M[1]&512&&(ye.$$scope={dirty:M,ctx:S}),e.$set(ye);const me={};M[0]&1|M[1]&512&&(me.$$scope={dirty:M,ctx:S}),n.$set(me);const qe={};M[0]&1|M[1]&512&&(qe.$$scope={dirty:M,ctx:S}),o.$set(qe);const nt={};M[0]&1|M[1]&512&&(nt.$$scope={dirty:M,ctx:S}),c.$set(nt);const ve={};M[0]&4&&(ve.text=S[2]),M[0]&1|M[1]&512&&(ve.$$scope={dirty:M,ctx:S}),_.$set(ve);const _t={};M[0]&3|M[1]&512&&(_t.$$scope={dirty:M,ctx:S}),$.$set(_t);const Ze={};M[0]&8&&(Ze.title=S[3]),M[0]&64&&(Ze.text=S[6]),M[0]&32&&(Ze.isRequired=S[5]),M[0]&16&&(Ze.isShow=S[4]),M[0]&1|M[1]&512&&(Ze.$$scope={dirty:M,ctx:S}),b.$set(Ze);const Je={};M[0]&128&&(Je.isShow=S[7]),M[0]&1|M[1]&512&&(Je.$$scope={dirty:M,ctx:S}),y.$set(Je);const Qe={};M[0]&1|M[1]&512&&(Qe.$$scope={dirty:M,ctx:S}),H.$set(Qe);const It={};M[0]&1|M[1]&512&&(It.$$scope={dirty:M,ctx:S}),v.$set(It);const St={};M[0]&1|M[1]&512&&(St.$$scope={dirty:M,ctx:S}),ne.$set(St)},i(S){_e||(P(e.$$.fragment,S),P(n.$$.fragment,S),P(o.$$.fragment,S),P(c.$$.fragment,S),P(_.$$.fragment,S),P($.$$.fragment,S),P(b.$$.fragment,S),P(y.$$.fragment,S),P(H.$$.fragment,S),P(v.$$.fragment,S),P(ne.$$.fragment,S),_e=!0)},o(S){R(e.$$.fragment,S),R(n.$$.fragment,S),R(o.$$.fragment,S),R(c.$$.fragment,S),R(_.$$.fragment,S),R($.$$.fragment,S),R(b.$$.fragment,S),R(y.$$.fragment,S),R(H.$$.fragment,S),R(v.$$.fragment,S),R(ne.$$.fragment,S),_e=!1},d(S){S&&(B(s),B(i),B(f),B(h),B(k),B(p),B(g),B(w),B(be),B(T)),W(e,S),W(n,S),W(o,S),W(c,S),W(_,S),W($,S),W(b,S),W(y,S),W(H,S),W(v,S),W(ne,S)}}}function n0(t){let e,s;return e=new De({props:{slot:"input",type:re.button,settingKey:"Repair",settingValue:"修复"}}),e.$on("clicked",Hp),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p:Ct,i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function a0(t){let e,s;return e=new De({props:{slot:"input",type:re.text,settingKey:"formatDataTime",settingValue:t[0].advanced.formatDataTime}}),e.$on("changed",t[25]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].advanced.formatDataTime),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function i0(t){let e,s;return e=new De({props:{slot:"input",type:re.checkbox,settingKey:"ShowCreateTimeSwitch",settingValue:t[0].advanced.showCreateTime}}),e.$on("changed",t[26]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].advanced.showCreateTime),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function r0(t){let e,s;return e=new De({props:{slot:"input",type:re.checkbox,settingKey:"Href",settingValue:t[0].advanced.isHandleHref}}),e.$on("changed",t[27]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].advanced.isHandleHref),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function o0(t){let e,s;return e=new De({props:{slot:"input",type:re.checkbox,settingKey:"Links",settingValue:t[0].advanced.isHandleBacklinks}}),e.$on("changed",t[28]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].advanced.isHandleBacklinks),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function l0(t){let e,s;return e=new De({props:{slot:"input",type:re.checkbox,settingKey:"ImproveVideoStyle",settingValue:t[0].advanced.isHandleVideo}}),e.$on("changed",t[29]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].advanced.isHandleVideo),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function u0(t){let e,s;return e=new De({props:{slot:"input",type:re.textarea,settingKey:"VideoFormats",settingValue:t[0].advanced.videoFormats?t[0].advanced.videoFormats:"",block:!0,height:100}}),e.$on("changed",t[30]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].advanced.videoFormats?n[0].advanced.videoFormats:""),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function f0(t){let e,s;return e=new De({props:{slot:"input",type:re.checkbox,settingKey:"LabelTop",settingValue:t[0].advanced.isSuperLabel}}),e.$on("changed",t[31]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].advanced.isSuperLabel),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function d0(t){let e,s;return e=new De({props:{slot:"input",type:re.text,settingKey:"LabelName",settingValue:t[0].advanced.labelName,placeholder:"请确认开头和结尾没有 '/'"}}),e.$on("changed",t[32]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].advanced.labelName),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function c0(t){let e,s,n,i,o,f,c,h,_,k,$,p,b,g,y,w,H,be;return e=new ke({props:{title:"修复",text:"修复旧版插件同步的数据以兼容嵌入内容功能",$$slots:{input:[n0]},$$scope:{ctx:t}}}),n=new ke({props:{title:"格式化标题时间",text:"默认为 YYYY-MM-DD HH:mm:ss",isRequired:!0,$$slots:{input:[a0]},$$scope:{ctx:t}}}),o=new ke({props:{title:"显示创建时间",text:"同步时写入创建时间",isTip:!0,tipTest:"不支持v0.21.0及以下版本",$$slots:{input:[i0]},$$scope:{ctx:t}}}),c=new ke({props:{title:"识别超链接",text:"识别超链接并转换成可点击打开的样式",$$slots:{input:[r0]},$$scope:{ctx:t}}}),_=new ke({props:{title:"识别双向链接",text:"识别双向链接符号(( ))并自动关联对应文档",isTip:!0,tipTest:"只支持文档块的匹配",$$slots:{input:[o0]},$$scope:{ctx:t}}}),$=new ke({props:{title:"优化视频样式",text:"识别指定格式的视频文件并转换成可点击播放的样式",$$slots:{input:[l0]},$$scope:{ctx:t}}}),b=new ke({props:{title:"需要优化的视频格式",text:"配置需要转换的视频文件格式,以英文分号 ; 分隔",block:!0,isRequired:!0,isShow:t[8],$$slots:{input:[u0]},$$scope:{ctx:t}}}),y=new ke({props:{title:"优化标签管理",text:"为所有的标签增加一个统一的上级标签",$$slots:{input:[f0]},$$scope:{ctx:t}}}),H=new ke({props:{title:"标签名称",text:"自定义上级标签的名称",isRequired:!0,isShow:t[9],$$slots:{input:[d0]},$$scope:{ctx:t}}}),{c(){U(e.$$.fragment),s=te(),U(n.$$.fragment),i=te(),U(o.$$.fragment),f=te(),U(c.$$.fragment),h=te(),U(_.$$.fragment),k=te(),U($.$$.fragment),p=te(),U(b.$$.fragment),g=te(),U(y.$$.fragment),w=te(),U(H.$$.fragment)},m(v,T){L(e,v,T),j(v,s,T),L(n,v,T),j(v,i,T),L(o,v,T),j(v,f,T),L(c,v,T),j(v,h,T),L(_,v,T),j(v,k,T),L($,v,T),j(v,p,T),L(b,v,T),j(v,g,T),L(y,v,T),j(v,w,T),L(H,v,T),be=!0},p(v,T){const ne={};T[1]&512&&(ne.$$scope={dirty:T,ctx:v}),e.$set(ne);const _e={};T[0]&1|T[1]&512&&(_e.$$scope={dirty:T,ctx:v}),n.$set(_e);const S={};T[0]&1|T[1]&512&&(S.$$scope={dirty:T,ctx:v}),o.$set(S);const M={};T[0]&1|T[1]&512&&(M.$$scope={dirty:T,ctx:v}),c.$set(M);const ye={};T[0]&1|T[1]&512&&(ye.$$scope={dirty:T,ctx:v}),_.$set(ye);const me={};T[0]&1|T[1]&512&&(me.$$scope={dirty:T,ctx:v}),$.$set(me);const qe={};T[0]&256&&(qe.isShow=v[8]),T[0]&1|T[1]&512&&(qe.$$scope={dirty:T,ctx:v}),b.$set(qe);const nt={};T[0]&1|T[1]&512&&(nt.$$scope={dirty:T,ctx:v}),y.$set(nt);const ve={};T[0]&512&&(ve.isShow=v[9]),T[0]&1|T[1]&512&&(ve.$$scope={dirty:T,ctx:v}),H.$set(ve)},i(v){be||(P(e.$$.fragment,v),P(n.$$.fragment,v),P(o.$$.fragment,v),P(c.$$.fragment,v),P(_.$$.fragment,v),P($.$$.fragment,v),P(b.$$.fragment,v),P(y.$$.fragment,v),P(H.$$.fragment,v),be=!0)},o(v){R(e.$$.fragment,v),R(n.$$.fragment,v),R(o.$$.fragment,v),R(c.$$.fragment,v),R(_.$$.fragment,v),R($.$$.fragment,v),R(b.$$.fragment,v),R(y.$$.fragment,v),R(H.$$.fragment,v),be=!1},d(v){v&&(B(s),B(i),B(f),B(h),B(k),B(p),B(g),B(w)),W(e,v),W(n,v),W(o,v),W(c,v),W(_,v),W($,v),W(b,v),W(y,v),W(H,v)}}}function h0(t){let e,s;return e=new De({props:{slot:"input",type:re.text,settingKey:"LastSyncTime",settingValue:t[0].filter.lastSyncTime,placeholder:"YYYY/MM/DD HH:mm:ss"}}),e.$on("changed",t[33]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].filter.lastSyncTime),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function m0(t){let e,s;return e=new De({props:{slot:"input",type:re.select,settingKey:"tagFilterMode",settingValue:t[0].filter.tagFilterMode,options:fh}}),e.$on("changed",t[34]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].filter.tagFilterMode),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function g0(t){let e,s;return e=new De({props:{slot:"input",type:re.textarea,settingKey:"tagList",settingValue:t[0].filter.tagList?t[0].filter.tagList:"",block:!0,height:100}}),e.$on("changed",t[35]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].filter.tagList?n[0].filter.tagList:""),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function _0(t){let e,s,n,i,o,f;return e=new ke({props:{title:"上次同步时间",text:"在同步完成后自动更新",$$slots:{input:[h0]},$$scope:{ctx:t}}}),n=new ke({props:{title:"标签过滤模式",text:"对数据进行标签过滤",isShow:t[10],$$slots:{input:[m0]},$$scope:{ctx:t}}}),o=new ke({props:{title:"配置标签",text:"配置允许同步或不允许同步的标签,以英文分号 ; 分隔",block:!0,isRequired:!0,isShow:t[11],$$slots:{input:[g0]},$$scope:{ctx:t}}}),{c(){U(e.$$.fragment),s=te(),U(n.$$.fragment),i=te(),U(o.$$.fragment)},m(c,h){L(e,c,h),j(c,s,h),L(n,c,h),j(c,i,h),L(o,c,h),f=!0},p(c,h){const _={};h[0]&1|h[1]&512&&(_.$$scope={dirty:h,ctx:c}),e.$set(_);const k={};h[0]&1024&&(k.isShow=c[10]),h[0]&1|h[1]&512&&(k.$$scope={dirty:h,ctx:c}),n.$set(k);const $={};h[0]&2048&&($.isShow=c[11]),h[0]&1|h[1]&512&&($.$$scope={dirty:h,ctx:c}),o.$set($)},i(c){f||(P(e.$$.fragment,c),P(n.$$.fragment,c),P(o.$$.fragment,c),f=!0)},o(c){R(e.$$.fragment,c),R(n.$$.fragment,c),R(o.$$.fragment,c),f=!1},d(c){c&&(B(s),B(i)),W(e,c),W(n,c),W(o,c)}}}function p0(t){let e,s;return e=new De({props:{slot:"input",type:re.checkbox,settingKey:"Debug",settingValue:t[0].debug.isDebug}}),e.$on("changed",t[36]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].debug.isDebug),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function w0(t){let e,s;return e=new De({props:{slot:"input",type:re.checkbox,settingKey:"autoUpdateTime",settingValue:t[0].debug.isAutoUpdateTime}}),e.$on("changed",t[37]),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&1&&(o.settingValue=n[0].debug.isAutoUpdateTime),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function b0(t){let e,s;return e=new De({props:{slot:"input",type:re.button,settingKey:"Test",settingValue:"测试"}}),e.$on("clicked",Ap),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p:Ct,i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function y0(t){let e,s,n,i,o,f;return e=new ke({props:{title:"调试模式",text:"开启后将在控制台输出操作日志",$$slots:{input:[p0]},$$scope:{ctx:t}}}),n=new ke({props:{text:"禁用后,在调试时将不会自动更新上次同步时间",title:"允许更新上次同步时间",isShow:t[0].debug.isDebug,$$slots:{input:[w0]},$$scope:{ctx:t}}}),o=new ke({props:{title:"测试",text:"测试功能",isShow:!1,$$slots:{input:[b0]},$$scope:{ctx:t}}}),{c(){U(e.$$.fragment),s=te(),U(n.$$.fragment),i=te(),U(o.$$.fragment)},m(c,h){L(e,c,h),j(c,s,h),L(n,c,h),j(c,i,h),L(o,c,h),f=!0},p(c,h){const _={};h[0]&1|h[1]&512&&(_.$$scope={dirty:h,ctx:c}),e.$set(_);const k={};h[0]&1&&(k.isShow=c[0].debug.isDebug),h[0]&1|h[1]&512&&(k.$$scope={dirty:h,ctx:c}),n.$set(k);const $={};h[1]&512&&($.$$scope={dirty:h,ctx:c}),o.$set($)},i(c){f||(P(e.$$.fragment,c),P(n.$$.fragment,c),P(o.$$.fragment,c),f=!0)},o(c){R(e.$$.fragment,c),R(n.$$.fragment,c),R(o.$$.fragment,c),f=!1},d(c){c&&(B(s),B(i)),W(e,c),W(n,c),W(o,c)}}}function k0(t){let e,s,n,i,o,f,c,h;return e=new ua({props:{display:jt[0].key===t[39],$$slots:{default:[s0]},$$scope:{ctx:t}}}),n=new ua({props:{display:jt[1].key===t[39],$$slots:{default:[c0]},$$scope:{ctx:t}}}),o=new ua({props:{display:jt[2].key===t[39],$$slots:{default:[_0]},$$scope:{ctx:t}}}),c=new ua({props:{display:jt[3].key===t[39],$$slots:{default:[y0]},$$scope:{ctx:t}}}),{c(){U(e.$$.fragment),s=te(),U(n.$$.fragment),i=te(),U(o.$$.fragment),f=te(),U(c.$$.fragment)},m(_,k){L(e,_,k),j(_,s,k),L(n,_,k),j(_,i,k),L(o,_,k),j(_,f,k),L(c,_,k),h=!0},p(_,k){const $={};k[1]&256&&($.display=jt[0].key===_[39]),k[0]&255|k[1]&512&&($.$$scope={dirty:k,ctx:_}),e.$set($);const p={};k[1]&256&&(p.display=jt[1].key===_[39]),k[0]&769|k[1]&512&&(p.$$scope={dirty:k,ctx:_}),n.$set(p);const b={};k[1]&256&&(b.display=jt[2].key===_[39]),k[0]&3073|k[1]&512&&(b.$$scope={dirty:k,ctx:_}),o.$set(b);const g={};k[1]&256&&(g.display=jt[3].key===_[39]),k[0]&1|k[1]&512&&(g.$$scope={dirty:k,ctx:_}),c.$set(g)},i(_){h||(P(e.$$.fragment,_),P(n.$$.fragment,_),P(o.$$.fragment,_),P(c.$$.fragment,_),h=!0)},o(_){R(e.$$.fragment,_),R(n.$$.fragment,_),R(o.$$.fragment,_),R(c.$$.fragment,_),h=!1},d(_){_&&(B(s),B(i),B(f)),W(e,_),W(n,_),W(o,_),W(c,_)}}}function D0(t){let e,s;return e=new Ac({props:{focus:t[12],panels:jt,$$slots:{default:[k0,({focus:n})=>({39:n}),({focus:n})=>[0,n?256:0]]},$$scope:{ctx:t}}}),{c(){U(e.$$.fragment)},m(n,i){L(e,n,i),s=!0},p(n,i){const o={};i[0]&4095|i[1]&768&&(o.$$scope={dirty:i,ctx:n}),e.$set(o)},i(n){s||(P(e.$$.fragment,n),s=!0)},o(n){R(e.$$.fragment,n),s=!1},d(n){W(e,n)}}}function v0(t,e,s){let{plugin:n}=e,{config:i}=e,{notebookOptions:o}=e,f=Po.base;function c(){n.updateConfig(i)}let h="",_="文档路径",k=!0,$=!1,p="",b=!1,g=!0,y=!0,w=!0,H=!0,be=[ze.all,ze.syncNoTag,ze.notSyncNoTag];const v=A=>{s(0,i.base.version=A.detail.value,i),c()},T=A=>{s(0,i.base.host=A.detail.value,i),c()},ne=A=>{s(0,i.base.token=A.detail.value,i),c()},_e=A=>{s(0,i.base.syncPlan=A.detail.value,i),c()},S=A=>{s(0,i.base.notebook=A.detail.value,i),c()},M=A=>{s(0,i.base.docPath=A.detail.value,i),c()},ye=A=>{s(0,i.base.useTemplate=A.detail.value,i),c()},me=A=>{s(0,i.base.resourceSavePath=A.detail.value,i),c()},qe=A=>{s(0,i.base.memosSort=A.detail.value,i),c()},nt=A=>{s(0,i.base.checkSyncMemos=A.detail.value,i),c()},ve=A=>{s(0,i.advanced.formatDataTime=A.detail.value,i),c()},_t=A=>{s(0,i.advanced.showCreateTime=A.detail.value,i),c()},Ze=A=>{s(0,i.advanced.isHandleHref=A.detail.value,i),c()},Je=A=>{s(0,i.advanced.isHandleBacklinks=A.detail.value,i),c()},Qe=A=>{s(0,i.advanced.isHandleVideo=A.detail.value,i),c()},It=A=>{s(0,i.advanced.videoFormats=A.detail.value,i),c()},St=A=>{s(0,i.advanced.isSuperLabel=A.detail.value,i),c()},Ae=A=>{s(0,i.advanced.labelName=A.detail.value,i),c()},ss=A=>{s(0,i.filter.lastSyncTime=A.detail.value,i),c()},ut=A=>{s(0,i.filter.tagFilterMode=A.detail.value,i),c()},pt=A=>{s(0,i.filter.tagList=A.detail.value,i),c()},wt=A=>{s(0,i.debug.isDebug=A.detail.value,i),c()},F=A=>{s(0,i.debug.isAutoUpdateTime=A.detail.value,i),c()};return t.$$set=A=>{"plugin"in A&&s(14,n=A.plugin),"config"in A&&s(0,i=A.config),"notebookOptions"in A&&s(1,o=A.notebookOptions)},t.$$.update=()=>{if(t.$$.dirty[0]&1){switch(i.base.syncPlan){case ot.dailyNotes:s(2,h="请配置同步笔记本,如需更改DailyNote路径请配置文档路径"),s(3,_="日记存放路径"),s(4,k=!0),s(5,$=!1),s(7,b=!0),s(6,p="支持日期格式模板变量,与思源笔记设置一致");break;case ot.singleDoc:s(3,_="文档路径"),s(2,h="请配置同步笔记本,如需保存至指定文档下请配置文档路径"),s(4,k=!0),s(5,$=!1),s(7,b=!1),s(6,p="将同步数据保存在指定路径的文档下级");break;case ot.sameDoc:s(3,_="文档路径"),s(2,h="请配置同步笔记本以及文档路径"),s(4,k=!0),s(5,$=!0),s(7,b=!1),s(6,p="将同步数据保存在指定路径的文档中");break;default:s(2,h="")}s(8,g=i.advanced.isHandleVideo),s(9,y=i.advanced.isSuperLabel),Se.V2_LabelFilter.includes(i.base.version)?(s(10,w=!0),s(11,H=!be.includes(i.filter.tagFilterMode))):(s(10,w=!1),s(11,H=!1))}},[i,o,h,_,k,$,p,b,g,y,w,H,f,c,n,v,T,ne,_e,S,M,ye,me,qe,nt,ve,_t,Ze,Je,Qe,It,St,Ae,ss,ut,pt,wt,F]}class M0 extends ln{constructor(e){super(),on(this,e,v0,D0,an,{plugin:14,config:0,notebookOptions:1},null,[-1,-1])}}const S0={base:{version:dh,host:"",token:"",syncPlan:ot.dailyNotes,notebook:"",docPath:"",useTemplate:!1,resourceSavePath:"assets/memos/resources",memosSort:ds.asc,checkSyncMemos:Ii.start},advanced:{formatDataTime:"YYYY-MM-DD HH:mm:ss",showCreateTime:!1,isHandleHref:!1,isHandleBacklinks:!1,isHandleVideo:!1,videoFormats:"mp4",isSuperLabel:!1,labelName:""},filter:{lastSyncTime:"2021-12-08 00:00:00",tagFilterMode:ze.all,tagList:""},debug:{isDebug:!1,isAutoUpdateTime:!1}};class T0{constructor(e,s=!0){Le(this,"FLAG_FIREFOX");this.label=e,this.collapsed=s,this.FLAG_FIREFOX=vi.browser.name==="Firefox"||vi.engine.name==="Gecko"}clear(...e){this.stdout(globalThis.console.clear,!1,...e)}countReset(...e){this.stdout(globalThis.console.countReset,!1,...e)}count(...e){this.stdout(globalThis.console.count,!1,...e)}counts(...e){this.stdout(globalThis.console.count,!0,...e)}assert(...e){this.stdout(globalThis.console.assert,!1,...e)}asserts(...e){this.stdout(globalThis.console.assert,!0,...e)}dir(...e){this.stdout(globalThis.console.dir,!1,...e)}dirs(...e){this.stdout(globalThis.console.dir,!0,...e)}dirxml(...e){this.stdout(globalThis.console.dirxml,!1,...e)}dirxmls(...e){this.stdout(globalThis.console.dirxml,!0,...e)}table(...e){this.stdout(globalThis.console.table,!1,...e)}tables(...e){this.stdout(globalThis.console.table,!0,...e)}debug(...e){this.stdout(globalThis.console.debug,!1,...e)}debugs(...e){this.stdout(globalThis.console.debug,!0,...e)}info(...e){this.stdout(globalThis.console.info,!1,...e)}infos(...e){this.stdout(globalThis.console.info,!0,...e)}log(...e){this.stdout(globalThis.console.log,!1,...e)}logs(...e){this.stdout(globalThis.console.log,!0,...e)}warn(...e){this.stdout(globalThis.console.warn,!1,...e)}warns(...e){this.stdout(globalThis.console.warn,!0,...e)}error(...e){this.stdout(globalThis.console.error,!1,...e)}errors(...e){this.stdout(globalThis.console.error,!0,...e)}stdout(e,s,...n){const i=this.FLAG_FIREFOX?`[${this.label}] - <${e.name.toUpperCase()}>`:`[\x1B[4m${this.label}\x1B[0m] - <\x1B[1m${e.name.toUpperCase()}\x1B[0m>`;if(this.collapsed?globalThis.console.groupCollapsed(i):globalThis.console.group(i),s)for(const o of n)Array.isArray(o)?e(...o):e(o);else e(...n);globalThis.console.trace(),globalThis.console.groupEnd()}}var O0=function(e){return Y0(e)&&!C0(e)};function Y0(t){return!!t&&typeof t=="object"}function C0(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||P0(t)}var $0=typeof Symbol=="function"&&Symbol.for,N0=$0?Symbol.for("react.element"):60103;function P0(t){return t.$$typeof===N0}function R0(t){return Array.isArray(t)?[]:{}}function Ln(t,e){return e.clone!==!1&&e.isMergeableObject(t)?nn(R0(t),t,e):t}function I0(t,e,s){return t.concat(e).map(function(n){return Ln(n,s)})}function x0(t,e){if(!e.customMerge)return nn;var s=e.customMerge(t);return typeof s=="function"?s:nn}function E0(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function So(t){return Object.keys(t).concat(E0(t))}function Rl(t,e){try{return e in t}catch{return!1}}function F0(t,e){return Rl(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function L0(t,e,s){var n={};return s.isMergeableObject(t)&&So(t).forEach(function(i){n[i]=Ln(t[i],s)}),So(e).forEach(function(i){F0(t,i)||(Rl(t,i)&&s.isMergeableObject(e[i])?n[i]=x0(i,s)(t[i],e[i],s):n[i]=Ln(e[i],s))}),n}function nn(t,e,s){s=s||{},s.arrayMerge=s.arrayMerge||I0,s.isMergeableObject=s.isMergeableObject||O0,s.cloneUnlessOtherwiseSpecified=Ln;var n=Array.isArray(e),i=Array.isArray(t),o=n===i;return o?n?s.arrayMerge(t,e,s):L0(t,e,s):Ln(e,s)}nn.all=function(e,s){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,i){return nn(n,i,s)},{})};var W0=nn,A0=W0;const U0=Lo(A0);function H0(...t){return U0.all(t,{arrayMerge:(e,s,n)=>s})}exports.pluginConfigData=void 0;exports.isMobile=void 0;exports.topBarElement=void 0;class V0 extends ca.Plugin{constructor(s){super(s);Le(this,"logger");this.logger=new T0(this.name)}async onload(){const s=ca.getFrontend();exports.isMobile=s==="mobile"||s==="browser-mobile",this.addIcons(Os.getIconsString()),exports.topBarElement=this.addTopBar({icon:Os.getIcon().default.name,title:Da,position:"right",callback:()=>{Up(this)}})}async onLayoutReady(){this.loadData(bi).then(s=>{exports.pluginConfigData=H0(S0,s||{})}).catch(s=>this.logger.error(s)).finally(async()=>{await Wp()})}onunload(){}uninstall(){}async openSetting(){await this.openDIYSetting()}async updateConfig(s){return s&&s!==s&&(exports.pluginConfigData=s),this.saveData(bi,exports.pluginConfigData)}async getNotebookOptions(){C(exports.pluginConfigData.debug.isDebug,"正在获取笔记本列表,并转换成下拉选项...");let s=[];const i=(await Io()).notebooks;for(const o of i){let f={key:o.id,text:o.name};s.push(f)}return C(exports.pluginConfigData.debug.isDebug,"转换结果",s),s}async openDIYSetting(){let s=new ca.Dialog({title:Da,content:'
',width:"900px",height:"700px",destroyCallback:i=>{C(exports.pluginConfigData.debug.isDebug,"destroyCallback",i),n.$destroy()}}),n=new M0({target:s.element.querySelector("#SettingPanel"),props:{config:exports.pluginConfigData,plugin:this,notebookOptions:await this.getNotebookOptions()}})}}exports.default=V0;