var e=Object.defineProperty,t=Object.prototype.hasOwnProperty,n=Object.getOwnPropertySymbols,r=Object.prototype.propertyIsEnumerable,i=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,o=(e,o)=>{for(var a in o||(o={}))t.call(o,a)&&i(e,a,o[a]);if(n)for(var a of n(o))r.call(o,a)&&i(e,a,o[a]);return e};function a(){}const s=e=>e;function l(e,t){for(const n in t)e[n]=t[n];return e}function u(e){return e()}function c(){return Object.create(null)}function f(e){e.forEach(u)}function p(e){return"function"==typeof e}function d(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function h(e,...t){if(null==e)return a;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function g(e){let t;return h(e,(e=>t=e))(),t}function m(e,t,n){e.$$.on_destroy.push(h(t,n))}function v(e,t,n,r){if(e){const i=y(e,t,n,r);return e[0](i)}}function y(e,t,n,r){return e[1]&&r?l(n.ctx.slice(),e[1](r(t))):n.ctx}function b(e,t,n,r,i,o,a){const s=function(e,t,n,r){if(e[2]&&r){const i=e[2](r(n));if(void 0===t.dirty)return i;if("object"==typeof i){const e=[],n=Math.max(t.dirty.length,i.length);for(let r=0;rwindow.performance.now():()=>Date.now(),A=E?e=>requestAnimationFrame(e):a;const S=new Set;function j(e){S.forEach((t=>{t.c(e)||(S.delete(t),t.f())})),0!==S.size&&A(j)}function T(e){let t;return 0===S.size&&A(j),{promise:new Promise((n=>{S.add(t={c:e,f:n})})),abort(){S.delete(t)}}}function D(e,t){e.appendChild(t)}function N(e,t,n){e.insertBefore(t,n||null)}function L(e){e.parentNode.removeChild(e)}function M(e,t){for(let n=0;ne.removeEventListener(t,n,r)}function z(e){return function(t){return t.preventDefault(),e.call(this,t)}}function B(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function W(e){return function(t){t.target===this&&e.call(this,t)}}function H(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function U(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)null==t[r]?e.removeAttribute(r):"style"===r?e.style.cssText=t[r]:"__value"===r?e.value=e[r]=t[r]:n[r]&&n[r].set?e[r]=t[r]:H(e,r,t[r])}function V(e){return""===e?null:+e}function K(e){return Array.from(e.childNodes)}function Y(e,t,n,r){for(let i=0;i{e.source===n.contentWindow&&t()}))):(n.src="about:blank",n.onload=()=>{i=R(n.contentWindow,"resize",t)}),D(e,n),()=>{(r||i&&n.contentWindow)&&i(),L(n)}}function ie(e,t,n){e.classList[n?"add":"remove"](t)}function oe(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}function ae(e,t=document.body){return Array.from(t.querySelectorAll(e))}const se=new Set;let le,ue=0;function ce(e,t,n,r,i,o,a,s=0){const l=16.666/r;let u="{\n";for(let m=0;m<=1;m+=l){const e=t+(n-t)*o(m);u+=100*m+`%{${a(e,1-e)}}\n`}const c=u+`100% {${a(n,1-n)}}\n}`,f=`__svelte_${function(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}(c)}_${s}`,p=e.ownerDocument;se.add(p);const d=p.__svelte_stylesheet||(p.__svelte_stylesheet=p.head.appendChild(P("style")).sheet),h=p.__svelte_rules||(p.__svelte_rules={});h[f]||(h[f]=!0,d.insertRule(`@keyframes ${f} ${c}`,d.cssRules.length));const g=e.style.animation||"";return e.style.animation=`${g?`${g}, `:""}${f} ${r}ms linear ${i}ms 1 both`,ue+=1,f}function fe(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),i=n.length-r.length;i&&(e.style.animation=r.join(", "),ue-=i,ue||A((()=>{ue||(se.forEach((e=>{const t=e.__svelte_stylesheet;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.__svelte_rules={}})),se.clear())})))}function pe(e,t,n,r){if(!t)return a;const i=e.getBoundingClientRect();if(t.left===i.left&&t.right===i.right&&t.top===i.top&&t.bottom===i.bottom)return a;const{delay:o=0,duration:l=300,easing:u=s,start:c=O()+o,end:f=c+l,tick:p=a,css:d}=n(e,{from:t,to:i},r);let h,g=!0,m=!1;function v(){d&&fe(e,h),g=!1}return T((e=>{if(!m&&e>=c&&(m=!0),m&&e>=f&&(p(1,0),v()),!g)return!1;if(m){const t=0+1*u((e-c)/l);p(t,1-t)}return!0})),d&&(h=ce(e,0,1,l,o,u,d)),o||(m=!0),p(0,1),v}function de(e){const t=getComputedStyle(e);if("absolute"!==t.position&&"fixed"!==t.position){const{width:n,height:r}=t,i=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=r,he(e,i)}}function he(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const r=getComputedStyle(e),i="none"===r.transform?"":r.transform;e.style.transform=`${i} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}function ge(e){le=e}function me(){if(!le)throw new Error("Function called outside component initialization");return le}function ve(e){me().$$.on_mount.push(e)}function ye(e){me().$$.after_update.push(e)}function be(e){me().$$.on_destroy.push(e)}function _e(){const e=me();return(t,n)=>{const r=e.$$.callbacks[t];if(r){const i=oe(t,n);r.slice().forEach((t=>{t.call(e,i)}))}}}function we(e,t){me().$$.context.set(e,t)}function xe(e){return me().$$.context.get(e)}function ke(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const Ce=[],Ee=[],Oe=[],Ae=[],Se=Promise.resolve();let je=!1;function Te(){je||(je=!0,Se.then(Fe))}function De(){return Te(),Se}function Ne(e){Oe.push(e)}function Le(e){Ae.push(e)}let Me=!1;const Pe=new Set;function Fe(){if(!Me){Me=!0;do{for(let e=0;e{Ie=null}))),Ie}function Re(e,t,n){e.dispatchEvent(oe(`${t?"intro":"outro"}${n}`))}const ze=new Set;let Be;function We(){Be={r:0,c:[],p:Be}}function He(){Be.r||f(Be.c),Be=Be.p}function Ue(e,t){e&&e.i&&(ze.delete(e),e.i(t))}function Ve(e,t,n,r){if(e&&e.o){if(ze.has(e))return;ze.add(e),Be.c.push((()=>{ze.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}}const Ke={duration:0};function Ye(e,t,n){let r,i,o=t(e,n),l=!1,u=0;function c(){r&&fe(e,r)}function f(){const{delay:t=0,duration:n=300,easing:f=s,tick:p=a,css:d}=o||Ke;d&&(r=ce(e,0,1,n,t,f,d,u++)),p(0,1);const h=O()+t,g=h+n;i&&i.abort(),l=!0,Ne((()=>Re(e,!0,"start"))),i=T((t=>{if(l){if(t>=g)return p(1,0),Re(e,!0,"end"),c(),l=!1;if(t>=h){const e=f((t-h)/n);p(e,1-e)}}return l}))}let d=!1;return{start(){d||(fe(e),p(o)?(o=o(),$e().then(f)):f())},invalidate(){d=!1},end(){l&&(c(),l=!1)}}}function Ge(e,t,n){let r,i=t(e,n),o=!0;const l=Be;function u(){const{delay:t=0,duration:n=300,easing:u=s,tick:c=a,css:p}=i||Ke;p&&(r=ce(e,1,0,n,t,u,p));const d=O()+t,h=d+n;Ne((()=>Re(e,!1,"start"))),T((t=>{if(o){if(t>=h)return c(0,1),Re(e,!1,"end"),--l.r||f(l.c),!1;if(t>=d){const e=u((t-d)/n);c(1-e,e)}}return o}))}return l.r+=1,p(i)?$e().then((()=>{i=i(),u()})):u(),{end(t){t&&i.tick&&i.tick(1,0),o&&(r&&fe(e,r),o=!1)}}}function Ze(e,t,n,r){let i=t(e,n),o=r?0:1,l=null,u=null,c=null;function d(){c&&fe(e,c)}function h(e,t){const n=e.b-o;return t*=Math.abs(n),{a:o,b:e.b,d:n,duration:t,start:e.start,end:e.start+t,group:e.group}}function g(t){const{delay:n=0,duration:r=300,easing:p=s,tick:g=a,css:m}=i||Ke,v={start:O()+n,b:t};t||(v.group=Be,Be.r+=1),l||u?u=v:(m&&(d(),c=ce(e,o,t,r,n,p,m)),t&&g(0,1),l=h(v,r),Ne((()=>Re(e,t,"start"))),T((t=>{if(u&&t>u.start&&(l=h(u,r),u=null,Re(e,l.b,"start"),m&&(d(),c=ce(e,o,l.b,l.duration,0,p,i.css))),l)if(t>=l.end)g(o=l.b,1-o),Re(e,l.b,"end"),u||(l.b?d():--l.group.r||f(l.group.c)),l=null;else if(t>=l.start){const e=t-l.start;o=l.a+l.d*p(e/l.duration),g(o,1-o)}return!(!l&&!u)})))}return{run(e){p(i)?$e().then((()=>{i=i(),g(e)})):g(e)},end(){d(),l=u=null}}}function Xe(e,t){const n=t.token={};function r(e,r,i,o){if(t.token!==n)return;t.resolved=o;let a=t.ctx;void 0!==i&&(a=a.slice(),a[i]=o);const s=e&&(t.current=e)(a);let l=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==r&&e&&(We(),Ve(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),He())})):t.block.d(1),s.c(),Ue(s,1),s.m(t.mount(),t.anchor),l=!0),t.block=s,t.blocks&&(t.blocks[r]=s),l&&Fe()}if((i=e)&&"object"==typeof i&&"function"==typeof i.then){const n=me();if(e.then((e=>{ge(n),r(t.then,1,t.value,e),ge(null)}),(e=>{if(ge(n),r(t.catch,2,t.error,e),ge(null),!t.hasCatch)throw e})),t.current!==t.pending)return r(t.pending,0),!0}else{if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}var i}const Je="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Qe(e,t){e.d(1),t.delete(e.key)}function et(e,t){Ve(e,1,1,(()=>{t.delete(e.key)}))}function tt(e,t){e.f(),Qe(e,t)}function nt(e,t){e.f(),et(e,t)}function rt(e,t,n,r,i,o,a,s,l,u,c,f){let p=e.length,d=o.length,h=p;const g={};for(;h--;)g[e[h].key]=h;const m=[],v=new Map,y=new Map;for(h=d;h--;){const e=f(i,o,h),s=n(e);let l=a.get(s);l?r&&l.p(e,t):(l=u(s,e),l.c()),v.set(s,m[h]=l),s in g&&y.set(s,Math.abs(h-g[s]))}const b=new Set,_=new Set;function w(e){Ue(e,1),e.m(s,c),a.set(e.key,e),c=e.first,d--}for(;p&&d;){const t=m[d-1],n=e[p-1],r=t.key,i=n.key;t===n?(c=t.first,p--,d--):v.has(i)?!a.has(r)||b.has(r)?w(t):_.has(i)?p--:y.get(r)>y.get(i)?(_.add(r),w(t)):(b.add(i),p--):(l(n,a),p--)}for(;p--;){const t=e[p];v.has(t.key)||l(t,a)}for(;d;)w(m[d-1]);return m}function it(e,t){const n={},r={},i={$$scope:1};let o=e.length;for(;o--;){const a=e[o],s=t[o];if(s){for(const e in a)e in s||(r[e]=1);for(const e in s)i[e]||(n[e]=s[e],i[e]=1);e[o]=s}else for(const e in a)i[e]=1}for(const a in r)a in n||(n[a]=void 0);return n}function ot(e){return"object"==typeof e&&null!==e?e:{}}function at(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function st(e){e&&e.c()}function lt(e,t){e&&e.l(t)}function ut(e,t,n,r){const{fragment:i,on_mount:o,on_destroy:a,after_update:s}=e.$$;i&&i.m(t,n),r||Ne((()=>{const t=o.map(u).filter(p);a?a.push(...t):f(t),e.$$.on_mount=[]})),s.forEach(Ne)}function ct(e,t){const n=e.$$;null!==n.fragment&&(f(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ft(e,t,n,r,i,o,s=[-1]){const l=le;ge(e);const u=e.$$={fragment:null,ctx:null,props:o,update:a,not_equal:i,bound:c(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:[]),callbacks:c(),dirty:s,skip_bound:!1};let p=!1;if(u.ctx=n?n(e,t.props||{},((t,n,...r)=>{const o=r.length?r[0]:n;return u.ctx&&i(u.ctx[t],u.ctx[t]=o)&&(!u.skip_bound&&u.bound[t]&&u.bound[t](o),p&&function(e,t){-1===e.$$.dirty[0]&&(Ce.push(e),Te(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}var dt={queryHandler:{parse:e=>{return t=new URLSearchParams(e),[...t].reduce(((e,[t,n])=>(e[t]=n,e)),{});var t},stringify:e=>"?"+new URLSearchParams(e).toString()},urlTransform:{apply:e=>e,remove:e=>e},useHash:!1};const ht=RegExp(/\:([^/()]+)/g);function gt(e,t){if(navigator.userAgent.includes("jsdom"))return!1;t&&mt(e),function(){if(navigator.userAgent.includes("jsdom"))return!1;const{hash:e}=window.location;if(e){if(/^[A-Za-z]+[\w\-\:\.]*$/.test(e.substring(1))){const t=document.querySelector(e);t&&t.scrollIntoView()}}}()}function mt(e){e&&e.scrollTo&&"scroll-lock"!==e.dataset.routify&&"lock"!==e.dataset["routify-scroll"]&&(e.style["scroll-behavior"]="auto",e.scrollTo({top:0,behavior:"auto"}),e.style["scroll-behavior"]="",mt(e.parentElement))}const vt=e=>{const t=[];let n;for(;n=ht.exec(e);)t.push(n[1]);return t};function yt(e,t){yt._console=yt._console||{log:console.log,warn:console.warn};const{_console:n}=yt,r=e.componentFile.name.replace(/Proxy<_?(.+)>/,"$1").replace(/^Index$/,e.component.shortPath.split("/").pop()).replace(/^./,(e=>e.toUpperCase())).replace(/\:(.+)/,"U5B$1u5D"),i=[`<${r}> received an unexpected slot "default".`,`<${r}> was created with unknown prop 'scoped'`,`<${r}> was created with unknown prop 'scopedSync'`];for(const o of["log","warn"])console[o]=(...e)=>{i.includes(e[0])||n[o](...e)},t().then((()=>{console[o]=n[o]}))}function bt(){let e=window.location.pathname+window.location.search+window.location.hash;const{url:t,options:n}=function(e){const[t,n]=e.split("__[[routify_url_options]]__"),r=JSON.parse(decodeURIComponent(n||"")||"{}");return window.routify=window.routify||{},window.routify.prefetched=r.prefetch,{url:t,options:r}}(e),r=_t(t);return o(o({},r),{options:n})}function _t(e){dt.useHash&&(e=e.replace(/.*#(.+)/,"$1"));const t=e.startsWith("/")?window.location.origin:void 0,n=new URL(e,t);return{url:n,fullpath:n.pathname+n.search+n.hash}}function wt(e,t,n){const r=dt.useHash?"#":"";let i;return i=function(e,t,n){const r=Object.assign({},n,t),i=function(e,t){if(!dt.queryHandler)return"";const n=vt(e),r={};t&&Object.entries(t).forEach((([e,t])=>{n.includes(e)||(r[e]=t)}));return dt.queryHandler.stringify(r).replace(/\?$/,"")}(e,t);for(const[o,a]of Object.entries(r))e=e.replace(`:${o}`,a);return`${e}${i}`}(e,t,n),i=dt.urlTransform.apply(i),i=r+i,i}function xt(e){let t;const n=e[2].default,r=v(n,e,e[1],null);return{c(){r&&r.c()},l(e){r&&r.l(e)},m(e,n){r&&r.m(e,n),t=!0},p(e,[t]){r&&r.p&&2&t&&b(r,n,e,e[1],t,null,null)},i(e){t||(Ue(r,e),t=!0)},o(e){Ve(r,e),t=!1},d(e){r&&r.d(e)}}}function kt(e,t,n){let{$$slots:r={},$$scope:i}=t,{scoped:o={}}=t;return e.$$set=e=>{"scoped"in e&&n(0,o=e.scoped),"$$scope"in e&&n(1,i=e.$$scope)},[o,i,r]}class Ct extends pt{constructor(e){super(),ft(this,e,kt,xt,d,{scoped:0})}}const Et=[];function Ot(e,t=a){let n;const r=[];function i(t){if(d(e,t)&&(e=t,n)){const t=!Et.length;for(let n=0;n{const e=r.indexOf(l);-1!==e&&r.splice(e,1),0===r.length&&(n(),n=null)}}}}function At(e,t,n){const r=!Array.isArray(e),i=r?[e]:e,o=t.length<2;return{subscribe:Ot(n,(e=>{let n=!1;const s=[];let l=0,u=a;const c=()=>{if(l)return;u();const n=t(r?s[0]:s,e);o?e(n):u=p(n)?n:a},d=i.map(((e,t)=>h(e,(e=>{s[t]=e,l&=~(1<{l|=1<window.routify.routes=e));let Tt=Ot({component:{params:{}}});const Dt=Ot(null),Nt=Ot(!0);function Lt(e,t=!1){e=dt.urlTransform.remove(e);let{pathname:n,search:r}=_t(e).url;const i=g(jt),o=i.find((e=>n===e.meta.name))||i.find((e=>n.match(e.regex)));if(!o)throw new Error(`Route could not be found for "${n}".`);const a=t?Object.create(o):o,{route:s,redirectPath:l,rewritePath:u}=Mt(a,i);return u&&(({pathname:n,search:r}=_t(wt(u,s.params)).url),l&&(s.redirectTo=wt(l,s.params||{}))),dt.queryHandler&&(s.params=Object.assign({},dt.queryHandler.parse(r))),function(e,t){if(e.paramKeys){const n=function(e){const t=[];return e.forEach((e=>{t[e.path.split("/").filter(Boolean).length-1]=e})),t}(e.layouts),r=t.split("/").filter(Boolean);(function(e){return e.split("/").filter(Boolean).map((e=>e.match(/\:(.+)/))).map((e=>e&&e[1]))})(e.path).forEach(((t,i)=>{t&&(e.params[t]=r[i],n[i]?n[i].param={[t]:r[i]}:e.param={[t]:r[i]})}))}}(s,n),s.leftover=e.replace(new RegExp(s.regex),""),s}function Mt(e,t,n,r){const{redirect:i,rewrite:o}=e.meta;if(i||o){n=i?i.path||i:n,r=o?o.path||o:n;const a=i&&i.params,s=o&&o.params,l=t.find((e=>e.path===r));return l===e&&console.error(`${r} is redirecting to itself`),l||console.error(`${e.path} is redirecting to non-existent path: ${r}`),(a||s)&&(l.params=Object.assign({},l.params,a,s)),Mt(l,t,n,r)}return{route:e,redirectPath:n,rewritePath:r}}function Pt(e,t,n){const r=e.slice();return r[1]=t[n],r}function Ft(e,t){let n,r;return{key:e,first:null,c(){n=P("iframe"),this.h()},l(e){n=Y(e,"IFRAME",{src:!0,frameborder:!0,title:!0}),K(n).forEach(L),this.h()},h(){n.src!==(r=t[1].url)&&H(n,"src",r),H(n,"frameborder","0"),H(n,"title","routify prefetcher"),this.first=n},m(e,t){N(e,n,t)},p(e,i){t=e,1&i&&n.src!==(r=t[1].url)&&H(n,"src",r)},d(e){e&&L(n)}}}function qt(e){let t,n=[],r=new Map,i=e[0];const o=e=>e[1].options.prefetch;for(let a=0;ae.slice(0,2)));function Rt(e){const t=e.data?e.data.prefetchId:e;if(!t)return null;const n=g(It).find((e=>e&&e.options.prefetch==t));if(n){const{gracePeriod:e}=n.options,r=new Promise((t=>setTimeout(t,e))),i=new Promise((t=>{window.requestIdleCallback?window.requestIdleCallback(t):setTimeout(t,e+1e3)}));Promise.all([r,i]).then((()=>{It.update((e=>e.filter((e=>e.options.prefetch!=t))))}))}}function zt(e,t,n){let r;return m(e,$t,(e=>n(0,r=e))),[r]}$t.subscribe((e=>e.forEach((({options:e})=>{setTimeout((()=>Rt(e.prefetch)),e.timeout)})))),addEventListener("message",Rt,!1);class Bt extends pt{constructor(e){super(),ft(this,e,zt,qt,d,{})}}function Wt(){return xe("routify")||Tt}const Ht={subscribe:e=>At(Wt(),(e=>e.layout.api)).subscribe(e)},Ut={_hooks:[e=>Nt.set(!1)],subscribe:Kt},Vt={_hooks:[],subscribe:Kt};function Kt(e){const t=this._hooks,n=t.length;return e((e=>{t[n]=e})),()=>delete t[n]}const Yt={subscribe:e=>At(Wt(),(e=>e.route.params)).subscribe(e)},Gt={subscribe:e=>At(St,(e=>e.leftover)).subscribe(e)},Zt={subscribe(e){const t=Wt(),{route:n,routes:r}=g(t);return At(t,(e=>{return t=e,i=n,o=r,function(e,n={},r){const{component:a}=t,s=Object.assign({},i.params,a.params);let l=e&&e.nodeType&&e;l&&(e=e.getAttribute("href")),e=e?f(e):a.shortPath;const u=o.find((t=>[t.shortPath||"/",t.path].includes(e)));if(u&&"proximity"===u.meta.preload&&window.requestIdleCallback){const e=routify.appLoaded?0:1500;setTimeout((()=>{window.requestIdleCallback((()=>u.api.preload()))}),e)}r&&!1!==r.strict||(e=e.replace(/index$/,""));let c=wt(e,n,s);return l?(l.href=c,{update(t){l.href=wt(e,t,s)}}):c;function f(e){if(e.match(/^\.\.?\//)){let[,t,n]=e.match(/^([\.\/]+)(.*)/),r=a.path.replace(/\/$/,"");const i=t.match(/\.\.\//g)||[];a.isPage&&i.push(null),i.forEach((()=>r=r.replace(/\/[^\/]+\/?$/,""))),e=(e=`${r}/${n}`.replace(/\/$/,""))||"/"}else if(e.match(/^\//));else{const t=o.find((t=>t.meta.name===e));t&&(e=t.shortPath)}return e}};var t,i,o})).subscribe(e)}};const Xt={subscribe(e){const t=xe("routifyupdatepage");return At(Zt,(e=>function(n,r,i,o){const a=e(n,r);i?t(a,o):history.pushState({},null,a)})).subscribe(e)}},Jt={subscribe:e=>At([Zt,St],(([e,t])=>function(n="",r={},{strict:i}={strict:!0}){n=e(n,r,{strict:i});const o=e(t.path,null,{strict:i}),a=new RegExp("^"+n+"($|/)");return!!o.match(a)})).subscribe(e)},Qt={props:{},templates:{},services:{plain:{propField:"name",valueField:"content"},twitter:{propField:"name",valueField:"content"},og:{propField:"property",valueField:"content"}},plugins:[{name:"applyTemplate",condition:()=>!0,action:(e,t)=>[e,(Qt.getLongest(Qt.templates,e)||(e=>e))(t)]},{name:"createMeta",condition:()=>!0,action(e,t){Qt.writeMeta(e,t)}},{name:"createOG",condition:e=>!e.match(":"),action(e,t){Qt.writeMeta(`og:${e}`,t)}},{name:"createTitle",condition:e=>"title"===e,action(e,t){document.title=t}}],getLongest(e,t){const n=e[t];if(n){const r=g(St).path;return n[Object.keys(e[t]).filter((e=>r.includes(e))).sort(((e,t)=>t.length-e.length))[0]]}},writeMeta(e,t){const n=document.getElementsByTagName("head")[0],r=e.match(/(.+)\:/),i=r&&r[1]||"plain",{propField:o,valueField:a}=en.services[i]||en.services.plain,s=document.querySelector(`meta[${o}='${e}']`);s&&s.remove();const l=document.createElement("meta");l.setAttribute(o,e),l.setAttribute(a,t),l.setAttribute("data-origin","routify"),n.appendChild(l)},set(e,t){Qt.plugins.forEach((n=>{n.condition(e,t)&&([e,t]=n.action(e,t)||[e,t])}))},clear(){const e=document.querySelector("meta");e&&e.remove()},template(e,t){const n=Qt.getOrigin();Qt.templates[e]=Qt.templates[e]||{},Qt.templates[e][n]=t},update(){Object.keys(Qt.props).forEach((e=>{let t=Qt.getLongest(Qt.props,e);Qt.plugins.forEach((n=>{n.condition(e,t)&&([e,t]=n.action(e,t)||[e,t])}))}))},batchedUpdate(){Qt._pendingUpdate||(Qt._pendingUpdate=!0,setTimeout((()=>{Qt._pendingUpdate=!1,this.update()})))},_updateQueued:!1,getOrigin(){const e=Wt();return e&&g(e).path||"/"},_pendingUpdate:!1},en=new Proxy(Qt,{set(e,t,n,r){const{props:i,getOrigin:o}=e;return Reflect.has(e,t)?Reflect.set(e,t,n,r):(i[t]=i[t]||{},i[t][o()]=n),window.routify.appLoaded&&e.batchedUpdate(),!0}});function tn(e,t,n){const r=e.slice();return r[21]=t[n].component,r[22]=t[n].componentFile,r[2]=t[n].decorator,r[1]=t[n].nodes,r}function nn(e){let t,n,r=[],i=new Map,o=[e[4]];const a=e=>e[6];for(let s=0;s<1;s+=1){let t=tn(e,o,s),n=a(t);i.set(n,r[s]=sn(n,t))}return{c(){for(let e=0;e<1;e+=1)r[e].c();t=$()},l(e){for(let t=0;t<1;t+=1)r[t].l(e);t=$()},m(e,i){for(let t=0;t<1;t+=1)r[t].m(e,i);N(e,t,i),n=!0},p(e,n){33554557&n&&(o=[e[4]],We(),r=rt(r,n,a,1,e,o,i,t.parentNode,et,sn,t,tn),He())},i(e){if(!n){for(let e=0;e<1;e+=1)Ue(r[e]);n=!0}},o(e){for(let t=0;t<1;t+=1)Ve(r[t]);n=!1},d(e){for(let t=0;t<1;t+=1)r[t].d(e);e&&L(t)}}}function rn(e){let t,n;return t=new cn({props:{decorator:e[2],nodes:e[1],scoped:o(o({},e[0]),e[25])}}),{c(){st(t.$$.fragment)},l(e){lt(t.$$.fragment,e)},m(e,r){ut(t,e,r),n=!0},p(e,n){const r={};4&n&&(r.decorator=e[2]),16&n&&(r.nodes=e[1]),33554433&n&&(r.scoped=o(o({},e[0]),e[25])),t.$set(r)},i(e){n||(Ue(t.$$.fragment,e),n=!0)},o(e){Ve(t.$$.fragment,e),n=!1},d(e){ct(t,e)}}}function on(e){let t,n,r=e[21]&&e[1].length&&rn(e);return{c(){r&&r.c(),t=$()},l(e){r&&r.l(e),t=$()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){e[21]&&e[1].length?r?(r.p(e,n),16&n&&Ue(r,1)):(r=rn(e),r.c(),Ue(r,1),r.m(t.parentNode,t)):r&&(We(),Ve(r,1,1,(()=>{r=null})),He())},i(e){n||(Ue(r),n=!0)},o(e){Ve(r),n=!1},d(e){r&&r.d(e),e&&L(t)}}}function an(e){let t,n,r;const i=[{scoped:e[0]},{scopedSync:e[5]},e[3].param||{}];var o=e[22];function a(e){let t={$$slots:{default:[on,({scoped:e,decorator:t})=>({25:e,2:t}),({scoped:e,decorator:t})=>(e?33554432:0)|(t?4:0)]},$$scope:{ctx:e}};for(let n=0;n{ct(e,1)})),He()}o?(t=new o(a(e)),st(t.$$.fragment),Ue(t.$$.fragment,1),ut(t,n.parentNode,n)):t=null}else o&&t.$set(s)},i(e){r||(t&&Ue(t.$$.fragment,e),r=!0)},o(e){t&&Ve(t.$$.fragment,e),r=!1},d(e){t&&ct(t,e),e&&L(n)}}}function sn(e,t){let n,r,i,o;var a=t[2];function s(e){return{props:{scoped:e[0],$$slots:{default:[an]},$$scope:{ctx:e}}}}return a&&(r=new a(s(t))),{key:e,first:null,c(){n=$(),r&&st(r.$$.fragment),i=$(),this.h()},l(e){n=$(),r&<(r.$$.fragment,e),i=$(),this.h()},h(){this.first=n},m(e,t){N(e,n,t),r&&ut(r,e,t),N(e,i,t),o=!0},p(e,n){t=e;const o={};if(1&n&&(o.scoped=t[0]),67108925&n&&(o.$$scope={dirty:n,ctx:t}),a!==(a=t[2])){if(r){We();const e=r;Ve(e.$$.fragment,1,0,(()=>{ct(e,1)})),He()}a?(r=new a(s(t)),st(r.$$.fragment),Ue(r.$$.fragment,1),ut(r,i.parentNode,i)):r=null}else a&&r.$set(o)},i(e){o||(r&&Ue(r.$$.fragment,e),o=!0)},o(e){r&&Ve(r.$$.fragment,e),o=!1},d(e){e&&L(n),e&&L(i),r&&ct(r,e)}}}function ln(e){let t,n,r,i,o,a=e[4]&&nn(e);return{c(){a&&a.c(),t=I(),n=P("span")},l(e){a&&a.l(e),t=Z(e),n=Y(e,"SPAN",{}),K(n).forEach(L)},m(s,l){a&&a.m(s,l),N(s,t,l),N(s,n,l),r=!0,i||(o=C(e[9].call(null,n)),i=!0)},p(e,[n]){e[4]?a?(a.p(e,n),16&n&&Ue(a,1)):(a=nn(e),a.c(),Ue(a,1),a.m(t.parentNode,t)):a&&(We(),Ve(a,1,1,(()=>{a=null})),He())},i(e){r||(Ue(a),r=!0)},o(e){Ve(a),r=!1},d(e){a&&a.d(e),e&&L(t),e&&L(n),i=!1,o()}}}function un(e,t,n){let r,i,a,s,l;m(e,St,(e=>n(15,s=e))),m(e,jt,(e=>n(16,l=e)));let u,{nodes:c=[]}=t,{scoped:f={}}=t,{decorator:p}=t,d=null,h=null,g={},v=1;const y=Ot(null);m(e,y,(e=>n(4,i=e)));const b=xe("routify")||Tt;m(e,b,(e=>n(14,a=e)));we("routify",y);let _=[];function w(e){n(5,g=o({},f));const t=o(o({},i),{nodes:h,decorator:p||Ct,layout:d.isLayout?d:a.layout,component:d,route:s,routes:l,componentFile:e,parentNode:u||a.parentNode});y.set(t),k(b,a.child=d,a),0===h.length&&async function(){await new Promise((e=>setTimeout(e)));const e=i.component.path===s.path;!window.routify.stopAutoReady&&e&&async function({page:e,metatags:t,afterPageLoad:n,parentNode:r}){const i=e.last!==e;setTimeout((()=>gt(r,i)));const{path:o}=e,{options:a}=bt(),s=a.prefetch;for(const l of n._hooks)l&&await l(e.api);t.update(),dispatchEvent(new CustomEvent("app-loaded")),parent.postMessage({msg:"app-loaded",prefetched:window.routify.prefetched,path:o,prefetchId:s},"*"),window.routify.appLoaded=!0,window.routify.stopAutoReady=!1}({page:i.component,metatags:en,afterPageLoad:Ut,parentNode:u})}()}return e.$$set=e=>{"nodes"in e&&n(1,c=e.nodes),"scoped"in e&&n(0,f=e.scoped),"decorator"in e&&n(2,p=e.decorator)},e.$$.update=()=>{3074&e.$$.dirty&&_!==c&&(n(11,_=c),n(3,[d,...h]=[...c],d),n(3,d.api.reset=()=>n(10,v++,v),d)),8&e.$$.dirty&&function(e){let t=e.component();t instanceof Promise?t.then(w):w(t)}(d),1040&e.$$.dirty&&n(6,r=i&&v&&function({meta:e,path:t,param:n,params:r}){return JSON.stringify({path:t,invalidate:v,param:(e["param-is-page"]||e["slug-is-page"])&&n,queryParams:e["query-params-is-page"]&&r})}(i.component)),16&e.$$.dirty&&i&&yt(i,De)},[f,c,p,d,i,g,r,y,b,e=>u=e.parentNode,v,_]}class cn extends pt{constructor(e){super(),ft(this,e,un,ln,d,{nodes:1,scoped:0,decorator:2})}}function fn(e,t){let n=!1;function r(r,i){const o=Lt(r||bt().fullpath);o.redirectTo&&(history.replaceStateNative({},null,o.redirectTo),delete o.redirectTo);const a=[...(i&&Lt(bt().fullpath,e)||o).layouts,o];n&&delete n.last,o.last=n,n=o,r||Dt.set(o),St.set(o),o.api.preload().then((()=>{Nt.set(!0),t(a)}))}const i=function(e){["pushState","replaceState"].forEach((e=>{history[e+"Native"]||(history[e+"Native"]=history[e]),history[e]=async function(t={},n,r){if(r===location.pathname+location.search+location.hash)return!1;const{id:i,path:a,params:s}=g(St);t=o({id:i,path:a,params:s},t);const l=new Event(e.toLowerCase());Object.assign(l,{state:t,title:n,url:r});return await dn(l,r)?(history[e+"Native"].apply(this,[t,n,r]),dispatchEvent(l)):void 0}}));let t=!1;const n={click:pn,pushstate:()=>e(),replacestate:()=>e(),popstate:async n=>{t?t=!1:await dn(n,bt().fullpath)?e():(t=!0,n.preventDefault(),history.go(1))}};Object.entries(n).forEach((e=>addEventListener(...e)));return()=>{Object.entries(n).forEach((e=>removeEventListener(...e)))}}(r);return{updatePage:r,destroy:i}}function pn(e){const t=e.target.closest("a"),n=t&&t.href;if(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button||e.defaultPrevented)return;if(!n||t.target||t.host!==location.host)return;const r=new URL(n),i=r.pathname+r.search+r.hash;e.preventDefault(),history.pushState({},"",i)}async function dn(e,t){const n=Lt(t).api;for(const r of Vt._hooks.filter(Boolean)){if(!(await r(e,n,{url:t})))return!1}return!0}function hn(e){let t,n;return t=new cn({props:{nodes:e[0]}}),{c(){st(t.$$.fragment)},l(e){lt(t.$$.fragment,e)},m(e,r){ut(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.nodes=e[0]),t.$set(r)},i(e){n||(Ue(t.$$.fragment,e),n=!0)},o(e){Ve(t.$$.fragment,e),n=!1},d(e){ct(t,e)}}}function gn(e){let t,n,r,i=e[0]&&null!==e[1]&&hn(e);return n=new Bt({}),{c(){i&&i.c(),t=I(),st(n.$$.fragment)},l(e){i&&i.l(e),t=Z(e),lt(n.$$.fragment,e)},m(e,o){i&&i.m(e,o),N(e,t,o),ut(n,e,o),r=!0},p(e,[n]){e[0]&&null!==e[1]?i?(i.p(e,n),3&n&&Ue(i,1)):(i=hn(e),i.c(),Ue(i,1),i.m(t.parentNode,t)):i&&(We(),Ve(i,1,1,(()=>{i=null})),He())},i(e){r||(Ue(i),Ue(n.$$.fragment,e),r=!0)},o(e){Ve(i),Ve(n.$$.fragment,e),r=!1},d(e){i&&i.d(e),e&&L(t),ct(n,e)}}}function mn(e,t,n){let r;m(e,St,(e=>n(1,r=e)));let i,o,{routes:a}=t,{config:s={}}=t;window.routify=window.routify||{},window.routify.inBrowser=!window.navigator.userAgent.match("jsdom"),Object.assign(dt,s);we("routifyupdatepage",((...e)=>o&&o.updatePage(...e)));const l=e=>n(0,i=e),u=()=>{o&&(o.destroy(),o=null)};let c=null;return be(u),e.$$set=e=>{"routes"in e&&n(2,a=e.routes),"config"in e&&n(3,s=e.config)},e.$$.update=()=>{4&e.$$.dirty&&a&&(clearTimeout(c),c=setTimeout((()=>{u(),o=fn(a,l),jt.set(a),o.updatePage()})))},[i,r,a,s]}class vn extends pt{constructor(e){super(),ft(this,e,mn,gn,d,{routes:2,config:3})}}function yn(e){const t=async function(t){return await bn(e,{file:t.tree,state:{treePayload:t},scope:{}})};return t.sync=function(t){return _n(e,{file:t.tree,state:{treePayload:t},scope:{}})},t}async function bn(e,t){const n=await e(t);if(!1===n)return!1;const r=n||t.file;if(r.children){const n=await Promise.all(r.children.map((async n=>bn(e,{state:t.state,scope:wn(t.scope||{}),parent:t.file,file:await n}))));r.children=n.filter(Boolean)}return r}function _n(e,t){const n=e(t);if(!1===n)return!1;const r=n||t.file;if(r.children){const n=r.children.map((n=>_n(e,{state:t.state,scope:wn(t.scope||{}),parent:t.file,file:n})));r.children=n.filter(Boolean)}return r}function wn(e){return JSON.parse(JSON.stringify(e))}const xn=yn((({file:e})=>{(e.isPage||e.isFallback)&&(e.regex=((e,t)=>{const n=t?"":"/?$";return`^${e=(e=(e=e.replace(/\/_fallback?$/,"(/|$)")).replace(/\/index$/,"(/index)?")).replace(ht,"([^/]+)")+n}`})(e.path,e.isFallback))})),kn=yn((({file:e})=>{e.paramKeys=vt(e.path)})),Cn=yn((({file:e})=>{e.isFallback||e.isIndex?e.shortPath=e.path.replace(/\/[^/]+$/,""):e.shortPath=e.path})),En=yn((({file:e})=>{e.ranking=(({path:e})=>e.split("/").filter(Boolean).map((e=>"_fallback"===e?"A":e.startsWith(":")?"B":"C")).join(""))(e)})),On=yn((({file:e})=>{const t=e,n=e.meta&&e.meta.children||[];n.length&&(t.children=t.children||[],t.children.push(...n.map((e=>o(o({isMeta:!0},e),{meta:e})))))})),An=yn((e=>{const{file:t}=e,{isFallback:n,meta:r}=t,i=t.path.match("/:"),o=t.path.endsWith("/index"),a=r.index||0===r.index,s=!1===r.index;t.isIndexable=a||!n&&!i&&!o&&!s,t.isNonIndexable=!t.isIndexable})),Sn=yn((({file:e,parent:t})=>{Object.defineProperty(e,"parent",{get:()=>t}),Object.defineProperty(e,"nextSibling",{get:()=>Tn(e,1)}),Object.defineProperty(e,"prevSibling",{get:()=>Tn(e,-1)}),Object.defineProperty(e,"lineage",{get:()=>jn(t)})}));function jn(e,t=[]){return e&&(t.unshift(e),jn(e.parent,t)),t}function Tn(e,t){if(!e.root){const n=e.parent.children.filter((e=>e.isIndexable)),r=n.indexOf(e);return n[r+t]}}const Dn=yn((({file:e,parent:t})=>{e.isIndex&&Object.defineProperty(t,"index",{get:()=>e})})),Nn=yn((({file:e,scope:t})=>{function n(e){if(!e.isLayout&&e.meta.reset)return[];const{parent:t}=e,r=t&&t.component&&t,i=r&&(r.isReset||r.meta.reset),o=t&&!i&&n(t)||[];return r&&o.push(r),o}Object.defineProperty(e,"layouts",{get:()=>n(e)})})),Ln=yn((({file:e})=>{const t=e.root?function(){}:e.children?(e.isPage,function(){}):(e.isReset||e.isLayout||e.isFallback,function(){});Object.setPrototypeOf(e,t.prototype)}));var Mn=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",setRegex:xn,setParamKeys:kn,setShortPath:Cn,setRank:En,addMetaChildren:On,setIsIndexable:An,assignRelations:Sn,assignIndex:Dn,assignLayout:Nn,createFlatList:e=>{yn((e=>{(e.file.isPage||e.file.isFallback)&&e.state.treePayload.routes.push(e.file)})).sync(e),e.routes.sort(((e,t)=>e.ranking>=t.ranking?-1:1))},setPrototype:Ln});const Pn={isDir:!1,ext:"svelte",isLayout:!1,isReset:!1,isIndex:!1,isFallback:!1,isPage:!1,ownMeta:{},meta:{recursive:!0,preload:!1,prerender:!0},id:"__fallback"};function Fn(e){return Object.entries(Pn).forEach((([t,n])=>{void 0===e[t]&&(e[t]=n)})),e.children&&(e.children=e.children.map(Fn)),e}const qn=yn((({file:e})=>{e.api=new In(e)}));class In{constructor(e){this.__file=e,Object.defineProperty(this,"__file",{enumerable:!1}),this.isMeta=!!e.isMeta,this.path=e.path,this.title=function(e){return void 0!==e.meta.title?e.meta.title:(e.shortPath||e.path).split("/").pop().replace(/-/g," ")}(e),this.meta=e.meta}get parent(){return!this.__file.root&&this.__file.parent.api}get children(){return(this.__file.children||this.__file.isLayout&&this.__file.parent.children||[]).filter((e=>!e.isNonIndexable)).sort(((e,t)=>e.isMeta&&t.isMeta?0:(e=(e.meta.index||e.meta.title||e.path).toString(),t=(t.meta.index||t.meta.title||t.path).toString(),e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"})))).map((({api:e})=>e))}get next(){return $n(this,1)}get prev(){return $n(this,-1)}async preload(){const e=[...this.__file.layouts,this.__file,this.index&&this.index.__file].filter(Boolean).map((e=>e.component()));await Promise.all(e)}get component(){return this.__file.component?this.__file.component():!!this.__file.index&&this.__file.index.component()}get componentWithIndex(){return new Promise((e=>Promise.all([this.component,this.index&&this.index.component]).then((t=>e(t)))))}get index(){const e=this.__file.children&&this.__file.children.find((e=>e.isIndex));return e&&e.api}}function $n(e,t){if(!e.__file.root){const n=e.parent.children.indexOf(e);return e.parent.children[n+t]}}const Rn=o(o({},Mn),{restoreDefaults:({tree:e})=>Fn(e),assignAPI:qn});function zn(e){const t=["restoreDefaults","setParamKeys","setRegex","setShortPath","setRank","assignLayout","setPrototype","addMetaChildren","assignRelations","setIsIndexable","assignIndex","assignAPI","createFlatList"],n={tree:e,routes:[]};for(let r of t){(Rn[r].sync||Rn[r])(n)}return n}var Bn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Wn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Hn(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function Un(e){var t={exports:{}};return e(t,t.exports),t.exports /** * @license * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE */}var Vn=Un((function(e,t){(function(){function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function r(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i"']/g,K=RegExp(U.source),Y=RegExp(V.source),G=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+|\s+$/g,ie=/^\s+/,oe=/\s+$/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,we="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",xe="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+we,ke=RegExp("['’]","g"),Ce=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),Ee=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])"+we,"g"),Oe=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",xe].join("|"),"g"),Ae=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Se=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,je="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Te={};Te["[object Float32Array]"]=Te["[object Float64Array]"]=Te["[object Int8Array]"]=Te["[object Int16Array]"]=Te["[object Int32Array]"]=Te["[object Uint8Array]"]=Te["[object Uint8ClampedArray]"]=Te["[object Uint16Array]"]=Te["[object Uint32Array]"]=!0,Te["[object Arguments]"]=Te["[object Array]"]=Te["[object ArrayBuffer]"]=Te["[object Boolean]"]=Te["[object DataView]"]=Te["[object Date]"]=Te["[object Error]"]=Te["[object Function]"]=Te["[object Map]"]=Te["[object Number]"]=Te["[object Object]"]=Te["[object RegExp]"]=Te["[object Set]"]=Te["[object String]"]=Te["[object WeakMap]"]=!1;var De={};De["[object Arguments]"]=De["[object Array]"]=De["[object ArrayBuffer]"]=De["[object DataView]"]=De["[object Boolean]"]=De["[object Date]"]=De["[object Float32Array]"]=De["[object Float64Array]"]=De["[object Int8Array]"]=De["[object Int16Array]"]=De["[object Int32Array]"]=De["[object Map]"]=De["[object Number]"]=De["[object Object]"]=De["[object RegExp]"]=De["[object Set]"]=De["[object String]"]=De["[object Symbol]"]=De["[object Uint8Array]"]=De["[object Uint8ClampedArray]"]=De["[object Uint16Array]"]=De["[object Uint32Array]"]=!0,De["[object Error]"]=De["[object Function]"]=De["[object WeakMap]"]=!1;var Ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Le=parseFloat,Me=parseInt,Pe="object"==typeof Bn&&Bn&&Bn.Object===Object&&Bn,Fe="object"==typeof self&&self&&self.Object===Object&&self,qe=Pe||Fe||Function("return this")(),Ie=t&&!t.nodeType&&t,$e=Ie&&e&&!e.nodeType&&e,Re=$e&&$e.exports===Ie,ze=Re&&Pe.process,Be=function(){try{var e=$e&&$e.f&&$e.f("util").types;return e||ze&&ze.binding&&ze.binding("util")}catch(t){}}(),We=Be&&Be.isArrayBuffer,He=Be&&Be.isDate,Ue=Be&&Be.isMap,Ve=Be&&Be.isRegExp,Ke=Be&&Be.isSet,Ye=Be&&Be.isTypedArray,Ge=w("length"),Ze=x({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Xe=x({"&":"&","<":"<",">":">",'"':""","'":"'"}),Je=x({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Qe=function e(t){function x(e){if(Kr(e)&&!Fa(e)&&!(e instanceof Ee)){if(e instanceof xe)return e;if(Fi.call(e,"__wrapped__"))return br(e)}return new xe(e)}function we(){}function xe(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=I}function Ee(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ut(e,t,n,r,o,a){var s,l=1&t,u=2&t,c=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==I)return s;if(!Vr(e))return e;if(r=Fa(e)){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Fi.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return wn(e,s)}else{var f=Vo(e),p="[object Function]"==f||"[object GeneratorFunction]"==f;if(Ia(e))return gn(e,l);if("[object Object]"==f||"[object Arguments]"==f||p&&!o){if(s=u||p?{}:rr(e),!l)return u?function(e,t){return xn(e,Uo(e),t)}(e,function(e,t){return e&&xn(t,li(t),e)}(s,e)):function(e,t){return xn(e,Ho(e),t)}(e,ot(s,e))}else{if(!De[f])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return mn(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return t=n?mn(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return vn(e,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return(t=new e.constructor(e.source,pe.exec(e))).lastIndex=e.lastIndex,t;case"[object Set]":return new r;case"[object Symbol]":return No?Si(No.call(e)):{}}}(e,f,l)}}if(a||(a=new $e),o=a.get(e))return o;a.set(e,s),Ba(e)?e.forEach((function(r){s.add(ut(r,t,n,r,e,a))})):Ra(e)&&e.forEach((function(r,i){s.set(i,ut(r,t,n,i,e,a))}));u=c?u?Gn:Yn:u?li:si;var d=r?I:u(e);return i(d||e,(function(r,i){d&&(r=e[i=r]),nt(s,i,ut(r,t,n,i,e,a))})),s}function ct(e,t,n){var r=n.length;if(null==e)return!r;for(e=Si(e);r--;){var i=n[r],o=t[i],a=e[i];if(a===I&&!(i in e)||!o(a))return!1}return!0}function ft(e,t,n){if("function"!=typeof e)throw new Di("Expected a function");return Go((function(){e.apply(I,n)}),t)}function pt(e,t,n,r){var i=-1,o=l,a=!0,s=e.length,f=[],p=t.length;if(!s)return f;n&&(t=c(t,O(n))),r?(o=u,a=!1):200<=t.length&&(o=S,a=!1,t=new Ie(t));e:for(;++it}function Ct(e,t){return null!=e&&Fi.call(e,t)}function Et(e,t){return null!=e&&t in Si(e)}function Ot(e,t,n){for(var r=n?u:l,i=e[0].length,o=e.length,a=o,s=ki(o),f=1/0,p=[];a--;){var d=e[a];a&&t&&(d=c(d,O(t))),f=po(d.length,f),s[a]=!n&&(t||120<=i&&120<=d.length)?new Ie(a&&d):I}d=e[0];var h=-1,g=s[0];e:for(;++h(t=dn(t,e)).length?e:_t(e,Xt(t,0,-1)))?e:e[mr(Cr(t))])?I:n(t,e,r)}function St(e){return Kr(e)&&"[object Arguments]"==xt(e)}function jt(e,t,n,r,i){if(e===t)t=!0;else if(null==e||null==t||!Kr(e)&&!Kr(t))t=e!=e&&t!=t;else e:{var o,a,s=Fa(e),l=Fa(t),u="[object Object]"==(o="[object Arguments]"==(o=s?"[object Array]":Vo(e))?"[object Object]":o);l="[object Object]"==(a="[object Arguments]"==(a=l?"[object Array]":Vo(t))?"[object Object]":a);if((a=o==a)&&Ia(e)){if(!Ia(t)){t=!1;break e}s=!0,u=!1}if(a&&!u)i||(i=new $e),t=s||Wa(e)?Vn(e,t,n,r,jt,i):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!o(new Ui(e),new Ui(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return $r(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=N;case"[object Set]":if(s||(s=P),e.size!=t.size&&!(1&r))break;return(n=a.get(e))?n==t:(r|=2,a.set(e,t),t=Vn(s(e),s(t),r,i,o,a),a.delete(e),t);case"[object Symbol]":if(No)return No.call(e)==No.call(t)}return!1}(e,t,o,n,r,jt,i);else{if(!(1&n)&&(s=u&&Fi.call(e,"__wrapped__"),o=l&&Fi.call(t,"__wrapped__"),s||o)){e=s?e.value():e,t=o?t.value():t,i||(i=new $e),t=jt(e,t,n,r,i);break e}if(a)t:if(i||(i=new $e),s=1&n,o=Yn(e),l=o.length,a=Yn(t).length,l==a||s){for(u=l;u--;){var c=o[u];if(!(s?c in t:Fi.call(t,c))){t=!1;break t}}if((a=i.get(e))&&i.get(t))t=a==t;else{a=!0,i.set(e,t),i.set(t,e);for(var f=s;++ut?n:0,n)?e[t]:I}function Rt(e,t,n){var r=-1;return t=c(t.length?t:[gi],O(Jn())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].c;return e}(e=Pt(e,(function(e){return{a:c(t,(function(t){return t(e)})),b:++r,c:e}})),(function(e,t){var r;e:{r=-1;for(var i=e.a,o=t.a,a=i.length,s=n.length;++r=s?l:l*("desc"==n[r]?-1:1);break e}}r=e.b-t.b}return r}))}function zt(e,t,n){for(var r=-1,i=t.length,o={};++rt||9007199254740991t&&(t=-t>i?0:i+t),0>(n=n>i?i:n)&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0,n=ki(i);++r=i){for(;r>>1,a=e[o];null!==a&&!Xr(a)&&(n?a<=t:a(t=dn(t,e)).length?e:_t(e,Xt(t,0,-1)))||delete e[mr(Cr(t))]}function sn(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++or)return r?on(e[0]):[];for(var i=-1,o=ki(r);++i=r?e:Xt(e,t,n)}function gn(e,t){if(t)return e.slice();var n=e.length;n=Vi?Vi(n):new e.constructor(n);return e.copy(n),n}function mn(e){var t=new e.constructor(e.byteLength);return new Ui(t).set(new Ui(e)),t}function vn(e,t){return new e.constructor(t?mn(e.buffer):e.buffer,e.byteOffset,e.length)}function yn(e,t){if(e!==t){var n=e!==I,r=null===e,i=e==e,o=Xr(e),a=t!==I,s=null===t,l=t==t,u=Xr(t);if(!s&&!u&&!o&&e>t||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&ei?I:o,i=1),t=Si(t);++rn?n?Ut(t,e):t:(n=Ut(t,io(e/F(t))),Ae.test(t)?hn(q(n),0,e).join(""):n.slice(0,e))}function qn(e){return function(t,n,r){r&&"number"!=typeof r&&ar(t,n,r)&&(n=r=I),t=Qr(t),n===I?(n=t,t=0):n=Qr(n),r=r===I?tt||i)&&(1&e&&(a[2]=d[2],t|=1&r?0:4),(r=d[3])&&(i=a[3],a[3]=i?bn(i,r,d[4]):r,a[4]=i?M(a[3],"__lodash_placeholder__"):d[4]),(r=d[5])&&(i=a[5],a[5]=i?_n(i,r,d[6]):r,a[6]=i?M(a[5],"__lodash_placeholder__"):d[6]),(r=d[7])&&(a[7]=r),128&e&&(a[8]=null==a[8]?d[8]:po(a[8],d[8])),null==a[9]&&(a[9]=d[9]),a[0]=d[0],a[1]=t),e=a[0],t=a[1],r=a[2],i=a[3],o=a[4],!(l=a[9]=a[9]===I?u?0:e.length:fo(a[9]-c,0))&&24&t&&(t&=-25),dr((d?$o:Yo)(t&&1!=t?8==t||16==t?function(e,t,r){var i=jn(e);return function o(){for(var a=arguments.length,s=ki(a),l=a,u=Xn(o);l--;)s[l]=arguments[l];return(a-=(l=3>a&&s[0]!==u&&s[a-1]!==u?[]:M(s,u)).length)s))return!1;if((l=o.get(e))&&o.get(t))return l==t;var l=-1,u=!0,c=2&n?new Ie:I;for(o.set(e,t),o.set(t,e);++l(n=null==n?0:ei(n))&&(n=fo(r+n,0)),m(e,Jn(t,3),n)):-1}function wr(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==I&&(i=ei(n),i=0>n?fo(r+i,0):po(i,r-1)),m(e,Jn(t,3),i,!0)}function xr(e){return null!=e&&e.length?mt(e,1):[]}function kr(e){return e&&e.length?e[0]:I}function Cr(e){var t=null==e?0:e.length;return t?e[t-1]:I}function Er(e,t){return e&&e.length&&t&&t.length?Bt(e,t):e}function Or(e){return null==e?e:vo.call(e)}function Ar(e){if(!e||!e.length)return[];var t=0;return e=s(e,(function(e){if(zr(e))return t=fo(e.length,t),!0})),E(t,(function(t){return c(e,w(t))}))}function Sr(e,t){if(!e||!e.length)return[];var r=Ar(e);return null==t?r:c(r,(function(e){return n(t,I,e)}))}function jr(e){return(e=x(e)).__chain__=!0,e}function Tr(e,t){return t(e)}function Dr(e,t){return(Fa(e)?i:Po)(e,Jn(t,3))}function Nr(e,t){return(Fa(e)?o:Fo)(e,Jn(t,3))}function Lr(e,t){return(Fa(e)?c:Pt)(e,Jn(t,3))}function Mr(e,t,n){return t=n?I:t,t=e&&null==t?e.length:t,Bn(e,128,I,I,I,I,t)}function Pr(e,t){var n;if("function"!=typeof t)throw new Di("Expected a function");return e=ei(e),function(){return 0<--e&&(n=t.apply(this,arguments)),1>=e&&(t=I),n}}function Fr(e,t,n){function r(t){var n=l,r=u;return l=u=I,h=t,f=e.apply(r,n)}function i(e){var n=e-d;return e-=h,d===I||n>=t||0>n||m&&e>=c}function o(){var e=Ca();if(i(e))return a(e);var n,r=Go;n=e-h,e=t-(e-d),n=m?po(e,c-n):e,p=r(o,n)}function a(e){return p=I,v&&l?r(e):(l=u=I,f)}function s(){var e=Ca(),n=i(e);if(l=arguments,u=this,d=e,n){if(p===I)return h=e=d,p=Go(o,t),g?r(e):f;if(m)return zo(p),p=Go(o,t),r(d)}return p===I&&(p=Go(o,t)),f}var l,u,c,f,p,d,h=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new Di("Expected a function");return t=ni(t)||0,Vr(n)&&(g=!!n.leading,c=(m="maxWait"in n)?fo(ni(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),s.cancel=function(){p!==I&&zo(p),h=0,l=d=u=p=I},s.flush=function(){return p===I?f:a(Ca())},s}function qr(e,t){function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;return o.has(i)?o.get(i):(r=e.apply(this,r),n.cache=o.set(i,r)||o,r)}if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Di("Expected a function");return n.cache=new(qr.Cache||Fe),n}function Ir(e){if("function"!=typeof e)throw new Di("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function $r(e,t){return e===t||e!=e&&t!=t}function Rr(e){return null!=e&&Ur(e.length)&&!Wr(e)}function zr(e){return Kr(e)&&Rr(e)}function Br(e){if(!Kr(e))return!1;var t=xt(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Gr(e)}function Wr(e){return!!Vr(e)&&("[object Function]"==(e=xt(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function Hr(e){return"number"==typeof e&&e==ei(e)}function Ur(e){return"number"==typeof e&&-1=e}function Vr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Kr(e){return null!=e&&"object"==typeof e}function Yr(e){return"number"==typeof e||Kr(e)&&"[object Number]"==xt(e)}function Gr(e){return!(!Kr(e)||"[object Object]"!=xt(e))&&(null===(e=Ki(e))||"function"==typeof(e=Fi.call(e,"constructor")&&e.constructor)&&e instanceof e&&Pi.call(e)==Ri)}function Zr(e){return"string"==typeof e||!Fa(e)&&Kr(e)&&"[object String]"==xt(e)}function Xr(e){return"symbol"==typeof e||Kr(e)&&"[object Symbol]"==xt(e)}function Jr(e){if(!e)return[];if(Rr(e))return Zr(e)?q(e):wn(e);if(Ji&&e[Ji]){e=e[Ji]();for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}return("[object Map]"==(t=Vo(e))?N:"[object Set]"==t?P:ci)(e)}function Qr(e){return e?(e=ni(e))===$||e===-$?17976931348623157e292*(0>e?-1:1):e==e?e:0:0===e?e:0}function ei(e){var t=(e=Qr(e))%1;return e==e?t?e-t:e:0}function ti(e){return e?lt(ei(e),0,4294967295):0}function ni(e){if("number"==typeof e)return e;if(Xr(e))return R;if(Vr(e)&&(e=Vr(e="function"==typeof e.valueOf?e.valueOf():e)?e+"":e),"string"!=typeof e)return 0===e?e:+e;e=e.replace(re,"");var t=he.test(e);return t||me.test(e)?Me(e.slice(2),t?2:8):de.test(e)?R:+e}function ri(e){return xn(e,li(e))}function ii(e){return null==e?"":rn(e)}function oi(e,t,n){return(e=null==e?I:_t(e,t))===I?n:e}function ai(e,t){return null!=e&&nr(e,t,Et)}function si(e){return Rr(e)?ze(e):Lt(e)}function li(e){if(Rr(e))e=ze(e,!0);else if(Vr(e)){var t,n=ur(e),r=[];for(t in e)("constructor"!=t||!n&&Fi.call(e,t))&&r.push(t);e=r}else{if(t=[],null!=e)for(n in Si(e))t.push(n);e=t}return e}function ui(e,t){if(null==e)return{};var n=c(Gn(e),(function(e){return[e]}));return t=Jn(t),zt(e,n,(function(e,n){return t(e,n[0])}))}function ci(e){return null==e?[]:A(e,si(e))}function fi(e){return gs(ii(e).toLowerCase())}function pi(e){return(e=ii(e))&&e.replace(ye,Ze).replace(Ce,"")}function di(e,t,n){return e=ii(e),(t=n?I:t)===I?Se.test(e)?e.match(Oe)||[]:e.match(ue)||[]:e.match(t)||[]}function hi(e){return function(){return e}}function gi(e){return e}function mi(e){return Nt("function"==typeof e?e:ut(e,1))}function vi(e,t,n){var r=si(t),o=bt(t,r);null!=n||Vr(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=bt(t,si(t)));var a=!(Vr(n)&&"chain"in n&&!n.chain),s=Wr(e);return i(o,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=wn(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,f([this.value()],arguments))})})),e}function yi(){}function bi(e){return sr(e)?w(mr(e)):function(e){return function(t){return _t(t,e)}}(e)}function _i(){return[]}function wi(){return!1}var xi,ki=(t=null==t?qe:Qe.defaults(qe.Object(),t,Qe.pick(qe,je))).Array,Ci=t.Date,Ei=t.Error,Oi=t.Function,Ai=t.Math,Si=t.Object,ji=t.RegExp,Ti=t.String,Di=t.TypeError,Ni=ki.prototype,Li=Si.prototype,Mi=t["__core-js_shared__"],Pi=Oi.prototype.toString,Fi=Li.hasOwnProperty,qi=0,Ii=(xi=/[^.]+$/.exec(Mi&&Mi.keys&&Mi.keys.IE_PROTO||""))?"Symbol(src)_1."+xi:"",$i=Li.toString,Ri=Pi.call(Si),zi=qe._,Bi=ji("^"+Pi.call(Fi).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wi=Re?t.Buffer:I,Hi=t.Symbol,Ui=t.Uint8Array,Vi=Wi?Wi.g:I,Ki=L(Si.getPrototypeOf,Si),Yi=Si.create,Gi=Li.propertyIsEnumerable,Zi=Ni.splice,Xi=Hi?Hi.isConcatSpreadable:I,Ji=Hi?Hi.iterator:I,Qi=Hi?Hi.toStringTag:I,eo=function(){try{var e=tr(Si,"defineProperty");return e({},"",{}),e}catch(t){}}(),to=t.clearTimeout!==qe.clearTimeout&&t.clearTimeout,no=Ci&&Ci.now!==qe.Date.now&&Ci.now,ro=t.setTimeout!==qe.setTimeout&&t.setTimeout,io=Ai.ceil,oo=Ai.floor,ao=Si.getOwnPropertySymbols,so=Wi?Wi.isBuffer:I,lo=t.isFinite,uo=Ni.join,co=L(Si.keys,Si),fo=Ai.max,po=Ai.min,ho=Ci.now,go=t.parseInt,mo=Ai.random,vo=Ni.reverse,yo=tr(t,"DataView"),bo=tr(t,"Map"),_o=tr(t,"Promise"),wo=tr(t,"Set"),xo=tr(t,"WeakMap"),ko=tr(Si,"create"),Co=xo&&new xo,Eo={},Oo=vr(yo),Ao=vr(bo),So=vr(_o),jo=vr(wo),To=vr(xo),Do=Hi?Hi.prototype:I,No=Do?Do.valueOf:I,Lo=Do?Do.toString:I,Mo=function(){function e(){}return function(t){return Vr(t)?Yi?Yi(t):(e.prototype=t,t=new e,e.prototype=I,t):{}}}();x.templateSettings={escape:G,evaluate:Z,interpolate:X,variable:"",imports:{_:x}},x.prototype=we.prototype,x.prototype.constructor=x,xe.prototype=Mo(we.prototype),xe.prototype.constructor=xe,Ee.prototype=Mo(we.prototype),Ee.prototype.constructor=Ee,Ne.prototype.clear=function(){this.__data__=ko?ko(null):{},this.size=0},Ne.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},Ne.prototype.get=function(e){var t=this.__data__;return ko?"__lodash_hash_undefined__"===(e=t[e])?I:e:Fi.call(t,e)?t[e]:I},Ne.prototype.has=function(e){var t=this.__data__;return ko?t[e]!==I:Fi.call(t,e)},Ne.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ko&&t===I?"__lodash_hash_undefined__":t,this},Pe.prototype.clear=function(){this.__data__=[],this.size=0},Pe.prototype.delete=function(e){var t=this.__data__;return!(0>(e=rt(t,e))||(e==t.length-1?t.pop():Zi.call(t,e,1),--this.size,0))},Pe.prototype.get=function(e){var t=this.__data__;return 0>(e=rt(t,e))?I:t[e][1]},Pe.prototype.has=function(e){return-1r?(++this.size,n.push([e,t])):n[r][1]=t,this},Fe.prototype.clear=function(){this.size=0,this.__data__={hash:new Ne,map:new(bo||Pe),string:new Ne}},Fe.prototype.delete=function(e){return e=Qn(this,e).delete(e),this.size-=e?1:0,e},Fe.prototype.get=function(e){return Qn(this,e).get(e)},Fe.prototype.has=function(e){return Qn(this,e).has(e)},Fe.prototype.set=function(e,t){var n=Qn(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ie.prototype.add=Ie.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ie.prototype.has=function(e){return this.__data__.has(e)},$e.prototype.clear=function(){this.__data__=new Pe,this.size=0},$e.prototype.delete=function(e){var t=this.__data__;return e=t.delete(e),this.size=t.size,e},$e.prototype.get=function(e){return this.__data__.get(e)},$e.prototype.has=function(e){return this.__data__.has(e)},$e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Pe){var r=n.__data__;if(!bo||199>r.length)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Fe(r)}return n.set(e,t),this.size=n.size,this};var Po=En(vt),Fo=En(yt,!0),qo=On(),Io=On(!0),$o=Co?function(e,t){return Co.set(e,t),e}:gi,Ro=eo?function(e,t){return eo(e,"toString",{configurable:!0,enumerable:!1,value:hi(t),writable:!0})}:gi,zo=to||function(e){return qe.clearTimeout(e)},Bo=wo&&1/P(new wo([,-0]))[1]==$?function(e){return new wo(e)}:yi,Wo=Co?function(e){return Co.get(e)}:yi,Ho=ao?function(e){return null==e?[]:(e=Si(e),s(ao(e),(function(t){return Gi.call(e,t)})))}:_i,Uo=ao?function(e){for(var t=[];e;)f(t,Ho(e)),e=Ki(e);return t}:_i,Vo=xt;(yo&&"[object DataView]"!=Vo(new yo(new ArrayBuffer(1)))||bo&&"[object Map]"!=Vo(new bo)||_o&&"[object Promise]"!=Vo(_o.resolve())||wo&&"[object Set]"!=Vo(new wo)||xo&&"[object WeakMap]"!=Vo(new xo))&&(Vo=function(e){var t=xt(e);if(e=(e="[object Object]"==t?e.constructor:I)?vr(e):"")switch(e){case Oo:return"[object DataView]";case Ao:return"[object Map]";case So:return"[object Promise]";case jo:return"[object Set]";case To:return"[object WeakMap]"}return t});var Ko=Mi?Wr:wi,Yo=hr($o),Go=ro||function(e,t){return qe.setTimeout(e,t)},Zo=hr(Ro),Xo=function(e){var t=(e=qr(e,(function(e){return 500===t.size&&t.clear(),e}))).cache;return e}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)})),t})),Jo=Vt((function(e,t){return zr(e)?pt(e,mt(t,1,zr,!0)):[]})),Qo=Vt((function(e,t){var n=Cr(t);return zr(n)&&(n=I),zr(e)?pt(e,mt(t,1,zr,!0),Jn(n,2)):[]})),ea=Vt((function(e,t){var n=Cr(t);return zr(n)&&(n=I),zr(e)?pt(e,mt(t,1,zr,!0),I,n):[]})),ta=Vt((function(e){var t=c(e,fn);return t.length&&t[0]===e[0]?Ot(t):[]})),na=Vt((function(e){var t=Cr(e),n=c(e,fn);return t===Cr(n)?t=I:n.pop(),n.length&&n[0]===e[0]?Ot(n,Jn(t,2)):[]})),ra=Vt((function(e){var t=Cr(e),n=c(e,fn);return(t="function"==typeof t?t:I)&&n.pop(),n.length&&n[0]===e[0]?Ot(n,I,t):[]})),ia=Vt(Er),oa=Kn((function(e,t){var n=null==e?0:e.length,r=st(e,t);return Wt(e,c(t,(function(e){return or(e,n)?+e:e})).sort(yn)),r})),aa=Vt((function(e){return on(mt(e,1,zr,!0))})),sa=Vt((function(e){var t=Cr(e);return zr(t)&&(t=I),on(mt(e,1,zr,!0),Jn(t,2))})),la=Vt((function(e){var t="function"==typeof(t=Cr(e))?t:I;return on(mt(e,1,zr,!0),I,t)})),ua=Vt((function(e,t){return zr(e)?pt(e,t):[]})),ca=Vt((function(e){return un(s(e,zr))})),fa=Vt((function(e){var t=Cr(e);return zr(t)&&(t=I),un(s(e,zr),Jn(t,2))})),pa=Vt((function(e){var t="function"==typeof(t=Cr(e))?t:I;return un(s(e,zr),I,t)})),da=Vt(Ar),ha=Vt((function(e){var t="function"==typeof(t=1<(t=e.length)?e[t-1]:I)?(e.pop(),t):I;return Sr(e,t)})),ga=Kn((function(e){function t(t){return st(t,e)}var n=e.length,r=n?e[0]:0,i=this.__wrapped__;return!(1=t})),Pa=St(function(){return arguments}())?St:function(e){return Kr(e)&&Fi.call(e,"callee")&&!Gi.call(e,"callee")},Fa=ki.isArray,qa=We?O(We):function(e){return Kr(e)&&"[object ArrayBuffer]"==xt(e)},Ia=so||wi,$a=He?O(He):function(e){return Kr(e)&&"[object Date]"==xt(e)},Ra=Ue?O(Ue):function(e){return Kr(e)&&"[object Map]"==Vo(e)},za=Ve?O(Ve):function(e){return Kr(e)&&"[object RegExp]"==xt(e)},Ba=Ke?O(Ke):function(e){return Kr(e)&&"[object Set]"==Vo(e)},Wa=Ye?O(Ye):function(e){return Kr(e)&&Ur(e.length)&&!!Te[xt(e)]},Ha=In(Mt),Ua=In((function(e,t){return e<=t})),Va=Cn((function(e,t){if(ur(t)||Rr(t))xn(t,si(t),e);else for(var n in t)Fi.call(t,n)&&nt(e,n,t[n])})),Ka=Cn((function(e,t){xn(t,li(t),e)})),Ya=Cn((function(e,t,n,r){xn(t,li(t),e,r)})),Ga=Cn((function(e,t,n,r){xn(t,si(t),e,r)})),Za=Kn(st),Xa=Vt((function(e,t){e=Si(e);var n=-1,r=t.length;for((i=2--e)return t.apply(this,arguments)}},x.ary=Mr,x.assign=Va,x.assignIn=Ka,x.assignInWith=Ya,x.assignWith=Ga,x.at=Za,x.before=Pr,x.bind=Ea,x.bindAll=vs,x.bindKey=Oa,x.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Fa(e)?e:[e]},x.chain=jr,x.chunk=function(e,t,n){if(t=(n?ar(e,t,n):t===I)?1:fo(ei(t),0),!(n=null==e?0:e.length)||1>t)return[];for(var r=0,i=0,o=ki(io(n/t));r(t=n||t===I?1:ei(t))?0:t,r):[]},x.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Xt(e,0,0>(t=r-(t=n||t===I?1:ei(t)))?0:t):[]},x.dropRightWhile=function(e,t){return e&&e.length?sn(e,Jn(t,3),!0,!0):[]},x.dropWhile=function(e,t){return e&&e.length?sn(e,Jn(t,3),!0):[]},x.fill=function(e,t,n,r){var i=null==e?0:e.length;if(!i)return[];for(n&&"number"!=typeof n&&ar(e,t,n)&&(n=0,r=i),i=e.length,0>(n=ei(n))&&(n=-n>i?0:i+n),0>(r=r===I||r>i?i:ei(r))&&(r+=i),r=n>r?0:ti(r);n>>0)?(e=ii(e))&&("string"==typeof t||null!=t&&!za(t))&&(!(t=rn(t))&&Ae.test(e))?hn(q(e),0,n):e.split(t,n):[]},x.spread=function(e,t){if("function"!=typeof e)throw new Di("Expected a function");return t=null==t?0:fo(ei(t),0),Vt((function(r){var i=r[t];return r=hn(r,0,t),i&&f(r,i),n(e,this,r)}))},x.tail=function(e){var t=null==e?0:e.length;return t?Xt(e,1,t):[]},x.take=function(e,t,n){return e&&e.length?Xt(e,0,0>(t=n||t===I?1:ei(t))?0:t):[]},x.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Xt(e,0>(t=r-(t=n||t===I?1:ei(t)))?0:t,r):[]},x.takeRightWhile=function(e,t){return e&&e.length?sn(e,Jn(t,3),!1,!0):[]},x.takeWhile=function(e,t){return e&&e.length?sn(e,Jn(t,3)):[]},x.tap=function(e,t){return t(e),e},x.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Di("Expected a function");return Vr(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Fr(e,t,{leading:r,maxWait:t,trailing:i})},x.thru=Tr,x.toArray=Jr,x.toPairs=as,x.toPairsIn=ss,x.toPath=function(e){return Fa(e)?c(e,mr):Xr(e)?[e]:wn(Xo(ii(e)))},x.toPlainObject=ri,x.transform=function(e,t,n){var r=Fa(e),o=r||Ia(e)||Wa(e);if(t=Jn(t,4),null==n){var a=e&&e.constructor;n=o?r?new a:[]:Vr(e)&&Wr(a)?Mo(Ki(e)):{}}return(o?i:vt)(e,(function(e,r,i){return t(n,e,r,i)})),n},x.unary=function(e){return Mr(e,1)},x.union=aa,x.unionBy=sa,x.unionWith=la,x.uniq=function(e){return e&&e.length?on(e):[]},x.uniqBy=function(e,t){return e&&e.length?on(e,Jn(t,2)):[]},x.uniqWith=function(e,t){return t="function"==typeof t?t:I,e&&e.length?on(e,I,t):[]},x.unset=function(e,t){return null==e||an(e,t)},x.unzip=Ar,x.unzipWith=Sr,x.update=function(e,t,n){return null==e?e:Gt(e,t,pn(n)(_t(e,t)),void 0)},x.updateWith=function(e,t,n,r){return r="function"==typeof r?r:I,null!=e&&(e=Gt(e,t,pn(n)(_t(e,t)),r)),e},x.values=ci,x.valuesIn=function(e){return null==e?[]:A(e,li(e))},x.without=ua,x.words=di,x.wrap=function(e,t){return Ta(pn(t),e)},x.xor=ca,x.xorBy=fa,x.xorWith=pa,x.zip=da,x.zipObject=function(e,t){return cn(e||[],t||[],nt)},x.zipObjectDeep=function(e,t){return cn(e||[],t||[],Gt)},x.zipWith=ha,x.entries=as,x.entriesIn=ss,x.extend=Ka,x.extendWith=Ya,vi(x,x),x.add=As,x.attempt=ms,x.camelCase=ls,x.capitalize=fi,x.ceil=Ss,x.clamp=function(e,t,n){return n===I&&(n=t,t=I),n!==I&&(n=(n=ni(n))==n?n:0),t!==I&&(t=(t=ni(t))==t?t:0),lt(ni(e),t,n)},x.clone=function(e){return ut(e,4)},x.cloneDeep=function(e){return ut(e,5)},x.cloneDeepWith=function(e,t){return ut(e,5,t="function"==typeof t?t:I)},x.cloneWith=function(e,t){return ut(e,4,t="function"==typeof t?t:I)},x.conformsTo=function(e,t){return null==t||ct(e,t,si(t))},x.deburr=pi,x.defaultTo=function(e,t){return null==e||e!=e?t:e},x.divide=js,x.endsWith=function(e,t,n){e=ii(e),t=rn(t);var r=e.length;r=n=n===I?r:lt(ei(n),0,r);return 0<=(n-=t.length)&&e.slice(n,r)==t},x.eq=$r,x.escape=function(e){return(e=ii(e))&&Y.test(e)?e.replace(V,Xe):e},x.escapeRegExp=function(e){return(e=ii(e))&&ne.test(e)?e.replace(te,"\\$&"):e},x.every=function(e,t,n){var r=Fa(e)?a:dt;return n&&ar(e,t,n)&&(t=I),r(e,Jn(t,3))},x.find=va,x.findIndex=_r,x.findKey=function(e,t){return g(e,Jn(t,3),vt)},x.findLast=ya,x.findLastIndex=wr,x.findLastKey=function(e,t){return g(e,Jn(t,3),yt)},x.floor=Ts,x.forEach=Dr,x.forEachRight=Nr,x.forIn=function(e,t){return null==e?e:qo(e,Jn(t,3),li)},x.forInRight=function(e,t){return null==e?e:Io(e,Jn(t,3),li)},x.forOwn=function(e,t){return e&&vt(e,Jn(t,3))},x.forOwnRight=function(e,t){return e&&yt(e,Jn(t,3))},x.get=oi,x.gt=La,x.gte=Ma,x.has=function(e,t){return null!=e&&nr(e,t,Ct)},x.hasIn=ai,x.head=kr,x.identity=gi,x.includes=function(e,t,n,r){return e=Rr(e)?e:ci(e),n=n&&!r?ei(n):0,r=e.length,0>n&&(n=fo(r+n,0)),Zr(e)?n<=r&&-1(n=null==n?0:ei(n))&&(n=fo(r+n,0)),v(e,t,n)):-1},x.inRange=function(e,t,n){return t=Qr(t),n===I?(n=t,t=0):n=Qr(n),(e=ni(e))>=po(t,n)&&e=e},x.isSet=Ba,x.isString=Zr,x.isSymbol=Xr,x.isTypedArray=Wa,x.isUndefined=function(e){return e===I},x.isWeakMap=function(e){return Kr(e)&&"[object WeakMap]"==Vo(e)},x.isWeakSet=function(e){return Kr(e)&&"[object WeakSet]"==xt(e)},x.join=function(e,t){return null==e?"":uo.call(e,t)},x.kebabCase=us,x.last=Cr,x.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;if(n!==I&&(i=0>(i=ei(n))?fo(r+i,0):po(i,r-1)),t==t){for(n=i+1;n--&&e[n]!==t;);e=n}else e=m(e,b,i,!0);return e},x.lowerCase=cs,x.lowerFirst=fs,x.lt=Ha,x.lte=Ua,x.max=function(e){return e&&e.length?ht(e,gi,kt):I},x.maxBy=function(e,t){return e&&e.length?ht(e,Jn(t,2),kt):I},x.mean=function(e){return _(e,gi)},x.meanBy=function(e,t){return _(e,Jn(t,2))},x.min=function(e){return e&&e.length?ht(e,gi,Mt):I},x.minBy=function(e,t){return e&&e.length?ht(e,Jn(t,2),Mt):I},x.stubArray=_i,x.stubFalse=wi,x.stubObject=function(){return{}},x.stubString=function(){return""},x.stubTrue=function(){return!0},x.multiply=Ds,x.nth=function(e,t){return e&&e.length?$t(e,ei(t)):I},x.noConflict=function(){return qe._===this&&(qe._=zi),this},x.noop=yi,x.now=Ca,x.pad=function(e,t,n){e=ii(e);var r=(t=ei(t))?F(e):0;return!t||r>=t?e:Fn(oo(t=(t-r)/2),n)+e+Fn(io(t),n)},x.padEnd=function(e,t,n){e=ii(e);var r=(t=ei(t))?F(e):0;return t&&rt){var r=e;e=t,t=r}return n||e%1||t%1?(n=mo(),po(e+n*(t-e+Le("1e-"+((n+"").length-1))),t)):Ht(e,t)},x.reduce=function(e,t,n){var r=Fa(e)?p:k,i=3>arguments.length;return r(e,Jn(t,4),n,i,Po)},x.reduceRight=function(e,t,n){var r=Fa(e)?d:k,i=3>arguments.length;return r(e,Jn(t,4),n,i,Fo)},x.repeat=function(e,t,n){return t=(n?ar(e,t,n):t===I)?1:ei(t),Ut(ii(e),t)},x.replace=function(){var e=arguments,t=ii(e[0]);return 3>e.length?t:t.replace(e[1],e[2])},x.result=function(e,t,n){var r=-1,i=(t=dn(t,e)).length;for(i||(i=1,e=I);++r(e=ei(e))||9007199254740991=o)return e;if(1>(o=n-F(r)))return r;if(n=a?hn(a,0,o).join(""):e.slice(0,o),i===I)return n+r;if(a&&(o+=n.length-o),za(i)){if(e.slice(o).search(i)){var s=n;for(i.global||(i=ji(i.source,ii(pe.exec(i))+"g")),i.lastIndex=0;a=i.exec(s);)var l=a.index;n=n.slice(0,l===I?o:l)}}else e.indexOf(rn(i),o)!=o&&(-1<(i=n.lastIndexOf(i))&&(n=n.slice(0,i)));return n+r},x.unescape=function(e){return(e=ii(e))&&K.test(e)?e.replace(U,Je):e},x.uniqueId=function(e){var t=++qi;return ii(e)+t},x.upperCase=hs,x.upperFirst=gs,x.each=Dr,x.eachRight=Nr,x.first=kr,vi(x,function(){var e={};return vt(x,(function(t,n){Fi.call(x.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),x.VERSION="4.17.13",i("bind bindKey curry curryRight partial partialRight".split(" "),(function(e){x[e].placeholder=x})),i(["drop","take"],(function(e,t){Ee.prototype[e]=function(n){n=n===I?1:fo(ei(n),0);var r=this.__filtered__&&!t?new Ee(this):this.clone();return r.__filtered__?r.__takeCount__=po(n,r.__takeCount__):r.__views__.push({size:po(n,4294967295),type:e+(0>r.__dir__?"Right":"")}),r},Ee.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),i(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Ee.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Jn(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),i(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Ee.prototype[e]=function(){return this[n](1).value()[0]}})),i(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Ee.prototype[e]=function(){return this.__filtered__?new Ee(this):this[n](1)}})),Ee.prototype.compact=function(){return this.filter(gi)},Ee.prototype.find=function(e){return this.filter(e).head()},Ee.prototype.findLast=function(e){return this.reverse().find(e)},Ee.prototype.invokeMap=Vt((function(e,t){return"function"==typeof e?new Ee(this):this.map((function(n){return At(n,e,t)}))})),Ee.prototype.reject=function(e){return this.filter(Ir(Jn(e)))},Ee.prototype.slice=function(e,t){e=ei(e);var n=this;return n.__filtered__&&(0t)?new Ee(n):(0>e?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==I&&(n=0>(t=ei(t))?n.dropRight(-t):n.take(t-e)),n)},Ee.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ee.prototype.toArray=function(){return this.take(4294967295)},vt(Ee.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=x[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(x.prototype[t]=function(){function t(e){return e=i.apply(x,f([e],s)),r&&p?e[0]:e}var a=this.__wrapped__,s=r?[1]:arguments,l=a instanceof Ee,u=s[0],c=l||Fa(a);c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var p=this.__chain__,d=!!this.__actions__.length;u=o&&!p,l=l&&!d;return!o&&c?(a=l?a:new Ee(this),(a=e.apply(a,s)).__actions__.push({func:Tr,args:[t],thisArg:I}),new xe(a,p)):u&&l?e.apply(this,s):(a=this.thru(t),u?r?a.value()[0]:a.value():a)})})),i("pop push shift sort splice unshift".split(" "),(function(e){var t=Ni[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);x.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Fa(i)?i:[],e)}return this[n]((function(n){return t.apply(Fa(n)?n:[],e)}))}})),vt(Ee.prototype,(function(e,t){var n=x[t];if(n){var r=n.name+"";Fi.call(Eo,r)||(Eo[r]=[]),Eo[r].push({name:t,func:n})}})),Eo[Nn(I,2).name]=[{name:"wrapper",func:I}],Ee.prototype.clone=function(){var e=new Ee(this.__wrapped__);return e.__actions__=wn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=wn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=wn(this.__views__),e},Ee.prototype.reverse=function(){if(this.__filtered__){var e=new Ee(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ee.prototype.value=function(){var e,t=this.__wrapped__.value(),n=this.__dir__,r=Fa(t),i=0>n,o=r?t.length:0;e=o;for(var a=this.__views__,s=0,l=-1,u=a.length;++l=this.__values__.length;return{done:e,value:e?I:this.__values__[this.__index__++]}},x.prototype.plant=function(e){for(var t,n=this;n instanceof we;){var r=br(n);r.__index__=0,r.__values__=I,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},x.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof Ee?(this.__actions__.length&&(e=new Ee(this)),(e=e.reverse()).__actions__.push({func:Tr,args:[Or],thisArg:I}),new xe(e,this.__chain__)):this.thru(Or)},x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=function(){return ln(this.__wrapped__,this.__actions__)},x.prototype.first=x.prototype.head,Ji&&(x.prototype[Ji]=function(){return this}),x}();$e?(($e.exports=Qe)._=Qe,Ie._=Qe):qe._=Qe}).call(Bn)})),Kn=Un((function(e,t){t.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},t.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},t.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},t.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},t.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},t.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},t.realToAlias=function(){var e=Object.prototype.hasOwnProperty,n=t.aliasToReal,r={};for(var i in n){var o=n[i];e.call(r,o)?r[o].push(i):r[o]=[i]}return r}(),t.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},t.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},t.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}})),Yn={},Gn=Array.prototype.push;function Zn(e,t){return 2==t?function(t,n){return e(t,n)}:function(t){return e(t)}}function Xn(e){for(var t=e?e.length:0,n=Array(t);t--;)n[t]=e[t];return n}function Jn(e,t){return function(){var n=arguments.length;if(n){for(var r=Array(n);n--;)r[n]=arguments[n];var i=r[0]=t.apply(void 0,r);return e.apply(void 0,r),i}}}var Qn=function e(t,n,r,i){var o="function"==typeof n,a=n===Object(n);if(a&&(i=r,r=n,n=void 0),null==r)throw new TypeError;i||(i={});var s=!("cap"in i)||i.cap,l=!("curry"in i)||i.curry,u=!("fixed"in i)||i.fixed,c=!("immutable"in i)||i.immutable,f=!("rearg"in i)||i.rearg,p=o?r:Yn,d="curry"in i&&i.curry,h="fixed"in i&&i.fixed,g="rearg"in i&&i.rearg,m=o?r.runInContext():void 0,v=o?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},y=v.ary,b=v.assign,_=v.clone,w=v.curry,x=v.forEach,k=v.isArray,C=v.isError,E=v.isFunction,O=v.isWeakMap,A=v.keys,S=v.rearg,j=v.toInteger,T=v.toPath,D=A(Kn.aryMethod),N={castArray:function(e){return function(){var t=arguments[0];return k(t)?e(Xn(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[0],n=arguments[1],r=e(t,n),i=r.length;return s&&"number"==typeof n?(n=n>2?n-2:1,i&&i<=n?r:Zn(r,n)):r}},mixin:function(e){return function(t){var n=this;if(!E(n))return e(n,Object(t));var r=[];return x(A(t),(function(e){E(t[e])&&r.push([e,n.prototype[e]])})),e(n,Object(t)),x(r,(function(e){var t=e[1];E(t)?n.prototype[e[0]]=t:delete n.prototype[e[0]]})),n}},nthArg:function(e){return function(t){var n=t<0?1:j(t)+1;return w(e(t),n)}},rearg:function(e){return function(t,n){var r=n?n.length:0;return w(e(t,n),r)}},runInContext:function(n){return function(r){return e(t,n(r),i)}}};function L(e,t){if(s){var n=Kn.iterateeRearg[e];if(n)return function(e,t){return I(e,(function(e){var n=t.length;return function(e,t){return 2==t?function(t,n){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}(S(Zn(e,n),t),n)}))}(t,n);var r=!o&&Kn.iterateeAry[e];if(r)return function(e,t){return I(e,(function(e){return"function"==typeof e?Zn(e,t):e}))}(t,r)}return t}function M(e,t,n){if(u&&(h||!Kn.skipFixed[e])){var r=Kn.methodSpread[e],i=r&&r.start;return void 0===i?y(t,n):function(e,t){return function(){for(var n=arguments.length,r=n-1,i=Array(n);n--;)i[n]=arguments[n];var o=i[t],a=i.slice(0,t);return o&&Gn.apply(a,o),t!=r&&Gn.apply(a,i.slice(t+1)),e.apply(this,a)}}(t,i)}return t}function P(e,t,n){return f&&n>1&&(g||!Kn.skipRearg[e])?S(t,Kn.methodRearg[e]||Kn.aryRearg[n]):t}function F(e,t){for(var n=-1,r=(t=T(t)).length,i=r-1,o=_(Object(e)),a=o;null!=a&&++n1?w(t,n):t}(0,r=L(i,r),e),!1}})),!r})),r||(r=o),r==t&&(r=d?w(r,1):function(){return t.apply(this,arguments)}),r.convert=q(i,t),r.placeholder=t.placeholder=n,r}if(!a)return $(n,r,p);var R=r,z=[];return x(D,(function(e){x(Kn.aryMethod[e],(function(e){var t=R[Kn.remap[e]||e];t&&z.push([e,$(e,t,R)])}))})),x(A(R),(function(e){var t=R[e];if("function"==typeof t){for(var n=z.length;n--;)if(z[n][0]==e)return;t.convert=q(e,t),z.push([e,t])}})),x(z,(function(e){R[e[0]]=e[1]})),R.convert=function(e){return R.runInContext.convert(e)(void 0)},R.placeholder=R,x(A(R),(function(e){x(Kn.realToAlias[e]||[],(function(t){R[t]=R[e]}))})),R},er=Vn.runInContext(),tr=Qn(er,er),nr=function(){return(nr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)a.push(r.value)}catch(Vr){i={error:Vr}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function ir(){for(var e=[],t=0;t=0?ir(this._breadcrumbs,[n]).slice(-t):ir(this._breadcrumbs,[n]),this._notifyScopeListeners(),this},e.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},e.prototype._applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},e.prototype.applyToEvent=function(e,t){return this._extra&&Object.keys(this._extra).length&&(e.extra=nr({},this._extra,e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=nr({},this._tags,e.tags)),this._user&&Object.keys(this._user).length&&(e.user=nr({},this._user,e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=nr({},this._contexts,e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span&&(e.contexts=nr({trace:this._span.getTraceContext()},e.contexts)),this._applyFingerprint(e),e.breadcrumbs=ir(e.breadcrumbs||[],this._breadcrumbs),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,this._notifyEventProcessors(ir(((n=lr()).__SENTRY__=n.__SENTRY__||{},n.__SENTRY__.globalEventProcessors=n.__SENTRY__.globalEventProcessors||[],n.__SENTRY__.globalEventProcessors),this._eventProcessors),e,t);var n},e}();var Cr=function(){function e(e,t,n){void 0===t&&(t=new kr),void 0===n&&(n=3),this._version=n,this._stack=[],this._stack.push({client:e,scope:t}),this.bindClient(e)}return e.prototype._invokeClient=function(e){for(var t,n=[],r=1;r0?e[e.length-1].scope:void 0,n=kr.clone(t);return this.getStack().push({client:this.getClient(),scope:n}),n},e.prototype.popScope=function(){return void 0!==this.getStack().pop()},e.prototype.withScope=function(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}},e.prototype.getClient=function(){return this.getStackTop().client},e.prototype.getScope=function(){return this.getStackTop().scope},e.prototype.getStack=function(){return this._stack},e.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},e.prototype.captureException=function(e,t){var n=this._lastEventId=ur(),r=t;if(!t){var i=void 0;try{throw new Error("Sentry syntheticException")}catch(o){i=o}r={originalException:e,syntheticException:i}}return this._invokeClient("captureException",e,nr({},r,{event_id:n})),n},e.prototype.captureMessage=function(e,t,n){var r=this._lastEventId=ur(),i=n;if(!n){var o=void 0;try{throw new Error(e)}catch(a){o=a}i={originalException:e,syntheticException:o}}return this._invokeClient("captureMessage",e,t,nr({},i,{event_id:r})),r},e.prototype.captureEvent=function(e,t){var n=this._lastEventId=ur();return this._invokeClient("captureEvent",e,nr({},t,{event_id:n})),n},e.prototype.lastEventId=function(){return this._lastEventId},e.prototype.addBreadcrumb=function(e,t){var n=this.getStackTop();if(n.scope&&n.client){var r=n.client.getOptions&&n.client.getOptions()||{},i=r.beforeBreadcrumb,o=void 0===i?null:i,a=r.maxBreadcrumbs,s=void 0===a?100:a;if(!(s<=0)){var l=gr(),u=nr({timestamp:l},e),c=o?cr((function(){return o(u,t)})):u;null!==c&&n.scope.addBreadcrumb(c,Math.min(s,100))}}},e.prototype.setUser=function(e){var t=this.getStackTop();t.scope&&t.scope.setUser(e)},e.prototype.setTags=function(e){var t=this.getStackTop();t.scope&&t.scope.setTags(e)},e.prototype.setExtras=function(e){var t=this.getStackTop();t.scope&&t.scope.setExtras(e)},e.prototype.setTag=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setTag(e,t)},e.prototype.setExtra=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setExtra(e,t)},e.prototype.setContext=function(e,t){var n=this.getStackTop();n.scope&&n.scope.setContext(e,t)},e.prototype.configureScope=function(e){var t=this.getStackTop();t.scope&&t.client&&e(t.scope)},e.prototype.run=function(e){var t=Or(this);try{e(this)}finally{Or(t)}},e.prototype.getIntegration=function(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return wr.warn("Cannot retrieve integration "+e.id+" from the current Hub"),null}},e.prototype.startSpan=function(e){return this._callExtensionMethod("startSpan",e)},e.prototype.startTransaction=function(e){return this._callExtensionMethod("startTransaction",e)},e.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},e.prototype._callExtensionMethod=function(e){for(var t=[],n=1;n>>8,n[2*r+1]=o%256}return n},decompressFromUint8Array:function(e){if(null==e)return Ir.decompress(e);for(var t=new Array(e.length/2),n=0,r=t.length;n>=1}else{for(i=1,r=0;r>=1}0==--f&&(f=Math.pow(2,d),d++),delete s[c]}else for(i=a[c],r=0;r>=1;0==--f&&(f=Math.pow(2,d),d++),a[u]=p++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(s,c)){if(c.charCodeAt(0)<256){for(r=0;r>=1}else{for(i=1,r=0;r>=1}0==--f&&(f=Math.pow(2,d),d++),delete s[c]}else for(i=a[c],r=0;r>=1;0==--f&&(f=Math.pow(2,d),d++)}for(i=2,r=0;r>=1;for(;;){if(g<<=1,m==t-1){h.push(n(g));break}m++}return h.join("")},decompress:function(e){return null==e?"":""==e?null:Ir._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(e,t,n){var r,i,o,a,s,l,u,c=[],f=4,p=4,d=3,h="",g=[],m={val:n(0),position:t,index:1};for(r=0;r<3;r+=1)c[r]=r;for(o=0,s=Math.pow(2,2),l=1;l!=s;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=t,m.val=n(m.index++)),o|=(a>0?1:0)*l,l<<=1;switch(o){case 0:for(o=0,s=Math.pow(2,8),l=1;l!=s;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=t,m.val=n(m.index++)),o|=(a>0?1:0)*l,l<<=1;u=Nr(o);break;case 1:for(o=0,s=Math.pow(2,16),l=1;l!=s;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=t,m.val=n(m.index++)),o|=(a>0?1:0)*l,l<<=1;u=Nr(o);break;case 2:return""}for(c[3]=u,i=u,g.push(u);;){if(m.index>e)return"";for(o=0,s=Math.pow(2,d),l=1;l!=s;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=t,m.val=n(m.index++)),o|=(a>0?1:0)*l,l<<=1;switch(u=o){case 0:for(o=0,s=Math.pow(2,8),l=1;l!=s;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=t,m.val=n(m.index++)),o|=(a>0?1:0)*l,l<<=1;c[p++]=Nr(o),u=p-1,f--;break;case 1:for(o=0,s=Math.pow(2,16),l=1;l!=s;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=t,m.val=n(m.index++)),o|=(a>0?1:0)*l,l<<=1;c[p++]=Nr(o),u=p-1,f--;break;case 2:return g.join("")}if(0==f&&(f=Math.pow(2,d),d++),c[u])h=c[u];else{if(u!==p)return null;h=i+i.charAt(0)}g.push(h),c[p++]=i+h.charAt(0),i=h,0==--f&&(f=Math.pow(2,d),d++)}}},$r={DEBUG:!1,LIB_VERSION:"1.0.0"};if("undefined"==typeof window){var Rr={hostname:""};qr={navigator:{userAgent:""},document:{location:Rr,referrer:""},screen:{width:0,height:0},location:Rr}}else qr=window;var zr,Br,Wr,Hr,Ur,Vr,Kr,Yr,Gr,Zr,Xr,Jr=Array.prototype,Qr=Function.prototype,ei=Object.prototype,ti=Jr.slice,ni=ei.toString,ri=ei.hasOwnProperty,ii=qr.console,oi=qr.navigator,ai=qr.document,si=qr.opera,li=qr.screen,ui=oi.userAgent,ci=Qr.bind,fi=Jr.forEach,pi=Jr.indexOf,di=Array.isArray,hi={},gi=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,mi={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},vi=function(){if($r.DEBUG&&!mi.isUndefined(ii)&&ii)try{ii.log.apply(ii,arguments)}catch(e){mi.each(arguments,(function(e){ii.log(e)}))}},yi=function(){if($r.DEBUG&&!mi.isUndefined(ii)&&ii){var e=["PostHog error:"].concat(mi.toArray(arguments));try{ii.error.apply(ii,e)}catch(t){mi.each(e,(function(e){ii.error(e)}))}}},bi=function(){if(!mi.isUndefined(ii)&&ii){var e=["PostHog error:"].concat(mi.toArray(arguments));try{ii.error.apply(ii,e)}catch(t){mi.each(e,(function(e){ii.error(e)}))}}};mi.bind=function(e,t){var n,r;if(ci&&e.bind===ci)return ci.apply(e,ti.call(arguments,1));if(!mi.isFunction(e))throw new TypeError;return n=ti.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(ti.call(arguments)));var i={};i.prototype=e.prototype;var o=new i;i.prototype=null;var a=e.apply(o,n.concat(ti.call(arguments)));return Object(a)===a?a:o}},mi.bind_instance_methods=function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=mi.bind(e[t],e))},mi.each=function(e,t,n){if(null!=e)if(fi&&e.forEach===fi)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,i=e.length;r/g,">").replace(/"/g,""").replace(/'/g,"'")),t},mi.extend=function(e){return mi.each(ti.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e},mi.isArray=di||function(e){return"[object Array]"===ni.call(e)},mi.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(t){return!1}},mi.isArguments=function(e){return!(!e||!ri.call(e,"callee"))},mi.toArray=function(e){return e?e.toArray?e.toArray():mi.isArray(e)||mi.isArguments(e)?ti.call(e):mi.values(e):[]},mi.keys=function(e){var t=[];return null===e||mi.each(e,(function(e,n){t[t.length]=n})),t},mi.values=function(e){var t=[];return null===e||mi.each(e,(function(e){t[t.length]=e})),t},mi.identity=function(e){return e},mi.include=function(e,t){var n=!1;return null===e?n:pi&&e.indexOf===pi?-1!=e.indexOf(t):(mi.each(e,(function(e){if(n||(n=e===t))return hi})),n)},mi.includes=function(e,t){return-1!==e.indexOf(t)},mi.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},mi.isObject=function(e){return e===Object(e)&&!mi.isArray(e)},mi.isEmptyObject=function(e){if(mi.isObject(e)){for(var t in e)if(ri.call(e,t))return!1;return!0}return!1},mi.isUndefined=function(e){return void 0===e},mi.isString=function(e){return"[object String]"==ni.call(e)},mi.isDate=function(e){return"[object Date]"==ni.call(e)},mi.isNumber=function(e){return"[object Number]"==ni.call(e)},mi.isElement=function(e){return!(!e||1!==e.nodeType)},mi.encodeDates=function(e){return mi.each(e,(function(t,n){mi.isDate(t)?e[n]=mi.formatDate(t):mi.isObject(t)&&(e[n]=mi.encodeDates(t))})),e},mi.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},mi.formatDate=function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},mi.safewrap=function(e){return function(){try{return e.apply(this,arguments)}catch(t){bi("Implementation error. Please turn on debug and contact support@posthog.com."),$r.DEBUG&&bi(t)}}},mi.safewrap_class=function(e,t){for(var n=0;n0&&(t[n]=e)})),t},mi.truncate=function(e,t){var n;return"string"==typeof e?n=e.slice(0,t):mi.isArray(e)?(n=[],mi.each(e,(function(e){n.push(mi.truncate(e,t))}))):mi.isObject(e)?(n={},mi.each(e,(function(e,r){n[r]=mi.truncate(e,t)}))):n=e,n},mi.JSONEncode=function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,(function(e){var t=n[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'},n=function(e,r){var i="",o=0,a="",s="",l=0,u=i,c=[],f=r[e];switch(f&&"object"==typeof f&&"function"==typeof f.toJSON&&(f=f.toJSON(e)),typeof f){case"string":return t(f);case"number":return isFinite(f)?String(f):"null";case"boolean":case"null":return String(f);case"object":if(!f)return"null";if(i+=" ",c=[],"[object Array]"===ni.apply(f)){for(l=f.length,o=0;o="0"&&Br<="9";)t+=Br,Kr();if("."===Br)for(t+=".";Kr()&&Br>="0"&&Br<="9";)t+=Br;if("e"===Br||"E"===Br)for(t+=Br,Kr(),"-"!==Br&&"+"!==Br||(t+=Br,Kr());Br>="0"&&Br<="9";)t+=Br,Kr();if(e=+t,isFinite(e))return e;Vr("Bad number")},Gr=function(){var e,t,n,r="";if('"'===Br)for(;Kr();){if('"'===Br)return Kr(),r;if("\\"===Br)if(Kr(),"u"===Br){for(n=0,t=0;t<4&&(e=parseInt(Kr(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof Ur[Br])break;r+=Ur[Br]}else r+=Br}Vr("Bad string")},Zr=function(){for(;Br&&Br<=" ";)Kr()},Hr=function(){switch(Zr(),Br){case"{":return function(){var e,t={};if("{"===Br){if(Kr("{"),Zr(),"}"===Br)return Kr("}"),t;for(;Br;){if(e=Gr(),Zr(),Kr(":"),Object.hasOwnProperty.call(t,e)&&Vr('Duplicate key "'+e+'"'),t[e]=Hr(),Zr(),"}"===Br)return Kr("}"),t;Kr(","),Zr()}}Vr("Bad object")}();case"[":return function(){var e=[];if("["===Br){if(Kr("["),Zr(),"]"===Br)return Kr("]"),e;for(;Br;){if(e.push(Hr()),Zr(),"]"===Br)return Kr("]"),e;Kr(","),Zr()}}Vr("Bad array")}();case'"':return Gr();case"-":return Yr();default:return Br>="0"&&Br<="9"?Yr():function(){switch(Br){case"t":return Kr("t"),Kr("r"),Kr("u"),Kr("e"),!0;case"f":return Kr("f"),Kr("a"),Kr("l"),Kr("s"),Kr("e"),!1;case"n":return Kr("n"),Kr("u"),Kr("l"),Kr("l"),null}Vr('Unexpected "'+Br+'"')}()}},function(e){var t;return Wr=e,zr=0,Br=" ",t=Hr(),Zr(),Br&&Vr("Syntax error"),t}),mi.base64Encode=function(e){var t,n,r,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,l=0,u="",c=[];if(!e)return e;e=mi.utf8Encode(e);do{t=(o=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,c[l++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(i)}while(s127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==s&&(n>t&&(o+=e.substring(t,n)),o+=s,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o},mi.UUID=(Xr=function(){for(var e=1*new Date,t=0;e==1*new Date;)t++;return e.toString(16)+t.toString(16)},function(){var e=(li.height*li.width).toString(16);return Xr()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,n=ui,r=[],i=0;function o(e,t){var n,i=0;for(n=0;n=4&&(i=o(i,r),r=[]);return r.length>0&&(i=o(i,r)),i.toString(16)}()+"-"+e+"-"+Xr()}),mi.isBlockedUA=function(e){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp)/i.test(e)},mi.HTTPBuildQuery=function(e,t){var n,r,i=[];return mi.isUndefined(t)&&(t="&"),mi.each(e,(function(e,t){n=encodeURIComponent(e.toString()),r=encodeURIComponent(t),i[i.length]=r+"="+n})),i.join(t)},mi.getQueryParam=function(e,t){t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);if(null===n||n&&"string"!=typeof n[1]&&n[1].length)return"";var r=n[1];try{r=decodeURIComponent(r)}catch(i){yi("Skipping decoding for malformed query param: "+r)}return r.replace(/\+/g," ")},mi.getHashParam=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},mi.cookie={get:function(e){try{for(var t=e+"=",n=ai.cookie.split(";"),r=0;r=0}function r(t){if(!ai.getElementsByTagName)return[];var r,i,o,a,s,l,u,c,f,p,d=t.split(" "),h=[ai];for(l=0;l-1){o=(i=r.split("#"))[0];var g=i[1],m=ai.getElementById(g);if(!m||o&&m.nodeName.toLowerCase()!=o)return[];h=[m]}else if(r.indexOf(".")>-1){o=(i=r.split("."))[0];var v=i[1];for(o||(o="*"),a=[],s=0,u=0;u-1};break;default:b=function(e){return e.getAttribute(_)}}for(h=[],p=0,u=0;u=3?t[2]:""},properties:function(){return mi.extend(mi.strip_empty_properties({$os:mi.info.os(),$browser:mi.info.browser(ui,oi.vendor,si),$referrer:ai.referrer,$referring_domain:mi.info.referringDomain(ai.referrer),$device:mi.info.device(ui)}),{$current_url:qr.location.href,$host:qr.location.host,$pathname:qr.location.pathname,$browser_version:mi.info.browserVersion(ui,oi.vendor,si),$screen_height:li.height,$screen_width:li.width,$lib:"web",$lib_version:$r.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:mi.timestamp()/1e3})},people_properties:function(){return mi.extend(mi.strip_empty_properties({$os:mi.info.os(),$browser:mi.info.browser(ui,oi.vendor,si)}),{$browser_version:mi.info.browserVersion(ui,oi.vendor,si)})}},mi.toArray=mi.toArray,mi.isObject=mi.isObject,mi.JSONEncode=mi.JSONEncode,mi.JSONDecode=mi.JSONDecode,mi.isBlockedUA=mi.isBlockedUA,mi.isEmptyObject=mi.isEmptyObject,mi.info=mi.info,mi.info.device=mi.info.device,mi.info.browser=mi.info.browser,mi.info.browserVersion=mi.info.browserVersion,mi.info.properties=mi.info.properties;var Ai=["a","button","form","input","select","textarea","label"];function Si(e){for(var t=e;t.parentNode&&!Ei(t,"body");t=t.parentNode){var n=xi(t).split(" ");if(mi.includes(n,"ph-sensitive")||mi.includes(n,"ph-no-capture"))return!1}if(mi.includes(xi(e).split(" "),"ph-include"))return!0;var r=e.type||"";if("string"==typeof r)switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";if("string"==typeof i){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function ji(e){return!!(Ei(e,"input")&&"button"!=e.type||Ei(e,"select")||Ei(e,"textarea")||"true"===e.getAttribute("contenteditable"))}function Ti(e){if(null===e||mi.isUndefined(e))return!1;if("string"==typeof e){e=mi.trim(e);if(/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,"")))return!1;if(/(^\d{3}-?\d{2}-?\d{4}$)/.test(e))return!1}return!0}var Di={_initializedTokens:[],_previousElementSibling:function(e){if(e.previousElementSibling)return e.previousElementSibling;do{e=e.previousSibling}while(e&&!Ci(e));return e},_loadScript:function(e,t){var n=document.createElement("script");n.type="text/javascript",n.src=e,n.onload=t;var r=document.getElementsByTagName("script");r.length>0?r[0].parentNode.insertBefore(n,r[0]):document.body.appendChild(n)},_getPropertiesFromElement:function(e){var t=e.tagName.toLowerCase(),n={tag_name:t};Ai.indexOf(t)>-1&&(n.$el_text=ki(e));var r=xi(e);r.length>0&&(n.classes=r.split(" ")),mi.each(e.attributes,(function(t){ji(e)&&-1===["name","id","class"].indexOf(t.name)||Ti(t.value)&&(n["attr__"+t.name]=t.value)}));for(var i=1,o=1,a=e;a=this._previousElementSibling(a);)i++,a.tagName===e.tagName&&o++;return n.nth_child=i,n.nth_of_type=o,n},_getDefaultProperties:function(e){return{$event_type:e,$ce_version:1}},_extractCustomPropertyValue:function(e){var t=[];return mi.each(document.querySelectorAll(e.css_selector),(function(e){var n;["input","select"].indexOf(e.tagName.toLowerCase())>-1?n=e.value:e.textContent&&(n=e.textContent),Ti(n)&&t.push(n)})),t.join(", ")},_getCustomProperties:function(e){var t={};return mi.each(this._customProperties,(function(n){mi.each(n.event_selectors,(function(r){var i=document.querySelectorAll(r);mi.each(i,(function(r){mi.includes(e,r)&&Si(r)&&(t[n.name]=this._extractCustomPropertyValue(n))}),this)}),this)}),this),t},_getEventTarget:function(e){return void 0===e.target?e.srcElement:e.target.shadowRoot?e.composedPath()[0]:e.target},_captureEvent:function(e,t){var n=this._getEventTarget(e);if(Oi(n)&&(n=n.parentNode),function(e,t){if(!e||Ei(e,"html")||!Ci(e))return!1;for(var n=!1,r=[e],i=!0,o=e;o.parentNode&&!Ei(o,"body");)if(11!==o.parentNode.nodeType){if(!(i=o.parentNode))break;if(Ai.indexOf(i.tagName.toLowerCase())>-1)n=!0;else{let e=window.getComputedStyle(i);e&&"pointer"===e.getPropertyValue("cursor")&&(n=!0)}r.push(i),o=i}else r.push(o.parentNode.host),o=o.parentNode.host;let a=window.getComputedStyle(e);if(a&&"pointer"===a.getPropertyValue("cursor")&&"click"===t.type)return!0;var s=e.tagName.toLowerCase();switch(s){case"html":return!1;case"form":return"submit"===t.type;case"input":return"change"===t.type||"click"===t.type;case"select":case"textarea":return"change"===t.type||"click"===t.type;default:return n?"click"===t.type:"click"===t.type&&(Ai.indexOf(s)>-1||"true"===e.getAttribute("contenteditable"))}}(n,e)){for(var r=[n],i=n;i.parentNode&&!Ei(i,"body");)11!==i.parentNode.nodeType?(r.push(i.parentNode),i=i.parentNode):(r.push(i.parentNode.host),i=i.parentNode.host);var o,a=[],s=!1;if(mi.each(r,(function(e){var t=Si(e);"a"===e.tagName.toLowerCase()&&(o=e.getAttribute("href"),o=t&&Ti(o)&&o);var n=xi(e).split(" ");mi.includes(n,"ph-no-capture")&&(s=!0),a.push(this._getPropertiesFromElement(e))}),this),a[0].$el_text=ki(n),o&&(a[0].attr__href=o),s)return!1;var l=ki(n);l&&l.length;var u=mi.extend(this._getDefaultProperties(e.type),{$elements:a},this._getCustomProperties(r));return t.capture("$autocapture",u),!0}},_navigate:function(e){window.location.href=e},_addDomEventHandlers:function(e){var t=mi.bind((function(t){t=t||window.event,this._captureEvent(t,e)}),this);mi.register_event(document,"submit",t,!1,!0),mi.register_event(document,"change",t,!1,!0),mi.register_event(document,"click",t,!1,!0)},_customProperties:{},init:function(e){this._maybeLoadEditor(e);var t=e.get_config("token");if(this._initializedTokens.indexOf(t)>-1)console.log('autocapture already initialized for token "'+t+'"');else{this._initializedTokens.push(t);var n=mi.bind((function(t){if(!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((function(){n(t)}),500);var r=t.editorParams||(t.toolbarVersion?{toolbarVersion:t.toolbarVersion}:{});if(t.isAuthenticated&&r.toolbarVersion&&0===r.toolbarVersion.indexOf("toolbar")&&(this._loadEditor(e,Object.assign({},r,{apiURL:e.get_config("api_host")})),e.set_config({debug:!0})),t&&t.config&&!0===t.config.enable_collect_everything?(t.custom_properties&&(this._customProperties=t.custom_properties),this._addDomEventHandlers(e)):e.__autocapture_enabled=!1,t.featureFlags?e.persistence&&e.persistence.register({$active_feature_flags:t.featureFlags}):e.persistence&&e.persistence.unregister("$active_feature_flags"),t.supportedCompression){let n={};for(const e of t.supportedCompression)n[e]=!0;e.compression=n}else e.compression={}}),this),r=mi.JSONEncode({token:t,distinct_id:e.get_distinct_id()}),i=mi.base64Encode(r);e._send_request(e.get_config("api_host")+"/decide/",{data:i},{method:"POST"},e._prepare_callback(n))}},_maybeLoadEditor:function(e){try{var t,n=mi.getHashParam(window.location.hash,"__posthog")||mi.getHashParam(window.location.hash,"state"),r=n?JSON.parse(decodeURIComponent(n)):null;return r&&("mpeditor"===r.action||"ph_authorize"===r.action)?(t=r)&&Object.keys(t).length>0&&(window.localStorage.setItem("_postHogEditorParams",JSON.stringify(t)),r.desiredHash?window.location.hash=r.desiredHash:window.history?history.replaceState("",document.title,window.location.pathname+window.location.search):window.location.hash=""):delete(t=JSON.parse(window.localStorage.getItem("_postHogEditorParams")||"{}")).userIntent,t.apiURL=e.get_config("api_host"),!(!t.token||e.get_config("token")!==t.token)&&(this._loadEditor(e,t),!0)}catch(i){return!1}},_loadEditor:function(e,t){var n=this;if(!window._postHogToolbarLoaded){window._postHogToolbarLoaded=!0;var r=t.jsURL||t.apiURL||e.get_config("api_host"),i=t.toolbarVersion&&0===t.toolbarVersion.indexOf("toolbar")?"toolbar.js":"editor.js",o=r+(r.endsWith("/")?"":"/")+"static/"+i+"?_ts="+(new Date).getTime();return this._loadScript(o,(function(){window.ph_load_editor(t)})),mi.register_event(window,"turbolinks:load",(function(){window._postHogToolbarLoaded=!1,n._loadEditor(e,t)})),!0}return!1},enabledForProject:function(e,t,n){t=mi.isUndefined(t)?10:t,n=mi.isUndefined(n)?10:n;for(var r=0,i=0;i-1:(console.warn('isFeatureEnabled for key "'+e+"\" failed. Feature flags didn't load in time."),!1)},Yi.prototype.override=function(e){if(!1===e)return this._posthog.persistence.unregister("$override_feature_flags");this._posthog.persistence.register("$override_feature_flags",e)};var Gi,Zi,Xi=["__mps","__mpso","__mpus","__mpa","__mpap","__mpr","__mpu","$people_distinct_id","__alias","__cmpns","__timers"],Ji=function(e){this.props={},this.campaign_params_saved=!1,this.featureFlagEventHandlers=[],e.persistence_name?this.name="ph_"+e.persistence_name:this.name="ph_"+e.token+"_posthog";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(bi("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&mi.localStorage.is_supported()?this.storage=mi.localStorage:this.storage=mi.cookie,this.load(),this.update_config(e),this.upgrade(e),this.save()};Ji.prototype.addFeatureFlagsHandler=function(e){return this.featureFlagEventHandlers.push(e),!0},Ji.prototype.receivedFeatureFlags=function(e){this.featureFlagEventHandlers.forEach((t=>t(e)))},Ji.prototype.properties=function(){var e={};return mi.each(this.props,(function(t,n){mi.include(Xi,n)||(e[n]=t)})),e},Ji.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=mi.extend({},e))}},Ji.prototype.upgrade=function(e){var t,n,r=e.upgrade;r&&(t="ph_super_properties","string"==typeof r&&(t=r),n=this.storage.parse(t),this.storage.remove(t),this.storage.remove(t,!0),n&&(this.props=mi.extend(this.props,n.all,n.events))),e.cookie_name||"posthog"===e.name||(t="ph_"+e.token+"_"+e.name,(n=this.storage.parse(t))&&(this.storage.remove(t),this.storage.remove(t,!0),this.register_once(n))),this.storage===mi.localStorage&&(n=mi.cookie.parse(this.name),mi.cookie.remove(this.name),mi.cookie.remove(this.name,!0),n&&this.register_once(n))},Ji.prototype.save=function(){this.disabled||(this._expire_notification_campaigns(),this.storage.set(this.name,mi.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure))},Ji.prototype.remove=function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)},Ji.prototype.clear=function(){this.remove(),this.props={}},Ji.prototype.register_once=function(e,t,n){return!!mi.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===n?this.default_expiry:n,e&&e.$active_feature_flags&&this.receivedFeatureFlags(e.$active_feature_flags),mi.each(e,(function(e,n){this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.props[n]=e)}),this),this.save(),!0)},Ji.prototype.register=function(e,t){return!!mi.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,e&&e.$active_feature_flags&&this.receivedFeatureFlags(e.$active_feature_flags),mi.extend(this.props,e),this.save(),!0)},Ji.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save(),"$active_feature_flags"===e&&this.receivedFeatureFlags([]))},Ji.prototype._expire_notification_campaigns=mi.safewrap((function(){var e=this.props.__cmpns,t=$r.DEBUG?6e4:36e5;if(e){for(var n in e)1*new Date-e[n]>t&&delete e[n];mi.isEmptyObject(e)&&delete this.props.__cmpns}})),Ji.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register_once(mi.info.campaignParams()),this.campaign_params_saved=!0)},Ji.prototype.update_search_keyword=function(e){this.register(mi.info.searchInfo(e))},Ji.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:mi.info.referringDomain(e)||"$direct"},"")},Ji.prototype.get_referrer_info=function(){return mi.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},Ji.prototype.safe_merge=function(e){return mi.each(this.props,(function(t,n){n in e||(e[n]=t)})),e},Ji.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},Ji.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},Ji.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},Ji.prototype.get_cross_subdomain=function(){return this.cross_subdomain},Ji.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},Ji.prototype._add_to_people_queue=function(e,t){var n=this._get_queue_key(e),r=t[e],i=this._get_or_create_queue("$set"),o=this._get_or_create_queue("$set_once");"__mps"===n?mi.extend(i,r):"__mpso"===n&&mi.each(r,(function(e,t){t in o||(o[t]=e)})),this.save()},Ji.prototype._pop_from_people_queue=function(e,t){var n=this._get_queue(e);mi.isUndefined(n)||(mi.each(t,(function(e,t){delete n[t]}),this),this.save())},Ji.prototype._get_queue_key=function(e){return"$set"===e?"__mps":"$set_once"===e?"__mpso":void yi("Invalid queue:",e)},Ji.prototype._get_queue=function(e){return this.props[this._get_queue_key(e)]},Ji.prototype._get_or_create_queue=function(e,t){var n=this._get_queue_key(e);return t=mi.isUndefined(t)?{}:t,this.props[n]||(this.props[n]=t)},Ji.prototype.set_event_timer=function(e,t){var n=this.props.__timers||{};n[e]=t,this.props.__timers=n,this.save()},Ji.prototype.remove_event_timer=function(e){var t=(this.props.__timers||{})[e];return mi.isUndefined(t)||(delete this.props.__timers[e],this.save()),t};var Qi=function(){},eo={},to=qr.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,no=!to&&-1===ui.indexOf("MSIE")&&-1===ui.indexOf("Mozilla"),ro=qr.navigator.sendBeacon;ro&&(ro=mi.bind(ro,oi));var io,oo={api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",autocapture:!0,cross_subdomain_cookie:-1===ai.location.hostname.indexOf("herokuapp.com"),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:function(){},store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,debug:!1,capture_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:"https:"===qr.location.protocol,ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,property_blacklist:[],sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0},ao=!1,so=function(){},lo=function(e,t,n){var r,i="posthog"===n?Zi:Zi[n];if(i&&0===Gi)r=i;else{if(i&&!mi.isArray(i))return void yi("You have already initialized "+n);r=new so}if(r._cached_groups={},r._user_decide_check_complete=!1,r._events_captureed_before_user_decide_check_complete=[],r._init(e,t,n),r.people=new Ki,r.people._init(r),r.feature_flags=new Yi,r.feature_flags._init(r),$r.DEBUG=$r.DEBUG||r.get_config("debug"),r.__autocapture_enabled=r.get_config("autocapture"),r.get_config("autocapture")){Di.enabledForProject(r.get_config("token"),100,100)?Di.isBrowserSupported()?Di.init(r):(r.__autocapture_enabled=!1,vi("Disabling Automatic Event Collection because this browser is not supported")):(r.__autocapture_enabled=!1,vi("Not in active bucket: disabling Automatic Event Collection."))}return!mi.isUndefined(i)&&mi.isArray(i)&&(r._execute_array.call(r.people,i.people),r._execute_array(i)),r};function uo(e){qr.console.warn("WARNING! posthog."+e+" is deprecated and will be removed soon! Please use posthog."+e.split("captureing").join("capturing")+' instead (without the "e")!')}so.prototype.init=function(e,t,n){if(mi.isUndefined(n))yi("You must name your new library: init(token, config, name)");else{if("posthog"!==n){var r=lo(e,t,n);return Zi[n]=r,r._loaded(),r}yi("You must initialize the main posthog object right after you include the PostHog js snippet")}},so.prototype._init=function(e,t,n){this.__loaded=!0,this.config={},this._triggered_notifs=[],this.compression={},this.set_config(mi.extend({},oo,t,{name:n,token:e,callback_fn:("posthog"===n?n:"posthog."+n)+"._jsc"})),this._jsc=function(){},this._event_queue=[],this._empty_queue_count=0,this._should_poll=!0,this._poller=function(){},this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.persistence=this.cookie=new Ji(this.config),this._gdpr_init();var r=mi.UUID();this.get_distinct_id()||this.register_once({distinct_id:r,$device_id:r},""),qr.addEventListener&&qr.addEventListener("unload",this._handle_unload.bind(this))},so.prototype._loaded=function(){this.get_config("loaded")(this),this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture_pageview()},so.prototype._start_queue_if_opted_in=function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._event_queue_poll()},so.prototype._dom_loaded=function(){mi.each(this.__dom_loaded_queue,(function(e){this._capture_dom.apply(this,e)}),this),this.has_opted_out_capturing()||mi.each(this.__request_queue,(function(e){this._send_request.apply(this,e)}),this),delete this.__dom_loaded_queue,delete this.__request_queue,this._start_queue_if_opted_in()},so.prototype._capture_dom=function(e,t){if(this.get_config("img"))return yi("You can't use DOM capturing functions with img = true."),!1;if(!ao)return this.__dom_loaded_queue.push([e,t]),!1;var n=(new e).init(this);return n.capture.apply(n,t)},so.prototype._prepare_callback=function(e,t){if(mi.isUndefined(e))return null;if(to){return function(n){e(n,t)}}var n=this._jsc,r=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(i){delete n[r],e(i,t)},i},so.prototype._event_enqueue=function(e,t,n,r){this._event_queue.push({url:e,data:t,options:n,callback:r}),this._should_poll||(this._should_poll=!0,this._event_queue_poll())},so.prototype._format_event_queue_data=function(){const e={};return mi.each(this._event_queue,(t=>{const{url:n,data:r}=t;void 0===e[n]&&(e[n]=[]),e[n].push(r)})),e},so.prototype._event_queue_poll=function(){clearInterval(this._poller),this._poller=setTimeout((()=>{if(this._event_queue.length>0){const n=this._format_event_queue_data();for(let r in n){let i=n[r];mi.each(i,(function(e,t){i[t].offset=Math.abs(i[t].timestamp-new Date),delete i[t].timestamp}));var e=mi.JSONEncode(i);if(this.compression.lz64){var t=Ir.compressToBase64(e);this._send_request(r,{data:t,compression:"lz64"},eo,Qi)}else{t=mi.base64Encode(e);this._send_request(r,{data:t},eo,Qi)}}this._event_queue.length=0}else this._empty_queue_count++;this._empty_queue_count>4&&(this._should_poll=!1,this._empty_queue_count=0),this._should_poll&&this._event_queue_poll()}),3e3)},so.prototype._handle_unload=function(){if(!this.get_config("request_batching"))return void this.capture("$pageleave",null,{transport:"sendbeacon"});clearInterval(this._poller),this.capture("$pageleave");let e={};this._event_queue.length>0&&(e=this._format_event_queue_data()),this._event_queue.length=0;for(let t in e)if(this.compression.lz64){const n=Ir.compressToBase64(mi.JSONEncode(e[t]));this._send_request(t,{data:n,compression:"lz64"},{transport:"sendbeacon"},Qi)}else{const n=mi.base64Encode(mi.JSONEncode(e[t]));this._send_request(t,{data:n},{transport:"sendbeacon"},Qi)}},so.prototype._send_request=function(e,t,n,r){if(no)this.__request_queue.push(arguments);else{var i={method:this.get_config("api_method"),transport:this.get_config("api_transport")},o=null;r||!mi.isFunction(n)&&"string"!=typeof n||(r=n,n=null),n=mi.extend(i,n||{}),to||(n.method="GET");var a=ro&&"sendbeacon"===n.transport.toLowerCase(),s=a||"POST"===n.method,l=this.get_config("verbose");t.verbose&&(l=!0),this.get_config("test")&&(t.test=1),l&&(t.verbose=1),this.get_config("img")&&(t.img=1),to||(r?t.callback=r:(l||this.get_config("test"))&&(t.callback="(function(){})"));var u={};if(u.ip=this.get_config("ip")?1:0,u._=(new Date).getTime().toString(),s&&(o=Array.isArray(t)?"data="+encodeURIComponent(t):"data="+encodeURIComponent(t.data),delete t.data,t.compression&&(o+="&compression="+t.compression,delete t.compression)),e+="?"+mi.HTTPBuildQuery(u),"img"in t){var c=ai.createElement("img");c.src=e,ai.body.appendChild(c)}else if(a){const t=new Blob([o],{type:"application/x-www-form-urlencoded"});ro(e,t)}else if(to)try{var f=new XMLHttpRequest;f.open(n.method,e,!0);var p=this.get_config("xhr_headers");s&&(p["Content-Type"]="application/x-www-form-urlencoded"),mi.each(p,(function(e,t){f.setRequestHeader(t,e)})),f.withCredentials=!0,f.onreadystatechange=function(){if(4===f.readyState)if(200===f.status){if(r){var e;try{e=mi.JSONDecode(f.responseText)}catch(n){return void yi(n)}r(e)}}else{var t="Bad HTTP status: "+f.status+" "+f.statusText;yi(t),r&&r(l?{status:0,error:t}:0)}},f.send(o)}catch(g){yi(g)}else{var d=ai.createElement("script");d.type="text/javascript",d.async=!0,d.defer=!0,d.src=e;var h=ai.getElementsByTagName("script")[0];h.parentNode.insertBefore(d,h)}}},so.prototype._execute_array=function(e){var t,n=[],r=[],i=[];mi.each(e,(function(e){e&&(t=e[0],mi.isArray(t)?i.push(e):"function"==typeof e?e.call(this):mi.isArray(e)&&"alias"===t?n.push(e):mi.isArray(e)&&-1!==t.indexOf("capture")&&"function"==typeof this[t]?i.push(e):r.push(e))}),this);var o=function(e,t){mi.each(e,(function(e){if(mi.isArray(e[0])){var n=t;mi.each(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};o(n,this),o(r,this),o(i,this)},so.prototype.push=function(e){this._execute_array([e])},so.prototype.capture=Ui((function(e,t,n,r){r||"function"!=typeof n||(r=n,n=null);var i=(n=n||eo).transport;if(i&&(n.transport=i),"function"!=typeof r&&(r=Qi),mi.isUndefined(e))return void yi("No event name provided to posthog.capture");if(this._event_is_disabled(e))return void r(0);(t=t||{}).token=this.get_config("token");var o=this.persistence.remove_event_timer(e);if(!mi.isUndefined(o)){var a=(new Date).getTime()-o;t.$duration=parseFloat((a/1e3).toFixed(3))}this.persistence.update_search_keyword(ai.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(ai.referrer),t=mi.extend({},mi.info.properties(),this.persistence.properties(),t);var s=this.get_config("property_blacklist");mi.isArray(s)?mi.each(s,(function(e){delete t[e]})):yi("Invalid value for property_blacklist config: "+s);var l=this.get_config("sanitize_properties");l&&(t=l(t,e));var u={event:e,properties:t},c=mi.truncate(u,255),f=mi.JSONEncode(c);const p=this.get_config("api_host")+"/e/",d=this._prepare_callback(r,c),h=r!==Qi||n!==eo;return!this.get_config("request_batching")||h?this.compression.lz64?this._send_request(p,{data:Ir.compressToBase64(f),compression:"lz64"},n,d):this._send_request(p,{data:mi.base64Encode(f)},n,d):(u.timestamp=new Date,this._event_enqueue(p,u,n,d)),c}),(function(e){return this.get_config(e)}),io),so.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},so.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},so.prototype.capture_pageview=function(e){mi.isUndefined(e)&&(e=ai.location.href),this.capture("$pageview")},so.prototype.capture_links=function(){return this._capture_dom.call(this,Li,arguments)},so.prototype.capture_forms=function(){return this._capture_dom.call(this,FormCaptureer,arguments)},so.prototype.register=function(e,t){this.persistence.register(e,t)},so.prototype.register_once=function(e,t,n){this.persistence.register_once(e,t,n)},so.prototype.unregister=function(e){this.persistence.unregister(e)},so.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)},so.prototype.isFeatureEnabled=function(e){return this.feature_flags.isFeatureEnabled(e)},so.prototype.reloadFeatureFlags=function(){return this.feature_flags.reloadFeatureFlags()},so.prototype.onFeatureFlags=function(e){this.persistence.addFeatureFlagsHandler(e);const t=this.feature_flags.getFlags();t&&e(t)},so.prototype.identify=function(e,t,n){if(e){var r=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var i=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:i},"")}e!==r&&e!==this.get_property("__alias")&&(this.unregister("__alias"),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,n),e!==r&&this.capture("$identify",{distinct_id:e,$anon_distinct_id:r}),this.reloadFeatureFlags()}else yi("Unique user id has not been set in posthog.identify")},so.prototype.reset=function(e){let t=this.get_property("$device_id");this.persistence.clear(),this._flags.identify_called=!1;var n=mi.UUID();this.register_once({distinct_id:n,$device_id:e?n:t},"")},so.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},so.prototype.alias=function(e,t){if(e===this.get_property("$people_distinct_id"))return bi("Attempting to create alias for existing People user - aborting."),-2;var n=this;return mi.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single("__alias",e),this.capture("$create_alias",{alias:e,distinct_id:t},(function(){n.identify(e)}))):(yi("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},so.prototype.set_config=function(e){mi.isObject(e)&&(mi.extend(this.config,e),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),$r.DEBUG=$r.DEBUG||this.get_config("debug"))},so.prototype.get_config=function(e){return this.config[e]},so.prototype.get_property=function(e){return this.persistence.props[e]},so.prototype.toString=function(){var e=this.get_config("name");return"posthog"!==e&&(e="posthog."+e),e},so.prototype._event_is_disabled=function(e){return mi.isBlockedUA(ui)||this._flags.disable_all_events||mi.include(this.__disabled_events,e)},so.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_capturing_persistence_type")&&mi.localStorage.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!mi.cookie.get("ph_optout")||(mi.cookie.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},so.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t)},so.prototype._gdpr_call_func=function(e,t){return t=mi.extend({capture:mi.bind(this.capture,this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},t),mi.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{capture:t.capture,captureEventName:t.capture_event_name,captureProperties:t.capture_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieExpiration:t.cookie_expiration,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie})},so.prototype.opt_in_capturing=function(e){e=mi.extend({enable_persistence:!0},e),this._gdpr_call_func(Pi,e),this._gdpr_update_persistence(e)},so.prototype.opt_in_captureing=function(e){uo("opt_in_captureing"),this.opt_in_capturing(e)},so.prototype.opt_out_capturing=function(e){(e=mi.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(Fi,e),this._gdpr_update_persistence(e)},so.prototype.opt_out_captureing=function(e){uo("opt_out_captureing"),this.opt_out_capturing(e)},so.prototype.has_opted_in_capturing=function(e){return this._gdpr_call_func(qi,e)},so.prototype.has_opted_in_captureing=function(e){return uo("has_opted_in_captureing"),this.has_opted_in_capturing(e)},so.prototype.has_opted_out_capturing=function(e){return this._gdpr_call_func(Ii,e)},so.prototype.has_opted_out_captureing=function(e){return uo("has_opted_out_captureing"),this.has_opted_out_capturing(e)},so.prototype.clear_opt_in_out_capturing=function(e){e=mi.extend({enable_persistence:!0},e),this._gdpr_call_func(Ri,e),this._gdpr_update_persistence(e)},so.prototype.clear_opt_in_out_captureing=function(e){uo("clear_opt_in_out_captureing"),this.clear_opt_in_out_capturing(e)},so.prototype.decodeLZ64=Ir.decompressFromBase64,so.prototype.init=so.prototype.init,so.prototype.reset=so.prototype.reset,so.prototype.capture=so.prototype.capture,so.prototype.capture_links=so.prototype.capture_links,so.prototype.capture_forms=so.prototype.capture_forms,so.prototype.capture_pageview=so.prototype.capture_pageview,so.prototype.register=so.prototype.register,so.prototype.register_once=so.prototype.register_once,so.prototype.unregister=so.prototype.unregister,so.prototype.identify=so.prototype.identify,so.prototype.alias=so.prototype.alias,so.prototype.set_config=so.prototype.set_config,so.prototype.get_config=so.prototype.get_config,so.prototype.get_property=so.prototype.get_property,so.prototype.get_distinct_id=so.prototype.get_distinct_id,so.prototype.toString=so.prototype.toString,so.prototype.opt_out_captureing=so.prototype.opt_out_captureing,so.prototype.opt_in_captureing=so.prototype.opt_in_captureing,so.prototype.has_opted_out_captureing=so.prototype.has_opted_out_captureing,so.prototype.has_opted_in_captureing=so.prototype.has_opted_in_captureing,so.prototype.clear_opt_in_out_captureing=so.prototype.clear_opt_in_out_captureing,so.prototype.opt_out_capturing=so.prototype.opt_out_capturing,so.prototype.opt_in_capturing=so.prototype.opt_in_capturing,so.prototype.has_opted_out_capturing=so.prototype.has_opted_out_capturing,so.prototype.has_opted_in_capturing=so.prototype.has_opted_in_capturing,so.prototype.clear_opt_in_out_capturing=so.prototype.clear_opt_in_out_capturing,so.prototype.isFeatureEnabled=so.prototype.isFeatureEnabled,so.prototype.reloadFeatureFlags=so.prototype.reloadFeatureFlags,so.prototype.onFeatureFlags=so.prototype.onFeatureFlags,so.prototype.decodeLZ64=so.prototype.decodeLZ64,Ji.prototype.properties=Ji.prototype.properties,Ji.prototype.update_search_keyword=Ji.prototype.update_search_keyword,Ji.prototype.update_referrer_info=Ji.prototype.update_referrer_info,Ji.prototype.get_cross_subdomain=Ji.prototype.get_cross_subdomain,Ji.prototype.clear=Ji.prototype.clear,mi.safewrap_class(so,["identify"]);var co={},fo=function(){Zi.init=function(e,t,n){if(n)return Zi[n]||(Zi[n]=co[n]=lo(e,t,n),Zi[n]._loaded()),Zi[n];var r=Zi;co.posthog?r=co.posthog:e&&((r=lo(e,t,"posthog"))._loaded(),co.posthog=r),Zi=r,1===Gi&&(qr.posthog=Zi),mi.each(co,(function(e,t){"posthog"!==t&&(Zi[t]=e)})),Zi._=mi}};var po=(Gi=0,Zi=new so,fo(),Zi.init(),function(){function e(){e.done||(e.done=!0,ao=!0,no=!1,mi.each(co,(function(e){e._dom_loaded()})))}if(ai.addEventListener)"complete"===ai.readyState?e():ai.addEventListener("DOMContentLoaded",e,!1);else if(ai.attachEvent){ai.attachEvent("onreadystatechange",e);var t=!1;try{t=null===qr.frameElement}catch(n){}ai.documentElement.doScroll&&t&&function t(){try{ai.documentElement.doScroll("left")}catch(n){return void setTimeout(t,1)}e()}()}mi.register_event(qr,"load",e,!0)}(),Zi),ho=1;var go,mo,vo,yo={nextValue:function(){return(ho=(9301*ho+49297)%233280)/233280},seed:function(e){ho=e}},bo="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function _o(){vo=!1}function wo(e){if(e){if(e!==go){if(e.length!==bo.length)throw new Error("Custom alphabet for shortid must be "+bo.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter((function(e,t,n){return t!==n.lastIndexOf(e)}));if(t.length)throw new Error("Custom alphabet for shortid must be "+bo.length+" unique characters. These characters were not unique: "+t.join(", "));go=e,_o()}}else go!==bo&&(go=bo,_o())}function xo(){return vo||(vo=function(){go||wo(bo);for(var e,t=go.split(""),n=[],r=yo.nextValue();t.length>0;)r=yo.nextValue(),e=Math.floor(r*t.length),n.push(t.splice(e,1)[0]);return n.join("")}())}var ko={get:function(){return go||bo},characters:function(e){return wo(e),go},seed:function(e){yo.seed(e),mo!==e&&(_o(),mo=e)},lookup:function(e){return xo()[e]},shuffled:xo},Co="object"==typeof window&&(window.crypto||window.msCrypto),Eo=Co&&Co.getRandomValues?function(e){return Co.getRandomValues(new Uint8Array(e))}:function(e){for(var t=[],n=0;n0&&(t+=jo(Ao)),t+=jo(n)};var Do=function(e){return!(!e||"string"!=typeof e||e.length<6)&&!new RegExp("[^"+ko.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(e)},No=Un((function(e){var t=0;function n(){return To(t)}e.exports=n,e.exports.generate=n,e.exports.seed=function(t){return ko.seed(t),e.exports},e.exports.worker=function(n){return t=n,e.exports},e.exports.characters=function(e){return void 0!==e&&ko.characters(e),ko.shuffled()},e.exports.isValid=Do})),Lo=Un((function(e,t){var n;"undefined"!=typeof self&&self,n=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=109)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(18),o=n(19),a=n(45),s=n(46),l=n(47),u=n(48),c=n(49),f=n(12),p=n(32),d=n(33),h=n(31),g=n(1),m={Scope:g.Scope,create:g.create,find:g.find,query:g.query,register:g.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:u.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:c.default,Attributor:{Attribute:f.default,Class:p.default,Style:d.default,Store:h.default}};t.default=m},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=this;return t="[Parchment] "+t,(n=e.call(this,t)||this).message=t,n.name=n.constructor.name,n}return i(t,e),t}(Error);t.ParchmentError=o;var a,s,l={},u={},c={},f={};function p(e,t){var n;if(void 0===t&&(t=a.ANY),"string"==typeof e)n=f[e]||l[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=f.text;else if("number"==typeof e)e&a.LEVEL&a.BLOCK?n=f.block:e&a.LEVEL&a.INLINE&&(n=f.inline);else if(e instanceof HTMLElement){var r=(e.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=u[r[i]])break;n=n||c[e.tagName]}return null==n?null:t&a.LEVEL&n.scope&&t&a.TYPE&n.scope?n:null}t.DATA_KEY="__blot",(s=a=t.Scope||(t.Scope={}))[s.TYPE=3]="TYPE",s[s.LEVEL=12]="LEVEL",s[s.ATTRIBUTE=13]="ATTRIBUTE",s[s.BLOT=14]="BLOT",s[s.INLINE=7]="INLINE",s[s.BLOCK=11]="BLOCK",s[s.BLOCK_BLOT=10]="BLOCK_BLOT",s[s.INLINE_BLOT=6]="INLINE_BLOT",s[s.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",s[s.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",s[s.ANY=15]="ANY",t.create=function(e,t){var n=p(e);if(null==n)throw new o("Unable to create "+e+" blot");var r=n,i=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:r.create(t);return new r(i,t)},t.find=function e(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[t.DATA_KEY]?n[t.DATA_KEY].blot:r?e(n.parentNode,r):null},t.query=p,t.register=function e(){for(var t=[],n=0;n1)return t.map((function(t){return e(t)}));var r=t[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new o("Invalid definition");if("abstract"===r.blotName)throw new o("Cannot register abstract class");if(f[r.blotName||r.attrName]=r,"string"==typeof r.keyName)l[r.keyName]=r;else if(null!=r.className&&(u[r.className]=r),null!=r.tagName){Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(e){return e.toUpperCase()})):r.tagName=r.tagName.toUpperCase();var i=Array.isArray(r.tagName)?r.tagName:[r.tagName];i.forEach((function(e){null!=c[e]&&null!=r.className||(c[e]=r)}))}return r}},function(e,t,n){var r=n(51),i=n(11),o=n(3),a=n(20),s=String.fromCharCode(0),l=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};l.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},l.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},l.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},l.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=o(!0,{},e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,"object"!=typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(i(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},l.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},l.prototype.filter=function(e){return this.ops.filter(e)},l.prototype.forEach=function(e){this.ops.forEach(e)},l.prototype.map=function(e){return this.ops.map(e)},l.prototype.partition=function(e){var t=[],n=[];return this.forEach((function(r){(e(r)?t:n).push(r)})),[t,n]},l.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},l.prototype.changeLength=function(){return this.reduce((function(e,t){return t.insert?e+a.length(t):t.delete?e-t.delete:e}),0)},l.prototype.length=function(){return this.reduce((function(e,t){return e+a.length(t)}),0)},l.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n=[],r=a.iterator(this.ops),i=0;i0&&n.next(o.retain-s)}for(var u=new l(r);t.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===t.peekType())u.push(t.next());else{var c=Math.min(t.peekLength(),n.peekLength()),f=t.next(c),p=n.next(c);if("number"==typeof p.retain){var d={};"number"==typeof f.retain?d.retain=c:d.insert=f.insert;var h=a.attributes.compose(f.attributes,p.attributes,"number"==typeof f.retain);if(h&&(d.attributes=h),u.push(d),!n.hasNext()&&i(u.ops[u.ops.length-1],d)){var g=new l(t.rest());return u.concat(g).chop()}}else"number"==typeof p.delete&&"number"==typeof f.retain&&u.push(p)}return u.chop()},l.prototype.concat=function(e){var t=new l(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},l.prototype.diff=function(e,t){if(this.ops===e.ops)return new l;var n=[this,e].map((function(t){return t.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join("")})),o=new l,u=r(n[0],n[1],t),c=a.iterator(this.ops),f=a.iterator(e.ops);return u.forEach((function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(f.peekLength(),t),o.push(f.next(n));break;case r.DELETE:n=Math.min(t,c.peekLength()),c.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),t);var s=c.next(n),l=f.next(n);i(s.insert,l.insert)?o.retain(n,a.attributes.diff(s.attributes,l.attributes)):o.push(l).delete(n)}t-=n}})),o.chop()},l.prototype.eachLine=function(e,t){t=t||"\n";for(var n=a.iterator(this.ops),r=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),u="string"==typeof o.insert?o.insert.indexOf(t,s)-s:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===e(r,n.next(1).attributes||{},i))return;i+=1,r=new l}}r.length()>0&&e(r,{},i)},l.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=a.iterator(this.ops),r=a.iterator(e.ops),i=new l;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),s=n.next(o),u=r.next(o);if(s.delete)continue;u.delete?i.push(u):i.retain(o,a.attributes.transform(s.attributes,u.attributes,t))}else i.retain(a.length(n.next()));return i.chop()},l.prototype.transformPosition=function(e,t){t=!!t;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r0&&(e1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var r=this.clone();return 0===e?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},o}}]),t}(s.default.Block);function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"==typeof e.formats&&(t=(0,o.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:v(e.parent,t))}m.blotName="block",m.tagName="P",m.defaultChild="break",m.allowedChildren=[u.default,s.default.Embed,c.default],t.bubbleFormats=v,t.BlockEmbed=g,t.default=m},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(y(this,e),this.options=w(t,r),this.container=this.options.container,null==this.container)return b.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new p.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(e){e===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(l.default.events.SCROLL_UPDATE,(function(e,t){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;x.call(n,(function(){return n.editor.update(null,t,i)}),e)}));var o=this.clipboard.convert("
"+i+"


");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),h.default.level(e)}},{key:"find",value:function(e){return e.__quill||c.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&b.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var i=e.attrName||e.blotName;"string"==typeof i?this.register("formats/"+i,e,t):Object.keys(e).forEach((function(r){n.register(r,e[r],t)}))}else null==this.imports[e]||r||b.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?c.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),o(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){var n=e;(e=document.createElement("div")).classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var r=this,o=k(e,t,n),a=i(o,4);return e=a[0],t=a[1],n=a[3],x.call(this,(function(){return r.editor.deleteText(e,t)}),n,e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return x.call(this,(function(){var r=n.getSelection(!0),i=new a.default;if(null==r)return i;if(c.default.query(e,c.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,v({},e,t));else{if(0===r.length)return n.selection.format(e,t),i;i=n.editor.formatText(r.index,r.length,v({},e,t))}return n.setSelection(r,l.default.sources.SILENT),i}),r)}},{key:"formatLine",value:function(e,t,n,r,o){var a,s=this,l=k(e,t,n,r,o),u=i(l,4);return e=u[0],t=u[1],a=u[2],o=u[3],x.call(this,(function(){return s.editor.formatLine(e,t,a)}),o,e,0)}},{key:"formatText",value:function(e,t,n,r,o){var a,s=this,l=k(e,t,n,r,o),u=i(l,4);return e=u[0],t=u[1],a=u[2],o=u[3],x.call(this,(function(){return s.editor.formatText(e,t,a)}),o,e,0)}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=k(e,t),r=i(n,2);return e=r[0],t=r[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=k(e,t),r=i(n,2);return e=r[0],t=r[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return x.call(this,(function(){return i.editor.insertEmbed(t,n,r)}),o,t)}},{key:"insertText",value:function(e,t,n,r,o){var a,s=this,l=k(e,0,n,r,o),u=i(l,4);return e=u[0],a=u[2],o=u[3],x.call(this,(function(){return s.editor.insertText(e,t,a)}),o,e,t.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var r=this,o=k(e,t,n),a=i(o,4);return e=a[0],t=a[1],n=a[3],x.call(this,(function(){return r.editor.removeFormat(e,t)}),n,e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return x.call(this,(function(){e=new a.default(e);var n=t.getLength(),r=t.editor.deleteText(0,n),i=t.editor.applyDelta(e),o=i.ops[i.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),i.delete(1)),r.compose(i)}),n)}},{key:"setSelection",value:function(t,n,r){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var o=k(t,n,r),a=i(o,4);t=a[0],n=a[1],r=a[3],this.selection.setRange(new f.Range(t,n),r),r!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new a.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return x.call(this,(function(){return e=new a.default(e),t.editor.applyDelta(e,n)}),n,!0)}}]),e}();function w(e,t){if((t=(0,d.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==_.DEFAULTS.theme){if(t.theme=_.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=g.default;var n=(0,d.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach((function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach((function(t){!0===e.modules[t]&&(e.modules[t]={})}))}));var r=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce((function(e,t){var n=_.import("modules/"+t);return null==n?b.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e}),{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,d.default)(!0,{},_.DEFAULTS,{modules:r},n,t),["bounds","container","scrollingContainer"].forEach((function(e){"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))})),t.modules=Object.keys(t.modules).reduce((function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e}),{}),t}function x(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===l.default.sources.USER)return new a.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,s=e();if(null!=i&&(!0===n&&(n=i.index),null==r?i=C(i,s,t):0!==r&&(i=C(i,n,r,t)),this.setSelection(i,l.default.sources.SILENT)),s.length()>0){var u,c,f=[l.default.events.TEXT_CHANGE,s,o,t];(u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(f)),t!==l.default.sources.SILENT&&(c=this.emitter).emit.apply(c,f)}return s}function k(e,t,n,i,o){var a={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(o=i,i=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(o=i,i=n,n=t,t=0),"object"===(void 0===n?"undefined":r(n))?(a=n,o=i):"string"==typeof n&&(null!=i?a[n]=i:o=n),[e,t,a,o=o||l.default.sources.API]}function C(e,t,n,r){if(null==e)return null;var o=void 0,s=void 0;if(t instanceof a.default){var u=[e.index,e.index+e.length].map((function(e){return t.transformPosition(e,r!==l.default.sources.USER)})),c=i(u,2);o=c[0],s=c[1]}else{var p=[e.index,e.index+e.length].map((function(e){return e=0?e+n:Math.max(t,e+n)})),d=i(p,2);o=d[0],s=d[1]}return new f.Range(o,s-o)}_.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},_.events=l.default.events,_.sources=l.default.sources,_.version="1.3.7",_.imports={delta:a.default,parchment:c.default,"core/module":u.default,"core/theme":g.default},t.expandConfig=w,t.overload=k,t.default=_},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(e,n){var r=t.order.indexOf(e),i=t.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};r(this,e),this.quill=t,this.options=n};i.DEFAULTS={},t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=["error","warn","log","info"],i="warn";function o(e){if(r.indexOf(e)<=r.indexOf(i)){for(var t,n=arguments.length,o=Array(n>1?n-1:0),a=1;a=0;u--)if(f[u]!=p[u])return!1;for(u=f.length-1;u>=0;u--)if(c=f[u],!a(e[c],t[c],n))return!1;return typeof e==typeof t}(e,t,n))};function s(e){return null==e}function l(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0])}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,(function(e){return e.name}))},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=r.query(e,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n=e+n)){var a=this.newlineIndex(e,!0)+1,l=o-a+1,u=this.isolate(a,l),c=u.next;u.format(r,i),c instanceof t&&c.formatAt(0,e-a+n-l,r,i)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var i=this.descendant(c.default,e),o=r(i,2),a=o[0],s=o[1];a.insertAt(s,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var n=this.domNode.textContent.slice(e).indexOf("\n");return n>-1?e+n:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(e){var t=s.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof s.default.Embed?t.remove():t.unwrap()}))}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(l.default);m.blotName="code-block",m.tagName="PRE",m.TAB=" ",t.Code=g,t.default=m},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n=o&&!d.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,d);var h=t.scroll.line(e),g=i(h,2),v=g[0],y=g[1],b=(0,m.default)({},(0,f.bubbleFormats)(v));if(v instanceof p.default){var _=v.descendant(l.default.Leaf,y),w=i(_,1)[0];b=(0,m.default)(b,(0,f.bubbleFormats)(w))}c=s.default.attributes.diff(b,c)||{}}else if("object"===r(a.insert)){var x=Object.keys(a.insert)[0];if(null==x)return e;t.scroll.insertAt(e,x,a.insert[x])}o+=u}return Object.keys(c).forEach((function(n){t.scroll.formatAt(e,u,n,c[n])})),e+u}),0),e.reduce((function(e,n){return"number"==typeof n.delete?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update((new a.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach((function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(e,Math.max(t,1)),a=t;o.forEach((function(t){var o=t.length();if(t instanceof u.default){var s=e-t.offset(n.scroll),l=t.newlineIndex(s+a)-s+1;t.formatAt(s,l,i,r[i])}else t.format(i,r[i]);a-=o}))}})),this.scroll.optimize(),this.update((new a.default).retain(e).retain(t,(0,h.default)(r)))}},{key:"formatText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach((function(i){n.scroll.formatAt(e,t,i,r[i])})),this.update((new a.default).retain(e).retain(t,(0,h.default)(r)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(e,t){return e.concat(t.delta())}),new a.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach((function(e){var t=i(e,1)[0];t instanceof p.default?n.push(t):t instanceof l.default.Leaf&&r.push(t)})):(n=this.scroll.lines(e,t),r=this.scroll.descendants(l.default.Leaf,e,t));var o=[n,r].map((function(e){if(0===e.length)return{};for(var t=(0,f.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=_((0,f.bubbleFormats)(n),t)}return t}));return m.default.apply(m.default,o)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter((function(e){return"string"==typeof e.insert})).map((function(e){return e.insert})).join("")}},{key:"insertEmbed",value:function(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new a.default).retain(e).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(r).forEach((function(i){n.scroll.formatAt(e,t.length,i,r[i])})),this.update((new a.default).retain(e).insert(t,(0,h.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return e.statics.blotName===p.default.blotName&&!(e.children.length>1)&&e.children.head instanceof d.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),r=this.scroll.line(e+t),o=i(r,2),s=o[0],l=o[1],c=0,f=new a.default;null!=s&&(c=s instanceof u.default?s.newlineIndex(l)-l+1:s.length()-l,f=s.delta().slice(l,l+c-1).insert("\n"));var p=this.getContents(e,t+c).diff((new a.default).insert(n).concat(f)),d=(new a.default).retain(e).concat(p);return this.applyDelta(d)}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(y)&&l.default.find(t[0].target)){var i=l.default.find(t[0].target),o=(0,f.bubbleFormats)(i),s=i.offset(this.scroll),u=t[0].oldValue.replace(c.default.CONTENTS,""),p=(new a.default).insert(u),d=(new a.default).insert(i.value()),h=(new a.default).retain(s).concat(p.diff(d,n));e=h.reduce((function(e,t){return t.insert?e.insert(t.insert,o):e.push(t)}),new a.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,g.default)(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}]),e}();function _(e,t){return Object.keys(t).reduce((function(n,r){return null==e[r]||(t[r]===e[r]?n[r]=t[r]:Array.isArray(t[r])?t[r].indexOf(e[r])<0&&(n[r]=t[r].concat([e[r]])):n[r]=[t[r],e[r]]),n}),{})}t.default=b},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;f(this,e),this.index=t,this.length=n},h=function(){function e(t,n){var r=this;f(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new d(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,l.default.sources.USER),1)})),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(e,t){e===l.default.events.TEXT_CHANGE&&t.length()>0&&r.update(l.default.sources.SILENT)})),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var e=r.getNativeRange();null!=e&&e.start.node!==r.cursor.textNode&&r.emitter.once(l.default.events.SCROLL_UPDATE,(function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(t){}}))}})),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,(function(e,t){if(t.range){var n=t.range,i=n.startNode,o=n.startOffset,a=n.endNode,s=n.endOffset;r.setNativeRange(i,o,a,s)}})),this.update(l.default.sources.SILENT)}return i(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",(function(){e.composing=!0})),this.root.addEventListener("compositionend",(function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();if(!t)return;setTimeout((function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,(function(){e.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){e.mouseDown=!1,e.update(l.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(e,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=o.default.find(n.start.node,!1);if(null==r)return;if(r instanceof o.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var i=void 0,o=this.scroll.leaf(e),a=r(o,2),s=a[0],l=a[1];if(null==s)return null;var u=s.position(l,!0),c=r(u,2);i=c[0],l=c[1];var f=document.createRange();if(t>0){f.setStart(i,l);var p=this.scroll.leaf(e+t),d=r(p,2);if(s=d[0],l=d[1],null==s)return null;var h=s.position(l,!0),g=r(h,2);return i=g[0],l=g[1],f.setEnd(i,l),f.getBoundingClientRect()}var m="left",v=void 0;return i instanceof Text?(l0&&(m="right")),{bottom:v.top+v.height,height:v.height,left:v[m],right:v[m],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return p.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var i=n.map((function(e){var n=r(e,2),i=n[0],a=n[1],s=o.default.find(i,!0),l=s.offset(t.scroll);return 0===a?l:s instanceof o.default.Container?l+s.length():l+s.index(i,a)})),a=Math.min(Math.max.apply(Math,c(i)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(c(i)));return new d(s,a-s)}},{key:"normalizeNative",value:function(e){if(!g(this.root,e.startContainer)||!e.collapsed&&!g(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach((function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;n=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1}e.node=t,e.offset=n})),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],i=[],o=this.scroll.length();return n.forEach((function(e,n){e=Math.min(o-1,e);var a,s=t.scroll.leaf(e),l=r(s,2),u=l[0],c=l[1],f=u.position(c,0!==n),p=r(f,2);a=p[0],c=p[1],i.push(a,c)})),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var i=this.scroll.length()-1,o=this.scroll.line(Math.min(t.index,i)),a=r(o,1)[0],s=a;if(t.length>0){var l=this.scroll.line(Math.min(t.index+t.length,i));s=r(l,1)[0]}if(null!=a&&null!=s){var u=e.getBoundingClientRect();n.topu.bottom&&(e.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(p.info("setNativeRange",e,t,n,r),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=e){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||e!==a.startContainer||t!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(e,t),s.setEnd(n,r),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof t&&(n=t,t=!1),p.info("setRange",e),null!=e){var r=this.rangeToNative(e);this.setNativeRange.apply(this,c(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.lastRange,n=this.getRange(),i=r(n,2),o=i[0],u=i[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(t,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var f,p=[l.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(t),e];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(p)),e!==l.default.sources.SILENT&&(f=this.emitter).emit.apply(f,p)}}}]),e}();function g(e,t){try{t.parentNode}catch(n){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=d,t.default=h},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){var e;return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e},t.scope=a.Scope.INLINE_BLOT,t}(o.default);t.default=s},function(e,t,n){var r=n(11),i=n(3),o={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var r=i(!0,{},t);for(var o in n||(r=Object.keys(r).reduce((function(e,t){return null!=r[t]&&(e[t]=r[t]),e}),{})),e)void 0!==e[o]&&void 0===t[o]&&(r[o]=e[o]);return Object.keys(r).length>0?r:void 0},diff:function(e,t){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce((function(n,i){return r(e[i],t[i])||(n[i]=void 0===t[i]?null:t[i]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!=typeof e)return t;if("object"==typeof t){if(!n)return t;var r=Object.keys(t).reduce((function(n,r){return void 0===e[r]&&(n[r]=t[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(e){return new a(e)},length:function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"string"==typeof e.insert?e.insert.length:1}};function a(e){this.ops=e,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,r=o.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var i={};return t.attributes&&(i.attributes=t.attributes),"number"==typeof t.retain?i.retain=e:"string"==typeof t.insert?i.insert=t.insert.substr(n,e):i.insert=t.insert,i}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)}return[]},e.exports=o},function(e,t){var n=function(){function e(e,t){return null!=t&&e instanceof t}var t,n,r;try{t=Map}catch(s){t=function(){}}try{n=Set}catch(s){n=function(){}}try{r=Promise}catch(s){r=function(){}}function i(o,s,l,u,c){"object"==typeof s&&(l=s.depth,u=s.prototype,c=s.includeNonEnumerable,s=s.circular);var f=[],p=[],d="undefined"!=typeof Buffer;return void 0===s&&(s=!0),void 0===l&&(l=1/0),function o(l,h){if(null===l)return null;if(0===h)return l;var g,m;if("object"!=typeof l)return l;if(e(l,t))g=new t;else if(e(l,n))g=new n;else if(e(l,r))g=new r((function(e,t){l.then((function(t){e(o(t,h-1))}),(function(e){t(o(e,h-1))}))}));else if(i.__isArray(l))g=[];else if(i.__isRegExp(l))g=new RegExp(l.source,a(l)),l.lastIndex&&(g.lastIndex=l.lastIndex);else if(i.__isDate(l))g=new Date(l.getTime());else{if(d&&Buffer.isBuffer(l))return g=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(g),g;e(l,Error)?g=Object.create(l):void 0===u?(m=Object.getPrototypeOf(l),g=Object.create(m)):(g=Object.create(u),m=u)}if(s){var v=f.indexOf(l);if(-1!=v)return p[v];f.push(l),p.push(g)}for(var y in e(l,t)&&l.forEach((function(e,t){var n=o(t,h-1),r=o(e,h-1);g.set(n,r)})),e(l,n)&&l.forEach((function(e){var t=o(e,h-1);g.add(t)})),l){var b;m&&(b=Object.getOwnPropertyDescriptor(m,y)),b&&null==b.set||(g[y]=o(l[y],h-1))}if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(l);for(y=0;y<_.length;y++){var w=_[y];(!(k=Object.getOwnPropertyDescriptor(l,w))||k.enumerable||c)&&(g[w]=o(l[w],h-1),k.enumerable||Object.defineProperty(g,w,{enumerable:!1}))}}if(c){var x=Object.getOwnPropertyNames(l);for(y=0;y0){if(s instanceof l.BlockEmbed||d instanceof l.BlockEmbed)return void this.optimize();if(s instanceof f.default){var h=s.newlineIndex(s.length(),!0);if(h>-1&&(s=s.split(h+1))===d)return void this.optimize()}else if(d instanceof f.default){var g=d.newlineIndex(0);g>-1&&d.split(g+1)}var m=d.children.head instanceof c.default?null:d.children.head;s.moveChildren(d,m),s.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,r,i){(null==this.whitelist||this.whitelist[r])&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i),this.optimize())}},{key:"insertAt",value:function(e,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==r||null==a.default.query(n,a.default.Scope.BLOCK)){var i=a.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var s=a.default.create(n,r);this.appendChild(s)}else o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===a.default.Scope.INLINE_BLOT){var r=a.default.create(this.statics.defaultChild);r.appendChild(e),e=r}o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(h,e)}},{key:"lines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=function e(t,n,r){var i=[],o=r;return t.children.forEachAt(n,r,(function(t,n,r){h(t)?i.push(t):t instanceof a.default.Container&&(i=i.concat(e(t,n,o))),o-=r})),i};return n(this,e,t)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=s.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,e),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,e)}}}]),t}(a.default.Scroll);g.blotName="scroll",g.className="ql-editor",g.tagName="DIV",g.defaultChild="block",g.allowedChildren=[u.default,l.BlockEmbed,p.default],t.default=g},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=A(e);if(null==r||null==r.key)return v.warn("Attempted to add invalid keyboard binding",r);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),r=(0,l.default)(r,t,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(e.bindings[o]||[]).filter((function(e){return t.match(n,e)}));if(0!==a.length){var l=e.quill.getSelection();if(null!=l&&e.quill.hasFocus()){var u=e.quill.getLine(l.index),c=i(u,2),p=c[0],d=c[1],h=e.quill.getLeaf(l.index),g=i(h,2),m=g[0],v=g[1],y=0===l.length?[m,v]:e.quill.getLeaf(l.index+l.length),b=i(y,2),_=b[0],w=b[1],x=m instanceof f.default.Text?m.value().slice(0,v):"",k=_ instanceof f.default.Text?_.value().slice(w):"",C={collapsed:0===l.length,empty:0===l.length&&p.length()<=1,format:e.quill.getFormat(l),offset:d,prefix:x,suffix:k};a.some((function(t){if(null!=t.collapsed&&t.collapsed!==C.collapsed)return!1;if(null!=t.empty&&t.empty!==C.empty)return!1;if(null!=t.offset&&t.offset!==C.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((function(e){return null==C.format[e]})))return!1}else if("object"===r(t.format)&&!Object.keys(t.format).every((function(e){return!0===t.format[e]?null!=C.format[e]:!1===t.format[e]?null==C.format[e]:(0,s.default)(t.format[e],C.format[e])})))return!1;return!(null!=t.prefix&&!t.prefix.test(C.prefix)||null!=t.suffix&&!t.suffix.test(C.suffix)||!0===t.handler.call(e,l,C))}))&&n.preventDefault()}}}}))}}]),t}(h.default);function _(e,t){var n,r=e===b.keys.LEFT?"prefix":"suffix";return m(n={key:e,shiftKey:t,altKey:null},r,/^$/),m(n,"handler",(function(n){var r=n.index;e===b.keys.RIGHT&&(r+=n.length+1);var o=this.quill.getLeaf(r);return!(i(o,1)[0]instanceof f.default.Embed&&(e===b.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index-1,p.default.sources.USER):t?this.quill.setSelection(n.index,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index+n.length+1,p.default.sources.USER),1))})),n}function w(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),r=i(n,1)[0],o={};if(0===t.offset){var a=this.quill.getLine(e.index-1),s=i(a,1)[0];if(null!=s&&s.length()>1){var l=r.formats(),u=this.quill.getFormat(e.index-1,1);o=c.default.attributes.diff(l,u)||{}}}var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-f,f,p.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(e.index-f,f,o,p.default.sources.USER),this.quill.focus()}}function x(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var r={},o=0,a=this.quill.getLine(e.index),s=i(a,1)[0];if(t.offset>=s.length()-1){var l=this.quill.getLine(e.index+1),u=i(l,1)[0];if(u){var f=s.formats(),d=this.quill.getFormat(e.index,1);r=c.default.attributes.diff(f,d)||{},o=u.length()}}this.quill.deleteText(e.index,n,p.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+o-1,n,r,p.default.sources.USER)}}function k(e){var t=this.quill.getLines(e),n={};if(t.length>1){var r=t[0].formats(),i=t[t.length-1].formats();n=c.default.attributes.diff(i,r)||{}}this.quill.deleteText(e,p.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,p.default.sources.USER),this.quill.setSelection(e.index,p.default.sources.SILENT),this.quill.focus()}function C(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var r=Object.keys(t.format).reduce((function(e,n){return f.default.query(n,f.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e}),{});this.quill.insertText(e.index,"\n",r,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach((function(e){null==r[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],p.default.sources.USER))}))}function E(e){return{key:b.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=f.default.query("code-block"),r=t.index,o=t.length,a=this.quill.scroll.descendant(n,r),s=i(a,2),l=s[0],u=s[1];if(null!=l){var c=this.quill.getIndex(l),d=l.newlineIndex(u,!0)+1,h=l.newlineIndex(c+u+o),g=l.domNode.textContent.slice(d,h).split("\n");u=0,g.forEach((function(t,i){e?(l.insertAt(d+u,n.TAB),u+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):t.startsWith(n.TAB)&&(l.deleteAt(d+u,n.TAB.length),u-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),u+=t.length+1})),this.quill.update(p.default.sources.USER),this.quill.setSelection(r,o,p.default.sources.SILENT)}}}}function O(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],p.default.sources.USER)}}}function A(e){if("string"==typeof e||"number"==typeof e)return A({key:e});if("object"===(void 0===e?"undefined":r(e))&&(e=(0,a.default)(e,!1)),"string"==typeof e.key)if(null!=b.keys[e.key.toUpperCase()])e.key=b.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[y]=e.shortKey,delete e.shortKey),e}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:O("bold"),italic:O("italic"),underline:O("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",p.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",p.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",p.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,p.default.sources.USER)}},"indent code-block":E(!0),"outdent code-block":E(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,p.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new u.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(t,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,p.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,p.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,p.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=i(t,2),r=n[0],o=n[1],a=(0,l.default)({},r.formats(),{list:"checked"}),s=(new u.default).retain(e.index).insert("\n",a).retain(r.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),r=i(n,2),o=r[0],a=r[1],s=(new u.default).retain(e.index).insert("\n",t.format).retain(o.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,r=this.quill.getLine(e.index),o=i(r,2),a=o[0],s=o[1];if(s>n)return!0;var l=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(e.index," ",p.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(e.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:l});this.quill.updateContents(c,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,p.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=i(t,2),r=n[0],o=n[1],a=(new u.default).retain(e.index+r.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,p.default.sources.USER)}},"embed left":_(b.keys.LEFT,!1),"embed left shift":_(b.keys.LEFT,!0),"embed right":_(b.keys.RIGHT,!1),"embed right shift":_(b.keys.RIGHT,!0)}},t.default=b,t.SHORTKEY=y},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function e(e,t){for(var n=0;n-1}u.blotName="link",u.tagName="A",u.SANITIZED_URL="about:blank",u.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=u,t.sanitize=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":r(Event))){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(0)),i=v(n(5)),o=n(4),a=v(o),s=v(n(16)),l=v(n(25)),u=v(n(24)),c=v(n(35)),f=v(n(6)),p=v(n(22)),d=v(n(7)),h=v(n(55)),g=v(n(42)),m=v(n(23));function v(e){return e&&e.__esModule?e:{default:e}}i.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":f.default,"blots/scroll":p.default,"blots/text":d.default,"modules/clipboard":h.default,"modules/history":g.default,"modules/keyboard":m.default}),r.default.register(a.default,s.default,u.default,f.default,p.default,d.default),t.default=i.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e){this.domNode=e,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"==typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t="number"==typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return r.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,i){var o=this.isolate(e,t);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);o.wrap(a),a.format(n,i)}},e.prototype.insertAt=function(e,t,n){var i=null==n?r.create("text",t):r.create(t,n),o=this.split(e);this.parent.insertBefore(i,o)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),null!=t&&(n=t.domNode),this.domNode.parentNode==e.domNode&&this.domNode.nextSibling==n||e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return void 0===e&&(e=this.parent),null==this.parent||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"==typeof e?r.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n="string"==typeof e?r.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),i=n(32),o=n(33),a=n(1),s=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=r.default.keys(this.domNode),n=i.default.keys(this.domNode),s=o.default.keys(this.domNode);t.concat(n).concat(s).forEach((function(t){var n=a.query(t,a.Scope.ATTRIBUTE);n instanceof r.default&&(e.attributes[n.attrName]=n)}))},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach((function(n){var r=t.attributes[n].value(t.domNode);e.format(n,r)}))},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach((function(e){t.attributes[e].remove(t.domNode)})),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce((function(t,n){return t[n]=e.attributes[n].value(e.domNode),t}),{})},e}();t.default=s},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function o(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter((function(e){return 0===e.indexOf(t+"-")}))}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map((function(e){return e.split("-").slice(0,-1).join("-")}))},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){o(e,this.keyName).forEach((function(t){e.classList.remove(t)})),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(o(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=a},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function o(e){var t=e.split("-"),n=t.slice(1).map((function(e){return e[0].toUpperCase()+e.slice(1)})).join("");return t[0]+n}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map((function(e){return e.split(":")[0].trim()}))},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[o(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[o(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[o(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nr&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),e=i.redo.compose(e)}else this.lastRecorded=r;this.stack.undo.push({redo:e,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(e){this.stack.undo.forEach((function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})),this.stack.redo.forEach((function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(a(n(9)).default);function l(e){var t=e.reduce((function(e,t){return e+=t.delete||0}),0),n=e.length()-t;return function(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some((function(e){return null!=i.default.query(e,i.default.Scope.BLOCK)})))}(e)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=s,t.getLastChangeIndex=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e,t,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var r=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,s.default.sources.USER)),this.quill.root.scrollTop=r;break;case"video":t=(e=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/),n=t?(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0":(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/":e;case"formula":if(!n)break;var i=this.quill.getSelection(!0);if(null!=i){var o=i.index+i.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),n,s.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",s.default.sources.USER),this.quill.setSelection(o+2,s.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(d.default);function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((function(t){var r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",t),e.appendChild(r)}))}t.BaseTooltip=C,t.default=k},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(ea?n(r,e-a,Math.min(t,a+l-e)):n(r,0,Math.min(l,e+t-a)),a+=l}},e.prototype.map=function(e){return this.reduce((function(t,n){return t.push(e(n)),t}),[])},e.prototype.reduce=function(e,t){for(var n,r=this.iterator();n=r();)t=e(t,n);return t},e}();t.default=r},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(e){function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver((function(e){n.update(e)})),n.observer.observe(n.domNode,s),n.attach(),n}return i(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach((function(e){e.remove()})):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,r,i){this.update(),e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){this.update(),e.prototype.insertAt.call(this,t,n,r)},t.prototype.optimize=function(t,n){var r=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var i=[].slice.call(this.observer.takeRecords());i.length>0;)t.push(i.pop());for(var s=function(e,t){void 0===t&&(t=!0),null!=e&&e!==r&&null!=e.domNode.parentNode&&(null==e.domNode[a.DATA_KEY].mutations&&(e.domNode[a.DATA_KEY].mutations=[]),t&&s(e.parent))},l=function(e){null!=e.domNode[a.DATA_KEY]&&null!=e.domNode[a.DATA_KEY].mutations&&(e instanceof o.default&&e.children.forEach(l),e.optimize(n))},u=t,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(e){var t=a.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(s(a.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,(function(e){var t=a.find(e,!1);s(t,!1),t instanceof o.default&&t.children.forEach((function(e){s(e,!1)}))}))):"attributes"===e.type&&s(t.prev)),s(t))})),this.children.forEach(l),i=(u=[].slice.call(this.observer.takeRecords())).slice();i.length>0;)t.push(i.pop())}},t.prototype.update=function(t,n){var r=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map((function(e){var t=a.find(e.target,!0);return null==t?null:null==t.domNode[a.DATA_KEY].mutations?(t.domNode[a.DATA_KEY].mutations=[e],t):(t.domNode[a.DATA_KEY].mutations.push(e),null)})).forEach((function(e){null!=e&&e!==r&&null!=e.domNode[a.DATA_KEY]&&e.update(e.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="DIV",t}(o.default);t.default=l},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,r){var i=this;n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):(this.children.forEach((function(e){e instanceof o.default||(e=e.wrap(t.blotName,!0)),i.attributes.copy(e)})),this.unwrap())},t.prototype.formatAt=function(t,n,r,i){null!=this.formats()[r]||a.query(r,a.Scope.ATTRIBUTE)?this.isolate(t,n).format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof t&&i.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},t.blotName="inline",t.scope=a.Scope.INLINE_BLOT,t.tagName="SPAN",t}(o.default);t.default=s},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(n){var r=a.query(t.blotName).tagName;if(n.tagName!==r)return e.formats.call(this,n)},t.prototype.format=function(n,r){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,r,i){null!=a.query(r,a.Scope.BLOCK)?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){if(null==r||null!=a.query(n,a.Scope.INLINE))e.prototype.insertAt.call(this,t,n,r);else{var i=this.split(t),o=a.create(n,r);i.parent.insertBefore(o,i)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="P",t}(o.default);t.default=s},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,r,i){0===t&&n===this.length()?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=o},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(19),a=n(1),s=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return i(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,r){null==r?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,r)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=a.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some((function(e){return"characterData"===e.type&&e.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=a.Scope.INLINE_BLOT,t}(o.default);t.default=s},function(e,t,n){var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:i.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return-1!==r&&r===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;ot.length?e:t,u=e.length>t.length?t:e,c=l.indexOf(u);if(-1!=c)return s=[[1,l.substring(0,c)],[0,u],[1,l.substring(c+u.length)]],e.length>t.length&&(s[0][0]=s[2][0]=n),s;if(1==u.length)return[[n,e],[1,t]];var f=function(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,i,s,l,f]:null}var s,l,u,c,f,p=i(n,r,Math.ceil(n.length/4)),d=i(n,r,Math.ceil(n.length/2));if(!p&&!d)return null;s=d?p&&p[4].length>d[4].length?p:d:p,e.length>t.length?(l=s[0],u=s[1],c=s[2],f=s[3]):(c=s[0],f=s[1],l=s[2],u=s[3]);var h=s[4];return[l,u,c,f,h]}(e,t);if(f){var p=f[0],d=f[1],h=f[2],g=f[3],m=f[4],v=r(p,h),y=r(d,g);return v.concat([[0,m]],y)}return function(e,t){for(var r=e.length,o=t.length,a=Math.ceil((r+o)/2),s=a,l=2*a,u=new Array(l),c=new Array(l),f=0;fr)g+=2;else if(w>o)h+=2;else if(d&&(C=s+p-b)>=0&&C=(k=r-c[C]))return i(e,t,O,w)}for(var x=-y+m;x<=y-v;x+=2){for(var k,C=s+x,E=(k=x==-y||x!=y&&c[C-1]r)v+=2;else if(E>o)m+=2;else if(!d){var O;if((_=s+p-x)>=0&&_=(k=r-k))return i(e,t,O,w)}}}return[[n,e],[1,t]]}(e,t)}(e=e.substring(0,e.length-c),t=t.substring(0,t.length-c));return f&&d.unshift([0,f]),p&&d.push([0,p]),s(d),null!=l&&(d=function(e,t){var r=function(e,t){if(0===t)return[0,e];for(var r=0,i=0;i0&&i.splice(o+2,0,[s[0],l]),u(i,o,3)}return e}(d,l)),d=function(e){for(var t=!1,r=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},i=function(e){return e.charCodeAt(e.length-1)>=55296&&e.charCodeAt(e.length-1)<=56319},o=2;o0&&a.push(e[o]);return a}(d)}function i(e,t,n,i){var o=e.substring(0,n),a=t.substring(0,i),s=e.substring(n),l=t.substring(i),u=r(o,a),c=r(s,l);return u.concat(c)}function o(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n1?(0!==i&&0!==l&&(0!==(t=o(c,u))&&(r-i-l>0&&0==e[r-i-l-1][0]?e[r-i-l-1][1]+=c.substring(0,t):(e.splice(0,0,[0,c.substring(0,t)]),r++),c=c.substring(t),u=u.substring(t)),0!==(t=a(c,u))&&(e[r][1]=c.substring(c.length-t)+e[r][1],c=c.substring(0,c.length-t),u=u.substring(0,u.length-t))),0===i?e.splice(r-l,i+l,[1,c]):0===l?e.splice(r-i,i+l,[n,u]):e.splice(r-i-l,i+l,[n,u],[1,c]),r=r-i-l+(i?1:0)+(l?1:0)+1):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,l=0,i=0,u="",c=""}""===e[e.length-1][1]&&e.pop();var f=!1;for(r=1;r=0&&r>=t-1;r--)if(r+1=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=A(t,n)),parseFloat(r.textIndent||0)>0&&(t=(new s.default).insert("\t").concat(t)),t}],["li",function(e,t){var n=l.default.query(e);if(null==n||"list-item"!==n.blotName||!j(t,"\n"))return t;for(var r=-1,i=e.parentNode;!i.classList.contains("ql-clipboard");)"list"===(l.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?t:t.compose((new s.default).retain(t.length()-1).retain(1,{indent:r}))}],["b",N.bind(N,"bold")],["i",N.bind(N,"italic")],["style",function(){return new s.default}]],C=[p.AlignAttribute,m.DirectionAttribute].reduce((function(e,t){return e[t.keyName]=t,e}),{}),E=[p.AlignStyle,d.BackgroundStyle,g.ColorStyle,m.DirectionStyle,v.FontStyle,y.SizeStyle].reduce((function(e,t){return e[t.keyName]=t,e}),{}),O=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],k.concat(r.options.matchers).forEach((function(e){var t=i(e,2),o=t[0],a=t[1];(n.matchVisual||a!==F)&&r.addMatcher(o,a)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"==typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\<"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[h.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,_({},h.default.blotName,t[h.default.blotName]))}var r=this.prepareMatching(),o=i(r,2),a=o[0],l=o[1],u=D(this.container,a,l);return j(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new s.default).retain(u.length()-1).delete(1))),w.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,u.default.sources.SILENT);else{var r=this.convert(t);this.quill.updateContents((new s.default).retain(e).concat(r),n),this.quill.setSelection(e+r.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new s.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){r=r.concat(t.convert()).delete(n.length),t.quill.updateContents(r,u.default.sources.USER),t.quill.setSelection(r.length()-n.length,u.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=i,t.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach((function(r){var o=i(r,2),a=o[0],s=o[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:t.push(s);break;default:[].forEach.call(e.container.querySelectorAll(a),(function(e){e[x]=e[x]||[],e[x].push(s)}))}})),[t,n]}}]),t}(f.default);function A(e,t,n){return"object"===(void 0===t?"undefined":r(t))?Object.keys(t).reduce((function(e,n){return A(e,n,t[n])}),e):e.reduce((function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,a.default)({},_({},t,n),r.attributes))}),new s.default)}function S(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function j(e,t){for(var n="",r=e.ops.length-1;r>=0&&n.length-1}function D(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce((function(t,n){return n(e,t)}),new s.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(r,i){var o=D(i,t,n);return i.nodeType===e.ELEMENT_NODE&&(o=t.reduce((function(e,t){return t(i,e)}),o),o=(i[x]||[]).reduce((function(e,t){return t(i,e)}),o)),r.concat(o)}),new s.default):new s.default}function N(e,t,n){return A(n,e,!0)}function L(e,t){var n=l.default.Attributor.Attribute.keys(e),r=l.default.Attributor.Class.keys(e),i=l.default.Attributor.Style.keys(e),o={};return n.concat(r).concat(i).forEach((function(t){var n=l.default.query(t,l.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(e),o[n.attrName])||(null==(n=C[t])||n.attrName!==t&&n.keyName!==t||(o[n.attrName]=n.value(e)||void 0),null==(n=E[t])||n.attrName!==t&&n.keyName!==t||(n=E[t],o[n.attrName]=n.value(e)||void 0))})),Object.keys(o).length>0&&(t=A(t,o)),t}function M(e,t){var n=l.default.query(e);if(null==n)return t;if(n.prototype instanceof l.default.Embed){var r={},i=n.value(e);null!=i&&(r[n.blotName]=i,t=(new s.default).insert(r,n.formats(e)))}else"function"==typeof n.formats&&(t=A(t,n.blotName,n.formats(e)));return t}function P(e,t){return j(t,"\n")||(T(e)||t.length()>0&&e.nextSibling&&T(e.nextSibling))&&t.insert("\n"),t}function F(e,t){if(T(e)&&null!=e.nextElementSibling&&!j(t,"\n\n")){var n=e.offsetHeight+parseFloat(S(e).marginTop)+parseFloat(S(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function q(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!S(e.parentNode).whiteSpace.startsWith("pre")){var r=function(e,t){return(t=t.replace(/[^\u00a0]/g,"")).length<1&&e?" ":t};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==e.previousSibling&&T(e.parentNode)||null!=e.previousSibling&&T(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==e.nextSibling&&T(e.parentNode)||null!=e.nextSibling&&T(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}O.DEFAULTS={matchers:[],matchVisual:!0},t.default=O,t.matchAttributor=L,t.matchBlot=M,t.matchNewline=P,t.matchSpacing=F,t.matchText=q},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n '},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;nr.right&&(o=r.right-i.right,this.root.style.left=t+o+"px"),i.leftr.bottom){var a=i.bottom-i.top,s=e.bottom-e.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function e(e,t){for(var n=0;n','','',''].join(""),t.default=y},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=P(n(29)),i=n(36),o=n(38),a=n(64),s=P(n(65)),l=P(n(66)),u=n(67),c=P(u),f=n(37),p=n(26),d=n(39),h=n(40),g=P(n(56)),m=P(n(68)),v=P(n(27)),y=P(n(69)),b=P(n(70)),_=P(n(71)),w=P(n(72)),x=P(n(73)),k=n(13),C=P(k),E=P(n(74)),O=P(n(75)),A=P(n(57)),S=P(n(41)),j=P(n(28)),T=P(n(59)),D=P(n(60)),N=P(n(61)),L=P(n(108)),M=P(n(62));function P(e){return e&&e.__esModule?e:{default:e}}r.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":f.BackgroundClass,"attributors/class/color":p.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":d.FontClass,"attributors/class/size":h.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":f.BackgroundStyle,"attributors/style/color":p.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":d.FontStyle,"attributors/style/size":h.SizeStyle},!0),r.default.register({"formats/align":i.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":f.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":d.FontClass,"formats/size":h.SizeClass,"formats/blockquote":s.default,"formats/code-block":C.default,"formats/header":l.default,"formats/list":c.default,"formats/bold":g.default,"formats/code":k.Code,"formats/italic":m.default,"formats/link":v.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":_.default,"formats/image":w.default,"formats/video":x.default,"formats/list/item":u.ListItem,"modules/formula":E.default,"modules/syntax":O.default,"modules/toolbar":A.default,"themes/bubble":L.default,"themes/snow":M.default,"ui/icons":S.default,"ui/picker":j.default,"ui/icon-picker":D.default,"ui/color-picker":T.default,"ui/tooltip":N.default},!0),t.default=r.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var r,i=function(){function e(e,t){for(var n=0;n0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(e,n){if(e instanceof p)i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(e,o)}}},{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){if(e.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(s.default);d.blotName="list",d.scope=o.default.Scope.BLOCK_BLOT,d.tagName=["OL","UL"],d.defaultChild="list-item",d.allowedChildren=[p],t.ListItem=p,t.default=d},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(56);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var s=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default);s.blotName="italic",s.tagName=["EM","I"],t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return f.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,l.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(s.default.Embed);p.blotName="image",p.tagName="IMG",t.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return f.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"sanitize",value:function(e){return l.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(a.BlockEmbed);p.blotName="video",p.className="ql-video",p.tagName="IFRAME",t.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var r=function(){function e(e,t){for(var n=0;n0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(l(n(13)).default);p.className="ql-syntax";var d=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),h=function(e){function t(e,n){u(this,t);var r=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return r.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(i),i=setTimeout((function(){r.highlight(),i=null}),r.options.interval)})),r.highlight(),r}return f(t,e),r(t,null,[{key:"register",value:function(){a.default.register(d,!0),a.default.register(p,!0)}}]),r(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(p).forEach((function(t){t.highlight(e.options.highlight)})),this.quill.update(a.default.sources.SILENT),null!=t&&this.quill.setSelection(t,a.default.sources.SILENT)}}}]),t}(s.default);h.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=p,t.CodeToken=d,t.default=h},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function e(e,t){for(var n=0;n0&&i===a.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(t.index,t.length);if(1===o.length)r.position(r.quill.getBounds(t));else{var s=o[o.length-1],l=r.quill.getIndex(s),c=Math.min(s.length()-1,t.index+t.length-l),f=r.quill.getBounds(new u.Range(l,c));r.position(f)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()})),r}return h(t,e),i(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){e.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),t}(s.BaseTooltip);v.TEMPLATE=['','
','','',"
"].join(""),t.BubbleTooltip=v,t.default=m},function(e,t,n){e.exports=n(63)}]).default},e.exports=n()})),Mo=Wn(Lo),Po=Object.freeze(Object.assign(Object.create(null),Lo,{[Symbol.toStringTag]:"Module",default:Mo}));var Fo={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},qo=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Io={};function $o(e,t,n){var r,i,o,a,s,l="";for("string"!=typeof t&&(n=t,t=$o.defaultChars),void 0===n&&(n=!0),s=function(e){var t,n,r=Io[e];if(r)return r;for(r=Io[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t=55296&&o<=57343){if(o>=55296&&o<=56319&&r+1=56320&&a<=57343){l+=encodeURIComponent(e[r]+e[r+1]),r++;continue}l+="%EF%BF%BD"}else l+=encodeURIComponent(e[r]);return l}$o.defaultChars=";/?:@&=+$,-_.!~*'()#",$o.componentChars="-_.!~*'()";var Ro=$o,zo={};function Bo(e,t){var n;return"string"!=typeof t&&(t=Bo.defaultChars),n=function(e){var t,n,r=zo[e];if(r)return r;for(r=zo[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),r.push(n);for(t=0;t=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&i)&&t+91114111?u+="����":(l-=65536,u+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):u+="�";return u}))}Bo.defaultChars=";/?:@&=+$,#",Bo.componentChars="";var Wo=Bo;function Ho(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var Uo=/^([a-z0-9.+-]+:)/i,Vo=/:[0-9]*$/,Ko=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Yo=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),Go=["'"].concat(Yo),Zo=["%","/","?",";","#"].concat(Go),Xo=["/","?","#"],Jo=/^[+a-z0-9A-Z_-]{0,63}$/,Qo=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ea={javascript:!0,"javascript:":!0},ta={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};Ho.prototype.parse=function(e,t){var n,r,i,o,a,s=e;if(s=s.trim(),!t&&1===e.split("#").length){var l=Ko.exec(s);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}var u=Uo.exec(s);if(u&&(i=(u=u[0]).toLowerCase(),this.protocol=u,s=s.substr(u.length)),(t||u||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(a="//"===s.substr(0,2))||u&&ea[u]||(s=s.substr(2),this.slashes=!0)),!ea[u]&&(a||u&&!ta[u])){var c,f,p=-1;for(n=0;n127?v+="x":v+=m[y];if(!v.match(Jo)){var _=g.slice(0,n),w=g.slice(n+1),x=m.match(Qo);x&&(_.push(x[1]),w.unshift(x[2])),w.length&&(s=w.join(".")+s),this.hostname=_.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var k=s.indexOf("#");-1!==k&&(this.hash=s.substr(k),s=s.slice(0,k));var C=s.indexOf("?");return-1!==C&&(this.search=s.substr(C),s=s.slice(0,C)),s&&(this.pathname=s),ta[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Ho.prototype.parseHost=function(e){var t=Vo.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var na={encode:Ro,decode:Wo,format:function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""},parse:function(e,t){if(e&&e instanceof Ho)return e;var n=new Ho;return n.parse(e,t),n}},ra=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ia=/[\0-\x1F\x7F-\x9F]/,oa=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,aa={Any:ra,Cc:ia,Cf:/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,P:qo,Z:oa},sa=Un((function(e,t){var n=Object.prototype.hasOwnProperty;function r(e,t){return n.call(e,t)}function i(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function o(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var a=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,s=new RegExp(a.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;var u=/[&<>"]/,c=/[&<>"]/g,f={"&":"&","<":"<",">":">",'"':"""};function p(e){return f[e]}var d=/[.?*+^$[\]\\(){}|-]/g;t.lib={},t.lib.mdurl=na,t.lib.ucmicro=aa,t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=r,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(a,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(s,(function(e,t,n){return t||function(e,t){var n=0;return r(Fo,t)?Fo[t]:35===t.charCodeAt(0)&&l.test(t)&&i(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?o(n):e}(e,n)}))},t.isValidEntityCode=i,t.fromCodePoint=o,t.escapeHtml=function(e){return u.test(e)?e.replace(c,p):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return qo.test(e)},t.escapeRE=function(e){return e.replace(d,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}})),la=sa.unescapeAll,ua=sa.unescapeAll,ca={parseLinkLabel:function(e,t,n){var r,i,o,a,s=-1,l=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos32)return a;if(41===r){if(0===i)break;i--}t++}return o===t||0!==i||(a.str=la(e.slice(o,t)),a.lines=0,a.pos=t,a.ok=!0),a},parseLinkTitle:function(e,t,n){var r,i,o=0,a=t,s={ok:!1,pos:0,lines:0,str:""};if(t>=n)return s;if(34!==(i=e.charCodeAt(t))&&39!==i&&40!==i)return s;for(t++,40===i&&(i=41);t"+da(e[t].content)+""},ha.code_block=function(e,t,n,r,i){var o=e[t];return""+da(e[t].content)+"\n"},ha.fence=function(e,t,n,r,i){var o,a,s,l,u,c=e[t],f=c.info?pa(c.info).trim():"",p="",d="";return f&&(p=(s=f.split(/(\s+)/g))[0],d=s.slice(2).join("")),0===(o=n.highlight&&n.highlight(c.content,p,d)||da(c.content)).indexOf(""+o+"\n"):"
"+o+"
\n"},ha.image=function(e,t,n,r,i){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)},ha.hardbreak=function(e,t,n){return n.xhtmlOut?"
\n":"
\n"},ha.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"
\n":"
\n":"\n"},ha.text=function(e,t){return da(e[t].content)},ha.html_block=function(e,t){return e[t].content},ha.html_inline=function(e,t){return e[t].content},ga.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t\n":">")},ga.prototype.renderInline=function(e,t,n){for(var r,i="",o=this.rules,a=0,s=e.length;a/i.test(e)}var ka=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Ca=/\((c|tm|r|p)\)/i,Ea=/\((c|tm|r|p)\)/gi,Oa={c:"©",r:"®",p:"§",tm:"™"};function Aa(e,t){return Oa[t.toLowerCase()]}function Sa(e){var t,n,r=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||r||(n.content=n.content.replace(Ea,Aa)),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}function ja(e){var t,n,r=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||r||ka.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}var Ta=sa.isWhiteSpace,Da=sa.isPunctChar,Na=sa.isMdAsciiPunct,La=/['"]/,Ma=/['"]/g;function Pa(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function Fa(e,t){var n,r,i,o,a,s,l,u,c,f,p,d,h,g,m,v,y,b,_,w,x;for(_=[],n=0;n=0&&!(_[y].level<=l);y--);if(_.length=y+1,"text"===r.type){a=0,s=(i=r.content).length;e:for(;a=0)c=i.charCodeAt(o.index-1);else for(y=n-1;y>=0&&("softbreak"!==e[y].type&&"hardbreak"!==e[y].type);y--)if(e[y].content){c=e[y].content.charCodeAt(e[y].content.length-1);break}if(f=32,a=48&&c<=57&&(v=m=!1),m&&v&&(m=p,v=d),m||v){if(v)for(y=_.length-1;y>=0&&(u=_[y],!(_[y].level=0&&(n=this.attrs[t][1]),n},qa.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t};var Ia=qa;function $a(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}$a.prototype.Token=Ia;var Ra=$a,za=[["normalize",function(e){var t;t=(t=e.src.replace(ba,"\n")).replace(_a,"�"),e.src=t}],["block",function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function(e){var t,n,r,i=e.tokens;for(n=0,r=i.length;n=0;t--)if("link_close"!==(a=i[t]).type){if("html_inline"===a.type&&(y=a.content,/^\s]/i.test(y)&&d>0&&d--,xa(a.content)&&d++),!(d>0)&&"text"===a.type&&e.md.linkify.test(a.content)){for(u=a.content,v=e.md.linkify.match(u),s=[],p=a.level,f=0,l=0;lf&&((o=new e.Token("text","",0)).content=u.slice(f,c),o.level=p,s.push(o)),(o=new e.Token("link_open","a",1)).attrs=[["href",g]],o.level=p++,o.markup="linkify",o.info="auto",s.push(o),(o=new e.Token("text","",0)).content=m,o.level=p,s.push(o),(o=new e.Token("link_close","a",-1)).level=--p,o.markup="linkify",o.info="auto",s.push(o),f=v[l].lastIndex);f=0;t--)"inline"===e.tokens[t].type&&(Ca.test(e.tokens[t].content)&&Sa(e.tokens[t].children),ka.test(e.tokens[t].content)&&ja(e.tokens[t].children))}],["smartquotes",function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&La.test(e.tokens[t].content)&&Fa(e.tokens[t].children,e)}]];function Ba(){this.ruler=new ya;for(var e=0;e=o)return-1;if((n=e.src.charCodeAt(i++))<48||n>57)return-1;for(;;){if(i>=o)return-1;if(!((n=e.src.charCodeAt(i++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(i-r>=10)return-1}return i`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",ns="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",rs={HTML_TAG_RE:new RegExp("^(?:"+ts+"|"+ns+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),HTML_OPEN_CLOSE_TAG_RE:new RegExp("^(?:"+ts+"|"+ns+")")},is=rs.HTML_OPEN_CLOSE_TAG_RE,os=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(is.source+"\\s*$"),/^$/,!1]],as=sa.isSpace;function ss(e,t,n,r){var i,o,a,s,l,u,c,f;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",f=!1,a=s=u=c=0,l=(o=this.src).length;s0&&this.level++,this.tokens.push(r),r},ss.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},ss.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;et;)if(!as(this.src.charCodeAt(--e)))return e+1;return e},ss.prototype.skipChars=function(e,t){for(var n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e},ss.prototype.getLines=function(e,t,n,r){var i,o,a,s,l,u,c,f=e;if(e>=t)return"";for(u=new Array(t-e),i=0;fn?new Array(o-n+1).join(" ")+this.src.slice(s,l):this.src.slice(s,l)}return u.join("")},ss.prototype.Token=Ia;var ls=ss,us=[["table",function(e,t,n,r){var i,o,a,s,l,u,c,f,p,d,h,g,m,v,y,b;if(t+2>n)return!1;if(u=t+1,e.sCount[u]=4)return!1;if((a=e.bMarks[u]+e.tShift[u])>=e.eMarks[u])return!1;if(124!==(i=e.src.charCodeAt(a++))&&45!==i&&58!==i)return!1;for(;a=4)return!1;if((c=Va(o)).length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),0===(f=c.length)||f!==d.length)return!1;if(r)return!0;for(v=e.parentType,e.parentType="table",b=e.md.block.ruler.getRules("blockquote"),(p=e.push("table_open","table",1)).map=g=[t,0],(p=e.push("thead_open","thead",1)).map=[t,t+1],(p=e.push("tr_open","tr",1)).map=[t,t+1],s=0;s=4)break;for((c=Va(o)).length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),u===t+2&&((p=e.push("tbody_open","tbody",1)).map=m=[t+2,0]),(p=e.push("tr_open","tr",1)).map=[u,u+1],s=0;s=4))break;i=++r}return e.line=i,(o=e.push("code_block","code",0)).content=e.getLines(t,i,4+e.blkIndent,!0),o.map=[t,e.line],!0}],["fence",function(e,t,n,r){var i,o,a,s,l,u,c,f=!1,p=e.bMarks[t]+e.tShift[t],d=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(p+3>d)return!1;if(126!==(i=e.src.charCodeAt(p))&&96!==i)return!1;if(l=p,(o=(p=e.skipChars(p,i))-l)<3)return!1;if(c=e.src.slice(l,p),a=e.src.slice(p,d),96===i&&a.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((p=l=e.bMarks[s]+e.tShift[s])<(d=e.eMarks[s])&&e.sCount[s]=4||(p=e.skipChars(p,i))-l=4)return!1;if(62!==e.src.charCodeAt(E++))return!1;if(r)return!0;for(s=p=e.sCount[t]+1,32===e.src.charCodeAt(E)?(E++,s++,p++,i=!1,b=!0):9===e.src.charCodeAt(E)?(b=!0,(e.bsCount[t]+p)%4==3?(E++,s++,p++,i=!1):i=!0):b=!1,d=[e.bMarks[t]],e.bMarks[t]=E;E=O,v=[e.sCount[t]],e.sCount[t]=p-s,y=[e.tShift[t]],e.tShift[t]=E-e.bMarks[t],w=e.md.block.ruler.getRules("blockquote"),m=e.parentType,e.parentType="blockquote",f=t+1;f=(O=e.eMarks[f])));f++)if(62!==e.src.charCodeAt(E++)||k){if(u)break;for(_=!1,a=0,l=w.length;a=O,h.push(e.bsCount[f]),e.bsCount[f]=e.sCount[f]+1+(b?1:0),v.push(e.sCount[f]),e.sCount[f]=p-s,y.push(e.tShift[f]),e.tShift[f]=E-e.bMarks[f]}for(g=e.blkIndent,e.blkIndent=0,(x=e.push("blockquote_open","blockquote",1)).markup=">",x.map=c=[t,0],e.md.block.tokenize(e,t,f),(x=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=C,e.parentType=m,c[1]=e.line,a=0;a=4)return!1;if(42!==(i=e.src.charCodeAt(l++))&&45!==i&&95!==i)return!1;for(o=1;l=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]=e.blkIndent&&(N=!0),(O=Xa(e,t))>=0){if(c=!0,S=e.bMarks[t]+e.tShift[t],m=Number(e.src.substr(S,O-S-1)),N&&1!==m)return!1}else{if(!((O=Za(e,t))>=0))return!1;c=!1}if(N&&e.skipSpaces(O)>=e.eMarks[t])return!1;if(g=e.src.charCodeAt(O-1),r)return!0;for(h=e.tokens.length,c?(D=e.push("ordered_list_open","ol",1),1!==m&&(D.attrs=[["start",m]])):D=e.push("bullet_list_open","ul",1),D.map=d=[t,0],D.markup=String.fromCharCode(g),y=t,A=!1,T=e.md.block.ruler.getRules("list"),w=e.parentType,e.parentType="list";y=v?1:b-u)>4&&(l=1),s=u+l,(D=e.push("list_item_open","li",1)).markup=String.fromCharCode(g),D.map=f=[t,0],C=e.tight,k=e.tShift[t],x=e.sCount[t],_=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=s,e.tight=!0,e.tShift[t]=o-e.bMarks[t],e.sCount[t]=b,o>=v&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!A||(L=!1),A=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=_,e.tShift[t]=k,e.sCount[t]=x,e.tight=C,(D=e.push("list_item_close","li",-1)).markup=String.fromCharCode(g),y=t=e.line,f[1]=y,o=e.bMarks[t],y>=n)break;if(e.sCount[y]=4)break;for(j=!1,a=0,p=T.length;a=4)return!1;if(91!==e.src.charCodeAt(w))return!1;for(;++w3||e.sCount[k]<0)){for(v=!1,u=0,c=y.length;u=4)return!1;if(35!==(i=e.src.charCodeAt(l))||l>=u)return!1;for(o=1,i=e.src.charCodeAt(++l);35===i&&l6||ll&&es(e.src.charCodeAt(a-1))&&(u=a),e.line=t+1,(s=e.push("heading_open","h"+String(o),1)).markup="########".slice(0,o),s.map=[t,e.line],(s=e.push("inline","",0)).content=e.src.slice(l,u).trim(),s.map=[t,e.line],s.children=[],(s=e.push("heading_close","h"+String(o),-1)).markup="########".slice(0,o)),!0)},["paragraph","reference","blockquote"]],["lheading",function(e,t,n){var r,i,o,a,s,l,u,c,f,p,d=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(p=e.parentType,e.parentType="paragraph";d3)){if(e.sCount[d]>=e.blkIndent&&(l=e.bMarks[d]+e.tShift[d])<(u=e.eMarks[d])&&(45===(f=e.src.charCodeAt(l))||61===f)&&(l=e.skipChars(l,f),(l=e.skipSpaces(l))>=u)){c=61===f?1:2;break}if(!(e.sCount[d]<0)){for(i=!1,o=0,a=h.length;o=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(s=e.src.slice(l,u),i=0;i3||e.sCount[l]<0)){for(r=!1,i=0,o=u.length;i=n))&&!(e.sCount[a]=l){e.line=n;break}for(r=0;r?@[]^_`{|}~-".split("").forEach((function(e){gs[e.charCodeAt(0)]=1}));function vs(e,t){var n,r,i,o,a,s=[],l=t.length;for(n=0;n=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(i=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].token===r.token-1&&t[r.end+1].token===i.token+1&&t[n-1].marker===r.marker,a=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?a+a:a,o.content="",(o=e.tokens[i.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?a+a:a,o.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}var _s={tokenize:function(e,t){var n,r,i=e.pos,o=e.src.charCodeAt(i);if(t)return!1;if(95!==o&&42!==o)return!1;for(r=e.scanDelims(e.pos,42===o),n=0;n\x00-\x20]*)$/,As=rs.HTML_TAG_RE;var Ss=sa.has,js=sa.isValidEntityCode,Ts=sa.fromCodePoint,Ds=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Ns=/^&([a-z][a-z0-9]{1,31});/i;function Ls(e,t){var n,r,i,o,a,s,l,u,c={},f=t.length;for(n=0;na;r-=o.jump+1)if((o=t[r]).marker===i.marker&&o.open&&o.end<0&&(l=!1,(o.close||i.open)&&(o.length+i.length)%3==0&&(o.length%3==0&&i.length%3==0||(l=!0)),!l)){u=r>0&&!t[r-1].open?t[r-1].jump+1:0,i.jump=n-r+u,i.open=!1,o.end=n,o.jump=u,o.close=!1,s=-1;break}-1!==s&&(c[i.marker][(i.length||0)%3]=s)}}var Ms=sa.isWhiteSpace,Ps=sa.isPunctChar,Fs=sa.isMdAsciiPunct;function qs(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}qs.prototype.pushPending=function(){var e=new Ia("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},qs.prototype.push=function(e,t,n){this.pending&&this.pushPending();var r=new Ia(e,t,n),i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r},qs.prototype.scanDelims=function(e,t){var n,r,i,o,a,s,l,u,c,f=e,p=!0,d=!0,h=this.posMax,g=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;f=0&&32===e.pending.charCodeAt(n)?n>=1&&32===e.pending.charCodeAt(n-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),i++;i=d)return!1;if(h=s,(l=e.md.helpers.parseLinkDestination(e.src,s,e.posMax)).ok){for(c=e.md.normalizeLink(l.str),e.md.validateLink(c)?s=l.pos:c="",h=s;s=d||41!==e.src.charCodeAt(s))&&(g=!0),s++}if(g){if(void 0===e.env.references)return!1;if(s=0?i=e.src.slice(h,s++):s=o+1):s=o+1,i||(i=e.src.slice(a,o)),!(u=e.env.references[ws(i)]))return e.pos=p,!1;c=u.href,f=u.title}return t||(e.pos=a,e.posMax=o,e.push("link_open","a",1).attrs=n=[["href",c]],f&&n.push(["title",f]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=s,e.posMax=d,!0}],["image",function(e,t){var n,r,i,o,a,s,l,u,c,f,p,d,h,g="",m=e.pos,v=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(s=e.pos+2,(a=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((l=a+1)=v)return!1;for(h=l,(c=e.md.helpers.parseLinkDestination(e.src,l,e.posMax)).ok&&(g=e.md.normalizeLink(c.str),e.md.validateLink(g)?l=c.pos:g=""),h=l;l=v||41!==e.src.charCodeAt(l))return e.pos=m,!1;l++}else{if(void 0===e.env.references)return!1;if(l=0?o=e.src.slice(h,l++):l=a+1):l=a+1,o||(o=e.src.slice(s,a)),!(u=e.env.references[ks(o)]))return e.pos=m,!1;g=u.href,f=u.title}return t||(i=e.src.slice(s,a),e.md.inline.parse(i,e.md,e.env,d=[]),(p=e.push("image","img",0)).attrs=n=[["src",g],["alt",""]],p.children=d,p.content=i,f&&n.push(["title",f])),e.pos=l,e.posMax=v,!0}],["autolink",function(e,t){var n,r,i,o,a,s,l=e.pos;if(60!==e.src.charCodeAt(l))return!1;for(a=e.pos,s=e.posMax;;){if(++l>=s)return!1;if(60===(o=e.src.charCodeAt(l)))return!1;if(62===o)break}return n=e.src.slice(a+1,l),Os.test(n)?(r=e.md.normalizeLink(n),!!e.md.validateLink(r)&&(t||((i=e.push("link_open","a",1)).attrs=[["href",r]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(n),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=n.length+2,!0)):!!Es.test(n)&&(r=e.md.normalizeLink("mailto:"+n),!!e.md.validateLink(r)&&(t||((i=e.push("link_open","a",1)).attrs=[["href",r]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(n),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=n.length+2,!0))}],["html_inline",function(e,t){var n,r,i,o=e.pos;return!!e.md.options.html&&(i=e.posMax,!(60!==e.src.charCodeAt(o)||o+2>=i)&&(!(33!==(n=e.src.charCodeAt(o+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(r=e.src.slice(o).match(As))&&(t||(e.push("html_inline","",0).content=e.src.slice(o,o+r[0].length)),e.pos+=r[0].length,!0))))}],["entity",function(e,t){var n,r,i=e.pos,o=e.posMax;if(38!==e.src.charCodeAt(i))return!1;if(i+10&&r++,"text"===i[t].type&&t+1=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},zs.prototype.parse=function(e,t,n,r){var i,o,a,s=new this.State(e,t,n,r);for(this.tokenize(s),a=(o=this.ruler2.getRules("")).length,i=0;i=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},Gs="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Zs(e){var t,n,r=e.re=(t=e.__opts__,(n={}).src_Any=ra.source,n.src_Cc=ia.source,n.src_Z=oa.source,n.src_P=qo.source,n.src_ZPCc=[n.src_Z,n.src_P,n.src_Cc].join("|"),n.src_ZCc=[n.src_Z,n.src_Cc].join("|"),n.src_pseudo_letter="(?:(?![><|]|"+n.src_ZPCc+")"+n.src_Any+")",n.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",n.src_auth="(?:(?:(?!"+n.src_ZCc+"|[@/\\[\\]()]).)+@)?",n.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",n.src_host_terminator="(?=$|[><|]|"+n.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+n.src_ZPCc+"))",n.src_path="(?:[/?#](?:(?!"+n.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+n.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+n.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+n.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+n.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+n.src_ZCc+"|[']).)+\\'|\\'(?="+n.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+n.src_ZCc+"|[.]).|"+(t&&t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+n.src_ZCc+").|\\!+(?!"+n.src_ZCc+"|[!]).|\\?(?!"+n.src_ZCc+"|[?]).)+|\\/)?",n.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',n.src_xn="xn--[a-z0-9\\-]{1,59}",n.src_domain_root="(?:"+n.src_xn+"|"+n.src_pseudo_letter+"{1,63})",n.src_domain="(?:"+n.src_xn+"|(?:"+n.src_pseudo_letter+")|(?:"+n.src_pseudo_letter+"(?:-|"+n.src_pseudo_letter+"){0,61}"+n.src_pseudo_letter+"))",n.src_host="(?:(?:(?:(?:"+n.src_domain+")\\.)*"+n.src_domain+"))",n.tpl_host_fuzzy="(?:"+n.src_ip4+"|(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%)))",n.tpl_host_no_ip_fuzzy="(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%))",n.src_host_strict=n.src_host+n.src_host_terminator,n.tpl_host_fuzzy_strict=n.tpl_host_fuzzy+n.src_host_terminator,n.src_host_port_strict=n.src_host+n.src_port+n.src_host_terminator,n.tpl_host_port_fuzzy_strict=n.tpl_host_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_port_no_ip_fuzzy_strict=n.tpl_host_no_ip_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+n.src_ZPCc+"|>|$))",n.tpl_email_fuzzy='(^|[><|]|"|\\(|'+n.src_ZCc+")("+n.src_email_name+"@"+n.tpl_host_fuzzy_strict+")",n.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+n.src_ZPCc+"))((?![$+<=>^`||])"+n.tpl_host_port_fuzzy_strict+n.src_path+")",n.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+n.src_ZPCc+"))((?![$+<=>^`||])"+n.tpl_host_port_no_ip_fuzzy_strict+n.src_path+")",n),i=e.__tlds__.slice();function o(e){return e.replace("%TLDS%",r.src_tlds)}e.onCompile(),e.__tlds_replaced__||i.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),i.push(r.src_xn),r.src_tlds=i.join("|"),r.email_fuzzy=RegExp(o(r.tpl_email_fuzzy),"i"),r.link_fuzzy=RegExp(o(r.tpl_link_fuzzy),"i"),r.link_no_ip_fuzzy=RegExp(o(r.tpl_link_no_ip_fuzzy),"i"),r.host_fuzzy_test=RegExp(o(r.tpl_host_fuzzy_test),"i");var a=[];function s(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===Hs(n))return!function(e){return"[object RegExp]"===Hs(e)}(n.validate)?Us(n.validate)?r.validate=n.validate:s(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(Us(n.normalize)?r.normalize=n.normalize:n.normalize?s(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===Hs(e)}(n)?s(t,n):a.push(t)}})),a.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var l=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(Vs).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+r.src_ZPCc+"))("+l+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+r.src_ZPCc+"))("+l+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function Xs(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function Js(e,t){var n=new Xs(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Qs(e,t){if(!(this instanceof Qs))return new Qs(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||Ks.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=Ws({},Ks,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Ws({},Ys,e),this.__compiled__={},this.__tlds__=Gs,this.__tlds_replaced__=!1,this.re={},Zs(this)}Qs.prototype.add=function(e,t){return this.__schemas__[e]=t,Zs(this),this},Qs.prototype.set=function(e){return this.__opts__=Ws(this.__opts__,e),this},Qs.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(i=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),this.__index__>=0},Qs.prototype.pretest=function(e){return this.re.pretest.test(e)},Qs.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},Qs.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(Js(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(Js(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},Qs.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),Zs(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Zs(this),this)},Qs.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},Qs.prototype.onCompile=function(){};var el=Qs;const tl=2147483647,nl=/^xn--/,rl=/[^\0-\x7E]/,il=/[\x2E\u3002\uFF0E\uFF61]/g,ol={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},al=Math.floor,sl=String.fromCharCode;function ll(e){throw new RangeError(ol[e])}function ul(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]);const i=function(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}((e=e.replace(il,".")).split("."),t).join(".");return r+i}function cl(e){const t=[];let n=0;const r=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),pl=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},dl=function(e,t,n){let r=0;for(e=n?al(e/700):e>>1,e+=al(e/t);e>455;r+=36)e=al(e/35);return al(r+36*e/(e+38))},hl=function(e){const t=[],n=e.length;let r=0,i=128,o=72,a=e.lastIndexOf("-");a<0&&(a=0);for(let l=0;l=128&&ll("not-basic"),t.push(e.charCodeAt(l));for(let l=a>0?a+1:0;l=n&&ll("invalid-input");const a=(s=e.charCodeAt(l++))-48<10?s-22:s-65<26?s-65:s-97<26?s-97:36;(a>=36||a>al((tl-r)/t))&&ll("overflow"),r+=a*t;const u=i<=o?1:i>=o+26?26:i-o;if(aal(tl/c)&&ll("overflow"),t*=c}const u=t.length+1;o=dl(r-a,u,0==a),al(r/u)>tl-i&&ll("overflow"),i+=al(r/u),r%=u,t.splice(r++,0,i)}var s;return String.fromCodePoint(...t)},gl=function(e){const t=[];let n=(e=cl(e)).length,r=128,i=0,o=72;for(const l of e)l<128&&t.push(sl(l));let a=t.length,s=a;for(a&&t.push("-");s=r&&tal((tl-i)/l)&&ll("overflow"),i+=(n-r)*l,r=n;for(const u of e)if(utl&&ll("overflow"),u==r){let e=i;for(let n=36;;n+=36){const r=n<=o?1:n>=o+26?26:n-o;if(e=0))try{t.hostname=bl.toASCII(t.hostname)}catch(n){}return na.encode(na.format(t))}function Ol(e){var t=na.parse(e,!0);if(t.hostname&&(!t.protocol||Cl.indexOf(t.protocol)>=0))try{t.hostname=bl.toUnicode(t.hostname)}catch(n){}return na.decode(na.format(t),na.decode.defaultChars+"%")}function Al(e,t){if(!(this instanceof Al))return new Al(e,t);t||sa.isString(e)||(t=e||{},e="default"),this.inline=new Bs,this.block=new fs,this.core=new Wa,this.renderer=new ma,this.linkify=new el,this.validateLink=kl,this.normalizeLink=El,this.normalizeLinkText=Ol,this.utils=sa,this.helpers=sa.assign({},ca),this.options={},this.configure(e),t&&this.set(t)}Al.prototype.set=function(e){return sa.assign(this.options,e),this},Al.prototype.configure=function(e){var t,n=this;if(sa.isString(e)&&!(e=_l[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},Al.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},Al.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},Al.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Al.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},Al.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},Al.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},Al.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var Sl=Al,jl=Object.freeze(Object.assign(Object.create(null),Sl,{[Symbol.toStringTag]:"Module",default:Sl}));function Tl(e,t){return Array(t+1).join(e)}var Dl=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function Nl(e){return Fl(e,Dl)}var Ll=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function Ml(e){return Fl(e,Ll)}var Pl=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function Fl(e,t){return t.indexOf(e.nodeName)>=0}function ql(e,t){return e.getElementsByTagName&&t.some((function(t){return e.getElementsByTagName(t).length}))}var Il={};function $l(e){return e?e.replace(/(\n+\s*)+/g,"\n"):""}function Rl(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}function zl(e,t,n){for(var r=0;r-1)return!0}else{if("function"!=typeof r)throw new TypeError("`filter` needs to be a string, array, or function");if(r.call(e,t,n))return!0}}function Wl(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function Hl(e,t,n){return e&&e.parentNode===t||n(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}Il.paragraph={filter:"p",replacement:function(e){return"\n\n"+e+"\n\n"}},Il.lineBreak={filter:"br",replacement:function(e,t,n){return n.br+"\n"}},Il.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,n){var r=Number(t.nodeName.charAt(1));return"setext"===n.headingStyle&&r<3?"\n\n"+e+"\n"+Tl(1===r?"=":"-",e.length)+"\n\n":"\n\n"+Tl("#",r)+" "+e+"\n\n"}},Il.blockquote={filter:"blockquote",replacement:function(e){return"\n\n"+(e=(e=e.replace(/^\n+|\n+$/g,"")).replace(/^/gm,"> "))+"\n\n"}},Il.list={filter:["ul","ol"],replacement:function(e,t){var n=t.parentNode;return"LI"===n.nodeName&&n.lastElementChild===t?"\n"+e:"\n\n"+e+"\n\n"}},Il.listItem={filter:"li",replacement:function(e,t,n){e=e.replace(/^\n+/,"").replace(/\n+$/,"\n").replace(/\n/gm,"\n ");var r=n.bulletListMarker+" ",i=t.parentNode;if("OL"===i.nodeName){var o=i.getAttribute("start"),a=Array.prototype.indexOf.call(i.children,t);r=(o?Number(o)+a:a+1)+". "}return r+e+(t.nextSibling&&!/\n$/.test(e)?"\n":"")}},Il.indentedCodeBlock={filter:function(e,t){return"indented"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,n){return"\n\n "+t.firstChild.textContent.replace(/\n/g,"\n ")+"\n\n"}},Il.fencedCodeBlock={filter:function(e,t){return"fenced"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,n){for(var r,i=((t.firstChild.getAttribute("class")||"").match(/language-(\S+)/)||[null,""])[1],o=t.firstChild.textContent,a=n.fence.charAt(0),s=3,l=new RegExp("^"+a+"{3,}","gm");r=l.exec(o);)r[0].length>=s&&(s=r[0].length+1);var u=Tl(a,s);return"\n\n"+u+i+"\n"+o.replace(/\n$/,"")+"\n"+u+"\n\n"}},Il.horizontalRule={filter:"hr",replacement:function(e,t,n){return"\n\n"+n.hr+"\n\n"}},Il.inlineLink={filter:function(e,t){return"inlined"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){var n=t.getAttribute("href"),r=$l(t.getAttribute("title"));return r&&(r=' "'+r+'"'),"["+e+"]("+n+r+")"}},Il.referenceLink={filter:function(e,t){return"referenced"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t,n){var r,i,o=t.getAttribute("href"),a=$l(t.getAttribute("title"));switch(a&&(a=' "'+a+'"'),n.linkReferenceStyle){case"collapsed":r="["+e+"][]",i="["+e+"]: "+o+a;break;case"shortcut":r="["+e+"]",i="["+e+"]: "+o+a;break;default:var s=this.references.length+1;r="["+e+"]["+s+"]",i="["+s+"]: "+o+a}return this.references.push(i),r},references:[],append:function(e){var t="";return this.references.length&&(t="\n\n"+this.references.join("\n")+"\n\n",this.references=[]),t}},Il.emphasis={filter:["em","i"],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:""}},Il.strong={filter:["strong","b"],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:""}},Il.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!n},replacement:function(e){if(!e.trim())return"";var t="`",n="",r="",i=e.match(/`+/gm);if(i)for(/^`/.test(e)&&(n=" "),/`$/.test(e)&&(r=" ");-1!==i.indexOf(t);)t+="`";return t+n+e+r+t}},Il.image={filter:"img",replacement:function(e,t){var n=$l(t.getAttribute("alt")),r=t.getAttribute("src")||"",i=$l(t.getAttribute("title"));return r?"!["+n+"]("+r+(i?' "'+i+'"':"")+")":""}},Rl.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){return e.isBlank?this.blankRule:(t=zl(this.array,e,this.options))||(t=zl(this._keep,e,this.options))||(t=zl(this._remove,e,this.options))?t:this.defaultRule;var t},forEach:function(e){for(var t=0;t'+e+"","text/html").getElementById("turndown-root"):t=e.cloneNode(!0);return function(e){var t=e.element,n=e.isBlock,r=e.isVoid,i=e.isPre||function(e){return"PRE"===e.nodeName};if(t.firstChild&&!i(t)){for(var o=null,a=!1,s=null,l=Hl(s,t,i);l!==t;){if(3===l.nodeType||4===l.nodeType){var u=l.data.replace(/[ \r\n\t]+/g," ");if(o&&!/ $/.test(o.data)||a||" "!==u[0]||(u=u.substr(1)),!u){l=Wl(l);continue}l.data=u,o=l}else{if(1!==l.nodeType){l=Wl(l);continue}n(l)||"BR"===l.nodeName?(o&&(o.data=o.data.replace(/ $/,"")),o=null,a=!1):r(l)&&(o=null,a=!0)}var c=Hl(s,l,i);s=l,l=c}o&&(o.data=o.data.replace(/ $/,""),o.data||Wl(o))}}({element:t,isBlock:Nl,isVoid:Ml}),t}function Xl(e){return e.isBlock=Nl(e),e.isCode="code"===e.nodeName.toLowerCase()||e.parentNode.isCode,e.isBlank=function(e){return!Ml(e)&&!function(e){return Fl(e,Pl)}(e)&&/^\s*$/i.test(e.textContent)&&!function(e){return ql(e,Ll)}(e)&&!function(e){return ql(e,Pl)}(e)}(e),e.flankingWhitespace=function(e){var t="",n="";if(!e.isBlock){var r=/^\s/.test(e.textContent),i=/\s$/.test(e.textContent),o=e.isBlank&&r&&i;r&&!Jl("left",e)&&(t=" "),o||!i||Jl("right",e)||(n=" ")}return{leading:t,trailing:n}}(e),e}function Jl(e,t){var n,r,i;return"left"===e?(n=t.previousSibling,r=/ $/):(n=t.nextSibling,r=/^ /),n&&(3===n.nodeType?i=r.test(n.nodeValue):1!==n.nodeType||Nl(n)||(i=r.test(n.textContent))),i}var Ql=Array.prototype.reduce,eu=/^\n*/,tu=/\n*$/,nu=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function ru(e){if(!(this instanceof ru))return new ru(e);var t={rules:Il,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",blankReplacement:function(e,t){return t.isBlock?"\n\n":""},keepReplacement:function(e,t){return t.isBlock?"\n\n"+t.outerHTML+"\n\n":t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?"\n\n"+e+"\n\n":e}};this.options=function(e){for(var t=1;t"opacity: "+e*i}}function cu(e,{delay:t=0,duration:n=400,easing:r=lu,x:i=0,y:o=0,opacity:a=0}={}){const s=getComputedStyle(e),l=+s.opacity,u="none"===s.transform?"":s.transform,c=l*(1-a);return{delay:t,duration:n,easing:r,css:(e,t)=>`\n\t\t\ttransform: ${u} translate(${(1-e)*i}px, ${(1-e)*o}px);\n\t\t\topacity: ${l-c*t}`}}function fu(e,{delay:t=0,duration:n=400,easing:r=lu}={}){const i=getComputedStyle(e),o=+i.opacity,a=parseFloat(i.height),s=parseFloat(i.paddingTop),l=parseFloat(i.paddingBottom),u=parseFloat(i.marginTop),c=parseFloat(i.marginBottom),f=parseFloat(i.borderTopWidth),p=parseFloat(i.borderBottomWidth);return{delay:t,duration:n,easing:r,css:e=>`overflow: hidden;opacity: ${Math.min(20*e,1)*o};height: ${e*a}px;padding-top: ${e*s}px;padding-bottom: ${e*l}px;margin-top: ${e*u}px;margin-bottom: ${e*c}px;border-top-width: ${e*f}px;border-bottom-width: ${e*p}px;`}}function pu(e){let t,n;const r=e[3].default,i=v(r,e,e[2],null);return{c(){t=P("div"),i&&i.c()},l(e){t=Y(e,"DIV",{});var n=K(t);i&&i.l(n),n.forEach(L)},m(r,o){N(r,t,o),i&&i.m(t,null),e[4](t),n=!0},p(e,[t]){i&&i.p&&4&t&&b(i,r,e,e[2],t,null,null)},i(e){n||(Ue(i,e),n=!0)},o(e){Ve(i,e),n=!1},d(n){n&&L(t),i&&i.d(n),e[4](null)}}}function du(e,t,n){let r,i,o,{$$slots:a={},$$scope:s}=t,{target:l=document.body}=t;return ve((()=>{if("string"==typeof l){if(r=document.querySelector(l),null===r)return()=>{}}else{if(!(l instanceof HTMLElement))throw new TypeError(`Unknown target type: ${typeof l}. Allowed types: String (CSS selector), HTMLElement.`);r=l}return i=document.createElement("div"),r.appendChild(i),i.appendChild(o),()=>{r.removeChild(i)}})),e.$$set=e=>{"target"in e&&n(1,l=e.target),"$$scope"in e&&n(2,s=e.$$scope)},[o,l,s,a,function(e){Ee[e?"unshift":"push"]((()=>{o=e,n(0,o)}))}]}ru.prototype={turndown:function(e){if(!function(e){return null!=e&&("string"==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(""===e)return"";var t=iu.call(this,new Zl(e));return ou.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t"undefined"!=typeof console&&console.warn(e),getWeek:e=>{const t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},vu={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:e=>{const t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},yu=(e,t=2)=>`000${e}`.slice(-1*t),bu=e=>!0===e?1:0;function _u(e,t){let n;return function(){clearTimeout(n),n=setTimeout((()=>e.apply(this,arguments)),t)}}const wu=e=>e instanceof Array?e:[e];function xu(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function ku(e,t,n){const r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function Cu(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function Eu(e,t){return t(e)?e:e.parentNode?Eu(e.parentNode,t):void 0}function Ou(e,t){const n=ku("div","numInputWrapper"),r=ku("input","numInput "+e),i=ku("span","arrowUp"),o=ku("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?r.type="number":(r.type="text",r.pattern="\\d*"),void 0!==t)for(const a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(i),n.appendChild(o),n}function Au(e){try{if("function"==typeof e.composedPath){return e.composedPath()[0]}return e.target}catch(Vr){return e.target}}const Su=()=>{},ju=(e,t,n)=>n.months[t?"shorthand":"longhand"][e],Tu={D:Su,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:(e,t)=>{e.setHours(parseFloat(t))},H:(e,t)=>{e.setHours(parseFloat(t))},J:(e,t)=>{e.setDate(parseFloat(t))},K:(e,t,n)=>{e.setHours(e.getHours()%12+12*bu(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:(e,t)=>{e.setSeconds(parseFloat(t))},U:(e,t)=>new Date(1e3*parseFloat(t)),W:function(e,t,n){const r=parseInt(t),i=new Date(e.getFullYear(),0,2+7*(r-1),0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:(e,t)=>{e.setFullYear(parseFloat(t))},Z:(e,t)=>new Date(t),d:(e,t)=>{e.setDate(parseFloat(t))},h:(e,t)=>{e.setHours(parseFloat(t))},i:(e,t)=>{e.setMinutes(parseFloat(t))},j:(e,t)=>{e.setDate(parseFloat(t))},l:Su,m:(e,t)=>{e.setMonth(parseFloat(t)-1)},n:(e,t)=>{e.setMonth(parseFloat(t)-1)},s:(e,t)=>{e.setSeconds(parseFloat(t))},u:(e,t)=>new Date(parseFloat(t)),w:Su,y:(e,t)=>{e.setFullYear(2e3+parseFloat(t))}},Du={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Nu={Z:e=>e.toISOString(),D:function(e,t,n){return t.weekdays.shorthand[Nu.w(e,t,n)]},F:function(e,t,n){return ju(Nu.n(e,t,n)-1,!1,t)},G:function(e,t,n){return yu(Nu.h(e,t,n))},H:e=>yu(e.getHours()),J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:(e,t)=>t.amPM[bu(e.getHours()>11)],M:function(e,t){return ju(e.getMonth(),!0,t)},S:e=>yu(e.getSeconds()),U:e=>e.getTime()/1e3,W:function(e,t,n){return n.getWeek(e)},Y:e=>yu(e.getFullYear(),4),d:e=>yu(e.getDate()),h:e=>e.getHours()%12?e.getHours()%12:12,i:e=>yu(e.getMinutes()),j:e=>e.getDate(),l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:e=>yu(e.getMonth()+1),n:e=>e.getMonth()+1,s:e=>e.getSeconds(),u:e=>e.getTime(),w:e=>e.getDay(),y:e=>String(e.getFullYear()).substring(2)},Lu=({config:e=mu,l10n:t=vu,isMobile:n=!1})=>(r,i,o)=>{const a=o||t;return void 0===e.formatDate||n?i.split("").map(((t,n,i)=>Nu[t]&&"\\"!==i[n-1]?Nu[t](r,a,e):"\\"!==t?t:"")).join(""):e.formatDate(r,i,a)},Mu=({config:e=mu,l10n:t=vu})=>(n,r,i,o)=>{if(0!==n&&!n)return;const a=o||t;let s;const l=n;if(n instanceof Date)s=new Date(n.getTime());else if("string"!=typeof n&&void 0!==n.toFixed)s=new Date(n);else if("string"==typeof n){const t=r||(e||mu).dateFormat,o=String(n).trim();if("today"===o)s=new Date,i=!0;else if(/Z$/.test(o)||/GMT$/.test(o))s=new Date(n);else if(e&&e.parseDate)s=e.parseDate(n,t);else{s=e&&e.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);let r,i=[];for(let e=0,o=0,l="";es=e(s,t,a)||s))}s=r?s:void 0}}if(s instanceof Date&&!isNaN(s.getTime()))return!0===i&&s.setHours(0,0,0,0),s;e.errorHandler(new Error(`Invalid date provided: ${l}`))};function Pu(e,t,n=!0){return!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}const Fu=864e5;function qu(e){let t=e.defaultHour,n=e.defaultMinute,r=e.defaultSeconds;if(void 0!==e.minDate){const i=e.minDate.getHours(),o=e.minDate.getMinutes(),a=e.minDate.getSeconds();te[t]=n[t]));return e});function Iu(e,t){const n={config:Object.assign(Object.assign({},mu),Ru.defaultConfig),l10n:vu};function r(e){return e.bind(n)}function i(){const e=n.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==n.calendarContainer&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),void 0!==n.daysContainer){const t=(n.days.offsetWidth+1)*e.showMonths;n.daysContainer.style.width=t+"px",n.calendarContainer.style.width=t+(void 0!==n.weekWrapper?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}}))}function o(e){if(0===n.selectedDates.length){const e=void 0===n.config.minDate||Pu(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),t=qu(n.config);e.setHours(t.hours,t.minutes,t.seconds,e.getMilliseconds()),n.selectedDates=[e],n.latestSelectedDateObj=e}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();const t="keydown"===e.type,r=Au(e),i=r;void 0!==n.amPM&&r===n.amPM&&(n.amPM.textContent=n.l10n.amPM[bu(n.amPM.textContent===n.l10n.amPM[0])]);const o=parseFloat(i.getAttribute("min")),a=parseFloat(i.getAttribute("max")),s=parseFloat(i.getAttribute("step")),l=parseInt(i.value,10),u=e.delta||(t?38===e.which?1:-1:0);let c=l+s*u;if(void 0!==i.value&&2===i.value.length){const e=i===n.hourElement,t=i===n.minuteElement;ca&&(c=i===n.hourElement?c-a-bu(!n.amPM):o,t&&h(void 0,1,n.hourElement)),n.amPM&&e&&(1===s?c+l===23:Math.abs(c-l)>s)&&(n.amPM.textContent=n.l10n.amPM[bu(n.amPM.textContent===n.l10n.amPM[0])]),i.value=yu(c)}}(e);const t=n._input.value;a(),X(),n._input.value!==t&&n._debouncedChange()}function a(){if(void 0===n.hourElement||void 0===n.minuteElement)return;let e=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,t=(parseInt(n.minuteElement.value,10)||0)%60,r=void 0!==n.secondElement?(parseInt(n.secondElement.value,10)||0)%60:0;var i,o;void 0!==n.amPM&&(i=e,o=n.amPM.textContent,e=i%12+12*bu(o===n.l10n.amPM[1]));const a=void 0!==n.config.minTime||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&0===Pu(n.latestSelectedDateObj,n.config.minDate,!0);if(void 0!==n.config.maxTime||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&0===Pu(n.latestSelectedDateObj,n.config.maxDate,!0)){const i=void 0!==n.config.maxTime?n.config.maxTime:n.config.maxDate;e=Math.min(e,i.getHours()),e===i.getHours()&&(t=Math.min(t,i.getMinutes())),t===i.getMinutes()&&(r=Math.min(r,i.getSeconds()))}if(a){const i=void 0!==n.config.minTime?n.config.minTime:n.config.minDate;e=Math.max(e,i.getHours()),e===i.getHours()&&t=12)]),void 0!==n.secondElement&&(n.secondElement.value=yu(r)))}function u(e){const t=Au(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&j(n)}function c(e,t,r,i){return t instanceof Array?t.forEach((t=>c(e,t,r,i))):e instanceof Array?e.forEach((e=>c(e,t,r,i))):(e.addEventListener(t,r,i),void n._handlers.push({remove:()=>e.removeEventListener(t,r)}))}function f(){V("onChange")}function p(e,t){const r=void 0!==e?n.parseDate(e):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate=0&&Pu(e,n.selectedDates[1])<=0)}(t)&&!Y(t)&&a.classList.add("inRange"),n.weekNumbers&&1===n.config.showMonths&&"prevMonthDay"!==e&&r%7==1&&n.weekNumbers.insertAdjacentHTML("beforeend",""+n.config.getWeek(t)+""),V("onDayCreate",a),a}function m(e){e.focus(),"range"===n.config.mode&&M(e)}function v(e){const t=e>0?0:n.config.showMonths-1,r=e>0?n.config.showMonths:-1;for(let i=t;i!=r;i+=e){const t=n.daysContainer.children[i],r=e>0?0:t.children.length-1,o=e>0?t.children.length:-1;for(let n=r;n!=o;n+=e){const e=t.children[n];if(-1===e.className.indexOf("hidden")&&T(e.dateObj))return e}}}function y(e,t){const r=D(document.activeElement||document.body),i=void 0!==e?e:r?document.activeElement:void 0!==n.selectedDateElem&&D(n.selectedDateElem)?n.selectedDateElem:void 0!==n.todayDateElem&&D(n.todayDateElem)?n.todayDateElem:v(t>0?1:-1);void 0===i?n._input.focus():r?function(e,t){const r=-1===e.className.indexOf("Month")?e.dateObj.getMonth():n.currentMonth,i=t>0?n.config.showMonths:-1,o=t>0?1:-1;for(let a=r-n.currentMonth;a!=i;a+=o){const i=n.daysContainer.children[a],s=r-n.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,l=i.children.length;for(let n=s;n>=0&&n0?l:-1);n+=o){const r=i.children[n];if(-1===r.className.indexOf("hidden")&&T(r.dateObj)&&Math.abs(e.$i-n)>=Math.abs(t))return m(r)}}n.changeMonth(o),y(v(o),0)}(i,t):m(i)}function b(e,t){const r=(new Date(e,t,1).getDay()-n.l10n.firstDayOfWeek+7)%7,i=n.utils.getDaysInMonth((t-1+12)%12,e),o=n.utils.getDaysInMonth(t,e),a=window.document.createDocumentFragment(),s=n.config.showMonths>1,l=s?"prevMonthDay hidden":"prevMonthDay",u=s?"nextMonthDay hidden":"nextMonthDay";let c=i+1-r,f=0;for(;c<=i;c++,f++)a.appendChild(g(l,new Date(e,t-1,c),c,f));for(c=1;c<=o;c++,f++)a.appendChild(g("",new Date(e,t,c),c,f));for(let d=o+1;d<=42-r&&(1===n.config.showMonths||f%7!=0);d++,f++)a.appendChild(g(u,new Date(e,t+1,d%o),d,f));const p=ku("div","dayContainer");return p.appendChild(a),p}function _(){if(void 0===n.daysContainer)return;Cu(n.daysContainer),n.weekNumbers&&Cu(n.weekNumbers);const e=document.createDocumentFragment();for(let t=0;t1||"dropdown"!==n.config.monthSelectorType)return;const e=function(e){return!(void 0!==n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&en.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(let t=0;t<12;t++){if(!e(t))continue;const r=ku("option","flatpickr-monthDropdown-month");r.value=new Date(n.currentYear,t).getMonth().toString(),r.textContent=ju(t,n.config.shorthandCurrentMonth,n.l10n),r.tabIndex=-1,n.currentMonth===t&&(r.selected=!0),n.monthsDropdownContainer.appendChild(r)}}function x(){const e=ku("div","flatpickr-month"),t=window.document.createDocumentFragment();let r;n.config.showMonths>1||"static"===n.config.monthSelectorType?r=ku("span","cur-month"):(n.monthsDropdownContainer=ku("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),c(n.monthsDropdownContainer,"change",(e=>{const t=Au(e),r=parseInt(t.value,10);n.changeMonth(r-n.currentMonth),V("onMonthChange")})),w(),r=n.monthsDropdownContainer);const i=Ou("cur-year",{tabindex:"-1"}),o=i.getElementsByTagName("input")[0];o.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&o.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(o.setAttribute("max",n.config.maxDate.getFullYear().toString()),o.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());const a=ku("div","flatpickr-current-month");return a.appendChild(r),a.appendChild(i),t.appendChild(a),e.appendChild(t),{container:e,yearElement:o,monthElement:r}}function k(){Cu(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(let e=n.config.showMonths;e--;){const e=x();n.yearElements.push(e.yearElement),n.monthElements.push(e.monthElement),n.monthNav.appendChild(e.container)}n.monthNav.appendChild(n.nextMonthNav)}function C(){n.weekdayContainer?Cu(n.weekdayContainer):n.weekdayContainer=ku("div","flatpickr-weekdays");for(let e=n.config.showMonths;e--;){const e=ku("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(e)}return E(),n.weekdayContainer}function E(){if(!n.weekdayContainer)return;const e=n.l10n.firstDayOfWeek;let t=[...n.l10n.weekdays.shorthand];e>0&&e\n ${t.join("")}\n \n `}function O(e,t=!0){const r=t?e:e-n.currentMonth;r<0&&!0===n._hidePrevMonthArrow||r>0&&!0===n._hideNextMonthArrow||(n.currentMonth+=r,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,V("onYearChange"),w()),_(),V("onMonthChange"),G())}function A(e){return!(!n.config.appendTo||!n.config.appendTo.contains(e))||n.calendarContainer.contains(e)}function S(e){if(n.isOpen&&!n.config.inline){const t=Au(e),r=A(t),i=t===n.input||t===n.altInput||n.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(n.input)||~e.path.indexOf(n.altInput)),a="blur"===e.type?i&&e.relatedTarget&&!A(e.relatedTarget):!i&&!r&&!A(e.relatedTarget),s=!n.config.ignoredFocusElements.some((e=>e.contains(t)));a&&s&&(void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement&&""!==n.input.value&&void 0!==n.input.value&&o(),n.close(),n.config&&"range"===n.config.mode&&1===n.selectedDates.length&&(n.clear(!1),n.redraw()))}}function j(e){if(!e||n.config.minDate&&en.config.maxDate.getFullYear())return;const t=e,r=n.currentYear!==t;n.currentYear=t||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),r&&(n.redraw(),V("onYearChange"),w())}function T(e,t=!0){var r;const i=n.parseDate(e,void 0,t);if(n.config.minDate&&i&&Pu(i,n.config.minDate,void 0!==t?t:!n.minDateHasTime)<0||n.config.maxDate&&i&&Pu(i,n.config.maxDate,void 0!==t?t:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&0===n.config.disable.length)return!0;if(void 0===i)return!1;const o=!!n.config.enable,a=null!==(r=n.config.enable)&&void 0!==r?r:n.config.disable;for(let s,l=0;l=s.from.getTime()&&i.getTime()<=s.to.getTime())return o}return!o}function D(e){return void 0!==n.daysContainer&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&n.daysContainer.contains(e))}function N(e){!(e.target===n._input)||!(n.selectedDates.length>0||n._input.value.length>0)||e.relatedTarget&&A(e.relatedTarget)||n.setDate(n._input.value,!0,e.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function L(t){const r=Au(t),i=n.config.wrap?e.contains(r):r===n._input,s=n.config.allowInput,l=n.isOpen&&(!s||!i),u=n.config.inline&&i&&!s;if(13===t.keyCode&&i){if(s)return n.setDate(n._input.value,!0,r===n.altInput?n.config.altFormat:n.config.dateFormat),r.blur();n.open()}else if(A(r)||l||u){const e=!!n.timeContainer&&n.timeContainer.contains(r);switch(t.keyCode){case 13:e?(t.preventDefault(),o(),z()):B(t);break;case 27:t.preventDefault(),z();break;case 8:case 46:i&&!n.config.allowInput&&(t.preventDefault(),n.clear());break;case 37:case 39:if(e||i)n.hourElement&&n.hourElement.focus();else if(t.preventDefault(),void 0!==n.daysContainer&&(!1===s||document.activeElement&&D(document.activeElement))){const e=39===t.keyCode?1:-1;t.ctrlKey?(t.stopPropagation(),O(e),y(v(1),0)):y(void 0,e)}break;case 38:case 40:t.preventDefault();const a=40===t.keyCode?1:-1;n.daysContainer&&void 0!==r.$i||r===n.input||r===n.altInput?t.ctrlKey?(t.stopPropagation(),j(n.currentYear-a),y(v(1),0)):e||y(void 0,7*a):r===n.currentYearElement?j(n.currentYear-a):n.config.enableTime&&(!e&&n.hourElement&&n.hourElement.focus(),o(t),n._debouncedChange());break;case 9:if(e){const e=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter((e=>e)),i=e.indexOf(r);if(-1!==i){const r=e[i+(t.shiftKey?-1:1)];t.preventDefault(),(r||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(r)&&t.shiftKey&&(t.preventDefault(),n._input.focus())}}if(void 0!==n.amPM&&r===n.amPM)switch(t.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],a(),X();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],a(),X()}(i||A(r))&&V("onKeyDown",t)}function M(e){if(1!==n.selectedDates.length||e&&(!e.classList.contains("flatpickr-day")||e.classList.contains("flatpickr-disabled")))return;const t=e?e.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),r=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),i=Math.min(t,n.selectedDates[0].getTime()),o=Math.max(t,n.selectedDates[0].getTime());let a=!1,s=0,l=0;for(let n=i;ni&&ns)?s=n:n>r&&(!l||n0&&d0&&d>l;h?(p.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach((e=>{p.classList.remove(e)}))):a&&!h||(["startRange","inRange","endRange","notAllowed"].forEach((e=>{p.classList.remove(e)})),void 0!==e&&(e.classList.add(t<=n.selectedDates[0].getTime()?"startRange":"endRange"),rt&&d===r&&p.classList.add("endRange"),d>=s&&(0===l||d<=l)&&(c=r,f=t,(u=d)>Math.min(c,f)&&u{const r=n.config[`_${e}Date`]=n.parseDate(t,n.config.dateFormat),i=n.config[`_${"min"===e?"max":"min"}Date`];void 0!==r&&(n["min"===e?"minDateHasTime":"maxDateHasTime"]=r.getHours()>0||r.getMinutes()>0||r.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter((e=>T(e))),n.selectedDates.length||"min"!==e||s(r),X()),n.daysContainer&&(R(),void 0!==r?n.currentYearElement[e]=r.getFullYear().toString():n.currentYearElement.removeAttribute(e),n.currentYearElement.disabled=!!i&&void 0!==r&&i.getFullYear()===r.getFullYear())}}function q(){return n.config.wrap?e.querySelector("[data-input]"):e}function I(){"object"!=typeof n.config.locale&&void 0===Ru.l10ns[n.config.locale]&&n.config.errorHandler(new Error(`flatpickr: invalid locale ${n.config.locale}`)),n.l10n=Object.assign(Object.assign({},Ru.l10ns.default),"object"==typeof n.config.locale?n.config.locale:"default"!==n.config.locale?Ru.l10ns[n.config.locale]:void 0),Du.K=`(${n.l10n.amPM[0]}|${n.l10n.amPM[1]}|${n.l10n.amPM[0].toLowerCase()}|${n.l10n.amPM[1].toLowerCase()})`;void 0===Object.assign(Object.assign({},t),JSON.parse(JSON.stringify(e.dataset||{}))).time_24hr&&void 0===Ru.defaultConfig.time_24hr&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=Lu(n),n.parseDate=Mu({config:n.config,l10n:n.l10n})}function $(e){if("function"==typeof n.config.position)return void n.config.position(n,e);if(void 0===n.calendarContainer)return;V("onPreCalendarPosition");const t=e||n._positionElement,r=Array.prototype.reduce.call(n.calendarContainer.children,((e,t)=>e+t.offsetHeight),0),i=n.calendarContainer.offsetWidth,o=n.config.position.split(" "),a=o[0],s=o.length>1?o[1]:null,l=t.getBoundingClientRect(),u=window.innerHeight-l.bottom,c="above"===a||"below"!==a&&ur,f=window.pageYOffset+l.top+(c?-r-2:t.offsetHeight+2);if(xu(n.calendarContainer,"arrowTop",!c),xu(n.calendarContainer,"arrowBottom",c),n.config.inline)return;let p=window.pageXOffset+l.left,d=!1,h=!1;"center"===s?(p-=(i-l.width)/2,d=!0):"right"===s&&(p-=i-l.width,h=!0),xu(n.calendarContainer,"arrowLeft",!d&&!h),xu(n.calendarContainer,"arrowCenter",d),xu(n.calendarContainer,"arrowRight",h);const g=window.document.body.offsetWidth-(window.pageXOffset+l.right),m=p+i>window.document.body.offsetWidth,v=g+i>window.document.body.offsetWidth;if(xu(n.calendarContainer,"rightMost",m),!n.config.static)if(n.calendarContainer.style.top=`${f}px`,m)if(v){const e=function(){let e=null;for(let n=0;ne.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")));if(void 0===t)return;const r=t,i=n.latestSelectedDateObj=new Date(r.dateObj.getTime()),o=(i.getMonth()n.currentMonth+n.config.showMonths-1)&&"range"!==n.config.mode;if(n.selectedDateElem=r,"single"===n.config.mode)n.selectedDates=[i];else if("multiple"===n.config.mode){const e=Y(i);e?n.selectedDates.splice(parseInt(e),1):n.selectedDates.push(i)}else"range"===n.config.mode&&(2===n.selectedDates.length&&n.clear(!1,!1),n.latestSelectedDateObj=i,n.selectedDates.push(i),0!==Pu(i,n.selectedDates[0],!0)&&n.selectedDates.sort(((e,t)=>e.getTime()-t.getTime())));if(a(),o){const e=n.currentYear!==i.getFullYear();n.currentYear=i.getFullYear(),n.currentMonth=i.getMonth(),e&&(V("onYearChange"),w()),V("onMonthChange")}if(G(),_(),X(),o||"range"===n.config.mode||1!==n.config.showMonths?void 0!==n.selectedDateElem&&void 0===n.hourElement&&n.selectedDateElem&&n.selectedDateElem.focus():m(r),void 0!==n.hourElement&&void 0!==n.hourElement&&n.hourElement.focus(),n.config.closeOnSelect){const e="single"===n.config.mode&&!n.config.enableTime,t="range"===n.config.mode&&2===n.selectedDates.length&&!n.config.enableTime;(e||t)&&z()}f()}n.parseDate=Mu({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=c,n._setHoursFromDate=s,n._positionCalendar=$,n.changeMonth=O,n.changeYear=j,n.clear=function(e=!0,t=!0){n.input.value="",void 0!==n.altInput&&(n.altInput.value="");void 0!==n.mobileInput&&(n.mobileInput.value="");n.selectedDates=[],n.latestSelectedDateObj=void 0,!0===t&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth());if(!0===n.config.enableTime){const{hours:e,minutes:t,seconds:r}=qu(n.config);l(e,t,r)}n.redraw(),e&&V("onChange")},n.close=function(){n.isOpen=!1,n.isMobile||(void 0!==n.calendarContainer&&n.calendarContainer.classList.remove("open"),void 0!==n._input&&n._input.classList.remove("active"));V("onClose")},n._createElement=ku,n.destroy=function(){void 0!==n.config&&V("onDestroy");for(let e=n._handlers.length;e--;)n._handlers[e].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){const e=n.calendarContainer.parentNode;if(e.lastChild&&e.removeChild(e.lastChild),e.parentNode){for(;e.firstChild;)e.parentNode.insertBefore(e.firstChild,e);e.parentNode.removeChild(e)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput);n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((e=>{try{delete n[e]}catch(t){}}))},n.isEnabled=T,n.jumpToDate=p,n.open=function(e,t=n._positionElement){if(!0===n.isMobile){if(e){e.preventDefault();const t=Au(e);t&&t.blur()}return void 0!==n.mobileInput&&(n.mobileInput.focus(),n.mobileInput.click()),void V("onOpen")}if(n._input.disabled||n.config.inline)return;const r=n.isOpen;n.isOpen=!0,r||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),V("onOpen"),$(t));!0===n.config.enableTime&&!0===n.config.noCalendar&&(!1!==n.config.allowInput||void 0!==e&&n.timeContainer.contains(e.relatedTarget)||setTimeout((()=>n.hourElement.select()),50))},n.redraw=R,n.set=function(e,t){if(null!==e&&"object"==typeof e){Object.assign(n.config,e);for(const t in e)void 0!==W[t]&&W[t].forEach((e=>e()))}else n.config[e]=t,void 0!==W[e]?W[e].forEach((e=>e())):gu.indexOf(e)>-1&&(n.config[e]=wu(t));n.redraw(),X(!0)},n.setDate=function(e,t=!1,r=n.config.dateFormat){if(0!==e&&!e||e instanceof Array&&0===e.length)return n.clear(t);H(e,r),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),p(void 0,t),s(),0===n.selectedDates.length&&n.clear(!1);X(t),t&&V("onChange")},n.toggle=function(e){if(!0===n.isOpen)return n.close();n.open(e)};const W={locale:[I,E],showMonths:[k,i,C],minDate:[p],maxDate:[p],clickOpens:[()=>{!0===n.config.clickOpens?(c(n._input,"focus",n.open),c(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function H(e,t){let r=[];if(e instanceof Array)r=e.map((e=>n.parseDate(e,t)));else if(e instanceof Date||"number"==typeof e)r=[n.parseDate(e,t)];else if("string"==typeof e)switch(n.config.mode){case"single":case"time":r=[n.parseDate(e,t)];break;case"multiple":r=e.split(n.config.conjunction).map((e=>n.parseDate(e,t)));break;case"range":r=e.split(n.l10n.rangeSeparator).map((e=>n.parseDate(e,t)))}else n.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(e)}`));n.selectedDates=n.config.allowInvalidPreload?r:r.filter((e=>e instanceof Date&&T(e,!1))),"range"===n.config.mode&&n.selectedDates.sort(((e,t)=>e.getTime()-t.getTime()))}function U(e){return e.slice().map((e=>"string"==typeof e||"number"==typeof e||e instanceof Date?n.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:n.parseDate(e.from,void 0),to:n.parseDate(e.to,void 0)}:e)).filter((e=>e))}function V(e,t){if(void 0===n.config)return;const r=n.config[e];if(void 0!==r&&r.length>0)for(let i=0;r[i]&&i{const r=new Date(n.currentYear,n.currentMonth,1);r.setMonth(n.currentMonth+t),n.config.showMonths>1||"static"===n.config.monthSelectorType?n.monthElements[t].textContent=ju(r.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=r.getMonth().toString(),e.value=r.getFullYear().toString()})),n._hidePrevMonthArrow=void 0!==n.config.minDate&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYearn.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function Z(e){return n.selectedDates.map((t=>n.formatDate(t,e))).filter(((e,t,r)=>"range"!==n.config.mode||n.config.enableTime||r.indexOf(e)===t)).join("range"!==n.config.mode?n.config.conjunction:n.l10n.rangeSeparator)}function X(e=!0){void 0!==n.mobileInput&&n.mobileFormatStr&&(n.mobileInput.value=void 0!==n.latestSelectedDateObj?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=Z(n.config.dateFormat),void 0!==n.altInput&&(n.altInput.value=Z(n.config.altFormat)),!1!==e&&V("onValueUpdate")}function J(e){const t=Au(e),r=n.prevMonthNav.contains(t),i=n.nextMonthNav.contains(t);r||i?O(r?-1:1):n.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):t.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}return function(){n.element=n.input=e,n.isOpen=!1,function(){const i=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],o=Object.assign(Object.assign({},JSON.parse(JSON.stringify(e.dataset||{}))),t),a={};n.config.parseDate=o.parseDate,n.config.formatDate=o.formatDate,Object.defineProperty(n.config,"enable",{get:()=>n.config._enable,set:e=>{n.config._enable=U(e)}}),Object.defineProperty(n.config,"disable",{get:()=>n.config._disable,set:e=>{n.config._disable=U(e)}});const s="time"===o.mode;if(!o.dateFormat&&(o.enableTime||s)){const e=Ru.defaultConfig.dateFormat||mu.dateFormat;a.dateFormat=o.noCalendar||s?"H:i"+(o.enableSeconds?":S":""):e+" H:i"+(o.enableSeconds?":S":"")}if(o.altInput&&(o.enableTime||s)&&!o.altFormat){const e=Ru.defaultConfig.altFormat||mu.altFormat;a.altFormat=o.noCalendar||s?"h:i"+(o.enableSeconds?":S K":" K"):e+` h:i${o.enableSeconds?":S":""} K`}Object.defineProperty(n.config,"minDate",{get:()=>n.config._minDate,set:F("min")}),Object.defineProperty(n.config,"maxDate",{get:()=>n.config._maxDate,set:F("max")});const l=e=>t=>{n.config["min"===e?"_minTime":"_maxTime"]=n.parseDate(t,"H:i:S")};Object.defineProperty(n.config,"minTime",{get:()=>n.config._minTime,set:l("min")}),Object.defineProperty(n.config,"maxTime",{get:()=>n.config._maxTime,set:l("max")}),"time"===o.mode&&(n.config.noCalendar=!0,n.config.enableTime=!0);Object.assign(n.config,a,o);for(let e=0;evoid 0!==n.config[e])).forEach((e=>{n.config[e]=wu(n.config[e]||[]).map(r)})),n.isMobile=!n.config.disableMobile&&!n.config.inline&&"single"===n.config.mode&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(let e=0;e-1?n.config[e]=wu(t[e]).map(r).concat(n.config[e]):void 0===o[e]&&(n.config[e]=t[e])}o.altInputClass||(n.config.altInputClass=q().className+" "+n.config.altInputClass);V("onParseConfig")}(),I(),function(){if(n.input=q(),!n.input)return void n.config.errorHandler(new Error("Invalid input element specified"));n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=ku(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling));n.config.allowInput||n._input.setAttribute("readonly","readonly");n._positionElement=n.config.positionElement||n._input}(),function(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;const e=n.config.defaultDate||("INPUT"!==n.input.nodeName&&"TEXTAREA"!==n.input.nodeName||!n.input.placeholder||n.input.value!==n.input.placeholder?n.input.value:null);e&&H(e,n.config.dateFormat);n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()0&&(n.latestSelectedDateObj=n.selectedDates[0]);void 0!==n.config.minTime&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i"));void 0!==n.config.maxTime&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i"));n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}(),n.utils={getDaysInMonth:(e=n.currentMonth,t=n.currentYear)=>1===e&&(t%4==0&&t%100!=0||t%400==0)?29:n.l10n.daysInMonth[e]},n.isMobile||function(){const e=window.document.createDocumentFragment();if(n.calendarContainer=ku("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(e.appendChild((n.monthNav=ku("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=ku("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=ku("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,k(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:()=>n.__hidePrevMonthArrow,set(e){n.__hidePrevMonthArrow!==e&&(xu(n.prevMonthNav,"flatpickr-disabled",e),n.__hidePrevMonthArrow=e)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:()=>n.__hideNextMonthArrow,set(e){n.__hideNextMonthArrow!==e&&(xu(n.nextMonthNav,"flatpickr-disabled",e),n.__hideNextMonthArrow=e)}}),n.currentYearElement=n.yearElements[0],G(),n.monthNav)),n.innerContainer=ku("div","flatpickr-innerContainer"),n.config.weekNumbers){const{weekWrapper:e,weekNumbers:t}=function(){n.calendarContainer.classList.add("hasWeeks");const e=ku("div","flatpickr-weekwrapper");e.appendChild(ku("span","flatpickr-weekday",n.l10n.weekAbbreviation));const t=ku("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}();n.innerContainer.appendChild(e),n.weekNumbers=t,n.weekWrapper=e}n.rContainer=ku("div","flatpickr-rContainer"),n.rContainer.appendChild(C()),n.daysContainer||(n.daysContainer=ku("div","flatpickr-days"),n.daysContainer.tabIndex=-1),_(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),e.appendChild(n.innerContainer)}n.config.enableTime&&e.appendChild(function(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");const e=qu(n.config);n.timeContainer=ku("div","flatpickr-time"),n.timeContainer.tabIndex=-1;const t=ku("span","flatpickr-time-separator",":"),r=Ou("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=r.getElementsByTagName("input")[0];const i=Ou("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});n.minuteElement=i.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=yu(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),n.minuteElement.value=yu(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():e.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(r),n.timeContainer.appendChild(t),n.timeContainer.appendChild(i),n.config.time_24hr&&n.timeContainer.classList.add("time24hr");if(n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");const t=Ou("flatpickr-second");n.secondElement=t.getElementsByTagName("input")[0],n.secondElement.value=yu(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():e.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(ku("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(t)}n.config.time_24hr||(n.amPM=ku("span","flatpickr-am-pm",n.l10n.amPM[bu((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM));return n.timeContainer}());xu(n.calendarContainer,"rangeMode","range"===n.config.mode),xu(n.calendarContainer,"animate",!0===n.config.animate),xu(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(e);const t=void 0!==n.config.appendTo&&void 0!==n.config.appendTo.nodeType;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!t&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):void 0!==n.config.appendTo&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){const e=ku("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(e,n.element),e.appendChild(n.element),n.altInput&&e.appendChild(n.altInput),e.appendChild(n.calendarContainer)}n.config.static||n.config.inline||(void 0!==n.config.appendTo?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}(),function(){n.config.wrap&&["open","close","toggle","clear"].forEach((e=>{Array.prototype.forEach.call(n.element.querySelectorAll(`[data-${e}]`),(t=>c(t,"click",n[e])))}));if(n.isMobile)return void function(){const e=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=ku("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=e,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr));n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d"));n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d"));n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step")));n.input.type="hidden",void 0!==n.altInput&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(t){}c(n.mobileInput,"change",(e=>{n.setDate(Au(e).value,!1,n.mobileFormatStr),V("onChange"),V("onClose")}))}();const e=_u(P,50);n._debouncedChange=_u(f,300),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&c(n.daysContainer,"mouseover",(e=>{"range"===n.config.mode&&M(Au(e))}));c(window.document.body,"keydown",L),n.config.inline||n.config.static||c(window,"resize",e);void 0!==window.ontouchstart?c(window.document,"touchstart",S):c(window.document,"mousedown",S);c(window.document,"focus",S,{capture:!0}),!0===n.config.clickOpens&&(c(n._input,"focus",n.open),c(n._input,"click",n.open));void 0!==n.daysContainer&&(c(n.monthNav,"click",J),c(n.monthNav,["keyup","increment"],u),c(n.daysContainer,"click",B));if(void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement){const e=e=>Au(e).select();c(n.timeContainer,["increment"],o),c(n.timeContainer,"blur",o,{capture:!0}),c(n.timeContainer,"click",d),c([n.hourElement,n.minuteElement],["focus","click"],e),void 0!==n.secondElement&&c(n.secondElement,"focus",(()=>n.secondElement&&n.secondElement.select())),void 0!==n.amPM&&c(n.amPM,"click",(e=>{o(e),f()}))}n.config.allowInput&&c(n._input,"blur",N)}(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&s(n.config.noCalendar?n.latestSelectedDateObj:void 0),X(!1)),i();const a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&a&&$(),V("onReady")}(),n}function $u(e,t){const n=Array.prototype.slice.call(e).filter((e=>e instanceof HTMLElement)),r=[];for(let o=0;o(n(6,h=Ru(u||d,Object.assign(m(f),u?{wrap:!0}:{}))),()=>{h.destroy()})));const g=_e();function m(e={}){e=Object.assign({},e);for(const t of o){const n=(e,n,r)=>{g(Bu(t),[e,n,r])};t in e?(Array.isArray(e[t])||(e[t]=[e[t]]),e[t].push(n)):e[t]=[n]}return e.onChange&&!e.onChange.includes(v)&&e.onChange.push(v),e}function v(e,t){n(2,a=Array.isArray(e)&&1===e.length?e[0]:e),n(3,s=t)}return e.$$set=e=>{n(16,t=l(l({},t),_(e))),"value"in e&&n(2,a=e.value),"formattedValue"in e&&n(3,s=e.formattedValue),"element"in e&&n(4,u=e.element),"dateFormat"in e&&n(5,c=e.dateFormat),"$$scope"in e&&n(7,i=e.$$scope)},e.$$.update=()=>{if(100&e.$$.dirty&&h&&h.setDate(a,!1,c),64&e.$$.dirty&&h)for(const[e,t]of Object.entries(m(f)))h.set(e,t)},t=_(t),[d,p,a,s,u,c,h,i,r,function(e){Ee[e?"unshift":"push"]((()=>{d=e,n(0,d)}))}]}Ru.defaultConfig={},Ru.l10ns={en:Object.assign({},vu),default:Object.assign({},vu)},Ru.localize=e=>{Ru.l10ns.default=Object.assign(Object.assign({},Ru.l10ns.default),e)},Ru.setDefaults=e=>{Ru.defaultConfig=Object.assign(Object.assign({},Ru.defaultConfig),e)},Ru.parseDate=Mu({}),Ru.formatDate=Lu({}),Ru.compareDates=Pu,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return $u(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=Ru);class Hu extends pt{constructor(e){super(),ft(this,e,Wu,zu,d,{value:2,formattedValue:3,element:4,dateFormat:5})}}var Uu=Un((function(e,t){e.exports=function(){var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),u=l&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),g=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),m=/Android/.test(e),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),_=/win/i.test(t),w=f&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(f=!1,l=!0);var x=y&&(u||f&&(null==w||w<12.11)),k=n||a&&s>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var E,O=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function A(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function S(e,t){return A(e).appendChild(t)}function j(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(P=function(e){try{e.select()}catch(t){}});var $=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};function R(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var K=[""];function Y(e){for(;K.length<=e;)K.push(G(K)+" ");return K[e]}function G(e){return e[e.length-1]}function Z(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function ae(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function le(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var ue=null;function ce(e,t,n){var r;ue=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ue=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ue=i)}return null!=r?r:ue}var fe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function l(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var c=e.length,f=[],p=0;p-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ve(e,t){var n=ge(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function we(e){e.prototype.on=function(e,t){he(this,e,t)},e.prototype.off=function(e,t){me(this,e,t)}}function xe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ce(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ee(e){xe(e),ke(e)}function Oe(e){return e.target||e.srcElement}function Ae(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Se,je,Te=function(){if(a&&s<9)return!1;var e=j("div");return"draggable"in e||"dragDrop"in e}();function De(e){if(null==Se){var t=j("span","​");S(e,j("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Se?j("span","​"):j("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ne(e){if(null!=je)return je;var t=S(e,document.createTextNode("AخA")),n=E(t,0,1).getBoundingClientRect(),r=E(t,1,2).getBoundingClientRect();return A(e),!(!n||n.left==n.right)&&(je=r.right-n.right<3)}var Le,Me=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Pe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(Le){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(Le){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Fe="oncopy"in(Le=j("div"))||(Le.setAttribute("oncopy","return;"),"function"==typeof Le.oncopy),qe=null;function Ie(e){if(null!=qe)return qe;var t=S(e,j("span","x")),n=t.getBoundingClientRect(),r=E(t,0,1).getBoundingClientRect();return qe=Math.abs(n.left-r.left)>1}var $e={},Re={};function ze(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),$e[e]=t}function Be(e,t){Re[e]=t}function We(e){if("string"==typeof e&&Re.hasOwnProperty(e))e=Re[e];else if(e&&"string"==typeof e.name&&Re.hasOwnProperty(e.name)){var t=Re[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return We("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return We("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function He(e,t){t=We(t);var n=$e[t.name];if(!n)return He(e,"text/plain");var r=n(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Ue={};function Ve(e,t){q(t,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function Ke(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ye(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ge(e,t,n){return!e.startState||e.startState(t,n)}var Ze=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Xe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?ot(n,Xe(e,n).text.length):dt(t,Xe(e,t.line).text.length)}function dt(e,t){var n=e.ch;return null==n||n>t?ot(e.line,t):n<0?ot(e.line,0):e}function ht(e,t){for(var n=[],r=0;r=this.string.length},Ze.prototype.sol=function(){return this.pos==this.lineStart},Ze.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ze.prototype.next=function(){if(this.post},Ze.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ze.prototype.skipToEnd=function(){this.pos=this.string.length},Ze.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ze.prototype.backUp=function(e){this.pos-=e},Ze.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ze.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ze.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ze.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ze.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var gt=function(e,t){this.state=e,this.lookAhead=t},mt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function vt(e,t,n,r){var i=[e.state.modeGen],o={};Ot(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,u=0;n.state=!0,Ot(e,t.text,s.mode,n,(function(e,t){for(var n=l;ue&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&Ke(e.doc.mode,r.state),o=vt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function bt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new mt(r,!0,t);var o=At(e,t,n),a=o>r.first&&Xe(r,o-1).stateAfter,s=a?mt.fromSaved(r,a,o):new mt(r,Ge(r.mode),o);return r.iter(o,t,(function(n){_t(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}mt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},mt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},mt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mt.fromSaved=function(e,t,n){return t instanceof gt?new mt(e,Ke(e.mode,t.state),n,t.lookAhead):new mt(e,Ke(e.mode,t),n)},mt.prototype.save=function(e){var t=!1!==e?Ke(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new gt(t,this.maxLookAhead):t};var kt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Ct(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=Xe(a,(t=pt(a,t)).line),u=bt(e,t.line,n),c=new Ze(l.text,e.options.tabSize,u);for(r&&(o=[]);(r||c.pose.options.maxHighlightLength?(s=!1,a&&_t(e,t,r,f.pos),f.pos=t.length,l=null):l=Et(xt(n,f,r.state,p),o),p){var d=p[0].name;d&&(l="m-"+(l?d+" "+l:d))}if(!s||c!=l){for(;ua;--s){if(s<=o.first)return o.first;var l=Xe(o,s-1),u=l.stateAfter;if(u&&(!n||s+(u instanceof gt?u.lookAhead:0)<=o.modeFrontier))return s;var c=I(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}function St(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Xe(e,r).stateAfter;if(i&&(!(i instanceof gt)||r+i.lookAhead=t:o.to>t);(r||(r=[])).push(new Lt(a,o.from,s?null:o.to))}}return r}function It(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;b0)){var c=[l,1],f=at(u.from,s.from),p=at(u.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-3}}return i}function Bt(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!n||Vt(n,o.marker)<0)&&(n=o.marker)}return n}function Xt(e,t,n,r,i){var o=Xe(e,t),a=Tt&&o.markedSpans;if(a)for(var s=0;s=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?at(u.to,n)>=0:at(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?at(u.from,r)<=0:at(u.from,r)<0)))return!0}}}function Jt(e){for(var t;t=Yt(e);)e=t.find(-1,!0).line;return e}function Qt(e){for(var t;t=Gt(e);)e=t.find(1,!0).line;return e}function en(e){for(var t,n;t=Gt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function tn(e,t){var n=Xe(e,t),r=Jt(n);return n==r?t:tt(r)}function nn(e,t){if(t>e.lastLine())return t;var n,r=Xe(e,t);if(!rn(e,r))return t;for(;n=Gt(r);)r=n.find(1,!0).line;return tt(r)+1}function rn(e,t){var n=Tt&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var un=function(e,t,n){this.text=e,Wt(this,t),this.height=n?n(this):1};function cn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Bt(e),Wt(e,n);var i=r?r(e):1;i!=e.height&&et(e,i)}function fn(e){e.parent=null,Bt(e)}un.prototype.lineNo=function(){return tt(this)},we(un);var pn={},dn={};function hn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?dn:pn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function gn(e,t){var n=T("span",null,null,l?"padding-right: .1px":null),r={pre:T("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=vn,Ne(e.display.measure)&&(a=pe(o,e.doc.direction))&&(r.addToken=bn(r.addToken,a)),r.map=[],wn(o,r,yt(e,o,t!=e.display.externalMeasured&&tt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=M(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=M(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(De(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=M(r.pre.className,r.textClass||"")),r}function mn(e){var t=j("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function vn(e,t,n,r,i,o,l){if(t){var u,c=e.splitSpaces?yn(t,e.trailingSpace):t,f=e.cm.state.specialChars,p=!1;if(f.test(t)){u=document.createDocumentFragment();for(var d=0;;){f.lastIndex=d;var h=f.exec(t),g=h?h.index-d:t.length-d;if(g){var m=document.createTextNode(c.slice(d,d+g));a&&s<9?u.appendChild(j("span",[m])):u.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!h)break;d+=g+1;var v=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=u.appendChild(j("span",Y(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((v=u.appendChild(j("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),a&&s<9?u.appendChild(j("span",[v])):u.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),a&&s<9&&(p=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||i||p||o||l){var _=n||"";r&&(_+=r),i&&(_+=i);var w=j("span",[u],_,o);if(l)for(var x in l)l.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&w.setAttribute(x,l[x]);return e.content.appendChild(w)}e.content.appendChild(u)}}function yn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&f.from<=u);p++);if(f.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,f.to-u),i,o,null,s,l),o=null,r=r.slice(f.to-u),u=f.to}}}function _n(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function wn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,f,p,d=i.length,h=0,g=1,m="",v=0;;){if(v==h){l=u=c=s="",p=null,f=null,v=1/0;for(var y=[],b=void 0,_=0;_h||x.collapsed&&w.to==h&&w.from==h)){if(null!=w.to&&w.to!=h&&v>w.to&&(v=w.to,u=""),x.className&&(l+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&w.from==h&&(c+=" "+x.startStyle),x.endStyle&&w.to==v&&(b||(b=[])).push(x.endStyle,w.to),x.title&&((p||(p={})).title=x.title),x.attributes)for(var k in x.attributes)(p||(p={}))[k]=x.attributes[k];x.collapsed&&(!f||Vt(f.marker,x)<0)&&(f=w)}else w.from>h&&v>w.from&&(v=w.from)}if(b)for(var C=0;C=d)break;for(var O=Math.min(d,v);;){if(m){var A=h+m.length;if(!f){var S=A>O?m.slice(0,O-h):m;t.addToken(t,S,a?a+l:l,c,h+S.length==v?u:"",s,p)}if(A>=O){m=m.slice(O-h),h=O;break}h=A,c=""}m=i.slice(o,o=n[g++]),a=hn(n[g++],t.cm.options)}}else for(var j=1;j2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Jn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Qn(e,t){var n=tt(t=Jt(t)),r=e.display.externalMeasured=new xn(e.doc,t,n);r.lineN=n;var i=r.built=gn(e,r);return r.text=i.pre,S(e.display.lineMeasure,i.pre),r}function er(e,t,n,r){return rr(e,nr(e,t),n,r)}function tr(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[u+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&i==l-s)for(;u=0&&(n=e[i]).left==n.right;i--);return n}function lr(e,t,n,r){var i,o=ar(t.map,n,r),l=o.node,u=o.start,c=o.end,f=o.collapse;if(3==l.nodeType){for(var p=0;p<4;p++){for(;u&&oe(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c0&&(f=r="right"),i=e.options.lineWrapping&&(d=l.getClientRects()).length>1?d["right"==r?d.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!u&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+Tr(e.display),top:h.top,bottom:h.bottom}:or}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights,b=0;b=r.text.length?(l=r.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return a("before"==u?l-1:l,"before"==u);function c(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var f=ce(s,l,u),p=ue,d=c(l,f,"before"==u);return null!=p&&(d.other=c(l,p,"before"!=u)),d}function _r(e,t){var n=0;t=pt(e.doc,t),e.options.lineWrapping||(n=Tr(e.display)*t.ch);var r=Xe(e.doc,t.line),i=an(r)+Un(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function wr(e,t,n,r,i){var o=ot(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function xr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return wr(r.first,0,null,-1,-1);var i=nt(r,n),o=r.first+r.size-1;if(i>o)return wr(r.first+r.size-1,Xe(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Xe(r,i);;){var s=Or(e,a,i,t,n),l=Zt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var u=l.find(1);if(u.line==i)return u;a=Xe(r,i=u.line)}}function kr(e,t,n,r){r-=gr(t);var i=t.text.length,o=se((function(t){return rr(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=se((function(t){return rr(e,n,t).top>r}),o,i)}}function Cr(e,t,n,r){return n||(n=nr(e,t)),kr(e,t,n,mr(e,t,rr(e,n,r),"line").top)}function Er(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Or(e,t,n,r,i){i-=an(t);var o=nr(e,t),a=gr(t),s=0,l=t.text.length,u=!0,c=pe(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?Sr:Ar)(e,t,n,o,c,r,i);s=(u=1!=f.level)?f.from:f.to-1,l=u?f.to:f.from-1}var p,d,h=null,g=null,m=se((function(t){var n=rr(e,o,t);return n.top+=a,n.bottom+=a,!!Er(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,g=n),!0)}),s,l),v=!1;if(g){var y=r-g.left=_.bottom?1:0}return wr(n,m=ae(t.text,m,1),d,v,r-p)}function Ar(e,t,n,r,i,o,a){var s=se((function(s){var l=i[s],u=1!=l.level;return Er(br(e,ot(n,u?l.to:l.from,u?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var u=1!=l.level,c=br(e,ot(n,u?l.from:l.to,u?"after":"before"),"line",t,r);Er(c,o,a,!0)&&c.top>a&&(l=i[s-1])}return l}function Sr(e,t,n,r,i,o,a){var s=kr(e,t,r,a),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,p=0;p=u||d.to<=l)){var h=rr(e,r,1!=d.level?Math.min(u,d.to)-1:Math.max(l,d.from)).right,g=hg)&&(c=d,f=g)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function jr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ir){ir=j("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ir.appendChild(document.createTextNode("x")),ir.appendChild(j("br"));ir.appendChild(document.createTextNode("x"))}S(e.measure,ir);var n=ir.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),A(e.measure),n||1}function Tr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=j("span","xxxxxxxxxx"),n=j("pre",[t],"CodeMirror-line-like");S(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Dr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:Nr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Nr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Lr(e){var t=jr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Tr(e.display)-3);return function(i){if(rn(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(l=Xe(e.doc,u.line).text).length==u.ch){var c=I(l,l.length,e.options.tabSize)-l.length;u=ot(u.line,Math.max(0,Math.round((o-Kn(e.display).left)/Tr(e.display))-c))}return u}function Fr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Tt&&tn(e.doc,t)i.viewFrom?$r(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)$r(e);else if(t<=i.viewFrom){var o=Rr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):$r(e)}else if(n>=i.viewTo){var a=Rr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):$r(e)}else{var s=Rr(e,t,t,-1),l=Rr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(kn(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):$r(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Fr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==R(a,n)&&a.push(n)}}}function $r(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Rr(e,t,n,r){var i,o=Fr(e,t),a=e.display.view;if(!Tt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;tn(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function zr(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=kn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=kn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Fr(e,n)))),r.viewTo=n}function Br(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?t.blinker=setInterval((function(){e.hasFocus()||Jr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Gr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Xr(e))}function Zr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Jr(e))}),100)}function Xr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,L(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Yr(e))}function Jr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,O(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Qr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||p<-.005)&&(et(i.line,l),ei(i.line),i.rest))for(var d=0;de.display.sizerWidth){var h=Math.ceil(u/Tr(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function ei(e){if(e.widgets)for(var t=0;t=a&&(o=nt(t,an(Xe(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function ni(e,t){if(!ye(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=j("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Un(e.display))+"px;\n height: "+(t.bottom-t.top+Yn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ri(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?ot(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ot(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=br(e,t),l=n&&n!=t?br(e,n):s,u=oi(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(pi(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(hi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return i}function ii(e,t){var n=oi(e,t);null!=n.scrollTop&&pi(e,n.scrollTop),null!=n.scrollLeft&&hi(e,n.scrollLeft)}function oi(e,t){var n=e.display,r=jr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Zn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Vn(n),l=t.tops-r;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(a.scrollTop=c)}var f=e.options.fixedGutter?0:n.gutters.offsetWidth,p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-f,d=Gn(e)-n.gutters.offsetWidth,h=t.right-t.left>d;return h&&(t.right=t.left+d),t.left<10?a.scrollLeft=0:t.leftd+p-3&&(a.scrollLeft=t.right+(h?0:10)-d),a}function ai(e,t){null!=t&&(ci(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function si(e){ci(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function li(e,t,n){null==t&&null==n||ci(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function ui(e,t){ci(e),e.curOp.scrollToPos=t}function ci(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,fi(e,_r(e,t.from),_r(e,t.to),t.margin))}function fi(e,t,n,r){var i=oi(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});li(e,i.scrollLeft,i.scrollTop)}function pi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Wi(e,{top:t}),di(e,t,!0),n&&Wi(e),Pi(e,100))}function di(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function hi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Ki(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function gi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Vn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Yn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var mi=function(e,t,n){this.cm=n;var r=this.vert=j("div",[j("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=j("div",[j("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),he(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),he(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};mi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},mi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},mi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},mi.prototype.zeroWidthHack=function(){var e=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new $,this.disableVert=new $},mi.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},mi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var vi=function(){};function yi(e,t){t||(t=gi(e));var n=e.display.barWidth,r=e.display.barHeight;bi(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Qr(e),bi(e,gi(e)),n=e.display.barWidth,r=e.display.barHeight}function bi(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}vi.prototype.update=function(){return{bottom:0,right:0}},vi.prototype.setScrollLeft=function(){},vi.prototype.setScrollTop=function(){},vi.prototype.clear=function(){};var _i={native:mi,null:vi};function wi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&O(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new _i[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),he(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?hi(e,t):pi(e,t)}),e),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)}var xi=0;function ki(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++xi},En(e.curOp)}function Ci(e){var t=e.curOp;t&&An(t,(function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new qi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ai(e){e.updatedDisplay=e.mustUpdate&&zi(e.cm,e.update)}function Si(e){var t=e.cm,n=t.display;e.updatedDisplay&&Qr(t),e.barMeasure=gi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=er(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Yn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Gn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function ji(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=bt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?Ke(t.mode,r.state):null,l=vt(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),p=0;!f&&pn)return Pi(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Di(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Br(e))return!1;Yi(e)&&($r(e),t.dims=Dr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Tt&&(o=tn(e.doc,o),a=nn(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;zr(e,o,a),n.viewOffset=an(Xe(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=Br(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=$i(e);return l>4&&(n.lineDiv.style.display="none"),Hi(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Ri(u),A(n.cursorDiv),A(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Pi(e,400)),n.updateLineNumbers=null,!0}function Bi(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Gn(e))r&&(t.visible=ti(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Vn(e.display)-Zn(e),n.top)}),t.visible=ti(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!zi(e,t))break;Qr(e);var i=gi(e);Wr(e),yi(e,i),Vi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Wi(e,t){var n=new qi(e,t);if(zi(e,n)){Qr(e),Bi(e,n);var r=gi(e);Wr(e),yi(e,r),Vi(e,r),n.finish()}}function Hi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,f=0;f-1&&(d=!1),Dn(e,p,c,n)),d&&(A(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(it(e.options,c)))),a=p.node.nextSibling}else{var h=$n(e,p,c,n);o.insertBefore(h,a)}c+=p.size}for(;a;)a=s(a)}function Ui(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Vi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Yn(e)+"px"}function Ki(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Nr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,c=s.scrollHeight>s.clientHeight;if(i&&u||o&&c){if(o&&y&&l)e:for(var p=t.target,d=a.view;p!=s;p=p.parentNode)for(var h=0;h=0&&at(e,r.to())<=0)return n}return-1};var oo=function(e,t){this.anchor=e,this.head=t};function ao(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return at(e.from(),t.from())})),n=R(t,i);for(var o=1;o0:l>=0){var u=ct(s.from(),a.from()),c=ut(s.to(),a.to()),f=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new oo(f?c:u,f?u:c))}}return new io(t,n)}function so(e,t){return new io([new oo(e,t||e)],0)}function lo(e){return e.text?ot(e.from.line+e.text.length-1,G(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function uo(e,t){if(at(e,t.from)<0)return e;if(at(e,t.to)<=0)return lo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=lo(t).ch-t.to.ch),ot(n,r)}function co(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}jn(e,"change",e,t)}function yo(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),G(e.done)):void 0}function Oo(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Eo(i,i.lastOp==r)))a=G(o.changes),0==at(t.from,t.to)&&0==at(t.from,a.to)?a.to=lo(t):o.changes.push(ko(e,t));else{var l=G(i.done);for(l&&l.ranges||jo(e.sel,i.done),o={changes:[ko(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||ve(e,"historyAdded")}function Ao(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function So(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Ao(e,o,G(i.done),t))?i.done[i.done.length-1]=t:jo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Co(i.undone)}function jo(e,t){var n=G(t);n&&n.ranges&&n.equals(e)||t.push(e)}function To(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Do(e){if(!e)return null;for(var t,n=0;n-1&&(G(s)[f]=u[f],delete u[f])}}}return r}function Po(e,t,n,r){if(r){var i=e.anchor;if(n){var o=at(t,i)<0;o!=at(n,i)<0?(i=t,t=n):o!=at(t,n)<0&&(t=n)}return new oo(i,t)}return new oo(n||t,t)}function Fo(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Bo(e,new io([Po(e.sel.primary(),t,n,i)],0),r)}function qo(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(ve(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var f=l.find(r<0?1:-1),p=void 0;if((r<0?c:u)&&(f=Go(e,f,-r,f&&f.line==t.line?o:null)),f&&f.line==t.line&&(p=at(f,n))&&(r<0?p<0:p>0))return Ko(e,f,t,r,i)}var d=l.find(r<0?-1:1);return(r<0?u:c)&&(d=Go(e,d,r,d.line==t.line?o:null)),d?Ko(e,d,t,r,i):null}}return t}function Yo(e,t,n,r,i){var o=r||1,a=Ko(e,t,n,o,i)||!i&&Ko(e,t,n,o,!0)||Ko(e,t,n,-o,i)||!i&&Ko(e,t,n,-o,!0);return a||(e.cantEdit=!0,ot(e.first,0))}function Go(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?pt(e,ot(t.line-1)):null:n>0&&t.ch==(r||Xe(e,t.line)).text.length?t.line=0;--i)Qo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Qo(e,t)}}function Qo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=at(t.from,t.to)){var n=co(e,t);Oo(e,t,n,e.cm?e.cm.curOp.id:NaN),na(e,t,n,$t(e,t));var r=[];yo(e,(function(e,n){n||-1!=R(r,e.history)||(sa(e.history,t),r.push(e.history)),na(e,t,null,$t(e,t))}))}}function ea(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,u=0;u=0;--d){var h=p(d);if(h)return h.v}}}}function ta(e,t){if(0!=t&&(e.first+=t,e.sel=new io(Z(e.sel.ranges,(function(e){return new oo(ot(e.anchor.line+t,e.anchor.ch),ot(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){qr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ot(o,Xe(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Je(e,t.from,t.to),n||(n=co(e,t)),e.cm?ra(e.cm,t,r):vo(e,t,r),Wo(e,n,W),e.cantEdit&&Yo(e,ot(e.firstLine(),0))&&(e.cantEdit=!1)}}function ra(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=tt(Jt(Xe(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&be(e),vo(r,t,n,Lr(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=sn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),St(r,o.line),Pi(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?qr(e):o.line!=a.line||1!=t.text.length||mo(e.doc,t)?qr(e,o.line,a.line+1,u):Ir(e,o.line,"text");var c=_e(e,"changes"),f=_e(e,"change");if(f||c){var p={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&jn(e,"change",e,p),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function ia(e,t,n,r,i){var o;r||(r=n),at(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Jo(e,{from:n,to:r,text:t,origin:i})}function oa(e,t,n,r){n1||!(this.children[0]instanceof ua))){var s=[];this.collapse(s),this.children=[new ua(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=T("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Xt(e,t.line,t,n,o)||t.line!=n.line&&Xt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Nt()}o.addToHistory&&Oo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,(function(e){u&&o.collapsed&&!u.options.lineWrapping&&Jt(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&et(e,0),Ft(e,new Lt(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){rn(e,t)&&et(t,0)})),o.clearOnEnter&&he(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Dt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ha,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)qr(u,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)Ir(u,c,"text");o.atomic&&Uo(u.doc),jn(u,"markerAdded",u,o)}return o}ga.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&ki(e),_e(this,"clear")){var n=this.find();n&&jn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&qr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Uo(e.doc)),e&&jn(e,"markerCleared",e,this,r,i),t&&Ci(e),this.parent&&this.parent.clear()}},ga.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)Jo(this,r[l]);s?zo(this,s):this.cm&&si(this.cm)})),undo:Mi((function(){ea(this,"undo")})),redo:Mi((function(){ea(this,"redo")})),undoSelection:Mi((function(){ea(this,"undo",!0)})),redoSelection:Mi((function(){ea(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=pt(this,e),t=pt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n})),pt(this,ot(n,t))},indexFromPos:function(e){var t=(e=pt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var p;if(t.state.draggingText&&!t.state.draggingText.copy&&(p=t.listSelections()),Wo(t.doc,so(n,n)),p)for(var d=0;d=0;t--)ia(e.doc,"",r[t].from,r[t].to,"+delete");si(e)}))}function Ka(e,t,n){var r=ae(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ya(e,t,n){var r=Ka(e,t.ch,n);return null==r?null:new ot(t.line,r,n<0?"after":"before")}function Ga(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=pe(n,t.doc.direction);if(o){var a,s=i<0?G(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=nr(t,n);a=i<0?n.text.length-1:0;var c=rr(t,u,a).top;a=se((function(e){return rr(t,u,e).top==c}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Ka(n,a,1))}else a=i<0?s.to:s.from;return new ot(r,a,l)}}return new ot(r,i<0?n.text.length:0,i<0?"before":"after")}function Za(e,t,n,r){var i=pe(t,e.doc.direction);if(!i)return Ya(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ce(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&p>=c.begin)){var d=f?"before":"after";return new ot(n.line,p,d)}}var h=function(e,t,r){for(var o=function(e,t){return t?new ot(n.line,l(e,1),"before"):new ot(n.line,e,"after")};e>=0&&e0==(1!=a.level),u=s?r.begin:l(r.end,-1);if(a.from<=u&&u0?c.end:l(c.begin,-1);return null==m||r>0&&m==t.text.length||!(g=h(r>0?0:i.length-1,r,u(m)))?null:g}Ia.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ia.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ia.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ia.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ia.default=y?Ia.macDefault:Ia.pcDefault;var Xa={selectAll:Zo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),W)},killLine:function(e){return Va(e,(function(t){if(t.empty()){var n=Xe(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new ot(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ot(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Xe(e.doc,i.line-1).text;a&&(i=new ot(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),ot(i.line-1,a.length-1),i,"+transpose"))}n.push(new oo(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Di(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(at((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(at(i.to(),t)>0||t.xRel<0)?xs(e,r,t,o):Cs(e,r,t,o)}function xs(e,t,n,r){var i=e.display,o=!1,u=Ni(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Zr(e)),me(i.wrapper.ownerDocument,"mouseup",u),me(i.wrapper.ownerDocument,"mousemove",c),me(i.scroller,"dragstart",f),me(i.scroller,"drop",u),o||(xe(t),r.addNew||Fo(e.doc,n,null,null,r.extend),l&&!p||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,he(i.wrapper.ownerDocument,"mouseup",u),he(i.wrapper.ownerDocument,"mousemove",c),he(i.scroller,"dragstart",f),he(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ks(e,t,n){if("char"==n)return new oo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new oo(ot(t.line,0),pt(e.doc,ot(t.line+1,0)));var r=n(e,t);return new oo(r.from,r.to)}function Cs(e,t,n,r){a&&Zr(e);var i=e.display,o=e.doc;xe(t);var s,l,u=o.sel,c=u.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?c[l]:new oo(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new oo(n,n)),n=Pr(e,t,!0,!0),l=-1;else{var f=ks(e,n,r.unit);s=r.extend?Po(s,f.anchor,f.head,r.extend):f}r.addNew?-1==l?(l=c.length,Bo(o,ao(e,c.concat([s]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"char"==r.unit&&!r.extend?(Bo(o,ao(e,c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Io(o,l,s,H):(l=0,Bo(o,new io([s],0),H),u=o.sel);var p=n;function d(t){if(0!=at(p,t))if(p=t,"rectangle"==r.unit){for(var i=[],a=e.options.tabSize,c=I(Xe(o,n.line).text,n.ch,a),f=I(Xe(o,t.line).text,t.ch,a),d=Math.min(c,f),h=Math.max(c,f),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=Xe(o,g).text,y=V(v,d,a);d==h?i.push(new oo(ot(g,y),ot(g,y))):v.length>y&&i.push(new oo(ot(g,y),ot(g,V(v,h,a))))}i.length||i.push(new oo(n,n)),Bo(o,ao(e,u.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,_=s,w=ks(e,t,r.unit),x=_.anchor;at(w.anchor,x)>0?(b=w.head,x=ct(_.from(),w.anchor)):(b=w.anchor,x=ut(_.to(),w.head));var k=u.ranges.slice(0);k[l]=Es(e,new oo(pt(o,x),b)),Bo(o,ao(e,k,l),H)}}var h=i.wrapper.getBoundingClientRect(),g=0;function m(t){var n=++g,a=Pr(e,t,!0,"rectangle"==r.unit);if(a)if(0!=at(a,p)){e.curOp.focus=N(),d(a);var s=ti(i,o);(a.line>=s.to||a.lineh.bottom?20:0;l&&setTimeout(Ni(e,(function(){g==n&&(i.scroller.scrollTop+=l,m(t))})),50)}}function v(t){e.state.selectingText=!1,g=1/0,t&&(xe(t),i.input.focus()),me(i.wrapper.ownerDocument,"mousemove",y),me(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Ni(e,(function(e){0!==e.buttons&&Ae(e)?m(e):v(e)})),b=Ni(e,v);e.state.selectingText=b,he(i.wrapper.ownerDocument,"mousemove",y),he(i.wrapper.ownerDocument,"mouseup",b)}function Es(e,t){var n=t.anchor,r=t.head,i=Xe(e.doc,n.line);if(0==at(n,r)&&n.sticky==r.sticky)return t;var o=pe(i);if(!o)return t;var a=ce(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,u=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ce(o,r.ch,r.sticky),f=c-a||(r.ch-n.ch)*(1==s.level?-1:1);l=c==u-1||c==u?f<0:f>0}var p=o[u+(l?-1:0)],d=l==(1==p.level),h=d?p.from:p.to,g=d?"after":"before";return n.ch==h&&n.sticky==g?t:new oo(new ot(n.line,h,g),r)}function Os(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(c){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&xe(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!_e(e,n))return Ce(t);o-=s.top-a.viewOffset;for(var l=0;l=i)return ve(e,n,e,nt(e.doc,o),e.display.gutterSpecs[l].className,t),Ce(t)}}function As(e,t){return Os(e,t,"gutterClick",!0)}function Ss(e,t){Hn(e.display,t)||js(e,t)||ye(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function js(e,t){return!!_e(e,"gutterContextMenu")&&Os(e,t,"gutterContextMenu",!1)}function Ts(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),pr(e)}ms.prototype.compare=function(e,t,n){return this.time+gs>e&&0==at(t,this.pos)&&n==this.button};var Ds={toString:function(){return"CodeMirror.Init"}},Ns={},Ls={};function Ms(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ds&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ds,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,ho(e)}),!0),n("indentUnit",2,ho,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){go(e),pr(e),qr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(ot(r,o))}r++}));for(var i=n.length-1;i>=0;i--)ia(e.doc,t,n[i],ot(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ds&&e.refresh()})),n("specialCharPlaceholder",mn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!_),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Ts(e),Xi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Ua(t),i=n!=Ds&&Ua(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Fs,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Gi(t,e.options.lineNumbers),Xi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Nr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return yi(e)}),!0),n("scrollbarStyle","native",(function(e){wi(e),yi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Gi(e.options.gutters,t),Xi(e)}),!0),n("firstLineNumber",1,Xi,!0),n("lineNumberFormatter",(function(e){return e}),Xi,!0),n("showCursorWhenSelecting",!1,Wr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Jr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Ps),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Wr,!0),n("singleCursorHeightPerLine",!0,Wr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,go,!0),n("addModeClass",!1,go,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,go,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function Ps(e,t,n){if(!t!=!(n&&n!=Ds)){var r=e.display.dragFunctions,i=t?he:me;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Fs(e){e.options.lineWrapping?(L(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(O(e.display.wrapper,"CodeMirror-wrap"),ln(e)),Mr(e),qr(e),pr(e),setTimeout((function(){return yi(e)}),100)}function qs(e,t){var n=this;if(!(this instanceof qs))return new qs(e,t);this.options=t=t?q(t):{},q(Ns,t,!1);var r=t.value;"string"==typeof r?r=new ka(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new qs.inputStyles[t.inputStyle](this),o=this.display=new Ji(e,r,i,t);for(var u in o.wrapper.CodeMirror=this,Ts(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),wi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new $,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Is(this),Da(),ki(this),this.curOp.forceUpdate=!0,bo(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Xr(n)}),20):Jr(this),Ls)Ls.hasOwnProperty(u)&&Ls[u](this,t[u],Ds);Yi(this),t.finishInit&&t.finishInit(this);for(var c=0;c<$s.length;++c)$s[c](this);Ci(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Is(e){var t=e.display;he(t.scroller,"mousedown",Ni(e,ys)),he(t.scroller,"dblclick",a&&s<11?Ni(e,(function(t){if(!ye(e,t)){var n=Pr(e,t);if(n&&!As(e,t)&&!Hn(e.display,t)){xe(t);var r=e.findWordAt(n);Fo(e.doc,r.anchor,r.head)}}})):function(t){return ye(e,t)||xe(t)}),he(t.scroller,"contextmenu",(function(t){return Ss(e,t)})),he(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Ss(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}he(t.scroller,"touchstart",(function(i){if(!ye(e,i)&&!o(i)&&!As(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),he(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),he(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Hn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!r.prev||l(r,r.prev)?new oo(a,a):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(a):new oo(ot(a.line,0),pt(e.doc,ot(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),xe(n)}i()})),he(t.scroller,"touchcancel",i),he(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(pi(e,t.scroller.scrollTop),hi(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))})),he(t.scroller,"mousewheel",(function(t){return ro(e,t)})),he(t.scroller,"DOMMouseScroll",(function(t){return ro(e,t)})),he(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||Ee(t)},over:function(t){ye(e,t)||(Aa(e,t),Ee(t))},start:function(t){return Oa(e,t)},drop:Ni(e,Ea),leave:function(t){ye(e,t)||Sa(e)}};var u=t.input.getField();he(u,"keyup",(function(t){return fs.call(e,t)})),he(u,"keydown",Ni(e,us)),he(u,"keypress",Ni(e,ps)),he(u,"focus",(function(t){return Xr(e,t)})),he(u,"blur",(function(t){return Jr(e,t)}))}qs.defaults=Ns,qs.optionHandlers=Ls;var $s=[];function Rs(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=bt(e,t).state:n="prev");var a=e.options.tabSize,s=Xe(o,t),l=I(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==B||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?I(Xe(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var f="",p=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/a);d;--d)p+=a,f+="\t";if(pa,l=Me(t),u=null;if(s&&r.ranges.length>1)if(zs&&zs.text.join("\n")==t){if(r.ranges.length%zs.text.length==0){u=[];for(var c=0;c=0;p--){var d=r.ranges[p],h=d.from(),g=d.to();d.empty()&&(n&&n>0?h=ot(h.line,h.ch-n):e.state.overwrite&&!s?g=ot(g.line,Math.min(Xe(o,g.line).text.length,g.ch+G(l).length)):s&&zs&&zs.lineWise&&zs.text.join("\n")==l.join("\n")&&(h=g=ot(h.line,0)));var m={from:h,to:g,text:u?u[p%u.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};Jo(e.doc,m),jn(e,"inputRead",e,m)}t&&!s&&Us(e,t),si(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Hs(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Di(t,(function(){return Ws(t,n,0,null,"paste")})),!0}function Us(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Rs(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Xe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Rs(e,i.head.line,"smart"));a&&jn(e,"electricInput",e,i.head.line)}}}function Vs(e){for(var t=[],n=[],r=0;rn&&(Rs(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&si(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&Io(this.doc,r,new oo(o,u[r].to()),W)}}})),getTokenAt:function(e,t){return Ct(this,e,t)},getLineTokens:function(e,t){return Ct(this,ot(e),t,!0)},getTokenTypeAt:function(e){e=pt(this.doc,e);var t,n=yt(this,Xe(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=Xe(this.doc,e)}else r=e;return mr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-an(r):0)},defaultTextHeight:function(){return jr(this.display)},defaultCharWidth:function(){return Tr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,a=(e=br(this,pt(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&ii(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Li(us),triggerOnKeyPress:Li(ps),triggerOnKeyUp:fs,triggerOnMouseDown:Li(ys),execCommand:function(e){if(Xa.hasOwnProperty(e))return Xa[e].call(null,this)},triggerElectric:Li((function(e){Us(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=pt(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&Mr(this),ve(this,"refresh",this)})),swapDoc:Li((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),bo(this,e),pr(this),this.display.input.reset(),li(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,jn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},we(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function Zs(e,t,n,r,i){var o=t,a=n,s=Xe(e,t.line),l=i&&"rtl"==e.direction?-n:n;function u(){var n=t.line+l;return!(n=e.first+e.size)&&(t=new ot(n,t.ch,t.sticky),s=Xe(e,n))}function c(o){var a;if("codepoint"==r){var c=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(c))a=null;else{var f=n>0?c>=55296&&c<56320:c>=56320&&c<57343;a=new ot(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(f?2:1))),-n)}}else a=i?Za(e.cm,s,t,n):Ya(s,t,n);if(null==a){if(o||!u())return!1;t=Ga(i,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var f=null,p="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||c(!h);h=!1){var g=s.text.charAt(t.ch)||"\n",m=ne(g,d)?"w":p&&"\n"==g?"n":!p||/\s/.test(g)?null:"p";if(!p||h||m||(m="s"),f&&f!=m){n<0&&(n=1,c(),t.sticky="after");break}if(m&&(f=m),n>0&&!c(!h))break}var v=Yo(e,t,o,a,!0);return st(o,v)&&(v.hitSide=!0),v}function Xs(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*jr(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=xr(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Js=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new $,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Qs(e,t){var n=tr(e,t.line);if(!n||n.hidden)return null;var r=Xe(e.doc,t.line),i=Jn(n,r,t.line),o=pe(r,e.doc.direction),a="left";o&&(a=ce(o,t.ch)%2?"right":"left");var s=ar(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function el(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function tl(e,t){return t&&(e.bad=!0),e}function nl(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function u(e){return function(t){return t.id==e}}function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function f(e){e&&(c(),o+=e)}function p(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void f(n);var o,d=t.getAttribute("cm-marker");if(d){var h=e.findMarks(ot(r,0),ot(i+1,0),u(+d));return void(h.length&&(o=h[0].find(0))&&f(Je(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&c();for(var m=0;m=t.display.viewTo||o.line=t.display.viewFrom&&Qs(t,i)||{node:l[0].measure.map[2],offset:0},c=o.liner.firstLine()&&(a=ot(a.line-1,Xe(r.doc,a.line-1).length)),s.ch==Xe(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=Fr(r,a.line))?(t=tt(i.view[0].line),n=i.view[0].node):(t=tt(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,u,c=Fr(r,s.line);if(c==i.view.length-1?(l=i.viewTo-1,u=i.lineDiv.lastChild):(l=tt(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(nl(r,n,u,t,l)),p=Je(r.doc,ot(t,0),ot(l,Xe(r.doc,l).text.length));f.length>1&&p.length>1;)if(G(f)==G(p))f.pop(),p.pop(),l--;else{if(f[0]!=p[0])break;f.shift(),p.shift(),t++}for(var d=0,h=0,g=f[0],m=p[0],v=Math.min(g.length,m.length);da.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)d--,h++;f[f.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var w=ot(t,d),x=ot(l,p.length?G(p).length-h:0);return f.length>1||f[0]||at(w,x)?(ia(r.doc,f,w,x,"+input"),!0):void 0},Js.prototype.ensurePolled=function(){this.forceCompositionEnd()},Js.prototype.reset=function(){this.forceCompositionEnd()},Js.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Js.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Js.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Di(this.cm,(function(){return qr(e.cm)}))},Js.prototype.setUneditable=function(e){e.contentEditable="false"},Js.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ni(this.cm,Ws)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Js.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Js.prototype.onContextMenu=function(){},Js.prototype.resetPosition=function(){},Js.prototype.needsContentAttribute=!0;var ol=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new $,this.hasSelection=!1,this.composing=null};function al(e,t){if((t=t?q(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=N();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(he(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(Le){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(me(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=qs((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s}function sl(e){e.off=me,e.on=he,e.wheelEventPixels=no,e.Doc=ka,e.splitLines=Me,e.countColumn=I,e.findColumn=V,e.isWordChar=te,e.Pass=B,e.signal=ve,e.Line=un,e.changeEnd=lo,e.scrollbarModel=_i,e.Pos=ot,e.cmpPos=at,e.modes=$e,e.mimeModes=Re,e.resolveMode=We,e.getMode=He,e.modeExtensions=Ue,e.extendMode=Ve,e.copyState=Ke,e.startState=Ge,e.innerMode=Ye,e.commands=Xa,e.keyMap=Ia,e.keyName=Ha,e.isModifierKey=Ba,e.lookupKey=za,e.normalizeKeyMap=Ra,e.StringStream=Ze,e.SharedTextMarker=va,e.TextMarker=ga,e.LineWidget=fa,e.e_preventDefault=xe,e.e_stopPropagation=ke,e.e_stop=Ee,e.addClass=L,e.contains=D,e.rmClass=O,e.keyNames=Ma}ol.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ye(r,e)){if(r.somethingSelected())Bs({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Vs(r);Bs({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,W):(n.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),he(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),he(i,"paste",(function(e){ye(r,e)||Hs(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),he(i,"cut",o),he(i,"copy",o),he(e.scroller,"paste",(function(t){if(!Hn(e,t)&&!ye(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),he(e.lineSpace,"selectstart",(function(t){Hn(e,t)||xe(t)})),he(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),he(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},ol.prototype.createField=function(e){this.wrapper=Ys(),this.textarea=this.wrapper.firstChild},ol.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ol.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Hr(e);if(e.options.moveInputWithCursor){var i=br(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},ol.prototype.showSelection=function(e){var t=this.cm.display;S(t.cursorDiv,e.cursors),S(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ol.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&P(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},ol.prototype.getField=function(){return this.textarea},ol.prototype.supportsTouch=function(){return!1},ol.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||N()!=this.textarea))try{this.textarea.focus()}catch(Le){}},ol.prototype.blur=function(){this.textarea.blur()},ol.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ol.prototype.receivedFocus=function(){this.slowPoll()},ol.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},ol.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},ol.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Pe(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ol.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ol.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},ol.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Pr(n,e),u=r.scroller.scrollTop;if(o&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Ni(n,Bo)(n.doc,so(o),W);var c,p=i.style.cssText,d=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(c=window.scrollY),r.input.focus(),l&&window.scrollTo(null,c),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&m(),k){Ee(e);var g=function(){me(window,"mouseup",g),setTimeout(v,20)};he(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=p,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!a||a&&s<9)&&m();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Ni(n,Zo)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},ol.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},ol.prototype.setUneditable=function(){},ol.prototype.needsContentAttribute=!1,Ms(qs),Gs(qs);var ll="iter insert remove copy getEditor constructor".split(" ");for(var ul in ka.prototype)ka.prototype.hasOwnProperty(ul)&&R(ll,ul)<0&&(qs.prototype[ul]=function(e){return function(){return e.apply(this.doc,arguments)}}(ka.prototype[ul]));return we(ka),qs.inputStyles={textarea:ol,contenteditable:Js},qs.defineMode=function(e){qs.defaults.mode||"null"==e||(qs.defaults.mode=e),ze.apply(this,arguments)},qs.defineMIME=Be,qs.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),qs.defineMIME("text/plain","null"),qs.defineExtension=function(e,t){qs.prototype[e]=t},qs.defineDocExtension=function(e,t){ka.prototype[e]=t},qs.fromTextArea=al,sl(qs),qs.version="5.60.0",qs}()}));Un((function(e,t){!function(e){function t(e){for(var t;null!=(t=e.next());)if("`"==t&&!e.eat("`"))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function n(e){for(var t;null!=(t=e.next());)if('"'==t&&!e.eat('"'))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function r(e){return e.eat("@")&&(e.match("session."),e.match("local."),e.match("global.")),e.eat("'")?(e.match(/^.*'/),"variable-2"):e.eat('"')?(e.match(/^.*"/),"variable-2"):e.eat("`")?(e.match(/^.*`/),"variable-2"):e.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function i(e){return e.eat("N")?"atom":e.match(/^[a-zA-Z.#!?]/)?"variable-2":null}e.defineMode("sql",(function(t,n){var r=n.client||{},i=n.atoms||{false:!0,true:!0,null:!0},l=n.builtin||a(s),u=n.keywords||a(o),c=n.operatorChars||/^[*+\-%<>!=&|~^\/]/,f=n.support||{},p=n.hooks||{},d=n.dateSQL||{date:!0,time:!0,timestamp:!0},h=!1!==n.backslashStringEscapes,g=n.brackets||/^[\{}\(\)\[\]]/,m=n.punctuation||/^[;.,:]/;function v(e,t){var n=e.next();if(p[n]){var o=p[n](e,t);if(!1!==o)return o}if(f.hexNumber&&("0"==n&&e.match(/^[xX][0-9a-fA-F]+/)||("x"==n||"X"==n)&&e.match(/^'[0-9a-fA-F]+'/)))return"number";if(f.binaryNumber&&(("b"==n||"B"==n)&&e.match(/^'[01]+'/)||"0"==n&&e.match(/^b[01]+/)))return"number";if(n.charCodeAt(0)>47&&n.charCodeAt(0)<58)return e.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),f.decimallessFloat&&e.match(/^\.(?!\.)/),"number";if("?"==n&&(e.eatSpace()||e.eol()||e.eat(";")))return"variable-3";if("'"==n||'"'==n&&f.doubleQuote)return t.tokenize=y(n),t.tokenize(e,t);if((f.nCharCast&&("n"==n||"N"==n)||f.charsetCast&&"_"==n&&e.match(/[a-z][a-z0-9]*/i))&&("'"==e.peek()||'"'==e.peek()))return"keyword";if(f.escapeConstant&&("e"==n||"E"==n)&&("'"==e.peek()||'"'==e.peek()&&f.doubleQuote))return t.tokenize=function(e,t){return(t.tokenize=y(e.next(),!0))(e,t)},"keyword";if(f.commentSlashSlash&&"/"==n&&e.eat("/"))return e.skipToEnd(),"comment";if(f.commentHash&&"#"==n||"-"==n&&e.eat("-")&&(!f.commentSpaceRequired||e.eat(" ")))return e.skipToEnd(),"comment";if("/"==n&&e.eat("*"))return t.tokenize=b(1),t.tokenize(e,t);if("."!=n){if(c.test(n))return e.eatWhile(c),"operator";if(g.test(n))return"bracket";if(m.test(n))return e.eatWhile(m),"punctuation";if("{"==n&&(e.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||e.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";e.eatWhile(/^[_\w\d]/);var a=e.current().toLowerCase();return d.hasOwnProperty(a)&&(e.match(/^( )+'[^']*'/)||e.match(/^( )+"[^"]*"/))?"number":i.hasOwnProperty(a)?"atom":l.hasOwnProperty(a)?"builtin":u.hasOwnProperty(a)?"keyword":r.hasOwnProperty(a)?"string-2":null}return f.zerolessFloat&&e.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":e.match(/^\.+/)?null:f.ODBCdotTable&&e.match(/^[\w\d_$#]+/)?"variable-2":void 0}function y(e,t){return function(n,r){for(var i,o=!1;null!=(i=n.next());){if(i==e&&!o){r.tokenize=v;break}o=(h||t)&&!o&&"\\"==i}return"string"}}function b(e){return function(t,n){var r=t.match(/^.*?(\/\*|\*\/)/);return r?"/*"==r[1]?n.tokenize=b(e+1):n.tokenize=e>1?b(e-1):v:t.skipToEnd(),"comment"}}function _(e,t,n){t.context={prev:t.context,indent:e.indentation(),col:e.column(),type:n}}function w(e){e.indent=e.context.indent,e.context=e.context.prev}return{startState:function(){return{tokenize:v,context:null}},token:function(e,t){if(e.sol()&&t.context&&null==t.context.align&&(t.context.align=!1),t.tokenize==v&&e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"==n)return n;t.context&&null==t.context.align&&(t.context.align=!0);var r=e.current();return"("==r?_(e,t,")"):"["==r?_(e,t,"]"):t.context&&t.context.type==r&&w(t),n},indent:function(n,r){var i=n.context;if(!i)return e.Pass;var o=r.charAt(0)==i.type;return i.align?i.col+(o?0:1):i.indent+(o?0:t.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:f.commentSlashSlash?"//":f.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}}));var o="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function a(e){for(var t={},n=e.split(" "),r=0;r!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:a("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":r}}),e.defineMIME("text/x-mysql",{name:"sql",client:a("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:a(o+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:a("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:a("date time timestamp"),support:a("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":r,"`":t,"\\":i}}),e.defineMIME("text/x-mariadb",{name:"sql",client:a("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:a(o+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:a("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:a("date time timestamp"),support:a("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":r,"`":t,"\\":i}}),e.defineMIME("text/x-sqlite",{name:"sql",client:a("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:a(o+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:a("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:a("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:a("date time timestamp datetime"),support:a("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":r,":":r,"?":r,$:r,'"':n,"`":t}}),e.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:a("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:a("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:a("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:a("commentSlashSlash decimallessFloat"),hooks:{}}),e.defineMIME("text/x-plsql",{name:"sql",client:a("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:a("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:a("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:a("date time timestamp"),support:a("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-hive",{name:"sql",keywords:a("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:a("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:a("date timestamp"),support:a("ODBCdotTable doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-pgsql",{name:"sql",client:a("source"),keywords:a(o+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:a("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:a("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:a("date time timestamp"),support:a("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),e.defineMIME("text/x-gql",{name:"sql",keywords:a("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:a("false true"),builtin:a("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),e.defineMIME("text/x-gpsql",{name:"sql",client:a("source"),keywords:a("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:a("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:a("date time timestamp"),support:a("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),e.defineMIME("text/x-sparksql",{name:"sql",keywords:a("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:a("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:a("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:a("date time timestamp"),support:a("ODBCdotTable doubleQuote zerolessFloat")}),e.defineMIME("text/x-esper",{name:"sql",client:a("source"),keywords:a("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:a("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:a("time"),support:a("decimallessFloat zerolessFloat binaryNumber hexNumber")})}(Uu)})),Un((function(e,t){!function(e){function t(e){for(var t={},n=0;n*\/]/.test(n)?x(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?x(null,n):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=E),x("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),x("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):e.match(/^\w+-/)?x("meta","meta"):void 0}function C(e){return function(t,n){for(var r,i=!1;null!=(r=t.next());){if(r==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==r}return(r==e||!i&&")"!=e)&&(n.tokenize=null),x("string","string")}}function E(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=C(")"),x(null,"(")}function O(e,t,n){this.type=e,this.indent=t,this.prev=n}function A(e,t,n,r){return e.context=new O(n,t.indentation()+(!1===r?0:a),e.context),n}function S(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function j(e,t,n){return N[n.context.type](e,t,n)}function T(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return j(e,t,n)}function D(e){var t=e.current().toLowerCase();o=v.hasOwnProperty(t)?"atom":m.hasOwnProperty(t)?"keyword":"variable"}var N={top:function(e,t,n){if("{"==e)return A(n,t,"block");if("}"==e&&n.context.prev)return S(n);if(_&&/@component/i.test(e))return A(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return A(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return A(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return A(n,t,"at");if("hash"==e)o="builtin";else if("word"==e)o="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return A(n,t,"interpolation");if(":"==e)return"pseudo";if(y&&"("==e)return A(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return p.hasOwnProperty(r)?(o="property","maybeprop"):d.hasOwnProperty(r)?(o=w?"string-2":"property","maybeprop"):y?(o=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?N.top(e,t,n):(o="error","block")},maybeprop:function(e,t,n){return":"==e?A(n,t,"prop"):j(e,t,n)},prop:function(e,t,n){if(";"==e)return S(n);if("{"==e&&y)return A(n,t,"propBlock");if("}"==e||"{"==e)return T(e,t,n);if("("==e)return A(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)D(t);else if("interpolation"==e)return A(n,t,"interpolation")}else o+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?S(n):"word"==e?(o="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?T(e,t,n):")"==e?S(n):"("==e?A(n,t,"parens"):"interpolation"==e?A(n,t,"interpolation"):("word"==e&&D(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(o="variable-3",n.context.type):j(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&l.hasOwnProperty(t.current())?(o="tag",n.context.type):N.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return A(n,t,"atBlock_parens");if("}"==e||";"==e)return T(e,t,n);if("{"==e)return S(n)&&A(n,t,y?"block":"top");if("interpolation"==e)return A(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();o="only"==r||"not"==r||"and"==r||"or"==r?"keyword":u.hasOwnProperty(r)?"attribute":c.hasOwnProperty(r)?"property":f.hasOwnProperty(r)?"keyword":p.hasOwnProperty(r)?"property":d.hasOwnProperty(r)?w?"string-2":"property":v.hasOwnProperty(r)?"atom":m.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?T(e,t,n):"{"==e?S(n)&&A(n,t,y?"block":"top",!1):("word"==e&&(o="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?S(n):"{"==e||"}"==e?T(e,t,n,2):N.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?A(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):j(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,S(n)):"word"==e?(o="@font-face"==n.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!g.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(o="variable","keyframes"):"{"==e?A(n,t,"top"):j(e,t,n)},at:function(e,t,n){return";"==e?S(n):"{"==e||"}"==e?T(e,t,n):("word"==e?o="tag":"hash"==e&&(o="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?S(n):"{"==e||";"==e?T(e,t,n):("word"==e?o="variable":"variable"!=e&&"("!=e&&")"!=e&&(o="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new O(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||k)(e,t);return n&&"object"==typeof n&&(i=n[1],n=n[0]),o=n,"comment"!=i&&(t.state=N[t.state](i,e,t)),o},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-a)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],s=t(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],u=t(l),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],f=t(c),p=["border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],d=t(p),h=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),m=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v=t(m),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=t(y),_=n.concat(i).concat(a).concat(l).concat(c).concat(p).concat(m).concat(y);function w(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.registerHelper("hintWords","css",_),e.defineMIME("text/css",{documentTypes:r,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:d,fontProperties:h,counterDescriptors:g,colorKeywords:v,valueKeywords:b,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w,w(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:d,colorKeywords:v,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w,w(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:d,colorKeywords:v,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w,w(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:o,mediaFeatures:s,propertyKeywords:f,nonStandardPropertyKeywords:d,fontProperties:h,counterDescriptors:g,colorKeywords:v,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w,w(e,t))}},name:"css",helperType:"gss"})}(Uu)}));Un((function(e,t){!function(e){function t(e,t){if(!e.hasOwnProperty(t))throw new Error("Undefined state "+t+" in simple mode")}function n(e,t){if(!e)return/(?:)/;var n="";return e instanceof RegExp?(e.ignoreCase&&(n="i"),e=e.source):e=String(e),new RegExp((!1===t?"":"^")+"(?:"+e+")",n)}function r(e){if(!e)return null;if(e.apply)return e;if("string"==typeof e)return e.replace(/\./g," ");for(var t=[],n=0;n2&&c.token&&"string"!=typeof c.token){for(var d=2;d-1)return e.Pass;var a=r.indent.length-1,s=t[r.state];e:for(;;){for(var u=0;u-1?i+t.length:i}var o=t.exec(n?e.slice(n):e);return o?o.index+n+(r?o[0].length:0):-1}return{startState:function(){return{outer:n.startState(e),innerActive:null,inner:null,startingInner:!1}},copyState:function(t){return{outer:n.copyState(e,t.outer),innerActive:t.innerActive,inner:t.innerActive&&n.copyState(t.innerActive.mode,t.inner),startingInner:t.startingInner}},token:function(i,o){if(o.innerActive){var a=o.innerActive;if(u=i.string,!a.close&&i.sol())return o.innerActive=o.inner=null,this.token(i,o);if((f=a.close&&!o.startingInner?r(u,a.close,i.pos,a.parseDelimiters):-1)==i.pos&&!a.parseDelimiters)return i.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";f>-1&&(i.string=u.slice(0,f));var s=a.mode.token(i,o.inner);return f>-1?i.string=u:i.pos>i.start&&(o.startingInner=!1),f==i.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(s=s?s+" "+a.innerStyle:a.innerStyle),s}for(var l=1/0,u=i.string,c=0;c|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),n.defineMode("handlebars",(function(e,t){var r=n.getMode(e,"handlebars-tags");return t&&t.base?n.multiplexingMode(n.getMode(e,t.base),{open:"{{",close:/\}\}\}?/,mode:r,parseDelimiters:!0}):r})),n.defineMIME("text/x-handlebars-template","handlebars")})),Un((function(e,t){var n;(n=Uu).defineMode("javascript",(function(e,t){var r,i,o=e.indentUnit,a=t.statementIndent,s=t.jsonld,l=t.json||s,u=t.typescript,c=t.wordCharacters||/[\w$\xa1-\uffff]/,f=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),p=/[+\-*&%=<>!?|~^@]/,d=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function h(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function g(e,t,n){return r=e,i=n,t}function m(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=v(n),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g("number","number");if("."==n&&e.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return g(n);if("="==n&&e.eat(">"))return g("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g("number","number");if("/"==n)return e.eat("*")?(t.tokenize=y,y(e,t)):e.eat("/")?(e.skipToEnd(),g("comment","comment")):tt(e,t,1)?(h(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(e.eat("="),g("operator","operator",e.current()));if("`"==n)return t.tokenize=b,b(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),g("meta","meta");if("#"==n&&e.eatWhile(c))return g("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),g("comment","comment");if(p.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?g("."):g("operator","operator",e.current());if(c.test(n)){e.eatWhile(c);var r=e.current();if("."!=t.lastType){if(f.propertyIsEnumerable(r)){var i=f[r];return g(i.type,i.style,r)}if("async"==r&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",r)}return g("variable","variable",r)}}function v(e){return function(t,n){var r,i=!1;if(s&&"@"==t.peek()&&t.match(d))return n.tokenize=m,g("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=m),g("string","string")}}function y(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=m;break}r="*"==n}return g("comment","comment")}function b(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=m;break}r=!r&&"\\"==n}return g("quasi","string-2",e.current())}var _="([{}])";function w(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(u){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=e.string.charAt(a),l=_.indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(c.test(s))o=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==s&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(t.fatArrowAt=a)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function k(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function C(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}function E(e,t,n,r,i){var o=e.cc;for(O.state=e,O.stream=i,O.marked=null,O.cc=o,O.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():l?H:B)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return O.marked?O.marked:"variable"==n&&C(e,r)?"variable-2":t}}var O={state:null,column:null,marked:null,cc:null};function A(){for(var e=arguments.length-1;e>=0;e--)O.cc.push(arguments[e])}function S(){return A.apply(null,arguments),!0}function j(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function T(e){var n=O.state;if(O.marked="def",n.context)if("var"==n.lexical.info&&n.context&&n.context.block){var r=D(e,n.context);if(null!=r)return void(n.context=r)}else if(!j(e,n.localVars))return void(n.localVars=new M(e,n.localVars));t.globalVars&&!j(e,n.globalVars)&&(n.globalVars=new M(e,n.globalVars))}function D(e,t){if(t){if(t.block){var n=D(e,t.prev);return n?n==t.prev?t:new L(n,t.vars,!0):null}return j(e,t.vars)?t:new L(t.prev,new M(e,t.vars),!1)}return null}function N(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function L(e,t,n){this.prev=e,this.vars=t,this.block=n}function M(e,t){this.name=e,this.next=t}var P=new M("this",new M("arguments",null));function F(){O.state.context=new L(O.state.context,O.state.localVars,!1),O.state.localVars=P}function q(){O.state.context=new L(O.state.context,O.state.localVars,!0),O.state.localVars=null}function I(){O.state.localVars=O.state.context.vars,O.state.context=O.state.context.prev}function $(e,t){var n=function(){var n=O.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new k(r,O.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function R(){var e=O.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function z(e){function t(n){return n==e?S():";"==e||"}"==n||")"==n||"]"==n?A():S(t)}return t}function B(e,t){return"var"==e?S($("vardef",t),Ee,z(";"),R):"keyword a"==e?S($("form"),V,B,R):"keyword b"==e?S($("form"),B,R):"keyword d"==e?O.stream.match(/^\s*$/,!1)?S():S($("stat"),Y,z(";"),R):"debugger"==e?S(z(";")):"{"==e?S($("}"),q,fe,R,I):";"==e?S():"if"==e?("else"==O.state.lexical.info&&O.state.cc[O.state.cc.length-1]==R&&O.state.cc.pop()(),S($("form"),V,B,R,De)):"function"==e?S(Pe):"for"==e?S($("form"),Ne,B,R):"class"==e||u&&"interface"==t?(O.marked="keyword",S($("form","class"==e?e:t),Re,R)):"variable"==e?u&&"declare"==t?(O.marked="keyword",S(B)):u&&("module"==t||"enum"==t||"type"==t)&&O.stream.match(/^\s*\w/,!1)?(O.marked="keyword","enum"==t?S(Je):"type"==t?S(qe,z("operator"),me,z(";")):S($("form"),Oe,z("{"),$("}"),fe,R,R)):u&&"namespace"==t?(O.marked="keyword",S($("form"),H,B,R)):u&&"abstract"==t?(O.marked="keyword",S(B)):S($("stat"),ie):"switch"==e?S($("form"),V,z("{"),$("}","switch"),q,fe,R,R,I):"case"==e?S(H,z(":")):"default"==e?S(z(":")):"catch"==e?S($("form"),F,W,B,R,I):"export"==e?S($("stat"),He,R):"import"==e?S($("stat"),Ve,R):"async"==e?S(B):"@"==t?S(H,B):A($("stat"),H,z(";"),R)}function W(e){if("("==e)return S(Ie,z(")"))}function H(e,t){return K(e,t,!1)}function U(e,t){return K(e,t,!0)}function V(e){return"("!=e?A():S($(")"),Y,z(")"),R)}function K(e,t,n){if(O.state.fatArrowAt==O.stream.start){var r=n?ee:Q;if("("==e)return S(F,$(")"),ue(Ie,")"),R,z("=>"),r,I);if("variable"==e)return A(F,Oe,z("=>"),r,I)}var i=n?Z:G;return x.hasOwnProperty(e)?S(i):"function"==e?S(Pe,i):"class"==e||u&&"interface"==t?(O.marked="keyword",S($("form"),$e,R)):"keyword c"==e||"async"==e?S(n?U:H):"("==e?S($(")"),Y,z(")"),R,i):"operator"==e||"spread"==e?S(n?U:H):"["==e?S($("]"),Xe,R,i):"{"==e?ce(ae,"}",null,i):"quasi"==e?A(X,i):"new"==e?S(te(n)):S()}function Y(e){return e.match(/[;\}\)\],]/)?A():A(H)}function G(e,t){return","==e?S(Y):Z(e,t,!1)}function Z(e,t,n){var r=0==n?G:Z,i=0==n?H:U;return"=>"==e?S(F,n?ee:Q,I):"operator"==e?/\+\+|--/.test(t)||u&&"!"==t?S(r):u&&"<"==t&&O.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?S($(">"),ue(me,">"),R,r):"?"==t?S(H,z(":"),i):S(i):"quasi"==e?A(X,r):";"!=e?"("==e?ce(U,")","call",r):"."==e?S(oe,r):"["==e?S($("]"),Y,z("]"),R,r):u&&"as"==t?(O.marked="keyword",S(me,r)):"regexp"==e?(O.state.lastType=O.marked="operator",O.stream.backUp(O.stream.pos-O.stream.start-1),S(i)):void 0:void 0}function X(e,t){return"quasi"!=e?A():"${"!=t.slice(t.length-2)?S(X):S(H,J)}function J(e){if("}"==e)return O.marked="string-2",O.state.tokenize=b,S(X)}function Q(e){return w(O.stream,O.state),A("{"==e?B:H)}function ee(e){return w(O.stream,O.state),A("{"==e?B:U)}function te(e){return function(t){return"."==t?S(e?re:ne):"variable"==t&&u?S(xe,e?Z:G):A(e?U:H)}}function ne(e,t){if("target"==t)return O.marked="keyword",S(G)}function re(e,t){if("target"==t)return O.marked="keyword",S(Z)}function ie(e){return":"==e?S(R,B):A(G,z(";"),R)}function oe(e){if("variable"==e)return O.marked="property",S()}function ae(e,t){return"async"==e?(O.marked="property",S(ae)):"variable"==e||"keyword"==O.style?(O.marked="property","get"==t||"set"==t?S(se):(u&&O.state.fatArrowAt==O.stream.start&&(n=O.stream.match(/^\s*:\s*/,!1))&&(O.state.fatArrowAt=O.stream.pos+n[0].length),S(le))):"number"==e||"string"==e?(O.marked=s?"property":O.style+" property",S(le)):"jsonld-keyword"==e?S(le):u&&N(t)?(O.marked="keyword",S(ae)):"["==e?S(H,pe,z("]"),le):"spread"==e?S(U,le):"*"==t?(O.marked="keyword",S(ae)):":"==e?A(le):void 0;var n}function se(e){return"variable"!=e?A(le):(O.marked="property",S(Pe))}function le(e){return":"==e?S(U):"("==e?A(Pe):void 0}function ue(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=O.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),S((function(n,r){return n==t||r==t?A():A(e)}),r)}return i==t||o==t?S():n&&n.indexOf(";")>-1?A(e):S(z(t))}return function(n,i){return n==t||i==t?S():A(e,r)}}function ce(e,t,n){for(var r=3;r"),me):void 0}function ve(e){if("=>"==e)return S(me)}function ye(e){return e.match(/[\}\)\]]/)?S():","==e||";"==e?S(ye):A(be,ye)}function be(e,t){return"variable"==e||"keyword"==O.style?(O.marked="property",S(be)):"?"==t||"number"==e||"string"==e?S(be):":"==e?S(me):"["==e?S(z("variable"),de,z("]"),be):"("==e?A(Fe,be):e.match(/[;\}\)\],]/)?void 0:S()}function _e(e,t){return"variable"==e&&O.stream.match(/^\s*[?:]/,!1)||"?"==t?S(_e):":"==e?S(me):"spread"==e?S(_e):A(me)}function we(e,t){return"<"==t?S($(">"),ue(me,">"),R,we):"|"==t||"."==e||"&"==t?S(me):"["==e?S(me,z("]"),we):"extends"==t||"implements"==t?(O.marked="keyword",S(me)):"?"==t?S(me,z(":"),me):void 0}function xe(e,t){if("<"==t)return S($(">"),ue(me,">"),R,we)}function ke(){return A(me,Ce)}function Ce(e,t){if("="==t)return S(me)}function Ee(e,t){return"enum"==t?(O.marked="keyword",S(Je)):A(Oe,pe,je,Te)}function Oe(e,t){return u&&N(t)?(O.marked="keyword",S(Oe)):"variable"==e?(T(t),S()):"spread"==e?S(Oe):"["==e?ce(Se,"]"):"{"==e?ce(Ae,"}"):void 0}function Ae(e,t){return"variable"!=e||O.stream.match(/^\s*:/,!1)?("variable"==e&&(O.marked="property"),"spread"==e?S(Oe):"}"==e?A():"["==e?S(H,z("]"),z(":"),Ae):S(z(":"),Oe,je)):(T(t),S(je))}function Se(){return A(Oe,je)}function je(e,t){if("="==t)return S(U)}function Te(e){if(","==e)return S(Ee)}function De(e,t){if("keyword b"==e&&"else"==t)return S($("form","else"),B,R)}function Ne(e,t){return"await"==t?S(Ne):"("==e?S($(")"),Le,R):void 0}function Le(e){return"var"==e?S(Ee,Me):"variable"==e?S(Me):A(Me)}function Me(e,t){return")"==e?S():";"==e?S(Me):"in"==t||"of"==t?(O.marked="keyword",S(H,Me)):A(H,Me)}function Pe(e,t){return"*"==t?(O.marked="keyword",S(Pe)):"variable"==e?(T(t),S(Pe)):"("==e?S(F,$(")"),ue(Ie,")"),R,he,B,I):u&&"<"==t?S($(">"),ue(ke,">"),R,Pe):void 0}function Fe(e,t){return"*"==t?(O.marked="keyword",S(Fe)):"variable"==e?(T(t),S(Fe)):"("==e?S(F,$(")"),ue(Ie,")"),R,he,I):u&&"<"==t?S($(">"),ue(ke,">"),R,Fe):void 0}function qe(e,t){return"keyword"==e||"variable"==e?(O.marked="type",S(qe)):"<"==t?S($(">"),ue(ke,">"),R):void 0}function Ie(e,t){return"@"==t&&S(H,Ie),"spread"==e?S(Ie):u&&N(t)?(O.marked="keyword",S(Ie)):u&&"this"==e?S(pe,je):A(Oe,pe,je)}function $e(e,t){return"variable"==e?Re(e,t):ze(e,t)}function Re(e,t){if("variable"==e)return T(t),S(ze)}function ze(e,t){return"<"==t?S($(">"),ue(ke,">"),R,ze):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(O.marked="keyword"),S(u?me:H,ze)):"{"==e?S($("}"),Be,R):void 0}function Be(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||u&&N(t))&&O.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(O.marked="keyword",S(Be)):"variable"==e||"keyword"==O.style?(O.marked="property",S(We,Be)):"number"==e||"string"==e?S(We,Be):"["==e?S(H,pe,z("]"),We,Be):"*"==t?(O.marked="keyword",S(Be)):u&&"("==e?A(Fe,Be):";"==e||","==e?S(Be):"}"==e?S():"@"==t?S(H,Be):void 0}function We(e,t){if("?"==t)return S(We);if(":"==e)return S(me,je);if("="==t)return S(U);var n=O.state.lexical.prev;return A(n&&"interface"==n.info?Fe:Pe)}function He(e,t){return"*"==t?(O.marked="keyword",S(Ze,z(";"))):"default"==t?(O.marked="keyword",S(H,z(";"))):"{"==e?S(ue(Ue,"}"),Ze,z(";")):A(B)}function Ue(e,t){return"as"==t?(O.marked="keyword",S(z("variable"))):"variable"==e?A(U,Ue):void 0}function Ve(e){return"string"==e?S():"("==e?A(H):"."==e?A(G):A(Ke,Ye,Ze)}function Ke(e,t){return"{"==e?ce(Ke,"}"):("variable"==e&&T(t),"*"==t&&(O.marked="keyword"),S(Ge))}function Ye(e){if(","==e)return S(Ke,Ye)}function Ge(e,t){if("as"==t)return O.marked="keyword",S(Ke)}function Ze(e,t){if("from"==t)return O.marked="keyword",S(H)}function Xe(e){return"]"==e?S():A(ue(U,"]"))}function Je(){return A($("form"),Oe,z("{"),$("}"),ue(Qe,"}"),R,R)}function Qe(){return A(Oe,je)}function et(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function tt(e,t,n){return t.tokenize==m&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return I.lex=!0,R.lex=!0,{startState:function(e){var n={tokenize:m,lastType:"sof",cc:[],lexical:new k((e||0)-o,0,"block",!1),localVars:t.localVars,context:t.localVars&&new L(null,null,!1),indented:e||0};return t.globalVars&&"object"==typeof t.globalVars&&(n.globalVars=t.globalVars),n},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),w(e,t)),t.tokenize!=y&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",E(t,n,r,i,e))},indent:function(e,r){if(e.tokenize==y||e.tokenize==b)return n.Pass;if(e.tokenize!=m)return 0;var i,s=r&&r.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(r))for(var u=e.cc.length-1;u>=0;--u){var c=e.cc[u];if(c==R)l=l.prev;else if(c!=De)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=e.cc[e.cc.length-1])&&(i==G||i==Z)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var f=l.type,p=s==f;return"vardef"==f?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==f&&"{"==s?l.indented:"form"==f?l.indented+o:"stat"==f?l.indented+(et(e,r)?a||o:0):"switch"!=l.info||p||0==t.doubleIndentSwitch?l.align?l.column+(p?0:1):l.indented+(p?0:o):l.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:tt,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=H&&t!=U||e.cc.pop()}}})),n.registerHelper("wordChars","javascript",/[\w$]/),n.defineMIME("text/javascript","javascript"),n.defineMIME("text/ecmascript","javascript"),n.defineMIME("application/javascript","javascript"),n.defineMIME("application/x-javascript","javascript"),n.defineMIME("application/ecmascript","javascript"),n.defineMIME("application/json",{name:"javascript",json:!0}),n.defineMIME("application/x-json",{name:"javascript",json:!0}),n.defineMIME("application/manifest+json",{name:"javascript",json:!0}),n.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),n.defineMIME("text/typescript",{name:"javascript",typescript:!0}),n.defineMIME("application/typescript",{name:"javascript",typescript:!0})})),Un((function(e,t){!function(e){var t="CodeMirror-hint",n="CodeMirror-hint-active";function r(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",(function(t){t=a(this,this.getCursor("start"),t);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;ip.clientHeight+1;if(setTimeout((function(){D=a.getScrollInfo()})),N.bottom-T>0){var M=N.bottom-N.top;if(_.top-(_.bottom-N.top)-M>0)p.style.top=(x=_.top-M-E)+"px",k=!1;else if(M>T){p.style.height=T-5+"px",p.style.top=(x=_.bottom-N.top-E)+"px";var P=a.getCursor();i.from.ch!=P.ch&&(_=a.cursorCoords(P),p.style.left=(w=_.left-C)+"px",N=p.getBoundingClientRect())}}var F,q=N.right-j;if(q>0&&(N.right-N.left>j&&(p.style.width=j-5+"px",q-=N.right-N.left-j),p.style.left=(w=_.left-q-C)+"px"),L)for(var I=p.firstChild;I;I=I.nextSibling)I.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=l(r,{moveFocus:function(e,t){o.changeActive(o.selectedHint+e,t)},setFocus:function(e){o.changeActive(e)},menuSize:function(){return o.screenAmount()},length:h.length,close:function(){r.close()},pick:function(){o.pick()},data:i})),r.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){F=setTimeout((function(){r.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(F)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),t=a.getWrapperElement().getBoundingClientRect(),n=x+D.top-e.top,i=n-(f.pageYOffset||(c.documentElement||c.body).scrollTop);if(k||(i+=p.offsetHeight),i<=t.top||i>=t.bottom)return r.close();p.style.top=n+"px",p.style.left=w+D.left-e.left+"px"}),e.on(p,"dblclick",(function(e){var t=u(p,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),o.pick())})),e.on(p,"click",(function(e){var t=u(p,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),r.options.completeOnSingleClick&&o.pick())})),e.on(p,"mousedown",(function(){setTimeout((function(){a.focus()}),20)}));var $=this.getSelectedHintRange();return 0===$.from&&0===$.to||this.scrollToActive(),e.signal(i,"select",h[this.selectedHint],p.childNodes[this.selectedHint]),!0}function f(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r0?t(e):o(i+1)}))}o(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}r.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],i=this;this.cm.operation((function(){r.hint?r.hint(i.cm,t,r):i.cm.replaceRange(s(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),i.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(o(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch=this.data.list.length?t=r?this.data.list.length-1:0:t<0&&(t=r?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+n,"")),(i=this.hints.childNodes[this.selectedHint=t]).className+=" "+n,this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:d}),e.registerHelper("hint","fromList",(function(t,n){var r,i=t.getCursor(),o=t.getTokenAt(i),a=e.Pos(i.line,o.start),s=i;o.start,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(Uu)}));function Vu(e){let t;return{c(){t=P("div"),this.h()},l(e){t=Y(e,"DIV",{class:!0,style:!0}),K(t).forEach(L),this.h()},h(){H(t,"class","circle svelte-14upwad"),Q(t,"--size",e[0]+e[2]),Q(t,"--color",e[1]),Q(t,"--duration",e[3])},m(e,n){N(e,t,n)},p(e,[n]){5&n&&Q(t,"--size",e[0]+e[2]),2&n&&Q(t,"--color",e[1]),8&n&&Q(t,"--duration",e[3])},i:a,o:a,d(e){e&&L(t)}}}function Ku(e,t,n){let{size:r=60}=t,{color:i="#FF3E00"}=t,{unit:o="px"}=t,{duration:a="0.75s"}=t;return e.$$set=e=>{"size"in e&&n(0,r=e.size),"color"in e&&n(1,i=e.color),"unit"in e&&n(2,o=e.unit),"duration"in e&&n(3,a=e.duration)},[r,i,o,a]}class Yu extends pt{constructor(e){super(),ft(this,e,Ku,Vu,d,{size:0,color:1,unit:2,duration:3})}}var Gu=Un((function(e,t){(function(){var n,r="Expected a function",i="__lodash_hash_undefined__",o="__lodash_placeholder__",a=16,s=32,l=64,u=128,c=256,f=1/0,p=9007199254740991,d=NaN,h=4294967295,g=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",s],["partialRight",l],["rearg",c]],m="[object Arguments]",v="[object Array]",y="[object Boolean]",b="[object Date]",_="[object Error]",w="[object Function]",x="[object GeneratorFunction]",k="[object Map]",C="[object Number]",E="[object Object]",O="[object Promise]",A="[object RegExp]",S="[object Set]",j="[object String]",T="[object Symbol]",D="[object WeakMap]",N="[object ArrayBuffer]",L="[object DataView]",M="[object Float32Array]",P="[object Float64Array]",F="[object Int8Array]",q="[object Int16Array]",I="[object Int32Array]",$="[object Uint8Array]",R="[object Uint8ClampedArray]",z="[object Uint16Array]",B="[object Uint32Array]",W=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,Y=RegExp(V.source),G=RegExp(K.source),Z=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ee=/^\w*$/,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/[\\^$.*+?()[\]{}|]/g,re=RegExp(ne.source),ie=/^\s+|\s+$/g,oe=/^\s+/,ae=/\s+$/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,we=/['\n\r\u2028\u2029\\]/g,xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ke="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",Ee="A-Z\\xc0-\\xd6\\xd8-\\xde",Oe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ae="['’]",Se="[\\ud800-\\udfff]",je="["+Oe+"]",Te="["+xe+"]",De="\\d+",Ne="[\\u2700-\\u27bf]",Le="["+Ce+"]",Me="[^\\ud800-\\udfff"+Oe+De+ke+Ce+Ee+"]",Pe="\\ud83c[\\udffb-\\udfff]",Fe="[^\\ud800-\\udfff]",qe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ie="[\\ud800-\\udbff][\\udc00-\\udfff]",$e="["+Ee+"]",Re="(?:"+Le+"|"+Me+")",ze="(?:"+$e+"|"+Me+")",Be="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+Te+"|"+Pe+")"+"?",Ue="[\\ufe0e\\ufe0f]?",Ve=Ue+He+("(?:\\u200d(?:"+[Fe,qe,Ie].join("|")+")"+Ue+He+")*"),Ke="(?:"+[Ne,qe,Ie].join("|")+")"+Ve,Ye="(?:"+[Fe+Te+"?",Te,qe,Ie,Se].join("|")+")",Ge=RegExp(Ae,"g"),Ze=RegExp(Te,"g"),Xe=RegExp(Pe+"(?="+Pe+")|"+Ye+Ve,"g"),Je=RegExp([$e+"?"+Le+"+"+Be+"(?="+[je,$e,"$"].join("|")+")",ze+"+"+We+"(?="+[je,$e+Re,"$"].join("|")+")",$e+"?"+Re+"+"+Be,$e+"+"+We,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",De,Ke].join("|"),"g"),Qe=RegExp("[\\u200d\\ud800-\\udfff"+xe+"\\ufe0e\\ufe0f]"),et=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,rt={};rt[M]=rt[P]=rt[F]=rt[q]=rt[I]=rt[$]=rt[R]=rt[z]=rt[B]=!0,rt[m]=rt[v]=rt[N]=rt[y]=rt[L]=rt[b]=rt[_]=rt[w]=rt[k]=rt[C]=rt[E]=rt[A]=rt[S]=rt[j]=rt[D]=!1;var it={};it[m]=it[v]=it[N]=it[L]=it[y]=it[b]=it[M]=it[P]=it[F]=it[q]=it[I]=it[k]=it[C]=it[E]=it[A]=it[S]=it[j]=it[T]=it[$]=it[R]=it[z]=it[B]=!0,it[_]=it[w]=it[D]=!1;var ot={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,st=parseInt,lt="object"==typeof Bn&&Bn&&Bn.Object===Object&&Bn,ut="object"==typeof self&&self&&self.Object===Object&&self,ct=lt||ut||Function("return this")(),ft=t&&!t.nodeType&&t,pt=ft&&e&&!e.nodeType&&e,dt=pt&&pt.exports===ft,ht=dt&<.process,gt=function(){try{var e=pt&&pt.require&&pt.require("util").types;return e||ht&&ht.binding&&ht.binding("util")}catch(t){}}(),mt=gt&>.isArrayBuffer,vt=gt&>.isDate,yt=gt&>.isMap,bt=gt&>.isRegExp,_t=gt&>.isSet,wt=gt&>.isTypedArray;function xt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function kt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function jt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function Xt(e,t){for(var n=e.length;n--&&It(t,e[n],0)>-1;);return n}function Jt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Qt=Wt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),en=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});function tn(e){return"\\"+ot[e]}function nn(e){return Qe.test(e)}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function on(e,t){return function(n){return e(t(n))}}function an(e,t){for(var n=-1,r=e.length,i=0,a=[];++n",""":'"',"'":"'"});var fn=function e(t){var xe,ke=(t=null==t?ct:fn.defaults(ct.Object(),t,fn.pick(ct,tt))).Array,Ce=t.Date,Ee=t.Error,Oe=t.Function,Ae=t.Math,Se=t.Object,je=t.RegExp,Te=t.String,De=t.TypeError,Ne=ke.prototype,Le=Oe.prototype,Me=Se.prototype,Pe=t["__core-js_shared__"],Fe=Le.toString,qe=Me.hasOwnProperty,Ie=0,$e=(xe=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||""))?"Symbol(src)_1."+xe:"",Re=Me.toString,ze=Fe.call(Se),Be=ct._,We=je("^"+Fe.call(qe).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=dt?t.Buffer:n,Ue=t.Symbol,Ve=t.Uint8Array,Ke=He?He.allocUnsafe:n,Ye=on(Se.getPrototypeOf,Se),Xe=Se.create,Qe=Me.propertyIsEnumerable,ot=Ne.splice,lt=Ue?Ue.isConcatSpreadable:n,ut=Ue?Ue.iterator:n,ft=Ue?Ue.toStringTag:n,pt=function(){try{var e=fo(Se,"defineProperty");return e({},"",{}),e}catch(t){}}(),ht=t.clearTimeout!==ct.clearTimeout&&t.clearTimeout,gt=Ce&&Ce.now!==ct.Date.now&&Ce.now,Pt=t.setTimeout!==ct.setTimeout&&t.setTimeout,Wt=Ae.ceil,pn=Ae.floor,dn=Se.getOwnPropertySymbols,hn=He?He.isBuffer:n,gn=t.isFinite,mn=Ne.join,vn=on(Se.keys,Se),yn=Ae.max,bn=Ae.min,_n=Ce.now,wn=t.parseInt,xn=Ae.random,kn=Ne.reverse,Cn=fo(t,"DataView"),En=fo(t,"Map"),On=fo(t,"Promise"),An=fo(t,"Set"),Sn=fo(t,"WeakMap"),jn=fo(Se,"create"),Tn=Sn&&new Sn,Dn={},Nn=Bo(Cn),Ln=Bo(En),Mn=Bo(On),Pn=Bo(An),Fn=Bo(Sn),qn=Ue?Ue.prototype:n,In=qn?qn.valueOf:n,$n=qn?qn.toString:n;function Rn(e){if(os(e)&&!Ya(e)&&!(e instanceof Hn)){if(e instanceof Wn)return e;if(qe.call(e,"__wrapped__"))return Wo(e)}return new Wn(e)}var zn=function(){function e(){}return function(t){if(!is(t))return{};if(Xe)return Xe(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Bn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function lr(e,t,r,i,o,a){var s,l=1&t,u=2&t,c=4&t;if(r&&(s=o?r(e,i,o,a):r(e)),s!==n)return s;if(!is(e))return e;var f=Ya(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&qe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return ji(e,s)}else{var p=go(e),d=p==w||p==x;if(Ja(e))return ki(e,l);if(p==E||p==m||d&&!o){if(s=u||d?{}:vo(e),!l)return u?function(e,t){return Ti(e,ho(e),t)}(e,function(e,t){return e&&Ti(t,Fs(t),e)}(s,e)):function(e,t){return Ti(e,po(e),t)}(e,ir(s,e))}else{if(!it[p])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case N:return Ci(e);case y:case b:return new r(+e);case L:return function(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case P:case F:case q:case I:case $:case R:case z:case B:return Ei(e,n);case k:return new r;case C:case j:return new r(e);case A:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case S:return new r;case T:return i=e,In?Se(In.call(i)):{}}var i}(e,p,l)}}a||(a=new Gn);var h=a.get(e);if(h)return h;a.set(e,s),cs(e)?e.forEach((function(n){s.add(lr(n,t,r,n,e,a))})):as(e)&&e.forEach((function(n,i){s.set(i,lr(n,t,r,i,e,a))}));var g=f?n:(c?u?io:ro:u?Fs:Ps)(e);return Ct(g||e,(function(n,i){g&&(n=e[i=n]),tr(s,i,lr(n,t,r,i,e,a))})),s}function ur(e,t,r){var i=r.length;if(null==e)return!i;for(e=Se(e);i--;){var o=r[i],a=t[o],s=e[o];if(s===n&&!(o in e)||!a(s))return!1}return!0}function cr(e,t,i){if("function"!=typeof e)throw new De(r);return No((function(){e.apply(n,i)}),t)}function fr(e,t,n,r){var i=-1,o=St,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Tt(t,Kt(n))),r?(o=jt,a=!1):t.length>=200&&(o=Gt,a=!1,t=new Yn(t));e:for(;++i-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Kn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(En||Vn),string:new Un}},Kn.prototype.delete=function(e){var t=uo(this,e).delete(e);return this.size-=t?1:0,t},Kn.prototype.get=function(e){return uo(this,e).get(e)},Kn.prototype.has=function(e){return uo(this,e).has(e)},Kn.prototype.set=function(e,t){var n=uo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,i),this},Yn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Gn.prototype.get=function(e){return this.__data__.get(e)},Gn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Kn(r)}return n.set(e,t),this.size=n.size,this};var pr=Li(_r),dr=Li(wr,!0);function hr(e,t){var n=!0;return pr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function gr(e,t,r){for(var i=-1,o=e.length;++i0&&n(s)?t>1?vr(s,t-1,n,r,i):Dt(i,s):r||(i[i.length]=s)}return i}var yr=Mi(),br=Mi(!0);function _r(e,t){return e&&yr(e,t,Ps)}function wr(e,t){return e&&br(e,t,Ps)}function xr(e,t){return At(t,(function(t){return ts(e[t])}))}function kr(e,t){for(var r=0,i=(t=bi(t,e)).length;null!=e&&rt}function Ar(e,t){return null!=e&&qe.call(e,t)}function Sr(e,t){return null!=e&&t in Se(e)}function jr(e,t,r){for(var i=r?jt:St,o=e[0].length,a=e.length,s=a,l=ke(a),u=1/0,c=[];s--;){var f=e[s];s&&t&&(f=Tt(f,Kt(t))),u=bn(f.length,u),l[s]=!r&&(t||o>=120&&f.length>=120)?new Yn(s&&f):n}f=e[0];var p=-1,d=l[0];e:for(;++p=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Ur(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)s!==e&&ot.call(s,l,1),ot.call(e,l,1);return e}function Kr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?ot.call(e,i,1):fi(e,i)}}return e}function Yr(e,t){return e+pn(xn()*(t-e+1))}function Gr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=pn(t/2))&&(e+=e)}while(t);return n}function Zr(e,t){return Lo(Ao(e,t,sl),e+"")}function Xr(e){return Xn(Hs(e))}function Jr(e,t){var n=Hs(e);return Fo(n,sr(t,0,n.length))}function Qr(e,t,r,i){if(!is(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,l=e;null!=l&&++oi?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=ke(i);++r>>1,a=e[o];null!==a&&!ps(a)&&(n?a<=t:a=200){var u=t?null:Gi(e);if(u)return sn(u);a=!1,i=Gt,l=new Yn}else l=t?[]:s;e:for(;++r=i?e:ri(e,t,r)}var xi=ht||function(e){return ct.clearTimeout(e)};function ki(e,t){if(t)return e.slice();var n=e.length,r=Ke?Ke(n):new e.constructor(n);return e.copy(r),r}function Ci(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function Ei(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oi(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,a=ps(e),s=t!==n,l=null===t,u=t==t,c=ps(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||i&&s&&u||!r&&u||!o)return 1;if(!i&&!a&&!c&&e1?r[o-1]:n,s=o>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(o--,a):n,s&&_o(r[0],r[1],s)&&(a=o<3?n:a,o=1),t=Se(t);++i-1?o[a?t[s]:s]:n}}function $i(e){return no((function(t){var i=t.length,o=i,a=Wn.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new De(r);if(a&&!l&&"wrapper"==ao(s))var l=new Wn([],!0)}for(o=l?o:i;++o1&&y.reverse(),p&&cl))return!1;var c=a.get(e);if(c&&a.get(t))return c==t;var f=-1,p=!0,d=2&r?new Yn:n;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ct(g,(function(n){var r="_."+n[0];t&n[1]&&!St(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ue):[]}(r),n)))}function Po(e){var t=0,r=0;return function(){var i=_n(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Fo(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,ua(e,r)}));function ma(e){var t=Rn(e);return t.__chain__=!0,t}function va(e,t){return t(e)}var ya=no((function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Hn&&bo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:va,args:[o],thisArg:n}),new Wn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(o)}));var ba=Di((function(e,t,n){qe.call(e,n)?++e[n]:or(e,n,1)}));var _a=Ii(Ko),wa=Ii(Yo);function xa(e,t){return(Ya(e)?Ct:pr)(e,lo(t,3))}function ka(e,t){return(Ya(e)?Et:dr)(e,lo(t,3))}var Ca=Di((function(e,t,n){qe.call(e,n)?e[n].push(t):or(e,n,[t])}));var Ea=Zr((function(e,t,n){var r=-1,i="function"==typeof t,o=Za(e)?ke(e.length):[];return pr(e,(function(e){o[++r]=i?xt(t,e,n):Tr(e,t,n)})),o})),Oa=Di((function(e,t,n){or(e,n,t)}));function Aa(e,t){return(Ya(e)?Tt:$r)(e,lo(t,3))}var Sa=Di((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ja=Zr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&_o(e,t[0],t[1])?t=[]:n>2&&_o(t[0],t[1],t[2])&&(t=[t[0]]),Hr(e,vr(t,1),[])})),Ta=gt||function(){return ct.Date.now()};function Da(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Xi(e,u,n,n,n,n,t)}function Na(e,t){var i;if("function"!=typeof t)throw new De(r);return e=ys(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var La=Zr((function(e,t,n){var r=1;if(n.length){var i=an(n,so(La));r|=s}return Xi(e,r,t,n,i)})),Ma=Zr((function(e,t,n){var r=3;if(n.length){var i=an(n,so(Ma));r|=s}return Xi(t,r,e,n,i)}));function Pa(e,t,i){var o,a,s,l,u,c,f=0,p=!1,d=!1,h=!0;if("function"!=typeof e)throw new De(r);function g(t){var r=o,i=a;return o=a=n,f=t,l=e.apply(i,r)}function m(e){return f=e,u=No(y,t),p?g(e):l}function v(e){var r=e-c;return c===n||r>=t||r<0||d&&e-f>=s}function y(){var e=Ta();if(v(e))return b(e);u=No(y,function(e){var n=t-(e-c);return d?bn(n,s-(e-f)):n}(e))}function b(e){return u=n,h&&o?g(e):(o=a=n,l)}function _(){var e=Ta(),r=v(e);if(o=arguments,a=this,c=e,r){if(u===n)return m(c);if(d)return xi(u),u=No(y,t),g(c)}return u===n&&(u=No(y,t)),l}return t=_s(t)||0,is(i)&&(p=!!i.leading,s=(d="maxWait"in i)?yn(_s(i.maxWait)||0,t):s,h="trailing"in i?!!i.trailing:h),_.cancel=function(){u!==n&&xi(u),f=0,o=c=a=u=n},_.flush=function(){return u===n?l:b(Ta())},_}var Fa=Zr((function(e,t){return cr(e,1,t)})),qa=Zr((function(e,t,n){return cr(e,_s(t)||0,n)}));function Ia(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new De(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ia.Cache||Kn),n}function $a(e){if("function"!=typeof e)throw new De(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ia.Cache=Kn;var Ra=_i((function(e,t){var n=(t=1==t.length&&Ya(t[0])?Tt(t[0],Kt(lo())):Tt(vr(t,1),Kt(lo()))).length;return Zr((function(r){for(var i=-1,o=bn(r.length,n);++i=t})),Ka=Dr(function(){return arguments}())?Dr:function(e){return os(e)&&qe.call(e,"callee")&&!Qe.call(e,"callee")},Ya=ke.isArray,Ga=mt?Kt(mt):function(e){return os(e)&&Er(e)==N};function Za(e){return null!=e&&rs(e.length)&&!ts(e)}function Xa(e){return os(e)&&Za(e)}var Ja=hn||_l,Qa=vt?Kt(vt):function(e){return os(e)&&Er(e)==b};function es(e){if(!os(e))return!1;var t=Er(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ls(e)}function ts(e){if(!is(e))return!1;var t=Er(e);return t==w||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ns(e){return"number"==typeof e&&e==ys(e)}function rs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function is(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function os(e){return null!=e&&"object"==typeof e}var as=yt?Kt(yt):function(e){return os(e)&&go(e)==k};function ss(e){return"number"==typeof e||os(e)&&Er(e)==C}function ls(e){if(!os(e)||Er(e)!=E)return!1;var t=Ye(e);if(null===t)return!0;var n=qe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Fe.call(n)==ze}var us=bt?Kt(bt):function(e){return os(e)&&Er(e)==A};var cs=_t?Kt(_t):function(e){return os(e)&&go(e)==S};function fs(e){return"string"==typeof e||!Ya(e)&&os(e)&&Er(e)==j}function ps(e){return"symbol"==typeof e||os(e)&&Er(e)==T}var ds=wt?Kt(wt):function(e){return os(e)&&rs(e.length)&&!!rt[Er(e)]};var hs=Vi(Ir),gs=Vi((function(e,t){return e<=t}));function ms(e){if(!e)return[];if(Za(e))return fs(e)?un(e):ji(e);if(ut&&e[ut])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[ut]());var t=go(e);return(t==k?rn:t==S?sn:Hs)(e)}function vs(e){return e?(e=_s(e))===f||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ys(e){var t=vs(e),n=t%1;return t==t?n?t-n:t:0}function bs(e){return e?sr(ys(e),0,h):0}function _s(e){if("number"==typeof e)return e;if(ps(e))return d;if(is(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=is(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(ie,"");var n=ge.test(e);return n||ve.test(e)?st(e.slice(2),n?2:8):he.test(e)?d:+e}function ws(e){return Ti(e,Fs(e))}function xs(e){return null==e?"":ui(e)}var ks=Ni((function(e,t){if(Co(t)||Za(t))Ti(t,Ps(t),e);else for(var n in t)qe.call(t,n)&&tr(e,n,t[n])})),Cs=Ni((function(e,t){Ti(t,Fs(t),e)})),Es=Ni((function(e,t,n,r){Ti(t,Fs(t),e,r)})),Os=Ni((function(e,t,n,r){Ti(t,Ps(t),e,r)})),As=no(ar);var Ss=Zr((function(e,t){e=Se(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&_o(t[0],t[1],o)&&(i=1);++r1),t})),Ti(e,io(e),n),r&&(n=lr(n,7,eo));for(var i=t.length;i--;)fi(n,t[i]);return n}));var Rs=no((function(e,t){return null==e?{}:function(e,t){return Ur(e,t,(function(t,n){return Ds(e,n)}))}(e,t)}));function zs(e,t){if(null==e)return{};var n=Tt(io(e),(function(e){return[e]}));return t=lo(t),Ur(e,n,(function(e,n){return t(e,n[0])}))}var Bs=Zi(Ps),Ws=Zi(Fs);function Hs(e){return null==e?[]:Yt(e,Ps(e))}var Us=Fi((function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)}));function Vs(e){return el(xs(e).toLowerCase())}function Ks(e){return(e=xs(e))&&e.replace(be,Qt).replace(Ze,"")}var Ys=Fi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Gs=Fi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Zs=Pi("toLowerCase");var Xs=Fi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Js=Fi((function(e,t,n){return e+(n?" ":"")+el(t)}));var Qs=Fi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),el=Pi("toUpperCase");function tl(e,t,r){return e=xs(e),(t=r?n:t)===n?function(e){return et.test(e)}(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var nl=Zr((function(e,t){try{return xt(e,n,t)}catch(r){return es(r)?r:new Ee(r)}})),rl=no((function(e,t){return Ct(t,(function(t){t=zo(t),or(e,t,La(e[t],e))})),e}));function il(e){return function(){return e}}var ol=$i(),al=$i(!0);function sl(e){return e}function ll(e){return Pr("function"==typeof e?e:lr(e,1))}var ul=Zr((function(e,t){return function(n){return Tr(n,e,t)}})),cl=Zr((function(e,t){return function(n){return Tr(e,n,t)}}));function fl(e,t,n){var r=Ps(t),i=xr(t,r);null!=n||is(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=xr(t,Ps(t)));var o=!(is(n)&&"chain"in n&&!n.chain),a=ts(e);return Ct(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=ji(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Dt([this.value()],arguments))})})),e}function pl(){}var dl=Wi(Tt),hl=Wi(Ot),gl=Wi(Mt);function ml(e){return wo(e)?Bt(zo(e)):function(e){return function(t){return kr(t,e)}}(e)}var vl=Ui(),yl=Ui(!0);function bl(){return[]}function _l(){return!1}var wl=Bi((function(e,t){return e+t}),0),xl=Yi("ceil"),kl=Bi((function(e,t){return e/t}),1),Cl=Yi("floor");var El,Ol=Bi((function(e,t){return e*t}),1),Al=Yi("round"),Sl=Bi((function(e,t){return e-t}),0);return Rn.after=function(e,t){if("function"!=typeof t)throw new De(r);return e=ys(e),function(){if(--e<1)return t.apply(this,arguments)}},Rn.ary=Da,Rn.assign=ks,Rn.assignIn=Cs,Rn.assignInWith=Es,Rn.assignWith=Os,Rn.at=As,Rn.before=Na,Rn.bind=La,Rn.bindAll=rl,Rn.bindKey=Ma,Rn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ya(e)?e:[e]},Rn.chain=ma,Rn.chunk=function(e,t,r){t=(r?_o(e,t,r):t===n)?1:yn(ys(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=ke(Wt(i/t));oo?0:o+r),(i=i===n||i>o?o:ys(i))<0&&(i+=o),i=r>i?0:bs(i);r>>0)?(e=xs(e))&&("string"==typeof t||null!=t&&!us(t))&&!(t=ui(t))&&nn(e)?wi(un(e),0,r):e.split(t,r):[]},Rn.spread=function(e,t){if("function"!=typeof e)throw new De(r);return t=null==t?0:yn(ys(t),0),Zr((function(n){var r=n[t],i=wi(n,0,t);return r&&Dt(i,r),xt(e,this,i)}))},Rn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},Rn.take=function(e,t,r){return e&&e.length?ri(e,0,(t=r||t===n?1:ys(t))<0?0:t):[]},Rn.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?ri(e,(t=i-(t=r||t===n?1:ys(t)))<0?0:t,i):[]},Rn.takeRightWhile=function(e,t){return e&&e.length?di(e,lo(t,3),!1,!0):[]},Rn.takeWhile=function(e,t){return e&&e.length?di(e,lo(t,3)):[]},Rn.tap=function(e,t){return t(e),e},Rn.throttle=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new De(r);return is(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Pa(e,t,{leading:i,maxWait:t,trailing:o})},Rn.thru=va,Rn.toArray=ms,Rn.toPairs=Bs,Rn.toPairsIn=Ws,Rn.toPath=function(e){return Ya(e)?Tt(e,zo):ps(e)?[e]:ji(Ro(xs(e)))},Rn.toPlainObject=ws,Rn.transform=function(e,t,n){var r=Ya(e),i=r||Ja(e)||ds(e);if(t=lo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:is(e)&&ts(o)?zn(Ye(e)):{}}return(i?Ct:_r)(e,(function(e,r,i){return t(n,e,r,i)})),n},Rn.unary=function(e){return Da(e,1)},Rn.union=oa,Rn.unionBy=aa,Rn.unionWith=sa,Rn.uniq=function(e){return e&&e.length?ci(e):[]},Rn.uniqBy=function(e,t){return e&&e.length?ci(e,lo(t,2)):[]},Rn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?ci(e,n,t):[]},Rn.unset=function(e,t){return null==e||fi(e,t)},Rn.unzip=la,Rn.unzipWith=ua,Rn.update=function(e,t,n){return null==e?e:pi(e,t,yi(n))},Rn.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:pi(e,t,yi(r),i)},Rn.values=Hs,Rn.valuesIn=function(e){return null==e?[]:Yt(e,Fs(e))},Rn.without=ca,Rn.words=tl,Rn.wrap=function(e,t){return za(yi(t),e)},Rn.xor=fa,Rn.xorBy=pa,Rn.xorWith=da,Rn.zip=ha,Rn.zipObject=function(e,t){return mi(e||[],t||[],tr)},Rn.zipObjectDeep=function(e,t){return mi(e||[],t||[],Qr)},Rn.zipWith=ga,Rn.entries=Bs,Rn.entriesIn=Ws,Rn.extend=Cs,Rn.extendWith=Es,fl(Rn,Rn),Rn.add=wl,Rn.attempt=nl,Rn.camelCase=Us,Rn.capitalize=Vs,Rn.ceil=xl,Rn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=_s(r))==r?r:0),t!==n&&(t=(t=_s(t))==t?t:0),sr(_s(e),t,r)},Rn.clone=function(e){return lr(e,4)},Rn.cloneDeep=function(e){return lr(e,5)},Rn.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:n)},Rn.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:n)},Rn.conformsTo=function(e,t){return null==t||ur(e,t,Ps(t))},Rn.deburr=Ks,Rn.defaultTo=function(e,t){return null==e||e!=e?t:e},Rn.divide=kl,Rn.endsWith=function(e,t,r){e=xs(e),t=ui(t);var i=e.length,o=r=r===n?i:sr(ys(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},Rn.eq=Ha,Rn.escape=function(e){return(e=xs(e))&&G.test(e)?e.replace(K,en):e},Rn.escapeRegExp=function(e){return(e=xs(e))&&re.test(e)?e.replace(ne,"\\$&"):e},Rn.every=function(e,t,r){var i=Ya(e)?Ot:hr;return r&&_o(e,t,r)&&(t=n),i(e,lo(t,3))},Rn.find=_a,Rn.findIndex=Ko,Rn.findKey=function(e,t){return Ft(e,lo(t,3),_r)},Rn.findLast=wa,Rn.findLastIndex=Yo,Rn.findLastKey=function(e,t){return Ft(e,lo(t,3),wr)},Rn.floor=Cl,Rn.forEach=xa,Rn.forEachRight=ka,Rn.forIn=function(e,t){return null==e?e:yr(e,lo(t,3),Fs)},Rn.forInRight=function(e,t){return null==e?e:br(e,lo(t,3),Fs)},Rn.forOwn=function(e,t){return e&&_r(e,lo(t,3))},Rn.forOwnRight=function(e,t){return e&&wr(e,lo(t,3))},Rn.get=Ts,Rn.gt=Ua,Rn.gte=Va,Rn.has=function(e,t){return null!=e&&mo(e,t,Ar)},Rn.hasIn=Ds,Rn.head=Zo,Rn.identity=sl,Rn.includes=function(e,t,n,r){e=Za(e)?e:Hs(e),n=n&&!r?ys(n):0;var i=e.length;return n<0&&(n=yn(i+n,0)),fs(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&It(e,t,n)>-1},Rn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ys(n);return i<0&&(i=yn(r+i,0)),It(e,t,i)},Rn.inRange=function(e,t,r){return t=vs(t),r===n?(r=t,t=0):r=vs(r),function(e,t,n){return e>=bn(t,n)&&e=-9007199254740991&&e<=p},Rn.isSet=cs,Rn.isString=fs,Rn.isSymbol=ps,Rn.isTypedArray=ds,Rn.isUndefined=function(e){return e===n},Rn.isWeakMap=function(e){return os(e)&&go(e)==D},Rn.isWeakSet=function(e){return os(e)&&"[object WeakSet]"==Er(e)},Rn.join=function(e,t){return null==e?"":mn.call(e,t)},Rn.kebabCase=Ys,Rn.last=ea,Rn.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=ys(r))<0?yn(i+o,0):bn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):qt(e,Rt,o,!0)},Rn.lowerCase=Gs,Rn.lowerFirst=Zs,Rn.lt=hs,Rn.lte=gs,Rn.max=function(e){return e&&e.length?gr(e,sl,Or):n},Rn.maxBy=function(e,t){return e&&e.length?gr(e,lo(t,2),Or):n},Rn.mean=function(e){return zt(e,sl)},Rn.meanBy=function(e,t){return zt(e,lo(t,2))},Rn.min=function(e){return e&&e.length?gr(e,sl,Ir):n},Rn.minBy=function(e,t){return e&&e.length?gr(e,lo(t,2),Ir):n},Rn.stubArray=bl,Rn.stubFalse=_l,Rn.stubObject=function(){return{}},Rn.stubString=function(){return""},Rn.stubTrue=function(){return!0},Rn.multiply=Ol,Rn.nth=function(e,t){return e&&e.length?Wr(e,ys(t)):n},Rn.noConflict=function(){return ct._===this&&(ct._=Be),this},Rn.noop=pl,Rn.now=Ta,Rn.pad=function(e,t,n){e=xs(e);var r=(t=ys(t))?ln(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Hi(pn(i),n)+e+Hi(Wt(i),n)},Rn.padEnd=function(e,t,n){e=xs(e);var r=(t=ys(t))?ln(e):0;return t&&rt){var i=e;e=t,t=i}if(r||e%1||t%1){var o=xn();return bn(e+o*(t-e+at("1e-"+((o+"").length-1))),t)}return Yr(e,t)},Rn.reduce=function(e,t,n){var r=Ya(e)?Nt:Ht,i=arguments.length<3;return r(e,lo(t,4),n,i,pr)},Rn.reduceRight=function(e,t,n){var r=Ya(e)?Lt:Ht,i=arguments.length<3;return r(e,lo(t,4),n,i,dr)},Rn.repeat=function(e,t,r){return t=(r?_o(e,t,r):t===n)?1:ys(t),Gr(xs(e),t)},Rn.replace=function(){var e=arguments,t=xs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Rn.result=function(e,t,r){var i=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=n);++ip)return[];var n=h,r=bn(e,h);t=lo(t),e-=h;for(var i=Vt(r,t);++n=a)return e;var l=r-ln(i);if(l<1)return i;var u=s?wi(s,0,l).join(""):e.slice(0,l);if(o===n)return u+i;if(s&&(l+=u.length-l),us(o)){if(e.slice(l).search(o)){var c,f=u;for(o.global||(o=je(o.source,xs(de.exec(o))+"g")),o.lastIndex=0;c=o.exec(f);)var p=c.index;u=u.slice(0,p===n?l:p)}}else if(e.indexOf(ui(o),l)!=l){var d=u.lastIndexOf(o);d>-1&&(u=u.slice(0,d))}return u+i},Rn.unescape=function(e){return(e=xs(e))&&Y.test(e)?e.replace(V,cn):e},Rn.uniqueId=function(e){var t=++Ie;return xs(e)+t},Rn.upperCase=Qs,Rn.upperFirst=el,Rn.each=xa,Rn.eachRight=ka,Rn.first=Zo,fl(Rn,(El={},_r(Rn,(function(e,t){qe.call(Rn.prototype,t)||(El[t]=e)})),El),{chain:!1}),Rn.VERSION="4.17.13",Ct(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Rn[e].placeholder=Rn})),Ct(["drop","take"],(function(e,t){Hn.prototype[e]=function(r){r=r===n?1:yn(ys(r),0);var i=this.__filtered__&&!t?new Hn(this):this.clone();return i.__filtered__?i.__takeCount__=bn(r,i.__takeCount__):i.__views__.push({size:bn(r,h),type:e+(i.__dir__<0?"Right":"")}),i},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ct(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Hn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:lo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Ct(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}})),Ct(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(sl)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Zr((function(e,t){return"function"==typeof e?new Hn(this):this.map((function(n){return Tr(n,e,t)}))})),Hn.prototype.reject=function(e){return this.filter($a(lo(e)))},Hn.prototype.slice=function(e,t){e=ys(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Hn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=ys(t))<0?r.dropRight(-t):r.take(t-e)),r)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(h)},_r(Hn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=Rn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(Rn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,l=t instanceof Hn,u=s[0],c=l||Ya(t),f=function(e){var t=o.apply(Rn,Dt([e],s));return i&&p?t[0]:t};c&&r&&"function"==typeof u&&1!=u.length&&(l=c=!1);var p=this.__chain__,d=!!this.__actions__.length,h=a&&!p,g=l&&!d;if(!a&&c){t=g?t:new Hn(this);var m=e.apply(t,s);return m.__actions__.push({func:va,args:[f],thisArg:n}),new Wn(m,p)}return h&&g?e.apply(this,s):(m=this.thru(f),h?i?m.value()[0]:m.value():m)})})),Ct(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ne[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Rn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ya(i)?i:[],e)}return this[n]((function(n){return t.apply(Ya(n)?n:[],e)}))}})),_r(Hn.prototype,(function(e,t){var n=Rn[t];if(n){var r=n.name+"";qe.call(Dn,r)||(Dn[r]=[]),Dn[r].push({name:t,func:n})}})),Dn[Ri(n,2).name]=[{name:"wrapper",func:n}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=ji(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ji(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ji(this.__views__),e},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ya(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Rn.prototype.plant=function(e){for(var t,r=this;r instanceof Bn;){var i=Wo(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},Rn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hn){var t=e;return this.__actions__.length&&(t=new Hn(this)),(t=t.reverse()).__actions__.push({func:va,args:[ia],thisArg:n}),new Wn(t,this.__chain__)}return this.thru(ia)},Rn.prototype.toJSON=Rn.prototype.valueOf=Rn.prototype.value=function(){return hi(this.__wrapped__,this.__actions__)},Rn.prototype.first=Rn.prototype.head,ut&&(Rn.prototype[ut]=function(){return this}),Rn}();pt?((pt.exports=fn)._=fn,ft._=fn):ct._=fn}).call(Bn)}));var Zu=function(e){return e},Xu="object"==typeof Bn&&Bn&&Bn.Object===Object&&Bn,Ju="object"==typeof self&&self&&self.Object===Object&&self,Qu=Xu||Ju||Function("return this")(),ec=Qu.Symbol,tc=Object.prototype,nc=tc.hasOwnProperty,rc=tc.toString,ic=ec?ec.toStringTag:void 0;var oc=function(e){var t=nc.call(e,ic),n=e[ic];try{e[ic]=void 0;var r=!0}catch(o){}var i=rc.call(e);return r&&(t?e[ic]=n:delete e[ic]),i},ac=Object.prototype.toString;var sc=function(e){return ac.call(e)},lc=ec?ec.toStringTag:void 0;var uc=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":lc&&lc in Object(e)?oc(e):sc(e)};var cc=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var fc,pc=function(e){if(!cc(e))return!1;var t=uc(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},dc=Qu["__core-js_shared__"],hc=(fc=/[^.]+$/.exec(dc&&dc.keys&&dc.keys.IE_PROTO||""))?"Symbol(src)_1."+fc:"";var gc=function(e){return!!hc&&hc in e},mc=Function.prototype.toString;var vc=function(e){if(null!=e){try{return mc.call(e)}catch(t){}try{return e+""}catch(t){}}return""},yc=/^\[object .+?Constructor\]$/,bc=Function.prototype,_c=Object.prototype,wc=bc.toString,xc=_c.hasOwnProperty,kc=RegExp("^"+wc.call(xc).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Cc=function(e){return!(!cc(e)||gc(e))&&(pc(e)?kc:yc).test(vc(e))};var Ec=function(e,t){return null==e?void 0:e[t]};var Oc=function(e,t){var n=Ec(e,t);return Cc(n)?n:void 0},Ac=Oc(Qu,"WeakMap"),Sc=Ac&&new Ac,jc=Sc?function(e,t){return Sc.set(e,t),e}:Zu,Tc=Object.create,Dc=function(){function e(){}return function(t){if(!cc(t))return{};if(Tc)return Tc(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Nc=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Dc(e.prototype),r=e.apply(n,t);return cc(r)?r:n}};var Lc=function(e,t,n){var r=1&t,i=Nc(e);return function t(){var o=this&&this!==Qu&&this instanceof t?i:e;return o.apply(r?n:this,arguments)}};var Mc=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},Pc=Math.max;var Fc=function(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,l=t.length,u=Pc(o-a,0),c=Array(l+u),f=!r;++s0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},af=of(jc),sf=/\{\n\/\* \[wrapped with (.+)\] \*/,lf=/,? & /;var uf=function(e){var t=e.match(sf);return t?t[1].split(lf):[]},cf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;var ff=function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(cf,"{\n/* [wrapped with "+t+"] */\n")};var pf=function(e){return function(){return e}},df=function(){try{var e=Oc(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),hf=of(df?function(e,t){return df(e,"toString",{configurable:!0,enumerable:!1,value:pf(t),writable:!0})}:Zu);var gf=function(e,t){for(var n=-1,r=null==e?0:e.length;++n-1},wf=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];var xf=function(e,t){return gf(wf,(function(n){var r="_."+n[0];t&n[1]&&!_f(e,r)&&e.push(r)})),e.sort()};var kf=function(e,t,n){var r=t+"";return hf(e,ff(r,xf(uf(r),n)))};var Cf=function(e,t,n,r,i,o,a,s,l,u){var c=8&t;t|=c?32:64,4&(t&=~(c?64:32))||(t&=-4);var f=[e,t,i,c?o:void 0,c?a:void 0,c?void 0:o,c?void 0:a,s,l,u],p=n.apply(void 0,f);return nf(e)&&af(p,f),p.placeholder=r,kf(p,e,t)};var Ef=function(e){return e.placeholder},Of=/^(?:0|[1-9]\d*)$/;var Af=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Of.test(e))&&e>-1&&e%1==0&&e1&&b.reverse(),f&&u-1&&e%1==0&&e<=9007199254740991},lp={};lp["[object Float32Array]"]=lp["[object Float64Array]"]=lp["[object Int8Array]"]=lp["[object Int16Array]"]=lp["[object Int32Array]"]=lp["[object Uint8Array]"]=lp["[object Uint8ClampedArray]"]=lp["[object Uint16Array]"]=lp["[object Uint32Array]"]=!0,lp["[object Arguments]"]=lp["[object Array]"]=lp["[object ArrayBuffer]"]=lp["[object Boolean]"]=lp["[object DataView]"]=lp["[object Date]"]=lp["[object Error]"]=lp["[object Function]"]=lp["[object Map]"]=lp["[object Number]"]=lp["[object Object]"]=lp["[object RegExp]"]=lp["[object Set]"]=lp["[object String]"]=lp["[object WeakMap]"]=!1;var up=function(e){return Zc(e)&&sp(e.length)&&!!lp[uc(e)]};var cp=function(e){return function(t){return e(t)}},fp=Un((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n&&Xu.process,o=function(){try{var e=r&&r.require&&r.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(t){}}();e.exports=o})),pp=fp&&fp.isTypedArray,dp=pp?cp(pp):up,hp=Object.prototype.hasOwnProperty;var gp=function(e,t){var n=Gc(e),r=!n&&ip(e),i=!n&&!r&&ap(e),o=!n&&!r&&!i&&dp(e),a=n||r||i||o,s=a?Qf(e.length,String):[],l=s.length;for(var u in e)!t&&!hp.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Af(u,l))||s.push(u);return s},mp=Object.prototype;var vp=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||mp)};var yp=function(e,t){return function(n){return e(t(n))}},bp=yp(Object.keys,Object),_p=Object.prototype.hasOwnProperty;var wp=function(e){if(!vp(e))return bp(e);var t=[];for(var n in Object(e))_p.call(e,n)&&"constructor"!=n&&t.push(n);return t};var xp=function(e){return null!=e&&sp(e.length)&&!pc(e)};var kp=function(e){return xp(e)?gp(e):wp(e)};var Cp=function(e,t){return e&&Jf(t,kp(t),e)};var Ep=function(){this.__data__=[],this.size=0};var Op=function(e,t){for(var n=e.length;n--;)if(Gf(e[n][0],t))return n;return-1},Ap=Array.prototype.splice;var Sp=function(e){var t=this.__data__,n=Op(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ap.call(t,n,1),--this.size,!0)};var jp=function(e){var t=this.__data__,n=Op(t,e);return n<0?void 0:t[n][1]};var Tp=function(e){return Op(this.__data__,e)>-1};var Dp=function(e,t){var n=this.__data__,r=Op(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Np(e){var t=-1,n=null==e?0:e.length;for(this.clear();++ts))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,f=!0,p=2&n?new vh:void 0;for(o.set(e,t),o.set(t,e);++c0&&r(l)?n>1?e(l,n-1,r,i,o):bd(o,l):i||(o[o.length]=l)}return o};var fg=function(e){return(null==e?0:e.length)?cg(e,1):[]},pg=Math.max;var dg=function(e,t,n){return t=pg(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=pg(r.length-t,0),a=Array(o);++i2096103.424&&d!==p))return navigator.msSaveBlob?navigator.msSaveBlob(b(u),h):_(u);l=(u=b(u)).type||s}else if(/([\x80-\xff])/.test(u)){for(var m=0,v=new Uint8Array(u.length),y=v.length;m{if("string"==typeof l){if(r=document.querySelector(l),null===r)return()=>{}}else{if(!(l instanceof HTMLElement))throw new TypeError(`Unknown target type: ${typeof l}. Allowed types: String (CSS selector), HTMLElement.`);r=l}return i=document.createElement("div"),r.appendChild(i),i.appendChild(o),()=>{r.removeChild(i)}})),e.$$set=e=>{"target"in e&&n(1,l=e.target),"$$scope"in e&&n(2,s=e.$$scope)},[o,l,s,a,function(e){Ee[e?"unshift":"push"]((()=>{o=e,n(0,o)}))}]}class jg extends pt{constructor(e){super(),ft(this,e,Sg,Ag,d,{target:1})}}function Tg(e){let t="";for(let n in e)if(e[n]){t+=`${Dg(n)}: ${e[n]}; `}return t}const Dg=e=>e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)),Ng=(e,t,n)=>{const r=()=>{setTimeout(e,t)};return n&&r(),r};function Lg(e){let t,n,r;const i=e[7].default,o=v(i,e,e[6],null);return{c(){t=P("div"),o&&o.c(),this.h()},l(e){t=Y(e,"DIV",{style:!0,class:!0});var n=K(t);o&&o.l(n),n.forEach(L),this.h()},h(){H(t,"style",e[0]),H(t,"class","svelte-1gyo73z")},m(e,n){N(e,t,n),o&&o.m(t,null),r=!0},p(e,[n]){o&&o.p&&64&n&&b(o,i,e,e[6],n,null,null),(!r||1&n)&&H(t,"style",e[0])},i(e){r||(Ue(o,e),n||Ne((()=>{n=Ye(t,uu,{}),n.start()})),r=!0)},o(e){Ve(o,e),r=!1},d(e){e&&L(t),o&&o.d(e)}}}function Mg(e,t,n){let r,{$$slots:i={},$$scope:o}=t,{backgroundSize:a="10px"}=t,{borderRadius:s=""}=t,{height:l=""}=t,{width:u=""}=t,{margin:c=""}=t;return e.$$set=e=>{"backgroundSize"in e&&n(1,a=e.backgroundSize),"borderRadius"in e&&n(2,s=e.borderRadius),"height"in e&&n(3,l=e.height),"width"in e&&n(4,u=e.width),"margin"in e&&n(5,c=e.margin),"$$scope"in e&&n(6,o=e.$$scope)},e.$$.update=()=>{62&e.$$.dirty&&n(0,r=Tg({backgroundSize:a,borderRadius:s,height:l,width:u,margin:c}))},[r,a,s,l,u,c,o,i]}class Pg extends pt{constructor(e){super(),ft(this,e,Mg,Lg,d,{backgroundSize:1,borderRadius:2,height:3,width:4,margin:5})}}function Fg(e){let t=!1;const n=()=>t=!1,r=n=>{t=!0,qg(e,n)};function i(n){t&&qg(e,n)}return window.addEventListener("mousedown",r),window.addEventListener("mouseup",n),window.addEventListener("mousemove",i),{destroy(){window.removeEventListener("mousedown",r),window.removeEventListener("mouseup",n),window.removeEventListener("mousemove",i)}}}function qg(e,t){const{left:n,top:r,width:i,height:o}=e.getBoundingClientRect();let a=t.clientX-n,s=t.clientY-r;(function(e,t,n,r){return e>0&&t>0&&e{let n=parseInt(e);n?event.keyCode===n&&t(event):event.key===e&&t(event)}}(t,n);return e.addEventListener("keydown",r),r}return{destroy(){r.forEach((t=>e.removeEventListener("keypress",t)))}}}function $g(e){let t,n,r,i;return{c(){t=P("span"),this.h()},l(e){t=Y(e,"SPAN",{class:!0}),K(t).forEach(L),this.h()},h(){H(t,"class","svelte-2v17vl")},m(n,o){N(n,t,o),r||(i=R(t,"click",e[4]),r=!0)},p:a,i(e){n||Ne((()=>{n=Ye(t,uu,{}),n.start()}))},o:a,d(e){e&&L(t),r=!1,i()}}}function Rg(e){let t,n,r,i,o,s=e[0]&&$g(e);return{c(){t=P("div"),s&&s.c(),this.h()},l(e){t=Y(e,"DIV",{tabindex:!0,title:!0,class:!0,style:!0});var n=K(t);s&&s.l(n),n.forEach(L),this.h()},h(){H(t,"tabindex","0"),H(t,"title",e[1]),H(t,"class","swatch svelte-2v17vl"),H(t,"style",n=`background: ${e[1]};`)},m(n,r){N(n,t,r),s&&s.m(t,null),i||(o=[C(Ig.call(null,t,{Enter:e[5]})),R(t,"mouseover",e[6]),R(t,"mouseleave",e[7]),R(t,"click",W(e[3]))],i=!0)},p(e,r){e[0]?s?(s.p(e,r),1&r&&Ue(s,1)):(s=$g(e),s.c(),Ue(s,1),s.m(t,null)):s&&(s.d(1),s=null),2&r&&H(t,"title",e[1]),2&r&&n!==(n=`background: ${e[1]};`)&&H(t,"style",n)},i(e){Ue(s),r||Ne((()=>{r=Ye(t,uu,{}),r.start()}))},o:a,d(e){e&&L(t),s&&s.d(),i=!1,f(o)}}}function zg(e){let t,n,r;return n=new Pg({props:{borderRadius:"6px",$$slots:{default:[Rg]},$$scope:{ctx:e}}}),{c(){t=P("div"),st(n.$$.fragment),this.h()},l(e){t=Y(e,"DIV",{class:!0});var r=K(t);lt(n.$$.fragment,r),r.forEach(L),this.h()},h(){H(t,"class","space svelte-2v17vl")},m(e,i){N(e,t,i),ut(n,t,null),r=!0},p(e,[t]){const r={};259&t&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i(e){r||(Ue(n.$$.fragment,e),r=!0)},o(e){Ve(n.$$.fragment,e),r=!1},d(e){e&&L(t),ct(n)}}}function Bg(e,t,n){let{hovered:r=!1}=t,{color:i="#fff"}=t;const o=_e();return e.$$set=e=>{"hovered"in e&&n(0,r=e.hovered),"color"in e&&n(1,i=e.color)},[r,i,o,function(t){ke(e,t)},()=>o("removeswatch"),()=>o("click"),()=>n(0,r=!0),()=>n(0,r=!1)]}class Wg extends pt{constructor(e){super(),ft(this,e,Bg,zg,d,{hovered:0,color:1})}}function Hg(e){let t,n,r,i,o;return{c(){t=P("div"),n=P("div"),this.h()},l(e){t=Y(e,"DIV",{tabindex:!0,class:!0});var r=K(t);n=Y(r,"DIV",{class:!0,style:!0}),K(n).forEach(L),r.forEach(L),this.h()},h(){H(n,"class","slider-thumb svelte-cn6le8"),H(n,"style",e[3]),H(t,"tabindex","0"),H(t,"class","color-format-slider svelte-cn6le8"),Ne((()=>e[11].call(t))),ie(t,"hue","hue"===e[0]),ie(t,"alpha","alpha"===e[0])},m(a,s){N(a,t,s),D(t,n),e[9](t),r=re(t,e[11].bind(t)),i||(o=[C(Ig.call(null,t,{37:e[5],39:e[6]})),C(Fg.call(null,t)),R(t,"drag",e[10])],i=!0)},p(e,[r]){8&r&&H(n,"style",e[3]),1&r&&ie(t,"hue","hue"===e[0]),1&r&&ie(t,"alpha","alpha"===e[0])},i:a,o:a,d(n){n&&L(t),e[9](null),r(),i=!1,f(o)}}}function Ug(e,t,n){let r,i,{value:o=1}=t,{type:a="hue"}=t;const s=_e();let l,u=0,c="hue"===a?360:1,f="hue"===a?1:.01;const p=e=>e>=0&&e<=c;function d({mouseX:e}){let t=(e/u).toFixed(2);if(t>=0&&t<=1){s("change",{color:"hue"===a?360*t:t})}}return e.$$set=e=>{"value"in e&&n(7,o=e.value),"type"in e&&n(0,a=e.type)},e.$$.update=()=>{131&e.$$.dirty&&n(8,r="hue"===a?u*(o/360):u*o),256&e.$$.dirty&&n(3,i=`transform: translateX(${r-6}px);`)},[a,u,l,i,d,function(){let e=o-f;p(e)&&(n(7,o=e),s("change",{color:o}))},function(){let e=o+f;p(e)&&(n(7,o=e),s("change",{color:o}))},o,r,function(e){Ee[e?"unshift":"push"]((()=>{l=e,n(2,l)}))},e=>d(e.detail),function(){u=this.clientWidth,n(1,u)}]}class Vg extends pt{constructor(e){super(),ft(this,e,Ug,Hg,d,{value:7,type:0})}}function Kg(e){let t,n,r,i,o;return{c(){t=P("div"),n=P("div"),this.h()},l(e){t=Y(e,"DIV",{class:!0,style:!0});var r=K(t);n=Y(r,"DIV",{class:!0,style:!0}),K(n).forEach(L),r.forEach(L),this.h()},h(){H(n,"class","picker svelte-fk9ote"),H(n,"style",e[4]),H(t,"class","palette svelte-fk9ote"),H(t,"style",e[3]),Ne((()=>e[14].call(t)))},m(a,s){N(a,t,s),D(t,n),e[13](t),r=re(t,e[14].bind(t)),i||(o=[C(Fg.call(null,t)),R(t,"drag",e[15])],i=!0)},p(e,r){16&r&&H(n,"style",e[4]),8&r&&H(t,"style",e[3])},d(n){n&&L(t),e[13](null),r(),i=!1,f(o)}}}function Yg(e){let t,n;return t=new Pg({props:{width:"100%",$$slots:{default:[Kg]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(e){lt(t.$$.fragment,e)},m(e,r){ut(t,e,r),n=!0},p(e,[n]){const r={};131103&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(Ue(t.$$.fragment,e),n=!0)},o(e){Ve(t.$$.fragment,e),n=!1},d(e){ct(t,e)}}}function Gg(e,t,n){let r,i,o,a,s;const l=_e();let u,c,{h:f=0}=t,{s:p=0}=t,{v:d=0}=t,{a:h=1}=t,g=0;function m({mouseX:e,mouseY:t}){l("change",{s:e/g*100,v:100-t/c*100})}return e.$$set=e=>{"h"in e&&n(6,f=e.h),"s"in e&&n(7,p=e.s),"v"in e&&n(8,d=e.v),"a"in e&&n(9,h=e.a)},e.$$.update=()=>{130&e.$$.dirty&&n(10,r=p*g/100),257&e.$$.dirty&&n(11,i=c*((100-d)/100)),576&e.$$.dirty&&n(12,o=`linear-gradient(to top, rgba(0, 0, 0, 1), transparent),\n linear-gradient(to left, hsla(${f}, 100%, 50%, ${h}), rgba(255, 255, 255, ${h}))\n `),4096&e.$$.dirty&&n(3,a=`background: ${o};`),3072&e.$$.dirty&&n(4,s=`transform: translate(${r-8}px, ${i-8}px);`)},[c,g,u,a,s,m,f,p,d,h,r,i,o,function(e){Ee[e?"unshift":"push"]((()=>{u=e,n(2,u)}))},function(){c=this.clientHeight,g=this.clientWidth,n(0,c),n(1,g)},e=>m(e.detail)]}class Zg extends pt{constructor(e){super(),ft(this,e,Gg,Yg,d,{h:6,s:7,v:8,a:9})}}function Xg(e){let t,n,r,i;return{c(){t=P("div"),n=q(e[0]),this.h()},l(r){t=Y(r,"DIV",{class:!0,tabindex:!0});var i=K(t);n=G(i,e[0]),i.forEach(L),this.h()},h(){H(t,"class","flatbutton svelte-3agxxj"),H(t,"tabindex","0"),ie(t,"selected",e[1])},m(o,a){N(o,t,a),D(t,n),r||(i=[C(Ig.call(null,t,{Enter:e[4]})),R(t,"click",e[3])],r=!0)},p(e,[r]){1&r&&X(n,e[0]),2&r&&ie(t,"selected",e[1])},i:a,o:a,d(e){e&&L(t),r=!1,f(i)}}}function Jg(e,t,n){let{text:r=""}=t,{selected:i=!1}=t;const o=_e();return e.$$set=e=>{"text"in e&&n(0,r=e.text),"selected"in e&&n(1,i=e.selected)},[r,i,o,function(t){ke(e,t)},()=>o("click")]}class Qg extends pt{constructor(e){super(),ft(this,e,Jg,Xg,d,{text:0,selected:1})}}function em(e,t,n){const r=e.slice();return r[4]=t[n],r}function tm(e){let t,n;return t=new Qg({props:{selected:e[0]===e[4],text:e[4]}}),t.$on("click",(function(){return e[3](e[4])})),{c(){st(t.$$.fragment)},l(e){lt(t.$$.fragment,e)},m(e,r){ut(t,e,r),n=!0},p(n,r){e=n;const i={};1&r&&(i.selected=e[0]===e[4]),t.$set(i)},i(e){n||(Ue(t.$$.fragment,e),n=!0)},o(e){Ve(t.$$.fragment,e),n=!1},d(e){ct(t,e)}}}function nm(e){let t,n,r=e[2],i=[];for(let a=0;aVe(i[e],1,1,(()=>{i[e]=null}));return{c(){t=P("div");for(let e=0;e{"format"in e&&n(0,i=e.format)},[i,r,["hex","rgb","hsl"],e=>r("click",e)]}class im extends pt{constructor(e){super(),ft(this,e,rm,nm,d,{format:0})}}function om(e){let t,n,r,i;return{c(){t=P("div"),n=P("input"),this.h()},l(e){t=Y(e,"DIV",{class:!0});var r=K(t);n=Y(r,"INPUT",{type:!0,value:!0,maxlength:!0,class:!0}),r.forEach(L),this.h()},h(){H(n,"type","text"),n.value=e[0],H(n,"maxlength","25"),H(n,"class","svelte-1cnq0e1"),H(t,"class","svelte-1cnq0e1")},m(o,a){N(o,t,a),D(t,n),r||(i=[R(n,"input",e[1]),R(n,"change",e[2])],r=!0)},p(e,[t]){1&t&&n.value!==e[0]&&(n.value=e[0])},i:a,o:a,d(e){e&&L(t),r=!1,f(i)}}}function am(e,t,n){let{value:r=""}=t;return e.$$set=e=>{"value"in e&&n(0,r=e.value)},[r,function(t){ke(e,t)},function(t){ke(e,t)}]}class sm extends pt{constructor(e){super(),ft(this,e,am,om,d,{value:0})}}const lm=/[a-z()\s]/gi,um=e=>e.replace(lm,"").split(",").map((e=>""!==e?e:void 0)),cm=e=>{const t=um(e),[n,r,i,o]=t;let a=e.startsWith("rgb(")&&3===t.length||e.startsWith("rgba(")&&4===t.length,s=[n,r,i].every((e=>e>=0&&e<=255)),l=!e.startsWith("rgba(")||`${o}`.length<=4&&o>=0&&o<=1;return a&&s&&l},fm=e=>{const t=um(e),[n,r,i,o]=t;if([n,r,i].some((e=>void 0===e)))return!1;let a=e.startsWith("hsl(")&&3===t.length||e.startsWith("hsla(")&&4===t.length,s=n>=0&&n<=360,l=[r,i].every((e=>e.endsWith("%")&&parseInt(e)>=0&&parseInt(e)<=100)),u=!e.startsWith("hsla(")||`${o}`.length<=4&&o>=0&&o<=1;return a&&s&&l&&u},pm=e=>{if("string"==typeof e){if(/^#(?:[A-F0-9]{3}$|[A-F0-9]{4}$|[A-F0-9]{6}$|[A-F0-9]{8})$/gi.test(e))return"hex";if((e=>{if(/^(?:rgba\(|rgb\()(?:[0-9,\s]|\.(?=\d))*\)$/gi.test(e))return cm(e.toLowerCase())})(e))return"rgb";if((e=>{if(/^(?:hsl\(|hsla\()(?:[0-9,%\s]|\.(?=\d))*\)$/gi.test(e))return fm(e.toLowerCase())})(e))return"hsl"}},dm=(e,t)=>{switch(t){case"hex":return _m(e,!0);case"rgb":return wm(e,!0);case"hsl":return xm(e)}},hm=e=>{let[t,n,r,i]=(e=>{if(e.length<=5)return e.match(/[A-F0-9]/gi).map((e=>e+e));return e.match(/[A-F0-9]{2}/gi)})(e);return vm([t,n,r],i)},gm=e=>{let t=um(e);return ym(t)},mm=e=>{let t=um(e);return bm(t)},vm=(e,t="FF")=>{const n=e.map((e=>parseInt(e,16))).concat(Number((parseInt(t,16)/255).toFixed(2)));return ym(n)},ym=e=>{const[t,n,r,i=1]=e;return[...Cm([t,n,r]),i].map((e=>parseFloat(e)))},bm=([e,t,n,r=1])=>{let i=t.replace(/%/,""),o=n.replace(/%/,"");return[...km([e,i,o]),r].map((e=>parseFloat(e)))},_m=(e,t=!1)=>{const[n,r,i,o]=wm(e),a=e=>1===e.length?`0${e}`:e;let s=[n,r,i].map((e=>{let t=Math.round(e).toString(16);return a(t)})),l=a(Math.round(255*o).toString(16));return s=[...s,l],t?`#${s.join("")}`:s},wm=([e,t,n,r=1],i=!1)=>{let o=[...Em([e,t,n]).map((e=>Math.round(e))),r<1?Am(r,2):r];return i?`rgba(${o.join(",")})`:o},xm=([e,t,n,r=1])=>{let[i,o,a]=Om([e,t,n]);return`hsla(${[i,o+"%",a+"%",r<1?Am(r,2):r].join(",")})`},km=e=>{const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o;return[t,100*(0===r?2*i/(o+i):2*n/(r+n)),100*((r+n)/2)]},Cm=e=>{let t,n,r,i,o;const a=e[0]/255,s=e[1]/255,l=e[2]/255,u=Math.max(a,s,l),c=u-Math.min(a,s,l),f=function(e){return(u-e)/6/c+.5};0===c?(i=0,o=0):(o=c/u,t=f(a),n=f(s),r=f(l),a===u?i=r-n:s===u?i=1/3+t-r:l===u&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1));return[360*i,100*o,100*u].map((e=>Math.round(e)))},Em=e=>{const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}},Om=e=>{const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let o,a;a=(2-n)*r;const s=(2-n)*i;return o=n*i,o/=s<=1?s:2-s,o=o||0,a/=2,[Am(t,0),Am(100*o,0),Am(100*a,0)]},Am=(e,t)=>Number(parseFloat(e).toFixed(t));function Sm(e,t,n){const r=e.slice();return r[41]=t[n],r[43]=n,r}function jm(e){let t;return{c(){t=P("div"),this.h()},l(e){t=Y(e,"DIV",{class:!0,title:!0,style:!0}),K(t).forEach(L),this.h()},h(){H(t,"class","selected-color svelte-dwzpo6"),H(t,"title",e[0]),H(t,"style",e[13])},m(e,n){N(e,t,n)},p(e,n){1&n[0]&&H(t,"title",e[0]),8192&n[0]&&H(t,"style",e[13])},d(e){e&&L(t)}}}function Tm(e){let t,n;return t=new Vg({props:{type:"alpha",value:e[12]}}),t.$on("change",e[28]),{c(){st(t.$$.fragment)},l(e){lt(t.$$.fragment,e)},m(e,r){ut(t,e,r),n=!0},p(e,n){const r={};4096&n[0]&&(r.value=e[12]),t.$set(r)},i(e){n||(Ue(t.$$.fragment,e),n=!0)},o(e){Ve(t.$$.fragment,e),n=!1},d(e){ct(t,e)}}}function Dm(e){let t,n,r,i,o=e[14]&&Nm(e),a=e[1].length<12&&Mm(e);return{c(){t=P("div"),o&&o.c(),n=I(),a&&a.c(),this.h()},l(e){t=Y(e,"DIV",{class:!0});var r=K(t);o&&o.l(r),n=Z(r),a&&a.l(r),r.forEach(L),this.h()},h(){H(t,"class","swatch-panel svelte-dwzpo6")},m(e,r){N(e,t,r),o&&o.m(t,null),D(t,n),a&&a.m(t,null),i=!0},p(e,r){e[14]?o?(o.p(e,r),16384&r[0]&&Ue(o,1)):(o=Nm(e),o.c(),Ue(o,1),o.m(t,n)):o&&(We(),Ve(o,1,1,(()=>{o=null})),He()),e[1].length<12?a?(a.p(e,r),2&r[0]&&Ue(a,1)):(a=Mm(e),a.c(),Ue(a,1),a.m(t,null)):a&&(We(),Ve(a,1,1,(()=>{a=null})),He())},i(e){i||(Ue(o),Ue(a),Ne((()=>{r||(r=Ze(t,uu,{},!0)),r.run(1)})),i=!0)},o(e){Ve(o),Ve(a),r||(r=Ze(t,uu,{},!1)),r.run(0),i=!1},d(e){e&&L(t),o&&o.d(),a&&a.d(),e&&r&&r.end()}}}function Nm(e){let t,n,r=e[1],i=[];for(let a=0;aVe(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e{i||(i=Ze(t,uu,{},!0)),i.run(1)})),o=!0)},o(e){i||(i=Ze(t,uu,{},!1)),i.run(0),o=!1},d(n){n&&L(t),e[31](null),n&&i&&i.end(),a=!1,f(s)}}}function Pm(e){let t,n,r,i,o,a,s,l,u,c,f,p,d,h,g,m,v,y,b,_,w,x,k,E;r=new Zg({props:{h:e[11],s:e[7],v:e[8],a:e[12]}}),r.$on("change",e[16]),l=new Pg({props:{borderRadius:"50%",backgroundSize:"8px",$$slots:{default:[jm]},$$scope:{ctx:e}}}),f=new Vg({props:{type:"hue",value:e[11]}}),f.$on("change",e[27]),d=new Pg({props:{borderRadius:"10px",backgroundSize:"7px",$$slots:{default:[Tm]},$$scope:{ctx:e}}});let O=!e[5]&&Dm(e);return v=new im({props:{format:e[2]}}),v.$on("click",e[19]),b=new sm({props:{value:e[0]}}),b.$on("input",e[32]),b.$on("change",e[21]),{c(){t=P("div"),n=P("div"),st(r.$$.fragment),i=I(),o=P("div"),a=P("div"),s=P("div"),st(l.$$.fragment),u=I(),c=P("div"),st(f.$$.fragment),p=I(),st(d.$$.fragment),h=I(),O&&O.c(),g=I(),m=P("div"),st(v.$$.fragment),y=I(),st(b.$$.fragment),this.h()},l(e){t=Y(e,"DIV",{class:!0,style:!0,tabindex:!0});var _=K(t);n=Y(_,"DIV",{class:!0});var w=K(n);lt(r.$$.fragment,w),w.forEach(L),i=Z(_),o=Y(_,"DIV",{class:!0});var x=K(o);a=Y(x,"DIV",{class:!0});var k=K(a);s=Y(k,"DIV",{});var C=K(s);lt(l.$$.fragment,C),C.forEach(L),u=Z(k),c=Y(k,"DIV",{});var E=K(c);lt(f.$$.fragment,E),p=Z(E),lt(d.$$.fragment,E),E.forEach(L),k.forEach(L),h=Z(x),O&&O.l(x),g=Z(x),m=Y(x,"DIV",{class:!0});var A=K(m);lt(v.$$.fragment,A),y=Z(A),lt(b.$$.fragment,A),A.forEach(L),x.forEach(L),_.forEach(L),this.h()},h(){H(n,"class","palette-panel svelte-dwzpo6"),H(a,"class","alpha-hue-panel svelte-dwzpo6"),H(m,"class","format-input-panel svelte-dwzpo6"),H(o,"class","control-panel svelte-dwzpo6"),H(t,"class","colorpicker-container svelte-dwzpo6"),H(t,"style",e[6]),H(t,"tabindex","0"),Ne((()=>e[34].call(t)))},m(w,A){N(w,t,A),D(t,n),ut(r,n,null),D(t,i),D(t,o),D(o,a),D(a,s),ut(l,s,null),D(a,u),D(a,c),ut(f,c,null),D(c,p),ut(d,c,null),D(o,h),O&&O.m(o,null),D(o,g),D(o,m),ut(v,m,null),D(m,y),ut(b,m,null),e[33](t),_=re(t,e[34].bind(t)),x=!0,k||(E=C(Ig.call(null,t,{Escape:e[15]})),k=!0)},p(e,n){const i={};2048&n[0]&&(i.h=e[11]),128&n[0]&&(i.s=e[7]),256&n[0]&&(i.v=e[8]),4096&n[0]&&(i.a=e[12]),r.$set(i);const a={};8193&n[0]|8192&n[1]&&(a.$$scope={dirty:n,ctx:e}),l.$set(a);const s={};2048&n[0]&&(s.value=e[11]),f.$set(s);const u={};4096&n[0]|8192&n[1]&&(u.$$scope={dirty:n,ctx:e}),d.$set(u),e[5]?O&&(We(),Ve(O,1,1,(()=>{O=null})),He()):O?(O.p(e,n),32&n[0]&&Ue(O,1)):(O=Dm(e),O.c(),Ue(O,1),O.m(o,g));const c={};4&n[0]&&(c.format=e[2]),v.$set(c);const p={};1&n[0]&&(p.value=e[0]),b.$set(p),(!x||64&n[0])&&H(t,"style",e[6])},i(e){x||(Ue(r.$$.fragment,e),Ue(l.$$.fragment,e),Ue(f.$$.fragment,e),Ue(d.$$.fragment,e),Ue(O),Ue(v.$$.fragment,e),Ue(b.$$.fragment,e),Ne((()=>{w||(w=Ze(t,uu,{},!0)),w.run(1)})),x=!0)},o(e){Ve(r.$$.fragment,e),Ve(l.$$.fragment,e),Ve(f.$$.fragment,e),Ve(d.$$.fragment,e),Ve(O),Ve(v.$$.fragment,e),Ve(b.$$.fragment,e),w||(w=Ze(t,uu,{},!1)),w.run(0),x=!1},d(n){n&&L(t),ct(r),ct(l),ct(f),ct(d),O&&O.d(),ct(v),ct(b),e[33](null),_(),n&&w&&w.end(),k=!1,E()}}}function Fm(e){let t,n;return t=new jg({props:{$$slots:{default:[Pm]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(e){lt(t.$$.fragment,e)},m(e,r){ut(t,e,r),n=!0},p(e,n){const r={};32767&n[0]|8192&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(Ue(t.$$.fragment,e),n=!0)},o(e){Ve(t.$$.fragment,e),n=!1},d(e){ct(t,e)}}}function qm(){let e=localStorage.getItem("cp:recent-colors");if(e)return JSON.parse(e)}function Im(e,t,n){let r,i,o,{value:a="#3ec1d3ff"}=t,{open:s=!1}=t,{swatches:l=[]}=t,{disableSwatches:u=!1}=t,{format:c="hexa"}=t,{style:f=""}=t,{pickerHeight:p=0}=t,{pickerWidth:d=0}=t,h=null,g=null,m=!1,v=0,y=0,b=0,_=0;const w=_e();function x(e){const t=m?l:[...qm(),e];localStorage.setItem("cp:recent-colors",JSON.stringify(t))}function k(){!function([e,t,r,i]){n(11,v=e),n(7,y=t),n(8,b=r),n(12,_=i)}(((e,t)=>{switch(t){case"hex":return hm(e);case"rgb":return gm(e);case"hsl":return mm(e)}})(a,c))}function C({color:e,isDrag:t}){n(11,v=e),n(0,a=dm([v,y,b,_],c)),t||O()}function E({color:e,isDrag:t}){n(12,_="1.00"===e?"1":e),n(0,a=dm([v,y,b,_],c)),t||O()}function O(){w("change",a)}function A(e){n(2,c=pm(e)),c&&(n(0,a=e),k())}function S(e){let[t]=l.splice(e,1);n(1,l),w("removeswatch",t),m&&x()}function j(e){a!==e&&(n(2,c=pm(e)),c&&(n(0,a=e),k(),O()))}ve((()=>{!l.length>0&&(m=!0,n(1,l=qm()||[])),l.length>12&&console.warn(`Colorpicker - ${l.length} swatches were provided. Only the first 12 swatches will be displayed.`),h&&h.focus(),c&&k()}));return e.$$set=e=>{"value"in e&&n(0,a=e.value),"open"in e&&n(25,s=e.open),"swatches"in e&&n(1,l=e.swatches),"disableSwatches"in e&&n(5,u=e.disableSwatches),"format"in e&&n(2,c=e.format),"style"in e&&n(6,f=e.style),"pickerHeight"in e&&n(3,p=e.pickerHeight),"pickerWidth"in e&&n(4,d=e.pickerWidth)},e.$$.update=()=>{384&e.$$.dirty[0]&&n(26,r=b>90&&y<5?"1px dashed #dedada":""),67108865&e.$$.dirty[0]&&n(13,i=Tg({background:a,border:r})),2&e.$$.dirty[0]&&n(14,o=l.length>0)},[a,l,c,p,d,u,f,y,b,h,g,v,_,i,o,function(){s&&n(25,s=!1)},function({detail:e}){n(7,y=e.s),n(8,b=e.v),n(0,a=dm([v,y,b,_],c)),O()},C,E,function(e){n(2,c=e.detail),n(0,a=dm([v,y,b,_],c))},A,function(){c&&O()},function(){c&&(12===l.length&&l.splice(0,1),l.includes(a)||(n(1,l=[...l,a]),x(a)),w("addswatch",a))},S,j,s,r,e=>C(e.detail),(e,t)=>E(e.detail),e=>j(e),e=>S(e),function(e){Ee[e?"unshift":"push"]((()=>{g=e,n(10,g)}))},e=>A(e.target.value),function(e){Ee[e?"unshift":"push"]((()=>{h=e,n(9,h)}))},function(){p=this.clientHeight,d=this.clientWidth,n(3,p),n(4,d)}]}class $m extends pt{constructor(e){super(),ft(this,e,Im,Fm,d,{value:0,open:25,swatches:1,disableSwatches:5,format:2,style:6,pickerHeight:3,pickerWidth:4},[-1,-1])}}const{window:Rm}=Je;function zm(e){let t,n,r;return{c(){t=P("div"),n=P("span"),r=q("×"),this.h()},l(e){t=Y(e,"DIV",{class:!0,title:!0,style:!0});var i=K(t);n=Y(i,"SPAN",{});var o=K(n);r=G(o,"×"),o.forEach(L),i.forEach(L),this.h()},h(){H(t,"class","color-preview preview-error svelte-1y4si7g"),H(t,"title","Invalid Color"),H(t,"style",e[12])},m(e,i){N(e,t,i),D(t,n),D(n,r)},p(e,n){4096&n[0]&&H(t,"style",e[12])},i:a,o:a,d(e){e&&L(t)}}}function Bm(e){let t,n,r,i;t=new Pg({props:{borderRadius:"3px",backgroundSize:"8px",$$slots:{default:[Wm]},$$scope:{ctx:e}}});let o=e[1]&&Hm(e);return{c(){st(t.$$.fragment),n=I(),o&&o.c(),r=$()},l(e){lt(t.$$.fragment,e),n=Z(e),o&&o.l(e),r=$()},m(e,a){ut(t,e,a),N(e,n,a),o&&o.m(e,a),N(e,r,a),i=!0},p(e,n){const i={};2257&n[0]|8&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i),e[1]?o?(o.p(e,n),2&n[0]&&Ue(o,1)):(o=Hm(e),o.c(),Ue(o,1),o.m(r.parentNode,r)):o&&(We(),Ve(o,1,1,(()=>{o=null})),He())},i(e){i||(Ue(t.$$.fragment,e),Ue(o),i=!0)},o(e){Ve(t.$$.fragment,e),Ve(o),i=!1},d(e){ct(t,e),e&&L(n),o&&o.d(e),e&&L(r)}}}function Wm(e){let t,n,r,i;return{c(){t=P("div"),this.h()},l(e){t=Y(e,"DIV",{title:!0,class:!0,style:!0}),K(t).forEach(L),this.h()},h(){H(t,"title",e[0]),H(t,"class","color-preview svelte-1y4si7g"),H(t,"style",e[11]),Ne((()=>e[23].call(t)))},m(o,a){N(o,t,a),e[22](t),n=re(t,e[23].bind(t)),r||(i=R(t,"click",e[14]),r=!0)},p(e,n){1&n[0]&&H(t,"title",e[0]),2048&n[0]&&H(t,"style",e[11])},d(o){o&&L(t),e[22](null),n(),r=!1,i()}}}function Hm(e){let t,n,r,i,o,a,s,l,u,c,f;function p(t){e[24](t)}function d(t){e[25](t)}function h(t){e[26](t)}function g(t){e[27](t)}function m(t){e[28](t)}let v={style:e[13],swatches:e[2],disableSwatches:e[3]};return void 0!==e[5]&&(v.format=e[5]),void 0!==e[0]&&(v.value=e[0]),void 0!==e[9]&&(v.pickerHeight=e[9]),void 0!==e[8]&&(v.pickerWidth=e[8]),void 0!==e[1]&&(v.open=e[1]),t=new $m({props:v}),Ee.push((()=>at(t,"format",p))),Ee.push((()=>at(t,"value",d))),Ee.push((()=>at(t,"pickerHeight",h))),Ee.push((()=>at(t,"pickerWidth",g))),Ee.push((()=>at(t,"open",m))),t.$on("change",e[15]),t.$on("addswatch",e[29]),t.$on("removeswatch",e[30]),{c(){st(t.$$.fragment),s=I(),l=P("div"),this.h()},l(e){lt(t.$$.fragment,e),s=Z(e),l=Y(e,"DIV",{class:!0}),K(l).forEach(L),this.h()},h(){H(l,"class","overlay svelte-1y4si7g")},m(n,r){ut(t,n,r),N(n,s,r),N(n,l,r),u=!0,c||(f=R(l,"click",W(e[31])),c=!0)},p(e,s){const l={};8192&s[0]&&(l.style=e[13]),4&s[0]&&(l.swatches=e[2]),8&s[0]&&(l.disableSwatches=e[3]),!n&&32&s[0]&&(n=!0,l.format=e[5],Le((()=>n=!1))),!r&&1&s[0]&&(r=!0,l.value=e[0],Le((()=>r=!1))),!i&&512&s[0]&&(i=!0,l.pickerHeight=e[9],Le((()=>i=!1))),!o&&256&s[0]&&(o=!0,l.pickerWidth=e[8],Le((()=>o=!1))),!a&&2&s[0]&&(a=!0,l.open=e[1],Le((()=>a=!1))),t.$set(l)},i(e){u||(Ue(t.$$.fragment,e),u=!0)},o(e){Ve(t.$$.fragment,e),u=!1},d(e){ct(t,e),e&&L(s),e&&L(l),c=!1,f()}}}function Um(e){let t,n,r,i,o,a;const s=[Bm,zm],l=[];function u(e,t){return e[10]?1:0}return n=u(e),r=l[n]=s[n](e),{c(){t=P("div"),r.c(),this.h()},l(e){t=Y(e,"DIV",{class:!0});var n=K(t);r.l(n),n.forEach(L),this.h()},h(){H(t,"class","color-preview-container svelte-1y4si7g")},m(r,s){N(r,t,s),l[n].m(t,null),i=!0,o||(a=R(Rm,"resize",Ng(e[16],200)),o=!0)},p(e,i){let o=n;n=u(e),n===o?l[n].p(e,i):(We(),Ve(l[o],1,1,(()=>{l[o]=null})),He(),r=l[n],r?r.p(e,i):(r=l[n]=s[n](e),r.c()),Ue(r,1),r.m(t,null))},i(e){i||(Ue(r),i=!0)},o(e){Ve(r),i=!1},d(e){e&&L(t),l[n].d(),o=!1,a()}}}function Vm(e,t,n){let r,i,o,{value:a="#3ec1d3ff"}=t,{swatches:s=[]}=t,{disableSwatches:l=!1}=t,{open:u=!1}=t,{width:c="25px"}=t,{height:f="25px"}=t,p="hexa",d={top:0,bottom:0,right:0,left:0},h="top",g="left",m=null,v=null,y=null,b=0,_=0,w=null;const x=_e();var k;function C(){if(u){const{top:e,width:t,bottom:r,right:i,left:o}=m.getBoundingClientRect(),a=window.innerHeight-r,s=y/2;let l,u;e>a?(n(20,h="bottom"),l=window.innerHeight-e):(n(20,h="top"),l=r),u=o+s-110;const c=window.innerWidth-i;o<110&&c>220?(n(21,g="left"),u=i):c<100&&o>220&&(n(21,g="right"),u=document.body.clientWidth-o),n(19,d={[h]:l.toFixed(1),[g]:u.toFixed(1)})}}k=()=>{n(5,p=pm(a)),p?n(10,w=null):(n(10,w=`Colorpicker - ${a} is an unknown color format. Please use a hex, rgb or hsl value`),console.error(w))},me().$$.before_update.push(k);return e.$$set=e=>{"value"in e&&n(0,a=e.value),"swatches"in e&&n(2,s=e.swatches),"disableSwatches"in e&&n(3,l=e.disableSwatches),"open"in e&&n(1,u=e.open),"width"in e&&n(17,c=e.width),"height"in e&&n(18,f=e.height)},e.$$.update=()=>{18&e.$$.dirty[0]&&u&&m&&C(),393217&e.$$.dirty[0]&&n(11,r=Tg({width:c,height:f,background:a})),393216&e.$$.dirty[0]&&n(12,i=Tg({width:c,height:f})),3670016&e.$$.dirty[0]&&n(13,o=Tg({[h]:`${d[h]}px`,[g]:`${d[g]}px`}))},[a,u,s,l,m,p,v,y,b,_,w,r,i,o,function(e){m&&n(1,u=!0)},function(e){var t;n(0,a=e.detail),t=a,Ng((()=>x("change",t)),300,!0)},C,c,f,d,h,g,function(e){Ee[e?"unshift":"push"]((()=>{m=e,n(4,m)}))},function(){v=this.clientHeight,y=this.clientWidth,n(6,v),n(7,y)},function(e){p=e,n(5,p)},function(e){a=e,n(0,a)},function(e){_=e,n(9,_)},function(e){b=e,n(8,b)},function(e){u=e,n(1,u)},function(t){ke(e,t)},function(t){ke(e,t)},()=>n(1,u=!1)]}class Km extends pt{constructor(e){super(),ft(this,e,Vm,Um,d,{value:0,swatches:2,disableSwatches:3,open:1,width:17,height:18},[-1,-1])}}function Ym(e,t,n={}){const r=getComputedStyle(e),i="none"===r.transform?"":r.transform,o=t.from.width/e.clientWidth,a=t.from.height/e.clientHeight,s=(t.from.left-t.to.left)/o,l=(t.from.top-t.to.top)/a,u=Math.sqrt(s*s+l*l),{delay:c=0,duration:f=(e=>120*Math.sqrt(e)),easing:d=lu}=n;return{delay:c,duration:p(f)?f(u):f,easing:d,css:(e,t)=>`transform: ${i} translate(${t*s}px, ${t*l}px);`}}function Gm(e,t,n){e.dispatchEvent(new CustomEvent("finalize",{detail:{items:t,info:n}}))}function Zm(e,t,n){e.dispatchEvent(new CustomEvent("consider",{detail:{items:t,info:n}}))}const Xm="leftForAnother",Jm="outsideOfAny";function Qm(e,t,n){e.dispatchEvent(new CustomEvent("draggedEntered",{detail:{indexObj:t,draggedEl:n}}))}function ev(e,t,n){e.dispatchEvent(new CustomEvent("draggedLeft",{detail:{draggedEl:t,type:Xm,theOtherDz:n}}))}function tv(e,t,n){e.dispatchEvent(new CustomEvent("draggedOverIndex",{detail:{indexObj:t,draggedEl:n}}))}const nv="dragStarted",rv="draggedEntered",iv="dragEnteredAnother",ov="draggedOverIndex",av="draggedLeft",sv="draggedLeftAll",lv="droppedIntoZone",uv="droppedIntoAnother",cv="droppedOutsideOfAny",fv="dragStopped",pv="pointer",dv="keyboard";let hv=0;function gv(){hv++}function mv(){if(0===hv)throw new Error("Bug! trying to decrement when there are no dropzones");hv--}const vv="undefined"==typeof window;function yv(e){let t;const n=e.getBoundingClientRect(),r=getComputedStyle(e),i=r.transform;if(i){let o,a,s,l;if(i.startsWith("matrix3d("))t=i.slice(9,-1).split(/, /),o=+t[0],a=+t[5],s=+t[12],l=+t[13];else{if(!i.startsWith("matrix("))return n;t=i.slice(7,-1).split(/, /),o=+t[0],a=+t[3],s=+t[4],l=+t[5]}const u=r.transformOrigin,c=n.x-s-(1-o)*parseFloat(u),f=n.y-l-(1-a)*parseFloat(u.slice(u.indexOf(" ")+1)),p=o?n.width/o:e.offsetWidth,d=a?n.height/a:e.offsetHeight;return{x:c,y:f,width:p,height:d,top:f,right:c+p,bottom:f+d,left:c}}return n}function bv(e){const t=yv(e);return{top:t.top+window.scrollY,bottom:t.bottom+window.scrollY,left:t.left+window.scrollX,right:t.right+window.scrollX}}function _v(e){const t=e.getBoundingClientRect();return{top:t.top+window.scrollY,bottom:t.bottom+window.scrollY,left:t.left+window.scrollX,right:t.right+window.scrollX}}function wv(e,t){return e.y<=t.bottom&&e.y>=t.top&&e.x>=t.left&&e.x<=t.right}function xv(e){return{x:((t=_v(e)).left+t.right)/2,y:(t.top+t.bottom)/2};var t}function kv(e,t){return wv(xv(e),bv(t))}function Cv(e,t){const n=xv(e),r=xv(t);return i=n,o=r,Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2));var i,o}let Ev;function Ov(){Ev=new Map}function Av(e,t){if(!kv(e,t))return null;const n=t.children;if(0===n.length)return{index:0,isProximityBased:!0};const r=function(e){const t=Array.from(e.children).findIndex((e=>e.getAttribute("data-is-dnd-shadow-item")));if(t>=0)return Ev.has(e)||Ev.set(e,new Map),Ev.get(e).set(t,bv(e.children[t])),t}(t);for(let a=0;an(t))))}function r(e){return 25-e}return t(),{scrollIfNeeded:function(i,o){if(!o)return!1;const a=function(e,t){const n=_v(t);return wv(e,n)?{top:e.y-n.top,bottom:n.bottom-e.y,left:e.x-n.left,right:Math.min(n.right,document.documentElement.clientWidth)-e.x}:null}(i,o);if(null===a)return t(),!1;const s=!!e.directionObj;let[l,u]=[!1,!1];return o.scrollHeight>o.clientHeight&&(a.bottom<25?(l=!0,e.directionObj={x:0,y:1},e.stepPx=r(a.bottom)):a.top<25&&(l=!0,e.directionObj={x:0,y:-1},e.stepPx=r(a.top)),!s&&l)||o.scrollWidth>o.clientWidth&&(a.right<25?(u=!0,e.directionObj={x:1,y:0},e.stepPx=r(a.right)):a.left<25&&(u=!0,e.directionObj={x:-1,y:0},e.stepPx=r(a.left)),!s&&u)?(n(o),!0):(t(),!1)},resetScrolling:t}}function jv(e){return JSON.stringify(e,null,2)}function Tv(e){if(!e)throw new Error("cannot get depth of a falsy node");return Dv(e,0)}function Dv(e,t=0){return e.parentElement?Dv(e.parentElement,t+1):t-1}const{scrollIfNeeded:Nv,resetScrolling:Lv}=Sv();let Mv;function Pv(e,t,n=200){let r,i,o,a=!1;const s=Array.from(t).sort(((e,t)=>Tv(t)-Tv(e)));!function t(){const l=xv(e);if(!Nv(l,r)&&o&&Math.abs(o.x-l.x)<10&&Math.abs(o.y-l.y)<10)return void(Mv=window.setTimeout(t,n));if(function(e){const t=_v(e);return t.right<0||t.left>document.documentElement.scrollWidth||t.bottom<0||t.top>document.documentElement.scrollHeight}(e))return void function(e){window.dispatchEvent(new CustomEvent("draggedLeftDocument",{detail:{draggedEl:e}}))}(e);o=l;let u=!1;for(const n of s){const t=Av(e,n);if(null===t)continue;const{index:o}=t;u=!0,n!==r?(r&&ev(r,e,n),Qm(n,t,e),r=n):o!==i&&(tv(n,t,e),i=o);break}!u&&a&&r?(!function(e,t){e.dispatchEvent(new CustomEvent("draggedLeft",{detail:{draggedEl:t,type:Jm}}))}(r,e),r=void 0,i=void 0,a=!1):a=!0,Mv=window.setTimeout(t,n)}()}let Fv;function qv(e){const t=e.touches?e.touches[0]:e;Fv={x:t.clientX,y:t.clientY}}const{scrollIfNeeded:Iv,resetScrolling:$v}=Sv();let Rv;function zv(){Fv&&Iv(Fv,document.documentElement),Rv=window.setTimeout(zv,300)}function Bv(e){return`${e} 0.2s ease`}function Wv(e,t,n,r,i){const o=t.getBoundingClientRect(),a=e.getBoundingClientRect(),s=o.width-a.width,l=o.height-a.height;if(s||l){const t={left:(n-a.left)/a.width,top:(r-a.top)/a.height};e.style.height=`${o.height}px`,e.style.width=`${o.width}px`,e.style.left=parseFloat(e.style.left)-t.left*s+"px",e.style.top=parseFloat(e.style.top)-t.top*l+"px"}Hv(t,e),i()}function Hv(e,t){const n=window.getComputedStyle(e);Array.from(n).filter((e=>e.startsWith("background")||e.startsWith("padding")||e.startsWith("font")||e.startsWith("text")||e.startsWith("align")||e.startsWith("justify")||e.startsWith("display")||e.startsWith("flex")||e.startsWith("border")||"opacity"===e||"color"===e||"list-style-type"===e)).forEach((e=>t.style.setProperty(e,n.getPropertyValue(e),n.getPropertyPriority(e))))}function Uv(e,t){e.draggable=!1,e.ondragstart=()=>!1,t?(e.style.userSelect="",e.style.WebkitUserSelect="",e.style.cursor=""):(e.style.userSelect="none",e.style.WebkitUserSelect="none",e.style.cursor="grab")}function Vv(e,t=(()=>{}),n=(()=>[])){e.forEach((e=>{const r=t(e);Object.keys(r).forEach((t=>{e.style[t]=r[t]})),n(e).forEach((t=>e.classList.add(t)))}))}function Kv(e,t=(()=>{}),n=(()=>[])){e.forEach((e=>{const r=t(e);Object.keys(r).forEach((t=>{e.style[t]=""})),n(e).forEach((t=>e.classList.contains(t)&&e.classList.remove(t)))}))}const Yv={outline:"rgba(255, 255, 102, 0.7) solid 2px"};let Gv,Zv,Xv,Jv,Qv,ey,ty,ny,ry,iy,oy,ay=!1,sy=!1,ly=!1;const uy=new Map,cy=new Map,fy=new WeakMap;function py(e,t){uy.get(t).delete(e),mv(),0===uy.get(t).size&&uy.delete(t)}function dy(){window.addEventListener("mousemove",qv),window.addEventListener("touchmove",qv),zv();const e=uy.get(Jv);for(const n of e)n.addEventListener("draggedEntered",my),n.addEventListener("draggedLeft",vy),n.addEventListener("draggedOverIndex",yy);window.addEventListener("draggedLeftDocument",_y);const t=Math.max(100,...Array.from(e.keys()).map((e=>cy.get(e).dropAnimationDurationMs)));Pv(Zv,e,1.07*t)}function hy(){window.removeEventListener("mousemove",qv),window.removeEventListener("touchmove",qv),Fv=void 0,window.clearTimeout(Rv),$v();const e=uy.get(Jv);for(const t of e)t.removeEventListener("draggedEntered",my),t.removeEventListener("draggedLeft",vy),t.removeEventListener("draggedOverIndex",yy);window.removeEventListener("draggedLeftDocument",_y),clearTimeout(Mv),Lv(),Ov()}function gy(e){return e.findIndex((e=>!!e.isDndShadowItem&&"id:dnd-shadow-placeholder-0000"!==e.id))}function my(e){let{items:t,dropFromOthersDisabled:n}=cy.get(e.currentTarget);if(n&&e.currentTarget!==Qv)return;if(ly=!1,t=t.filter((e=>e.id!==ty.id)),Qv!==e.currentTarget){const e=cy.get(Qv).items.filter((e=>!e.isDndShadowItem));Zm(Qv,e,{trigger:iv,id:Xv.id,source:pv})}else{const e=function(e){return e.findIndex((e=>"id:dnd-shadow-placeholder-0000"===e.id))}(t);-1!==e&&t.splice(e,1)}const{index:r,isProximityBased:i}=e.detail.indexObj,o=i&&r===e.currentTarget.children.length-1?r+1:r;ny=e.currentTarget,t.splice(o,0,ty),Zm(e.currentTarget,t,{trigger:rv,id:Xv.id,source:pv})}function vy(e){const{items:t,dropFromOthersDisabled:n}=cy.get(e.currentTarget);if(n&&e.currentTarget!==Qv)return;const r=gy(t),i=t.splice(r,1)[0];ny=void 0;const{type:o,theOtherDz:a}=e.detail;if(o===Jm||o===Xm&&a!==Qv&&cy.get(a).dropFromOthersDisabled){ly=!0,ny=Qv;const e=cy.get(Qv).items;e.splice(ey,0,i),Zm(Qv,e,{trigger:sv,id:Xv.id,source:pv})}Zm(e.currentTarget,t,{trigger:av,id:Xv.id,source:pv})}function yy(e){const{items:t,dropFromOthersDisabled:n}=cy.get(e.currentTarget);if(n&&e.currentTarget!==Qv)return;ly=!1;const{index:r}=e.detail.indexObj,i=gy(t);t.splice(i,1),t.splice(r,0,ty),Zm(e.currentTarget,t,{trigger:ov,id:Xv.id,source:pv})}function by(e){e.preventDefault();const t=e.touches?e.touches[0]:e;iy={x:t.clientX,y:t.clientY},Zv.style.transform=`translate3d(${iy.x-ry.x}px, ${iy.y-ry.y}px, 0)`}function _y(){sy=!0,window.removeEventListener("mousemove",by),window.removeEventListener("touchmove",by),window.removeEventListener("mouseup",_y),window.removeEventListener("touchend",_y),hy(),Zv.style.cursor="grab",ny||(ny=Qv);let{items:e,type:t}=cy.get(ny);Kv(uy.get(t),(e=>cy.get(e).dropTargetStyle),(e=>cy.get(e).dropTargetClasses));let n=gy(e);-1===n&&(n=ey),e=e.map((e=>e.isDndShadowItem?Xv:e)),function(e,t){const n=yv(ny.children[e]),r={x:n.left-parseFloat(Zv.style.left),y:n.top-parseFloat(Zv.style.top)},{dropAnimationDurationMs:i}=cy.get(ny),o=`transform ${i}ms ease`;Zv.style.transition=Zv.style.transition?Zv.style.transition+","+o:o,Zv.style.transform=`translate3d(${r.x}px, ${r.y}px, 0)`,window.setTimeout(t,i)}(n,(function(){var t;oy(),Gm(ny,e,{trigger:ly?cv:lv,id:Xv.id,source:pv}),ny!==Qv&&Gm(Qv,cy.get(Qv).items,{trigger:uv,id:Xv.id,source:pv}),(t=ny.children[n]).style.visibility="",t.removeAttribute("data-is-dnd-shadow-item"),Zv.remove(),Gv.remove(),Zv=void 0,Gv=void 0,Xv=void 0,Jv=void 0,Qv=void 0,ey=void 0,ty=void 0,ny=void 0,ry=void 0,iy=void 0,ay=!1,sy=!1,oy=void 0,ly=!1}))}function wy(e,t){const n={items:void 0,type:void 0,flipDurationMs:0,dragDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:Yv,dropTargetClasses:[],transformDraggedElement:()=>{}};let r=new Map;function i(){window.removeEventListener("mousemove",s),window.removeEventListener("touchmove",s),window.removeEventListener("mouseup",a),window.removeEventListener("touchend",a)}function a(){i(),Gv=void 0,ry=void 0,iy=void 0}function s(e){e.preventDefault();const t=e.touches?e.touches[0]:e;iy={x:t.clientX,y:t.clientY},(Math.abs(iy.x-ry.x)>=3||Math.abs(iy.y-ry.y)>=3)&&(i(),function(){ay=!0;const e=r.get(Gv);ey=e,Qv=Gv.parentElement;const{items:t,type:i}=n;Xv=o({},t[e]),Jv=i,ty=o(o({},Xv),{isDndShadowItem:!0});const a=o(o({},ty),{id:"id:dnd-shadow-placeholder-0000"});function s(){var e;Zv.parentElement?window.requestAnimationFrame(s):(document.body.appendChild(Zv),Zv.focus(),dy(),(e=Gv).style.display="none",e.style.position="fixed",e.style.zIndex="-5",document.body.appendChild(Gv))}Zv=function(e){const t=e.getBoundingClientRect(),n=e.cloneNode(!0);return Hv(e,n),n.id="dnd-action-dragged-el",n.style.position="fixed",n.style.top=`${t.top}px`,n.style.left=`${t.left}px`,n.style.margin="0",n.style.boxSizing="border-box",n.style.height=`${t.height}px`,n.style.width=`${t.width}px`,n.style.transition=`${Bv("width")}, ${Bv("height")}, ${Bv("background-color")}, ${Bv("opacity")}, ${Bv("color")} `,window.setTimeout((()=>n.style.transition+=`, ${Bv("top")}, ${Bv("left")}`),0),n.style.zIndex="9999",n.style.cursor="grabbing",n}(Gv),window.requestAnimationFrame(s),Vv(Array.from(uy.get(n.type)).filter((e=>e===Qv||!cy.get(e).dropFromOthersDisabled)),(e=>cy.get(e).dropTargetStyle),(e=>cy.get(e).dropTargetClasses)),t.splice(e,1,a),oy=function(e){const t=e.style.minHeight;e.style.minHeight=window.getComputedStyle(e).getPropertyValue("height");const n=e.style.minWidth;return e.style.minWidth=window.getComputedStyle(e).getPropertyValue("width"),function(){e.style.minHeight=t,e.style.minWidth=n}}(Qv),Zm(Qv,t,{trigger:nv,id:Xv.id,source:pv}),window.addEventListener("mousemove",by,{passive:!1}),window.addEventListener("touchmove",by,{passive:!1,capture:!1}),window.addEventListener("mouseup",_y,{passive:!1}),window.addEventListener("touchend",_y,{passive:!1})}())}function l(e){if(e.target!==e.currentTarget&&(void 0!==e.target.value||e.target.isContentEditable))return;if(e.button)return;if(ay)return;e.stopPropagation();const t=e.touches?e.touches[0]:e;ry={x:t.clientX,y:t.clientY},iy=o({},ry),Gv=e.currentTarget,window.addEventListener("mousemove",s,{passive:!1}),window.addEventListener("touchmove",s,{passive:!1,capture:!1}),window.addEventListener("mouseup",a,{passive:!1}),window.addEventListener("touchend",a,{passive:!1})}function u({items:t,flipDurationMs:i=0,type:o="--any--",dragDisabled:a=!1,dropFromOthersDisabled:s=!1,dropTargetStyle:u=Yv,dropTargetClasses:c=[],transformDraggedElement:f=(()=>{})}){var p,d;n.dropAnimationDurationMs=i,n.type&&o!==n.type&&py(e,n.type),n.type=o,p=e,d=o,uy.has(d)||uy.set(d,new Set),uy.get(d).has(p)||(uy.get(d).add(p),gv()),n.items=[...t],n.dragDisabled=a,n.transformDraggedElement=f,!ay||sy||function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!{}.hasOwnProperty.call(t,n)||t[n]!==e[n])return!1;return!0}(u,n.dropTargetStyle)&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;nn.dropTargetStyle),(()=>c)),Vv([e],(()=>u),(()=>c))),n.dropTargetStyle=u,n.dropTargetClasses=[...c],ay&&n.dropFromOthersDisabled!==s&&(s?Kv([e],(e=>cy.get(e).dropTargetStyle),(e=>cy.get(e).dropTargetClasses)):Vv([e],(e=>cy.get(e).dropTargetStyle),(e=>cy.get(e).dropTargetClasses))),n.dropFromOthersDisabled=s,cy.set(e,n);const h=gy(n.items);for(let m=0;mn.transformDraggedElement(Zv,Xv,m))),(g=t).style.visibility="hidden",g.setAttribute("data-is-dnd-shadow-item","true"))}var g}return u(t),{update:e=>{u(e)},destroy:()=>{py(e,n.type),cy.delete(e)}}}const xy={DND_ZONE_ACTIVE:"dnd-zone-active",DND_ZONE_DRAG_DISABLED:"dnd-zone-drag-disabled"},ky={[xy.DND_ZONE_ACTIVE]:"Tab to one the items and press space-bar or enter to start dragging it",[xy.DND_ZONE_DRAG_DISABLED]:"This is a disabled drag and drop list"};let Cy;function Ey(){Cy=document.createElement("div"),Cy.id="dnd-action-aria-alert",Cy.style.position="fixed",Cy.style.bottom="0",Cy.style.left="0",Cy.style.zIndex="-5",Cy.style.opacity="0",Cy.style.height="0",Cy.style.width="0",Cy.setAttribute("role","alert"),document.body.prepend(Cy),Object.entries(ky).forEach((([e,t])=>document.body.prepend(function(e,t){const n=document.createElement("div");return n.id=e,n.innerHTML=`

${t}

`,n.style.display="none",n.style.position="fixed",n.style.zIndex="-5",n}(e,t))))}function Oy(e){Cy.innerHTML="";const t=document.createTextNode(e);Cy.appendChild(t),Cy.style.display="none",Cy.style.display="inline"}const Ay={outline:"rgba(255, 255, 102, 0.7) solid 2px"};let Sy,jy,Ty,Dy,Ny=!1,Ly="",My="";const Py=new WeakSet,Fy=new WeakMap,qy=new WeakMap,Iy=new Map,$y=new Map,Ry=new Map,zy=vv?null:("complete"===document.readyState?Ey():window.addEventListener("DOMContentLoaded",Ey),o({},xy));function By(e,t){jy===e&&Ky(),Ry.get(t).delete(e),mv(),0===Ry.get(t).size&&Ry.delete(t),0===Ry.size&&(window.removeEventListener("keydown",Wy),window.removeEventListener("click",Hy))}function Wy(e){if(Ny)switch(e.key){case"Escape":Ky()}}function Hy(){Ny&&(Py.has(document.activeElement)||Ky())}function Uy(e){if(!Ny)return;const t=e.currentTarget;if(t===jy)return;Ly=t.getAttribute("aria-label")||"";const{items:n}=$y.get(jy),r=n.find((e=>e.id===Dy)),i=n.indexOf(r),o=n.splice(i,1)[0],{items:a,autoAriaDisabled:s}=$y.get(t);t.getBoundingClientRect().tope($y.get(t))))}function Ky(e=!0){$y.get(jy).autoAriaDisabled||Oy(`Stopped dragging item ${My}`),Py.has(document.activeElement)&&document.activeElement.blur(),e&&Zm(jy,$y.get(jy).items,{trigger:fv,id:Dy,source:dv}),Kv(Ry.get(Sy),(e=>$y.get(e).dropTargetStyle),(e=>$y.get(e).dropTargetClasses)),Ty=null,Dy=null,My="",Sy=null,jy=null,Ly="",Ny=!1,Vy()}function Yy(e,t){const n={items:void 0,type:void 0,dragDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:Ay,dropTargetClasses:[],autoAriaDisabled:!1};function r(e,t,n){e.length<=1||e.splice(n,1,e.splice(t,1,e[n])[0])}function i(t){switch(t.key){case"Enter":case" ":if((void 0!==t.target.disabled||t.target.href||t.target.isContentEditable)&&!Py.has(t.target))return;t.preventDefault(),t.stopPropagation(),Ny?Ky():o(t);break;case"ArrowDown":case"ArrowRight":{if(!Ny)return;t.preventDefault(),t.stopPropagation();const{items:i}=$y.get(e),o=Array.from(e.children),a=o.indexOf(t.currentTarget);a0&&(n.autoAriaDisabled||Oy(`Moved item ${My} to position ${o} in the list ${Ly}`),r(i,o,o-1),Gm(e,i,{trigger:lv,id:Dy,source:dv}));break}}}function o(t){!function(t){const{items:n}=$y.get(e),r=Array.from(e.children),i=r.indexOf(t);Ty=t,Ty.tabIndex=0,Dy=n[i].id,My=r[i].getAttribute("aria-label")||""}(t.currentTarget),jy=e,Sy=n.type,Ny=!0;const r=Array.from(Ry.get(n.type)).filter((e=>e===jy||!$y.get(e).dropFromOthersDisabled));if(Vv(r,(e=>$y.get(e).dropTargetStyle),(e=>$y.get(e).dropTargetClasses)),!n.autoAriaDisabled){let e=`Started dragging item ${My}. Use the arrow keys to move it within its list ${Ly}`;r.length>1&&(e+=", or tab to another list in order to move the item into it"),Oy(e)}Zm(e,$y.get(e).items,{trigger:nv,id:Dy,source:dv}),Vy()}function a(e){Ny&&e.currentTarget!==Ty&&(e.stopPropagation(),Ky(!1),o(e))}function s({items:t=[],type:r="--any--",dragDisabled:o=!1,dropFromOthersDisabled:s=!1,dropTargetStyle:l=Ay,dropTargetClasses:u=[],autoAriaDisabled:c=!1}){var f,p;n.items=[...t],n.dragDisabled=o,n.dropFromOthersDisabled=s,n.dropTargetStyle=l,n.dropTargetClasses=u,n.autoAriaDisabled=c,c||(e.setAttribute("aria-disabled",o),e.setAttribute("role","list"),e.setAttribute("aria-describedby",o?zy.DND_ZONE_DRAG_DISABLED:zy.DND_ZONE_ACTIVE)),n.type&&r!==n.type&&By(e,n.type),n.type=r,f=e,p=r,0===Ry.size&&(window.addEventListener("keydown",Wy),window.addEventListener("click",Hy)),Ry.has(p)||Ry.set(p,new Set),Ry.get(p).has(f)||(Ry.get(p).add(f),gv()),$y.set(e,n),e.tabIndex=Ny&&(e===jy||Ty.contains(e)||n.dropFromOthersDisabled||jy&&n.type!==$y.get(jy).type)?-1:0,e.addEventListener("focus",Uy);for(let d=0;d{s(e)},destroy:()=>{By(e,n.type),$y.delete(e),Iy.delete(e)}};return Iy.set(e,l),l}function Gy(e,t){Zy(t);const n=wy(e,t),r=Yy(e,t);return{update:e=>{Zy(e),n.update(e),r.update(e)},destroy:()=>{n.destroy(),r.destroy()}}}function Zy(e){const{items:i,flipDurationMs:o,type:a,dragDisabled:s,dropFromOthersDisabled:l,dropTargetStyle:u,dropTargetClasses:c,transformDraggedElement:f,autoAriaDisabled:p}=e,d=((e,i)=>{var o={};for(var a in e)t.call(e,a)&&i.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&n)for(var a of n(e))i.indexOf(a)<0&&r.call(e,a)&&(o[a]=e[a]);return o})(e,["items","flipDurationMs","type","dragDisabled","dropFromOthersDisabled","dropTargetStyle","dropTargetClasses","transformDraggedElement","autoAriaDisabled"]);if(Object.keys(d).length>0&&console.warn("dndzone will ignore unknown options",d),!i)throw new Error("no 'items' key provided to dndzone");const h=i.find((e=>!{}.hasOwnProperty.call(e,"id")));if(h)throw new Error(`missing 'id' property for item ${jv(h)}`);if(c&&!Array.isArray(c))throw new Error(`dropTargetClasses should be an array but instead it is a ${typeof c}, ${jv(c)}`)}function Xy(){return(Xy=Object.assign||function(e){for(var t=1;t-1},$b.prototype.set=function(e,t){var n=this.__data__,r=qb(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Rb=Db(ib,"Map");function zb(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function Bb(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function c_(e){if("string"==typeof e||hb(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}function f_(e,t,n){for(var r=-1,i=(t=t_(t,e)).length,o=!1;++r=0||(i[n]=e[n]);return i}function Lx(e){return Array.prototype.slice.apply(e)}function Mx(e){this.status="pending",this._continuations=[],this._parent=null,this._paused=!1,e&&e.call(this,this._continueWith.bind(this),this._failWith.bind(this))}function Px(e){return e&&"function"==typeof e.then}function Fx(e){return e}function qx(e){return"undefined"!=typeof window&&"AggregateError"in window?new window.AggregateError(e):{errors:e}}if(Mx.prototype={then:function(e,t){var n=Mx.unresolved()._setParent(this);if(this._isRejected()){if(this._paused)return this._continuations.push({promise:n,nextFn:e,catchFn:t}),n;if(t)try{var r=t(this._error);return Px(r)?(this._chainPromiseData(r,n),n):Mx.resolve(r)._setParent(this)}catch(i){return Mx.reject(i)._setParent(this)}return Mx.reject(this._error)._setParent(this)}return this._continuations.push({promise:n,nextFn:e,catchFn:t}),this._runResolutions(),n},catch:function(e){if(this._isResolved())return Mx.resolve(this._data)._setParent(this);var t=Mx.unresolved()._setParent(this);return this._continuations.push({promise:t,catchFn:e}),this._runRejections(),t},finally:function(e){var t=!1;function n(n,r){if(!t){t=!0,e||(e=Fx);var i=e(n);return Px(i)?i.then((function(){if(r)throw r;return n})):n}}return this.then((function(e){return n(e)})).catch((function(e){return n(null,e)}))},pause:function(){return this._paused=!0,this},resume:function(){var e=this._findFirstPaused();return e&&(e._paused=!1,e._runResolutions(),e._runRejections()),this},_findAncestry:function(){return this._continuations.reduce((function(e,t){if(t.promise){var n={promise:t.promise,children:t.promise._findAncestry()};e.push(n)}return e}),[])},_setParent:function(e){if(this._parent)throw new Error("parent already set");return this._parent=e,this},_continueWith:function(e){var t=this._findFirstPending();t&&(t._data=e,t._setResolved())},_findFirstPending:function(){return this._findFirstAncestor((function(e){return e._isPending&&e._isPending()}))},_findFirstPaused:function(){return this._findFirstAncestor((function(e){return e._paused}))},_findFirstAncestor:function(e){for(var t,n=this;n;)e(n)&&(t=n),n=n._parent;return t},_failWith:function(e){var t=this._findFirstPending();t&&(t._error=e,t._setRejected())},_takeContinuations:function(){return this._continuations.splice(0,this._continuations.length)},_runRejections:function(){if(!this._paused&&this._isRejected()){var e=this._error,t=this._takeContinuations(),n=this;t.forEach((function(t){if(t.catchFn)try{var r=t.catchFn(e);n._handleUserFunctionResult(r,t.promise)}catch(i){t.promise.reject(i)}else t.promise.reject(e)}))}},_runResolutions:function(){if(!this._paused&&this._isResolved()&&!this._isPending()){var e=this._takeContinuations();if(Px(this._data))return this._handleWhenResolvedDataIsPromise(this._data);var t=this._data,n=this;e.forEach((function(e){if(e.nextFn)try{var r=e.nextFn(t);n._handleUserFunctionResult(r,e.promise)}catch(i){n._handleResolutionError(i,e)}else e.promise&&e.promise.resolve(t)}))}},_handleResolutionError:function(e,t){if(this._setRejected(),t.catchFn)try{return void t.catchFn(e)}catch(n){e=n}t.promise&&t.promise.reject(e)},_handleWhenResolvedDataIsPromise:function(e){var t=this;return e.then((function(e){t._data=e,t._runResolutions()})).catch((function(e){t._error=e,t._setRejected(),t._runRejections()}))},_handleUserFunctionResult:function(e,t){Px(e)?this._chainPromiseData(e,t):t.resolve(e)},_chainPromiseData:function(e,t){e.then((function(e){t.resolve(e)})).catch((function(e){t.reject(e)}))},_setResolved:function(){this.status="resolved",this._paused||this._runResolutions()},_setRejected:function(){this.status="rejected",this._paused||this._runRejections()},_isPending:function(){return"pending"===this.status},_isResolved:function(){return"resolved"===this.status},_isRejected:function(){return"rejected"===this.status}},Mx.resolve=function(e){return new Mx((function(t,n){Px(e)?e.then((function(e){t(e)})).catch((function(e){n(e)})):t(e)}))},Mx.reject=function(e){return new Mx((function(t,n){n(e)}))},Mx.unresolved=function(){return new Mx((function(e,t){this.resolve=e,this.reject=t}))},Mx.all=function(){var e=Lx(arguments);return Array.isArray(e[0])&&(e=e[0]),e.length?new Mx((function(t,n){var r=[],i=0,o=!1;e.forEach((function(a,s){Mx.resolve(a).then((function(n){r[s]=n,(i+=1)===e.length&&t(r)})).catch((function(e){!function(e){o||(o=!0,n(e))}(e)}))}))})):Mx.resolve([])},Mx.any=function(){var e=Lx(arguments);return Array.isArray(e[0])&&(e=e[0]),e.length?new Mx((function(t,n){var r=[],i=0,o=!1;e.forEach((function(a,s){Mx.resolve(a).then((function(e){!function(e){o||(o=!0,t(e))}(e)})).catch((function(t){r[s]=t,(i+=1)===e.length&&n(qx(r))}))}))})):Mx.reject(qx([]))},Mx.allSettled=function(){var e=Lx(arguments);return Array.isArray(e[0])&&(e=e[0]),e.length?new Mx((function(t){var n=[],r=0,i=function(){(r+=1)===e.length&&t(n)};e.forEach((function(e,t){Mx.resolve(e).then((function(e){n[t]={status:"fulfilled",value:e},i()})).catch((function(e){n[t]={status:"rejected",reason:e},i()}))}))})):Mx.resolve([])},Promise===Mx)throw new Error("Please use SynchronousPromise.installGlobally() to install globally");var Ix=Promise;Mx.installGlobally=function(e){if(Promise===Mx)return e;var t=function(e){if(void 0===e||e.__patched)return e;var t=e;return(e=function(){t.apply(this,Lx(arguments))}).__patched=!0,e}(e);return Promise=Mx,t},Mx.uninstallGlobally=function(){Promise===Mx&&(Promise=Ix)};var $x={SynchronousPromise:Mx},Rx=/\$\{\s*(\w+)\s*\}/g,zx=function(e){return function(t){return e.replace(Rx,(function(e,n){return tx(t[n])}))}};function Bx(e,t,n,r){var i=this;this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],e&&[].concat(e).forEach((function(e){i.errors=i.errors.concat(e.errors||e),e.inner&&(i.inner=i.inner.concat(e.inner.length?e.inner:e))})),this.message=this.errors.length>1?this.errors.length+" errors occurred":this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,Bx)}Bx.prototype=Object.create(Error.prototype),Bx.prototype.constructor=Bx,Bx.isError=function(e){return e&&"ValidationError"===e.name},Bx.formatError=function(e,t){"string"==typeof e&&(e=zx(e));var n=function(t){return t.path=t.label||t.path||"this","function"==typeof e?e(t):e};return 1===arguments.length?n:n(t)};var Wx=function(e){return e?$x.SynchronousPromise:Promise};function Hx(e,t){return e?null:function(e){return t.push(e),e.value}}function Ux(e){var t=e.validations,n=e.value,r=e.path,i=e.sync,o=e.errors,a=e.sort;return o=function(e){return void 0===e&&(e=[]),e.inner&&e.inner.length?e.inner:[].concat(e)}(o),function(e,t){var n=Wx(t);return n.all(e.map((function(e){return n.resolve(e).then((function(e){return{fulfilled:!0,value:e}}),(function(e){return{fulfilled:!1,value:e}}))})))}(t,i).then((function(e){var t=e.filter((function(e){return!e.fulfilled})).reduce((function(e,t){var n=t.value;if(!Bx.isError(n))throw n;return e.concat(n)}),[]);if(a&&t.sort(a),(o=t.concat(o)).length)throw new Bx(o,n,r);return n}))}function Vx(e){var t=e.endEarly,n=Nx(e,["endEarly"]);return t?function(e,t,n){return Wx(n).all(e).catch((function(e){throw"ValidationError"===e.name&&(e.value=t),e})).then((function(){return t}))}(n.validations,n.value,n.sync):Ux(n)}var Kx=function(e){return"[object Object]"===Object.prototype.toString.call(e)};function Yx(e,t){for(var n in t)if(p_(t,n)){var r=t[n],i=e[n];if(void 0===i)e[n]=r;else{if(i===r)continue;Tx(i)?Tx(r)&&(e[n]=r.concat(i)):Kx(i)?Kx(r)&&(e[n]=Yx(i,r)):Array.isArray(i)&&Array.isArray(r)&&(e[n]=r.concat(i))}}return e}var Gx,Zx=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[Gx?a:++r];if(!1===t(i[s],s,i))break}return e};function Xx(e,t){return e&&Zx(e,t,$_)}function Jx(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Bb;++ts))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var f=-1,p=!0,d=2&n?new Jx:void 0;for(o.set(e,t),o.set(t,e);++f=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var _k=/[^.^\]^[]+|(?=\[\]|\.\.)/g,wk=/^\d+$/,xk=/^\d/,kk=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Ck=/^\s*(['"]?)(.*?)(\1)\s*$/,Ek=new bk(512),Ok=new bk(512),Ak=new bk(512),Sk={Cache:bk,split:Tk,normalizePath:jk,setter:function(e){var t=jk(e);return Ok.get(e)||Ok.set(e,(function(e,n){for(var r=0,i=t.length,o=e;r=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Rk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=n.length)throw new Error("Yup.reach cannot resolve an array item at index: "+s+", in the path: "+t+". because there is no value at that index. ");i=n,n=n&&n[f],e=e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error("The schema does not contain the path: "+t+". (failed at: "+a+' which is a type: "'+e._type+'")');i=n,n=n&&n[c],e=e.fields[c]}o=c,a=l?"["+s+"]":"."+s})),{schema:e,parent:i,parentPath:o}):{parent:i,parentPath:t,schema:e}}(this,t,n,r.context),o=i.parent,a=i.parentPath;return i.schema[e](o&&o[a],Xy({},r,{parent:o,path:t}))}},Uk=0,Vk=["validate","validateSync"];Uk0},length:function(e,t){return void 0===t&&(t=lx),this.test({message:t,name:"length",exclusive:!0,params:{length:e},test:function(t){return Jk(t)||t.length===this.resolve(e)}})},min:function(e,t){return void 0===t&&(t=ux),this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return Jk(t)||t.length>=this.resolve(e)}})},max:function(e,t){return void 0===t&&(t=cx),this.test({name:"max",exclusive:!0,message:t,params:{max:e},test:function(t){return Jk(t)||t.length<=this.resolve(e)}})},matches:function(e,t){var n,r,i=!1;return t&&("object"==typeof t?(i=t.excludeEmptyString,n=t.message,r=t.name):n=t),this.test({name:r||"matches",message:n||fx,params:{regex:e},test:function(t){return Jk(t)||""===t&&i||-1!==t.search(e)}})},email:function(e){return void 0===e&&(e=px),this.matches(Qk,{name:"email",message:e,excludeEmptyString:!0})},url:function(e){return void 0===e&&(e=dx),this.matches(eC,{name:"url",message:e,excludeEmptyString:!0})},uuid:function(e){return void 0===e&&(e=hx),this.matches(tC,{name:"uuid",message:e,excludeEmptyString:!1})},ensure:function(){return this.default("").transform((function(e){return null===e?"":e}))},trim:function(e){return void 0===e&&(e=gx),this.transform((function(e){return null!=e?e.trim():e})).test({message:e,name:"trim",test:nC})},lowercase:function(e){return void 0===e&&(e=mx),this.transform((function(e){return Jk(e)?e:e.toLowerCase()})).test({message:e,name:"string_case",exclusive:!0,test:function(e){return Jk(e)||e===e.toLowerCase()}})},uppercase:function(e){return void 0===e&&(e=vx),this.transform((function(e){return Jk(e)?e:e.toUpperCase()})).test({message:e,name:"string_case",exclusive:!0,test:function(e){return Jk(e)||e===e.toUpperCase()}})}});Xk((function e(){var t=this;if(!(this instanceof e))return new e;Bk.call(this,{type:"number"}),this.withMutation((function(){t.transform((function(e){var t=e;if("string"==typeof t){if(""===(t=t.replace(/\s/g,"")))return NaN;t=+t}return this.isType(t)?t:parseFloat(t)}))}))}),Bk,{_typeCheck:function(e){return e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!function(e){return e!=+e}(e)},min:function(e,t){return void 0===t&&(t=yx),this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return Jk(t)||t>=this.resolve(e)}})},max:function(e,t){return void 0===t&&(t=bx),this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(t){return Jk(t)||t<=this.resolve(e)}})},lessThan:function(e,t){return void 0===t&&(t=_x),this.test({message:t,name:"max",exclusive:!0,params:{less:e},test:function(t){return Jk(t)||tthis.resolve(e)}})},positive:function(e){return void 0===e&&(e=xx),this.moreThan(0,e)},negative:function(e){return void 0===e&&(e=kx),this.lessThan(0,e)},integer:function(e){return void 0===e&&(e=Cx),this.test({name:"integer",message:e,test:function(e){return Jk(e)||Number.isInteger(e)}})},truncate:function(){return this.transform((function(e){return Jk(e)?e:0|e}))},round:function(e){var t=["ceil","floor","round","trunc"];if("trunc"===(e=e&&e.toLowerCase()||"round"))return this.truncate();if(-1===t.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+t.join(", "));return this.transform((function(t){return Jk(t)?t:Math[e](t)}))}});var iC=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;var oC=new Date("");function aC(e,t){return t||(t=e.slice(0)),e.raw=t,e}Xk((function e(){var t=this;if(!(this instanceof e))return new e;Bk.call(this,{type:"date"}),this.withMutation((function(){t.transform((function(e){return this.isType(e)?e:(e=function(e){var t,n,r=[1,4,5,6,7,10,11],i=0;if(n=iC.exec(e)){for(var o,a=0;o=r[a];++a)n[o]=+n[o]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(i=60*n[10]+n[11],"+"===n[9]&&(i=0-i)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+i,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t}(e),isNaN(e)?oC:new Date(e))}))}))}),Bk,{_typeCheck:function(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t},min:function(e,t){void 0===t&&(t=Ex);var n=e;if(!Pk.isRef(n)&&(n=this.cast(e),!this._typeCheck(n)))throw new TypeError("`min` must be a Date or a value that can be `cast()` to a Date");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(e){return Jk(e)||e>=this.resolve(n)}})},max:function(e,t){void 0===t&&(t=Ox);var n=e;if(!Pk.isRef(n)&&(n=this.cast(e),!this._typeCheck(n)))throw new TypeError("`max` must be a Date or a value that can be `cast()` to a Date");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(e){return Jk(e)||e<=this.resolve(n)}})}});var sC,lC=(sC={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},function(e){return null==sC?void 0:sC[e]}),uC=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,cC=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var fC=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var pC=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var dC="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",hC="["+dC+"]",gC="\\d+",mC="[\\u2700-\\u27bf]",vC="[a-z\\xdf-\\xf6\\xf8-\\xff]",yC="[^\\ud800-\\udfff"+dC+gC+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",bC="(?:\\ud83c[\\udde6-\\uddff]){2}",_C="[\\ud800-\\udbff][\\udc00-\\udfff]",wC="[A-Z\\xc0-\\xd6\\xd8-\\xde]",xC="(?:"+vC+"|"+yC+")",kC="(?:"+wC+"|"+yC+")",CC="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",EC="[\\ufe0e\\ufe0f]?"+CC+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",bC,_C].join("|")+")[\\ufe0e\\ufe0f]?"+CC+")*"),OC="(?:"+[mC,bC,_C].join("|")+")"+EC,AC=RegExp([wC+"?"+vC+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[hC,wC,"$"].join("|")+")",kC+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[hC,wC+xC,"$"].join("|")+")",wC+"?"+xC+"+(?:['’](?:d|ll|m|re|s|t|ve))?",wC+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gC,OC].join("|"),"g");function SC(e,t,n){return e=e_(e),void 0===(t=n?void 0:t)?function(e){return pC.test(e)}(e)?function(e){return e.match(AC)||[]}(e):function(e){return e.match(fC)||[]}(e):e.match(t)||[]}var jC=RegExp("['’]","g");function TC(e){return function(t){return function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i=r?e:function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r1?t-1:0),r=1;r{t.oninput=e.onchange})),e.addEventListener("input",n),n(),{update(n){2===t?function(e,t){[...e.elements].forEach((function(e,n){switch(!0){case!e.name:case e.disabled:case/(file|reset|submit|button)/i.test(e.type):break;case/(select-multiple)/i.test(e.type):[...e.options].forEach((function(n,r){n.selected=t[e.name]&&t[e.name].includes(n.value)}));break;case/(radio)/i.test(e.type):e.checked=t[e.name]&&t[e.name]===e.value;break;case/(checkbox)/i.test(e.type):e.checked=t[e.name]&&t[e.name].includes(e.value);break;default:e.value=t[e.name]||""}}))}(e,n):t+=1},destroy(){e.removeEventListener("input",n)}}}function ZC(e,t=[]){let n=[];return t.forEach((([t,r])=>{const{destroy:i=(()=>{})}=t(e,r)||{destroy:()=>{}};n.push(i)})),{destroy(){n.forEach((e=>e()))}}}function XC(e){let t,n,r,i,o,a;const s=e[3].default,l=v(s,e,e[2],null);return{c(){t=P("form"),l&&l.c()},l(e){t=Y(e,"FORM",{});var n=K(t);l&&l.l(n),n.forEach(L)},m(s,u){N(s,t,u),l&&l.m(t,null),i=!0,o||(a=[R(t,"update",e[5]),C(n=GC.call(null,t,e[0])),C(r=ZC.call(null,t,e[1])),R(t,"submit",e[4])],o=!0)},p(e,[t]){l&&l.p&&4&t&&b(l,s,e,e[2],t,null,null),n&&p(n.update)&&1&t&&n.update.call(null,e[0]),r&&p(r.update)&&2&t&&r.update.call(null,e[1])},i(e){i||(Ue(l,e),i=!0)},o(e){Ve(l,e),i=!1},d(e){e&&L(t),l&&l.d(e),o=!1,f(a)}}}function JC(e,t,n){let{$$slots:r={},$$scope:i}=t,{values:o}=t,{actions:a=[]}=t;return e.$$set=e=>{"values"in e&&n(0,o=e.values),"actions"in e&&n(1,a=e.actions),"$$scope"in e&&n(2,i=e.$$scope)},[o,a,i,r,function(t){ke(e,t)},({detail:e})=>n(0,o=e)]}Xk(UC,Bk,{_typeCheck:function(e){return HC(e)||"function"==typeof e},_cast:function(e,t){var n=this;void 0===t&&(t={});var r=Bk.prototype._cast.call(this,e,t);if(void 0===r)return this.default();if(!this._typeCheck(r))return r;var i=this.fields,o=!0===this._option("stripUnknown",t),a=this._nodes.concat(Object.keys(r).filter((function(e){return-1===n._nodes.indexOf(e)}))),s={},l=Xy({},t,{parent:s,__validating:t.__validating||!1}),u=!1;return a.forEach((function(e){var n=i[e],a=p_(r,e);if(n){var c,f=n._options&&n._options.strict;if(l.path=RC(WC(),t.path,e),l.value=r[e],!0===(n=n.resolve(l))._strip)return void(u=u||e in r);void 0!==(c=t.__validating&&f?r[e]:n.cast(r[e],l))&&(s[e]=c)}else a&&!o&&(s[e]=r[e]);s[e]!==r[e]&&(u=!0)})),u?s:r},_validate:function(e,t){var n,r,i=this;void 0===t&&(t={});var o=t.sync,a=[],s=null!=t.originalValue?t.originalValue:e,l=[{schema:this,value:s}].concat(t.from||[]);return n=this._option("abortEarly",t),r=this._option("recursive",t),t=Xy({},t,{__validating:!0,originalValue:s,from:l}),Bk.prototype._validate.call(this,e,t).catch(Hx(n,a)).then((function(e){if(!r||!HC(e)){if(a.length)throw a[0];return e}l=s?[].concat(l):[{schema:i,value:s||e}].concat(t.from||[]),s=s||e;var u,c,f=i._nodes.map((function(n){var r=-1===n.indexOf(".")?RC(BC(),t.path,n):RC(zC(),t.path,n),a=i.fields[n],u=Xy({},t,{path:r,from:l,parent:e,originalValue:s[n]});return a&&a.validate?(u.strict=!0,a.validate(e[n],u)):function(e){return e?$x.SynchronousPromise:Promise}(o).resolve(!0)}));return Vx({sync:o,validations:f,value:e,errors:a,endEarly:n,path:t.path,sort:(u=i.fields,c=Object.keys(u),function(e,t){return $C(c,e)-$C(c,t)})})}))},concat:function(e){var t=Bk.prototype.concat.call(this,e);return t._nodes=IC(t.fields,t._excludedEdges),t},shape:function(e,t){void 0===t&&(t=[]);var n=this.clone(),r=Xy(n.fields,e);if(n.fields=r,t.length){Array.isArray(t[0])||(t=[t]);var i=t.map((function(e){return e[0]+"-"+e[1]}));n._excludedEdges=n._excludedEdges.concat(i)}return n._nodes=IC(r,n._excludedEdges),n},from:function(e,t,n){var r=Sk.getter(e,!0);return this.transform((function(i){if(null==i)return i;var o=i;return p_(i,e)&&(o=Xy({},i),n||delete o[e],o[t]=r(i)),o}))},noUnknown:function(e,t){void 0===e&&(e=!0),void 0===t&&(t=Ax),"string"==typeof e&&(t=e,e=!0);var n=this.test({name:"noUnknown",exclusive:!0,message:t,test:function(t){if(null==t)return!0;var n=function(e,t){var n=Object.keys(e.fields);return Object.keys(t).filter((function(e){return-1===n.indexOf(e)}))}(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n._options.stripUnknown=e,n},unknown:function(e,t){return void 0===e&&(e=!0),void 0===t&&(t=Ax),this.noUnknown(!e,t)},transformKeys:function(e){return this.transform((function(t){return t&&function(e,t){var n={};return t=vk(t),Xx(e,(function(e,r,i){g_(n,t(e,r,i),e)})),n}(t,(function(t,n){return e(n)}))}))},camelCase:function(){return this.transformKeys(PC)},snakeCase:function(){return this.transformKeys(DC)},constantCase:function(){return this.transformKeys((function(e){return DC(e).toUpperCase()}))},describe:function(){var e=Bk.prototype.describe.call(this);return e.fields=yk(this.fields,(function(e){return e.describe()})),e}}),Xk((function e(t){var n=this;if(!(this instanceof e))return new e(t);Bk.call(this,{type:"array"}),this._subType=void 0,this.innerType=void 0,this.withMutation((function(){n.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})),t&&n.of(t)}))}),Bk,{_typeCheck:function(e){return Array.isArray(e)},_cast:function(e,t){var n=this,r=Bk.prototype._cast.call(this,e,t);if(!this._typeCheck(r)||!this.innerType)return r;var i=!1,o=r.map((function(e,r){var o=n.innerType.cast(e,Xy({},t,{path:RC(KC(),t.path,r)}));return o!==e&&(i=!0),o}));return i?o:r},_validate:function(e,t){var n=this;void 0===t&&(t={});var r=[],i=t.sync,o=t.path,a=this.innerType,s=this._option("abortEarly",t),l=this._option("recursive",t),u=null!=t.originalValue?t.originalValue:e;return Bk.prototype._validate.call(this,e,t).catch(Hx(s,r)).then((function(e){if(!l||!a||!n._typeCheck(e)){if(r.length)throw r[0];return e}u=u||e;for(var c=new Array(e.length),f=0;f0},of:function(e){var t=this.clone();if(!1!==e&&!Tx(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema, or `false` to negate a current sub-schema. not: "+tx(e));return t._subType=e,t.innerType=e,t},min:function(e,t){return t=t||Sx,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return Jk(t)||t.length>=this.resolve(e)}})},max:function(e,t){return t=t||jx,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(t){return Jk(t)||t.length<=this.resolve(e)}})},ensure:function(){var e=this;return this.default((function(){return[]})).transform((function(t,n){return e._typeCheck(t)?t:null==n?[]:[].concat(n)}))},compact:function(e){var t=e?function(t,n,r){return!e(t,n,r)}:function(e){return!!e};return this.transform((function(e){return null!=e?e.filter(t):e}))},describe:function(){var e=Bk.prototype.describe.call(this);return this.innerType&&(e.innerType=this.innerType.describe()),e}});class QC extends pt{constructor(e){super(),ft(this,e,JC,XC,d,{values:0,actions:1})}}export{te as $,I as A,Z as B,D as C,st as D,lt as E,ut as F,ct as G,q as H,G as I,X as J,C as K,f as L,_e as M,J as N,Ee as O,a as P,ae as Q,Q as R,pt as S,jl as T,ru as U,ve as V,Po as W,F as X,M as Y,Ne as Z,ee as _,d as a,x as a0,l as a1,U as a2,it as a3,w as a4,_ as a5,hu as a6,Ze as a7,fu as a8,p as a9,jg as aA,Km as aB,Gy as aC,tt as aD,de as aE,pe as aF,Ym as aG,De as aH,h as aI,k as aJ,Gt as aK,he as aL,Ye as aM,Ge as aN,nt as aO,rC as aP,UC as aQ,Xe as aR,Ht as aS,QC as aT,zn as aU,vn as aV,we as aa,W as ab,cu as ac,uu as ad,ot as ae,xe as af,Hu as ag,at as ah,Le as ai,ye as aj,V as ak,m as al,Uu as am,Yu as an,Gu as ao,B as ap,be as aq,Xt as ar,Yt as as,Eg as at,Vt as au,Og as av,Jt as aw,rt as ax,et as ay,re as az,N as b,Dr as c,At as d,$ as e,tr as f,g,We as h,ft as i,He as j,Ue as k,L as l,po as m,ke as n,v as o,P as p,Y as q,K as r,No as s,Ve as t,H as u,ie as v,Ot as w,R as x,z as y,b as z};