Files
mermaid-live-editor/beta/_app/chunks/vendor-eae4f079.js
T

41 lines
1004 KiB
JavaScript

function t(){}const e=t=>t;function n(t,e){for(const n in e)t[n]=e[n];return t}function r(t){return t()}function i(){return Object.create(null)}function a(t){t.forEach(r)}function o(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(e,...n){if(null==e)return t;const r=e.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function l(t){let e;return c(t,(t=>e=t))(),e}function u(t,e,n){t.$$.on_destroy.push(c(e,n))}function h(t,e,n,r){if(t){const i=d(t,e,n,r);return t[0](i)}}function d(t,e,r,i){return t[1]&&i?n(r.ctx.slice(),t[1](i(e))):r.ctx}function f(t,e,n,r,i,a,o){const s=function(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],n=Math.max(e.dirty.length,i.length);for(let r=0;r<n;r+=1)t[r]=e.dirty[r]|i[r];return t}return e.dirty|i}return e.dirty}(e,r,i,a);if(s){const i=d(e,n,r,o);t.p(i,s)}}function p(t){return null==t?"":t}function g(t,e,n=e){return t.set(n),e}const y="undefined"!=typeof window;let m=y?()=>window.performance.now():()=>Date.now(),v=y?t=>requestAnimationFrame(t):t;const b=new Set;function _(t){b.forEach((e=>{e.c(t)||(b.delete(e),e.f())})),0!==b.size&&v(_)}let w=!1;function x(t,e,n,r){for(;t<e;){const i=t+(e-t>>1);n(i)<=r?t=i+1:e=i}return t}function k(t,e){w?(!function(t){if(t.hydrate_init)return;t.hydrate_init=!0;const e=t.childNodes,n=new Int32Array(e.length+1),r=new Int32Array(e.length);n[0]=-1;let i=0;for(let c=0;c<e.length;c++){const t=x(1,i+1,(t=>e[n[t]].claim_order),e[c].claim_order)-1;r[c]=n[t]+1;const a=t+1;n[a]=c,i=Math.max(a,i)}const a=[],o=[];let s=e.length-1;for(let c=n[i]+1;0!=c;c=r[c-1]){for(a.push(e[c-1]);s>=c;s--)o.push(e[s]);s--}for(;s>=0;s--)o.push(e[s]);a.reverse(),o.sort(((t,e)=>t.claim_order-e.claim_order));for(let c=0,l=0;c<o.length;c++){for(;l<a.length&&o[c].claim_order>=a[l].claim_order;)l++;const e=l<a.length?a[l]:null;t.insertBefore(o[c],e)}}(t),(void 0===t.actual_end_child||null!==t.actual_end_child&&t.actual_end_child.parentElement!==t)&&(t.actual_end_child=t.firstChild),e!==t.actual_end_child?t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling):e.parentNode!==t&&t.appendChild(e)}function C(t,e,n){w&&!n?k(t,e):(e.parentNode!==t||n&&e.nextSibling!==n)&&t.insertBefore(e,n||null)}function T(t){t.parentNode.removeChild(t)}function E(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function S(t){return document.createElement(t)}function O(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function A(t){return document.createTextNode(t)}function M(){return A(" ")}function D(){return A("")}function j(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function N(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function B(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function L(t){return""===t?null:+t}function R(t){return Array.from(t.childNodes)}function I(t,e,n,r,i=!1){void 0===t.claim_info&&(t.claim_info={last_index:0,total_claimed:0});const a=(()=>{for(let r=t.claim_info.last_index;r<t.length;r++){const a=t[r];if(e(a))return n(a),t.splice(r,1),i||(t.claim_info.last_index=r),a}for(let r=t.claim_info.last_index-1;r>=0;r--){const a=t[r];if(e(a))return n(a),t.splice(r,1),i?t.claim_info.last_index--:t.claim_info.last_index=r,a}return r()})();return a.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,a}function F(t,e,n,r){return I(t,(t=>t.nodeName===e),(t=>{const e=[];for(let r=0;r<t.attributes.length;r++){const i=t.attributes[r];n[i.name]||e.push(i.name)}e.forEach((e=>t.removeAttribute(e)))}),(()=>r?O(e):S(e)))}function P(t,e){return I(t,(t=>3===t.nodeType),(t=>{t.data=""+e}),(()=>A(e)),!0)}function Y(t){return P(t," ")}function z(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function U(t,e){t.value=null==e?"":e}function $(t,e,n,r){t.style.setProperty(e,n,r?"important":"")}function W(t,e,n){t.classList[n?"add":"remove"](e)}function q(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}const H=new Set;let V,G=0;function X(t,e,n,r,i,a,o,s=0){const c=16.666/r;let l="{\n";for(let y=0;y<=1;y+=c){const t=e+(n-e)*a(y);l+=100*y+`%{${o(t,1-t)}}\n`}const u=l+`100% {${o(n,1-n)}}\n}`,h=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${s}`,d=t.ownerDocument;H.add(d);const f=d.__svelte_stylesheet||(d.__svelte_stylesheet=d.head.appendChild(S("style")).sheet),p=d.__svelte_rules||(d.__svelte_rules={});p[h]||(p[h]=!0,f.insertRule(`@keyframes ${h} ${u}`,f.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${h} ${r}ms linear ${i}ms 1 both`,G+=1,h}function Z(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-r.length;i&&(t.style.animation=r.join(", "),G-=i,G||v((()=>{G||(H.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),H.clear())})))}function Q(t){V=t}function K(){if(!V)throw new Error("Function called outside component initialization");return V}function J(t){K().$$.on_mount.push(t)}function tt(t){K().$$.after_update.push(t)}function et(){const t=K();return(e,n)=>{const r=t.$$.callbacks[e];if(r){const i=q(e,n);r.slice().forEach((e=>{e.call(t,i)}))}}}function nt(t,e){K().$$.context.set(t,e)}function rt(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const it=[],at=[],ot=[],st=[],ct=Promise.resolve();let lt=!1;function ut(t){ot.push(t)}function ht(t){st.push(t)}let dt=!1;const ft=new Set;function pt(){if(!dt){dt=!0;do{for(let t=0;t<it.length;t+=1){const e=it[t];Q(e),gt(e.$$)}for(Q(null),it.length=0;at.length;)at.pop()();for(let t=0;t<ot.length;t+=1){const e=ot[t];ft.has(e)||(ft.add(e),e())}ot.length=0}while(it.length);for(;st.length;)st.pop()();lt=!1,dt=!1,ft.clear()}}function gt(t){if(null!==t.fragment){t.update(),a(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(ut)}}let yt;function mt(t,e,n){t.dispatchEvent(q(`${e?"intro":"outro"}${n}`))}const vt=new Set;let bt;function _t(){bt={r:0,c:[],p:bt}}function wt(){bt.r||a(bt.c),bt=bt.p}function xt(t,e){t&&t.i&&(vt.delete(t),t.i(e))}function kt(t,e,n,r){if(t&&t.o){if(vt.has(t))return;vt.add(t),bt.c.push((()=>{vt.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}}const Ct={duration:0};function Tt(n,r,i,s){let c=r(n,i),l=s?0:1,u=null,h=null,d=null;function f(){d&&Z(n,d)}function p(t,e){const n=t.b-l;return e*=Math.abs(n),{a:l,b:t.b,d:n,duration:e,start:t.start,end:t.start+e,group:t.group}}function g(r){const{delay:i=0,duration:o=300,easing:s=e,tick:g=t,css:y}=c||Ct,w={start:m()+i,b:r};r||(w.group=bt,bt.r+=1),u||h?h=w:(y&&(f(),d=X(n,l,r,o,i,s,y)),r&&g(0,1),u=p(w,o),ut((()=>mt(n,r,"start"))),function(t){let e;0===b.size&&v(_),new Promise((n=>{b.add(e={c:t,f:n})}))}((t=>{if(h&&t>h.start&&(u=p(h,o),h=null,mt(n,u.b,"start"),y&&(f(),d=X(n,l,u.b,u.duration,0,s,c.css))),u)if(t>=u.end)g(l=u.b,1-l),mt(n,u.b,"end"),h||(u.b?f():--u.group.r||a(u.group.c)),u=null;else if(t>=u.start){const e=t-u.start;l=u.a+u.d*s(e/u.duration),g(l,1-l)}return!(!u&&!h)})))}return{run(t){o(c)?(yt||(yt=Promise.resolve(),yt.then((()=>{yt=null}))),yt).then((()=>{c=c(),g(t)})):g(t)},end(){f(),u=h=null}}}function Et(t,e){const n={},r={},i={$$scope:1};let a=t.length;for(;a--;){const o=t[a],s=e[a];if(s){for(const t in o)t in s||(r[t]=1);for(const t in s)i[t]||(n[t]=s[t],i[t]=1);t[a]=s}else for(const t in o)i[t]=1}for(const o in r)o in n||(n[o]=void 0);return n}function St(t){return"object"==typeof t&&null!==t?t:{}}function Ot(t,e,n){const r=t.$$.props[e];void 0!==r&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function At(t){t&&t.c()}function Mt(t,e){t&&t.l(e)}function Dt(t,e,n,i){const{fragment:s,on_mount:c,on_destroy:l,after_update:u}=t.$$;s&&s.m(e,n),i||ut((()=>{const e=c.map(r).filter(o);l?l.push(...e):a(e),t.$$.on_mount=[]})),u.forEach(ut)}function jt(t,e){const n=t.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Nt(t,e){-1===t.$$.dirty[0]&&(it.push(t),lt||(lt=!0,ct.then(pt)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Bt(e,n,r,o,s,c,l=[-1]){const u=V;Q(e);const h=e.$$={fragment:null,ctx:null,props:c,update:t,not_equal:s,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:n.context||[]),callbacks:i(),dirty:l,skip_bound:!1};let d=!1;if(h.ctx=r?r(e,n.props||{},((t,n,...r)=>{const i=r.length?r[0]:n;return h.ctx&&s(h.ctx[t],h.ctx[t]=i)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](i),d&&Nt(e,t)),n})):[],h.update(),d=!0,a(h.before_update),h.fragment=!!o&&o(h.ctx),n.target){if(n.hydrate){w=!0;const t=R(n.target);h.fragment&&h.fragment.l(t),t.forEach(T)}else h.fragment&&h.fragment.c();n.intro&&xt(e.$$.fragment),Dt(e,n.target,n.anchor,n.customElement),w=!1,pt()}Q(u)}class Lt{$destroy(){jt(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Rt=[];function It(e,n=t){let r;const i=[];function a(t){if(s(e,t)&&(e=t,r)){const t=!Rt.length;for(let n=0;n<i.length;n+=1){const t=i[n];t[1](),Rt.push(t,e)}if(t){for(let t=0;t<Rt.length;t+=2)Rt[t][0](Rt[t+1]);Rt.length=0}}}return{set:a,update:function(t){a(t(e))},subscribe:function(o,s=t){const c=[o,s];return i.push(c),1===i.length&&(r=n(a)||t),o(e),()=>{const t=i.indexOf(c);-1!==t&&i.splice(t,1),0===i.length&&(r(),r=null)}}}}function Ft(e,n,r){const i=!Array.isArray(e),s=i?[e]:e,l=n.length<2;return{subscribe:It(r,(e=>{let r=!1;const u=[];let h=0,d=t;const f=()=>{if(h)return;d();const r=n(i?u[0]:u,e);l?e(r):d=o(r)?r:t},p=s.map(((t,e)=>c(t,(t=>{u[e]=t,h&=~(1<<e),r&&f()}),(()=>{h|=1<<e}))));return r=!0,f(),function(){a(p),d()}})).subscribe}}const Pt="function"==typeof atob,Yt="function"==typeof btoa,zt="function"==typeof Buffer,Ut="function"==typeof TextDecoder?new TextDecoder:void 0,$t="function"==typeof TextEncoder?new TextEncoder:void 0,Wt=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],qt=(t=>{let e={};return Wt.forEach(((t,n)=>e[t]=n)),e})(),Ht=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Vt=String.fromCharCode.bind(String),Gt="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(t,e=(t=>t))=>new Uint8Array(Array.prototype.slice.call(t,0).map(e)),Xt=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),Zt=Yt?t=>btoa(t):zt?t=>Buffer.from(t,"binary").toString("base64"):t=>{let e,n,r,i,a="";const o=t.length%3;for(let s=0;s<t.length;){if((n=t.charCodeAt(s++))>255||(r=t.charCodeAt(s++))>255||(i=t.charCodeAt(s++))>255)throw new TypeError("invalid character found");e=n<<16|r<<8|i,a+=Wt[e>>18&63]+Wt[e>>12&63]+Wt[e>>6&63]+Wt[63&e]}return o?a.slice(0,o-3)+"===".substring(o):a},Qt=zt?t=>Buffer.from(t).toString("base64"):t=>{let e=[];for(let n=0,r=t.length;n<r;n+=4096)e.push(Vt.apply(null,t.subarray(n,n+4096)));return Zt(e.join(""))},Kt=t=>{if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?Vt(192|e>>>6)+Vt(128|63&e):Vt(224|e>>>12&15)+Vt(128|e>>>6&63)+Vt(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return Vt(240|e>>>18&7)+Vt(128|e>>>12&63)+Vt(128|e>>>6&63)+Vt(128|63&e)},Jt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,te=zt?t=>Buffer.from(t,"utf8").toString("base64"):$t?t=>Qt($t.encode(t)):t=>Zt(t.replace(Jt,Kt)),ee=(t,e=!1)=>e?(t=>t.replace(/[+\/]/g,(t=>"+"==t?"-":"_")).replace(/=+$/m,""))(te(t)):te(t),ne=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,re=t=>{switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return Vt(55296+(e>>>10))+Vt(56320+(1023&e));case 3:return Vt((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return Vt((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},ie=Pt?t=>atob(Xt(t)):zt?t=>Buffer.from(t,"base64").toString("binary"):t=>{if(t=t.replace(/\s+/g,""),!Ht.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let e,n,r,i="";for(let a=0;a<t.length;)e=qt[t.charAt(a++)]<<18|qt[t.charAt(a++)]<<12|(n=qt[t.charAt(a++)])<<6|(r=qt[t.charAt(a++)]),i+=64===n?Vt(e>>16&255):64===r?Vt(e>>16&255,e>>8&255):Vt(e>>16&255,e>>8&255,255&e);return i},ae=zt?t=>Gt(Buffer.from(t,"base64")):t=>Gt(ie(t),(t=>t.charCodeAt(0))),oe=zt?t=>Buffer.from(t,"base64").toString("utf8"):Ut?t=>Ut.decode(ae(t)):t=>ie(t).replace(ne,re),se=t=>oe(Xt(t.replace(/[-_]/g,(t=>"-"==t?"+":"/"))));function ce(t,e,n){const r=e.getValue(n);return null!==r&&t.set(r),e.addListener&&e.addListener(n,(e=>{t.set(e)})),t.subscribe((t=>{e.setValue(n,t)})),Object.assign(Object.assign({},t),{delete(){e.deleteValue(n)}})}function le(t,e=!1){const n=[],r=e=>{const r=e.key;e.storageArea===t&&n.filter((({key:t})=>t===r)).forEach((({listener:t})=>{let n=e.newValue;try{n=JSON.parse(e.newValue)}catch(r){}t(n)}))};return{addListener(t,i){n.push({key:t,listener:i}),1===n.length&&e&&"undefined"!=typeof window&&(null===window||void 0===window?void 0:window.addEventListener)&&window.addEventListener("storage",r)},removeListener(t,i){const a=n.indexOf({key:t,listener:i});-1!==a&&n.splice(a,1),0===n.length&&e&&"undefined"!=typeof window&&(null===window||void 0===window?void 0:window.removeEventListener)&&window.removeEventListener("storage",r)},getValue(e){let n=t.getItem(e);if(null!=n)try{n=JSON.parse(n)}catch(r){}return n},deleteValue(e){t.removeItem(e)},setValue(e,n){t.setItem(e,JSON.stringify(n))}}}function ue(t=!1){return"undefined"!=typeof window&&(null===window||void 0===window?void 0:window.localStorage)?le(window.localStorage,t):(console.warn("Unable to find the localStorage. No data will be persisted."),{getValue:()=>null,deleteValue(){},setValue(){}})}const he="8.11.1";function de(t){const e=t-1;return e*e*e+1}function fe(t,{delay:n=0,duration:r=400,easing:i=e}={}){const a=+getComputedStyle(t).opacity;return{delay:n,duration:r,easing:i,css:t=>"opacity: "+t*a}}function pe(t,{delay:e=0,duration:n=400,easing:r=de}={}){const i=getComputedStyle(t),a=+i.opacity,o=parseFloat(i.height),s=parseFloat(i.paddingTop),c=parseFloat(i.paddingBottom),l=parseFloat(i.marginTop),u=parseFloat(i.marginBottom),h=parseFloat(i.borderTopWidth),d=parseFloat(i.borderBottomWidth);return{delay:e,duration:n,easing:r,css:t=>`overflow: hidden;opacity: ${Math.min(20*t,1)*a};height: ${t*o}px;padding-top: ${t*s}px;padding-bottom: ${t*c}px;margin-top: ${t*l}px;margin-bottom: ${t*u}px;border-top-width: ${t*h}px;border-bottom-width: ${t*d}px;`}}
//! moment.js
//! version : 2.29.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var ge,ye;function me(){return ge.apply(null,arguments)}function ve(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function be(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function _e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function we(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(_e(t,e))return!1;return!0}function xe(t){return void 0===t}function ke(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function Ce(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function Te(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function Ee(t,e){for(var n in e)_e(e,n)&&(t[n]=e[n]);return _e(e,"toString")&&(t.toString=e.toString),_e(e,"valueOf")&&(t.valueOf=e.valueOf),t}function Se(t,e,n,r){return Pr(t,e,n,r,!0).utc()}function Oe(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function Ae(t){if(null==t._isValid){var e=Oe(t),n=ye.call(e.parsedDateParts,(function(t){return null!=t})),r=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(r=r&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return r;t._isValid=r}return t._isValid}function Me(t){var e=Se(NaN);return null!=t?Ee(Oe(e),t):Oe(e).userInvalidated=!0,e}ye=Array.prototype.some?Array.prototype.some:function(t){var e,n=Object(this),r=n.length>>>0;for(e=0;e<r;e++)if(e in n&&t.call(this,n[e],e,n))return!0;return!1};var De=me.momentProperties=[],je=!1;function Ne(t,e){var n,r,i;if(xe(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),xe(e._i)||(t._i=e._i),xe(e._f)||(t._f=e._f),xe(e._l)||(t._l=e._l),xe(e._strict)||(t._strict=e._strict),xe(e._tzm)||(t._tzm=e._tzm),xe(e._isUTC)||(t._isUTC=e._isUTC),xe(e._offset)||(t._offset=e._offset),xe(e._pf)||(t._pf=Oe(e)),xe(e._locale)||(t._locale=e._locale),De.length>0)for(n=0;n<De.length;n++)xe(i=e[r=De[n]])||(t[r]=i);return t}function Be(t){Ne(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===je&&(je=!0,me.updateOffset(this),je=!1)}function Le(t){return t instanceof Be||null!=t&&null!=t._isAMomentObject}function Re(t){!1===me.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function Ie(t,e){var n=!0;return Ee((function(){if(null!=me.deprecationHandler&&me.deprecationHandler(null,t),n){var r,i,a,o=[];for(i=0;i<arguments.length;i++){if(r="","object"==typeof arguments[i]){for(a in r+="\n["+i+"] ",arguments[0])_e(arguments[0],a)&&(r+=a+": "+arguments[0][a]+", ");r=r.slice(0,-2)}else r=arguments[i];o.push(r)}Re(t+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var Fe,Pe={};function Ye(t,e){null!=me.deprecationHandler&&me.deprecationHandler(t,e),Pe[t]||(Re(e),Pe[t]=!0)}function ze(t){return"undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function Ue(t,e){var n,r=Ee({},t);for(n in e)_e(e,n)&&(be(t[n])&&be(e[n])?(r[n]={},Ee(r[n],t[n]),Ee(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)_e(t,n)&&!_e(e,n)&&be(t[n])&&(r[n]=Ee({},r[n]));return r}function $e(t){null!=t&&this.set(t)}me.suppressDeprecationWarnings=!1,me.deprecationHandler=null,Fe=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)_e(t,e)&&n.push(e);return n};function We(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var qe=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,He=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ve={},Ge={};function Xe(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(Ge[t]=i),e&&(Ge[e[0]]=function(){return We(i.apply(this,arguments),e[1],e[2])}),n&&(Ge[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function Ze(t,e){return t.isValid()?(e=Qe(e,t.localeData()),Ve[e]=Ve[e]||function(t){var e,n,r,i=t.match(qe);for(e=0,n=i.length;e<n;e++)Ge[i[e]]?i[e]=Ge[i[e]]:i[e]=(r=i[e]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(e){var r,a="";for(r=0;r<n;r++)a+=ze(i[r])?i[r].call(e,t):i[r];return a}}(e),Ve[e](t)):t.localeData().invalidDate()}function Qe(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(He.lastIndex=0;n>=0&&He.test(t);)t=t.replace(He,r),He.lastIndex=0,n-=1;return t}var Ke={};function Je(t,e){var n=t.toLowerCase();Ke[n]=Ke[n+"s"]=Ke[e]=t}function tn(t){return"string"==typeof t?Ke[t]||Ke[t.toLowerCase()]:void 0}function en(t){var e,n,r={};for(n in t)_e(t,n)&&(e=tn(n))&&(r[e]=t[n]);return r}var nn={};function rn(t,e){nn[t]=e}function an(t){return t%4==0&&t%100!=0||t%400==0}function on(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function sn(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=on(e)),n}function cn(t,e){return function(n){return null!=n?(un(this,t,n),me.updateOffset(this,e),this):ln(this,t)}}function ln(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function un(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&an(t.year())&&1===t.month()&&29===t.date()?(n=sn(n),t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),Rn(n,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](n))}var hn,dn=/\d/,fn=/\d\d/,pn=/\d{3}/,gn=/\d{4}/,yn=/[+-]?\d{6}/,mn=/\d\d?/,vn=/\d\d\d\d?/,bn=/\d\d\d\d\d\d?/,_n=/\d{1,3}/,wn=/\d{1,4}/,xn=/[+-]?\d{1,6}/,kn=/\d+/,Cn=/[+-]?\d+/,Tn=/Z|[+-]\d\d:?\d\d/gi,En=/Z|[+-]\d\d(?::?\d\d)?/gi,Sn=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function On(t,e,n){hn[t]=ze(e)?e:function(t,r){return t&&n?n:e}}function An(t,e){return _e(hn,t)?hn[t](e._strict,e._locale):new RegExp(Mn(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function Mn(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}hn={};var Dn={};function jn(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),ke(e)&&(r=function(t,n){n[e]=sn(t)}),n=0;n<t.length;n++)Dn[t[n]]=r}function Nn(t,e){jn(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function Bn(t,e,n){null!=e&&_e(Dn,t)&&Dn[t](e,n._a,n,t)}var Ln;function Rn(t,e){if(isNaN(t)||isNaN(e))return NaN;var n,r=(e%(n=12)+n)%n;return t+=(e-r)/12,1===r?an(t)?29:28:31-r%7%2}Ln=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},Xe("M",["MM",2],"Mo",(function(){return this.month()+1})),Xe("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),Xe("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),Je("month","M"),rn("month",8),On("M",mn),On("MM",mn,fn),On("MMM",(function(t,e){return e.monthsShortRegex(t)})),On("MMMM",(function(t,e){return e.monthsRegex(t)})),jn(["M","MM"],(function(t,e){e[1]=sn(t)-1})),jn(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[1]=i:Oe(n).invalidMonth=t}));var In="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Fn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Pn=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Yn=Sn,zn=Sn;function Un(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=Se([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=Ln.call(this._shortMonthsParse,o))?i:null:-1!==(i=Ln.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=Ln.call(this._shortMonthsParse,o))||-1!==(i=Ln.call(this._longMonthsParse,o))?i:null:-1!==(i=Ln.call(this._longMonthsParse,o))||-1!==(i=Ln.call(this._shortMonthsParse,o))?i:null}function $n(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=sn(e);else if(!ke(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),Rn(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function Wn(t){return null!=t?($n(this,t),me.updateOffset(this,!0),this):ln(this,"Month")}function qn(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=Se([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=Mn(r[e]),i[e]=Mn(i[e]);for(e=0;e<24;e++)a[e]=Mn(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Hn(t){return an(t)?366:365}Xe("Y",0,0,(function(){var t=this.year();return t<=9999?We(t,4):"+"+t})),Xe(0,["YY",2],0,(function(){return this.year()%100})),Xe(0,["YYYY",4],0,"year"),Xe(0,["YYYYY",5],0,"year"),Xe(0,["YYYYYY",6,!0],0,"year"),Je("year","y"),rn("year",1),On("Y",Cn),On("YY",mn,fn),On("YYYY",wn,gn),On("YYYYY",xn,yn),On("YYYYYY",xn,yn),jn(["YYYYY","YYYYYY"],0),jn("YYYY",(function(t,e){e[0]=2===t.length?me.parseTwoDigitYear(t):sn(t)})),jn("YY",(function(t,e){e[0]=me.parseTwoDigitYear(t)})),jn("Y",(function(t,e){e[0]=parseInt(t,10)})),me.parseTwoDigitYear=function(t){return sn(t)+(sn(t)>68?1900:2e3)};var Vn=cn("FullYear",!0);function Gn(t,e,n,r,i,a,o){var s;return t<100&&t>=0?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}function Xn(t){var e,n;return t<100&&t>=0?((n=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function Zn(t,e,n){var r=7+e-n;return-((7+Xn(t,0,r).getUTCDay()-e)%7)+r-1}function Qn(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+Zn(t,r,i);return s<=0?o=Hn(a=t-1)+s:s>Hn(t)?(a=t+1,o=s-Hn(t)):(a=t,o=s),{year:a,dayOfYear:o}}function Kn(t,e,n){var r,i,a=Zn(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Jn(i=t.year()-1,e,n):o>Jn(t.year(),e,n)?(r=o-Jn(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Jn(t,e,n){var r=Zn(t,e,n),i=Zn(t+1,e,n);return(Hn(t)-r+i)/7}Xe("w",["ww",2],"wo","week"),Xe("W",["WW",2],"Wo","isoWeek"),Je("week","w"),Je("isoWeek","W"),rn("week",5),rn("isoWeek",5),On("w",mn),On("ww",mn,fn),On("W",mn),On("WW",mn,fn),Nn(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=sn(t)}));function tr(t,e){return t.slice(e,7).concat(t.slice(0,e))}Xe("d",0,"do","day"),Xe("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),Xe("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),Xe("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),Xe("e",0,0,"weekday"),Xe("E",0,0,"isoWeekday"),Je("day","d"),Je("weekday","e"),Je("isoWeekday","E"),rn("day",11),rn("weekday",11),rn("isoWeekday",11),On("d",mn),On("e",mn),On("E",mn),On("dd",(function(t,e){return e.weekdaysMinRegex(t)})),On("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),On("dddd",(function(t,e){return e.weekdaysRegex(t)})),Nn(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:Oe(n).invalidWeekday=t})),Nn(["d","e","E"],(function(t,e,n,r){e[r]=sn(t)}));var er="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),nr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),rr="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ir=Sn,ar=Sn,or=Sn;function sr(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=Se([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=Ln.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=Ln.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=Ln.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=Ln.call(this._weekdaysParse,o))||-1!==(i=Ln.call(this._shortWeekdaysParse,o))||-1!==(i=Ln.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=Ln.call(this._shortWeekdaysParse,o))||-1!==(i=Ln.call(this._weekdaysParse,o))||-1!==(i=Ln.call(this._minWeekdaysParse,o))?i:null:-1!==(i=Ln.call(this._minWeekdaysParse,o))||-1!==(i=Ln.call(this._weekdaysParse,o))||-1!==(i=Ln.call(this._shortWeekdaysParse,o))?i:null}function cr(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],l=[];for(e=0;e<7;e++)n=Se([2e3,1]).day(e),r=Mn(this.weekdaysMin(n,"")),i=Mn(this.weekdaysShort(n,"")),a=Mn(this.weekdays(n,"")),o.push(r),s.push(i),c.push(a),l.push(r),l.push(i),l.push(a);o.sort(t),s.sort(t),c.sort(t),l.sort(t),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function lr(){return this.hours()%12||12}function ur(t,e){Xe(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function hr(t,e){return e._meridiemParse}Xe("H",["HH",2],0,"hour"),Xe("h",["hh",2],0,lr),Xe("k",["kk",2],0,(function(){return this.hours()||24})),Xe("hmm",0,0,(function(){return""+lr.apply(this)+We(this.minutes(),2)})),Xe("hmmss",0,0,(function(){return""+lr.apply(this)+We(this.minutes(),2)+We(this.seconds(),2)})),Xe("Hmm",0,0,(function(){return""+this.hours()+We(this.minutes(),2)})),Xe("Hmmss",0,0,(function(){return""+this.hours()+We(this.minutes(),2)+We(this.seconds(),2)})),ur("a",!0),ur("A",!1),Je("hour","h"),rn("hour",13),On("a",hr),On("A",hr),On("H",mn),On("h",mn),On("k",mn),On("HH",mn,fn),On("hh",mn,fn),On("kk",mn,fn),On("hmm",vn),On("hmmss",bn),On("Hmm",vn),On("Hmmss",bn),jn(["H","HH"],3),jn(["k","kk"],(function(t,e,n){var r=sn(t);e[3]=24===r?0:r})),jn(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),jn(["h","hh"],(function(t,e,n){e[3]=sn(t),Oe(n).bigHour=!0})),jn("hmm",(function(t,e,n){var r=t.length-2;e[3]=sn(t.substr(0,r)),e[4]=sn(t.substr(r)),Oe(n).bigHour=!0})),jn("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=sn(t.substr(0,r)),e[4]=sn(t.substr(r,2)),e[5]=sn(t.substr(i)),Oe(n).bigHour=!0})),jn("Hmm",(function(t,e,n){var r=t.length-2;e[3]=sn(t.substr(0,r)),e[4]=sn(t.substr(r))})),jn("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=sn(t.substr(0,r)),e[4]=sn(t.substr(r,2)),e[5]=sn(t.substr(i))}));var dr=cn("Hours",!0);var fr,pr={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:In,monthsShort:Fn,week:{dow:0,doy:6},weekdays:er,weekdaysMin:rr,weekdaysShort:nr,meridiemParse:/[ap]\.?m?\.?/i},gr={},yr={};function mr(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function vr(t){return t?t.toLowerCase().replace("_","-"):t}function br(t){var e=null;if(void 0===gr[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=fr._abbr,require("./locale/"+t),_r(e)}catch(n){gr[t]=null}return gr[t]}function _r(t,e){var n;return t&&((n=xe(e)?xr(t):wr(t,e))?fr=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),fr._abbr}function wr(t,e){if(null!==e){var n,r=pr;if(e.abbr=t,null!=gr[t])Ye("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=gr[t]._config;else if(null!=e.parentLocale)if(null!=gr[e.parentLocale])r=gr[e.parentLocale]._config;else{if(null==(n=br(e.parentLocale)))return yr[e.parentLocale]||(yr[e.parentLocale]=[]),yr[e.parentLocale].push({name:t,config:e}),null;r=n._config}return gr[t]=new $e(Ue(r,e)),yr[t]&&yr[t].forEach((function(t){wr(t.name,t.config)})),_r(t),gr[t]}return delete gr[t],null}function xr(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return fr;if(!ve(t)){if(e=br(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=vr(t[a]).split("-")).length,n=(n=vr(t[a+1]))?n.split("-"):null;e>0;){if(r=br(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&mr(i,n)>=e-1)break;e--}a++}return fr}(t)}function kr(t){var e,n=t._a;return n&&-2===Oe(t).overflow&&(e=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Rn(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,Oe(t)._overflowDayOfYear&&(e<0||e>2)&&(e=2),Oe(t)._overflowWeeks&&-1===e&&(e=7),Oe(t)._overflowWeekday&&-1===e&&(e=8),Oe(t).overflow=e),t}var Cr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Tr=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Er=/Z|[+-]\d\d(?::?\d\d)?/,Sr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Or=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ar=/^\/?Date\((-?\d+)/i,Mr=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Dr={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function jr(t){var e,n,r,i,a,o,s=t._i,c=Cr.exec(s)||Tr.exec(s);if(c){for(Oe(t).iso=!0,e=0,n=Sr.length;e<n;e++)if(Sr[e][1].exec(c[1])){i=Sr[e][0],r=!1!==Sr[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=Or.length;e<n;e++)if(Or[e][1].exec(c[3])){a=(c[2]||" ")+Or[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(c[4]){if(!Er.exec(c[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),Ir(t)}else t._isValid=!1}function Nr(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function Br(t){var e,n,r,i,a,o,s,c,l=Mr.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){if(n=l[4],r=l[3],i=l[2],a=l[5],o=l[6],s=l[7],c=[Nr(n),Fn.indexOf(r),parseInt(i,10),parseInt(a,10),parseInt(o,10)],s&&c.push(parseInt(s,10)),e=c,!function(t,e,n){return!t||nr.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(Oe(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],e,t))return;t._a=e,t._tzm=function(t,e,n){if(t)return Dr[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(l[8],l[9],l[10]),t._d=Xn.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),Oe(t).rfc2822=!0}else t._isValid=!1}function Lr(t,e,n){return null!=t?t:null!=e?e:n}function Rr(t){var e,n,r,i,a,o=[];if(!t._d){for(r=function(t){var e=new Date(me.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,r,i,a,o,s,c,l;null!=(e=t._w).GG||null!=e.W||null!=e.E?(a=1,o=4,n=Lr(e.GG,t._a[0],Kn(Yr(),1,4).year),r=Lr(e.W,1),((i=Lr(e.E,1))<1||i>7)&&(c=!0)):(a=t._locale._week.dow,o=t._locale._week.doy,l=Kn(Yr(),a,o),n=Lr(e.gg,t._a[0],l.year),r=Lr(e.w,l.week),null!=e.d?((i=e.d)<0||i>6)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||e.e>6)&&(c=!0)):i=a);r<1||r>Jn(n,a,o)?Oe(t)._overflowWeeks=!0:null!=c?Oe(t)._overflowWeekday=!0:(s=Qn(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(a=Lr(t._a[0],r[0]),(t._dayOfYear>Hn(a)||0===t._dayOfYear)&&(Oe(t)._overflowDayOfYear=!0),n=Xn(a,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=r[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Xn:Gn).apply(null,o),i=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==i&&(Oe(t).weekdayMismatch=!0)}}function Ir(t){if(t._f!==me.ISO_8601)if(t._f!==me.RFC_2822){t._a=[],Oe(t).empty=!0;var e,n,r,i,a,o,s=""+t._i,c=s.length,l=0;for(r=Qe(t._f,t._locale).match(qe)||[],e=0;e<r.length;e++)i=r[e],(n=(s.match(An(i,t))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&Oe(t).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),l+=n.length),Ge[i]?(n?Oe(t).empty=!1:Oe(t).unusedTokens.push(i),Bn(i,n,t)):t._strict&&!n&&Oe(t).unusedTokens.push(i);Oe(t).charsLeftOver=c-l,s.length>0&&Oe(t).unusedInput.push(s),t._a[3]<=12&&!0===Oe(t).bigHour&&t._a[3]>0&&(Oe(t).bigHour=void 0),Oe(t).parsedDateParts=t._a.slice(0),Oe(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var r;if(null==n)return e;return null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0),e):e}(t._locale,t._a[3],t._meridiem),null!==(o=Oe(t).era)&&(t._a[0]=t._locale.erasConvertYear(o,t._a[0])),Rr(t),kr(t)}else Br(t);else jr(t)}function Fr(t){var e=t._i,n=t._f;return t._locale=t._locale||xr(t._l),null===e||void 0===n&&""===e?Me({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),Le(e)?new Be(kr(e)):(Ce(e)?t._d=e:ve(n)?function(t){var e,n,r,i,a,o,s=!1;if(0===t._f.length)return Oe(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;i<t._f.length;i++)a=0,o=!1,e=Ne({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],Ir(e),Ae(e)&&(o=!0),a+=Oe(e).charsLeftOver,a+=10*Oe(e).unusedTokens.length,Oe(e).score=a,s?a<r&&(r=a,n=e):(null==r||a<r||o)&&(r=a,n=e,o&&(s=!0));Ee(t,n||e)}(t):n?Ir(t):function(t){var e=t._i;xe(e)?t._d=new Date(me.now()):Ce(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=Ar.exec(t._i);null===e?(jr(t),!1===t._isValid&&(delete t._isValid,Br(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:me.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):ve(e)?(t._a=Te(e.slice(0),(function(t){return parseInt(t,10)})),Rr(t)):be(e)?function(t){if(!t._d){var e=en(t._i),n=void 0===e.day?e.date:e.day;t._a=Te([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),Rr(t)}}(t):ke(e)?t._d=new Date(e):me.createFromInputFallback(t)}(t),Ae(t)||(t._d=null),t))}function Pr(t,e,n,r,i){var a,o={};return!0!==e&&!1!==e||(r=e,e=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(be(t)&&we(t)||ve(t)&&0===t.length)&&(t=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=i,o._l=n,o._i=t,o._f=e,o._strict=r,(a=new Be(kr(Fr(o))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function Yr(t,e,n,r){return Pr(t,e,n,r,!1)}me.createFromInputFallback=Ie("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),me.ISO_8601=function(){},me.RFC_2822=function(){};var zr=Ie("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Yr.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:Me()})),Ur=Ie("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Yr.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:Me()}));function $r(t,e){var n,r;if(1===e.length&&ve(e[0])&&(e=e[0]),!e.length)return Yr();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Wr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function qr(t){var e=en(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,c=e.minute||0,l=e.second||0,u=e.millisecond||0;this._isValid=function(t){var e,n,r=!1;for(e in t)if(_e(t,e)&&(-1===Ln.call(Wr,e)||null!=t[e]&&isNaN(t[e])))return!1;for(n=0;n<Wr.length;++n)if(t[Wr[n]]){if(r)return!1;parseFloat(t[Wr[n]])!==sn(t[Wr[n]])&&(r=!0)}return!0}(e),this._milliseconds=+u+1e3*l+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=xr(),this._bubble()}function Hr(t){return t instanceof qr}function Vr(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Gr(t,e){Xe(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+We(~~(t/60),2)+e+We(~~t%60,2)}))}Gr("Z",":"),Gr("ZZ",""),On("Z",En),On("ZZ",En),jn(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Zr(En,t)}));var Xr=/([\+\-]|\d\d)/gi;function Zr(t,e){var n,r,i=(e||"").match(t);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(Xr)||["-",0,0])[1]+sn(n[2]))?0:"+"===n[0]?r:-r}function Qr(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(Le(t)||Ce(t)?t.valueOf():Yr(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),me.updateOffset(n,!1),n):Yr(t).local()}function Kr(t){return-Math.round(t._d.getTimezoneOffset())}function Jr(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}me.updateOffset=function(){};var ti=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ei=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ni(t,e){var n,r,i,a=t,o=null;return Hr(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:ke(t)||!isNaN(+t)?(a={},e?a[e]=+t:a.milliseconds=+t):(o=ti.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:sn(o[2])*n,h:sn(o[3])*n,m:sn(o[4])*n,s:sn(o[5])*n,ms:sn(Vr(1e3*o[6]))*n}):(o=ei.exec(t))?(n="-"===o[1]?-1:1,a={y:ri(o[2],n),M:ri(o[3],n),w:ri(o[4],n),d:ri(o[5],n),h:ri(o[6],n),m:ri(o[7],n),s:ri(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(t,e){var n;if(!t.isValid()||!e.isValid())return{milliseconds:0,months:0};e=Qr(e,t),t.isBefore(e)?n=ii(t,e):((n=ii(e,t)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Yr(a.from),Yr(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new qr(a),Hr(t)&&_e(t,"_locale")&&(r._locale=t._locale),Hr(t)&&_e(t,"_isValid")&&(r._isValid=t._isValid),r}function ri(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function ii(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function ai(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(Ye(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),oi(this,ni(n,r),t),this}}function oi(t,e,n,r){var i=e._milliseconds,a=Vr(e._days),o=Vr(e._months);t.isValid()&&(r=null==r||r,o&&$n(t,ln(t,"Month")+o*n),a&&un(t,"Date",ln(t,"Date")+a*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&me.updateOffset(t,a||o))}ni.fn=qr.prototype,ni.invalid=function(){return ni(NaN)};var si=ai(1,"add"),ci=ai(-1,"subtract");function li(t){return"string"==typeof t||t instanceof String}function ui(t){return Le(t)||Ce(t)||li(t)||ke(t)||function(t){var e=ve(t),n=!1;e&&(n=0===t.filter((function(e){return!ke(e)&&li(t)})).length);return e&&n}(t)||function(t){var e,n,r=be(t)&&!we(t),i=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(e=0;e<a.length;e+=1)n=a[e],i=i||_e(t,n);return r&&i}(t)||null==t}function hi(t){var e,n=be(t)&&!we(t),r=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<i.length;e+=1)r=r||_e(t,i[e]);return n&&r}function di(t,e){if(t.date()<e.date())return-di(e,t);var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function fi(t){var e;return void 0===t?this._locale._abbr:(null!=(e=xr(t))&&(this._locale=e),this)}me.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",me.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var pi=Ie("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function gi(){return this._locale}function yi(t,e){return(t%e+e)%e}function mi(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-126227808e5:new Date(t,e,n).valueOf()}function vi(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-126227808e5:Date.UTC(t,e,n)}function bi(t,e){return e.erasAbbrRegex(t)}function _i(){var t,e,n=[],r=[],i=[],a=[],o=this.eras();for(t=0,e=o.length;t<e;++t)r.push(Mn(o[t].name)),n.push(Mn(o[t].abbr)),i.push(Mn(o[t].narrow)),a.push(Mn(o[t].name)),a.push(Mn(o[t].abbr)),a.push(Mn(o[t].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}function wi(t,e){Xe(0,[t,t.length],0,e)}function xi(t,e,n,r,i){var a;return null==t?Kn(this,r,i).year:(e>(a=Jn(t,r,i))&&(e=a),ki.call(this,t,e,n,r,i))}function ki(t,e,n,r,i){var a=Qn(t,e,n,r,i),o=Xn(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}Xe("N",0,0,"eraAbbr"),Xe("NN",0,0,"eraAbbr"),Xe("NNN",0,0,"eraAbbr"),Xe("NNNN",0,0,"eraName"),Xe("NNNNN",0,0,"eraNarrow"),Xe("y",["y",1],"yo","eraYear"),Xe("y",["yy",2],0,"eraYear"),Xe("y",["yyy",3],0,"eraYear"),Xe("y",["yyyy",4],0,"eraYear"),On("N",bi),On("NN",bi),On("NNN",bi),On("NNNN",(function(t,e){return e.erasNameRegex(t)})),On("NNNNN",(function(t,e){return e.erasNarrowRegex(t)})),jn(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?Oe(n).era=i:Oe(n).invalidEra=t})),On("y",kn),On("yy",kn),On("yyy",kn),On("yyyy",kn),On("yo",(function(t,e){return e._eraYearOrdinalRegex||kn})),jn(["y","yy","yyy","yyyy"],0),jn(["yo"],(function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[0]=n._locale.eraYearOrdinalParse(t,i):e[0]=parseInt(t,10)})),Xe(0,["gg",2],0,(function(){return this.weekYear()%100})),Xe(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),wi("gggg","weekYear"),wi("ggggg","weekYear"),wi("GGGG","isoWeekYear"),wi("GGGGG","isoWeekYear"),Je("weekYear","gg"),Je("isoWeekYear","GG"),rn("weekYear",1),rn("isoWeekYear",1),On("G",Cn),On("g",Cn),On("GG",mn,fn),On("gg",mn,fn),On("GGGG",wn,gn),On("gggg",wn,gn),On("GGGGG",xn,yn),On("ggggg",xn,yn),Nn(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=sn(t)})),Nn(["gg","GG"],(function(t,e,n,r){e[r]=me.parseTwoDigitYear(t)})),Xe("Q",0,"Qo","quarter"),Je("quarter","Q"),rn("quarter",7),On("Q",dn),jn("Q",(function(t,e){e[1]=3*(sn(t)-1)})),Xe("D",["DD",2],"Do","date"),Je("date","D"),rn("date",9),On("D",mn),On("DD",mn,fn),On("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),jn(["D","DD"],2),jn("Do",(function(t,e){e[2]=sn(t.match(mn)[0])}));var Ci=cn("Date",!0);Xe("DDD",["DDDD",3],"DDDo","dayOfYear"),Je("dayOfYear","DDD"),rn("dayOfYear",4),On("DDD",_n),On("DDDD",pn),jn(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=sn(t)})),Xe("m",["mm",2],0,"minute"),Je("minute","m"),rn("minute",14),On("m",mn),On("mm",mn,fn),jn(["m","mm"],4);var Ti=cn("Minutes",!1);Xe("s",["ss",2],0,"second"),Je("second","s"),rn("second",15),On("s",mn),On("ss",mn,fn),jn(["s","ss"],5);var Ei,Si,Oi=cn("Seconds",!1);for(Xe("S",0,0,(function(){return~~(this.millisecond()/100)})),Xe(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),Xe(0,["SSS",3],0,"millisecond"),Xe(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),Xe(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),Xe(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),Xe(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),Xe(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),Xe(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Je("millisecond","ms"),rn("millisecond",16),On("S",_n,dn),On("SS",_n,fn),On("SSS",_n,pn),Ei="SSSS";Ei.length<=9;Ei+="S")On(Ei,kn);function Ai(t,e){e[6]=sn(1e3*("0."+t))}for(Ei="S";Ei.length<=9;Ei+="S")jn(Ei,Ai);Si=cn("Milliseconds",!1),Xe("z",0,0,"zoneAbbr"),Xe("zz",0,0,"zoneName");var Mi=Be.prototype;function Di(t){return t}Mi.add=si,Mi.calendar=function(t,e){1===arguments.length&&(arguments[0]?ui(arguments[0])?(t=arguments[0],e=void 0):hi(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||Yr(),r=Qr(n,this).startOf("day"),i=me.calendarFormat(this,r)||"sameElse",a=e&&(ze(e[i])?e[i].call(this,n):e[i]);return this.format(a||this.localeData().calendar(i,this,Yr(n)))},Mi.clone=function(){return new Be(this)},Mi.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=Qr(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=tn(e)){case"year":a=di(this,r)/12;break;case"month":a=di(this,r);break;case"quarter":a=di(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:on(a)},Mi.endOf=function(t){var e,n;if(void 0===(t=tn(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?vi:mi,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-yi(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-yi(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-yi(e,1e3)-1}return this._d.setTime(e),me.updateOffset(this,!0),this},Mi.format=function(t){t||(t=this.isUtc()?me.defaultFormatUtc:me.defaultFormat);var e=Ze(this,t);return this.localeData().postformat(e)},Mi.from=function(t,e){return this.isValid()&&(Le(t)&&t.isValid()||Yr(t).isValid())?ni({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Mi.fromNow=function(t){return this.from(Yr(),t)},Mi.to=function(t,e){return this.isValid()&&(Le(t)&&t.isValid()||Yr(t).isValid())?ni({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Mi.toNow=function(t){return this.to(Yr(),t)},Mi.get=function(t){return ze(this[t=tn(t)])?this[t]():this},Mi.invalidAt=function(){return Oe(this).overflow},Mi.isAfter=function(t,e){var n=Le(t)?t:Yr(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=tn(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},Mi.isBefore=function(t,e){var n=Le(t)?t:Yr(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=tn(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},Mi.isBetween=function(t,e,n,r){var i=Le(t)?t:Yr(t),a=Le(e)?e:Yr(e);return!!(this.isValid()&&i.isValid()&&a.isValid())&&(("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n)))},Mi.isSame=function(t,e){var n,r=Le(t)?t:Yr(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=tn(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},Mi.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},Mi.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},Mi.isValid=function(){return Ae(this)},Mi.lang=pi,Mi.locale=fi,Mi.localeData=gi,Mi.max=Ur,Mi.min=zr,Mi.parsingFlags=function(){return Ee({},Oe(this))},Mi.set=function(t,e){if("object"==typeof t){var n,r=function(t){var e,n=[];for(e in t)_e(t,e)&&n.push({unit:e,priority:nn[e]});return n.sort((function(t,e){return t.priority-e.priority})),n}(t=en(t));for(n=0;n<r.length;n++)this[r[n].unit](t[r[n].unit])}else if(ze(this[t=tn(t)]))return this[t](e);return this},Mi.startOf=function(t){var e,n;if(void 0===(t=tn(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?vi:mi,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=yi(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=yi(e,6e4);break;case"second":e=this._d.valueOf(),e-=yi(e,1e3)}return this._d.setTime(e),me.updateOffset(this,!0),this},Mi.subtract=ci,Mi.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},Mi.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},Mi.toDate=function(){return new Date(this.valueOf())},Mi.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?Ze(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ze(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Ze(n,"Z")):Ze(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Mi.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,n,r="moment",i="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),t="["+r+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY","-MM-DD[T]HH:mm:ss.SSS",n=i+'[")]',this.format(t+e+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Mi[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Mi.toJSON=function(){return this.isValid()?this.toISOString():null},Mi.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Mi.unix=function(){return Math.floor(this.valueOf()/1e3)},Mi.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Mi.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Mi.eraName=function(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].name;if(r[t].until<=n&&n<=r[t].since)return r[t].name}return""},Mi.eraNarrow=function(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].narrow;if(r[t].until<=n&&n<=r[t].since)return r[t].narrow}return""},Mi.eraAbbr=function(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].abbr;if(r[t].until<=n&&n<=r[t].since)return r[t].abbr}return""},Mi.eraYear=function(){var t,e,n,r,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=i[t].since<=i[t].until?1:-1,r=this.clone().startOf("day").valueOf(),i[t].since<=r&&r<=i[t].until||i[t].until<=r&&r<=i[t].since)return(this.year()-me(i[t].since).year())*n+i[t].offset;return this.year()},Mi.year=Vn,Mi.isLeapYear=function(){return an(this.year())},Mi.weekYear=function(t){return xi.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Mi.isoWeekYear=function(t){return xi.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},Mi.quarter=Mi.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},Mi.month=Wn,Mi.daysInMonth=function(){return Rn(this.year(),this.month())},Mi.week=Mi.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},Mi.isoWeek=Mi.isoWeeks=function(t){var e=Kn(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},Mi.weeksInYear=function(){var t=this.localeData()._week;return Jn(this.year(),t.dow,t.doy)},Mi.weeksInWeekYear=function(){var t=this.localeData()._week;return Jn(this.weekYear(),t.dow,t.doy)},Mi.isoWeeksInYear=function(){return Jn(this.year(),1,4)},Mi.isoWeeksInISOWeekYear=function(){return Jn(this.isoWeekYear(),1,4)},Mi.date=Ci,Mi.day=Mi.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},Mi.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},Mi.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},Mi.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},Mi.hour=Mi.hours=dr,Mi.minute=Mi.minutes=Ti,Mi.second=Mi.seconds=Oi,Mi.millisecond=Mi.milliseconds=Si,Mi.utcOffset=function(t,e,n){var r,i=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Zr(En,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=Kr(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==t&&(!e||this._changeInProgress?oi(this,ni(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,me.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Kr(this)},Mi.utc=function(t){return this.utcOffset(0,t)},Mi.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Kr(this),"m")),this},Mi.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Zr(Tn,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},Mi.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Yr(t).utcOffset():0,(this.utcOffset()-t)%60==0)},Mi.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Mi.isLocal=function(){return!!this.isValid()&&!this._isUTC},Mi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Mi.isUtc=Jr,Mi.isUTC=Jr,Mi.zoneAbbr=function(){return this._isUTC?"UTC":""},Mi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Mi.dates=Ie("dates accessor is deprecated. Use date instead.",Ci),Mi.months=Ie("months accessor is deprecated. Use month instead",Wn),Mi.years=Ie("years accessor is deprecated. Use year instead",Vn),Mi.zone=Ie("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),Mi.isDSTShifted=Ie("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!xe(this._isDSTShifted))return this._isDSTShifted;var t,e={};return Ne(e,this),(e=Fr(e))._a?(t=e._isUTC?Se(e._a):Yr(e._a),this._isDSTShifted=this.isValid()&&function(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&sn(t[r])!==sn(e[r]))&&o++;return o+a}(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var ji=$e.prototype;function Ni(t,e,n,r){var i=xr(),a=Se().set(r,e);return i[n](a,t)}function Bi(t,e,n){if(ke(t)&&(e=t,t=void 0),t=t||"",null!=e)return Ni(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Ni(t,r,n,"month");return i}function Li(t,e,n,r){"boolean"==typeof t?(ke(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,ke(e)&&(n=e,e=void 0),e=e||"");var i,a=xr(),o=t?a._week.dow:0,s=[];if(null!=n)return Ni(e,(n+o)%7,r,"day");for(i=0;i<7;i++)s[i]=Ni(e,(i+o)%7,r,"day");return s}ji.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return ze(r)?r.call(e,n):r},ji.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(qe).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])},ji.invalidDate=function(){return this._invalidDate},ji.ordinal=function(t){return this._ordinal.replace("%d",t)},ji.preparse=Di,ji.postformat=Di,ji.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return ze(i)?i(t,e,n,r):i.replace(/%d/i,t)},ji.pastFuture=function(t,e){var n=this._relativeTime[t>0?"future":"past"];return ze(n)?n(e):n.replace(/%s/i,e)},ji.set=function(t){var e,n;for(n in t)_e(t,n)&&(ze(e=t[n])?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},ji.eras=function(t,e){var n,r,i,a=this._eras||xr("en")._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case"string":i=me(a[n].since).startOf("day"),a[n].since=i.valueOf()}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":i=me(a[n].until).startOf("day").valueOf(),a[n].until=i.valueOf()}}return a},ji.erasParse=function(t,e,n){var r,i,a,o,s,c=this.eras();for(t=t.toUpperCase(),r=0,i=c.length;r<i;++r)if(a=c[r].name.toUpperCase(),o=c[r].abbr.toUpperCase(),s=c[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(o===t)return c[r];break;case"NNNN":if(a===t)return c[r];break;case"NNNNN":if(s===t)return c[r]}else if([a,o,s].indexOf(t)>=0)return c[r]},ji.erasConvertYear=function(t,e){var n=t.since<=t.until?1:-1;return void 0===e?me(t.since).year():me(t.since).year()+(e-t.offset)*n},ji.erasAbbrRegex=function(t){return _e(this,"_erasAbbrRegex")||_i.call(this),t?this._erasAbbrRegex:this._erasRegex},ji.erasNameRegex=function(t){return _e(this,"_erasNameRegex")||_i.call(this),t?this._erasNameRegex:this._erasRegex},ji.erasNarrowRegex=function(t){return _e(this,"_erasNarrowRegex")||_i.call(this),t?this._erasNarrowRegex:this._erasRegex},ji.months=function(t,e){return t?ve(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Pn).test(e)?"format":"standalone"][t.month()]:ve(this._months)?this._months:this._months.standalone},ji.monthsShort=function(t,e){return t?ve(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Pn.test(e)?"format":"standalone"][t.month()]:ve(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},ji.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return Un.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Se([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},ji.monthsRegex=function(t){return this._monthsParseExact?(_e(this,"_monthsRegex")||qn.call(this),t?this._monthsStrictRegex:this._monthsRegex):(_e(this,"_monthsRegex")||(this._monthsRegex=zn),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},ji.monthsShortRegex=function(t){return this._monthsParseExact?(_e(this,"_monthsRegex")||qn.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(_e(this,"_monthsShortRegex")||(this._monthsShortRegex=Yn),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},ji.week=function(t){return Kn(t,this._week.dow,this._week.doy).week},ji.firstDayOfYear=function(){return this._week.doy},ji.firstDayOfWeek=function(){return this._week.dow},ji.weekdays=function(t,e){var n=ve(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?tr(n,this._week.dow):t?n[t.day()]:n},ji.weekdaysMin=function(t){return!0===t?tr(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},ji.weekdaysShort=function(t){return!0===t?tr(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},ji.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return sr.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Se([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},ji.weekdaysRegex=function(t){return this._weekdaysParseExact?(_e(this,"_weekdaysRegex")||cr.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(_e(this,"_weekdaysRegex")||(this._weekdaysRegex=ir),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},ji.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(_e(this,"_weekdaysRegex")||cr.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(_e(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ar),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},ji.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(_e(this,"_weekdaysRegex")||cr.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(_e(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=or),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},ji.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},ji.meridiem=function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},_r("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===sn(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),me.lang=Ie("moment.lang is deprecated. Use moment.locale instead.",_r),me.langData=Ie("moment.langData is deprecated. Use moment.localeData instead.",xr);var Ri=Math.abs;function Ii(t,e,n,r){var i=ni(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function Fi(t){return t<0?Math.floor(t):Math.ceil(t)}function Pi(t){return 4800*t/146097}function Yi(t){return 146097*t/4800}function zi(t){return function(){return this.as(t)}}var Ui=zi("ms"),$i=zi("s"),Wi=zi("m"),qi=zi("h"),Hi=zi("d"),Vi=zi("w"),Gi=zi("M"),Xi=zi("Q"),Zi=zi("y");function Qi(t){return function(){return this.isValid()?this._data[t]:NaN}}var Ki=Qi("milliseconds"),Ji=Qi("seconds"),ta=Qi("minutes"),ea=Qi("hours"),na=Qi("days"),ra=Qi("months"),ia=Qi("years");var aa=Math.round,oa={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function sa(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}var ca=Math.abs;function la(t){return(t>0)-(t<0)||+t}function ua(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,r,i,a,o,s,c=ca(this._milliseconds)/1e3,l=ca(this._days),u=ca(this._months),h=this.asSeconds();return h?(t=on(c/60),e=on(t/60),c%=60,t%=60,n=on(u/12),u%=12,r=c?c.toFixed(3).replace(/\.?0+$/,""):"",i=h<0?"-":"",a=la(this._months)!==la(h)?"-":"",o=la(this._days)!==la(h)?"-":"",s=la(this._milliseconds)!==la(h)?"-":"",i+"P"+(n?a+n+"Y":"")+(u?a+u+"M":"")+(l?o+l+"D":"")+(e||t||c?"T":"")+(e?s+e+"H":"")+(t?s+t+"M":"")+(c?s+r+"S":"")):"P0D"}var ha=qr.prototype;ha.isValid=function(){return this._isValid},ha.abs=function(){var t=this._data;return this._milliseconds=Ri(this._milliseconds),this._days=Ri(this._days),this._months=Ri(this._months),t.milliseconds=Ri(t.milliseconds),t.seconds=Ri(t.seconds),t.minutes=Ri(t.minutes),t.hours=Ri(t.hours),t.months=Ri(t.months),t.years=Ri(t.years),this},ha.add=function(t,e){return Ii(this,t,e,1)},ha.subtract=function(t,e){return Ii(this,t,e,-1)},ha.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=tn(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+Pi(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Yi(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},ha.asMilliseconds=Ui,ha.asSeconds=$i,ha.asMinutes=Wi,ha.asHours=qi,ha.asDays=Hi,ha.asWeeks=Vi,ha.asMonths=Gi,ha.asQuarters=Xi,ha.asYears=Zi,ha.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*sn(this._months/12):NaN},ha._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return a>=0&&o>=0&&s>=0||a<=0&&o<=0&&s<=0||(a+=864e5*Fi(Yi(s)+o),o=0,s=0),c.milliseconds=a%1e3,t=on(a/1e3),c.seconds=t%60,e=on(t/60),c.minutes=e%60,n=on(e/60),c.hours=n%24,o+=on(n/24),s+=i=on(Pi(o)),o-=Fi(Yi(i)),r=on(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},ha.clone=function(){return ni(this)},ha.get=function(t){return t=tn(t),this.isValid()?this[t+"s"]():NaN},ha.milliseconds=Ki,ha.seconds=Ji,ha.minutes=ta,ha.hours=ea,ha.days=na,ha.weeks=function(){return on(this.days()/7)},ha.months=ra,ha.years=ia,ha.humanize=function(t,e){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,a=oa;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(i=t),"object"==typeof e&&(a=Object.assign({},oa,e),null!=e.s&&null==e.ss&&(a.ss=e.s-1)),r=function(t,e,n,r){var i=ni(t).abs(),a=aa(i.as("s")),o=aa(i.as("m")),s=aa(i.as("h")),c=aa(i.as("d")),l=aa(i.as("M")),u=aa(i.as("w")),h=aa(i.as("y")),d=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||o<=1&&["m"]||o<n.m&&["mm",o]||s<=1&&["h"]||s<n.h&&["hh",s]||c<=1&&["d"]||c<n.d&&["dd",c];return null!=n.w&&(d=d||u<=1&&["w"]||u<n.w&&["ww",u]),(d=d||l<=1&&["M"]||l<n.M&&["MM",l]||h<=1&&["y"]||["yy",h])[2]=e,d[3]=+t>0,d[4]=r,sa.apply(null,d)}(this,!i,a,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},ha.toISOString=ua,ha.toString=ua,ha.toJSON=ua,ha.locale=fi,ha.localeData=gi,ha.toIsoString=Ie("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ua),ha.lang=pi,Xe("X",0,0,"unix"),Xe("x",0,0,"valueOf"),On("x",Cn),On("X",/[+-]?\d+(\.\d{1,3})?/),jn("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t))})),jn("x",(function(t,e,n){n._d=new Date(sn(t))})),
//! moment.js
me.version="2.29.1",ge=Yr,me.fn=Mi,me.min=function(){var t=[].slice.call(arguments,0);return $r("isBefore",t)},me.max=function(){var t=[].slice.call(arguments,0);return $r("isAfter",t)},me.now=function(){return Date.now?Date.now():+new Date},me.utc=Se,me.unix=function(t){return Yr(1e3*t)},me.months=function(t,e){return Bi(t,e,"months")},me.isDate=Ce,me.locale=_r,me.invalid=Me,me.duration=ni,me.isMoment=Le,me.weekdays=function(t,e,n){return Li(t,e,n,"weekdays")},me.parseZone=function(){return Yr.apply(null,arguments).parseZone()},me.localeData=xr,me.isDuration=Hr,me.monthsShort=function(t,e){return Bi(t,e,"monthsShort")},me.weekdaysMin=function(t,e,n){return Li(t,e,n,"weekdaysMin")},me.defineLocale=wr,me.updateLocale=function(t,e){if(null!=e){var n,r,i=pr;null!=gr[t]&&null!=gr[t].parentLocale?gr[t].set(Ue(gr[t]._config,e)):(null!=(r=br(t))&&(i=r._config),e=Ue(i,e),null==r&&(e.abbr=t),(n=new $e(e)).parentLocale=gr[t],gr[t]=n),_r(t)}else null!=gr[t]&&(null!=gr[t].parentLocale?(gr[t]=gr[t].parentLocale,t===_r()&&_r(t)):null!=gr[t]&&delete gr[t]);return gr[t]},me.locales=function(){return Fe(gr)},me.weekdaysShort=function(t,e,n){return Li(t,e,n,"weekdaysShort")},me.normalizeUnits=tn,me.relativeTimeRounding=function(t){return void 0===t?aa:"function"==typeof t&&(aa=t,!0)},me.relativeTimeThreshold=function(t,e){return void 0!==oa[t]&&(void 0===e?oa[t]:(oa[t]=e,"s"===t&&(oa.ss=e-1),!0))},me.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},me.prototype=Mi,me.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var da="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function fa(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach((function(n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})})),e}var pa={exports:{}},ga=/^(%20|\s)*(javascript|data)/im,ya=/[^\x20-\x7E]/gim,ma=/^([^:]+):/gm,va=[".","/"];var ba={sanitizeUrl:function(t){if(!t)return"about:blank";var e,n,r=t.replace(ya,"").trim();return function(t){return va.indexOf(t[0])>-1}(r)?r:(n=r.match(ma))?(e=n[0],ga.test(e)?"about:blank":r):"about:blank"}};function _a(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function wa(t){var e;return 1===t.length&&(e=t,t=function(t,n){return _a(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}var xa=wa(_a),ka=xa.right,Ca=xa.left;function Ta(t,e){return[t,e]}function Ea(t){return null===t?NaN:+t}function Sa(t,e){var n,r,i=t.length,a=0,o=-1,s=0,c=0;if(null==e)for(;++o<i;)isNaN(n=Ea(t[o]))||(c+=(r=n-s)*(n-(s+=r/++a)));else for(;++o<i;)isNaN(n=Ea(e(t[o],o,t)))||(c+=(r=n-s)*(n-(s+=r/++a)));if(a>1)return c/(a-1)}function Oa(t,e){var n=Sa(t,e);return n?Math.sqrt(n):n}function Aa(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}var Ma=Array.prototype,Da=Ma.slice,ja=Ma.map;function Na(t){return function(){return t}}function Ba(t){return t}function La(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}var Ra=Math.sqrt(50),Ia=Math.sqrt(10),Fa=Math.sqrt(2);function Pa(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=Ya(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a}function Ya(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=Ra?10:a>=Ia?5:a>=Fa?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Ra?10:a>=Ia?5:a>=Fa?2:1)}function za(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Ra?i*=10:a>=Ia?i*=5:a>=Fa&&(i*=2),e<t?-i:i}function Ua(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function $a(t,e,n){if(null==n&&(n=Ea),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}}function Wa(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r}function qa(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n}function Ha(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r}function Va(t){if(!(i=t.length))return[];for(var e=-1,n=Ha(t,Ga),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r}function Ga(t){return t.length}var Xa=Array.prototype.slice;function Za(t){return t}function Qa(t){return"translate("+(t+.5)+",0)"}function Ka(t){return"translate(0,"+(t+.5)+")"}function Ja(t){return function(e){return+t(e)}}function to(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function eo(){return!this.__axis}function no(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",u=1===t||3===t?Qa:Ka;function h(h){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,f=null==i?e.tickFormat?e.tickFormat.apply(e,n):Za:i,p=Math.max(a,0)+s,g=e.range(),y=+g[0]+.5,m=+g[g.length-1]+.5,v=(e.bandwidth?to:Ja)(e.copy()),b=h.selection?h.selection():h,_=b.selectAll(".domain").data([null]),w=b.selectAll(".tick").data(d,e).order(),x=w.exit(),k=w.enter().append("g").attr("class","tick"),C=w.select("line"),T=w.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(k),C=C.merge(k.append("line").attr("stroke","currentColor").attr(l+"2",c*a)),T=T.merge(k.append("text").attr("fill","currentColor").attr(l,c*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==b&&(_=_.transition(h),w=w.transition(h),C=C.transition(h),T=T.transition(h),x=x.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=v(t))?u(t):this.getAttribute("transform")})),k.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return u(e&&isFinite(e=e(t))?e:v(t))}))),x.remove(),_.attr("d",4===t||2==t?o?"M"+c*o+","+y+"H0.5V"+m+"H"+c*o:"M0.5,"+y+"V"+m:o?"M"+y+","+c*o+"V0.5H"+m+"V"+c*o:"M"+y+",0.5H"+m),w.attr("opacity",1).attr("transform",(function(t){return u(v(t))})),C.attr(l+"2",c*a),T.attr(l,c*p).text(f),b.filter(eo).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=v}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Xa.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Xa.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Xa.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}var ro={value:function(){}};function io(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ao(r)}function ao(t){this._=t}function oo(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function so(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function co(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=ro,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ao.prototype=io.prototype={constructor:ao,on:function(t,e){var n,r=this._,i=oo(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=co(r[n],t.name,e);else if(null==e)for(n in r)r[n]=co(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=so(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ao(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var lo="http://www.w3.org/1999/xhtml",uo={svg:"http://www.w3.org/2000/svg",xhtml:lo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ho(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),uo.hasOwnProperty(e)?{space:uo[e],local:t}:t}function fo(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===lo&&e.documentElement.namespaceURI===lo?e.createElement(t):e.createElementNS(n,t)}}function po(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function go(t){var e=ho(t);return(e.local?po:fo)(e)}function yo(){}function mo(t){return null==t?yo:function(){return this.querySelector(t)}}function vo(){return[]}function bo(t){return null==t?vo:function(){return this.querySelectorAll(t)}}function _o(t){return function(){return this.matches(t)}}function wo(t){return new Array(t.length)}function xo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}xo.prototype={constructor:xo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ko(t,e,n,r,i,a){for(var o,s=0,c=e.length,l=a.length;s<l;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new xo(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function Co(t,e,n,r,i,a,o){var s,c,l,u={},h=e.length,d=a.length,f=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(f[s]=l="$"+o.call(c,c.__data__,s,e),l in u?i[s]=c:u[l]=c);for(s=0;s<d;++s)(c=u[l="$"+o.call(t,a[s],s,a)])?(r[s]=c,c.__data__=a[s],u[l]=null):n[s]=new xo(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&u[f[s]]===c&&(i[s]=c)}function To(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Eo(t){return function(){this.removeAttribute(t)}}function So(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Oo(t,e){return function(){this.setAttribute(t,e)}}function Ao(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Mo(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Do(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function jo(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function No(t){return function(){this.style.removeProperty(t)}}function Bo(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Lo(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ro(t,e){return t.style.getPropertyValue(e)||jo(t).getComputedStyle(t,null).getPropertyValue(e)}function Io(t){return function(){delete this[t]}}function Fo(t,e){return function(){this[t]=e}}function Po(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Yo(t){return t.trim().split(/^|\s+/)}function zo(t){return t.classList||new Uo(t)}function Uo(t){this._node=t,this._names=Yo(t.getAttribute("class")||"")}function $o(t,e){for(var n=zo(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Wo(t,e){for(var n=zo(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function qo(t){return function(){$o(this,t)}}function Ho(t){return function(){Wo(this,t)}}function Vo(t,e){return function(){(e.apply(this,arguments)?$o:Wo)(this,t)}}function Go(){this.textContent=""}function Xo(t){return function(){this.textContent=t}}function Zo(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Qo(){this.innerHTML=""}function Ko(t){return function(){this.innerHTML=t}}function Jo(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ts(){this.nextSibling&&this.parentNode.appendChild(this)}function es(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ns(){return null}function rs(){var t=this.parentNode;t&&t.removeChild(this)}function is(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function as(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Uo.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var os={},ss=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(os={mouseenter:"mouseover",mouseleave:"mouseout"}));function cs(t,e,n){return t=ls(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function ls(t,e,n){return function(r){var i=ss;ss=r;try{t.call(this,this.__data__,e,n)}finally{ss=i}}}function us(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function hs(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function ds(t,e,n){var r=os.hasOwnProperty(t.type)?cs:ls;return function(i,a,o){var s,c=this.__on,l=r(e,a,o);if(c)for(var u=0,h=c.length;u<h;++u)if((s=c[u]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=l,s.capture=n),void(s.value=e);this.addEventListener(t.type,l,n),s={type:t.type,name:t.name,value:e,listener:l,capture:n},c?c.push(s):this.__on=[s]}}function fs(t,e,n,r){var i=ss;t.sourceEvent=ss,ss=t;try{return e.apply(n,r)}finally{ss=i}}function ps(t,e,n){var r=jo(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function gs(t,e){return function(){return ps(this,t,e)}}function ys(t,e){return function(){return ps(this,t,e.apply(this,arguments))}}var ms=[null];function vs(t,e){this._groups=t,this._parents=e}function bs(){return new vs([[document.documentElement]],ms)}function _s(t){return"string"==typeof t?new vs([[document.querySelector(t)]],[document.documentElement]):new vs([[t]],ms)}vs.prototype=bs.prototype={constructor:vs,select:function(t){"function"!=typeof t&&(t=mo(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,l=r[i]=new Array(c),u=0;u<c;++u)(a=s[u])&&(o=t.call(a,a.__data__,u,s))&&("__data__"in a&&(o.__data__=a.__data__),l[u]=o);return new vs(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=bo(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,l=0;l<c;++l)(o=s[l])&&(r.push(t.call(o,o.__data__,l,s)),i.push(o));return new vs(r,i)},filter:function(t){"function"!=typeof t&&(t=_o(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&c.push(a);return new vs(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),u=-1,this.each((function(t){p[++u]=t})),p;var n,r=e?Co:ko,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,s=new Array(o),c=new Array(o),l=new Array(o),u=0;u<o;++u){var h=i[u],d=a[u],f=d.length,p=t.call(h,h&&h.__data__,u,i),g=p.length,y=c[u]=new Array(g),m=s[u]=new Array(g);r(h,d,y,m,l[u]=new Array(f),p,e);for(var v,b,_=0,w=0;_<g;++_)if(v=y[_]){for(_>=w&&(w=_+1);!(b=m[w])&&++w<g;);v._next=b||null}}return(s=new vs(s,i))._enter=c,s._exit=l,s},enter:function(){return new vs(this._enter||this._groups.map(wo),this._parents)},exit:function(){return new vs(this._exit||this._groups.map(wo),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,l=e[s],u=n[s],h=l.length,d=o[s]=new Array(h),f=0;f<h;++f)(c=l[f]||u[f])&&(d[f]=c);for(;s<r;++s)o[s]=e[s];return new vs(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=To);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,l=i[a]=new Array(c),u=0;u<c;++u)(o=s[u])&&(l[u]=o);l.sort(e)}return new vs(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=ho(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?So:Eo:"function"==typeof e?n.local?Do:Mo:n.local?Ao:Oo)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?No:"function"==typeof e?Lo:Bo)(t,e,null==n?"":n)):Ro(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Io:"function"==typeof e?Po:Fo)(t,e)):this.node()[t]},classed:function(t,e){var n=Yo(t+"");if(arguments.length<2){for(var r=zo(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Vo:e?qo:Ho)(n,e))},text:function(t){return arguments.length?this.each(null==t?Go:("function"==typeof t?Zo:Xo)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Qo:("function"==typeof t?Jo:Ko)(t)):this.node().innerHTML},raise:function(){return this.each(ts)},lower:function(){return this.each(es)},append:function(t){var e="function"==typeof t?t:go(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:go(t),r=null==e?ns:"function"==typeof e?e:mo(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(rs)},clone:function(t){return this.select(t?as:is)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=us(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?ds:hs,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,l=0,u=s.length;l<u;++l)for(r=0,c=s[l];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?ys:gs)(t,e))}};var ws=0;function xs(){return new ks}function ks(){this._="@"+(++ws).toString(36)}function Cs(){for(var t,e=ss;t=e.sourceEvent;)e=t;return e}function Ts(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function Es(t){var e=Cs();return e.changedTouches&&(e=e.changedTouches[0]),Ts(t,e)}function Ss(t,e,n){arguments.length<3&&(n=e,e=Cs().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return Ts(t,r);return null}function Os(){ss.stopImmediatePropagation()}function As(){ss.preventDefault(),ss.stopImmediatePropagation()}function Ms(t){var e=t.document.documentElement,n=_s(t).on("dragstart.drag",As,!0);"onselectstart"in e?n.on("selectstart.drag",As,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ds(t,e){var n=t.document.documentElement,r=_s(t).on("dragstart.drag",null);e&&(r.on("click.drag",As,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function js(t){return function(){return t}}function Ns(t,e,n,r,i,a,o,s,c,l){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=s,this.dy=c,this._=l}function Bs(){return!ss.ctrlKey&&!ss.button}function Ls(){return this.parentNode}function Rs(t){return null==t?{x:ss.x,y:ss.y}:t}function Is(){return navigator.maxTouchPoints||"ontouchstart"in this}function Fs(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ps(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ys(){}ks.prototype=xs.prototype={constructor:ks,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}},Ns.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var zs=1/.7,Us="\\s*([+-]?\\d+)\\s*",$s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ws="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qs=/^#([0-9a-f]{3,8})$/,Hs=new RegExp("^rgb\\("+[Us,Us,Us]+"\\)$"),Vs=new RegExp("^rgb\\("+[Ws,Ws,Ws]+"\\)$"),Gs=new RegExp("^rgba\\("+[Us,Us,Us,$s]+"\\)$"),Xs=new RegExp("^rgba\\("+[Ws,Ws,Ws,$s]+"\\)$"),Zs=new RegExp("^hsl\\("+[$s,Ws,Ws]+"\\)$"),Qs=new RegExp("^hsla\\("+[$s,Ws,Ws,$s]+"\\)$"),Ks={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Js(){return this.rgb().formatHex()}function tc(){return this.rgb().formatRgb()}function ec(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=qs.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?nc(e):3===n?new oc(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?rc(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?rc(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Hs.exec(t))?new oc(e[1],e[2],e[3],1):(e=Vs.exec(t))?new oc(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Gs.exec(t))?rc(e[1],e[2],e[3],e[4]):(e=Xs.exec(t))?rc(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Zs.exec(t))?uc(e[1],e[2]/100,e[3]/100,1):(e=Qs.exec(t))?uc(e[1],e[2]/100,e[3]/100,e[4]):Ks.hasOwnProperty(t)?nc(Ks[t]):"transparent"===t?new oc(NaN,NaN,NaN,0):null}function nc(t){return new oc(t>>16&255,t>>8&255,255&t,1)}function rc(t,e,n,r){return r<=0&&(t=e=n=NaN),new oc(t,e,n,r)}function ic(t){return t instanceof Ys||(t=ec(t)),t?new oc((t=t.rgb()).r,t.g,t.b,t.opacity):new oc}function ac(t,e,n,r){return 1===arguments.length?ic(t):new oc(t,e,n,null==r?1:r)}function oc(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function sc(){return"#"+lc(this.r)+lc(this.g)+lc(this.b)}function cc(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function lc(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function uc(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new fc(t,e,n,r)}function hc(t){if(t instanceof fc)return new fc(t.h,t.s,t.l,t.opacity);if(t instanceof Ys||(t=ec(t)),!t)return new fc;if(t instanceof fc)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new fc(o,s,c,t.opacity)}function dc(t,e,n,r){return 1===arguments.length?hc(t):new fc(t,e,n,null==r?1:r)}function fc(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function pc(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Fs(Ys,ec,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Js,formatHex:Js,formatHsl:function(){return hc(this).formatHsl()},formatRgb:tc,toString:tc}),Fs(oc,ac,Ps(Ys,{brighter:function(t){return t=null==t?zs:Math.pow(zs,t),new oc(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new oc(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:sc,formatHex:sc,formatRgb:cc,toString:cc})),Fs(fc,dc,Ps(Ys,{brighter:function(t){return t=null==t?zs:Math.pow(zs,t),new fc(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new fc(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new oc(pc(t>=240?t-240:t+120,i,r),pc(t,i,r),pc(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var gc=Math.PI/180,yc=180/Math.PI,mc=4/29,vc=6/29,bc=3*vc*vc;function _c(t){if(t instanceof xc)return new xc(t.l,t.a,t.b,t.opacity);if(t instanceof Ac)return Mc(t);t instanceof oc||(t=ic(t));var e,n,r=Ec(t.r),i=Ec(t.g),a=Ec(t.b),o=kc((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=kc((.4360747*r+.3850649*i+.1430804*a)/.96422),n=kc((.0139322*r+.0971045*i+.7141733*a)/.82521)),new xc(116*o-16,500*(e-o),200*(o-n),t.opacity)}function wc(t,e,n,r){return 1===arguments.length?_c(t):new xc(t,e,n,null==r?1:r)}function xc(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function kc(t){return t>.008856451679035631?Math.pow(t,1/3):t/bc+mc}function Cc(t){return t>vc?t*t*t:bc*(t-mc)}function Tc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ec(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Sc(t){if(t instanceof Ac)return new Ac(t.h,t.c,t.l,t.opacity);if(t instanceof xc||(t=_c(t)),0===t.a&&0===t.b)return new Ac(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*yc;return new Ac(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Oc(t,e,n,r){return 1===arguments.length?Sc(t):new Ac(t,e,n,null==r?1:r)}function Ac(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Mc(t){if(isNaN(t.h))return new xc(t.l,0,0,t.opacity);var e=t.h*gc;return new xc(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Fs(xc,wc,Ps(Ys,{brighter:function(t){return new xc(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new xc(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new oc(Tc(3.1338561*(e=.96422*Cc(e))-1.6168667*(t=1*Cc(t))-.4906146*(n=.82521*Cc(n))),Tc(-.9787684*e+1.9161415*t+.033454*n),Tc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Fs(Ac,Oc,Ps(Ys,{brighter:function(t){return new Ac(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Ac(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Mc(this).rgb()}}));var Dc=-.14861,jc=1.78277,Nc=-.29227,Bc=-.90649,Lc=1.97294,Rc=Lc*Bc,Ic=Lc*jc,Fc=jc*Nc-Bc*Dc;function Pc(t){if(t instanceof zc)return new zc(t.h,t.s,t.l,t.opacity);t instanceof oc||(t=ic(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Fc*r+Rc*e-Ic*n)/(Fc+Rc-Ic),a=r-i,o=(Lc*(n-i)-Nc*a)/Bc,s=Math.sqrt(o*o+a*a)/(Lc*i*(1-i)),c=s?Math.atan2(o,a)*yc-120:NaN;return new zc(c<0?c+360:c,s,i,t.opacity)}function Yc(t,e,n,r){return 1===arguments.length?Pc(t):new zc(t,e,n,null==r?1:r)}function zc(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Uc(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function $c(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return Uc((n-r/e)*e,o,i,a,s)}}function Wc(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return Uc((n-r/e)*e,i,a,o,s)}}function qc(t){return function(){return t}}function Hc(t,e){return function(n){return t+n*e}}function Vc(t,e){var n=e-t;return n?Hc(t,n>180||n<-180?n-360*Math.round(n/360):n):qc(isNaN(t)?e:t)}function Gc(t){return 1==(t=+t)?Xc:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):qc(isNaN(e)?n:e)}}function Xc(t,e){var n=e-t;return n?Hc(t,n):qc(isNaN(t)?e:t)}Fs(zc,Yc,Ps(Ys,{brighter:function(t){return t=null==t?zs:Math.pow(zs,t),new zc(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new zc(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*gc,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new oc(255*(e+n*(Dc*r+jc*i)),255*(e+n*(Nc*r+Bc*i)),255*(e+n*(Lc*r)),this.opacity)}}));var Zc=function t(e){var n=Gc(e);function r(t,e){var r=n((t=ac(t)).r,(e=ac(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Xc(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Qc(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=ac(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}var Kc=Qc($c),Jc=Qc(Wc);function tl(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function el(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function nl(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=ll(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function rl(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function il(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function al(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=ll(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var ol=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sl=new RegExp(ol.source,"g");function cl(t,e){var n,r,i,a=ol.lastIndex=sl.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=ol.exec(t))&&(r=sl.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:il(n,r)})),a=sl.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function ll(t,e){var n,r=typeof e;return null==e||"boolean"===r?qc(e):("number"===r?il:"string"===r?(n=ec(e))?(e=n,Zc):cl:e instanceof ec?Zc:e instanceof Date?rl:el(e)?tl:Array.isArray(e)?nl:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?al:il)(t,e)}function ul(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var hl,dl,fl,pl,gl=180/Math.PI,yl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ml(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*gl,skewX:Math.atan(c)*gl,scaleX:o,scaleY:s}}function vl(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:il(t,i)},{i:c-2,x:il(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:il(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:il(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:il(t,n)},{i:s-2,x:il(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var bl=vl((function(t){return"none"===t?yl:(hl||(hl=document.createElement("DIV"),dl=document.documentElement,fl=document.defaultView),hl.style.transform=t,t=fl.getComputedStyle(dl.appendChild(hl),null).getPropertyValue("transform"),dl.removeChild(hl),ml(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),_l=vl((function(t){return null==t?yl:(pl||(pl=document.createElementNS("http://www.w3.org/2000/svg","g")),pl.setAttribute("transform",t),(t=pl.transform.baseVal.consolidate())?ml((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):yl)}),", ",")",")"),wl=Math.SQRT2;function xl(t){return((t=Math.exp(t))+1/t)/2}function kl(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],c=e[1],l=e[2],u=s-i,h=c-a,d=u*u+h*h;if(d<1e-12)r=Math.log(l/o)/wl,n=function(t){return[i+t*u,a+t*h,o*Math.exp(wl*t*r)]};else{var f=Math.sqrt(d),p=(l*l-o*o+4*d)/(2*o*2*f),g=(l*l-o*o-4*d)/(2*l*2*f),y=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(g*g+1)-g);r=(m-y)/wl,n=function(t){var e,n=t*r,s=xl(y),c=o/(2*f)*(s*(e=wl*n+y,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+c*u,a+c*h,o*s/xl(wl*n+y)]}}return n.duration=1e3*r,n}function Cl(t){return function(e,n){var r=t((e=dc(e)).h,(n=dc(n)).h),i=Xc(e.s,n.s),a=Xc(e.l,n.l),o=Xc(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var Tl=Cl(Vc),El=Cl(Xc);function Sl(t){return function(e,n){var r=t((e=Oc(e)).h,(n=Oc(n)).h),i=Xc(e.c,n.c),a=Xc(e.l,n.l),o=Xc(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var Ol=Sl(Vc),Al=Sl(Xc);function Ml(t){return function e(n){function r(e,r){var i=t((e=Yc(e)).h,(r=Yc(r)).h),a=Xc(e.s,r.s),o=Xc(e.l,r.l),s=Xc(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}var Dl=Ml(Vc),jl=Ml(Xc);var Nl,Bl,Ll=0,Rl=0,Il=0,Fl=0,Pl=0,Yl=0,zl="object"==typeof performance&&performance.now?performance:Date,Ul="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function $l(){return Pl||(Ul(Wl),Pl=zl.now()+Yl)}function Wl(){Pl=0}function ql(){this._call=this._time=this._next=null}function Hl(t,e,n){var r=new ql;return r.restart(t,e,n),r}function Vl(){$l(),++Ll;for(var t,e=Nl;e;)(t=Pl-e._time)>=0&&e._call.call(null,t),e=e._next;--Ll}function Gl(){Pl=(Fl=zl.now())+Yl,Ll=Rl=0;try{Vl()}finally{Ll=0,function(){var t,e,n=Nl,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Nl=e);Bl=t,Zl(r)}(),Pl=0}}function Xl(){var t=zl.now(),e=t-Fl;e>1e3&&(Yl-=e,Fl=t)}function Zl(t){Ll||(Rl&&(Rl=clearTimeout(Rl)),t-Pl>24?(t<1/0&&(Rl=setTimeout(Gl,t-zl.now()-Yl)),Il&&(Il=clearInterval(Il))):(Il||(Fl=zl.now(),Il=setInterval(Xl,1e3)),Ll=1,Ul(Gl)))}function Ql(t,e,n){var r=new ql;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}ql.prototype=Hl.prototype={constructor:ql,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?$l():+n)+(null==e?0:+e),this._next||Bl===this||(Bl?Bl._next=this:Nl=this,Bl=this),this._call=t,this._time=n,Zl()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zl())}};var Kl=io("start","end","cancel","interrupt"),Jl=[];function tu(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(a){var l,u,h,d;if(1!==n.state)return c();for(l in i)if((d=i[l]).name===n.name){if(3===d.state)return Ql(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[l]):+l<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[l])}if(Ql((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),l=0,u=-1;l<h;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+1}}function s(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Hl(a,0,n.time)}(t,n,{name:e,index:r,group:i,on:Kl,tween:Jl,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function eu(t,e){var n=ru(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function nu(t,e){var n=ru(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ru(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function iu(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}function au(t,e){var n,r;return function(){var i=nu(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function ou(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=nu(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===e){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function su(t,e,n){var r=t._id;return t.each((function(){var t=nu(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ru(t,r).value[e]}}function cu(t,e){var n;return("number"==typeof e?il:e instanceof ec?Zc:(n=ec(e))?(e=n,Zc):cl)(t,e)}function lu(t){return function(){this.removeAttribute(t)}}function uu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hu(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function du(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function fu(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function pu(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function gu(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function yu(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function mu(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&yu(t,i)),n}return i._value=e,i}function vu(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&gu(t,i)),n}return i._value=e,i}function bu(t,e){return function(){eu(this,t).delay=+e.apply(this,arguments)}}function _u(t,e){return e=+e,function(){eu(this,t).delay=e}}function wu(t,e){return function(){nu(this,t).duration=+e.apply(this,arguments)}}function xu(t,e){return e=+e,function(){nu(this,t).duration=e}}function ku(t,e){if("function"!=typeof e)throw new Error;return function(){nu(this,t).ease=e}}function Cu(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?eu:nu;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Tu=bs.prototype.constructor;function Eu(t){return function(){this.style.removeProperty(t)}}function Su(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Ou(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Su(t,a,n)),r}return a._value=e,a}function Au(t){return function(e){this.textContent=t.call(this,e)}}function Mu(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Au(r)),e}return r._value=t,r}var Du=0;function ju(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Nu(t){return bs().transition(t)}function Bu(){return++Du}var Lu=bs.prototype;function Ru(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function Iu(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}ju.prototype=Nu.prototype={constructor:ju,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=mo(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,l=r[o],u=l.length,h=a[o]=new Array(u),d=0;d<u;++d)(s=l[d])&&(c=t.call(s,s.__data__,d,l))&&("__data__"in s&&(c.__data__=s.__data__),h[d]=c,tu(h[d],e,n,d,h,ru(s,n)));return new ju(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=bo(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,l=r[s],u=l.length,h=0;h<u;++h)if(c=l[h]){for(var d,f=t.call(c,c.__data__,h,l),p=ru(c,n),g=0,y=f.length;g<y;++g)(d=f[g])&&tu(d,e,n,g,f,p);a.push(f),o.push(c)}return new ju(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=_o(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&c.push(a);return new ju(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,l=e[s],u=n[s],h=l.length,d=o[s]=new Array(h),f=0;f<h;++f)(c=l[f]||u[f])&&(d[f]=c);for(;s<r;++s)o[s]=e[s];return new ju(o,this._parents,this._name,this._id)},selection:function(){return new Tu(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Bu(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,l=0;l<c;++l)if(o=s[l]){var u=ru(o,e);tu(o,t,n,l,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ju(r,this._parents,t,n)},call:Lu.call,nodes:Lu.nodes,node:Lu.node,size:Lu.size,empty:Lu.empty,each:Lu.each,on:function(t,e){var n=this._id;return arguments.length<2?ru(this.node(),n).on.on(t):this.each(Cu(n,t,e))},attr:function(t,e){var n=ho(t),r="transform"===n?_l:cu;return this.attrTween(t,"function"==typeof e?(n.local?pu:fu)(n,r,su(this,"attr."+t,e)):null==e?(n.local?uu:lu)(n):(n.local?du:hu)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=ho(t);return this.tween(n,(r.local?mu:vu)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?bl:cu;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Ro(this,t),o=(this.style.removeProperty(t),Ro(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Eu(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Ro(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=Ro(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,su(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=nu(this,t),l=c.on,u=null==c.value[o]?a||(a=Eu(e)):void 0;l===n&&i===u||(r=(n=l).copy()).on(s,i=u),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Ro(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Ou(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(su(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Mu(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=ru(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?au:ou)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?bu:_u)(e,t)):ru(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?wu:xu)(e,t)):ru(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(ku(e,t)):ru(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=nu(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e}))}))}};var Fu=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),Pu=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Yu=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),zu=Math.PI,Uu=zu/2;function $u(t){return(1-Math.cos(zu*t))/2}function Wu(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function qu(t){return((t*=2)<=1?Wu(1-t):2-Wu(t-1))/2}function Hu(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Vu=4/11,Gu=7.5625;function Xu(t){return(t=+t)<Vu?Gu*t*t:t<.7272727272727273?Gu*(t-=.5454545454545454)*t+.75:t<.9090909090909091?Gu*(t-=.8181818181818182)*t+.9375:Gu*(t-=.9545454545454546)*t+.984375}var Zu=function t(e){function n(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(1.70158),Qu=function t(e){function n(t){return--t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(1.70158),Ku=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Ju=2*Math.PI,th=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ju);function i(t){return e*Wu(- --t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Ju)},i.period=function(n){return t(e,n)},i}(1,.3),eh=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ju);function i(t){return 1-e*Wu(t=+t)*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Ju)},i.period=function(n){return t(e,n)},i}(1,.3),nh=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ju);function i(t){return((t=2*t-1)<0?e*Wu(-t)*Math.sin((r-t)/n):2-e*Wu(t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Ju)},i.period=function(n){return t(e,n)},i}(1,.3),rh={time:null,delay:0,duration:250,ease:Iu};function ih(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return rh.time=$l(),rh;return n}bs.prototype.interrupt=function(t){return this.each((function(){iu(this,t)}))},bs.prototype.transition=function(t){var e,n;t instanceof ju?(e=t._id,t=t._name):(e=Bu(),(n=rh).time=$l(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,l=0;l<c;++l)(o=s[l])&&tu(o,t,e,l,s,n||ih(o,e));return new ju(r,this._parents,t,e)};var ah=[null];function oh(t){return function(){return t}}function sh(t,e,n){this.target=t,this.type=e,this.selection=n}function ch(){ss.stopImmediatePropagation()}function lh(){ss.preventDefault(),ss.stopImmediatePropagation()}var uh={name:"drag"},hh={name:"space"},dh={name:"handle"},fh={name:"center"};function ph(t){return[+t[0],+t[1]]}function gh(t){return[ph(t[0]),ph(t[1])]}function yh(t){return function(e){return Ss(e,ss.touches,t)}}var mh={name:"x",handles:["w","e"].map(Th),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},vh={name:"y",handles:["n","s"].map(Th),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},bh={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Th),input:function(t){return null==t?null:gh(t)},output:function(t){return t}},_h={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},wh={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},xh={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},kh={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Ch={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Th(t){return{type:t}}function Eh(){return!ss.ctrlKey&&!ss.button}function Sh(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Oh(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ah(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Mh(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Dh(t){var e,n=Sh,r=Eh,i=Oh,a=!0,o=io("start","brush","end"),s=6;function c(e){var n=e.property("__brush",g).selectAll(".overlay").data([Th("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",_h.overlay).merge(n).each((function(){var t=Ah(this).extent;_s(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([Th("selection")]).enter().append("rect").attr("class","selection").attr("cursor",_h.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return _h[t.type]})),e.each(l).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(i).on("touchstart.brush",d).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function l(){var t=_s(this),e=Ah(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function d(){if((!e||ss.touches)&&r.apply(this,arguments)){var n,i,o,s,c,h,d,f,p,g,y,m=this,v=ss.target.__data__.type,b="selection"===(a&&ss.metaKey?v="overlay":v)?uh:a&&ss.altKey?fh:dh,_=t===vh?null:kh[v],w=t===mh?null:Ch[v],x=Ah(m),k=x.extent,C=x.selection,T=k[0][0],E=k[0][1],S=k[1][0],O=k[1][1],A=0,M=0,D=_&&w&&a&&ss.shiftKey,j=ss.touches?yh(ss.changedTouches[0].identifier):Es,N=j(m),B=N,L=u(m,arguments,!0).beforestart();"overlay"===v?(C&&(p=!0),x.selection=C=[[n=t===vh?T:N[0],o=t===mh?E:N[1]],[c=t===vh?S:n,d=t===mh?O:o]]):(n=C[0][0],o=C[0][1],c=C[1][0],d=C[1][1]),i=n,s=o,h=c,f=d;var R=_s(m).attr("pointer-events","none"),I=R.selectAll(".overlay").attr("cursor",_h[v]);if(ss.touches)L.moved=P,L.ended=z;else{var F=_s(ss.view).on("mousemove.brush",P,!0).on("mouseup.brush",z,!0);a&&F.on("keydown.brush",U,!0).on("keyup.brush",$,!0),Ms(ss.view)}ch(),iu(m),l.call(m),L.start()}function P(){var t=j(m);!D||g||y||(Math.abs(t[0]-B[0])>Math.abs(t[1]-B[1])?y=!0:g=!0),B=t,p=!0,lh(),Y()}function Y(){var t;switch(A=B[0]-N[0],M=B[1]-N[1],b){case hh:case uh:_&&(A=Math.max(T-n,Math.min(S-c,A)),i=n+A,h=c+A),w&&(M=Math.max(E-o,Math.min(O-d,M)),s=o+M,f=d+M);break;case dh:_<0?(A=Math.max(T-n,Math.min(S-n,A)),i=n+A,h=c):_>0&&(A=Math.max(T-c,Math.min(S-c,A)),i=n,h=c+A),w<0?(M=Math.max(E-o,Math.min(O-o,M)),s=o+M,f=d):w>0&&(M=Math.max(E-d,Math.min(O-d,M)),s=o,f=d+M);break;case fh:_&&(i=Math.max(T,Math.min(S,n-A*_)),h=Math.max(T,Math.min(S,c+A*_))),w&&(s=Math.max(E,Math.min(O,o-M*w)),f=Math.max(E,Math.min(O,d+M*w)))}h<i&&(_*=-1,t=n,n=c,c=t,t=i,i=h,h=t,v in wh&&I.attr("cursor",_h[v=wh[v]])),f<s&&(w*=-1,t=o,o=d,d=t,t=s,s=f,f=t,v in xh&&I.attr("cursor",_h[v=xh[v]])),x.selection&&(C=x.selection),g&&(i=C[0][0],h=C[1][0]),y&&(s=C[0][1],f=C[1][1]),C[0][0]===i&&C[0][1]===s&&C[1][0]===h&&C[1][1]===f||(x.selection=[[i,s],[h,f]],l.call(m),L.brush())}function z(){if(ch(),ss.touches){if(ss.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Ds(ss.view,p),F.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);R.attr("pointer-events","all"),I.attr("cursor",_h.overlay),x.selection&&(C=x.selection),Mh(C)&&(x.selection=null,l.call(m)),L.end()}function U(){switch(ss.keyCode){case 16:D=_&&w;break;case 18:b===dh&&(_&&(c=h-A*_,n=i+A*_),w&&(d=f-M*w,o=s+M*w),b=fh,Y());break;case 32:b!==dh&&b!==fh||(_<0?c=h-A:_>0&&(n=i-A),w<0?d=f-M:w>0&&(o=s-M),b=hh,I.attr("cursor",_h.selection),Y());break;default:return}lh()}function $(){switch(ss.keyCode){case 16:D&&(g=y=D=!1,Y());break;case 18:b===fh&&(_<0?c=h:_>0&&(n=i),w<0?d=f:w>0&&(o=s),b=dh,Y());break;case 32:b===hh&&(ss.altKey?(_&&(c=h-A*_,n=i+A*_),w&&(d=f-M*w,o=s+M*w),b=fh):(_<0?c=h:_>0&&(n=i),w<0?d=f:w>0&&(o=s),b=dh),I.attr("cursor",_h[v]),Y());break;default:return}lh()}}function f(){u(this,arguments).moved()}function p(){u(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=gh(n.apply(this,arguments)),e.dim=t,e}return c.move=function(e,n){e.selection?e.on("start.brush",(function(){u(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){u(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=u(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=ll(a,o);function c(t){r.selection=1===t&&null===o?null:s(t),l.call(e),i.brush()}return null!==a&&null!==o?c:c(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=u(e,r).beforestart();iu(e),i.selection=null===a?null:a,l.call(e),o.start().brush().end()}))},c.clear=function(t){c.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){fs(new sh(c,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},c.extent=function(t){return arguments.length?(n="function"==typeof t?t:oh(gh(t)),c):n},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:oh(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:oh(!!t),c):i},c.handleSize=function(t){return arguments.length?(s=+t,c):s},c.keyModifiers=function(t){return arguments.length?(a=!!t,c):a},c.on=function(){var t=o.on.apply(o,arguments);return t===o?c:t},c}var jh=Math.cos,Nh=Math.sin,Bh=Math.PI,Lh=Bh/2,Rh=2*Bh,Ih=Math.max;function Fh(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var Ph=Array.prototype.slice;function Yh(t){return function(){return t}}var zh=Math.PI,Uh=2*zh,$h=Uh-1e-6;function Wh(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function qh(){return new Wh}function Hh(t){return t.source}function Vh(t){return t.target}function Gh(t){return t.radius}function Xh(t){return t.startAngle}function Zh(t){return t.endAngle}Wh.prototype=qh.prototype={constructor:Wh,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,l=a-t,u=o-e,h=l*l+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(u*s-c*l)>1e-6&&i){var d=n-a,f=r-o,p=s*s+c*c,g=d*d+f*f,y=Math.sqrt(p),m=Math.sqrt(h),v=i*Math.tan((zh-Math.acos((p+h-g)/(2*y*m)))/2),b=v/m,_=v/y;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*l)+","+(e+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*d>l*f)+","+(this._x1=t+_*s)+","+(this._y1=e+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,l=e+s,u=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+l:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+c+","+l),n&&(h<0&&(h=h%Uh+Uh),h>$h?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=c)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=zh)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function Qh(){}function Kh(t,e){var n=new Qh;if(t instanceof Qh)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}function Jh(){return{}}function td(t,e,n){t[e]=n}function ed(){return Kh()}function nd(t,e,n){t.set(e,n)}function rd(){}Qh.prototype=Kh.prototype={constructor:Qh,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var id=Kh.prototype;function ad(t,e){var n=new rd;if(t instanceof rd)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}rd.prototype=ad.prototype={constructor:rd,has:id.has,add:function(t){return this["$"+(t+="")]=t,this},remove:id.remove,clear:id.clear,values:id.keys,size:id.size,empty:id.empty,each:id.each};var od=Array.prototype.slice;function sd(t,e){return t-e}function cd(t){return function(){return t}}function ld(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=ud(t,e[r]))return n;return 0}function ud(t,e){for(var n=e[0],r=e[1],i=-1,a=0,o=t.length,s=o-1;a<o;s=a++){var c=t[a],l=c[0],u=c[1],h=t[s],d=h[0],f=h[1];if(hd(c,h,e))return 0;u>r!=f>r&&n<(d-l)*(r-u)/(f-u)+l&&(i=-i)}return i}function hd(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}function dd(){}var fd=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function pd(){var t=1,e=1,n=Ua,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(sd);else{var r=Aa(t),i=r[0],o=r[1];e=za(i,o,e),e=La(Math.floor(i/e)*e,Math.floor(o/e)*e,e)}return e.map((function(e){return a(t,e)}))}function a(n,i){var a=[],s=[];return function(n,r,i){var a,s,c,l,u,h,d=new Array,f=new Array;a=s=-1,l=n[0]>=r,fd[l<<1].forEach(p);for(;++a<t-1;)c=l,l=n[a+1]>=r,fd[c|l<<1].forEach(p);fd[l<<0].forEach(p);for(;++s<e-1;){for(a=-1,l=n[s*t+t]>=r,u=n[s*t]>=r,fd[l<<1|u<<2].forEach(p);++a<t-1;)c=l,l=n[s*t+t+a+1]>=r,h=u,u=n[s*t+a+1]>=r,fd[c|l<<1|u<<2|h<<3].forEach(p);fd[l|u<<3].forEach(p)}a=-1,u=n[s*t]>=r,fd[u<<2].forEach(p);for(;++a<t-1;)h=u,u=n[s*t+a+1]>=r,fd[u<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],c=[t[1][0]+a,t[1][1]+s],l=o(r),u=o(c);(e=f[l])?(n=d[u])?(delete f[e.end],delete d[n.start],e===n?(e.ring.push(c),i(e.ring)):d[e.start]=f[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete f[e.end],e.ring.push(c),f[e.end=u]=e):(e=d[u])?(n=f[l])?(delete d[e.start],delete f[n.end],e===n?(e.ring.push(c),i(e.ring)):d[n.start]=f[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[e.start],e.ring.unshift(r),d[e.start=l]=e):d[l]=f[u]={start:l,end:u,ring:[r,c]}}fd[u<<3].forEach(p)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?a.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=a.length;n<r;++n)if(-1!==ld((e=a[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:i,coordinates:a}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach((function(n){var a,o=n[0],s=n[1],c=0|o,l=0|s,u=r[l*t+c];o>0&&o<t&&c===o&&(a=r[l*t+c-1],n[0]=o+(i-a)/(u-a)-.5),s>0&&s<e&&l===s&&(a=r[(l-1)*t+c],n[1]=s+(i-a)/(u-a)-.5)}))}return i.contour=a,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),a=Math.ceil(n[1]);if(!(r>0&&a>0))throw new Error("invalid size");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?cd(od.call(t)):cd(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:dd,i):r===s},i}function gd(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<i;++o)for(var s=0,c=0;s<r+n;++s)s<r&&(c+=t.data[s+o*r]),s>=n&&(s>=a&&(c-=t.data[s-a+o*r]),e.data[s-n+o*r]=c/Math.min(s+1,r-1+a-s,a))}function yd(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<r;++o)for(var s=0,c=0;s<i+n;++s)s<i&&(c+=t.data[o+s*r]),s>=n&&(s>=a&&(c-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=c/Math.min(s+1,i-1+a-s,a))}function md(t){return t[0]}function vd(t){return t[1]}function bd(){return 1}var _d={},wd={};function xd(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function kd(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function Cd(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function Td(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Cd(-e,6):e>9999?"+"+Cd(e,6):Cd(e,4))+"-"+Cd(t.getUTCMonth()+1,2)+"-"+Cd(t.getUTCDate(),2)+(a?"T"+Cd(n,2)+":"+Cd(r,2)+":"+Cd(i,2)+"."+Cd(a,3)+"Z":i?"T"+Cd(n,2)+":"+Cd(r,2)+":"+Cd(i,2)+"Z":r||n?"T"+Cd(n,2)+":"+Cd(r,2)+"Z":"")}function Ed(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,c=a<=0,l=!1;function u(){if(c)return wd;if(l)return l=!1,_d;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?c=!0:10===(r=t.charCodeAt(o++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))l=!0;else if(13===r)l=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=u())!==wd;){for(var h=[];r!==_d&&r!==wd;)h.push(r),r=u();e&&null==(h=e(h,s++))||i.push(h)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?Td(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=xd(t);return function(r,i){return e(n(r),i,t)}}(t,e):xd(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=kd(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=kd(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}var Sd=Ed(","),Od=Sd.parse,Ad=Sd.parseRows,Md=Sd.format,Dd=Sd.formatBody,jd=Sd.formatRows,Nd=Sd.formatRow,Bd=Sd.formatValue,Ld=Ed("\t"),Rd=Ld.parse,Id=Ld.parseRows,Fd=Ld.format,Pd=Ld.formatBody,Yd=Ld.formatRows,zd=Ld.formatRow,Ud=Ld.formatValue;var $d=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Wd(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function qd(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function Hd(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function Vd(t,e){return fetch(t,e).then(Hd)}function Gd(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),Vd(e,n).then((function(e){return t(e,r)}))}}var Xd=Gd(Od),Zd=Gd(Rd);function Qd(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function Kd(t){return function(e,n){return Vd(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}var Jd=Kd("application/xml"),tf=Kd("text/html"),ef=Kd("image/svg+xml");function nf(t){return function(){return t}}function rf(){return 1e-6*(Math.random()-.5)}function af(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,c,l,u,h,d,f=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(!f)return t._root=p,t;for(;f.length;)if((l=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,i=f,!(f=f[h=u<<1|l]))return i[h]=p,t;if(s=+t._x.call(null,f.data),c=+t._y.call(null,f.data),e===s&&n===c)return p.next=f,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(l=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o}while((h=u<<1|l)==(d=(c>=o)<<1|s>=a));return i[d]=f,i[h]=p,t}function of(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function sf(t){return t[0]}function cf(t){return t[1]}function lf(t,e,n){var r=new uf(null==e?sf:e,null==n?cf:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function uf(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function hf(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var df=lf.prototype=uf.prototype;function ff(t){return t.x+t.vx}function pf(t){return t.y+t.vy}function gf(t){return t.index}function yf(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function mf(t){return t.x}function vf(t){return t.y}df.copy=function(){var t,e,n=new uf(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=hf(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=hf(e));return n},df.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return af(this.cover(e,n),e,n,t)},df.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),c=1/0,l=1/0,u=-1/0,h=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,s[n]=i,r<c&&(c=r),r>u&&(u=r),i<l&&(l=i),i>h&&(h=i));if(c>u||l>h)return this;for(this.cover(c,l).cover(u,h),n=0;n<a;++n)af(this,o[n],s[n],t[n]);return this},df.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,c=i-n,l=this._root;n>t||t>=i||r>e||e>=a;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=l,l=o,c*=2,s){case 0:i=n+c,a=r+c;break;case 1:n=i-c,a=r+c;break;case 2:i=n+c,r=a-c;break;case 3:n=i-c,r=a-c}this._root&&this._root.length&&(this._root=l)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},df.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},df.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},df.find=function(t,e,n){var r,i,a,o,s,c,l,u=this._x0,h=this._y0,d=this._x1,f=this._y1,p=[],g=this._root;for(g&&p.push(new of(g,u,h,d,f)),null==n?n=1/0:(u=t-n,h=e-n,d=t+n,f=e+n,n*=n);c=p.pop();)if(!(!(g=c.node)||(i=c.x0)>d||(a=c.y0)>f||(o=c.x1)<u||(s=c.y1)<h))if(g.length){var y=(i+o)/2,m=(a+s)/2;p.push(new of(g[3],y,m,o,s),new of(g[2],i,m,y,s),new of(g[1],y,a,o,m),new of(g[0],i,a,y,m)),(l=(e>=m)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=c)}else{var v=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),_=v*v+b*b;if(_<n){var w=Math.sqrt(n=_);u=t-w,h=e-w,d=t+w,f=e+w,r=g.data}}return r},df.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,s,c,l,u,h,d,f=this._root,p=this._x0,g=this._y0,y=this._x1,m=this._y1;if(!f)return this;if(f.length)for(;;){if((l=a>=(s=(p+y)/2))?p=s:y=s,(u=o>=(c=(g+m)/2))?g=c:m=c,e=f,!(f=f[h=u<<1|l]))return this;if(!f.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,d=h)}for(;f.data!==t;)if(r=f,!(f=f.next))return this;return(i=f.next)&&delete f.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[d]=f:this._root=f),this):(this._root=i,this)},df.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},df.root=function(){return this._root},df.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},df.visit=function(t){var e,n,r,i,a,o,s=[],c=this._root;for(c&&s.push(new of(c,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(c=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&c.length){var l=(r+a)/2,u=(i+o)/2;(n=c[3])&&s.push(new of(n,l,u,a,o)),(n=c[2])&&s.push(new of(n,r,u,l,o)),(n=c[1])&&s.push(new of(n,l,i,a,u)),(n=c[0])&&s.push(new of(n,r,i,l,u))}return this},df.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new of(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,c=e.x1,l=e.y1,u=(o+c)/2,h=(s+l)/2;(a=i[0])&&n.push(new of(a,o,s,u,h)),(a=i[1])&&n.push(new of(a,u,s,c,h)),(a=i[2])&&n.push(new of(a,o,h,u,l)),(a=i[3])&&n.push(new of(a,u,h,c,l))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},df.x=function(t){return arguments.length?(this._x=t,this):this._x},df.y=function(t){return arguments.length?(this._y=t,this):this._y};var bf=Math.PI*(3-Math.sqrt(5));function _f(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function wf(t){return(t=_f(Math.abs(t)))?t[1]:NaN}var xf,kf=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Cf(t){if(!(e=kf.exec(t)))throw new Error("invalid format: "+t);var e;return new Tf({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Tf(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Ef(t,e){var n=_f(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Cf.prototype=Tf.prototype,Tf.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Sf={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Ef(100*t,e)},r:Ef,s:function(t,e){var n=_f(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(xf=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+_f(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function Of(t){return t}var Af,Mf,Df,jf=Array.prototype.map,Nf=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Bf(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Of:(e=jf.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Of:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(jf.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Cf(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,g=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(g=!0,v="g"):Sf[v]||(void 0===y&&(y=12),m=!0,v="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var b="$"===d?i:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===d?a:/[%p]/.test(v)?c:"",w=Sf[v],x=/[defgprs%]/.test(v);function k(t){var i,a,c,d=b,k=_;if("c"===v)k=w(t)+k,t="";else{var C=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:w(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),C&&0==+t&&"+"!==h&&(C=!1),d=(C?"("===h?h:l:"-"===h||"("===h?"":h)+d,k=("s"===v?Nf[8+xf/3]:"")+k+(C&&"("===h?")":""),x)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){k=(46===c?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!f&&(t=r(t,1/0));var T=d.length+t.length+k.length,E=T<p?new Array(p-T+1).join(e):"";switch(g&&f&&(t=r(E+t,E.length?p-k.length:1/0),E=""),n){case"<":t=d+t+k+E;break;case"=":t=d+E+t+k;break;case"^":t=E.slice(0,T=E.length>>1)+d+t+k+E.slice(T);break;default:t=E+d+t+k}return s(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=Cf(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(wf(e)/3))),i=Math.pow(10,-r),a=Nf[8+r/3];return function(t){return n(i*t)+a}}}}function Lf(t){return Af=Bf(t),Mf=Af.format,Df=Af.formatPrefix,Af}function Rf(t){return Math.max(0,-wf(Math.abs(t)))}function If(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(wf(e)/3)))-wf(Math.abs(t)))}function Ff(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,wf(e)-wf(t))+1}function Pf(){return new Yf}function Yf(){this.reset()}Lf({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Yf.prototype={constructor:Yf,reset:function(){this.s=this.t=0},add:function(t){Uf(zf,t,this.t),Uf(this,zf.s,this.s),this.s?this.t+=zf.t:this.s=zf.t},valueOf:function(){return this.s}};var zf=new Yf;function Uf(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var $f=Math.PI,Wf=$f/2,qf=$f/4,Hf=2*$f,Vf=180/$f,Gf=$f/180,Xf=Math.abs,Zf=Math.atan,Qf=Math.atan2,Kf=Math.cos,Jf=Math.ceil,tp=Math.exp,ep=Math.log,np=Math.pow,rp=Math.sin,ip=Math.sign||function(t){return t>0?1:t<0?-1:0},ap=Math.sqrt,op=Math.tan;function sp(t){return t>1?0:t<-1?$f:Math.acos(t)}function cp(t){return t>1?Wf:t<-1?-Wf:Math.asin(t)}function lp(t){return(t=rp(t/2))*t}function up(){}function hp(t,e){t&&fp.hasOwnProperty(t.type)&&fp[t.type](t,e)}var dp={Feature:function(t,e){hp(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)hp(n[r].geometry,e)}},fp={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){pp(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)pp(n[r],e,0)},Polygon:function(t,e){gp(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)gp(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)hp(n[r],e)}};function pp(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function gp(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)pp(t[n],e,1);e.polygonEnd()}function yp(t,e){t&&dp.hasOwnProperty(t.type)?dp[t.type](t,e):hp(t,e)}var mp,vp,bp,_p,wp,xp=Pf(),kp=Pf(),Cp={point:up,lineStart:up,lineEnd:up,polygonStart:function(){xp.reset(),Cp.lineStart=Tp,Cp.lineEnd=Ep},polygonEnd:function(){var t=+xp;kp.add(t<0?Hf+t:t),this.lineStart=this.lineEnd=this.point=up},sphere:function(){kp.add(Hf)}};function Tp(){Cp.point=Sp}function Ep(){Op(mp,vp)}function Sp(t,e){Cp.point=Op,mp=t,vp=e,bp=t*=Gf,_p=Kf(e=(e*=Gf)/2+qf),wp=rp(e)}function Op(t,e){var n=(t*=Gf)-bp,r=n>=0?1:-1,i=r*n,a=Kf(e=(e*=Gf)/2+qf),o=rp(e),s=wp*o,c=_p*a+s*Kf(i),l=s*r*rp(i);xp.add(Qf(l,c)),bp=t,_p=a,wp=o}function Ap(t){return[Qf(t[1],t[0]),cp(t[2])]}function Mp(t){var e=t[0],n=t[1],r=Kf(n);return[r*Kf(e),r*rp(e),rp(n)]}function Dp(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function jp(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Np(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Bp(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Lp(t){var e=ap(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Rp,Ip,Fp,Pp,Yp,zp,Up,$p,Wp,qp,Hp,Vp,Gp,Xp,Zp,Qp,Kp,Jp,tg,eg,ng,rg,ig,ag,og,sg,cg=Pf(),lg={point:ug,lineStart:dg,lineEnd:fg,polygonStart:function(){lg.point=pg,lg.lineStart=gg,lg.lineEnd=yg,cg.reset(),Cp.polygonStart()},polygonEnd:function(){Cp.polygonEnd(),lg.point=ug,lg.lineStart=dg,lg.lineEnd=fg,xp<0?(Rp=-(Fp=180),Ip=-(Pp=90)):cg>1e-6?Pp=90:cg<-1e-6&&(Ip=-90),qp[0]=Rp,qp[1]=Fp},sphere:function(){Rp=-(Fp=180),Ip=-(Pp=90)}};function ug(t,e){Wp.push(qp=[Rp=t,Fp=t]),e<Ip&&(Ip=e),e>Pp&&(Pp=e)}function hg(t,e){var n=Mp([t*Gf,e*Gf]);if($p){var r=jp($p,n),i=jp([r[1],-r[0],0],r);Lp(i),i=Ap(i);var a,o=t-Yp,s=o>0?1:-1,c=i[0]*Vf*s,l=Xf(o)>180;l^(s*Yp<c&&c<s*t)?(a=i[1]*Vf)>Pp&&(Pp=a):l^(s*Yp<(c=(c+360)%360-180)&&c<s*t)?(a=-i[1]*Vf)<Ip&&(Ip=a):(e<Ip&&(Ip=e),e>Pp&&(Pp=e)),l?t<Yp?mg(Rp,t)>mg(Rp,Fp)&&(Fp=t):mg(t,Fp)>mg(Rp,Fp)&&(Rp=t):Fp>=Rp?(t<Rp&&(Rp=t),t>Fp&&(Fp=t)):t>Yp?mg(Rp,t)>mg(Rp,Fp)&&(Fp=t):mg(t,Fp)>mg(Rp,Fp)&&(Rp=t)}else Wp.push(qp=[Rp=t,Fp=t]);e<Ip&&(Ip=e),e>Pp&&(Pp=e),$p=n,Yp=t}function dg(){lg.point=hg}function fg(){qp[0]=Rp,qp[1]=Fp,lg.point=ug,$p=null}function pg(t,e){if($p){var n=t-Yp;cg.add(Xf(n)>180?n+(n>0?360:-360):n)}else zp=t,Up=e;Cp.point(t,e),hg(t,e)}function gg(){Cp.lineStart()}function yg(){pg(zp,Up),Cp.lineEnd(),Xf(cg)>1e-6&&(Rp=-(Fp=180)),qp[0]=Rp,qp[1]=Fp,$p=null}function mg(t,e){return(e-=t)<0?e+360:e}function vg(t,e){return t[0]-e[0]}function bg(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var _g={sphere:up,point:wg,lineStart:kg,lineEnd:Eg,polygonStart:function(){_g.lineStart=Sg,_g.lineEnd=Og},polygonEnd:function(){_g.lineStart=kg,_g.lineEnd=Eg}};function wg(t,e){t*=Gf;var n=Kf(e*=Gf);xg(n*Kf(t),n*rp(t),rp(e))}function xg(t,e,n){++Hp,Gp+=(t-Gp)/Hp,Xp+=(e-Xp)/Hp,Zp+=(n-Zp)/Hp}function kg(){_g.point=Cg}function Cg(t,e){t*=Gf;var n=Kf(e*=Gf);ag=n*Kf(t),og=n*rp(t),sg=rp(e),_g.point=Tg,xg(ag,og,sg)}function Tg(t,e){t*=Gf;var n=Kf(e*=Gf),r=n*Kf(t),i=n*rp(t),a=rp(e),o=Qf(ap((o=og*a-sg*i)*o+(o=sg*r-ag*a)*o+(o=ag*i-og*r)*o),ag*r+og*i+sg*a);Vp+=o,Qp+=o*(ag+(ag=r)),Kp+=o*(og+(og=i)),Jp+=o*(sg+(sg=a)),xg(ag,og,sg)}function Eg(){_g.point=wg}function Sg(){_g.point=Ag}function Og(){Mg(rg,ig),_g.point=wg}function Ag(t,e){rg=t,ig=e,t*=Gf,e*=Gf,_g.point=Mg;var n=Kf(e);ag=n*Kf(t),og=n*rp(t),sg=rp(e),xg(ag,og,sg)}function Mg(t,e){t*=Gf;var n=Kf(e*=Gf),r=n*Kf(t),i=n*rp(t),a=rp(e),o=og*a-sg*i,s=sg*r-ag*a,c=ag*i-og*r,l=ap(o*o+s*s+c*c),u=cp(l),h=l&&-u/l;tg+=h*o,eg+=h*s,ng+=h*c,Vp+=u,Qp+=u*(ag+(ag=r)),Kp+=u*(og+(og=i)),Jp+=u*(sg+(sg=a)),xg(ag,og,sg)}function Dg(t){return function(){return t}}function jg(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function Ng(t,e){return[Xf(t)>$f?t+Math.round(-t/Hf)*Hf:t,e]}function Bg(t,e,n){return(t%=Hf)?e||n?jg(Rg(t),Ig(e,n)):Rg(t):e||n?Ig(e,n):Ng}function Lg(t){return function(e,n){return[(e+=t)>$f?e-Hf:e<-$f?e+Hf:e,n]}}function Rg(t){var e=Lg(t);return e.invert=Lg(-t),e}function Ig(t,e){var n=Kf(t),r=rp(t),i=Kf(e),a=rp(e);function o(t,e){var o=Kf(e),s=Kf(t)*o,c=rp(t)*o,l=rp(e),u=l*n+s*r;return[Qf(c*i-u*a,s*n-l*r),cp(u*i+c*a)]}return o.invert=function(t,e){var o=Kf(e),s=Kf(t)*o,c=rp(t)*o,l=rp(e),u=l*i-c*a;return[Qf(c*i+l*a,s*n+u*r),cp(u*n-s*r)]},o}function Fg(t){function e(e){return(e=t(e[0]*Gf,e[1]*Gf))[0]*=Vf,e[1]*=Vf,e}return t=Bg(t[0]*Gf,t[1]*Gf,t.length>2?t[2]*Gf:0),e.invert=function(e){return(e=t.invert(e[0]*Gf,e[1]*Gf))[0]*=Vf,e[1]*=Vf,e},e}function Pg(t,e,n,r,i,a){if(n){var o=Kf(e),s=rp(e),c=r*n;null==i?(i=e+r*Hf,a=e-c/2):(i=Yg(o,i),a=Yg(o,a),(r>0?i<a:i>a)&&(i+=r*Hf));for(var l,u=i;r>0?u>a:u<a;u-=c)l=Ap([o,-s*Kf(u),-s*rp(u)]),t.point(l[0],l[1])}}function Yg(t,e){(e=Mp(e))[0]-=t,Lp(e);var n=sp(-e[1]);return((-e[2]<0?-n:n)+Hf-1e-6)%Hf}function zg(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:up,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Ug(t,e){return Xf(t[0]-e[0])<1e-6&&Xf(t[1]-e[1])<1e-6}function $g(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Wg(t,e,n,r,i){var a,o,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(Ug(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);return void i.lineEnd()}o[0]+=2e-6}s.push(n=new $g(r,t,null,!0)),c.push(n.o=new $g(r,null,n,!1)),s.push(n=new $g(o,t,null,!1)),c.push(n.o=new $g(o,null,n,!0))}})),s.length){for(c.sort(e),qg(s),qg(c),a=0,o=c.length;a<o;++a)c[a].e=n=!n;for(var l,u,h=s[0];;){for(var d=h,f=!0;d.v;)if((d=d.n)===h)return;l=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(f)for(a=0,o=l.length;a<o;++a)i.point((u=l[a])[0],u[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(f)for(l=d.p.z,a=l.length-1;a>=0;--a)i.point((u=l[a])[0],u[1]);else r(d.x,d.p.x,-1,i);d=d.p}l=(d=d.o).z,f=!f}while(!d.v);i.lineEnd()}}}function qg(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}Ng.invert=Ng;var Hg=Pf();function Vg(t){return Xf(t[0])<=$f?t[0]:ip(t[0])*((Xf(t[0])+$f)%Hf-$f)}function Gg(t,e){var n=Vg(e),r=e[1],i=rp(r),a=[rp(n),-Kf(n),0],o=0,s=0;Hg.reset(),1===i?r=Wf+1e-6:-1===i&&(r=-Wf-1e-6);for(var c=0,l=t.length;c<l;++c)if(h=(u=t[c]).length)for(var u,h,d=u[h-1],f=Vg(d),p=d[1]/2+qf,g=rp(p),y=Kf(p),m=0;m<h;++m,f=b,g=w,y=x,d=v){var v=u[m],b=Vg(v),_=v[1]/2+qf,w=rp(_),x=Kf(_),k=b-f,C=k>=0?1:-1,T=C*k,E=T>$f,S=g*w;if(Hg.add(Qf(S*C*rp(T),y*x+S*Kf(T))),o+=E?k+C*Hf:k,E^f>=n^b>=n){var O=jp(Mp(d),Mp(v));Lp(O);var A=jp(a,O);Lp(A);var M=(E^k>=0?-1:1)*cp(A[2]);(r>M||r===M&&(O[0]||O[1]))&&(s+=E^k>=0?1:-1)}}return(o<-1e-6||o<1e-6&&Hg<-1e-6)^1&s}function Xg(t,e,n,r){return function(i){var a,o,s,c=e(i),l=zg(),u=e(l),h=!1,d={point:f,lineStart:g,lineEnd:y,polygonStart:function(){d.point=m,d.lineStart=v,d.lineEnd=b,o=[],a=[]},polygonEnd:function(){d.point=f,d.lineStart=g,d.lineEnd=y,o=qa(o);var t=Gg(a,r);o.length?(h||(i.polygonStart(),h=!0),Wg(o,Qg,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function f(e,n){t(e,n)&&i.point(e,n)}function p(t,e){c.point(t,e)}function g(){d.point=p,c.lineStart()}function y(){d.point=f,c.lineEnd()}function m(t,e){s.push([t,e]),u.point(t,e)}function v(){u.lineStart(),s=[]}function b(){m(s[0][0],s[0][1]),u.lineEnd();var t,e,n,r,c=u.clean(),d=l.result(),f=d.length;if(s.pop(),a.push(s),s=null,f)if(1&c){if((e=(n=d[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else f>1&&2&c&&d.push(d.pop().concat(d.shift())),o.push(d.filter(Zg))}return d}}function Zg(t){return t.length>1}function Qg(t,e){return((t=t.x)[0]<0?t[1]-Wf-1e-6:Wf-t[1])-((e=e.x)[0]<0?e[1]-Wf-1e-6:Wf-e[1])}var Kg=Xg((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?$f:-$f,c=Xf(a-n);Xf(c-$f)<1e-6?(t.point(n,r=(r+o)/2>0?Wf:-Wf),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&c>=$f&&(Xf(n-i)<1e-6&&(n-=1e-6*i),Xf(a-s)<1e-6&&(a-=1e-6*s),r=function(t,e,n,r){var i,a,o=rp(t-n);return Xf(o)>1e-6?Zf((rp(e)*(a=Kf(r))*rp(n)-rp(r)*(i=Kf(e))*rp(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Wf,r.point(-$f,i),r.point(0,i),r.point($f,i),r.point($f,0),r.point($f,-i),r.point(0,-i),r.point(-$f,-i),r.point(-$f,0),r.point(-$f,i);else if(Xf(t[0]-e[0])>1e-6){var a=t[0]<e[0]?$f:-$f;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-$f,-Wf]);function Jg(t){var e=Kf(t),n=6*Gf,r=e>0,i=Xf(e)>1e-6;function a(t,n){return Kf(t)*Kf(n)>e}function o(t,n,r){var i=[1,0,0],a=jp(Mp(t),Mp(n)),o=Dp(a,a),s=a[0],c=o-s*s;if(!c)return!r&&t;var l=e*o/c,u=-e*s/c,h=jp(i,a),d=Bp(i,l);Np(d,Bp(a,u));var f=h,p=Dp(d,f),g=Dp(f,f),y=p*p-g*(Dp(d,d)-1);if(!(y<0)){var m=ap(y),v=Bp(f,(-p-m)/g);if(Np(v,d),v=Ap(v),!r)return v;var b,_=t[0],w=n[0],x=t[1],k=n[1];w<_&&(b=_,_=w,w=b);var C=w-_,T=Xf(C-$f)<1e-6;if(!T&&k<x&&(b=x,x=k,k=b),T||C<1e-6?T?x+k>0^v[1]<(Xf(v[0]-_)<1e-6?x:k):x<=v[1]&&v[1]<=k:C>$f^(_<=v[0]&&v[0]<=w)){var E=Bp(f,(-p+m)/g);return Np(E,d),[v,Ap(E)]}}}function s(e,n){var i=r?t:$f-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return Xg(a,(function(t){var e,n,c,l,u;return{lineStart:function(){l=c=!1,u=1},point:function(h,d){var f,p=[h,d],g=a(h,d),y=r?g?0:s(h,d):g?s(h+(h<0?$f:-$f),d):0;if(!e&&(l=c=g)&&t.lineStart(),g!==c&&(!(f=o(e,p))||Ug(e,f)||Ug(p,f))&&(p[2]=1),g!==c)u=0,g?(t.lineStart(),f=o(p,e),t.point(f[0],f[1])):(f=o(e,p),t.point(f[0],f[1],2),t.lineEnd()),e=f;else if(i&&e&&r^g){var m;y&n||!(m=o(p,e,!0))||(u=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1],3)))}!g||e&&Ug(e,p)||t.point(p[0],p[1]),e=p,c=g,n=y},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return u|(l&&c)<<1}}}),(function(e,r,i,a){Pg(a,t,n,i,e,r)}),r?[0,-t]:[-$f,t-$f])}function ty(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,l){var u=0,h=0;if(null==i||(u=o(i,s))!==(h=o(a,s))||c(i,a)<0^s>0)do{l.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==h);else l.point(a[0],a[1])}function o(r,i){return Xf(r[0]-t)<1e-6?i>0?0:3:Xf(r[0]-n)<1e-6?i>0?2:1:Xf(r[1]-e)<1e-6?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var c,l,u,h,d,f,p,g,y,m,v,b=o,_=zg(),w={point:x,lineStart:function(){w.point=k,l&&l.push(u=[]);m=!0,y=!1,p=g=NaN},lineEnd:function(){c&&(k(h,d),f&&y&&_.rejoin(),c.push(_.result()));w.point=x,y&&b.lineEnd()},polygonStart:function(){b=_,c=[],l=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=l.length;n<i;++n)for(var a,o,s=l[n],c=1,u=s.length,h=s[0],d=h[0],f=h[1];c<u;++c)a=d,o=f,d=(h=s[c])[0],f=h[1],o<=r?f>r&&(d-a)*(r-o)>(f-o)*(t-a)&&++e:f<=r&&(d-a)*(r-o)<(f-o)*(t-a)&&--e;return e}(),n=v&&e,i=(c=qa(c)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&Wg(c,s,e,a,o),o.polygonEnd());b=o,c=l=u=null}};function x(t,e){i(t,e)&&b.point(t,e)}function k(a,o){var s=i(a,o);if(l&&u.push([a,o]),m)h=a,d=o,f=s,m=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&y)b.point(a,o);else{var c=[p=Math.max(-1e9,Math.min(1e9,p)),g=Math.max(-1e9,Math.min(1e9,g))],_=[a=Math.max(-1e9,Math.min(1e9,a)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,n,r,i,a){var o,s=t[0],c=t[1],l=0,u=1,h=e[0]-s,d=e[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<l)return;o<u&&(u=o)}else if(h>0){if(o>u)return;o>l&&(l=o)}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>l&&(l=o)}else if(h>0){if(o<l)return;o<u&&(u=o)}if(o=r-c,d||!(o>0)){if(o/=d,d<0){if(o<l)return;o<u&&(u=o)}else if(d>0){if(o>u)return;o>l&&(l=o)}if(o=a-c,d||!(o<0)){if(o/=d,d<0){if(o>u)return;o>l&&(l=o)}else if(d>0){if(o<l)return;o<u&&(u=o)}return l>0&&(t[0]=s+l*h,t[1]=c+l*d),u<1&&(e[0]=s+u*h,e[1]=c+u*d),!0}}}}}(c,_,t,e,n,r)?s&&(b.lineStart(),b.point(a,o),v=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(_[0],_[1]),s||b.lineEnd(),v=!1)}p=a,g=o,y=s}return w}}var ey,ny,ry,iy=Pf(),ay={sphere:up,point:up,lineStart:function(){ay.point=sy,ay.lineEnd=oy},lineEnd:up,polygonStart:up,polygonEnd:up};function oy(){ay.point=ay.lineEnd=up}function sy(t,e){ey=t*=Gf,ny=rp(e*=Gf),ry=Kf(e),ay.point=cy}function cy(t,e){t*=Gf;var n=rp(e*=Gf),r=Kf(e),i=Xf(t-ey),a=Kf(i),o=r*rp(i),s=ry*n-ny*r*a,c=ny*n+ry*r*a;iy.add(Qf(ap(o*o+s*s),c)),ey=t,ny=n,ry=r}function ly(t){return iy.reset(),yp(t,ay),+iy}var uy=[null,null],hy={type:"LineString",coordinates:uy};function dy(t,e){return uy[0]=t,uy[1]=e,ly(hy)}var fy={Feature:function(t,e){return gy(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(gy(n[r].geometry,e))return!0;return!1}},py={Sphere:function(){return!0},Point:function(t,e){return yy(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(yy(n[r],e))return!0;return!1},LineString:function(t,e){return my(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(my(n[r],e))return!0;return!1},Polygon:function(t,e){return vy(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(vy(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(gy(n[r],e))return!0;return!1}};function gy(t,e){return!(!t||!py.hasOwnProperty(t.type))&&py[t.type](t,e)}function yy(t,e){return 0===dy(t,e)}function my(t,e){for(var n,r,i,a=0,o=t.length;a<o;a++){if(0===(r=dy(t[a],e)))return!0;if(a>0&&(i=dy(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<1e-12*i)return!0;n=r}return!1}function vy(t,e){return!!Gg(t.map(by),_y(e))}function by(t){return(t=t.map(_y)).pop(),t}function _y(t){return[t[0]*Gf,t[1]*Gf]}function wy(t,e,n){var r=La(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function xy(t,e,n){var r=La(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function ky(){var t,e,n,r,i,a,o,s,c,l,u,h,d=10,f=d,p=90,g=360,y=2.5;function m(){return{type:"MultiLineString",coordinates:v()}}function v(){return La(Jf(r/p)*p,n,p).map(u).concat(La(Jf(s/g)*g,o,g).map(h)).concat(La(Jf(e/d)*d,t,d).filter((function(t){return Xf(t%p)>1e-6})).map(c)).concat(La(Jf(a/f)*f,i,f).filter((function(t){return Xf(t%g)>1e-6})).map(l))}return m.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[u(r).concat(h(o).slice(1),u(n).reverse().slice(1),h(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),m.precision(y)):[[r,s],[n,o]]},m.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),m.precision(y)):[[e,a],[t,i]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],m):[p,g]},m.stepMinor=function(t){return arguments.length?(d=+t[0],f=+t[1],m):[d,f]},m.precision=function(d){return arguments.length?(y=+d,c=wy(a,i,90),l=xy(e,t,y),u=wy(s,o,90),h=xy(r,n,y),m):y},m.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Cy(t){return t}var Ty,Ey,Sy,Oy,Ay=Pf(),My=Pf(),Dy={point:up,lineStart:up,lineEnd:up,polygonStart:function(){Dy.lineStart=jy,Dy.lineEnd=Ly},polygonEnd:function(){Dy.lineStart=Dy.lineEnd=Dy.point=up,Ay.add(Xf(My)),My.reset()},result:function(){var t=Ay/2;return Ay.reset(),t}};function jy(){Dy.point=Ny}function Ny(t,e){Dy.point=By,Ty=Sy=t,Ey=Oy=e}function By(t,e){My.add(Oy*t-Sy*e),Sy=t,Oy=e}function Ly(){By(Ty,Ey)}var Ry=1/0,Iy=Ry,Fy=-Ry,Py=Fy,Yy={point:function(t,e){t<Ry&&(Ry=t);t>Fy&&(Fy=t);e<Iy&&(Iy=e);e>Py&&(Py=e)},lineStart:up,lineEnd:up,polygonStart:up,polygonEnd:up,result:function(){var t=[[Ry,Iy],[Fy,Py]];return Fy=Py=-(Iy=Ry=1/0),t}};var zy,Uy,$y,Wy,qy=0,Hy=0,Vy=0,Gy=0,Xy=0,Zy=0,Qy=0,Ky=0,Jy=0,tm={point:em,lineStart:nm,lineEnd:am,polygonStart:function(){tm.lineStart=om,tm.lineEnd=sm},polygonEnd:function(){tm.point=em,tm.lineStart=nm,tm.lineEnd=am},result:function(){var t=Jy?[Qy/Jy,Ky/Jy]:Zy?[Gy/Zy,Xy/Zy]:Vy?[qy/Vy,Hy/Vy]:[NaN,NaN];return qy=Hy=Vy=Gy=Xy=Zy=Qy=Ky=Jy=0,t}};function em(t,e){qy+=t,Hy+=e,++Vy}function nm(){tm.point=rm}function rm(t,e){tm.point=im,em($y=t,Wy=e)}function im(t,e){var n=t-$y,r=e-Wy,i=ap(n*n+r*r);Gy+=i*($y+t)/2,Xy+=i*(Wy+e)/2,Zy+=i,em($y=t,Wy=e)}function am(){tm.point=em}function om(){tm.point=cm}function sm(){lm(zy,Uy)}function cm(t,e){tm.point=lm,em(zy=$y=t,Uy=Wy=e)}function lm(t,e){var n=t-$y,r=e-Wy,i=ap(n*n+r*r);Gy+=i*($y+t)/2,Xy+=i*(Wy+e)/2,Zy+=i,Qy+=(i=Wy*t-$y*e)*($y+t),Ky+=i*(Wy+e),Jy+=3*i,em($y=t,Wy=e)}function um(t){this._context=t}um.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Hf)}},result:up};var hm,dm,fm,pm,gm,ym=Pf(),mm={point:up,lineStart:function(){mm.point=vm},lineEnd:function(){hm&&bm(dm,fm),mm.point=up},polygonStart:function(){hm=!0},polygonEnd:function(){hm=null},result:function(){var t=+ym;return ym.reset(),t}};function vm(t,e){mm.point=bm,dm=pm=t,fm=gm=e}function bm(t,e){pm-=t,gm-=e,ym.add(ap(pm*pm+gm*gm)),pm=t,gm=e}function _m(){this._string=[]}function wm(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function xm(t){return function(e){var n=new km;for(var r in t)n[r]=t[r];return n.stream=e,n}}function km(){}function Cm(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),yp(n,t.stream(Yy)),e(Yy.result()),null!=r&&t.clipExtent(r),t}function Tm(t,e,n){return Cm(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function Em(t,e,n){return Tm(t,[[0,0],e],n)}function Sm(t,e,n){return Cm(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function Om(t,e,n){return Cm(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}_m.prototype={_radius:4.5,_circle:wm(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=wm(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},km.prototype={constructor:km,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Am=Kf(30*Gf);function Mm(t,e){return+e?function(t,e){function n(r,i,a,o,s,c,l,u,h,d,f,p,g,y){var m=l-r,v=u-i,b=m*m+v*v;if(b>4*e&&g--){var _=o+d,w=s+f,x=c+p,k=ap(_*_+w*w+x*x),C=cp(x/=k),T=Xf(Xf(x)-1)<1e-6||Xf(a-h)<1e-6?(a+h)/2:Qf(w,_),E=t(T,C),S=E[0],O=E[1],A=S-r,M=O-i,D=v*A-m*M;(D*D/b>e||Xf((m*A+v*M)/b-.5)>.3||o*d+s*f+c*p<Am)&&(n(r,i,a,o,s,c,S,O,T,_/=k,w/=k,x,g,y),y.point(S,O),n(S,O,T,_,w,x,l,u,h,d,f,p,g,y))}}return function(e){var r,i,a,o,s,c,l,u,h,d,f,p,g={point:y,lineStart:m,lineEnd:b,polygonStart:function(){e.polygonStart(),g.lineStart=_},polygonEnd:function(){e.polygonEnd(),g.lineStart=m}};function y(n,r){n=t(n,r),e.point(n[0],n[1])}function m(){u=NaN,g.point=v,e.lineStart()}function v(r,i){var a=Mp([r,i]),o=t(r,i);n(u,h,l,d,f,p,u=o[0],h=o[1],l=r,d=a[0],f=a[1],p=a[2],16,e),e.point(u,h)}function b(){g.point=y,e.lineEnd()}function _(){m(),g.point=w,g.lineEnd=x}function w(t,e){v(r=t,e),i=u,a=h,o=d,s=f,c=p,g.point=v}function x(){n(u,h,l,d,f,p,i,a,r,o,s,c,16,e),g.lineEnd=b,b()}return g}}(t,e):function(t){return xm({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var Dm=xm({point:function(t,e){this.stream.point(t*Gf,e*Gf)}});function jm(t,e,n,r,i){function a(a,o){return[e+t*(a*=r),n-t*(o*=i)]}return a.invert=function(a,o){return[(a-e)/t*r,(n-o)/t*i]},a}function Nm(t,e,n,r,i,a){var o=Kf(a),s=rp(a),c=o*t,l=s*t,u=o/t,h=s/t,d=(s*n-o*e)/t,f=(s*e+o*n)/t;function p(t,a){return[c*(t*=r)-l*(a*=i)+e,n-l*t-c*a]}return p.invert=function(t,e){return[r*(u*t-h*e+d),i*(f-h*t-u*e)]},p}function Bm(t){return Lm((function(){return t}))()}function Lm(t){var e,n,r,i,a,o,s,c,l,u,h=150,d=480,f=250,p=0,g=0,y=0,m=0,v=0,b=0,_=1,w=1,x=null,k=Kg,C=null,T=Cy,E=.5;function S(t){return c(t[0]*Gf,t[1]*Gf)}function O(t){return(t=c.invert(t[0],t[1]))&&[t[0]*Vf,t[1]*Vf]}function A(){var t=Nm(h,0,0,_,w,b).apply(null,e(p,g)),r=(b?Nm:jm)(h,d-t[0],f-t[1],_,w,b);return n=Bg(y,m,v),s=jg(e,r),c=jg(n,s),o=Mm(s,E),M()}function M(){return l=u=null,S}return S.stream=function(t){return l&&u===t?l:l=Dm(function(t){return xm({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(k(o(T(u=t)))))},S.preclip=function(t){return arguments.length?(k=t,x=void 0,M()):k},S.postclip=function(t){return arguments.length?(T=t,C=r=i=a=null,M()):T},S.clipAngle=function(t){return arguments.length?(k=+t?Jg(x=t*Gf):(x=null,Kg),M()):x*Vf},S.clipExtent=function(t){return arguments.length?(T=null==t?(C=r=i=a=null,Cy):ty(C=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),M()):null==C?null:[[C,r],[i,a]]},S.scale=function(t){return arguments.length?(h=+t,A()):h},S.translate=function(t){return arguments.length?(d=+t[0],f=+t[1],A()):[d,f]},S.center=function(t){return arguments.length?(p=t[0]%360*Gf,g=t[1]%360*Gf,A()):[p*Vf,g*Vf]},S.rotate=function(t){return arguments.length?(y=t[0]%360*Gf,m=t[1]%360*Gf,v=t.length>2?t[2]%360*Gf:0,A()):[y*Vf,m*Vf,v*Vf]},S.angle=function(t){return arguments.length?(b=t%360*Gf,A()):b*Vf},S.reflectX=function(t){return arguments.length?(_=t?-1:1,A()):_<0},S.reflectY=function(t){return arguments.length?(w=t?-1:1,A()):w<0},S.precision=function(t){return arguments.length?(o=Mm(s,E=t*t),M()):ap(E)},S.fitExtent=function(t,e){return Tm(S,t,e)},S.fitSize=function(t,e){return Em(S,t,e)},S.fitWidth=function(t,e){return Sm(S,t,e)},S.fitHeight=function(t,e){return Om(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&O,A()}}function Rm(t){var e=0,n=$f/3,r=Lm(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Gf,n=t[1]*Gf):[e*Vf,n*Vf]},i}function Im(t,e){var n=rp(t),r=(n+rp(e))/2;if(Xf(r)<1e-6)return function(t){var e=Kf(t);function n(t,n){return[t*e,rp(n)/e]}return n.invert=function(t,n){return[t/e,cp(n*e)]},n}(t);var i=1+n*(2*r-n),a=ap(i)/r;function o(t,e){var n=ap(i-2*r*rp(e))/r;return[n*rp(t*=r),a-n*Kf(t)]}return o.invert=function(t,e){var n=a-e,o=Qf(t,Xf(n))*ip(n);return n*r<0&&(o-=$f*ip(t)*ip(n)),[o/r,cp((i-(t*t+n*n)*r*r)/(2*r))]},o}function Fm(){return Rm(Im).scale(155.424).center([0,33.6442])}function Pm(){return Fm().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Ym(t){return function(e,n){var r=Kf(e),i=Kf(n),a=t(r*i);return[a*i*rp(e),a*rp(n)]}}function zm(t){return function(e,n){var r=ap(e*e+n*n),i=t(r),a=rp(i),o=Kf(i);return[Qf(e*a,r*o),cp(r&&n*a/r)]}}var Um=Ym((function(t){return ap(2/(1+t))}));Um.invert=zm((function(t){return 2*cp(t/2)}));var $m=Ym((function(t){return(t=sp(t))&&t/rp(t)}));function Wm(t,e){return[t,ep(op((Wf+e)/2))]}function qm(t){var e,n,r,i=Bm(t),a=i.center,o=i.scale,s=i.translate,c=i.clipExtent,l=null;function u(){var a=$f*o(),s=i(Fg(i.rotate()).invert([0,0]));return c(null==l?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===Wm?[[Math.max(s[0]-a,l),e],[Math.min(s[0]+a,n),r]]:[[l,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),u()):o()},i.translate=function(t){return arguments.length?(s(t),u()):s()},i.center=function(t){return arguments.length?(a(t),u()):a()},i.clipExtent=function(t){return arguments.length?(null==t?l=e=n=r=null:(l=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),u()):null==l?null:[[l,e],[n,r]]},u()}function Hm(t){return op((Wf+t)/2)}function Vm(t,e){var n=Kf(t),r=t===e?rp(t):ep(n/Kf(e))/ep(Hm(e)/Hm(t)),i=n*np(Hm(t),r)/r;if(!r)return Wm;function a(t,e){i>0?e<1e-6-Wf&&(e=1e-6-Wf):e>Wf-1e-6&&(e=Wf-1e-6);var n=i/np(Hm(e),r);return[n*rp(r*t),i-n*Kf(r*t)]}return a.invert=function(t,e){var n=i-e,a=ip(r)*ap(t*t+n*n),o=Qf(t,Xf(n))*ip(n);return n*r<0&&(o-=$f*ip(t)*ip(n)),[o/r,2*Zf(np(i/a,1/r))-Wf]},a}function Gm(t,e){return[t,e]}function Xm(t,e){var n=Kf(t),r=t===e?rp(t):(n-Kf(e))/(e-t),i=n/r+t;if(Xf(r)<1e-6)return Gm;function a(t,e){var n=i-e,a=r*t;return[n*rp(a),i-n*Kf(a)]}return a.invert=function(t,e){var n=i-e,a=Qf(t,Xf(n))*ip(n);return n*r<0&&(a-=$f*ip(t)*ip(n)),[a/r,i-ip(r)*ap(t*t+n*n)]},a}$m.invert=zm((function(t){return t})),Wm.invert=function(t,e){return[t,2*Zf(tp(e))-Wf]},Gm.invert=Gm;var Zm=1.340264,Qm=-.081106,Km=893e-6,Jm=.003796,tv=ap(3)/2;function ev(t,e){var n=cp(tv*rp(e)),r=n*n,i=r*r*r;return[t*Kf(n)/(tv*(Zm+3*Qm*r+i*(7*Km+9*Jm*r))),n*(Zm+Qm*r+i*(Km+Jm*r))]}function nv(t,e){var n=Kf(e),r=Kf(t)*n;return[n*rp(t)/r,rp(e)/r]}function rv(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function iv(t,e){return[Kf(e)*rp(t),rp(e)]}function av(t,e){var n=Kf(e),r=1+Kf(t)*n;return[n*rp(t)/r,rp(e)/r]}function ov(t,e){return[ep(op((Wf+e)/2)),-t]}function sv(t,e){return t.parent===e.parent?1:2}function cv(t,e){return t+e.x}function lv(t,e){return Math.max(t,e.y)}function uv(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function hv(t,e){var n,r,i,a,o,s=new gv(t),c=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=dv);n=l.pop();)if(c&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)l.push(r=n.children[a]=new gv(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(pv)}function dv(t){return t.children}function fv(t){t.data=t.data.data}function pv(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function gv(t){this.data=t,this.depth=this.height=0,this.parent=null}ev.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(Zm+Qm*i+a*(Km+Jm*i))-e)/(Zm+3*Qm*i+a*(7*Km+9*Jm*i)))*r)*i*i,!(Xf(n)<1e-12));++o);return[tv*t*(Zm+3*Qm*i+a*(7*Km+9*Jm*i))/Kf(r),cp(rp(r)/tv)]},nv.invert=zm(Zf),rv.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Xf(n)>1e-6&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},iv.invert=zm(cp),av.invert=zm((function(t){return 2*Zf(t)})),ov.invert=function(t,e){return[-e,2*Zf(tp(t))-Wf]},gv.prototype=hv.prototype={constructor:gv,count:function(){return this.eachAfter(uv)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return hv(this).eachBefore(fv)}};var yv=Array.prototype.slice;function mv(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(yv.call(t))).length,a=[];r<i;)e=t[r],n&&_v(n,e)?++r:(n=xv(a=vv(a,e)),r=0);return n}function vv(t,e){var n,r;if(wv(e,t))return[e];for(n=0;n<t.length;++n)if(bv(e,t[n])&&wv(kv(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(bv(kv(t[n],t[r]),e)&&bv(kv(t[n],e),t[r])&&bv(kv(t[r],e),t[n])&&wv(Cv(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function bv(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function _v(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function wv(t,e){for(var n=0;n<e.length;++n)if(!_v(t,e[n]))return!1;return!0}function xv(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return kv(t[0],t[1]);case 3:return Cv(t[0],t[1],t[2])}var e}function kv(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,c=a-n,l=o-r,u=s-i,h=Math.sqrt(c*c+l*l);return{x:(n+a+c/h*u)/2,y:(r+o+l/h*u)/2,r:(h+i+s)/2}}function Cv(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,c=e.r,l=n.x,u=n.y,h=n.r,d=r-o,f=r-l,p=i-s,g=i-u,y=c-a,m=h-a,v=r*r+i*i-a*a,b=v-o*o-s*s+c*c,_=v-l*l-u*u+h*h,w=f*p-d*g,x=(p*_-g*b)/(2*w)-r,k=(g*y-p*m)/w,C=(f*b-d*_)/(2*w)-i,T=(d*m-f*y)/w,E=k*k+T*T-1,S=2*(a+x*k+C*T),O=x*x+C*C-a*a,A=-(E?(S+Math.sqrt(S*S-4*E*O))/(2*E):O/S);return{x:r+x+k*A,y:i+C+T*A,r:A}}function Tv(t,e,n){var r,i,a,o,s=t.x-e.x,c=t.y-e.y,l=s*s+c*c;l?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(l+o-i)/(2*l),a=Math.sqrt(Math.max(0,o/l-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(l+i-o)/(2*l),a=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Ev(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Sv(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Ov(t){this._=t,this.next=null,this.previous=null}function Av(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,c,l,u,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;Tv(n,e,r=t[2]),e=new Ov(e),n=new Ov(n),r=new Ov(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){Tv(e._,n._,r=t[s]),r=new Ov(r),c=n.next,l=e.previous,u=n._.r,h=e._.r;do{if(u<=h){if(Ev(c._,r._)){n=c,e.next=n,n.previous=e,--s;continue t}u+=c._.r,c=c.next}else{if(Ev(l._,r._)){(e=l).next=n,n.previous=e,--s;continue t}h+=l._.r,l=l.previous}}while(c!==l.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,a=Sv(e);(r=r.next)!==n;)(o=Sv(r))<a&&(e=r,a=o);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=mv(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}function Mv(t){return null==t?null:Dv(t)}function Dv(t){if("function"!=typeof t)throw new Error;return t}function jv(){return 0}function Nv(t){return function(){return t}}function Bv(t){return Math.sqrt(t.value)}function Lv(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Rv(t,e){return function(n){if(r=n.children){var r,i,a,o=r.length,s=t(n)*e||0;if(s)for(i=0;i<o;++i)r[i].r+=s;if(a=Av(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s}}}function Iv(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function Fv(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Pv(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,l=t.value&&(r-e)/t.value;++s<c;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*l}var Yv={depth:-1},zv={};function Uv(t){return t.id}function $v(t){return t.parentId}function Wv(t,e){return t.parent===e.parent?1:2}function qv(t){var e=t.children;return e?e[0]:t.t}function Hv(t){var e=t.children;return e?e[e.length-1]:t.t}function Vv(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Gv(t,e,n){return t.a.parent===e.parent?t.a:n}function Xv(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function Zv(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,l=t.value&&(i-n)/t.value;++s<c;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*l}Xv.prototype=Object.create(gv.prototype);var Qv=(1+Math.sqrt(5))/2;function Kv(t,e,n,r,i,a){for(var o,s,c,l,u,h,d,f,p,g,y,m=[],v=e.children,b=0,_=0,w=v.length,x=e.value;b<w;){c=i-n,l=a-r;do{u=v[_++].value}while(!u&&_<w);for(h=d=u,y=u*u*(g=Math.max(l/c,c/l)/(x*t)),p=Math.max(d/y,y/h);_<w;++_){if(u+=s=v[_].value,s<h&&(h=s),s>d&&(d=s),y=u*u*g,(f=Math.max(d/y,y/h))>p){u-=s;break}p=f}m.push(o={value:u,dice:c<l,children:v.slice(b,_)}),o.dice?Pv(o,n,r,i,x?r+=l*u/x:a):Zv(o,n,r,x?n+=c*u/x:i,a),x-=u,b=_}return m}var Jv=function t(e){function n(t,n,r,i,a){Kv(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(Qv);var tb=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,c,l,u,h=-1,d=o.length,f=t.value;++h<d;){for(c=(s=o[h]).children,l=s.value=0,u=c.length;l<u;++l)s.value+=c[l].value;s.dice?Pv(s,n,r,i,r+=(a-r)*s.value/f):Zv(s,n,r,n+=(i-n)*s.value/f,a),f-=s.value}else t._squarify=o=Kv(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(Qv);function eb(t,e){return t[0]-e[0]||t[1]-e[1]}function nb(t){for(var e,n,r,i=t.length,a=[0,1],o=2,s=2;s<i;++s){for(;o>1&&(e=t[a[o-2]],n=t[a[o-1]],r=t[s],(n[0]-e[0])*(r[1]-e[1])-(n[1]-e[1])*(r[0]-e[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}function rb(){return Math.random()}var ib=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(rb),ab=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(rb),ob=function t(e){function n(){var t=ab.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(rb),sb=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(rb),cb=function t(e){function n(t){var n=sb.source(e)(t);return function(){return n()/t}}return n.source=t,n}(rb),lb=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(rb);function ub(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function hb(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var db=Array.prototype,fb=db.map,pb=db.slice,gb={name:"implicit"};function yb(){var t=Kh(),e=[],n=[],r=gb;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==gb)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Kh();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=pb.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return yb(e,n).unknown(r)},ub.apply(i,arguments),i}function mb(){var t,e,n=yb().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,c=0,l=.5;function u(){var n=r().length,u=a[1]<a[0],h=a[u-0],d=a[1-u];t=(d-h)/Math.max(1,n-s+2*c),o&&(t=Math.floor(t)),h+=(d-h-t*(n-s))*l,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var f=La(n).map((function(e){return h+t*e}));return i(u?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),u()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],u()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,u()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,u()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,c=+t),u()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),u()):s},n.paddingOuter=function(t){return arguments.length?(c=+t,u()):c},n.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),u()):l},n.copy=function(){return mb(r(),a).round(o).paddingInner(s).paddingOuter(c).align(l)},ub.apply(u(),arguments)}function vb(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return vb(e())},t}function bb(t){return+t}var _b=[0,1];function wb(t){return t}function xb(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function kb(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Cb(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=xb(i,r),a=n(o,a)):(r=xb(r,i),a=n(a,o)),function(t){return a(r(t))}}function Tb(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=xb(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=ka(t,e,1,r)-1;return a[n](i[n](e))}}function Eb(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Sb(){var t,e,n,r,i,a,o=_b,s=_b,c=ll,l=wb;function u(){return r=Math.min(o.length,s.length)>2?Tb:Cb,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(l(e)))}return h.invert=function(n){return l(e((a||(a=r(s,o.map(t),il)))(n)))},h.domain=function(t){return arguments.length?(o=fb.call(t,bb),l===wb||(l=kb(o)),u()):o.slice()},h.range=function(t){return arguments.length?(s=pb.call(t),u()):s.slice()},h.rangeRound=function(t){return s=pb.call(t),c=ul,u()},h.clamp=function(t){return arguments.length?(l=t?kb(o):wb,h):l!==wb},h.interpolate=function(t){return arguments.length?(c=t,u()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,u()}}function Ob(t,e){return Sb()(t,e)}function Ab(t,e,n,r){var i,a=za(t,e,n);switch((r=Cf(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=If(a,o))||(r.precision=i),Df(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=Ff(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=Rf(a))||(r.precision=i-2*("%"===r.type))}return Mf(r)}function Mb(t){var e=t.domain;return t.ticks=function(t){var n=e();return Pa(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Ab(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],c=i[o];return c<s&&(r=s,s=c,c=r,r=a,a=o,o=r),(r=Ya(s,c,n))>0?r=Ya(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,n):r<0&&(r=Ya(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function Db(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function jb(t){return Math.log(t)}function Nb(t){return Math.exp(t)}function Bb(t){return-Math.log(-t)}function Lb(t){return-Math.exp(-t)}function Rb(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Ib(t){return function(e){return-t(-e)}}function Fb(t){var e,n,r=t(jb,Nb),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?Rb:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=Ib(e),n=Ib(n),t(Bb,Lb)):t(jb,Nb),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],c=o[o.length-1];(r=c<s)&&(d=s,s=c,c=d);var l,u,h,d=e(s),f=e(c),p=null==t?10:+t,g=[];if(!(a%1)&&f-d<p){if(d=Math.round(d)-1,f=Math.round(f)+1,s>0){for(;d<f;++d)for(u=1,l=n(d);u<a;++u)if(!((h=l*u)<s)){if(h>c)break;g.push(h)}}else for(;d<f;++d)for(u=a-1,l=n(d);u>=1;--u)if(!((h=l*u)<s)){if(h>c)break;g.push(h)}}else g=Pa(d,f,Math.min(f-d,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Mf(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(Db(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function Pb(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Yb(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function zb(t){var e=1,n=t(Pb(e),Yb(e));return n.constant=function(n){return arguments.length?t(Pb(e=+n),Yb(e)):e},Mb(n)}function Ub(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function $b(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Wb(t){return t<0?-t*t:t*t}function qb(t){var e=t(wb,wb),n=1;function r(){return 1===n?t(wb,wb):.5===n?t($b,Wb):t(Ub(n),Ub(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},Mb(e)}function Hb(){var t=qb(Sb());return t.copy=function(){return Eb(t,Hb()).exponent(t.exponent())},ub.apply(t,arguments),t}var Vb=new Date,Gb=new Date;function Xb(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return Xb((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Vb.setTime(+e),Gb.setTime(+r),t(Vb),t(Gb),Math.floor(n(Vb,Gb))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Zb=Xb((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Zb.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Xb((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Zb:null};var Qb=Zb.range,Kb=Xb((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),Jb=Kb.range,t_=Xb((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),e_=t_.range,n_=Xb((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),r_=n_.range,i_=Xb((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),a_=i_.range;function o_(t){return Xb((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var s_=o_(0),c_=o_(1),l_=o_(2),u_=o_(3),h_=o_(4),d_=o_(5),f_=o_(6),p_=s_.range,g_=c_.range,y_=l_.range,m_=u_.range,v_=h_.range,b_=d_.range,__=f_.range,w_=Xb((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),x_=w_.range,k_=Xb((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));k_.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Xb((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var C_=k_.range,T_=Xb((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),E_=T_.range,S_=Xb((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),O_=S_.range,A_=Xb((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),M_=A_.range;function D_(t){return Xb((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var j_=D_(0),N_=D_(1),B_=D_(2),L_=D_(3),R_=D_(4),I_=D_(5),F_=D_(6),P_=j_.range,Y_=N_.range,z_=B_.range,U_=L_.range,$_=R_.range,W_=I_.range,q_=F_.range,H_=Xb((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),V_=H_.range,G_=Xb((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));G_.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Xb((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var X_=G_.range;function Z_(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Q_(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function K_(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function J_(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,l=hw(i),u=dw(i),h=hw(a),d=dw(a),f=hw(o),p=dw(o),g=hw(s),y=dw(s),m=hw(c),v=dw(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Nw,e:Nw,f:Fw,g:Xw,G:Qw,H:Bw,I:Lw,j:Rw,L:Iw,m:Pw,M:Yw,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:_x,s:wx,S:zw,u:Uw,U:$w,V:qw,w:Hw,W:Vw,x:null,X:null,y:Gw,Y:Zw,Z:Kw,"%":bx},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Jw,e:Jw,f:ix,g:gx,G:mx,H:tx,I:ex,j:nx,L:rx,m:ax,M:ox,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:_x,s:wx,S:sx,u:cx,U:lx,V:hx,w:dx,W:fx,x:null,X:null,y:px,Y:yx,Z:vx,"%":bx},w={a:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return C(t,e,n,r)},d:kw,e:kw,f:Aw,g:bw,G:vw,H:Tw,I:Tw,j:Cw,L:Ow,m:xw,M:Ew,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:ww,Q:Dw,s:jw,S:Sw,u:pw,U:gw,V:yw,w:fw,W:mw,x:function(t,e,r){return C(t,n,e,r)},X:function(t,e,n){return C(t,r,e,n)},y:bw,Y:vw,Z:_w,"%":Mw};function x(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=aw[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function k(t,e){return function(n){var r,i,a=K_(1900,void 0,1);if(C(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Q_(K_(a.y,0,1))).getUTCDay(),r=i>4||0===i?N_.ceil(r):N_(r),r=A_.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Z_(K_(a.y,0,1))).getDay(),r=i>4||0===i?c_.ceil(r):c_(r),r=i_.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Q_(K_(a.y,0,1)).getUTCDay():Z_(K_(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Q_(a)):Z_(a)}}function C(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=w[i in aw?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),_.x=x(n,_),_.X=x(r,_),_.c=x(e,_),{format:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var tw,ew,nw,rw,iw,aw={"-":"",_:" ",0:"0"},ow=/^\s*\d+/,sw=/^%/,cw=/[\\^$*+?|[\]().{}]/g;function lw(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function uw(t){return t.replace(cw,"\\$&")}function hw(t){return new RegExp("^(?:"+t.map(uw).join("|")+")","i")}function dw(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function fw(t,e,n){var r=ow.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function pw(t,e,n){var r=ow.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function gw(t,e,n){var r=ow.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function yw(t,e,n){var r=ow.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function mw(t,e,n){var r=ow.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function vw(t,e,n){var r=ow.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function bw(t,e,n){var r=ow.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function _w(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ww(t,e,n){var r=ow.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function xw(t,e,n){var r=ow.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function kw(t,e,n){var r=ow.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Cw(t,e,n){var r=ow.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Tw(t,e,n){var r=ow.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ew(t,e,n){var r=ow.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Sw(t,e,n){var r=ow.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ow(t,e,n){var r=ow.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Aw(t,e,n){var r=ow.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Mw(t,e,n){var r=sw.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Dw(t,e,n){var r=ow.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jw(t,e,n){var r=ow.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Nw(t,e){return lw(t.getDate(),e,2)}function Bw(t,e){return lw(t.getHours(),e,2)}function Lw(t,e){return lw(t.getHours()%12||12,e,2)}function Rw(t,e){return lw(1+i_.count(k_(t),t),e,3)}function Iw(t,e){return lw(t.getMilliseconds(),e,3)}function Fw(t,e){return Iw(t,e)+"000"}function Pw(t,e){return lw(t.getMonth()+1,e,2)}function Yw(t,e){return lw(t.getMinutes(),e,2)}function zw(t,e){return lw(t.getSeconds(),e,2)}function Uw(t){var e=t.getDay();return 0===e?7:e}function $w(t,e){return lw(s_.count(k_(t)-1,t),e,2)}function Ww(t){var e=t.getDay();return e>=4||0===e?h_(t):h_.ceil(t)}function qw(t,e){return t=Ww(t),lw(h_.count(k_(t),t)+(4===k_(t).getDay()),e,2)}function Hw(t){return t.getDay()}function Vw(t,e){return lw(c_.count(k_(t)-1,t),e,2)}function Gw(t,e){return lw(t.getFullYear()%100,e,2)}function Xw(t,e){return lw((t=Ww(t)).getFullYear()%100,e,2)}function Zw(t,e){return lw(t.getFullYear()%1e4,e,4)}function Qw(t,e){var n=t.getDay();return lw((t=n>=4||0===n?h_(t):h_.ceil(t)).getFullYear()%1e4,e,4)}function Kw(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+lw(e/60|0,"0",2)+lw(e%60,"0",2)}function Jw(t,e){return lw(t.getUTCDate(),e,2)}function tx(t,e){return lw(t.getUTCHours(),e,2)}function ex(t,e){return lw(t.getUTCHours()%12||12,e,2)}function nx(t,e){return lw(1+A_.count(G_(t),t),e,3)}function rx(t,e){return lw(t.getUTCMilliseconds(),e,3)}function ix(t,e){return rx(t,e)+"000"}function ax(t,e){return lw(t.getUTCMonth()+1,e,2)}function ox(t,e){return lw(t.getUTCMinutes(),e,2)}function sx(t,e){return lw(t.getUTCSeconds(),e,2)}function cx(t){var e=t.getUTCDay();return 0===e?7:e}function lx(t,e){return lw(j_.count(G_(t)-1,t),e,2)}function ux(t){var e=t.getUTCDay();return e>=4||0===e?R_(t):R_.ceil(t)}function hx(t,e){return t=ux(t),lw(R_.count(G_(t),t)+(4===G_(t).getUTCDay()),e,2)}function dx(t){return t.getUTCDay()}function fx(t,e){return lw(N_.count(G_(t)-1,t),e,2)}function px(t,e){return lw(t.getUTCFullYear()%100,e,2)}function gx(t,e){return lw((t=ux(t)).getUTCFullYear()%100,e,2)}function yx(t,e){return lw(t.getUTCFullYear()%1e4,e,4)}function mx(t,e){var n=t.getUTCDay();return lw((t=n>=4||0===n?R_(t):R_.ceil(t)).getUTCFullYear()%1e4,e,4)}function vx(){return"+0000"}function bx(){return"%"}function _x(t){return+t}function wx(t){return Math.floor(+t/1e3)}function xx(t){return tw=J_(t),ew=tw.format,nw=tw.parse,rw=tw.utcFormat,iw=tw.utcParse,tw}xx({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var kx=Date.prototype.toISOString?function(t){return t.toISOString()}:rw("%Y-%m-%dT%H:%M:%S.%LZ");var Cx=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:iw("%Y-%m-%dT%H:%M:%S.%LZ");function Tx(t){return new Date(t)}function Ex(t){return t instanceof Date?+t:+new Date(+t)}function Sx(t,e,n,r,i,a,o,s,c){var l=Ob(wb,wb),u=l.invert,h=l.domain,d=c(".%L"),f=c(":%S"),p=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),m=c("%b %d"),v=c("%B"),b=c("%Y"),_=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function w(s){return(o(s)<s?d:a(s)<s?f:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?y:m:t(s)<s?v:b)(s)}function x(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var a=Math.abs(r-n)/e,o=wa((function(t){return t[2]})).right(_,a);o===_.length?(i=za(n/31536e6,r/31536e6,e),e=t):o?(i=(o=_[a/_[o-1][2]<_[o][2]/a?o-1:o])[1],e=o[0]):(i=Math.max(za(n,r,e),1),e=s)}return null==i?e:e.every(i)}return l.invert=function(t){return new Date(u(t))},l.domain=function(t){return arguments.length?h(fb.call(t,Ex)):h().map(Tx)},l.ticks=function(t,e){var n,r=h(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=x(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},l.tickFormat=function(t,e){return null==e?w:c(e)},l.nice=function(t,e){var n=h();return(t=x(t,n[0],n[n.length-1],e))?h(Db(n,t)):l},l.copy=function(){return Eb(l,Sx(t,e,n,r,i,a,o,s,c))},l}function Ox(){var t,e,n,r,i,a=0,o=1,s=wb,c=!1;function l(e){return isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,c?Math.max(0,Math.min(1,e)):e))}return l.domain=function(i){return arguments.length?(t=r(a=+i[0]),e=r(o=+i[1]),n=t===e?0:1/(e-t),l):[a,o]},l.clamp=function(t){return arguments.length?(c=!!t,l):c},l.interpolator=function(t){return arguments.length?(s=t,l):s},l.unknown=function(t){return arguments.length?(i=t,l):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),l}}function Ax(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Mx(){var t=qb(Ox());return t.copy=function(){return Ax(t,Mx()).exponent(t.exponent())},hb.apply(t,arguments)}function Dx(){var t,e,n,r,i,a,o,s=0,c=.5,l=1,u=wb,h=!1;function d(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(t<e?r:i),u(h?Math.max(0,Math.min(1,t)):t))}return d.domain=function(o){return arguments.length?(t=a(s=+o[0]),e=a(c=+o[1]),n=a(l=+o[2]),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),d):[s,c,l]},d.clamp=function(t){return arguments.length?(h=!!t,d):h},d.interpolator=function(t){return arguments.length?(u=t,d):u},d.unknown=function(t){return arguments.length?(o=t,d):o},function(o){return a=o,t=o(s),e=o(c),n=o(l),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),d}}function jx(){var t=qb(Dx());return t.copy=function(){return Ax(t,jx()).exponent(t.exponent())},hb.apply(t,arguments)}function Nx(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}var Bx=Nx("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Lx=Nx("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Rx=Nx("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Ix=Nx("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Fx=Nx("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Px=Nx("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Yx=Nx("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),zx=Nx("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Ux=Nx("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),$x=Nx("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Wx(t){return Kc(t[t.length-1])}var qx=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Nx),Hx=Wx(qx),Vx=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Nx),Gx=Wx(Vx),Xx=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Nx),Zx=Wx(Xx),Qx=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Nx),Kx=Wx(Qx),Jx=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Nx),tk=Wx(Jx),ek=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Nx),nk=Wx(ek),rk=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Nx),ik=Wx(rk),ak=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Nx),ok=Wx(ak),sk=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Nx),ck=Wx(sk),lk=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Nx),uk=Wx(lk),hk=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Nx),dk=Wx(hk),fk=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Nx),pk=Wx(fk),gk=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Nx),yk=Wx(gk),mk=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Nx),vk=Wx(mk),bk=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Nx),_k=Wx(bk),wk=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Nx),xk=Wx(wk),kk=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Nx),Ck=Wx(kk),Tk=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Nx),Ek=Wx(Tk),Sk=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Nx),Ok=Wx(Sk),Ak=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Nx),Mk=Wx(Ak),Dk=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Nx),jk=Wx(Dk),Nk=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Nx),Bk=Wx(Nk),Lk=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Nx),Rk=Wx(Lk),Ik=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Nx),Fk=Wx(Ik),Pk=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Nx),Yk=Wx(Pk),zk=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Nx),Uk=Wx(zk),$k=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Nx),Wk=Wx($k);var qk=jl(Yc(300,.5,0),Yc(-240,.5,1)),Hk=jl(Yc(-100,.75,.35),Yc(80,1.5,.8)),Vk=jl(Yc(260,.75,.35),Yc(80,1.5,.8)),Gk=Yc();var Xk=ac(),Zk=Math.PI/3,Qk=2*Math.PI/3;function Kk(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var Jk=Kk(Nx("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),tC=Kk(Nx("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),eC=Kk(Nx("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),nC=Kk(Nx("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function rC(t){return function(){return t}}var iC=Math.abs,aC=Math.atan2,oC=Math.cos,sC=Math.max,cC=Math.min,lC=Math.sin,uC=Math.sqrt,hC=Math.PI,dC=hC/2,fC=2*hC;function pC(t){return t>1?0:t<-1?hC:Math.acos(t)}function gC(t){return t>=1?dC:t<=-1?-dC:Math.asin(t)}function yC(t){return t.innerRadius}function mC(t){return t.outerRadius}function vC(t){return t.startAngle}function bC(t){return t.endAngle}function _C(t){return t&&t.padAngle}function wC(t,e,n,r,i,a,o,s){var c=n-t,l=r-e,u=o-i,h=s-a,d=h*c-u*l;if(!(d*d<1e-12))return[t+(d=(u*(e-a)-h*(t-i))/d)*c,e+d*l]}function xC(t,e,n,r,i,a,o){var s=t-n,c=e-r,l=(o?a:-a)/uC(s*s+c*c),u=l*c,h=-l*s,d=t+u,f=e+h,p=n+u,g=r+h,y=(d+p)/2,m=(f+g)/2,v=p-d,b=g-f,_=v*v+b*b,w=i-a,x=d*g-p*f,k=(b<0?-1:1)*uC(sC(0,w*w*_-x*x)),C=(x*b-v*k)/_,T=(-x*v-b*k)/_,E=(x*b+v*k)/_,S=(-x*v+b*k)/_,O=C-y,A=T-m,M=E-y,D=S-m;return O*O+A*A>M*M+D*D&&(C=E,T=S),{cx:C,cy:T,x01:-u,y01:-h,x11:C*(i/w-1),y11:T*(i/w-1)}}function kC(t){this._context=t}function CC(t){return new kC(t)}function TC(t){return t[0]}function EC(t){return t[1]}function SC(){var t=TC,e=EC,n=rC(!0),r=null,i=CC,a=null;function o(o){var s,c,l,u=o.length,h=!1;for(null==r&&(a=i(l=qh())),s=0;s<=u;++s)!(s<u&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(l)return a=null,l+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:rC(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:rC(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:rC(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function OC(){var t=TC,e=null,n=rC(0),r=EC,i=rC(!0),a=null,o=CC,s=null;function c(c){var l,u,h,d,f,p=c.length,g=!1,y=new Array(p),m=new Array(p);for(null==a&&(s=o(f=qh())),l=0;l<=p;++l){if(!(l<p&&i(d=c[l],l,c))===g)if(g=!g)u=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=l-1;h>=u;--h)s.point(y[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(y[l]=+t(d,l,c),m[l]=+n(d,l,c),s.point(e?+e(d,l,c):y[l],r?+r(d,l,c):m[l]))}if(f)return s=null,f+""||null}function l(){return SC().defined(i).curve(o).context(a)}return c.x=function(n){return arguments.length?(t="function"==typeof n?n:rC(+n),e=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:rC(+e),c):t},c.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:rC(+t),c):e},c.y=function(t){return arguments.length?(n="function"==typeof t?t:rC(+t),r=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:rC(+t),c):n},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:rC(+t),c):r},c.lineX0=c.lineY0=function(){return l().x(t).y(n)},c.lineY1=function(){return l().x(t).y(r)},c.lineX1=function(){return l().x(e).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:rC(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c}function AC(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function MC(t){return t}kC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var DC=NC(CC);function jC(t){this._curve=t}function NC(t){function e(e){return new jC(t(e))}return e._curve=t,e}function BC(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(NC(t)):e()._curve},t}function LC(){return BC(SC().curve(DC))}function RC(){var t=OC().curve(DC),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return BC(n())},delete t.lineX0,t.lineEndAngle=function(){return BC(r())},delete t.lineX1,t.lineInnerRadius=function(){return BC(i())},delete t.lineY0,t.lineOuterRadius=function(){return BC(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(NC(t)):e()._curve},t}function IC(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}jC.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var FC=Array.prototype.slice;function PC(t){return t.source}function YC(t){return t.target}function zC(t){var e=PC,n=YC,r=TC,i=EC,a=null;function o(){var o,s=FC.call(arguments),c=e.apply(this,s),l=n.apply(this,s);if(a||(a=o=qh()),t(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(n=t,o):n},o.x=function(t){return arguments.length?(r="function"==typeof t?t:rC(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:rC(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function UC(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function $C(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function WC(t,e,n,r,i){var a=IC(e,n),o=IC(e,n=(n+i)/2),s=IC(r,n),c=IC(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],c[0],c[1])}var qC={draw:function(t,e){var n=Math.sqrt(e/hC);t.moveTo(n,0),t.arc(0,0,n,0,fC)}},HC={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},VC=Math.sqrt(1/3),GC=2*VC,XC={draw:function(t,e){var n=Math.sqrt(e/GC),r=n*VC;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},ZC=Math.sin(hC/10)/Math.sin(7*hC/10),QC=Math.sin(fC/10)*ZC,KC=-Math.cos(fC/10)*ZC,JC={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=QC*n,i=KC*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=fC*a/5,s=Math.cos(o),c=Math.sin(o);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},tT={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},eT=Math.sqrt(3),nT={draw:function(t,e){var n=-Math.sqrt(e/(3*eT));t.moveTo(0,2*n),t.lineTo(-eT*n,-n),t.lineTo(eT*n,-n),t.closePath()}},rT=-.5,iT=Math.sqrt(3)/2,aT=1/Math.sqrt(12),oT=3*(aT/2+1),sT={draw:function(t,e){var n=Math.sqrt(e/oT),r=n/2,i=n*aT,a=r,o=n*aT+n,s=-a,c=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,c),t.lineTo(rT*r-iT*i,iT*r+rT*i),t.lineTo(rT*a-iT*o,iT*a+rT*o),t.lineTo(rT*s-iT*c,iT*s+rT*c),t.lineTo(rT*r+iT*i,rT*i-iT*r),t.lineTo(rT*a+iT*o,rT*o-iT*a),t.lineTo(rT*s+iT*c,rT*c-iT*s),t.closePath()}},cT=[qC,HC,XC,tT,JC,nT,sT];function lT(){}function uT(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function hT(t){this._context=t}function dT(t){this._context=t}function fT(t){this._context=t}function pT(t,e){this._basis=new hT(t),this._beta=e}hT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:uT(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:uT(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},dT.prototype={areaStart:lT,areaEnd:lT,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:uT(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},fT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:uT(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},pT.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var gT=function t(e){function n(t){return 1===e?new hT(t):new pT(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function yT(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function mT(t,e){this._context=t,this._k=(1-e)/6}mT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:yT(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:yT(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var vT=function t(e){function n(t){return new mT(t,e)}return n.tension=function(e){return t(+e)},n}(0);function bT(t,e){this._context=t,this._k=(1-e)/6}bT.prototype={areaStart:lT,areaEnd:lT,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:yT(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _T=function t(e){function n(t){return new bT(t,e)}return n.tension=function(e){return t(+e)},n}(0);function wT(t,e){this._context=t,this._k=(1-e)/6}wT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yT(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var xT=function t(e){function n(t){return new wT(t,e)}return n.tension=function(e){return t(+e)},n}(0);function kT(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function CT(t,e){this._context=t,this._alpha=e}CT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:kT(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var TT=function t(e){function n(t){return e?new CT(t,e):new mT(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ET(t,e){this._context=t,this._alpha=e}ET.prototype={areaStart:lT,areaEnd:lT,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:kT(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ST=function t(e){function n(t){return e?new ET(t,e):new bT(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function OT(t,e){this._context=t,this._alpha=e}OT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:kT(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var AT=function t(e){function n(t){return e?new OT(t,e):new wT(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function MT(t){this._context=t}function DT(t){return t<0?-1:1}function jT(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(DT(a)+DT(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function NT(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function BT(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function LT(t){this._context=t}function RT(t){this._context=new IT(t)}function IT(t){this._context=t}function FT(t){this._context=t}function PT(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function YT(t,e){this._context=t,this._t=e}function zT(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function UT(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function $T(t,e){return t[e]}function WT(t){var e=t.map(qT);return UT(t).sort((function(t,n){return e[t]-e[n]}))}function qT(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++n<i;)(e=+t[n][1])>a&&(a=e,r=n);return r}function HT(t){var e=t.map(VT);return UT(t).sort((function(t,n){return e[t]-e[n]}))}function VT(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}function GT(t){return function(){return t}}function XT(t){return t[0]}function ZT(t){return t[1]}function QT(){this._=null}function KT(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function JT(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function tE(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function eE(t){for(;t.L;)t=t.L;return t}function nE(t,e,n,r){var i=[null,null],a=EE.push(i)-1;return i.left=t,i.right=e,n&&iE(i,t,e,n),r&&iE(i,e,t,r),CE[t.index].halfedges.push(a),CE[e.index].halfedges.push(a),i}function rE(t,e,n){var r=[e,n];return r.left=t,r}function iE(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function aE(t,e,n,r,i){var a,o=t[0],s=t[1],c=o[0],l=o[1],u=0,h=1,d=s[0]-c,f=s[1]-l;if(a=e-c,d||!(a>0)){if(a/=d,d<0){if(a<u)return;a<h&&(h=a)}else if(d>0){if(a>h)return;a>u&&(u=a)}if(a=r-c,d||!(a<0)){if(a/=d,d<0){if(a>h)return;a>u&&(u=a)}else if(d>0){if(a<u)return;a<h&&(h=a)}if(a=n-l,f||!(a>0)){if(a/=f,f<0){if(a<u)return;a<h&&(h=a)}else if(f>0){if(a>h)return;a>u&&(u=a)}if(a=i-l,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>u&&(u=a)}else if(f>0){if(a<u)return;a<h&&(h=a)}return!(u>0||h<1)||(u>0&&(t[0]=[c+u*d,l+u*f]),h<1&&(t[1]=[c+h*d,l+h*f]),!0)}}}}}function oE(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,c=t[0],l=t.left,u=t.right,h=l[0],d=l[1],f=u[0],p=u[1],g=(h+f)/2,y=(d+p)/2;if(p===d){if(g<e||g>=r)return;if(h>f){if(c){if(c[1]>=i)return}else c=[g,n];a=[g,i]}else{if(c){if(c[1]<n)return}else c=[g,i];a=[g,n]}}else if(s=y-(o=(h-f)/(p-d))*g,o<-1||o>1)if(h>f){if(c){if(c[1]>=i)return}else c=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(c){if(c[1]<n)return}else c=[(i-s)/o,i];a=[(n-s)/o,n]}else if(d<p){if(c){if(c[0]>=r)return}else c=[e,o*e+s];a=[r,o*r+s]}else{if(c){if(c[0]<e)return}else c=[r,o*r+s];a=[e,o*e+s]}return t[0]=c,t[1]=a,!0}function sE(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function cE(t,e){return e[+(e.left!==t.site)]}function lE(t,e){return e[+(e.left===t.site)]}MT.prototype={areaStart:lT,areaEnd:lT,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},LT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:BT(this,this._t0,NT(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,BT(this,NT(this,n=jT(this,t,e)),n);break;default:BT(this,this._t0,n=jT(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(RT.prototype=Object.create(LT.prototype)).point=function(t,e){LT.prototype.point.call(this,e,t)},IT.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},FT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=PT(t),i=PT(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},YT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},QT.prototype={constructor:QT,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=eE(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(JT(this,n),n=(t=n).U),n.C=!1,r.C=!0,tE(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(tE(this,n),n=(t=n).U),n.C=!1,r.C=!0,JT(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?eE(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,JT(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,tE(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,JT(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,tE(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,JT(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,tE(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var uE,hE=[];function dE(){KT(this),this.x=this.y=this.arc=this.site=this.cy=null}function fE(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],s=i[1],c=r[0]-o,l=r[1]-s,u=a[0]-o,h=a[1]-s,d=2*(c*h-l*u);if(!(d>=-OE)){var f=c*c+l*l,p=u*u+h*h,g=(h*f-l*p)/d,y=(c*p-u*f)/d,m=hE.pop()||new dE;m.arc=t,m.site=i,m.x=g+o,m.y=(m.cy=y+s)+Math.sqrt(g*g+y*y),t.circle=m;for(var v=null,b=TE._;b;)if(m.y<b.y||m.y===b.y&&m.x<=b.x){if(!b.L){v=b.P;break}b=b.L}else{if(!b.R){v=b;break}b=b.R}TE.insert(v,m),v||(uE=m)}}}}function pE(t){var e=t.circle;e&&(e.P||(uE=e.N),TE.remove(e),hE.push(e),KT(e),t.circle=null)}var gE=[];function yE(){KT(this),this.edge=this.site=this.circle=null}function mE(t){var e=gE.pop()||new yE;return e.site=t,e}function vE(t){pE(t),kE.remove(t),gE.push(t),KT(t)}function bE(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,s=[t];vE(t);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<SE&&Math.abs(r-c.circle.cy)<SE;)a=c.P,s.unshift(c),vE(c),c=a;s.unshift(c),pE(c);for(var l=o;l.circle&&Math.abs(n-l.circle.x)<SE&&Math.abs(r-l.circle.cy)<SE;)o=l.N,s.push(l),vE(l),l=o;s.push(l),pE(l);var u,h=s.length;for(u=1;u<h;++u)l=s[u],c=s[u-1],iE(l.edge,c.site,l.site,i);c=s[0],(l=s[h-1]).edge=nE(c.site,l.site,null,i),fE(c),fE(l)}function _E(t){for(var e,n,r,i,a=t[0],o=t[1],s=kE._;s;)if((r=wE(s,o)-a)>SE)s=s.L;else{if(!((i=a-xE(s,o))>SE)){r>-SE?(e=s.P,n=s):i>-SE?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){CE[t.index]={site:t,halfedges:[]}}(t);var c=mE(t);if(kE.insert(e,c),e||n){if(e===n)return pE(e),n=mE(e.site),kE.insert(c,n),c.edge=n.edge=nE(e.site,c.site),fE(e),void fE(n);if(n){pE(e),pE(n);var l=e.site,u=l[0],h=l[1],d=t[0]-u,f=t[1]-h,p=n.site,g=p[0]-u,y=p[1]-h,m=2*(d*y-f*g),v=d*d+f*f,b=g*g+y*y,_=[(y*v-f*b)/m+u,(d*b-g*v)/m+h];iE(n.edge,l,p,_),c.edge=nE(l,t,null,_),n.edge=nE(t,p,null,_),fE(e),fE(n)}else c.edge=nE(e.site,c.site)}}function wE(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var s=(n=o.site)[0],c=n[1],l=c-e;if(!l)return s;var u=s-r,h=1/a-1/l,d=u/l;return h?(-d+Math.sqrt(d*d-2*h*(u*u/(-2*l)-c+l/2+i-a/2)))/h+r:(r+s)/2}function xE(t,e){var n=t.N;if(n)return wE(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var kE,CE,TE,EE,SE=1e-6,OE=1e-12;function AE(t,e){return e[1]-t[1]||e[0]-t[0]}function ME(t,e){var n,r,i,a=t.sort(AE).pop();for(EE=[],CE=new Array(t.length),kE=new QT,TE=new QT;;)if(i=uE,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(_E(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;bE(i.arc)}if(function(){for(var t,e,n,r,i=0,a=CE.length;i<a;++i)if((t=CE[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),s=new Array(r);for(n=0;n<r;++n)o[n]=n,s[n]=sE(t,EE[e[n]]);for(o.sort((function(t,e){return s[e]-s[t]})),n=0;n<r;++n)s[n]=e[o[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var o=+e[0][0],s=+e[0][1],c=+e[1][0],l=+e[1][1];!function(t,e,n,r){for(var i,a=EE.length;a--;)oE(i=EE[a],t,e,n,r)&&aE(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>SE||Math.abs(i[0][1]-i[1][1])>SE)||delete EE[a]}(o,s,c,l),function(t,e,n,r){var i,a,o,s,c,l,u,h,d,f,p,g,y=CE.length,m=!0;for(i=0;i<y;++i)if(a=CE[i]){for(o=a.site,s=(c=a.halfedges).length;s--;)EE[c[s]]||c.splice(s,1);for(s=0,l=c.length;s<l;)p=(f=lE(a,EE[c[s]]))[0],g=f[1],h=(u=cE(a,EE[c[++s%l]]))[0],d=u[1],(Math.abs(p-h)>SE||Math.abs(g-d)>SE)&&(c.splice(s,0,EE.push(rE(o,f,Math.abs(p-t)<SE&&r-g>SE?[t,Math.abs(h-t)<SE?d:r]:Math.abs(g-r)<SE&&n-p>SE?[Math.abs(d-r)<SE?h:n,r]:Math.abs(p-n)<SE&&g-e>SE?[n,Math.abs(h-n)<SE?d:e]:Math.abs(g-e)<SE&&p-t>SE?[Math.abs(d-e)<SE?h:t,e]:null))-1),++l);l&&(m=!1)}if(m){var v,b,_,w=1/0;for(i=0,m=null;i<y;++i)(a=CE[i])&&(_=(v=(o=a.site)[0]-t)*v+(b=o[1]-e)*b)<w&&(w=_,m=a);if(m){var x=[t,e],k=[t,r],C=[n,r],T=[n,e];m.halfedges.push(EE.push(rE(o=m.site,x,k))-1,EE.push(rE(o,k,C))-1,EE.push(rE(o,C,T))-1,EE.push(rE(o,T,x))-1)}}for(i=0;i<y;++i)(a=CE[i])&&(a.halfedges.length||delete CE[i])}(o,s,c,l)}this.edges=EE,this.cells=CE,kE=TE=EE=CE=null}function DE(t){return function(){return t}}function jE(t,e,n){this.target=t,this.type=e,this.transform=n}function NE(t,e,n){this.k=t,this.x=e,this.y=n}ME.prototype={constructor:ME,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return cE(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,s,c,l,u=n.site,h=-1,d=e[i[a-1]],f=d.left===u?d.right:d.left;++h<a;)o=f,f=(d=e[i[h]]).left===u?d.right:d.left,o&&f&&r<o.index&&r<f.index&&(c=o,l=f,((s=u)[0]-l[0])*(c[1]-s[1])-(s[0]-c[0])*(l[1]-s[1])<0)&&t.push([u.data,o.data,f.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,s=a.cells.length;!(i=a.cells[o]);)if(++o>=s)return null;var c=t-i.site[0],l=e-i.site[1],u=c*c+l*l;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var c=t-s[0],l=e-s[1],h=c*c+l*l;h<u&&(u=h,o=s.index)}}))}while(null!==o);return a._found=r,null==n||u<=n*n?i.site:null}},NE.prototype={constructor:NE,scale:function(t){return 1===t?this:new NE(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new NE(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var BE=new NE(1,0,0);function LE(t){for(;!t.__zoom;)if(!(t=t.parentNode))return BE;return t.__zoom}function RE(){ss.stopImmediatePropagation()}function IE(){ss.preventDefault(),ss.stopImmediatePropagation()}function FE(){return!ss.ctrlKey&&!ss.button}function PE(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function YE(){return this.__zoom||BE}function zE(){return-ss.deltaY*(1===ss.deltaMode?.05:ss.deltaMode?1:.002)}function UE(){return navigator.maxTouchPoints||"ontouchstart"in this}function $E(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}LE.prototype=NE.prototype;var WE=fa(Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",version:"5.16.0",bisect:ka,bisectRight:ka,bisectLeft:Ca,ascending:_a,bisector:wa,cross:function(t,e,n){var r,i,a,o,s=t.length,c=e.length,l=new Array(s*c);for(null==n&&(n=Ta),r=a=0;r<s;++r)for(o=t[r],i=0;i<c;++i,++a)l[a]=n(o,e[i]);return l},descending:function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},deviation:Oa,extent:Aa,histogram:function(){var t=Ba,e=Aa,n=Ua;function r(r){var i,a,o=r.length,s=new Array(o);for(i=0;i<o;++i)s[i]=t(r[i],i,r);var c=e(s),l=c[0],u=c[1],h=n(s,l,u);Array.isArray(h)||(h=za(l,u,h),h=La(Math.ceil(l/h)*h,u,h));for(var d=h.length;h[0]<=l;)h.shift(),--d;for(;h[d-1]>u;)h.pop(),--d;var f,p=new Array(d+1);for(i=0;i<=d;++i)(f=p[i]=[]).x0=i>0?h[i-1]:l,f.x1=i<d?h[i]:u;for(i=0;i<o;++i)l<=(a=s[i])&&a<=u&&p[ka(h,a,0,d)].push(r[i]);return p}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:Na(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:Na([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Na(Da.call(t)):Na(t),r):n},r},thresholdFreedmanDiaconis:function(t,e,n){return t=ja.call(t,Ea).sort(_a),Math.ceil((n-e)/(2*($a(t,.75)-$a(t,.25))*Math.pow(t.length,-1/3)))},thresholdScott:function(t,e,n){return Math.ceil((n-e)/(3.5*Oa(t)*Math.pow(t.length,-1/3)))},thresholdSturges:Ua,max:Wa,mean:function(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a<r;)isNaN(n=Ea(t[a]))?--i:o+=n;else for(;++a<r;)isNaN(n=Ea(e(t[a],a,t)))?--i:o+=n;if(i)return o/i},median:function(t,e){var n,r=t.length,i=-1,a=[];if(null==e)for(;++i<r;)isNaN(n=Ea(t[i]))||a.push(n);else for(;++i<r;)isNaN(n=Ea(e(t[i],i,t)))||a.push(n);return $a(a.sort(_a),.5)},merge:qa,min:Ha,pairs:function(t,e){null==e&&(e=Ta);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return a},permute:function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},quantile:$a,range:La,scan:function(t,e){if(n=t.length){var n,r,i=0,a=0,o=t[a];for(null==e&&(e=_a);++i<n;)(e(r=t[i],o)<0||0!==e(o,o))&&(o=r,a=i);return 0===e(o,o)?a:void 0}},shuffle:function(t,e,n){for(var r,i,a=(null==n?t.length:n)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,r=t[a+e],t[a+e]=t[i+e],t[i+e]=r;return t},sum:function(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a},ticks:Pa,tickIncrement:Ya,tickStep:za,transpose:Va,variance:Sa,zip:function(){return Va(arguments)},axisTop:function(t){return no(1,t)},axisRight:function(t){return no(2,t)},axisBottom:function(t){return no(3,t)},axisLeft:function(t){return no(4,t)},brush:function(){return Dh(bh)},brushX:function(){return Dh(mh)},brushY:function(){return Dh(vh)},brushSelection:function(t){var e=t.__brush;return e?e.dim.output(e.selection):null},chord:function(){var t=0,e=null,n=null,r=null;function i(i){var a,o,s,c,l,u,h=i.length,d=[],f=La(h),p=[],g=[],y=g.groups=new Array(h),m=new Array(h*h);for(a=0,l=-1;++l<h;){for(o=0,u=-1;++u<h;)o+=i[l][u];d.push(o),p.push(La(h)),a+=o}for(e&&f.sort((function(t,n){return e(d[t],d[n])})),n&&p.forEach((function(t,e){t.sort((function(t,r){return n(i[e][t],i[e][r])}))})),c=(a=Ih(0,Rh-t*h)/a)?t:Rh/h,o=0,l=-1;++l<h;){for(s=o,u=-1;++u<h;){var v=f[l],b=p[v][u],_=i[v][b],w=o,x=o+=_*a;m[b*h+v]={index:v,subindex:b,startAngle:w,endAngle:x,value:_}}y[v]={index:v,startAngle:s,endAngle:o,value:d[v]},o+=c}for(l=-1;++l<h;)for(u=l-1;++u<h;){var k=m[u*h+l],C=m[l*h+u];(k.value||C.value)&&g.push(k.value<C.value?{source:C,target:k}:{source:k,target:C})}return r?g.sort(r):g}return i.padAngle=function(e){return arguments.length?(t=Ih(0,e),i):t},i.sortGroups=function(t){return arguments.length?(e=t,i):e},i.sortSubgroups=function(t){return arguments.length?(n=t,i):n},i.sortChords=function(t){return arguments.length?(null==t?r=null:(r=Fh(t))._=t,i):r&&r._},i},ribbon:function(){var t=Hh,e=Vh,n=Gh,r=Xh,i=Zh,a=null;function o(){var o,s=Ph.call(arguments),c=t.apply(this,s),l=e.apply(this,s),u=+n.apply(this,(s[0]=c,s)),h=r.apply(this,s)-Lh,d=i.apply(this,s)-Lh,f=u*jh(h),p=u*Nh(h),g=+n.apply(this,(s[0]=l,s)),y=r.apply(this,s)-Lh,m=i.apply(this,s)-Lh;if(a||(a=o=qh()),a.moveTo(f,p),a.arc(0,0,u,h,d),h===y&&d===m||(a.quadraticCurveTo(0,0,g*jh(y),g*Nh(y)),a.arc(0,0,g,y,m)),a.quadraticCurveTo(0,0,f,p),a.closePath(),o)return a=null,o+""||null}return o.radius=function(t){return arguments.length?(n="function"==typeof t?t:Yh(+t),o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Yh(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Yh(+t),o):i},o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(t){return arguments.length?(e=t,o):e},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o},nest:function(){var t,e,n,r=[],i=[];function a(n,i,o,s){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,l,u,h=-1,d=n.length,f=r[i++],p=Kh(),g=o();++h<d;)(u=p.get(c=f(l=n[h])+""))?u.push(l):p.set(c,[l]);return p.each((function(t,e){s(g,e,a(t,i,o,s))})),g}function o(t,n){if(++n>r.length)return t;var a,s=i[n-1];return null!=e&&n>=r.length?a=t.entries():(a=[],t.each((function(t,e){a.push({key:e,values:o(t,n)})}))),null!=s?a.sort((function(t,e){return s(t.key,e.key)})):a}return n={object:function(t){return a(t,0,Jh,td)},map:function(t){return a(t,0,ed,nd)},entries:function(t){return o(a(t,0,ed,nd),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}},set:ad,map:Kh,keys:function(t){var e=[];for(var n in t)e.push(n);return e},values:function(t){var e=[];for(var n in t)e.push(t[n]);return e},entries:function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},color:ec,rgb:ac,hsl:dc,lab:wc,hcl:Oc,lch:function(t,e,n,r){return 1===arguments.length?Sc(t):new Ac(n,e,t,null==r?1:r)},gray:function(t,e){return new xc(t,0,0,null==e?1:e)},cubehelix:Yc,contours:pd,contourDensity:function(){var t=md,e=vd,n=bd,r=960,i=500,a=20,o=2,s=3*a,c=r+2*s>>o,l=i+2*s>>o,u=cd(20);function h(r){var i=new Float32Array(c*l),h=new Float32Array(c*l);r.forEach((function(r,a,u){var h=+t(r,a,u)+s>>o,d=+e(r,a,u)+s>>o,f=+n(r,a,u);h>=0&&h<c&&d>=0&&d<l&&(i[h+d*c]+=f)})),gd({width:c,height:l,data:i},{width:c,height:l,data:h},a>>o),yd({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o),gd({width:c,height:l,data:i},{width:c,height:l,data:h},a>>o),yd({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o),gd({width:c,height:l,data:i},{width:c,height:l,data:h},a>>o),yd({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o);var f=u(i);if(!Array.isArray(f)){var p=Wa(i);f=za(0,p,f),(f=La(0,Math.floor(p/f)*f,f)).shift()}return pd().thresholds(f).size([c,l])(i).map(d)}function d(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(f),t}function f(t){t.forEach(p)}function p(t){t.forEach(g)}function g(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function y(){return c=r+2*(s=3*a)>>o,l=i+2*s>>o,h}return h.x=function(e){return arguments.length?(t="function"==typeof e?e:cd(+e),h):t},h.y=function(t){return arguments.length?(e="function"==typeof t?t:cd(+t),h):e},h.weight=function(t){return arguments.length?(n="function"==typeof t?t:cd(+t),h):n},h.size=function(t){if(!arguments.length)return[r,i];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return r=e,i=n,y()},h.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),y()},h.thresholds=function(t){return arguments.length?(u="function"==typeof t?t:Array.isArray(t)?cd(od.call(t)):cd(t),h):u},h.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return a=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},h},dispatch:io,drag:function(){var t,e,n,r,i=Bs,a=Ls,o=Rs,s=Is,c={},l=io("start","drag","end"),u=0,h=0;function d(t){t.on("mousedown.drag",f).filter(s).on("touchstart.drag",y).on("touchmove.drag",m).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(){if(!r&&i.apply(this,arguments)){var o=b("mouse",a.apply(this,arguments),Es,this,arguments);o&&(_s(ss.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),Ms(ss.view),Os(),n=!1,t=ss.clientX,e=ss.clientY,o("start"))}}function p(){if(As(),!n){var r=ss.clientX-t,i=ss.clientY-e;n=r*r+i*i>h}c.mouse("drag")}function g(){_s(ss.view).on("mousemove.drag mouseup.drag",null),Ds(ss.view,n),As(),c.mouse("end")}function y(){if(i.apply(this,arguments)){var t,e,n=ss.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=b(n[t].identifier,r,Ss,this,arguments))&&(Os(),e("start"))}}function m(){var t,e,n=ss.changedTouches,r=n.length;for(t=0;t<r;++t)(e=c[n[t].identifier])&&(As(),e("drag"))}function v(){var t,e,n=ss.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=c[n[t].identifier])&&(Os(),e("end"))}function b(t,e,n,r,i){var a,s,h,f=n(e,t),p=l.copy();if(fs(new Ns(d,"beforestart",a,t,u,f[0],f[1],0,0,p),(function(){return null!=(ss.subject=a=o.apply(r,i))&&(s=a.x-f[0]||0,h=a.y-f[1]||0,!0)})))return function o(l){var g,y=f;switch(l){case"start":c[t]=o,g=u++;break;case"end":delete c[t],--u;case"drag":f=n(e,t),g=u}fs(new Ns(d,l,a,t,g,f[0]+s,f[1]+h,f[0]-y[0],f[1]-y[1],p),p.apply,p,[l,r,i])}}return d.filter=function(t){return arguments.length?(i="function"==typeof t?t:js(!!t),d):i},d.container=function(t){return arguments.length?(a="function"==typeof t?t:js(t),d):a},d.subject=function(t){return arguments.length?(o="function"==typeof t?t:js(t),d):o},d.touchable=function(t){return arguments.length?(s="function"==typeof t?t:js(!!t),d):s},d.on=function(){var t=l.on.apply(l,arguments);return t===l?d:t},d.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,d):Math.sqrt(h)},d},dragDisable:Ms,dragEnable:Ds,dsvFormat:Ed,csvParse:Od,csvParseRows:Ad,csvFormat:Md,csvFormatBody:Dd,csvFormatRows:jd,csvFormatRow:Nd,csvFormatValue:Bd,tsvParse:Rd,tsvParseRows:Id,tsvFormat:Fd,tsvFormatBody:Pd,tsvFormatRows:Yd,tsvFormatRow:zd,tsvFormatValue:Ud,autoType:function(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;$d&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t},easeLinear:function(t){return+t},easeQuad:Ru,easeQuadIn:function(t){return t*t},easeQuadOut:function(t){return t*(2-t)},easeQuadInOut:Ru,easeCubic:Iu,easeCubicIn:function(t){return t*t*t},easeCubicOut:function(t){return--t*t*t+1},easeCubicInOut:Iu,easePoly:Yu,easePolyIn:Fu,easePolyOut:Pu,easePolyInOut:Yu,easeSin:$u,easeSinIn:function(t){return 1==+t?1:1-Math.cos(t*Uu)},easeSinOut:function(t){return Math.sin(t*Uu)},easeSinInOut:$u,easeExp:qu,easeExpIn:function(t){return Wu(1-+t)},easeExpOut:function(t){return 1-Wu(t)},easeExpInOut:qu,easeCircle:Hu,easeCircleIn:function(t){return 1-Math.sqrt(1-t*t)},easeCircleOut:function(t){return Math.sqrt(1- --t*t)},easeCircleInOut:Hu,easeBounce:Xu,easeBounceIn:function(t){return 1-Xu(1-t)},easeBounceOut:Xu,easeBounceInOut:function(t){return((t*=2)<=1?1-Xu(1-t):Xu(t-1)+1)/2},easeBack:Ku,easeBackIn:Zu,easeBackOut:Qu,easeBackInOut:Ku,easeElastic:eh,easeElasticIn:th,easeElasticOut:eh,easeElasticInOut:nh,blob:function(t,e){return fetch(t,e).then(Wd)},buffer:function(t,e){return fetch(t,e).then(qd)},dsv:function(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=Ed(t);return Vd(e,n).then((function(t){return i.parse(t,r)}))},csv:Xd,tsv:Zd,image:function(t,e){return new Promise((function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t}))},json:function(t,e){return fetch(t,e).then(Qd)},text:Vd,xml:Jd,html:tf,svg:ef,forceCenter:function(t,e){var n;function r(){var r,i,a=n.length,o=0,s=0;for(r=0;r<a;++r)o+=(i=n[r]).x,s+=i.y;for(o=o/a-t,s=s/a-e,r=0;r<a;++r)(i=n[r]).x-=o,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r},forceCollide:function(t){var e,n,r=1,i=1;function a(){for(var t,a,s,c,l,u,h,d=e.length,f=0;f<i;++f)for(a=lf(e,ff,pf).visitAfter(o),t=0;t<d;++t)s=e[t],u=n[s.index],h=u*u,c=s.x+s.vx,l=s.y+s.vy,a.visit(p);function p(t,e,n,i,a){var o=t.data,d=t.r,f=u+d;if(!o)return e>c+f||i<c-f||n>l+f||a<l-f;if(o.index>s.index){var p=c-o.x-o.vx,g=l-o.y-o.vy,y=p*p+g*g;y<f*f&&(0===p&&(y+=(p=rf())*p),0===g&&(y+=(g=rf())*g),y=(f-(y=Math.sqrt(y)))/y*r,s.vx+=(p*=y)*(f=(d*=d)/(h+d)),s.vy+=(g*=y)*f,o.vx-=p*(f=1-f),o.vy-=g*f)}}}function o(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function s(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=nf(null==t?1:+t)),a.initialize=function(t){e=t,s()},a.iterations=function(t){return arguments.length?(i=+t,a):i},a.strength=function(t){return arguments.length?(r=+t,a):r},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:nf(+e),s(),a):t},a},forceLink:function(t){var e,n,r,i,a,o=gf,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=nf(30),l=1;function u(r){for(var i=0,o=t.length;i<l;++i)for(var s,c,u,h,d,f,p,g=0;g<o;++g)c=(s=t[g]).source,h=(u=s.target).x+u.vx-c.x-c.vx||rf(),d=u.y+u.vy-c.y-c.vy||rf(),h*=f=((f=Math.sqrt(h*h+d*d))-n[g])/f*r*e[g],d*=f,u.vx-=h*(p=a[g]),u.vy-=d*p,c.vx+=h*(p=1-p),c.vy+=d*p}function h(){if(r){var s,c,l=r.length,u=t.length,h=Kh(r,o);for(s=0,i=new Array(l);s<u;++s)(c=t[s]).index=s,"object"!=typeof c.source&&(c.source=yf(h,c.source)),"object"!=typeof c.target&&(c.target=yf(h,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(s=0,a=new Array(u);s<u;++s)c=t[s],a[s]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);e=new Array(u),d(),n=new Array(u),f()}}function d(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function f(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+c(t[e],e,t)}return null==t&&(t=[]),u.initialize=function(t){r=t,h()},u.links=function(e){return arguments.length?(t=e,h(),u):t},u.id=function(t){return arguments.length?(o=t,u):o},u.iterations=function(t){return arguments.length?(l=+t,u):l},u.strength=function(t){return arguments.length?(s="function"==typeof t?t:nf(+t),d(),u):s},u.distance=function(t){return arguments.length?(c="function"==typeof t?t:nf(+t),f(),u):c},u},forceManyBody:function(){var t,e,n,r,i=nf(-30),a=1,o=1/0,s=.81;function c(r){var i,a=t.length,o=lf(t,mf,vf).visitAfter(u);for(n=r,i=0;i<a;++i)e=t[i],o.visit(h)}function l(){if(t){var e,n,a=t.length;for(r=new Array(a),e=0;e<a;++e)n=t[e],r[n.index]=+i(n,e,t)}}function u(t){var e,n,i,a,o,s=0,c=0;if(t.length){for(i=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,c+=n,i+=n*e.x,a+=n*e.y);t.x=i/c,t.y=a/c}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=r[e.data.index]}while(e=e.next)}t.value=s}function h(t,i,c,l){if(!t.value)return!0;var u=t.x-e.x,h=t.y-e.y,d=l-i,f=u*u+h*h;if(d*d/s<f)return f<o&&(0===u&&(f+=(u=rf())*u),0===h&&(f+=(h=rf())*h),f<a&&(f=Math.sqrt(a*f)),e.vx+=u*t.value*n/f,e.vy+=h*t.value*n/f),!0;if(!(t.length||f>=o)){(t.data!==e||t.next)&&(0===u&&(f+=(u=rf())*u),0===h&&(f+=(h=rf())*h),f<a&&(f=Math.sqrt(a*f)));do{t.data!==e&&(d=r[t.data.index]*n/f,e.vx+=u*d,e.vy+=h*d)}while(t=t.next)}}return c.initialize=function(e){t=e,l()},c.strength=function(t){return arguments.length?(i="function"==typeof t?t:nf(+t),l(),c):i},c.distanceMin=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c.distanceMax=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.theta=function(t){return arguments.length?(s=t*t,c):Math.sqrt(s)},c},forceRadial:function(t,e,n){var r,i,a,o=nf(.1);function s(t){for(var o=0,s=r.length;o<s;++o){var c=r[o],l=c.x-e||1e-6,u=c.y-n||1e-6,h=Math.sqrt(l*l+u*u),d=(a[o]-h)*i[o]*t/h;c.vx+=l*d,c.vy+=u*d}}function c(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+o(r[e],e,r)}}return"function"!=typeof t&&(t=nf(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,c()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:nf(+t),c(),s):o},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:nf(+e),c(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s},forceSimulation:function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=Kh(),c=Hl(u),l=io("tick","end");function u(){h(),l.call("tick",e),n<r&&(c.stop(),l.call("end",e))}function h(r){var c,l,u=t.length;void 0===r&&(r=1);for(var h=0;h<r;++h)for(n+=(a-n)*i,s.each((function(t){t(n)})),c=0;c<u;++c)null==(l=t[c]).fx?l.x+=l.vx*=o:(l.x=l.fx,l.vx=0),null==l.fy?l.y+=l.vy*=o:(l.y=l.fy,l.vy=0);return e}function d(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(n),a=n*bf;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function f(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),d(),e={tick:h,restart:function(){return c.restart(u),e},stop:function(){return c.stop(),e},nodes:function(n){return arguments.length?(t=n,d(),s.each(f),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},force:function(t,n){return arguments.length>1?(null==n?s.remove(t):s.set(t,f(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,c,l=0,u=t.length;for(null==r?r=1/0:r*=r,l=0;l<u;++l)(o=(i=e-(s=t[l]).x)*i+(a=n-s.y)*a)<r&&(c=s,r=o);return c},on:function(t,n){return arguments.length>1?(l.on(t,n),e):l.on(t)}}},forceX:function(t){var e,n,r,i=nf(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=nf(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:nf(+t),o(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:nf(+e),o(),a):t},a},forceY:function(t){var e,n,r,i=nf(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=nf(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:nf(+t),o(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:nf(+e),o(),a):t},a},formatDefaultLocale:Lf,get format(){return Mf},get formatPrefix(){return Df},formatLocale:Bf,formatSpecifier:Cf,FormatSpecifier:Tf,precisionFixed:Rf,precisionPrefix:If,precisionRound:Ff,geoArea:function(t){return kp.reset(),yp(t,Cp),2*kp},geoBounds:function(t){var e,n,r,i,a,o,s;if(Pp=Fp=-(Rp=Ip=1/0),Wp=[],yp(t,lg),n=Wp.length){for(Wp.sort(vg),e=1,a=[r=Wp[0]];e<n;++e)bg(r,(i=Wp[e])[0])||bg(r,i[1])?(mg(r[0],i[1])>mg(r[0],r[1])&&(r[1]=i[1]),mg(i[0],r[1])>mg(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=mg(r[1],i[0]))>o&&(o=s,Rp=i[0],Fp=r[1])}return Wp=qp=null,Rp===1/0||Ip===1/0?[[NaN,NaN],[NaN,NaN]]:[[Rp,Ip],[Fp,Pp]]},geoCentroid:function(t){Hp=Vp=Gp=Xp=Zp=Qp=Kp=Jp=tg=eg=ng=0,yp(t,_g);var e=tg,n=eg,r=ng,i=e*e+n*n+r*r;return i<1e-12&&(e=Qp,n=Kp,r=Jp,Vp<1e-6&&(e=Gp,n=Xp,r=Zp),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[Qf(n,e)*Vf,cp(r/ap(i))*Vf]},geoCircle:function(){var t,e,n=Dg([0,0]),r=Dg(90),i=Dg(6),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=Vf,n[1]*=Vf}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*Gf,c=i.apply(this,arguments)*Gf;return t=[],e=Bg(-o[0]*Gf,-o[1]*Gf,0).invert,Pg(a,s,c,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n="function"==typeof t?t:Dg([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:Dg(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:Dg(+t),o):i},o},geoClipAntimeridian:Kg,geoClipCircle:Jg,geoClipExtent:function(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=ty(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}},geoClipRectangle:ty,geoContains:function(t,e){return(t&&fy.hasOwnProperty(t.type)?fy[t.type]:gy)(t,e)},geoDistance:dy,geoGraticule:ky,geoGraticule10:function(){return ky()()},geoInterpolate:function(t,e){var n=t[0]*Gf,r=t[1]*Gf,i=e[0]*Gf,a=e[1]*Gf,o=Kf(r),s=rp(r),c=Kf(a),l=rp(a),u=o*Kf(n),h=o*rp(n),d=c*Kf(i),f=c*rp(i),p=2*cp(ap(lp(a-r)+o*c*lp(i-n))),g=rp(p),y=p?function(t){var e=rp(t*=p)/g,n=rp(p-t)/g,r=n*u+e*d,i=n*h+e*f,a=n*s+e*l;return[Qf(i,r)*Vf,Qf(a,ap(r*r+i*i))*Vf]}:function(){return[n*Vf,r*Vf]};return y.distance=p,y},geoLength:ly,geoPath:function(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),yp(t,n(r))),r.result()}return a.area=function(t){return yp(t,n(Dy)),Dy.result()},a.measure=function(t){return yp(t,n(mm)),mm.result()},a.bounds=function(t){return yp(t,n(Yy)),Yy.result()},a.centroid=function(t){return yp(t,n(tm)),tm.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,Cy):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new _m):new um(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)},geoAlbers:Pm,geoAlbersUsa:function(){var t,e,n,r,i,a,o=Pm(),s=Fm().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Fm().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,e){a=[t,e]}};function u(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,u}return u.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},u.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},u.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),c.precision(t),h()):o.precision()},u.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),c.scale(t),u.translate(o.translate())):o.scale()},u.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],u=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,u-.238*e],[a+.455*e,u+.238*e]]).stream(l),r=s.translate([a-.307*e,u+.201*e]).clipExtent([[a-.425*e+1e-6,u+.12*e+1e-6],[a-.214*e-1e-6,u+.234*e-1e-6]]).stream(l),i=c.translate([a-.205*e,u+.212*e]).clipExtent([[a-.214*e+1e-6,u+.166*e+1e-6],[a-.115*e-1e-6,u+.234*e-1e-6]]).stream(l),h()},u.fitExtent=function(t,e){return Tm(u,t,e)},u.fitSize=function(t,e){return Em(u,t,e)},u.fitWidth=function(t,e){return Sm(u,t,e)},u.fitHeight=function(t,e){return Om(u,t,e)},u.scale(1070)},geoAzimuthalEqualArea:function(){return Bm(Um).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:Um,geoAzimuthalEquidistant:function(){return Bm($m).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:$m,geoConicConformal:function(){return Rm(Vm).scale(109.5).parallels([30,30])},geoConicConformalRaw:Vm,geoConicEqualArea:Fm,geoConicEqualAreaRaw:Im,geoConicEquidistant:function(){return Rm(Xm).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:Xm,geoEqualEarth:function(){return Bm(ev).scale(177.158)},geoEqualEarthRaw:ev,geoEquirectangular:function(){return Bm(Gm).scale(152.63)},geoEquirectangularRaw:Gm,geoGnomonic:function(){return Bm(nv).scale(144.049).clipAngle(60)},geoGnomonicRaw:nv,geoIdentity:function(){var t,e,n,r,i,a,o,s=1,c=0,l=0,u=1,h=1,d=0,f=null,p=1,g=1,y=xm({point:function(t,e){var n=b([t,e]);this.stream.point(n[0],n[1])}}),m=Cy;function v(){return p=s*u,g=s*h,a=o=null,b}function b(n){var r=n[0]*p,i=n[1]*g;if(d){var a=i*t-r*e;r=r*t+i*e,i=a}return[r+c,i+l]}return b.invert=function(n){var r=n[0]-c,i=n[1]-l;if(d){var a=i*t+r*e;r=r*t-i*e,i=a}return[r/p,i/g]},b.stream=function(t){return a&&o===t?a:a=y(m(o=t))},b.postclip=function(t){return arguments.length?(m=t,f=n=r=i=null,v()):m},b.clipExtent=function(t){return arguments.length?(m=null==t?(f=n=r=i=null,Cy):ty(f=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),v()):null==f?null:[[f,n],[r,i]]},b.scale=function(t){return arguments.length?(s=+t,v()):s},b.translate=function(t){return arguments.length?(c=+t[0],l=+t[1],v()):[c,l]},b.angle=function(n){return arguments.length?(e=rp(d=n%360*Gf),t=Kf(d),v()):d*Vf},b.reflectX=function(t){return arguments.length?(u=t?-1:1,v()):u<0},b.reflectY=function(t){return arguments.length?(h=t?-1:1,v()):h<0},b.fitExtent=function(t,e){return Tm(b,t,e)},b.fitSize=function(t,e){return Em(b,t,e)},b.fitWidth=function(t,e){return Sm(b,t,e)},b.fitHeight=function(t,e){return Om(b,t,e)},b},geoProjection:Bm,geoProjectionMutator:Lm,geoMercator:function(){return qm(Wm).scale(961/Hf)},geoMercatorRaw:Wm,geoNaturalEarth1:function(){return Bm(rv).scale(175.295)},geoNaturalEarth1Raw:rv,geoOrthographic:function(){return Bm(iv).scale(249.5).clipAngle(90.000001)},geoOrthographicRaw:iv,geoStereographic:function(){return Bm(av).scale(250).clipAngle(142)},geoStereographicRaw:av,geoTransverseMercator:function(){var t=qm(ov),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:ov,geoRotation:Fg,geoStream:yp,geoTransform:function(t){return{stream:xm(t)}},cluster:function(){var t=sv,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(cv,0)/t.length}(n),e.y=function(t){return 1+t.reduce(lv,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),l=s.x-t(s,c)/2,u=c.x+t(c,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-l)/(u-l)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},hierarchy:hv,pack:function(){var t=null,e=1,n=1,r=jv;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(Lv(t)).eachAfter(Rv(r,.5)).eachBefore(Iv(1)):i.eachBefore(Lv(Bv)).eachAfter(Rv(jv,1)).eachAfter(Rv(r,i.r/Math.min(e,n))).eachBefore(Iv(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Mv(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Nv(+t),i):r},i},packSiblings:function(t){return Av(t),t},packEnclose:mv,partition:function(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&Pv(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}(e,a)),r&&i.eachBefore(Fv),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i},stratify:function(){var t=Uv,e=$v;function n(n){var r,i,a,o,s,c,l,u=n.length,h=new Array(u),d={};for(i=0;i<u;++i)r=n[i],s=h[i]=new gv(r),null!=(c=t(r,i,n))&&(c+="")&&(d[l="$"+(s.id=c)]=l in d?zv:s);for(i=0;i<u;++i)if(s=h[i],null!=(c=e(n[i],i,n))&&(c+="")){if(!(o=d["$"+c]))throw new Error("missing: "+c);if(o===zv)throw new Error("ambiguous: "+c);o.children?o.children.push(s):o.children=[s],s.parent=o}else{if(a)throw new Error("multiple roots");a=s}if(!a)throw new Error("no root");if(a.parent=Yv,a.eachBefore((function(t){t.depth=t.parent.depth+1,--u})).eachBefore(pv),a.parent=null,u>0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=Dv(e),n):t},n.parentId=function(t){return arguments.length?(e=Dv(t),n):e},n},tree:function(){var t=Wv,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,a,o=new Xv(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new Xv(r[i],i)),n.parent=e;return(o.parent=new Xv(null,0)).children=[o],o}(i);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(s);else{var l=i,u=i,h=i;i.eachBefore((function(t){t.x<l.x&&(l=t),t.x>u.x&&(u=t),t.depth>h.depth&&(h=t)}));var d=l===u?1:t(l,u)/2,f=d-l.x,p=e/(u.x+d+f),g=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+f)*p,t.y=t.depth*g}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,c=a.parent.children[0],l=a.m,u=o.m,h=s.m,d=c.m;s=Hv(s),a=qv(a),s&&a;)c=qv(c),(o=Hv(o)).a=e,(i=s.z+h-a.z-l+t(s._,a._))>0&&(Vv(Gv(s,e,r),e,i),l+=i,u+=i),h+=s.m,l+=a.m,d+=c.m,u+=o.m;s&&!Hv(o)&&(o.t=s,o.m+=h-u),a&&!qv(c)&&(c.t=a,c.m+=l-d,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},treemap:function(){var t=Jv,e=!1,n=1,r=1,i=[0],a=jv,o=jv,s=jv,c=jv,l=jv;function u(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Fv),t}function h(e){var n=i[e.depth],r=e.x0+n,u=e.y0+n,h=e.x1-n,d=e.y1-n;h<r&&(r=h=(r+h)/2),d<u&&(u=d=(u+d)/2),e.x0=r,e.y0=u,e.x1=h,e.y1=d,e.children&&(n=i[e.depth+1]=a(e)/2,r+=l(e)-n,u+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(d-=c(e)-n)<u&&(u=d=(u+d)/2),t(e,r,u,h,d))}return u.round=function(t){return arguments.length?(e=!!t,u):e},u.size=function(t){return arguments.length?(n=+t[0],r=+t[1],u):[n,r]},u.tile=function(e){return arguments.length?(t=Dv(e),u):t},u.padding=function(t){return arguments.length?u.paddingInner(t).paddingOuter(t):u.paddingInner()},u.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Nv(+t),u):a},u.paddingOuter=function(t){return arguments.length?u.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):u.paddingTop()},u.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Nv(+t),u):o},u.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Nv(+t),u):s},u.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:Nv(+t),u):c},u.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:Nv(+t),u):l},u},treemapBinary:function(t,e,n,r,i){var a,o,s=t.children,c=s.length,l=new Array(c+1);for(l[0]=o=a=0;a<c;++a)l[a+1]=o+=s[a].value;!function t(e,n,r,i,a,o,c){if(e>=n-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=c)}var h=l[e],d=r/2+h,f=e+1,p=n-1;for(;f<p;){var g=f+p>>>1;l[g]<d?f=g+1:p=g}d-l[f-1]<l[f]-d&&e+1<f&&--f;var y=l[f]-h,m=r-y;if(o-i>c-a){var v=(i*m+o*y)/r;t(e,f,y,i,a,v,c),t(f,n,m,v,a,o,c)}else{var b=(a*m+c*y)/r;t(e,f,y,i,a,o,b),t(f,n,m,i,b,o,c)}}(0,c,t.value,e,n,r,i)},treemapDice:Pv,treemapSlice:Zv,treemapSliceDice:function(t,e,n,r,i){(1&t.depth?Zv:Pv)(t,e,n,r,i)},treemapSquarify:Jv,treemapResquarify:tb,interpolate:ll,interpolateArray:function(t,e){return(el(e)?tl:nl)(t,e)},interpolateBasis:$c,interpolateBasisClosed:Wc,interpolateDate:rl,interpolateDiscrete:function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},interpolateHue:function(t,e){var n=Vc(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},interpolateNumber:il,interpolateNumberArray:tl,interpolateObject:al,interpolateRound:ul,interpolateString:cl,interpolateTransformCss:bl,interpolateTransformSvg:_l,interpolateZoom:kl,interpolateRgb:Zc,interpolateRgbBasis:Kc,interpolateRgbBasisClosed:Jc,interpolateHsl:Tl,interpolateHslLong:El,interpolateLab:function(t,e){var n=Xc((t=wc(t)).l,(e=wc(e)).l),r=Xc(t.a,e.a),i=Xc(t.b,e.b),a=Xc(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}},interpolateHcl:Ol,interpolateHclLong:Al,interpolateCubehelix:Dl,interpolateCubehelixLong:jl,piecewise:function(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}},quantize:function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n},path:qh,polygonArea:function(t){for(var e,n=-1,r=t.length,i=t[r-1],a=0;++n<r;)e=i,i=t[n],a+=e[1]*i[0]-e[0]*i[1];return a/2},polygonCentroid:function(t){for(var e,n,r=-1,i=t.length,a=0,o=0,s=t[i-1],c=0;++r<i;)e=s,s=t[r],c+=n=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*n,o+=(e[1]+s[1])*n;return[a/(c*=3),o/c]},polygonHull:function(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(eb),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=nb(r),o=nb(i),s=o[0]===a[0],c=o[o.length-1]===a[a.length-1],l=[];for(e=a.length-1;e>=0;--e)l.push(t[r[a[e]][2]]);for(e=+s;e<o.length-c;++e)l.push(t[r[o[e]][2]]);return l},polygonContains:function(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],s=e[1],c=a[0],l=a[1],u=!1,h=0;h<i;++h)n=(a=t[h])[0],(r=a[1])>s!=l>s&&o<(c-n)*(s-r)/(l-r)+n&&(u=!u),c=n,l=r;return u},polygonLength:function(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],c=0;++r<i;)e=o,n=s,e-=o=(a=t[r])[0],n-=s=a[1],c+=Math.sqrt(e*e+n*n);return c},quadtree:lf,randomUniform:ib,randomNormal:ab,randomLogNormal:ob,randomBates:cb,randomIrwinHall:sb,randomExponential:lb,scaleBand:mb,scalePoint:function(){return vb(mb.apply(null,arguments).paddingInner(1))},scaleIdentity:function t(e){var n;function r(t){return isNaN(t=+t)?n:t}return r.invert=r,r.domain=r.range=function(t){return arguments.length?(e=fb.call(t,bb),r):e.slice()},r.unknown=function(t){return arguments.length?(n=t,r):n},r.copy=function(){return t(e).unknown(n)},e=arguments.length?fb.call(e,bb):[0,1],Mb(r)},scaleLinear:function t(){var e=Ob(wb,wb);return e.copy=function(){return Eb(e,t())},ub.apply(e,arguments),Mb(e)},scaleLog:function t(){var e=Fb(Sb()).domain([1,10]);return e.copy=function(){return Eb(e,t()).base(e.base())},ub.apply(e,arguments),e},scaleSymlog:function t(){var e=zb(Sb());return e.copy=function(){return Eb(e,t()).constant(e.constant())},ub.apply(e,arguments)},scaleOrdinal:yb,scaleImplicit:gb,scalePow:Hb,scaleSqrt:function(){return Hb.apply(null,arguments).exponent(.5)},scaleQuantile:function t(){var e,n=[],r=[],i=[];function a(){var t=0,e=Math.max(1,r.length);for(i=new Array(e-1);++t<e;)i[t-1]=$a(n,t/e);return o}function o(t){return isNaN(t=+t)?e:r[ka(i,t)]}return o.invertExtent=function(t){var e=r.indexOf(t);return e<0?[NaN,NaN]:[e>0?i[e-1]:n[0],e<i.length?i[e]:n[n.length-1]]},o.domain=function(t){if(!arguments.length)return n.slice();n=[];for(var e,r=0,i=t.length;r<i;++r)null==(e=t[r])||isNaN(e=+e)||n.push(e);return n.sort(_a),a()},o.range=function(t){return arguments.length?(r=pb.call(t),a()):r.slice()},o.unknown=function(t){return arguments.length?(e=t,o):e},o.quantiles=function(){return i.slice()},o.copy=function(){return t().domain(n).range(r).unknown(e)},ub.apply(o,arguments)},scaleQuantize:function t(){var e,n=0,r=1,i=1,a=[.5],o=[0,1];function s(t){return t<=t?o[ka(a,t,0,i)]:e}function c(){var t=-1;for(a=new Array(i);++t<i;)a[t]=((t+1)*r-(t-i)*n)/(i+1);return s}return s.domain=function(t){return arguments.length?(n=+t[0],r=+t[1],c()):[n,r]},s.range=function(t){return arguments.length?(i=(o=pb.call(t)).length-1,c()):o.slice()},s.invertExtent=function(t){var e=o.indexOf(t);return e<0?[NaN,NaN]:e<1?[n,a[0]]:e>=i?[a[i-1],r]:[a[e-1],a[e]]},s.unknown=function(t){return arguments.length?(e=t,s):s},s.thresholds=function(){return a.slice()},s.copy=function(){return t().domain([n,r]).range(o).unknown(e)},ub.apply(Mb(s),arguments)},scaleThreshold:function t(){var e,n=[.5],r=[0,1],i=1;function a(t){return t<=t?r[ka(n,t,0,i)]:e}return a.domain=function(t){return arguments.length?(n=pb.call(t),i=Math.min(n.length,r.length-1),a):n.slice()},a.range=function(t){return arguments.length?(r=pb.call(t),i=Math.min(n.length,r.length-1),a):r.slice()},a.invertExtent=function(t){var e=r.indexOf(t);return[n[e-1],n[e]]},a.unknown=function(t){return arguments.length?(e=t,a):e},a.copy=function(){return t().domain(n).range(r).unknown(e)},ub.apply(a,arguments)},scaleTime:function(){return ub.apply(Sx(k_,w_,s_,i_,n_,t_,Kb,Zb,ew).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return ub.apply(Sx(G_,H_,j_,A_,S_,T_,Kb,Zb,rw).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},scaleSequential:function t(){var e=Mb(Ox()(wb));return e.copy=function(){return Ax(e,t())},hb.apply(e,arguments)},scaleSequentialLog:function t(){var e=Fb(Ox()).domain([1,10]);return e.copy=function(){return Ax(e,t()).base(e.base())},hb.apply(e,arguments)},scaleSequentialPow:Mx,scaleSequentialSqrt:function(){return Mx.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function t(){var e=zb(Ox());return e.copy=function(){return Ax(e,t()).constant(e.constant())},hb.apply(e,arguments)},scaleSequentialQuantile:function t(){var e=[],n=wb;function r(t){if(!isNaN(t=+t))return n((ka(e,t)-1)/(e.length-1))}return r.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,i=0,a=t.length;i<a;++i)null==(n=t[i])||isNaN(n=+n)||e.push(n);return e.sort(_a),r},r.interpolator=function(t){return arguments.length?(n=t,r):n},r.copy=function(){return t(n).domain(e)},hb.apply(r,arguments)},scaleDiverging:function t(){var e=Mb(Dx()(wb));return e.copy=function(){return Ax(e,t())},hb.apply(e,arguments)},scaleDivergingLog:function t(){var e=Fb(Dx()).domain([.1,1,10]);return e.copy=function(){return Ax(e,t()).base(e.base())},hb.apply(e,arguments)},scaleDivergingPow:jx,scaleDivergingSqrt:function(){return jx.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function t(){var e=zb(Dx());return e.copy=function(){return Ax(e,t()).constant(e.constant())},hb.apply(e,arguments)},tickFormat:Ab,schemeCategory10:Bx,schemeAccent:Lx,schemeDark2:Rx,schemePaired:Ix,schemePastel1:Fx,schemePastel2:Px,schemeSet1:Yx,schemeSet2:zx,schemeSet3:Ux,schemeTableau10:$x,interpolateBrBG:Hx,schemeBrBG:qx,interpolatePRGn:Gx,schemePRGn:Vx,interpolatePiYG:Zx,schemePiYG:Xx,interpolatePuOr:Kx,schemePuOr:Qx,interpolateRdBu:tk,schemeRdBu:Jx,interpolateRdGy:nk,schemeRdGy:ek,interpolateRdYlBu:ik,schemeRdYlBu:rk,interpolateRdYlGn:ok,schemeRdYlGn:ak,interpolateSpectral:ck,schemeSpectral:sk,interpolateBuGn:uk,schemeBuGn:lk,interpolateBuPu:dk,schemeBuPu:hk,interpolateGnBu:pk,schemeGnBu:fk,interpolateOrRd:yk,schemeOrRd:gk,interpolatePuBuGn:vk,schemePuBuGn:mk,interpolatePuBu:_k,schemePuBu:bk,interpolatePuRd:xk,schemePuRd:wk,interpolateRdPu:Ck,schemeRdPu:kk,interpolateYlGnBu:Ek,schemeYlGnBu:Tk,interpolateYlGn:Ok,schemeYlGn:Sk,interpolateYlOrBr:Mk,schemeYlOrBr:Ak,interpolateYlOrRd:jk,schemeYlOrRd:Dk,interpolateBlues:Bk,schemeBlues:Nk,interpolateGreens:Rk,schemeGreens:Lk,interpolateGreys:Fk,schemeGreys:Ik,interpolatePurples:Yk,schemePurples:Pk,interpolateReds:Uk,schemeReds:zk,interpolateOranges:Wk,schemeOranges:$k,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:qk,interpolateRainbow:function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Gk.h=360*t-100,Gk.s=1.5-1.5*e,Gk.l=.8-.9*e,Gk+""},interpolateWarm:Hk,interpolateCool:Vk,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,Xk.r=255*(e=Math.sin(t))*e,Xk.g=255*(e=Math.sin(t+Zk))*e,Xk.b=255*(e=Math.sin(t+Qk))*e,Xk+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:Jk,interpolateMagma:tC,interpolateInferno:eC,interpolatePlasma:nC,create:function(t){return _s(go(t).call(document.documentElement))},creator:go,local:xs,matcher:_o,mouse:Es,namespace:ho,namespaces:uo,clientPoint:Ts,select:_s,selectAll:function(t){return"string"==typeof t?new vs([document.querySelectorAll(t)],[document.documentElement]):new vs([null==t?[]:t],ms)},selection:bs,selector:mo,selectorAll:bo,style:Ro,touch:Ss,touches:function(t,e){null==e&&(e=Cs().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=Ts(t,e[n]);return i},window:jo,get event(){return ss},customEvent:fs,arc:function(){var t=yC,e=mC,n=rC(0),r=null,i=vC,a=bC,o=_C,s=null;function c(){var c,l,u=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-dC,f=a.apply(this,arguments)-dC,p=iC(f-d),g=f>d;if(s||(s=c=qh()),h<u&&(l=h,h=u,u=l),h>1e-12)if(p>fC-1e-12)s.moveTo(h*oC(d),h*lC(d)),s.arc(0,0,h,d,f,!g),u>1e-12&&(s.moveTo(u*oC(f),u*lC(f)),s.arc(0,0,u,f,d,g));else{var y,m,v=d,b=f,_=d,w=f,x=p,k=p,C=o.apply(this,arguments)/2,T=C>1e-12&&(r?+r.apply(this,arguments):uC(u*u+h*h)),E=cC(iC(h-u)/2,+n.apply(this,arguments)),S=E,O=E;if(T>1e-12){var A=gC(T/u*lC(C)),M=gC(T/h*lC(C));(x-=2*A)>1e-12?(_+=A*=g?1:-1,w-=A):(x=0,_=w=(d+f)/2),(k-=2*M)>1e-12?(v+=M*=g?1:-1,b-=M):(k=0,v=b=(d+f)/2)}var D=h*oC(v),j=h*lC(v),N=u*oC(w),B=u*lC(w);if(E>1e-12){var L,R=h*oC(b),I=h*lC(b),F=u*oC(_),P=u*lC(_);if(p<hC&&(L=wC(D,j,F,P,R,I,N,B))){var Y=D-L[0],z=j-L[1],U=R-L[0],$=I-L[1],W=1/lC(pC((Y*U+z*$)/(uC(Y*Y+z*z)*uC(U*U+$*$)))/2),q=uC(L[0]*L[0]+L[1]*L[1]);S=cC(E,(u-q)/(W-1)),O=cC(E,(h-q)/(W+1))}}k>1e-12?O>1e-12?(y=xC(F,P,D,j,h,O,g),m=xC(R,I,N,B,h,O,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),O<E?s.arc(y.cx,y.cy,O,aC(y.y01,y.x01),aC(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,O,aC(y.y01,y.x01),aC(y.y11,y.x11),!g),s.arc(0,0,h,aC(y.cy+y.y11,y.cx+y.x11),aC(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,O,aC(m.y11,m.x11),aC(m.y01,m.x01),!g))):(s.moveTo(D,j),s.arc(0,0,h,v,b,!g)):s.moveTo(D,j),u>1e-12&&x>1e-12?S>1e-12?(y=xC(N,B,R,I,u,-S,g),m=xC(D,j,F,P,u,-S,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),S<E?s.arc(y.cx,y.cy,S,aC(y.y01,y.x01),aC(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,S,aC(y.y01,y.x01),aC(y.y11,y.x11),!g),s.arc(0,0,u,aC(y.cy+y.y11,y.cx+y.x11),aC(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,aC(m.y11,m.x11),aC(m.y01,m.x01),!g))):s.arc(0,0,u,w,_,g):s.lineTo(N,B)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-hC/2;return[oC(r)*n,lC(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:rC(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:rC(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:rC(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:rC(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:rC(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:rC(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:rC(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c},area:OC,line:SC,pie:function(){var t=MC,e=AC,n=null,r=rC(0),i=rC(fC),a=rC(0);function o(o){var s,c,l,u,h,d=o.length,f=0,p=new Array(d),g=new Array(d),y=+r.apply(this,arguments),m=Math.min(fC,Math.max(-fC,i.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/d,a.apply(this,arguments)),b=v*(m<0?-1:1);for(s=0;s<d;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(f+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,l=f?(m-d*b)/f:0;s<d;++s,y=u)c=p[s],u=y+((h=g[c])>0?h*l:0)+b,g[c]={data:o[c],index:s,value:h,startAngle:y,endAngle:u,padAngle:v};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:rC(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:rC(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:rC(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:rC(+t),o):a},o},areaRadial:RC,radialArea:RC,lineRadial:LC,radialLine:LC,pointRadial:IC,linkHorizontal:function(){return zC(UC)},linkVertical:function(){return zC($C)},linkRadial:function(){var t=zC(WC);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},symbol:function(){var t=rC(qC),e=rC(64),n=null;function r(){var r;if(n||(n=r=qh()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:rC(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:rC(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},symbols:cT,symbolCircle:qC,symbolCross:HC,symbolDiamond:XC,symbolSquare:tT,symbolStar:JC,symbolTriangle:nT,symbolWye:sT,curveBasisClosed:function(t){return new dT(t)},curveBasisOpen:function(t){return new fT(t)},curveBasis:function(t){return new hT(t)},curveBundle:gT,curveCardinalClosed:_T,curveCardinalOpen:xT,curveCardinal:vT,curveCatmullRomClosed:ST,curveCatmullRomOpen:AT,curveCatmullRom:TT,curveLinearClosed:function(t){return new MT(t)},curveLinear:CC,curveMonotoneX:function(t){return new LT(t)},curveMonotoneY:function(t){return new RT(t)},curveNatural:function(t){return new FT(t)},curveStep:function(t){return new YT(t,.5)},curveStepAfter:function(t){return new YT(t,1)},curveStepBefore:function(t){return new YT(t,0)},stack:function(){var t=rC([]),e=UT,n=zT,r=$T;function i(i){var a,o,s=t.apply(this,arguments),c=i.length,l=s.length,u=new Array(l);for(a=0;a<l;++a){for(var h,d=s[a],f=u[a]=new Array(c),p=0;p<c;++p)f[p]=h=[0,+r(i[p],d,p,i)],h.data=i[p];f.key=d}for(a=0,o=e(u);a<l;++a)u[o[a]].index=a;return n(u,o),u}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:rC(FC.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:rC(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?UT:"function"==typeof t?t:rC(FC.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?zT:t,i):n},i},stackOffsetExpand:function(t,e){if((r=t.length)>0){for(var n,r,i,a=0,o=t[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=t[n][a][1]||0;if(i)for(n=0;n<r;++n)t[n][a][1]/=i}zT(t,e)}},stackOffsetDiverging:function(t,e){if((s=t.length)>0)for(var n,r,i,a,o,s,c=0,l=t[e[0]].length;c<l;++c)for(a=o=0,n=0;n<s;++n)(i=(r=t[e[n]][c])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)},stackOffsetNone:zT,stackOffsetSilhouette:function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r<a;++r){for(var o=0,s=0;o<n;++o)s+=t[o][r][1]||0;i[r][1]+=i[r][0]=-s/2}zT(t,e)}},stackOffsetWiggle:function(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var s=0,c=0,l=0;s<i;++s){for(var u=t[e[s]],h=u[o][1]||0,d=(h-(u[o-1][1]||0))/2,f=0;f<s;++f){var p=t[e[f]];d+=(p[o][1]||0)-(p[o-1][1]||0)}c+=h,l+=d*h}n[o-1][1]+=n[o-1][0]=a,c&&(a-=l/c)}n[o-1][1]+=n[o-1][0]=a,zT(t,e)}},stackOrderAppearance:WT,stackOrderAscending:HT,stackOrderDescending:function(t){return HT(t).reverse()},stackOrderInsideOut:function(t){var e,n,r=t.length,i=t.map(VT),a=WT(t),o=0,s=0,c=[],l=[];for(e=0;e<r;++e)n=a[e],o<s?(o+=i[n],c.push(n)):(s+=i[n],l.push(n));return l.reverse().concat(c)},stackOrderNone:UT,stackOrderReverse:function(t){return UT(t).reverse()},timeInterval:Xb,timeMillisecond:Zb,timeMilliseconds:Qb,utcMillisecond:Zb,utcMilliseconds:Qb,timeSecond:Kb,timeSeconds:Jb,utcSecond:Kb,utcSeconds:Jb,timeMinute:t_,timeMinutes:e_,timeHour:n_,timeHours:r_,timeDay:i_,timeDays:a_,timeWeek:s_,timeWeeks:p_,timeSunday:s_,timeSundays:p_,timeMonday:c_,timeMondays:g_,timeTuesday:l_,timeTuesdays:y_,timeWednesday:u_,timeWednesdays:m_,timeThursday:h_,timeThursdays:v_,timeFriday:d_,timeFridays:b_,timeSaturday:f_,timeSaturdays:__,timeMonth:w_,timeMonths:x_,timeYear:k_,timeYears:C_,utcMinute:T_,utcMinutes:E_,utcHour:S_,utcHours:O_,utcDay:A_,utcDays:M_,utcWeek:j_,utcWeeks:P_,utcSunday:j_,utcSundays:P_,utcMonday:N_,utcMondays:Y_,utcTuesday:B_,utcTuesdays:z_,utcWednesday:L_,utcWednesdays:U_,utcThursday:R_,utcThursdays:$_,utcFriday:I_,utcFridays:W_,utcSaturday:F_,utcSaturdays:q_,utcMonth:H_,utcMonths:V_,utcYear:G_,utcYears:X_,timeFormatDefaultLocale:xx,get timeFormat(){return ew},get timeParse(){return nw},get utcFormat(){return rw},get utcParse(){return iw},timeFormatLocale:J_,isoFormat:kx,isoParse:Cx,now:$l,timer:Hl,timerFlush:Vl,timeout:Ql,interval:function(t,e,n){var r=new ql,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?$l():+n,r.restart((function a(o){o+=i,r.restart(a,i+=e,n),t(o)}),e,n),r)},transition:Nu,active:function(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>1&&n.name===e)return new ju([[t]],ah,e,+r);return null},interrupt:iu,voronoi:function(){var t=XT,e=ZT,n=null;function r(r){return new ME(r.map((function(n,i){var a=[Math.round(t(n,i,r)/SE)*SE,Math.round(e(n,i,r)/SE)*SE];return a.index=i,a.data=n,a})),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:GT(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:GT(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r},zoom:function(){var t,e,n=FE,r=PE,i=$E,a=zE,o=UE,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],l=250,u=kl,h=io("start","zoom","end"),d=500,f=0;function p(t){t.property("__zoom",YE).on("wheel.zoom",w).on("mousedown.zoom",x).on("dblclick.zoom",k).filter(o).on("touchstart.zoom",C).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new NE(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new NE(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,e,n){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=b(t,i),o=r.apply(t,i),s=null==n?m(o):"function"==typeof n?n.apply(t,i):n,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),l=t.__zoom,h="function"==typeof e?e.apply(t,i):e,d=u(l.invert(s).concat(c/l.k),h.invert(s).concat(c/h.k));return function(t){if(1===t)t=h;else{var e=d(t),n=c/e[2];t=new NE(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function b(t,e,n){return!n&&t.__zooming||new _(t,e)}function _(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function w(){if(n.apply(this,arguments)){var t=b(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Es(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=e.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[o,e.invert(o)],iu(this),t.start()}IE(),t.wheel=setTimeout(l,150),t.zoom("mouse",i(y(g(e,r),t.mouse[0],t.mouse[1]),t.extent,c))}function l(){t.wheel=null,t.end()}}function x(){if(!e&&n.apply(this,arguments)){var t=b(this,arguments,!0),r=_s(ss.view).on("mousemove.zoom",l,!0).on("mouseup.zoom",u,!0),a=Es(this),o=ss.clientX,s=ss.clientY;Ms(ss.view),RE(),t.mouse=[a,this.__zoom.invert(a)],iu(this),t.start()}function l(){if(IE(),!t.moved){var e=ss.clientX-o,n=ss.clientY-s;t.moved=e*e+n*n>f}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=Es(t.that),t.mouse[1]),t.extent,c))}function u(){r.on("mousemove.zoom mouseup.zoom",null),Ds(ss.view,t.moved),IE(),t.end()}}function k(){if(n.apply(this,arguments)){var t=this.__zoom,e=Es(this),a=t.invert(e),o=t.k*(ss.shiftKey?.5:2),s=i(y(g(t,o),e,a),r.apply(this,arguments),c);IE(),l>0?_s(this).transition().duration(l).call(v,s,e):_s(this).call(p.transform,s)}}function C(){if(n.apply(this,arguments)){var e,r,i,a,o=ss.touches,s=o.length,c=b(this,arguments,ss.changedTouches.length===s);for(RE(),r=0;r<s;++r)a=[a=Ss(this,o,(i=o[r]).identifier),this.__zoom.invert(a),i.identifier],c.touch0?c.touch1||c.touch0[2]===a[2]||(c.touch1=a,c.taps=0):(c.touch0=a,e=!0,c.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(c.taps<2&&(t=setTimeout((function(){t=null}),d)),iu(this),c.start())}}function T(){if(this.__zooming){var e,n,r,a,o=b(this,arguments),s=ss.changedTouches,l=s.length;for(IE(),t&&(t=clearTimeout(t)),o.taps=0,e=0;e<l;++e)r=Ss(this,s,(n=s[e]).identifier),o.touch0&&o.touch0[2]===n.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===n.identifier&&(o.touch1[0]=r);if(n=o.that.__zoom,o.touch1){var u=o.touch0[0],h=o.touch0[1],d=o.touch1[0],f=o.touch1[1],p=(p=d[0]-u[0])*p+(p=d[1]-u[1])*p,m=(m=f[0]-h[0])*m+(m=f[1]-h[1])*m;n=g(n,Math.sqrt(p/m)),r=[(u[0]+d[0])/2,(u[1]+d[1])/2],a=[(h[0]+f[0])/2,(h[1]+f[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],a=o.touch0[1]}o.zoom("touch",i(y(n,r,a),o.extent,c))}}function E(){if(this.__zooming){var t,n,r=b(this,arguments),i=ss.changedTouches,a=i.length;for(RE(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),d),t=0;t<a;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var o=_s(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}return p.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",YE),t!==r?v(t,e,n):r.interrupt().each((function(){b(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},p.scaleBy=function(t,e,n){p.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},p.scaleTo=function(t,e,n){p.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,o=null==n?m(t):"function"==typeof n?n.apply(this,arguments):n,s=a.invert(o),l="function"==typeof e?e.apply(this,arguments):e;return i(y(g(a,l),o,s),t,c)}),n)},p.translateBy=function(t,e,n){p.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),c)}))},p.translateTo=function(t,e,n,a){p.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,s=null==a?m(t):"function"==typeof a?a.apply(this,arguments):a;return i(BE.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),a)},_.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){fs(new jE(p,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},p.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:DE(+t),p):a},p.filter=function(t){return arguments.length?(n="function"==typeof t?t:DE(!!t),p):n},p.touchable=function(t){return arguments.length?(o="function"==typeof t?t:DE(!!t),p):o},p.extent=function(t){return arguments.length?(r="function"==typeof t?t:DE([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),p):r},p.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],p):[s[0],s[1]]},p.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],p):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},p.constrain=function(t){return arguments.length?(i=t,p):i},p.duration=function(t){return arguments.length?(l=+t,p):l},p.interpolate=function(t){return arguments.length?(u=t,p):u},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,p):Math.sqrt(f)},p},zoomTransform:LE,zoomIdentity:BE}));var qE=function(){this.__data__=[],this.size=0};var HE=function(t,e){return t===e||t!=t&&e!=e},VE=HE;var GE=function(t,e){for(var n=t.length;n--;)if(VE(t[n][0],e))return n;return-1},XE=GE,ZE=Array.prototype.splice;var QE=GE;var KE=GE;var JE=GE;var tS=qE,eS=function(t){var e=this.__data__,n=XE(e,t);return!(n<0)&&(n==e.length-1?e.pop():ZE.call(e,n,1),--this.size,!0)},nS=function(t){var e=this.__data__,n=QE(e,t);return n<0?void 0:e[n][1]},rS=function(t){return KE(this.__data__,t)>-1},iS=function(t,e){var n=this.__data__,r=JE(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function aS(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}aS.prototype.clear=tS,aS.prototype.delete=eS,aS.prototype.get=nS,aS.prototype.has=rS,aS.prototype.set=iS;var oS=aS,sS=oS;var cS=function(){this.__data__=new sS,this.size=0};var lS=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};var uS=function(t){return this.__data__.get(t)};var hS=function(t){return this.__data__.has(t)},dS="object"==typeof da&&da&&da.Object===Object&&da,fS=dS,pS="object"==typeof self&&self&&self.Object===Object&&self,gS=fS||pS||Function("return this")(),yS=gS.Symbol,mS=yS,vS=Object.prototype,bS=vS.hasOwnProperty,_S=vS.toString,wS=mS?mS.toStringTag:void 0;var xS=function(t){var e=bS.call(t,wS),n=t[wS];try{t[wS]=void 0;var r=!0}catch(a){}var i=_S.call(t);return r&&(e?t[wS]=n:delete t[wS]),i},kS=Object.prototype.toString;var CS=xS,TS=function(t){return kS.call(t)},ES=yS?yS.toStringTag:void 0;var SS=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":ES&&ES in Object(t)?CS(t):TS(t)};var OS=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},AS=SS,MS=OS;var DS,jS=function(t){if(!MS(t))return!1;var e=AS(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},NS=gS["__core-js_shared__"],BS=(DS=/[^.]+$/.exec(NS&&NS.keys&&NS.keys.IE_PROTO||""))?"Symbol(src)_1."+DS:"";var LS=function(t){return!!BS&&BS in t},RS=Function.prototype.toString;var IS=function(t){if(null!=t){try{return RS.call(t)}catch(e){}try{return t+""}catch(e){}}return""},FS=jS,PS=LS,YS=OS,zS=IS,US=/^\[object .+?Constructor\]$/,$S=Function.prototype,WS=Object.prototype,qS=$S.toString,HS=WS.hasOwnProperty,VS=RegExp("^"+qS.call(HS).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var GS=function(t){return!(!YS(t)||PS(t))&&(FS(t)?VS:US).test(zS(t))},XS=function(t,e){return null==t?void 0:t[e]};var ZS=function(t,e){var n=XS(t,e);return GS(n)?n:void 0},QS=ZS(gS,"Map"),KS=ZS(Object,"create"),JS=KS;var tO=function(){this.__data__=JS?JS(null):{},this.size=0};var eO=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},nO=KS,rO=Object.prototype.hasOwnProperty;var iO=function(t){var e=this.__data__;if(nO){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return rO.call(e,t)?e[t]:void 0},aO=KS,oO=Object.prototype.hasOwnProperty;var sO=KS;var cO=tO,lO=eO,uO=iO,hO=function(t){var e=this.__data__;return aO?void 0!==e[t]:oO.call(e,t)},dO=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=sO&&void 0===e?"__lodash_hash_undefined__":e,this};function fO(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}fO.prototype.clear=cO,fO.prototype.delete=lO,fO.prototype.get=uO,fO.prototype.has=hO,fO.prototype.set=dO;var pO=fO,gO=oS,yO=QS;var mO=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var vO=function(t,e){var n=t.__data__;return mO(e)?n["string"==typeof e?"string":"hash"]:n.map},bO=vO;var _O=vO;var wO=vO;var xO=vO;var kO=function(){this.size=0,this.__data__={hash:new pO,map:new(yO||gO),string:new pO}},CO=function(t){var e=bO(this,t).delete(t);return this.size-=e?1:0,e},TO=function(t){return _O(this,t).get(t)},EO=function(t){return wO(this,t).has(t)},SO=function(t,e){var n=xO(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function OO(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}OO.prototype.clear=kO,OO.prototype.delete=CO,OO.prototype.get=TO,OO.prototype.has=EO,OO.prototype.set=SO;var AO=OO,MO=oS,DO=QS,jO=AO;var NO=oS,BO=cS,LO=lS,RO=uS,IO=hS,FO=function(t,e){var n=this.__data__;if(n instanceof MO){var r=n.__data__;if(!DO||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new jO(r)}return n.set(t,e),this.size=n.size,this};function PO(t){var e=this.__data__=new NO(t);this.size=e.size}PO.prototype.clear=BO,PO.prototype.delete=LO,PO.prototype.get=RO,PO.prototype.has=IO,PO.prototype.set=FO;var YO=PO;var zO=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t},UO=ZS,$O=function(){try{var t=UO(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),WO=$O;var qO=function(t,e,n){"__proto__"==e&&WO?WO(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},HO=qO,VO=HE,GO=Object.prototype.hasOwnProperty;var XO=function(t,e,n){var r=t[e];GO.call(t,e)&&VO(r,n)&&(void 0!==n||e in t)||HO(t,e,n)},ZO=XO,QO=qO;var KO=function(t,e,n,r){var i=!n;n||(n={});for(var a=-1,o=e.length;++a<o;){var s=e[a],c=r?r(n[s],t[s],s,n,t):void 0;void 0===c&&(c=t[s]),i?QO(n,s,c):ZO(n,s,c)}return n};var JO=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r};var tA=function(t){return null!=t&&"object"==typeof t},eA=SS,nA=tA;var rA,iA,aA,oA,sA,cA,lA,uA,hA=function(t){return nA(t)&&"[object Arguments]"==eA(t)},dA=tA,fA=Object.prototype,pA=fA.hasOwnProperty,gA=fA.propertyIsEnumerable,yA=hA(function(){return arguments}())?hA:function(t){return dA(t)&&pA.call(t,"callee")&&!gA.call(t,"callee")},mA=Array.isArray,vA={exports:{}};rA=vA,aA=gS,oA=function(){return!1},sA=(iA=vA.exports)&&!iA.nodeType&&iA,cA=sA&&rA&&!rA.nodeType&&rA,lA=cA&&cA.exports===sA?aA.Buffer:void 0,uA=(lA?lA.isBuffer:void 0)||oA,rA.exports=uA;var bA=/^(?:0|[1-9]\d*)$/;var _A=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&bA.test(t))&&t>-1&&t%1==0&&t<e};var wA=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},xA=SS,kA=wA,CA=tA,TA={};TA["[object Float32Array]"]=TA["[object Float64Array]"]=TA["[object Int8Array]"]=TA["[object Int16Array]"]=TA["[object Int32Array]"]=TA["[object Uint8Array]"]=TA["[object Uint8ClampedArray]"]=TA["[object Uint16Array]"]=TA["[object Uint32Array]"]=!0,TA["[object Arguments]"]=TA["[object Array]"]=TA["[object ArrayBuffer]"]=TA["[object Boolean]"]=TA["[object DataView]"]=TA["[object Date]"]=TA["[object Error]"]=TA["[object Function]"]=TA["[object Map]"]=TA["[object Number]"]=TA["[object Object]"]=TA["[object RegExp]"]=TA["[object Set]"]=TA["[object String]"]=TA["[object WeakMap]"]=!1;var EA=function(t){return CA(t)&&kA(t.length)&&!!TA[xA(t)]};var SA=function(t){return function(e){return t(e)}},OA={exports:{}};!function(t,e){var n=dS,r=e&&!e.nodeType&&e,i=r&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process,o=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(e){}}();t.exports=o}(OA,OA.exports);var AA=EA,MA=SA,DA=OA.exports,jA=DA&&DA.isTypedArray,NA=jA?MA(jA):AA,BA=JO,LA=yA,RA=mA,IA=vA.exports,FA=_A,PA=NA,YA=Object.prototype.hasOwnProperty;var zA=function(t,e){var n=RA(t),r=!n&&LA(t),i=!n&&!r&&IA(t),a=!n&&!r&&!i&&PA(t),o=n||r||i||a,s=o?BA(t.length,String):[],c=s.length;for(var l in t)!e&&!YA.call(t,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||FA(l,c))||s.push(l);return s},UA=Object.prototype;var $A=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||UA)};var WA=function(t,e){return function(n){return t(e(n))}},qA=WA(Object.keys,Object),HA=$A,VA=qA,GA=Object.prototype.hasOwnProperty;var XA=function(t){if(!HA(t))return VA(t);var e=[];for(var n in Object(t))GA.call(t,n)&&"constructor"!=n&&e.push(n);return e},ZA=jS,QA=wA;var KA=function(t){return null!=t&&QA(t.length)&&!ZA(t)},JA=zA,tM=XA,eM=KA;var nM=function(t){return eM(t)?JA(t):tM(t)},rM=KO,iM=nM;var aM=function(t,e){return t&&rM(e,iM(e),t)};var oM=OS,sM=$A,cM=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},lM=Object.prototype.hasOwnProperty;var uM=zA,hM=function(t){if(!oM(t))return cM(t);var e=sM(t),n=[];for(var r in t)("constructor"!=r||!e&&lM.call(t,r))&&n.push(r);return n},dM=KA;var fM=function(t){return dM(t)?uM(t,!0):hM(t)},pM=KO,gM=fM;var yM=function(t,e){return t&&pM(e,gM(e),t)},mM={exports:{}};!function(t,e){var n=gS,r=e&&!e.nodeType&&e,i=r&&t&&!t.nodeType&&t,a=i&&i.exports===r?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=o?o(n):new t.constructor(n);return t.copy(r),r}}(mM,mM.exports);var vM=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e};var bM=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a};var _M=function(){return[]},wM=bM,xM=_M,kM=Object.prototype.propertyIsEnumerable,CM=Object.getOwnPropertySymbols,TM=CM?function(t){return null==t?[]:(t=Object(t),wM(CM(t),(function(e){return kM.call(t,e)})))}:xM,EM=KO,SM=TM;var OM=function(t,e){return EM(t,SM(t),e)};var AM=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t},MM=WA(Object.getPrototypeOf,Object),DM=AM,jM=MM,NM=TM,BM=_M,LM=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)DM(e,NM(t)),t=jM(t);return e}:BM,RM=KO,IM=LM;var FM=function(t,e){return RM(t,IM(t),e)},PM=AM,YM=mA;var zM=function(t,e,n){var r=e(t);return YM(t)?r:PM(r,n(t))},UM=zM,$M=TM,WM=nM;var qM=function(t){return UM(t,WM,$M)},HM=zM,VM=LM,GM=fM;var XM=function(t){return HM(t,GM,VM)},ZM=ZS(gS,"DataView"),QM=ZS(gS,"Promise"),KM=ZS(gS,"Set"),JM=ZM,tD=QS,eD=QM,nD=KM,rD=ZS(gS,"WeakMap"),iD=SS,aD=IS,oD=aD(JM),sD=aD(tD),cD=aD(eD),lD=aD(nD),uD=aD(rD),hD=iD;(JM&&"[object DataView]"!=hD(new JM(new ArrayBuffer(1)))||tD&&"[object Map]"!=hD(new tD)||eD&&"[object Promise]"!=hD(eD.resolve())||nD&&"[object Set]"!=hD(new nD)||rD&&"[object WeakMap]"!=hD(new rD))&&(hD=function(t){var e=iD(t),n="[object Object]"==e?t.constructor:void 0,r=n?aD(n):"";if(r)switch(r){case oD:return"[object DataView]";case sD:return"[object Map]";case cD:return"[object Promise]";case lD:return"[object Set]";case uD:return"[object WeakMap]"}return e});var dD=hD,fD=Object.prototype.hasOwnProperty;var pD=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&fD.call(t,"index")&&(n.index=t.index,n.input=t.input),n},gD=gS.Uint8Array,yD=gD;var mD=function(t){var e=new t.constructor(t.byteLength);return new yD(e).set(new yD(t)),e},vD=mD;var bD=function(t,e){var n=e?vD(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)},_D=/\w*$/;var wD=function(t){var e=new t.constructor(t.source,_D.exec(t));return e.lastIndex=t.lastIndex,e},xD=yS?yS.prototype:void 0,kD=xD?xD.valueOf:void 0;var CD=mD;var TD=function(t,e){var n=e?CD(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},ED=mD,SD=bD,OD=wD,AD=function(t){return kD?Object(kD.call(t)):{}},MD=TD;var DD=function(t,e,n){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return ED(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return SD(t,n);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 MD(t,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return OD(t);case"[object Set]":return new r;case"[object Symbol]":return AD(t)}},jD=OS,ND=Object.create,BD=function(){function t(){}return function(e){if(!jD(e))return{};if(ND)return ND(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),LD=BD,RD=MM,ID=$A;var FD=function(t){return"function"!=typeof t.constructor||ID(t)?{}:LD(RD(t))},PD=dD,YD=tA;var zD=function(t){return YD(t)&&"[object Map]"==PD(t)},UD=SA,$D=OA.exports,WD=$D&&$D.isMap,qD=WD?UD(WD):zD,HD=dD,VD=tA;var GD=function(t){return VD(t)&&"[object Set]"==HD(t)},XD=SA,ZD=OA.exports,QD=ZD&&ZD.isSet,KD=QD?XD(QD):GD,JD=YO,tj=zO,ej=XO,nj=aM,rj=yM,ij=mM.exports,aj=vM,oj=OM,sj=FM,cj=qM,lj=XM,uj=dD,hj=pD,dj=DD,fj=FD,pj=mA,gj=vA.exports,yj=qD,mj=OS,vj=KD,bj=nM,_j=fM,wj={};wj["[object Arguments]"]=wj["[object Array]"]=wj["[object ArrayBuffer]"]=wj["[object DataView]"]=wj["[object Boolean]"]=wj["[object Date]"]=wj["[object Float32Array]"]=wj["[object Float64Array]"]=wj["[object Int8Array]"]=wj["[object Int16Array]"]=wj["[object Int32Array]"]=wj["[object Map]"]=wj["[object Number]"]=wj["[object Object]"]=wj["[object RegExp]"]=wj["[object Set]"]=wj["[object String]"]=wj["[object Symbol]"]=wj["[object Uint8Array]"]=wj["[object Uint8ClampedArray]"]=wj["[object Uint16Array]"]=wj["[object Uint32Array]"]=!0,wj["[object Error]"]=wj["[object Function]"]=wj["[object WeakMap]"]=!1;var xj=function t(e,n,r,i,a,o){var s,c=1&n,l=2&n,u=4&n;if(r&&(s=a?r(e,i,a,o):r(e)),void 0!==s)return s;if(!mj(e))return e;var h=pj(e);if(h){if(s=hj(e),!c)return aj(e,s)}else{var d=uj(e),f="[object Function]"==d||"[object GeneratorFunction]"==d;if(gj(e))return ij(e,c);if("[object Object]"==d||"[object Arguments]"==d||f&&!a){if(s=l||f?{}:fj(e),!c)return l?sj(e,rj(s,e)):oj(e,nj(s,e))}else{if(!wj[d])return a?e:{};s=dj(e,d,c)}}o||(o=new JD);var p=o.get(e);if(p)return p;o.set(e,s),vj(e)?e.forEach((function(i){s.add(t(i,n,r,i,e,o))})):yj(e)&&e.forEach((function(i,a){s.set(a,t(i,n,r,a,e,o))}));var g=h?void 0:(u?l?lj:cj:l?_j:bj)(e);return tj(g||e,(function(i,a){g&&(i=e[a=i]),ej(s,a,t(i,n,r,a,e,o))})),s},kj=xj;var Cj=function(t){return kj(t,4)};var Tj=function(t){return function(){return t}};var Ej=function(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var c=o[t?s:++i];if(!1===n(a[c],c,a))break}return e}}(),Sj=Ej,Oj=nM;var Aj=function(t,e){return t&&Sj(t,e,Oj)},Mj=KA;var Dj=function(t,e){return function(n,r){if(null==n)return n;if(!Mj(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=Object(n);(e?a--:++a<i)&&!1!==r(o[a],a,o););return n}}(Aj);var jj=function(t){return t},Nj=jj;var Bj=function(t){return"function"==typeof t?t:Nj},Lj=zO,Rj=Dj,Ij=Bj,Fj=mA;var Pj=function(t,e){return(Fj(t)?Lj:Rj)(t,Ij(e))},Yj=Pj,zj=Dj;var Uj=function(t,e){var n=[];return zj(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n};var $j=AO,Wj=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},qj=function(t){return this.__data__.has(t)};function Hj(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new $j;++e<n;)this.add(t[e])}Hj.prototype.add=Hj.prototype.push=Wj,Hj.prototype.has=qj;var Vj=Hj;var Gj=function(t,e){return t.has(e)},Xj=Vj,Zj=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},Qj=Gj;var Kj=function(t,e,n,r,i,a){var o=1&n,s=t.length,c=e.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(t),u=a.get(e);if(l&&u)return l==e&&u==t;var h=-1,d=!0,f=2&n?new Xj:void 0;for(a.set(t,e),a.set(e,t);++h<s;){var p=t[h],g=e[h];if(r)var y=o?r(g,p,h,e,t,a):r(p,g,h,t,e,a);if(void 0!==y){if(y)continue;d=!1;break}if(f){if(!Zj(e,(function(t,e){if(!Qj(f,e)&&(p===t||i(p,t,n,r,a)))return f.push(e)}))){d=!1;break}}else if(p!==g&&!i(p,g,n,r,a)){d=!1;break}}return a.delete(t),a.delete(e),d};var Jj=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},tN=gD,eN=HE,nN=Kj,rN=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},iN=Jj,aN=yS?yS.prototype:void 0,oN=aN?aN.valueOf:void 0;var sN=function(t,e,n,r,i,a,o){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new tN(t),new tN(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return eN(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=rN;case"[object Set]":var c=1&r;if(s||(s=iN),t.size!=e.size&&!c)return!1;var l=o.get(t);if(l)return l==e;r|=2,o.set(t,e);var u=nN(s(t),s(e),r,i,a,o);return o.delete(t),u;case"[object Symbol]":if(oN)return oN.call(t)==oN.call(e)}return!1},cN=qM,lN=Object.prototype.hasOwnProperty;var uN=YO,hN=Kj,dN=sN,fN=function(t,e,n,r,i,a){var o=1&n,s=cN(t),c=s.length;if(c!=cN(e).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in e:lN.call(e,u)))return!1}var h=a.get(t),d=a.get(e);if(h&&d)return h==e&&d==t;var f=!0;a.set(t,e),a.set(e,t);for(var p=o;++l<c;){var g=t[u=s[l]],y=e[u];if(r)var m=o?r(y,g,u,e,t,a):r(g,y,u,t,e,a);if(!(void 0===m?g===y||i(g,y,n,r,a):m)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var v=t.constructor,b=e.constructor;v==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(f=!1)}return a.delete(t),a.delete(e),f},pN=dD,gN=mA,yN=vA.exports,mN=NA,vN=Object.prototype.hasOwnProperty;var bN=function(t,e,n,r,i,a){var o=gN(t),s=gN(e),c=o?"[object Array]":pN(t),l=s?"[object Array]":pN(e),u="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),h="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),d=c==l;if(d&&yN(t)){if(!yN(e))return!1;o=!0,u=!1}if(d&&!u)return a||(a=new uN),o||mN(t)?hN(t,e,n,r,i,a):dN(t,e,c,n,r,i,a);if(!(1&n)){var f=u&&vN.call(t,"__wrapped__"),p=h&&vN.call(e,"__wrapped__");if(f||p){var g=f?t.value():t,y=p?e.value():e;return a||(a=new uN),i(g,y,n,r,a)}}return!!d&&(a||(a=new uN),fN(t,e,n,r,i,a))},_N=tA;var wN=function t(e,n,r,i,a){return e===n||(null==e||null==n||!_N(e)&&!_N(n)?e!=e&&n!=n:bN(e,n,r,i,t,a))},xN=YO,kN=wN;var CN=OS;var TN=function(t){return t==t&&!CN(t)},EN=TN,SN=nM;var ON=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}},AN=function(t,e,n,r){var i=n.length,a=i,o=!r;if(null==t)return!a;for(t=Object(t);i--;){var s=n[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var c=(s=n[i])[0],l=t[c],u=s[1];if(o&&s[2]){if(void 0===l&&!(c in t))return!1}else{var h=new xN;if(r)var d=r(l,u,c,t,e,h);if(!(void 0===d?kN(u,l,3,r,h):d))return!1}}return!0},MN=function(t){for(var e=SN(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,EN(i)]}return e},DN=ON;var jN=function(t){var e=MN(t);return 1==e.length&&e[0][2]?DN(e[0][0],e[0][1]):function(n){return n===t||AN(n,t,e)}},NN=SS,BN=tA;var LN=function(t){return"symbol"==typeof t||BN(t)&&"[object Symbol]"==NN(t)},RN=mA,IN=LN,FN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,PN=/^\w*$/;var YN=function(t,e){if(RN(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!IN(t))||(PN.test(t)||!FN.test(t)||null!=e&&t in Object(e))},zN=AO;function UN(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(UN.Cache||zN),n}UN.Cache=zN;var $N=UN;var WN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qN=/\\(\\)?/g,HN=function(t){var e=$N(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(WN,(function(t,n,r,i){e.push(r?i.replace(qN,"$1"):n||t)})),e}));var VN=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i},GN=VN,XN=mA,ZN=LN,QN=yS?yS.prototype:void 0,KN=QN?QN.toString:void 0;var JN=function t(e){if("string"==typeof e)return e;if(XN(e))return GN(e,t)+"";if(ZN(e))return KN?KN.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n};var tB=function(t){return null==t?"":JN(t)},eB=mA,nB=YN,rB=HN,iB=tB;var aB=function(t,e){return eB(t)?t:nB(t,e)?[t]:rB(iB(t))},oB=LN;var sB=function(t){if("string"==typeof t||oB(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e},cB=aB,lB=sB;var uB=function(t,e){for(var n=0,r=(e=cB(e,t)).length;null!=t&&n<r;)t=t[lB(e[n++])];return n&&n==r?t:void 0},hB=uB;var dB=aB,fB=yA,pB=mA,gB=_A,yB=wA,mB=sB;var vB=function(t,e,n){for(var r=-1,i=(e=dB(e,t)).length,a=!1;++r<i;){var o=mB(e[r]);if(!(a=null!=t&&n(t,o)))break;t=t[o]}return a||++r!=i?a:!!(i=null==t?0:t.length)&&yB(i)&&gB(o,i)&&(pB(t)||fB(t))},bB=function(t,e){return null!=t&&e in Object(t)},_B=vB;var wB=function(t,e){return null!=t&&_B(t,e,bB)},xB=wN,kB=function(t,e,n){var r=null==t?void 0:hB(t,e);return void 0===r?n:r},CB=wB,TB=YN,EB=TN,SB=ON,OB=sB;var AB=function(t){return function(e){return null==e?void 0:e[t]}},MB=uB;var DB=AB,jB=function(t){return function(e){return MB(e,t)}},NB=YN,BB=sB;var LB=jN,RB=function(t,e){return TB(t)&&EB(e)?SB(OB(t),e):function(n){var r=kB(n,t);return void 0===r&&r===e?CB(n,t):xB(e,r,3)}},IB=jj,FB=mA,PB=function(t){return NB(t)?DB(BB(t)):jB(t)};var YB=function(t){return"function"==typeof t?t:null==t?IB:"object"==typeof t?FB(t)?RB(t[0],t[1]):LB(t):PB(t)},zB=bM,UB=Uj,$B=YB,WB=mA;var qB=function(t,e){return(WB(t)?zB:UB)(t,$B(e))},HB=Object.prototype.hasOwnProperty;var VB=function(t,e){return null!=t&&HB.call(t,e)},GB=vB;var XB=function(t,e){return null!=t&&GB(t,e,VB)},ZB=XA,QB=dD,KB=yA,JB=mA,tL=KA,eL=vA.exports,nL=$A,rL=NA,iL=Object.prototype.hasOwnProperty;var aL=function(t){if(null==t)return!0;if(tL(t)&&(JB(t)||"string"==typeof t||"function"==typeof t.splice||eL(t)||rL(t)||KB(t)))return!t.length;var e=QB(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(nL(t))return!ZB(t).length;for(var n in t)if(iL.call(t,n))return!1;return!0};var oL=function(t){return void 0===t},sL=Dj,cL=KA;var lL=function(t,e){var n=-1,r=cL(t)?Array(t.length):[];return sL(t,(function(t,i,a){r[++n]=e(t,i,a)})),r},uL=VN,hL=YB,dL=lL,fL=mA;var pL=function(t,e){return(fL(t)?uL:dL)(t,hL(e))};var gL=function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n},yL=Dj,mL=YB,vL=function(t,e,n,r,i){return i(t,(function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)})),n},bL=mA;var _L=function(t,e,n){var r=bL(t)?gL:vL,i=arguments.length<3;return r(t,mL(e),n,i,yL)},wL=SS,xL=mA,kL=tA;var CL=function(t){return"string"==typeof t||!xL(t)&&kL(t)&&"[object String]"==wL(t)},TL=AB("length"),EL=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var SL=function(t){return EL.test(t)},OL="[\\ud800-\\udfff]",AL="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ML="\\ud83c[\\udffb-\\udfff]",DL="[^\\ud800-\\udfff]",jL="(?:\\ud83c[\\udde6-\\uddff]){2}",NL="[\\ud800-\\udbff][\\udc00-\\udfff]",BL="(?:"+AL+"|"+ML+")"+"?",LL="[\\ufe0e\\ufe0f]?"+BL+("(?:\\u200d(?:"+[DL,jL,NL].join("|")+")[\\ufe0e\\ufe0f]?"+BL+")*"),RL="(?:"+[DL+AL+"?",AL,jL,NL,OL].join("|")+")",IL=RegExp(ML+"(?="+ML+")|"+RL+LL,"g");var FL=TL,PL=SL,YL=function(t){for(var e=IL.lastIndex=0;IL.test(t);)++e;return e};var zL=XA,UL=dD,$L=KA,WL=CL,qL=function(t){return PL(t)?YL(t):FL(t)};var HL=function(t){if(null==t)return 0;if($L(t))return WL(t)?qL(t):t.length;var e=UL(t);return"[object Map]"==e||"[object Set]"==e?t.size:zL(t).length},VL=zO,GL=BD,XL=Aj,ZL=YB,QL=MM,KL=mA,JL=vA.exports,tR=jS,eR=OS,nR=NA;var rR=function(t,e,n){var r=KL(t),i=r||JL(t)||nR(t);if(e=ZL(e),null==n){var a=t&&t.constructor;n=i?r?new a:[]:eR(t)&&tR(a)?GL(QL(t)):{}}return(i?VL:XL)(t,(function(t,r,i){return e(n,t,r,i)})),n},iR=yA,aR=mA,oR=yS?yS.isConcatSpreadable:void 0;var sR=AM,cR=function(t){return aR(t)||iR(t)||!!(oR&&t&&t[oR])};var lR=function t(e,n,r,i,a){var o=-1,s=e.length;for(r||(r=cR),a||(a=[]);++o<s;){var c=e[o];n>0&&r(c)?n>1?t(c,n-1,r,i,a):sR(a,c):i||(a[a.length]=c)}return a};var uR=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},hR=Math.max;var dR=function(t,e,n){return e=hR(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=hR(r.length-e,0),o=Array(a);++i<a;)o[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(o),uR(t,this,s)}},fR=Tj,pR=$O,gR=pR?function(t,e){return pR(t,"toString",{configurable:!0,enumerable:!1,value:fR(e),writable:!0})}:jj,yR=Date.now;var mR=function(t){var e=0,n=0;return function(){var r=yR(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(gR),vR=jj,bR=dR,_R=mR;var wR=function(t,e){return _R(bR(t,e,vR),t+"")};var xR=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1};var kR=xR,CR=function(t){return t!=t},TR=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1};var ER=function(t,e,n){return e==e?TR(t,e,n):kR(t,CR,n)};var SR=function(t,e){return!!(null==t?0:t.length)&&ER(t,e,0)>-1};var OR=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1};var AR=KM,MR=function(){},DR=AR&&1/Jj(new AR([,-0]))[1]==1/0?function(t){return new AR(t)}:MR,jR=Vj,NR=SR,BR=OR,LR=Gj,RR=DR,IR=Jj;var FR=KA,PR=tA;var YR=function(t){return PR(t)&&FR(t)},zR=lR,UR=function(t,e,n){var r=-1,i=NR,a=t.length,o=!0,s=[],c=s;if(n)o=!1,i=BR;else if(a>=200){var l=e?null:RR(t);if(l)return IR(l);o=!1,i=LR,c=new jR}else c=e?[]:s;t:for(;++r<a;){var u=t[r],h=e?e(u):u;if(u=n||0!==u?u:0,o&&h==h){for(var d=c.length;d--;)if(c[d]===h)continue t;e&&c.push(h),s.push(u)}else i(c,h,n)||(c!==s&&c.push(h),s.push(u))}return s},$R=YR,WR=wR((function(t){return UR(zR(t,1,$R,!0))})),qR=VN;var HR=function(t,e){return qR(e,(function(e){return t[e]}))},VR=nM;var GR,XR=function(t){return null==t?[]:HR(t,VR(t))};if("function"==typeof require)try{GR={clone:Cj,constant:Tj,each:Yj,filter:qB,has:XB,isArray:mA,isEmpty:aL,isFunction:jS,isUndefined:oL,keys:nM,map:pL,reduce:_L,size:HL,transform:rR,union:WR,values:XR}}catch(zG){}GR||(GR=window._);var ZR=GR,QR=ZR,KR=JR;function JR(t){this._isDirected=!QR.has(t,"directed")||t.directed,this._isMultigraph=!!QR.has(t,"multigraph")&&t.multigraph,this._isCompound=!!QR.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=QR.constant(void 0),this._defaultEdgeLabelFn=QR.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function tI(t,e){t[e]?t[e]++:t[e]=1}function eI(t,e){--t[e]||delete t[e]}function nI(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}return i+""+a+""+(QR.isUndefined(r)?"\0":r)}function rI(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function iI(t,e){return nI(t,e.v,e.w,e.name)}JR.prototype._nodeCount=0,JR.prototype._edgeCount=0,JR.prototype.isDirected=function(){return this._isDirected},JR.prototype.isMultigraph=function(){return this._isMultigraph},JR.prototype.isCompound=function(){return this._isCompound},JR.prototype.setGraph=function(t){return this._label=t,this},JR.prototype.graph=function(){return this._label},JR.prototype.setDefaultNodeLabel=function(t){return QR.isFunction(t)||(t=QR.constant(t)),this._defaultNodeLabelFn=t,this},JR.prototype.nodeCount=function(){return this._nodeCount},JR.prototype.nodes=function(){return QR.keys(this._nodes)},JR.prototype.sources=function(){var t=this;return QR.filter(this.nodes(),(function(e){return QR.isEmpty(t._in[e])}))},JR.prototype.sinks=function(){var t=this;return QR.filter(this.nodes(),(function(e){return QR.isEmpty(t._out[e])}))},JR.prototype.setNodes=function(t,e){var n=arguments,r=this;return QR.each(t,(function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this},JR.prototype.setNode=function(t,e){return QR.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},JR.prototype.node=function(t){return this._nodes[t]},JR.prototype.hasNode=function(t){return QR.has(this._nodes,t)},JR.prototype.removeNode=function(t){var e=this;if(QR.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],QR.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),QR.each(QR.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],QR.each(QR.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},JR.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(QR.isUndefined(e))e="\0";else{for(var n=e+="";!QR.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},JR.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},JR.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}},JR.prototype.children=function(t){if(QR.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return QR.keys(e)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},JR.prototype.predecessors=function(t){var e=this._preds[t];if(e)return QR.keys(e)},JR.prototype.successors=function(t){var e=this._sucs[t];if(e)return QR.keys(e)},JR.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return QR.union(e,this.successors(t))},JR.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},JR.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;QR.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),QR.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function i(t){var a=n.parent(t);return void 0===a||e.hasNode(a)?(r[t]=a,a):a in r?r[a]:i(a)}return this._isCompound&&QR.each(e.nodes(),(function(t){e.setParent(t,i(t))})),e},JR.prototype.setDefaultEdgeLabel=function(t){return QR.isFunction(t)||(t=QR.constant(t)),this._defaultEdgeLabelFn=t,this},JR.prototype.edgeCount=function(){return this._edgeCount},JR.prototype.edges=function(){return QR.values(this._edgeObjs)},JR.prototype.setPath=function(t,e){var n=this,r=arguments;return QR.reduce(t,(function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this},JR.prototype.setEdge=function(){var t,e,n,r,i=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(t=a.v,e=a.w,n=a.name,2===arguments.length&&(r=arguments[1],i=!0)):(t=a,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),t=""+t,e=""+e,QR.isUndefined(n)||(n=""+n);var o=nI(this._isDirected,t,e,n);if(QR.has(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!QR.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(t,e,n);var s=rI(this._isDirected,t,e,n);return t=s.v,e=s.w,Object.freeze(s),this._edgeObjs[o]=s,tI(this._preds[e],t),tI(this._sucs[t],e),this._in[e][o]=s,this._out[t][o]=s,this._edgeCount++,this},JR.prototype.edge=function(t,e,n){var r=1===arguments.length?iI(this._isDirected,arguments[0]):nI(this._isDirected,t,e,n);return this._edgeLabels[r]},JR.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?iI(this._isDirected,arguments[0]):nI(this._isDirected,t,e,n);return QR.has(this._edgeLabels,r)},JR.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?iI(this._isDirected,arguments[0]):nI(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],eI(this._preds[e],t),eI(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},JR.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=QR.values(n);return e?QR.filter(r,(function(t){return t.v===e})):r}},JR.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=QR.values(n);return e?QR.filter(r,(function(t){return t.w===e})):r}},JR.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))};var aI={Graph:KR,version:"2.1.8"},oI=ZR,sI=KR,cI={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:lI(t),edges:uI(t)};oI.isUndefined(t.graph())||(e.value=oI.clone(t.graph()));return e},read:function(t){var e=new sI(t.options).setGraph(t.value);return oI.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),oI.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}};function lI(t){return oI.map(t.nodes(),(function(e){var n=t.node(e),r=t.parent(e),i={v:e};return oI.isUndefined(n)||(i.value=n),oI.isUndefined(r)||(i.parent=r),i}))}function uI(t){return oI.map(t.edges(),(function(e){var n=t.edge(e),r={v:e.v,w:e.w};return oI.isUndefined(e.name)||(r.name=e.name),oI.isUndefined(n)||(r.value=n),r}))}var hI=ZR,dI=function(t){var e,n={},r=[];function i(r){hI.has(n,r)||(n[r]=!0,e.push(r),hI.each(t.successors(r),i),hI.each(t.predecessors(r),i))}return hI.each(t.nodes(),(function(t){e=[],i(t),e.length&&r.push(e)})),r};var fI=ZR,pI=gI;function gI(){this._arr=[],this._keyIndices={}}gI.prototype.size=function(){return this._arr.length},gI.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},gI.prototype.has=function(t){return fI.has(this._keyIndices,t)},gI.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},gI.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},gI.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!fI.has(n,t)){var r=this._arr,i=r.length;return n[t]=i,r.push({key:t,priority:e}),this._decrease(i),!0}return!1},gI.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},gI.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},gI.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},gI.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},gI.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],a=n[e];n[t]=a,n[e]=i,r[a.key]=t,r[i.key]=e};var yI=pI,mI=function(t,e,n,r){return function(t,e,n,r){var i,a,o={},s=new yI,c=function(t){var e=t.v!==i?t.v:t.w,r=o[e],c=n(t),l=a.distance+c;if(c<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+c);l<r.distance&&(r.distance=l,r.predecessor=i,s.decrease(e,l))};t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;o[t]={distance:n},s.add(t,n)}));for(;s.size()>0&&(i=s.removeMin(),(a=o[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return o}(t,String(e),n||vI,r||function(e){return t.outEdges(e)})},vI=ZR.constant(1);var bI=mI,_I=ZR,wI=function(t,e,n){return _I.transform(t.nodes(),(function(r,i){r[i]=bI(t,i,e,n)}),{})};var xI=ZR,kI=function(t){var e=0,n=[],r={},i=[];function a(o){var s=r[o]={onStack:!0,lowlink:e,index:e++};if(n.push(o),t.successors(o).forEach((function(t){xI.has(r,t)?r[t].onStack&&(s.lowlink=Math.min(s.lowlink,r[t].index)):(a(t),s.lowlink=Math.min(s.lowlink,r[t].lowlink))})),s.lowlink===s.index){var c,l=[];do{c=n.pop(),r[c].onStack=!1,l.push(c)}while(o!==c);i.push(l)}}return t.nodes().forEach((function(t){xI.has(r,t)||a(t)})),i};var CI=ZR,TI=kI,EI=function(t){return CI.filter(TI(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))};var SI=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var a=r[n];i.forEach((function(n){var r=a[t],i=e[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)}))}))})),r}(t,e||OI,n||function(e){return t.outEdges(e)})},OI=ZR.constant(1);var AI=ZR,MI=DI;function DI(t){var e={},n={},r=[];if(AI.each(t.sinks(),(function i(a){if(AI.has(n,a))throw new jI;AI.has(e,a)||(n[a]=!0,e[a]=!0,AI.each(t.predecessors(a),i),delete n[a],r.push(a))})),AI.size(e)!==t.nodeCount())throw new jI;return r}function jI(){}DI.CycleException=jI,jI.prototype=new Error;var NI=MI;var BI=ZR,LI=function(t,e,n){BI.isArray(e)||(e=[e]);var r=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return BI.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);RI(t,e,"post"===n,a,r,i)})),i};function RI(t,e,n,r,i,a){BI.has(r,e)||(r[e]=!0,n||a.push(e),BI.each(i(e),(function(e){RI(t,e,n,r,i,a)})),n&&a.push(e))}var II=LI;var FI=LI;var PI=ZR,YI=KR,zI=pI;var UI,$I={Graph:aI.Graph,json:cI,alg:{components:dI,dijkstra:mI,dijkstraAll:wI,findCycles:EI,floydWarshall:SI,isAcyclic:function(t){try{NI(t)}catch(zG){if(zG instanceof NI.CycleException)return!1;throw zG}return!0},postorder:function(t,e){return II(t,e,"post")},preorder:function(t,e){return FI(t,e,"pre")},prim:function(t,e){var n,r=new YI,i={},a=new zI;function o(t){var r=t.v===n?t.w:t.v,o=a.priority(r);if(void 0!==o){var s=e(t);s<o&&(i[r]=n,a.decrease(r,s))}}if(0===t.nodeCount())return r;PI.each(t.nodes(),(function(t){a.add(t,Number.POSITIVE_INFINITY),r.setNode(t)})),a.decrease(t.nodes()[0],0);var s=!1;for(;a.size()>0;){if(n=a.removeMin(),PI.has(i,n))r.setEdge(n,i[n]);else{if(s)throw new Error("Input graph is not connected: "+t);s=!0}t.nodeEdges(n).forEach(o)}return r},tarjan:kI,topsort:MI},version:aI.version};if("function"==typeof require)try{UI=$I}catch(zG){}UI||(UI=window.graphlib);var WI=UI,qI=xj;var HI=function(t){return qI(t,5)},VI=HE,GI=KA,XI=_A,ZI=OS;var QI=function(t,e,n){if(!ZI(n))return!1;var r=typeof e;return!!("number"==r?GI(n)&&XI(e,n.length):"string"==r&&e in n)&&VI(n[e],t)},KI=wR,JI=HE,tF=QI,eF=fM,nF=Object.prototype,rF=nF.hasOwnProperty,iF=KI((function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&tF(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],o=eF(a),s=-1,c=o.length;++s<c;){var l=o[s],u=t[l];(void 0===u||JI(u,nF[l])&&!rF.call(t,l))&&(t[l]=a[l])}return t})),aF=YB,oF=KA,sF=nM;var cF=function(t){return function(e,n,r){var i=Object(e);if(!oF(e)){var a=aF(n);e=sF(e),n=function(t){return a(i[t],t,i)}}var o=t(e,n,r);return o>-1?i[a?e[o]:o]:void 0}},lF=/\s/;var uF=function(t){for(var e=t.length;e--&&lF.test(t.charAt(e)););return e},hF=/^\s+/;var dF=function(t){return t?t.slice(0,uF(t)+1).replace(hF,""):t},fF=OS,pF=LN,gF=/^[-+]0x[0-9a-f]+$/i,yF=/^0b[01]+$/i,mF=/^0o[0-7]+$/i,vF=parseInt;var bF=function(t){if("number"==typeof t)return t;if(pF(t))return NaN;if(fF(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=fF(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=dF(t);var n=yF.test(t);return n||mF.test(t)?vF(t.slice(2),n?2:8):gF.test(t)?NaN:+t};var _F=function(t){return t?Infinity===(t=bF(t))||-Infinity===t?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0},wF=_F;var xF=xR,kF=YB,CF=function(t){var e=wF(t),n=e%1;return e==e?n?e-n:e:0},TF=Math.max;var EF=cF((function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:CF(n);return i<0&&(i=TF(r+i,0)),xF(t,kF(e),i)})),SF=lR;var OF=function(t){return(null==t?0:t.length)?SF(t,1):[]},AF=Ej,MF=Bj,DF=fM;var jF=function(t,e){return null==t?t:AF(t,MF(e),DF)};var NF=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},BF=qO,LF=Aj,RF=YB;var IF=function(t,e){var n={};return e=RF(e),LF(t,(function(t,r,i){BF(n,r,e(t,r,i))})),n},FF=LN;var PF=function(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],o=e(a);if(null!=o&&(void 0===s?o==o&&!FF(o):n(o,s)))var s=o,c=a}return c};var YF=PF,zF=function(t,e){return t>e},UF=jj;var $F=function(t){return t&&t.length?YF(t,UF,zF):void 0},WF=qO,qF=HE;var HF=function(t,e,n){(void 0!==n&&!qF(t[e],n)||void 0===n&&!(e in t))&&WF(t,e,n)},VF=SS,GF=MM,XF=tA,ZF=Function.prototype,QF=Object.prototype,KF=ZF.toString,JF=QF.hasOwnProperty,tP=KF.call(Object);var eP=function(t){if(!XF(t)||"[object Object]"!=VF(t))return!1;var e=GF(t);if(null===e)return!0;var n=JF.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&KF.call(n)==tP};var nP=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},rP=KO,iP=fM;var aP=HF,oP=mM.exports,sP=TD,cP=vM,lP=FD,uP=yA,hP=mA,dP=YR,fP=vA.exports,pP=jS,gP=OS,yP=eP,mP=NA,vP=nP,bP=function(t){return rP(t,iP(t))};var _P=YO,wP=HF,xP=Ej,kP=function(t,e,n,r,i,a,o){var s=vP(t,n),c=vP(e,n),l=o.get(c);if(l)aP(t,n,l);else{var u=a?a(s,c,n+"",t,e,o):void 0,h=void 0===u;if(h){var d=hP(c),f=!d&&fP(c),p=!d&&!f&&mP(c);u=c,d||f||p?hP(s)?u=s:dP(s)?u=cP(s):f?(h=!1,u=oP(c,!0)):p?(h=!1,u=sP(c,!0)):u=[]:yP(c)||uP(c)?(u=s,uP(s)?u=bP(s):gP(s)&&!pP(s)||(u=lP(c))):h=!1}h&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),aP(t,n,u)}},CP=OS,TP=fM,EP=nP;var SP=wR,OP=QI;var AP=function t(e,n,r,i,a){e!==n&&xP(n,(function(o,s){if(a||(a=new _P),CP(o))kP(e,n,s,r,t,i,a);else{var c=i?i(EP(e,s),o,s+"",e,n,a):void 0;void 0===c&&(c=o),wP(e,s,c)}}),TP)},MP=function(t){return SP((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,o&&OP(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,a)}return e}))}((function(t,e,n){AP(t,e,n)}));var DP=function(t,e){return t<e},jP=PF,NP=DP,BP=jj;var LP=function(t){return t&&t.length?jP(t,BP,NP):void 0},RP=PF,IP=YB,FP=DP;var PP=function(t,e){return t&&t.length?RP(t,IP(e),FP):void 0},YP=gS,zP=function(){return YP.Date.now()},UP=XO,$P=aB,WP=_A,qP=OS,HP=sB;var VP=uB,GP=function(t,e,n,r){if(!qP(t))return t;for(var i=-1,a=(e=$P(e,t)).length,o=a-1,s=t;null!=s&&++i<a;){var c=HP(e[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(i!=o){var u=s[c];void 0===(l=r?r(u,c,s):void 0)&&(l=qP(u)?u:WP(e[i+1])?[]:{})}UP(s,c,l),s=s[c]}return t},XP=aB;var ZP=function(t,e,n){for(var r=-1,i=e.length,a={};++r<i;){var o=e[r],s=VP(t,o);n(s,o)&&GP(a,XP(o,t),s)}return a},QP=wB;var KP=OF,JP=dR,tY=mR;var eY=function(t,e){return ZP(t,e,(function(e,n){return QP(t,n)}))},nY=function(t){return tY(JP(t,void 0,KP),t+"")}((function(t,e){return null==t?{}:eY(t,e)})),rY=Math.ceil,iY=Math.max;var aY=function(t,e,n,r){for(var i=-1,a=iY(rY((e-t)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=t,t+=n;return o},oY=QI,sY=_F;var cY=function(t){return function(e,n,r){return r&&"number"!=typeof r&&oY(e,n,r)&&(n=r=void 0),e=sY(e),void 0===n?(n=e,e=0):n=sY(n),r=void 0===r?e<n?1:-1:sY(r),aY(e,n,r,t)}}();var lY=LN;var uY=function(t,e){if(t!==e){var n=void 0!==t,r=null===t,i=t==t,a=lY(t),o=void 0!==e,s=null===e,c=e==e,l=lY(e);if(!s&&!l&&!a&&t>e||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!c)return-1}return 0};var hY=VN,dY=uB,fY=YB,pY=lL,gY=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t},yY=SA,mY=function(t,e,n){for(var r=-1,i=t.criteria,a=e.criteria,o=i.length,s=n.length;++r<o;){var c=uY(i[r],a[r]);if(c)return r>=s?c:c*("desc"==n[r]?-1:1)}return t.index-e.index},vY=jj,bY=mA;var _Y=lR,wY=function(t,e,n){e=e.length?hY(e,(function(t){return bY(t)?function(e){return dY(e,1===t.length?t[0]:t)}:t})):[vY];var r=-1;e=hY(e,yY(fY));var i=pY(t,(function(t,n,i){return{criteria:hY(e,(function(e){return e(t)})),index:++r,value:t}}));return gY(i,(function(t,e){return mY(t,e,n)}))},xY=QI,kY=wR((function(t,e){if(null==t)return[];var n=e.length;return n>1&&xY(t,e[0],e[1])?e=[]:n>2&&xY(e[0],e[1],e[2])&&(e=[e[0]]),wY(t,_Y(e,1),[])})),CY=tB,TY=0;var EY=function(t){var e=++TY;return CY(t)+e};var SY=XO,OY=function(t,e,n){for(var r=-1,i=t.length,a=e.length,o={};++r<i;){var s=r<a?e[r]:void 0;n(o,t[r],s)}return o};var AY,MY=function(t,e){return OY(t||[],e||[],SY)};if("function"==typeof require)try{AY={cloneDeep:HI,constant:Tj,defaults:iF,each:Yj,filter:qB,find:EF,flatten:OF,forEach:Pj,forIn:jF,has:XB,isUndefined:oL,last:NF,map:pL,mapValues:IF,max:$F,merge:MP,min:LP,minBy:PP,now:zP,pick:nY,range:cY,reduce:_L,sortBy:kY,uniqueId:EY,values:XR,zipObject:MY}}catch(zG){}AY||(AY=window._);var DY=AY,jY=NY;function NY(){var t={};t._next=t._prev=t,this._sentinel=t}function BY(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function LY(t,e){if("_next"!==t&&"_prev"!==t)return e}NY.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return BY(e),e},NY.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&BY(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},NY.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,LY)),n=n._prev;return"["+t.join(", ")+"]"};var RY=DY,IY=WI.Graph,FY=jY,PY=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new IY,r=0,i=0;RY.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),RY.forEach(t.edges(),(function(t){var a=n.edge(t.v,t.w)||0,o=e(t),s=a+o;n.setEdge(t.v,t.w,s),i=Math.max(i,n.node(t.v).out+=o),r=Math.max(r,n.node(t.w).in+=o)}));var a=RY.range(i+r+3).map((function(){return new FY})),o=r+1;return RY.forEach(n.nodes(),(function(t){UY(a,o,n.node(t))})),{graph:n,buckets:a,zeroIdx:o}}(t,e||YY),r=function(t,e,n){var r,i=[],a=e[e.length-1],o=e[0];for(;t.nodeCount();){for(;r=o.dequeue();)zY(t,e,n,r);for(;r=a.dequeue();)zY(t,e,n,r);if(t.nodeCount())for(var s=e.length-2;s>0;--s)if(r=e[s].dequeue()){i=i.concat(zY(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return RY.flatten(RY.map(r,(function(e){return t.outEdges(e.v,e.w)})),!0)},YY=RY.constant(1);function zY(t,e,n,r,i){var a=i?[]:void 0;return RY.forEach(t.inEdges(r.v),(function(r){var o=t.edge(r),s=t.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,UY(e,n,s)})),RY.forEach(t.outEdges(r.v),(function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,UY(e,n,o)})),t.removeNode(r.v),a}function UY(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}var $Y=DY,WY=PY,qY={run:function(t){var e="greedy"===t.graph().acyclicer?WY(t,(n=t,function(t){return n.edge(t).weight})):function(t){var e=[],n={},r={};function i(a){$Y.has(r,a)||(r[a]=!0,n[a]=!0,$Y.forEach(t.outEdges(a),(function(t){$Y.has(n,t.w)?e.push(t):i(t.w)})),delete n[a])}return $Y.forEach(t.nodes(),i),e}(t);var n;$Y.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,$Y.uniqueId("rev"))}))},undo:function(t){$Y.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}};var HY=DY,VY=WI.Graph,GY={addDummyNode:XY,simplify:function(t){var e=(new VY).setGraph(t.graph());return HY.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),HY.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new VY({multigraph:t.isMultigraph()}).setGraph(t.graph());return HY.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),HY.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=HY.map(t.nodes(),(function(e){var n={};return HY.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return HY.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=HY.map(t.nodes(),(function(e){var n={};return HY.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return HY.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,l=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),n=l*o/s,r=l):(o<0&&(c=-c),n=c,r=c*s/o);return{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=HY.map(HY.range(ZY(t)+1),(function(){return[]}));return HY.forEach(t.nodes(),(function(n){var r=t.node(n),i=r.rank;HY.isUndefined(i)||(e[i][r.order]=n)})),e},normalizeRanks:function(t){var e=HY.min(HY.map(t.nodes(),(function(e){return t.node(e).rank})));HY.forEach(t.nodes(),(function(n){var r=t.node(n);HY.has(r,"rank")&&(r.rank-=e)}))},removeEmptyRanks:function(t){var e=HY.min(HY.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];HY.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var r=0,i=t.graph().nodeRankFactor;HY.forEach(n,(function(e,n){HY.isUndefined(e)&&n%i!=0?--r:r&&HY.forEach(e,(function(e){t.node(e).rank+=r}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return XY(t,"border",i,e)},maxRank:ZY,partition:function(t,e){var n={lhs:[],rhs:[]};return HY.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=HY.now();try{return e()}finally{console.log(t+" time: "+(HY.now()-n)+"ms")}},notime:function(t,e){return e()}};function XY(t,e,n,r){var i;do{i=HY.uniqueId(r)}while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function ZY(t){return HY.max(HY.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!HY.isUndefined(n))return n})))}var QY=DY,KY=GY,JY={run:function(t){t.graph().dummyChains=[],QY.forEach(t.edges(),(function(e){!function(t,e){var n,r,i,a=e.v,o=t.node(a).rank,s=e.w,c=t.node(s).rank,l=e.name,u=t.edge(e),h=u.labelRank;if(c===o+1)return;for(t.removeEdge(e),i=0,++o;o<c;++i,++o)u.points=[],r={width:0,height:0,edgeLabel:u,edgeObj:e,rank:o},n=KY.addDummyNode(t,"edge",r,"_d"),o===h&&(r.width=u.width,r.height=u.height,r.dummy="edge-label",r.labelpos=u.labelpos),t.setEdge(a,n,{weight:u.weight},l),0===i&&t.graph().dummyChains.push(n),a=n;t.setEdge(a,s,{weight:u.weight},l)}(t,e)}))},undo:function(t){QY.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}};var tz=DY,ez={longestPath:function(t){var e={};tz.forEach(t.sources(),(function n(r){var i=t.node(r);if(tz.has(e,r))return i.rank;e[r]=!0;var a=tz.min(tz.map(t.outEdges(r),(function(e){return n(e.w)-t.edge(e).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),i.rank=a}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}};var nz=DY,rz=WI.Graph,iz=ez.slack,az=function(t){var e,n,r=new rz({directed:!1}),i=t.nodes()[0],a=t.nodeCount();r.setNode(i,{});for(;oz(r,t)<a;)e=sz(r,t),n=r.hasNode(e.v)?iz(t,e):-iz(t,e),cz(r,t,n);return r};function oz(t,e){return nz.forEach(t.nodes(),(function n(r){nz.forEach(e.nodeEdges(r),(function(i){var a=i.v,o=r===a?i.w:a;t.hasNode(o)||iz(e,i)||(t.setNode(o,{}),t.setEdge(r,o,{}),n(o))}))})),t.nodeCount()}function sz(t,e){return nz.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return iz(e,n)}))}function cz(t,e,n){nz.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}var lz=DY,uz=az,hz=ez.slack,dz=ez.longestPath,fz=WI.alg.preorder,pz=WI.alg.postorder,gz=GY.simplify,yz=mz;function mz(t){t=gz(t),dz(t);var e,n=uz(t);for(_z(n),vz(n,t);e=xz(n);)Cz(n,t,e,kz(n,t,e))}function vz(t,e){var n=pz(t,t.nodes());n=n.slice(0,n.length-1),lz.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=bz(t,e,n)}(t,e,n)}))}function bz(t,e,n){var r=t.node(n).parent,i=!0,a=e.edge(n,r),o=0;return a||(i=!1,a=e.edge(r,n)),o=a.weight,lz.forEach(e.nodeEdges(n),(function(a){var s,c,l=a.v===n,u=l?a.w:a.v;if(u!==r){var h=l===i,d=e.edge(a).weight;if(o+=h?d:-d,s=n,c=u,t.hasEdge(s,c)){var f=t.edge(n,u).cutvalue;o+=h?-f:f}}})),o}function _z(t,e){arguments.length<2&&(e=t.nodes()[0]),wz(t,{},1,e)}function wz(t,e,n,r,i){var a=n,o=t.node(r);return e[r]=!0,lz.forEach(t.neighbors(r),(function(i){lz.has(e,i)||(n=wz(t,e,n,i,r))})),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function xz(t){return lz.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function kz(t,e,n){var r=n.v,i=n.w;e.hasEdge(r,i)||(r=n.w,i=n.v);var a=t.node(r),o=t.node(i),s=a,c=!1;a.lim>o.lim&&(s=o,c=!0);var l=lz.filter(e.edges(),(function(e){return c===Tz(t,t.node(e.v),s)&&c!==Tz(t,t.node(e.w),s)}));return lz.minBy(l,(function(t){return hz(e,t)}))}function Cz(t,e,n,r){var i=n.v,a=n.w;t.removeEdge(i,a),t.setEdge(r.v,r.w,{}),_z(t),vz(t,e),function(t,e){var n=lz.find(t.nodes(),(function(t){return!e.node(t).parent})),r=fz(t,n);r=r.slice(1),lz.forEach(r,(function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)}))}(t,e)}function Tz(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}mz.initLowLimValues=_z,mz.initCutValues=vz,mz.calcCutValue=bz,mz.leaveEdge=xz,mz.enterEdge=kz,mz.exchangeEdges=Cz;var Ez=ez.longestPath,Sz=az,Oz=yz,Az=function(t){switch(t.graph().ranker){case"network-simplex":Dz(t);break;case"tight-tree":!function(t){Ez(t),Sz(t)}(t);break;case"longest-path":Mz(t);break;default:Dz(t)}};var Mz=Ez;function Dz(t){Oz(t)}var jz=DY,Nz=function(t){var e=function(t){var e={},n=0;function r(i){var a=n;jz.forEach(t.children(i),r),e[i]={low:a,lim:n++}}return jz.forEach(t.children(),r),e}(t);jz.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],c=Math.min(e[n].low,e[r].low),l=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>c||l>e[i].lim));a=i,i=r;for(;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;n!==i.w;){if(r=t.node(n),u){for(;(l=o[c])!==s&&t.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&t.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}t.setParent(n,l),n=t.successors(n)[0]}}))};var Bz=DY,Lz=GY,Rz={run:function(t){var e=Lz.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(r,i){var a=t.children(r);a&&a.length&&Bz.forEach(a,(function(t){n(t,i+1)})),e[r]=i}return Bz.forEach(t.children(),(function(t){n(t,1)})),e}(t),r=Bz.max(Bz.values(n))-1,i=2*r+1;t.graph().nestingRoot=e,Bz.forEach(t.edges(),(function(e){t.edge(e).minlen*=i}));var a=function(t){return Bz.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;Bz.forEach(t.children(),(function(o){Iz(t,e,i,a,r,n,o)})),t.graph().nodeRankFactor=i},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,Bz.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}};function Iz(t,e,n,r,i,a,o){var s=t.children(o);if(s.length){var c=Lz.addBorderNode(t,"_bt"),l=Lz.addBorderNode(t,"_bb"),u=t.node(o);t.setParent(c,o),u.borderTop=c,t.setParent(l,o),u.borderBottom=l,Bz.forEach(s,(function(s){Iz(t,e,n,r,i,a,s);var u=t.node(s),h=u.borderTop?u.borderTop:s,d=u.borderBottom?u.borderBottom:s,f=u.borderTop?r:2*r,p=h!==d?1:i-a[o]+1;t.setEdge(c,h,{weight:f,minlen:p,nestingEdge:!0}),t.setEdge(d,l,{weight:f,minlen:p,nestingEdge:!0})})),t.parent(o)||t.setEdge(e,c,{weight:0,minlen:i+a[o]})}else o!==e&&t.setEdge(e,o,{weight:0,minlen:n})}var Fz=DY,Pz=GY,Yz=function(t){Fz.forEach(t.children(),(function e(n){var r=t.children(n),i=t.node(n);if(r.length&&Fz.forEach(r,e),Fz.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)zz(t,"borderLeft","_bl",n,i,a),zz(t,"borderRight","_br",n,i,a)}}))};function zz(t,e,n,r,i,a){var o={width:0,height:0,rank:a,borderType:e},s=i[e][a-1],c=Pz.addDummyNode(t,"border",o,n);i[e][a]=c,t.setParent(c,r),s&&t.setEdge(s,c,{weight:1})}var Uz=DY,$z={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||Wz(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){Uz.forEach(t.nodes(),(function(e){Hz(t.node(e))})),Uz.forEach(t.edges(),(function(e){var n=t.edge(e);Uz.forEach(n.points,Hz),Uz.has(n,"y")&&Hz(n)}))}(t);"lr"!==e&&"rl"!==e||(!function(t){Uz.forEach(t.nodes(),(function(e){Vz(t.node(e))})),Uz.forEach(t.edges(),(function(e){var n=t.edge(e);Uz.forEach(n.points,Vz),Uz.has(n,"x")&&Vz(n)}))}(t),Wz(t))}};function Wz(t){Uz.forEach(t.nodes(),(function(e){qz(t.node(e))})),Uz.forEach(t.edges(),(function(e){qz(t.edge(e))}))}function qz(t){var e=t.width;t.width=t.height,t.height=e}function Hz(t){t.y=-t.y}function Vz(t){var e=t.x;t.x=t.y,t.y=e}var Gz=DY,Xz=function(t){var e={},n=Gz.filter(t.nodes(),(function(e){return!t.children(e).length})),r=Gz.max(Gz.map(n,(function(e){return t.node(e).rank}))),i=Gz.map(Gz.range(r+1),(function(){return[]}));var a=Gz.sortBy(n,(function(e){return t.node(e).rank}));return Gz.forEach(a,(function n(r){if(Gz.has(e,r))return;e[r]=!0;var a=t.node(r);i[a.rank].push(r),Gz.forEach(t.successors(r),n)})),i};var Zz=DY,Qz=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=Kz(t,e[r-1],e[r]);return n};function Kz(t,e,n){for(var r=Zz.zipObject(n,Zz.map(n,(function(t,e){return e}))),i=Zz.flatten(Zz.map(e,(function(e){return Zz.sortBy(Zz.map(t.outEdges(e),(function(e){return{pos:r[e.w],weight:t.edge(e).weight}})),"pos")})),!0),a=1;a<n.length;)a<<=1;var o=2*a-1;a-=1;var s=Zz.map(new Array(o),(function(){return 0})),c=0;return Zz.forEach(i.forEach((function(t){var e=t.pos+a;s[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=s[e+1]),s[e=e-1>>1]+=t.weight;c+=t.weight*n}))),c}var Jz=DY;var tU=DY;var eU=DY,nU=GY;function rU(t,e,n){for(var r;e.length&&(r=eU.last(e)).i<=n;)e.pop(),t.push(r.vs),n++;return n}var iU=DY,aU=function(t,e){return Jz.map(e,(function(e){var n=t.inEdges(e);if(n.length){var r=Jz.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:r.sum/r.weight,weight:r.weight}}return{v:e}}))},oU=function(t,e){var n={};return tU.forEach(t,(function(t,e){var r=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};tU.isUndefined(t.barycenter)||(r.barycenter=t.barycenter,r.weight=t.weight)})),tU.forEach(e.edges(),(function(t){var e=n[t.v],r=n[t.w];tU.isUndefined(e)||tU.isUndefined(r)||(r.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){e.merged||(tU.isUndefined(e.barycenter)||tU.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function r(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var i=t.pop();e.push(i),tU.forEach(i.in.reverse(),n(i)),tU.forEach(i.out,r(i))}return tU.map(tU.filter(e,(function(t){return!t.merged})),(function(t){return tU.pick(t,["vs","i","barycenter","weight"])}))}(tU.filter(n,(function(t){return!t.indegree})))},sU=function(t,e){var n=nU.partition(t,(function(t){return eU.has(t,"barycenter")})),r=n.lhs,i=eU.sortBy(n.rhs,(function(t){return-t.i})),a=[],o=0,s=0,c=0;r.sort((l=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:l?e.i-t.i:t.i-e.i})),c=rU(a,i,c),eU.forEach(r,(function(t){c+=t.vs.length,a.push(t.vs),o+=t.barycenter*t.weight,s+=t.weight,c=rU(a,i,c)}));var l;var u={vs:eU.flatten(a,!0)};s&&(u.barycenter=o/s,u.weight=s);return u},cU=function t(e,n,r,i){var a=e.children(n),o=e.node(n),s=o?o.borderLeft:void 0,c=o?o.borderRight:void 0,l={};s&&(a=iU.filter(a,(function(t){return t!==s&&t!==c})));var u=aU(e,a);iU.forEach(u,(function(n){if(e.children(n.v).length){var a=t(e,n.v,r,i);l[n.v]=a,iU.has(a,"barycenter")&&(o=n,s=a,iU.isUndefined(o.barycenter)?(o.barycenter=s.barycenter,o.weight=s.weight):(o.barycenter=(o.barycenter*o.weight+s.barycenter*s.weight)/(o.weight+s.weight),o.weight+=s.weight))}var o,s}));var h=oU(u,r);!function(t,e){iU.forEach(t,(function(t){t.vs=iU.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(h,l);var d=sU(h,i);if(s&&(d.vs=iU.flatten([s,d.vs,c],!0),e.predecessors(s).length)){var f=e.node(e.predecessors(s)[0]),p=e.node(e.predecessors(c)[0]);iU.has(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+p.order)/(d.weight+2),d.weight+=2}return d};var lU=DY,uU=WI.Graph;var hU=DY;var dU=DY,fU=Xz,pU=Qz,gU=cU,yU=function(t,e,n){var r=function(t){var e;for(;t.hasNode(e=lU.uniqueId("_root")););return e}(t),i=new uU({compound:!0}).setGraph({root:r}).setDefaultNodeLabel((function(e){return t.node(e)}));return lU.forEach(t.nodes(),(function(a){var o=t.node(a),s=t.parent(a);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),lU.forEach(t[n](a),(function(e){var n=e.v===a?e.w:e.v,r=i.edge(n,a),o=lU.isUndefined(r)?0:r.weight;i.setEdge(n,a,{weight:t.edge(e).weight+o})})),lU.has(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))})),i},mU=function(t,e,n){var r,i={};hU.forEach(n,(function(n){for(var a,o,s=t.parent(n);s;){if((a=t.parent(s))?(o=i[a],i[a]=s):(o=r,r=s),o&&o!==s)return void e.setEdge(o,s);s=a}}))},vU=WI.Graph,bU=GY,_U=function(t){var e=bU.maxRank(t),n=wU(t,dU.range(1,e+1),"inEdges"),r=wU(t,dU.range(e-1,-1,-1),"outEdges"),i=fU(t);kU(t,i);for(var a,o=Number.POSITIVE_INFINITY,s=0,c=0;c<4;++s,++c){xU(s%2?n:r,s%4>=2),i=bU.buildLayerMatrix(t);var l=pU(t,i);l<o&&(c=0,a=dU.cloneDeep(i),o=l)}kU(t,a)};function wU(t,e,n){return dU.map(e,(function(e){return yU(t,e,n)}))}function xU(t,e){var n=new vU;dU.forEach(t,(function(t){var r=t.graph().root,i=gU(t,r,n,e);dU.forEach(i.vs,(function(e,n){t.node(e).order=n})),mU(t,n,i.vs)}))}function kU(t,e){dU.forEach(e,(function(e){dU.forEach(e,(function(e,n){t.node(e).order=n}))}))}var CU=DY,TU=WI.Graph,EU=GY,SU=function(t){var e,n=EU.buildLayerMatrix(t),r=CU.merge(OU(t,n),AU(t,n)),i={};CU.forEach(["u","d"],(function(a){e="u"===a?n:CU.values(n).reverse(),CU.forEach(["l","r"],(function(n){"r"===n&&(e=CU.map(e,(function(t){return CU.values(t).reverse()})));var o=("u"===a?t.predecessors:t.successors).bind(t),s=jU(t,e,r,o),c=NU(t,e,s.root,s.align,"r"===n);"r"===n&&(c=CU.mapValues(c,(function(t){return-t}))),i[a+n]=c}))}));var a=BU(t,i);return LU(i,a),RU(i,t.graph().align)};function OU(t,e){var n={};return CU.reduce(e,(function(e,r){var i=0,a=0,o=e.length,s=CU.last(r);return CU.forEach(r,(function(e,c){var l=function(t,e){if(t.node(e).dummy)return CU.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),u=l?t.node(l).order:o;(l||e===s)&&(CU.forEach(r.slice(a,c+1),(function(e){CU.forEach(t.predecessors(e),(function(r){var a=t.node(r),o=a.order;!(o<i||u<o)||a.dummy&&t.node(e).dummy||MU(n,r,e)}))})),a=c+1,i=u)})),r})),n}function AU(t,e){var n={};function r(e,r,i,a,o){var s;CU.forEach(CU.range(r,i),(function(r){s=e[r],t.node(s).dummy&&CU.forEach(t.predecessors(s),(function(e){var r=t.node(e);r.dummy&&(r.order<a||r.order>o)&&MU(n,e,s)}))}))}return CU.reduce(e,(function(e,n){var i,a=-1,o=0;return CU.forEach(n,(function(s,c){if("border"===t.node(s).dummy){var l=t.predecessors(s);l.length&&(i=t.node(l[0]).order,r(n,o,c,a,i),o=c,a=i)}r(n,o,n.length,i,e.length)})),n})),n}function MU(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function DU(t,e,n){if(e>n){var r=e;e=n,n=r}return CU.has(t[e],n)}function jU(t,e,n,r){var i={},a={},o={};return CU.forEach(e,(function(t){CU.forEach(t,(function(t,e){i[t]=t,a[t]=t,o[t]=e}))})),CU.forEach(e,(function(t){var e=-1;CU.forEach(t,(function(t){var s=r(t);if(s.length)for(var c=((s=CU.sortBy(s,(function(t){return o[t]}))).length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var h=s[l];a[t]===t&&e<o[h]&&!DU(n,t,h)&&(a[h]=t,a[t]=i[t]=i[h],e=o[h])}}))})),{root:i,align:a}}function NU(t,e,n,r,i){var a={},o=function(t,e,n,r){var i=new TU,a=t.graph(),o=function(t,e,n){return function(r,i,a){var o,s=r.node(i),c=r.node(a),l=0;if(l+=s.width/2,CU.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":o=-s.width/2;break;case"r":o=s.width/2}if(o&&(l+=n?o:-o),o=0,l+=(s.dummy?e:t)/2,l+=(c.dummy?e:t)/2,l+=c.width/2,CU.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":o=c.width/2;break;case"r":o=-c.width/2}return o&&(l+=n?o:-o),o=0,l}}(a.nodesep,a.edgesep,r);return CU.forEach(e,(function(e){var r;CU.forEach(e,(function(e){var a=n[e];if(i.setNode(a),r){var s=n[r],c=i.edge(s,a);i.setEdge(s,a,Math.max(o(t,e,r),c||0))}r=e}))})),i}(t,e,n,i),s=i?"borderLeft":"borderRight";function c(t,e){for(var n=o.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return c((function(t){a[t]=o.inEdges(t).reduce((function(t,e){return Math.max(t,a[e.v]+o.edge(e))}),0)}),o.predecessors.bind(o)),c((function(e){var n=o.outEdges(e).reduce((function(t,e){return Math.min(t,a[e.w]-o.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==s&&(a[e]=Math.max(a[e],n))}),o.successors.bind(o)),CU.forEach(r,(function(t){a[t]=a[n[t]]})),a}function BU(t,e){return CU.minBy(CU.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;return CU.forIn(e,(function(e,i){var a=function(t,e){return t.node(e).width}(t,i)/2;n=Math.max(e+a,n),r=Math.min(e-a,r)})),n-r}))}function LU(t,e){var n=CU.values(e),r=CU.min(n),i=CU.max(n);CU.forEach(["u","d"],(function(n){CU.forEach(["l","r"],(function(a){var o,s=n+a,c=t[s];if(c!==e){var l=CU.values(c);(o="l"===a?r-CU.min(l):i-CU.max(l))&&(t[s]=CU.mapValues(c,(function(t){return t+o})))}}))}))}function RU(t,e){return CU.mapValues(t.ul,(function(n,r){if(e)return t[e.toLowerCase()][r];var i=CU.sortBy(CU.map(t,r));return(i[1]+i[2])/2}))}var IU=DY,FU=GY,PU=SU;var YU=DY,zU=qY,UU=JY,$U=Az,WU=GY.normalizeRanks,qU=Nz,HU=GY.removeEmptyRanks,VU=Rz,GU=Yz,XU=$z,ZU=_U,QU=function(t){(function(t){var e=FU.buildLayerMatrix(t),n=t.graph().ranksep,r=0;IU.forEach(e,(function(e){var i=IU.max(IU.map(e,(function(e){return t.node(e).height})));IU.forEach(e,(function(e){t.node(e).y=r+i/2})),r+=i+n}))})(t=FU.asNonCompoundGraph(t)),IU.forEach(PU(t),(function(e,n){t.node(n).x=e}))},KU=GY,JU=WI.Graph,t$=function(t,e){var n=e&&e.debugTiming?KU.time:KU.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new JU({multigraph:!0,compound:!0}),n=u$(t.graph());return e.setGraph(YU.merge({},n$,l$(n,e$),YU.pick(n,r$))),YU.forEach(t.nodes(),(function(n){var r=u$(t.node(n));e.setNode(n,YU.defaults(l$(r,i$),a$)),e.setParent(n,t.parent(n))})),YU.forEach(t.edges(),(function(n){var r=u$(t.edge(n));e.setEdge(n,YU.merge({},s$,l$(r,o$),YU.pick(r,c$)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,YU.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){YU.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){zU.run(t)})),e(" nestingGraph.run",(function(){VU.run(t)})),e(" rank",(function(){$U(KU.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){YU.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};KU.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){HU(t)})),e(" nestingGraph.cleanup",(function(){VU.cleanup(t)})),e(" normalizeRanks",(function(){WU(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;YU.forEach(t.nodes(),(function(n){var r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=YU.max(e,r.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){YU.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){UU.run(t)})),e(" parentDummyChains",(function(){qU(t)})),e(" addBorderSegments",(function(){GU(t)})),e(" order",(function(){ZU(t)})),e(" insertSelfEdges",(function(){!function(t){var e=KU.buildLayerMatrix(t);YU.forEach(e,(function(e){var n=0;YU.forEach(e,(function(e,r){var i=t.node(e);i.order=r+n,YU.forEach(i.selfEdges,(function(e){KU.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")})),delete i.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){XU.adjust(t)})),e(" position",(function(){QU(t)})),e(" positionSelfEdges",(function(){!function(t){YU.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){YU.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),a=t.node(YU.last(n.borderLeft)),o=t.node(YU.last(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}})),YU.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){UU.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){YU.forEach(t.edges(),(function(e){var n=t.edge(e);if(YU.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){XU.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,a=t.graph(),o=a.marginx||0,s=a.marginy||0;function c(t){var a=t.x,o=t.y,s=t.width,c=t.height;e=Math.min(e,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}YU.forEach(t.nodes(),(function(e){c(t.node(e))})),YU.forEach(t.edges(),(function(e){var n=t.edge(e);YU.has(n,"x")&&c(n)})),e-=o,r-=s,YU.forEach(t.nodes(),(function(n){var i=t.node(n);i.x-=e,i.y-=r})),YU.forEach(t.edges(),(function(n){var i=t.edge(n);YU.forEach(i.points,(function(t){t.x-=e,t.y-=r})),YU.has(i,"x")&&(i.x-=e),YU.has(i,"y")&&(i.y-=r)})),a.width=n-e+o,a.height=i-r+s}(t)})),e(" assignNodeIntersects",(function(){!function(t){YU.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(KU.intersectRect(a,n)),i.points.push(KU.intersectRect(o,r))}))}(t)})),e(" reversePoints",(function(){!function(t){YU.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){zU.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){YU.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),YU.forEach(t.edges(),(function(n){var r=t.edge(n),i=e.edge(n);r.points=i.points,YU.has(i,"x")&&(r.x=i.x,r.y=i.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var e$=["nodesep","edgesep","ranksep","marginx","marginy"],n$={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},r$=["acyclicer","ranker","rankdir","align"],i$=["width","height"],a$={width:0,height:0},o$=["minlen","weight","width","height","labeloffset"],s$={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},c$=["labelpos"];function l$(t,e){return YU.mapValues(YU.pick(t,e),Number)}function u$(t){var e={};return YU.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}var h$=DY,d$=GY,f$=WI.Graph;var p$,g$={graphlib:WI,layout:t$,debug:{debugOrdering:function(t){var e=d$.buildLayerMatrix(t),n=new f$({compound:!0,multigraph:!0}).setGraph({});return h$.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),h$.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),h$.forEach(e,(function(t,e){var r="layer"+e;n.setNode(r,{rank:"same"}),h$.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}},util:{time:GY.time,notime:GY.notime},version:"0.8.5"};if("function"==typeof require)try{p$=$I}catch(zG){}p$||(p$=window.graphlib);var y$,m$=p$;if("function"==typeof require)try{y$=g$}catch(zG){}y$||(y$=window.dagre);var v$=y$,b$=function(t,e){return t.intersect(e)};var _$=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),l=Math.abs(e*n*o/c);r.x<i&&(l=-l);var u=Math.abs(e*n*s/c);r.y<a&&(u=-u);return{x:i+l,y:a+u}};var w$=_$,x$=function(t,e,n){return w$(t,e,e,n)};function k$(t,e){return t*e>0}var C$=function(t,e,n,r){var i,a,o,s,c,l,u,h,d,f,p,g,y;if(i=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,d=i*n.x+o*n.y+c,f=i*r.x+o*r.y+c,0!==d&&0!==f&&k$(d,f))return;if(a=r.y-n.y,s=n.x-r.x,l=r.x*n.y-n.x*r.y,u=a*t.x+s*t.y+l,h=a*e.x+s*e.y+l,0!==u&&0!==h&&k$(u,h))return;if(0===(p=i*s-a*o))return;return g=Math.abs(p/2),{x:(y=o*l-s*c)<0?(y-g)/p:(y+g)/p,y:(y=a*c-i*l)<0?(y-g)/p:(y+g)/p}},T$=function(t,e,n){var r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)}));for(var c=r-t.width/2-o,l=i-t.height/2-s,u=0;u<e.length;u++){var h=e[u],d=e[u<e.length-1?u+1:0],f=C$(t,n,{x:c+h.x,y:l+h.y},{x:c+d.x,y:l+d.y});f&&a.push(f)}if(!a.length)return console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t;a.length>1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}));return a[0]};var E$=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,l=t.height/2;Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),n=0===s?0:l*o/s,r=l):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o);return{x:i+n,y:a+r}};var S$,O$={node:b$,circle:x$,ellipse:_$,polygon:T$,rect:E$};if("function"==typeof require)try{S$={defaults:iF,each:Yj,isFunction:jS,isPlainObject:eP,pick:nY,has:XB,range:cY,uniqueId:EY}}catch(zG){}S$||(S$=window._);var A$,M$=S$;if(!A$&&"function"==typeof require)try{A$=WE}catch(zG){}A$||(A$=window.d3);var D$=M$,j$={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return B$(t.v)+":"+B$(t.w)+":"+B$(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(D$.isPlainObject(n)){var r=n.transition;if(D$.isFunction(r))return r(t)}return t}};var N$=/:/g;function B$(t){return t?String(t).replace(N$,"\\:"):""}var L$=j$;var R$=j$,I$=function(t,e){var n=t.append("foreignObject").attr("width","100000"),r=n.append("xhtml:div");r.attr("xmlns","http://www.w3.org/1999/xhtml");var i=e.label;switch(typeof i){case"function":r.insert(i);break;case"object":r.insert((function(){return i}));break;default:r.html(i)}R$.applyStyle(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap");var a=r.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n};var F$=j$;var P$=function(t,e){for(var n=t.append("text"),r=function(t){for(var e,n="",r=!1,i=0;i<t.length;++i)if(e=t[i],r){switch(e){case"n":n+="\n";break;default:n+=e}r=!1}else"\\"===e?r=!0:n+=e;return n}(e.label).split("\n"),i=0;i<r.length;i++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(r[i]);return L$.applyStyle(n,e.labelStyle),n},Y$=I$,z$=function(t,e){var n=t;return n.node().appendChild(e.label),F$.applyStyle(n,e.labelStyle),n},U$=function(t,e,n){var r=e.label,i=t.append("g");"svg"===e.labelType?z$(i,e):"string"!=typeof r||"html"===e.labelType?Y$(i,e):P$(i,e);var a,o=i.node().getBBox();switch(n){case"top":a=-e.height/2;break;case"bottom":a=e.height/2-o.height;break;default:a=-o.height/2}return i.attr("transform","translate("+-o.width/2+","+a+")"),i};var $$=M$,W$=U$,q$=j$,H$=A$,V$=function(t,e,n){var r,i=e.nodes().filter((function(t){return!q$.isSubgraph(e,t)})),a=t.selectAll("g.node").data(i,(function(t){return t})).classed("update",!0);a.exit().remove(),a.enter().append("g").attr("class","node").style("opacity",0),(a=t.selectAll("g.node")).each((function(t){var r=e.node(t),i=H$.select(this);q$.applyClass(i,r.class,(i.classed("update")?"update ":"")+"node"),i.select("g.label").remove();var a=i.append("g").attr("class","label"),o=W$(a,r),s=n[r.shape],c=$$.pick(o.node().getBBox(),"width","height");r.elem=this,r.id&&i.attr("id",r.id),r.labelId&&a.attr("id",r.labelId),$$.has(r,"width")&&(c.width=r.width),$$.has(r,"height")&&(c.height=r.height),c.width+=r.paddingLeft+r.paddingRight,c.height+=r.paddingTop+r.paddingBottom,a.attr("transform","translate("+(r.paddingLeft-r.paddingRight)/2+","+(r.paddingTop-r.paddingBottom)/2+")");var l=H$.select(this);l.select(".label-container").remove();var u=s(l,c,r).classed("label-container",!0);q$.applyStyle(u,r.style);var h=u.node().getBBox();r.width=h.width,r.height=h.height})),r=a.exit?a.exit():a.selectAll(null);return q$.applyTransition(r,e).style("opacity",0).remove(),a};var G$=j$,X$=A$,Z$=U$,Q$=function(t,e){var n,r=e.nodes().filter((function(t){return G$.isSubgraph(e,t)})),i=t.selectAll("g.cluster").data(r,(function(t){return t}));i.selectAll("*").remove(),i.enter().append("g").attr("class","cluster").attr("id",(function(t){return e.node(t).id})).style("opacity",0),i=t.selectAll("g.cluster"),G$.applyTransition(i,e).style("opacity",1),i.each((function(t){var n=e.node(t),r=X$.select(this);X$.select(this).append("rect");var i=r.append("g").attr("class","label");Z$(i,n,n.clusterLabelPos)})),i.selectAll("rect").each((function(t){var n=e.node(t),r=X$.select(this);G$.applyStyle(r,n.style)})),n=i.exit?i.exit():i.selectAll(null);return G$.applyTransition(n,e).style("opacity",0).remove(),i};var K$=M$,J$=U$,tW=j$,eW=A$,nW=function(t,e){var n,r=t.selectAll("g.edgeLabel").data(e.edges(),(function(t){return tW.edgeToId(t)})).classed("update",!0);r.exit().remove(),r.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(r=t.selectAll("g.edgeLabel")).each((function(t){var n=eW.select(this);n.select(".label").remove();var r=e.edge(t),i=J$(n,e.edge(t),0).classed("label",!0),a=i.node().getBBox();r.labelId&&i.attr("id",r.labelId),K$.has(r,"width")||(r.width=a.width),K$.has(r,"height")||(r.height=a.height)})),n=r.exit?r.exit():r.selectAll(null);return tW.applyTransition(n,e).style("opacity",0).remove(),r};var rW=M$,iW=b$,aW=j$,oW=A$,sW=function(t,e,n){var r=t.selectAll("g.edgePath").data(e.edges(),(function(t){return aW.edgeToId(t)})).classed("update",!0),i=function(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);return n.append("path").attr("class","path").attr("d",(function(t){var n=e.edge(t),r=e.node(t.v).elem;return cW(n,rW.range(n.points.length).map((function(){return e=(t=r).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n})))})),n.append("defs"),n}(r,e);!function(t,e){var n=t.exit();aW.applyTransition(n,e).style("opacity",0).remove()}(r,e);var a=void 0!==r.merge?r.merge(i):r;return aW.applyTransition(a,e).style("opacity",1),a.each((function(t){var n=oW.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),aW.applyClass(n,r.class,(n.classed("update")?"update ":"")+"edgePath")})),a.selectAll("path.path").each((function(t){var n=e.edge(t);n.arrowheadId=rW.uniqueId("arrowhead");var r=oW.select(this).attr("marker-end",(function(){return"url("+(t=location.href,e=n.arrowheadId,t.split("#")[0]+"#"+e+")");var t,e})).style("fill","none");aW.applyTransition(r,e).attr("d",(function(t){return function(t,e){var n=t.edge(e),r=t.node(e.v),i=t.node(e.w),a=n.points.slice(1,n.points.length-1);return a.unshift(iW(r,a[0])),a.push(iW(i,a[a.length-1])),cW(n,a)}(e,t)})),aW.applyStyle(r,n.style)})),a.selectAll("defs *").remove(),a.selectAll("defs").each((function(t){var r=e.edge(t);(0,n[r.arrowhead])(oW.select(this),r.arrowheadId,r,"arrowhead")})),a};function cW(t,e){var n=(oW.line||oW.svg.line)().x((function(t){return t.x})).y((function(t){return t.y}));return(n.curve||n.interpolate)(t.curve),n(e)}var lW=j$,uW=A$,hW=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter((function(){return!uW.select(this).classed("update")})).attr("transform",n),lW.applyTransition(t,e).style("opacity",1).attr("transform",n)};var dW=j$,fW=A$,pW=M$,gW=function(t,e){function n(t){var n=e.edge(t);return pW.has(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter((function(){return!fW.select(this).classed("update")})).attr("transform",n),dW.applyTransition(t,e).style("opacity",1).attr("transform",n)};var yW=j$,mW=A$,vW=function(t,e){var n=t.filter((function(){return!mW.select(this).classed("update")}));function r(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}n.attr("transform",r),yW.applyTransition(t,e).style("opacity",1).attr("transform",r),yW.applyTransition(n.selectAll("rect"),e).attr("width",(function(t){return e.node(t).width})).attr("height",(function(t){return e.node(t).height})).attr("x",(function(t){return-e.node(t).width/2})).attr("y",(function(t){return-e.node(t).height/2}))};var bW=E$,_W=_$,wW=x$,xW=T$,kW={rect:function(t,e,n){var r=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t){return bW(n,t)},r},ellipse:function(t,e,n){var r=e.width/2,i=e.height/2,a=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",r).attr("ry",i);return n.intersect=function(t){return _W(n,r,i,t)},a},circle:function(t,e,n){var r=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",r);return n.intersect=function(t){return wW(n,r,t)},i},diamond:function(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],o=t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" "));return n.intersect=function(t){return xW(n,a,t)},o}};var CW=j$,TW={default:EW,normal:EW,vee:function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");CW.applyStyle(i,n[r+"Style"]),n[r+"Class"]&&i.attr("class",n[r+"Class"])},undirected:function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");CW.applyStyle(i,n[r+"Style"]),n[r+"Class"]&&i.attr("class",n[r+"Class"])}};function EW(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");CW.applyStyle(i,n[r+"Style"]),n[r+"Class"]&&i.attr("class",n[r+"Class"])}var SW=M$,OW=A$,AW=v$.layout,MW=function(){var t=V$,e=Q$,n=nW,r=sW,i=hW,a=gW,o=vW,s=kW,c=TW,l=function(l,u){!function(t){t.nodes().forEach((function(e){var n=t.node(e);SW.has(n,"label")||t.children(e).length||(n.label=e),SW.has(n,"paddingX")&&SW.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),SW.has(n,"paddingY")&&SW.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),SW.has(n,"padding")&&SW.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),SW.defaults(n,DW),SW.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){n[t]=Number(n[t])})),SW.has(n,"width")&&(n._prevWidth=n.width),SW.has(n,"height")&&(n._prevHeight=n.height)})),t.edges().forEach((function(e){var n=t.edge(e);SW.has(n,"label")||(n.label=""),SW.defaults(n,jW)}))}(u);var h=NW(l,"output"),d=NW(h,"clusters"),f=NW(h,"edgePaths"),p=n(NW(h,"edgeLabels"),u),g=t(NW(h,"nodes"),u,s);AW(u),i(g,u),a(p,u),r(f,u,c);var y=e(d,u);o(y,u),function(t){SW.each(t.nodes(),(function(e){var n=t.node(e);SW.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,SW.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight}))}(u)};return l.createNodes=function(e){return arguments.length?(t=e,l):t},l.createClusters=function(t){return arguments.length?(e=t,l):e},l.createEdgeLabels=function(t){return arguments.length?(n=t,l):n},l.createEdgePaths=function(t){return arguments.length?(r=t,l):r},l.shapes=function(t){return arguments.length?(s=t,l):s},l.arrows=function(t){return arguments.length?(c=t,l):c},l};var DW={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},jW={arrowhead:"normal",curve:OW.curveLinear};function NW(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}var BW={graphlib:m$,dagre:v$,intersect:O$,render:MW,util:j$,version:"0.6.4"};
/**
* @license
* Copyright (c) 2012-2013 Chris Pettitt
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var LW=Object.hasOwnProperty,RW=Object.setPrototypeOf,IW=Object.isFrozen,FW=Object.getPrototypeOf,PW=Object.getOwnPropertyDescriptor,YW=Object.freeze,zW=Object.seal,UW=Object.create,$W="undefined"!=typeof Reflect&&Reflect,WW=$W.apply,qW=$W.construct;WW||(WW=function(t,e,n){return t.apply(e,n)}),YW||(YW=function(t){return t}),zW||(zW=function(t){return t}),qW||(qW=function(t,e){return new(Function.prototype.bind.apply(t,[null].concat(
/*! @license DOMPurify 2.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.0/LICENSE */
function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(e))))});var HW,VW=rq(Array.prototype.forEach),GW=rq(Array.prototype.pop),XW=rq(Array.prototype.push),ZW=rq(String.prototype.toLowerCase),QW=rq(String.prototype.match),KW=rq(String.prototype.replace),JW=rq(String.prototype.indexOf),tq=rq(String.prototype.trim),eq=rq(RegExp.prototype.test),nq=(HW=TypeError,function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return qW(HW,e)});function rq(t){return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return WW(t,e,r)}}function iq(t,e){RW&&RW(t,null);for(var n=e.length;n--;){var r=e[n];if("string"==typeof r){var i=ZW(r);i!==r&&(IW(e)||(e[n]=i),r=i)}t[r]=!0}return t}function aq(t){var e=UW(null),n=void 0;for(n in t)WW(LW,t,[n])&&(e[n]=t[n]);return e}function oq(t,e){for(;null!==t;){var n=PW(t,e);if(n){if(n.get)return rq(n.get);if("function"==typeof n.value)return rq(n.value)}t=FW(t)}return function(t){return console.warn("fallback value for",t),null}}var sq=YW(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cq=YW(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),lq=YW(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),uq=YW(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),hq=YW(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),dq=YW(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fq=YW(["#text"]),pq=YW(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),gq=YW(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),yq=YW(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),mq=YW(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vq=zW(/\{\{[\s\S]*|[\s\S]*\}\}/gm),bq=zW(/<%[\s\S]*|[\s\S]*%>/gm),_q=zW(/^data-[\-\w.\u00B7-\uFFFF]/),wq=zW(/^aria-[\-\w]+$/),xq=zW(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),kq=zW(/^(?:\w+script|data):/i),Cq=zW(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Tq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function Eq(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var Sq=function(){return"undefined"==typeof window?null:window},Oq=function(t,e){if("object"!==(void 0===t?"undefined":Tq(t))||"function"!=typeof t.createPolicy)return null;var n=null,r="data-tt-policy-suffix";e.currentScript&&e.currentScript.hasAttribute(r)&&(n=e.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:function(t){return t}})}catch(a){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};var Aq=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Sq(),n=function(e){return t(e)};if(n.version="2.3.0",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var r=e.document,i=e.document,a=e.DocumentFragment,o=e.HTMLTemplateElement,s=e.Node,c=e.Element,l=e.NodeFilter,u=e.NamedNodeMap,h=void 0===u?e.NamedNodeMap||e.MozNamedAttrMap:u,d=e.Text,f=e.Comment,p=e.DOMParser,g=e.trustedTypes,y=c.prototype,m=oq(y,"cloneNode"),v=oq(y,"nextSibling"),b=oq(y,"childNodes"),_=oq(y,"parentNode");if("function"==typeof o){var w=i.createElement("template");w.content&&w.content.ownerDocument&&(i=w.content.ownerDocument)}var x=Oq(g,r),k=x&&et?x.createHTML(""):"",C=i,T=C.implementation,E=C.createNodeIterator,S=C.createDocumentFragment,O=C.getElementsByTagName,A=r.importNode,M={};try{M=aq(i).documentMode?i.documentMode:{}}catch(Lt){}var D={};n.isSupported="function"==typeof _&&T&&void 0!==T.createHTMLDocument&&9!==M;var j=vq,N=bq,B=_q,L=wq,R=kq,I=Cq,F=xq,P=null,Y=iq({},[].concat(Eq(sq),Eq(cq),Eq(lq),Eq(hq),Eq(fq))),z=null,U=iq({},[].concat(Eq(pq),Eq(gq),Eq(yq),Eq(mq))),$=null,W=null,q=!0,H=!0,V=!1,G=!1,X=!1,Z=!1,Q=!1,K=!1,J=!1,tt=!0,et=!1,nt=!0,rt=!0,it=!1,at={},ot=iq({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),st=null,ct=iq({},["audio","video","img","source","image","track"]),lt=null,ut=iq({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ht="http://www.w3.org/1998/Math/MathML",dt="http://www.w3.org/2000/svg",ft="http://www.w3.org/1999/xhtml",pt=ft,gt=!1,yt=null,mt=i.createElement("form"),vt=function(t){yt&&yt===t||(t&&"object"===(void 0===t?"undefined":Tq(t))||(t={}),t=aq(t),P="ALLOWED_TAGS"in t?iq({},t.ALLOWED_TAGS):Y,z="ALLOWED_ATTR"in t?iq({},t.ALLOWED_ATTR):U,lt="ADD_URI_SAFE_ATTR"in t?iq(aq(ut),t.ADD_URI_SAFE_ATTR):ut,st="ADD_DATA_URI_TAGS"in t?iq(aq(ct),t.ADD_DATA_URI_TAGS):ct,$="FORBID_TAGS"in t?iq({},t.FORBID_TAGS):{},W="FORBID_ATTR"in t?iq({},t.FORBID_ATTR):{},at="USE_PROFILES"in t&&t.USE_PROFILES,q=!1!==t.ALLOW_ARIA_ATTR,H=!1!==t.ALLOW_DATA_ATTR,V=t.ALLOW_UNKNOWN_PROTOCOLS||!1,G=t.SAFE_FOR_TEMPLATES||!1,X=t.WHOLE_DOCUMENT||!1,K=t.RETURN_DOM||!1,J=t.RETURN_DOM_FRAGMENT||!1,tt=!1!==t.RETURN_DOM_IMPORT,et=t.RETURN_TRUSTED_TYPE||!1,Q=t.FORCE_BODY||!1,nt=!1!==t.SANITIZE_DOM,rt=!1!==t.KEEP_CONTENT,it=t.IN_PLACE||!1,F=t.ALLOWED_URI_REGEXP||F,pt=t.NAMESPACE||ft,G&&(H=!1),J&&(K=!0),at&&(P=iq({},[].concat(Eq(fq))),z=[],!0===at.html&&(iq(P,sq),iq(z,pq)),!0===at.svg&&(iq(P,cq),iq(z,gq),iq(z,mq)),!0===at.svgFilters&&(iq(P,lq),iq(z,gq),iq(z,mq)),!0===at.mathMl&&(iq(P,hq),iq(z,yq),iq(z,mq))),t.ADD_TAGS&&(P===Y&&(P=aq(P)),iq(P,t.ADD_TAGS)),t.ADD_ATTR&&(z===U&&(z=aq(z)),iq(z,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&iq(lt,t.ADD_URI_SAFE_ATTR),rt&&(P["#text"]=!0),X&&iq(P,["html","head","body"]),P.table&&(iq(P,["tbody"]),delete $.tbody),YW&&YW(t),yt=t)},bt=iq({},["mi","mo","mn","ms","mtext"]),_t=iq({},["foreignobject","desc","title","annotation-xml"]),wt=iq({},cq);iq(wt,lq),iq(wt,uq);var xt=iq({},hq);iq(xt,dq);var kt=function(t){var e=_(t);e&&e.tagName||(e={namespaceURI:ft,tagName:"template"});var n=ZW(t.tagName),r=ZW(e.tagName);if(t.namespaceURI===dt)return e.namespaceURI===ft?"svg"===n:e.namespaceURI===ht?"svg"===n&&("annotation-xml"===r||bt[r]):Boolean(wt[n]);if(t.namespaceURI===ht)return e.namespaceURI===ft?"math"===n:e.namespaceURI===dt?"math"===n&&_t[r]:Boolean(xt[n]);if(t.namespaceURI===ft){if(e.namespaceURI===dt&&!_t[r])return!1;if(e.namespaceURI===ht&&!bt[r])return!1;var i=iq({},["title","style","font","a","script"]);return!xt[n]&&(i[n]||!wt[n])}return!1},Ct=function(t){XW(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(Lt){try{t.outerHTML=k}catch(e){t.remove()}}},Tt=function(t,e){try{XW(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(Lt){XW(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!z[t])if(K||J)try{Ct(e)}catch(Lt){}else try{e.setAttribute(t,"")}catch(Lt){}},Et=function(t){var e=void 0,n=void 0;if(Q)t="<remove></remove>"+t;else{var r=QW(t,/^[\r\n\t ]+/);n=r&&r[0]}var a=x?x.createHTML(t):t;if(pt===ft)try{e=(new p).parseFromString(a,"text/html")}catch(Lt){}if(!e||!e.documentElement){e=T.createDocument(pt,"template",null);try{e.documentElement.innerHTML=gt?"":a}catch(Lt){}}var o=e.body||e.documentElement;return t&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),pt===ft?O.call(e,X?"html":"body")[0]:X?e.documentElement:o},St=function(t){return E.call(t.ownerDocument||t,t,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Ot=function(t){return!(t instanceof d||t instanceof f)&&!("string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof h&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute&&"string"==typeof t.namespaceURI&&"function"==typeof t.insertBefore)},At=function(t){return"object"===(void 0===s?"undefined":Tq(s))?t instanceof s:t&&"object"===(void 0===t?"undefined":Tq(t))&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Mt=function(t,e,r){D[t]&&VW(D[t],(function(t){t.call(n,e,r,yt)}))},Dt=function(t){var e=void 0;if(Mt("beforeSanitizeElements",t,null),Ot(t))return Ct(t),!0;if(QW(t.nodeName,/[\u0080-\uFFFF]/))return Ct(t),!0;var r=ZW(t.nodeName);if(Mt("uponSanitizeElement",t,{tagName:r,allowedTags:P}),!At(t.firstElementChild)&&(!At(t.content)||!At(t.content.firstElementChild))&&eq(/<[/\w]/g,t.innerHTML)&&eq(/<[/\w]/g,t.textContent))return Ct(t),!0;if(!P[r]||$[r]){if(rt&&!ot[r]){var i=_(t)||t.parentNode,a=b(t)||t.childNodes;if(a&&i)for(var o=a.length-1;o>=0;--o)i.insertBefore(m(a[o],!0),v(t))}return Ct(t),!0}return t instanceof c&&!kt(t)?(Ct(t),!0):"noscript"!==r&&"noembed"!==r||!eq(/<\/no(script|embed)/i,t.innerHTML)?(G&&3===t.nodeType&&(e=t.textContent,e=KW(e,j," "),e=KW(e,N," "),t.textContent!==e&&(XW(n.removed,{element:t.cloneNode()}),t.textContent=e)),Mt("afterSanitizeElements",t,null),!1):(Ct(t),!0)},jt=function(t,e,n){if(nt&&("id"===e||"name"===e)&&(n in i||n in mt))return!1;if(H&&!W[e]&&eq(B,e));else if(q&&eq(L,e));else{if(!z[e]||W[e])return!1;if(lt[e]);else if(eq(F,KW(n,I,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==JW(n,"data:")||!st[t]){if(V&&!eq(R,KW(n,I,"")));else if(n)return!1}else;}return!0},Nt=function(t){var e=void 0,r=void 0,i=void 0,a=void 0;Mt("beforeSanitizeAttributes",t,null);var o=t.attributes;if(o){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z};for(a=o.length;a--;){var c=e=o[a],l=c.name,u=c.namespaceURI;if(r=tq(e.value),i=ZW(l),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,Mt("uponSanitizeAttribute",t,s),r=s.attrValue,!s.forceKeepAttr&&(Tt(l,t),s.keepAttr))if(eq(/\/>/i,r))Tt(l,t);else{G&&(r=KW(r,j," "),r=KW(r,N," "));var h=t.nodeName.toLowerCase();if(jt(h,i,r))try{u?t.setAttributeNS(u,l,r):t.setAttribute(l,r),GW(n.removed)}catch(Lt){}}}Mt("afterSanitizeAttributes",t,null)}},Bt=function t(e){var n=void 0,r=St(e);for(Mt("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)Mt("uponSanitizeShadowNode",n,null),Dt(n)||(n.content instanceof a&&t(n.content),Nt(n));Mt("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t,i){var o=void 0,c=void 0,l=void 0,u=void 0,h=void 0;if((gt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!At(t)){if("function"!=typeof t.toString)throw nq("toString is not a function");if("string"!=typeof(t=t.toString()))throw nq("dirty is not a string, aborting")}if(!n.isSupported){if("object"===Tq(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof t)return e.toStaticHTML(t);if(At(t))return e.toStaticHTML(t.outerHTML)}return t}if(Z||vt(i),n.removed=[],"string"==typeof t&&(it=!1),it);else if(t instanceof s)1===(c=(o=Et("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?o=c:o.appendChild(c);else{if(!K&&!G&&!X&&-1===t.indexOf("<"))return x&&et?x.createHTML(t):t;if(!(o=Et(t)))return K?null:k}o&&Q&&Ct(o.firstChild);for(var d=St(it?t:o);l=d.nextNode();)3===l.nodeType&&l===u||Dt(l)||(l.content instanceof a&&Bt(l.content),Nt(l),u=l);if(u=null,it)return t;if(K){if(J)for(h=S.call(o.ownerDocument);o.firstChild;)h.appendChild(o.firstChild);else h=o;return tt&&(h=A.call(r,h,!0)),h}var f=X?o.outerHTML:o.innerHTML;return G&&(f=KW(f,j," "),f=KW(f,N," ")),x&&et?x.createHTML(f):f},n.setConfig=function(t){vt(t),Z=!0},n.clearConfig=function(){yt=null,Z=!1},n.isValidAttribute=function(t,e,n){yt||vt({});var r=ZW(t),i=ZW(e);return jt(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&(D[t]=D[t]||[],XW(D[t],e))},n.removeHook=function(t){D[t]&&GW(D[t])},n.removeHooks=function(t){D[t]&&(D[t]=[])},n.removeAllHooks=function(){D={}},n}(),Mq=fa(Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Aq})),Dq={},jq={},Nq={},Bq={},Lq={};Object.defineProperty(Lq,"__esModule",{value:!0});var Rq={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:function(t){return t>=255?255:t<0?0:t},g:function(t){return t>=255?255:t<0?0:t},b:function(t){return t>=255?255:t<0?0:t},h:function(t){return t%360},s:function(t){return t>=100?100:t<0?0:t},l:function(t){return t>=100?100:t<0?0:t},a:function(t){return t>=1?1:t<0?0:t}},toLinear:function(t){var e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:function(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},hsl2rgb:function(t,e){var n=t.h,r=t.s,i=t.l;if(!r)return 2.55*i;n/=360,r/=100;var a=(i/=100)<.5?i*(1+r):i+r-i*r,o=2*i-a;switch(e){case"r":return 255*Rq.hue2rgb(o,a,n+1/3);case"g":return 255*Rq.hue2rgb(o,a,n);case"b":return 255*Rq.hue2rgb(o,a,n-1/3)}},rgb2hsl:function(t,e){var n=t.r,r=t.g,i=t.b;n/=255,r/=255,i/=255;var a=Math.max(n,r,i),o=Math.min(n,r,i),s=(a+o)/2;if("l"===e)return 100*s;if(a===o)return 0;var c=a-o;if("s"===e)return 100*(s>.5?c/(2-a-o):c/(a+o));switch(a){case n:return 60*((r-i)/c+(r<i?6:0));case r:return 60*((i-n)/c+2);case i:return 60*((n-r)/c+4);default:return-1}}};Lq.default=Rq;var Iq={};Object.defineProperty(Iq,"__esModule",{value:!0});var Fq={clamp:function(t,e,n){return e>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t))},round:function(t){return Math.round(1e10*t)/1e10}};Iq.default=Fq;var Pq={};Object.defineProperty(Pq,"__esModule",{value:!0});var Yq={dec2hex:function(t){var e=Math.round(t).toString(16);return e.length>1?e:"0"+e}};Pq.default=Yq,Object.defineProperty(Bq,"__esModule",{value:!0});var zq=Iq,Uq=Pq,$q={channel:Lq.default,lang:zq.default,unit:Uq.default};Bq.default=$q;var Wq={},qq={},Hq={};Object.defineProperty(Hq,"__esModule",{value:!0});var Vq=function(){function t(){this.type=0}return t.prototype.get=function(){return this.type},t.prototype.set=function(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t},t.prototype.reset=function(){this.type=0},t.prototype.is=function(t){return this.type===t},t}();Hq.default=Vq,Object.defineProperty(qq,"__esModule",{value:!0});var Gq=Bq,Xq=Hq,Zq=function(){function t(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new Xq.default}return t.prototype.set=function(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=0,this},t.prototype._ensureHSL=function(){var t=this.data,e=t.h,n=t.s,r=t.l;void 0===e&&(t.h=Gq.default.channel.rgb2hsl(t,"h")),void 0===n&&(t.s=Gq.default.channel.rgb2hsl(t,"s")),void 0===r&&(t.l=Gq.default.channel.rgb2hsl(t,"l"))},t.prototype._ensureRGB=function(){var t=this.data,e=t.r,n=t.g,r=t.b;void 0===e&&(t.r=Gq.default.channel.hsl2rgb(t,"r")),void 0===n&&(t.g=Gq.default.channel.hsl2rgb(t,"g")),void 0===r&&(t.b=Gq.default.channel.hsl2rgb(t,"b"))},Object.defineProperty(t.prototype,"r",{get:function(){var t=this.data,e=t.r;return this.type.is(2)||void 0===e?(this._ensureHSL(),Gq.default.channel.hsl2rgb(t,"r")):e},set:function(t){this.type.set(1),this.changed=!0,this.data.r=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){var t=this.data,e=t.g;return this.type.is(2)||void 0===e?(this._ensureHSL(),Gq.default.channel.hsl2rgb(t,"g")):e},set:function(t){this.type.set(1),this.changed=!0,this.data.g=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){var t=this.data,e=t.b;return this.type.is(2)||void 0===e?(this._ensureHSL(),Gq.default.channel.hsl2rgb(t,"b")):e},set:function(t){this.type.set(1),this.changed=!0,this.data.b=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"h",{get:function(){var t=this.data,e=t.h;return this.type.is(1)||void 0===e?(this._ensureRGB(),Gq.default.channel.rgb2hsl(t,"h")):e},set:function(t){this.type.set(2),this.changed=!0,this.data.h=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"s",{get:function(){var t=this.data,e=t.s;return this.type.is(1)||void 0===e?(this._ensureRGB(),Gq.default.channel.rgb2hsl(t,"s")):e},set:function(t){this.type.set(2),this.changed=!0,this.data.s=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"l",{get:function(){var t=this.data,e=t.l;return this.type.is(1)||void 0===e?(this._ensureRGB(),Gq.default.channel.rgb2hsl(t,"l")):e},set:function(t){this.type.set(2),this.changed=!0,this.data.l=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this.data.a},set:function(t){this.changed=!0,this.data.a=t},enumerable:!0,configurable:!0}),t}();qq.default=Zq,Object.defineProperty(Wq,"__esModule",{value:!0});var Qq=new qq.default({r:0,g:0,b:0,a:0},"transparent");Wq.default=Qq;var Kq={},Jq={},tH={};Object.defineProperty(tH,"__esModule",{value:!0});var eH=Bq,nH={};tH.DEC2HEX=nH;for(var rH=0;rH<=255;rH++)nH[rH]=eH.default.unit.dec2hex(rH);Object.defineProperty(Jq,"__esModule",{value:!0});var iH=Wq,aH=tH,oH={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:function(t){if(35===t.charCodeAt(0)){var e=t.match(oH.re);if(e){var n=e[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,l=a?0:-1,u=o?255:15;return iH.default.set({r:(r>>c*(l+3)&u)*s,g:(r>>c*(l+2)&u)*s,b:(r>>c*(l+1)&u)*s,a:a?(r&u)*s/255:1},t)}}},stringify:function(t){var e=t.r,n=t.g,r=t.b,i=t.a;return i<1?"#"+aH.DEC2HEX[Math.round(e)]+aH.DEC2HEX[Math.round(n)]+aH.DEC2HEX[Math.round(r)]+aH.DEC2HEX[Math.round(255*i)]:"#"+aH.DEC2HEX[Math.round(e)]+aH.DEC2HEX[Math.round(n)]+aH.DEC2HEX[Math.round(r)]}};Jq.default=oH;var sH={};Object.defineProperty(sH,"__esModule",{value:!0});var cH=Jq,lH={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:function(t){t=t.toLowerCase();var e=lH.colors[t];if(e)return cH.default.parse(e)},stringify:function(t){var e=cH.default.stringify(t);for(var n in lH.colors)if(lH.colors[n]===e)return n}};sH.default=lH;var uH={};Object.defineProperty(uH,"__esModule",{value:!0});var hH=Bq,dH=Wq,fH={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:function(t){var e=t.charCodeAt(0);if(114===e||82===e){var n=t.match(fH.re);if(n){var r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8];return dH.default.set({r:hH.default.channel.clamp.r(i?2.55*parseFloat(r):parseFloat(r)),g:hH.default.channel.clamp.g(o?2.55*parseFloat(a):parseFloat(a)),b:hH.default.channel.clamp.b(c?2.55*parseFloat(s):parseFloat(s)),a:l?hH.default.channel.clamp.a(u?parseFloat(l)/100:parseFloat(l)):1},t)}}},stringify:function(t){var e=t.r,n=t.g,r=t.b,i=t.a;return i<1?"rgba("+hH.default.lang.round(e)+", "+hH.default.lang.round(n)+", "+hH.default.lang.round(r)+", "+hH.default.lang.round(i)+")":"rgb("+hH.default.lang.round(e)+", "+hH.default.lang.round(n)+", "+hH.default.lang.round(r)+")"}};uH.default=fH;var pH={};Object.defineProperty(pH,"__esModule",{value:!0});var gH=Bq,yH=Wq,mH={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:function(t){var e=t.match(mH.hueRe);if(e){var n=e[1];switch(e[2]){case"grad":return gH.default.channel.clamp.h(.9*parseFloat(n));case"rad":return gH.default.channel.clamp.h(180*parseFloat(n)/Math.PI);case"turn":return gH.default.channel.clamp.h(360*parseFloat(n))}}return gH.default.channel.clamp.h(parseFloat(t))},parse:function(t){var e=t.charCodeAt(0);if(104===e||72===e){var n=t.match(mH.re);if(n){var r=n[1],i=n[2],a=n[3],o=n[4],s=n[5];return yH.default.set({h:mH._hue2deg(r),s:gH.default.channel.clamp.s(parseFloat(i)),l:gH.default.channel.clamp.l(parseFloat(a)),a:o?gH.default.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)}}},stringify:function(t){var e=t.h,n=t.s,r=t.l,i=t.a;return i<1?"hsla("+gH.default.lang.round(e)+", "+gH.default.lang.round(n)+"%, "+gH.default.lang.round(r)+"%, "+i+")":"hsl("+gH.default.lang.round(e)+", "+gH.default.lang.round(n)+"%, "+gH.default.lang.round(r)+"%)"}};pH.default=mH,Object.defineProperty(Kq,"__esModule",{value:!0});var vH=Jq,bH=sH,_H=uH,wH=pH,xH={format:{keyword:bH.default,hex:vH.default,rgb:_H.default,rgba:_H.default,hsl:wH.default,hsla:wH.default},parse:function(t){if("string"!=typeof t)return t;var e=vH.default.parse(t)||_H.default.parse(t)||wH.default.parse(t)||bH.default.parse(t);if(e)return e;throw new Error('Unsupported color format: "'+t+'"')},stringify:function(t){return!t.changed&&t.color?t.color:t.type.is(2)||void 0===t.data.r?wH.default.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?_H.default.stringify(t):vH.default.stringify(t)}};Kq.default=xH;var kH={};Object.defineProperty(kH,"__esModule",{value:!0});var CH=Bq,TH=Kq;kH.default=function(t,e){var n=TH.default.parse(t);for(var r in e)n[r]=CH.default.channel.clamp[r](e[r]);return TH.default.stringify(n)},Object.defineProperty(Nq,"__esModule",{value:!0});var EH=Bq,SH=Wq,OH=Kq,AH=kH;Nq.default=function(t,e,n,r){if(void 0===n&&(n=0),void 0===r&&(r=1),"number"!=typeof t)return AH.default(t,{a:e});var i=SH.default.set({r:EH.default.channel.clamp.r(t),g:EH.default.channel.clamp.g(e),b:EH.default.channel.clamp.b(n),a:EH.default.channel.clamp.a(r)});return OH.default.stringify(i)};var MH={};Object.defineProperty(MH,"__esModule",{value:!0});var DH=Bq,jH=Wq,NH=Kq;MH.default=function(t,e,n,r){void 0===r&&(r=1);var i=jH.default.set({h:DH.default.channel.clamp.h(t),s:DH.default.channel.clamp.s(e),l:DH.default.channel.clamp.l(n),a:DH.default.channel.clamp.a(r)});return NH.default.stringify(i)};var BH={};Object.defineProperty(BH,"__esModule",{value:!0});var LH=Kq;BH.default=function(t){return LH.default.format.keyword.stringify(LH.default.parse(t))};var RH={};Object.defineProperty(RH,"__esModule",{value:!0});var IH=Kq;RH.default=function(t){return IH.default.format.hex.stringify(IH.default.parse(t))};var FH={};Object.defineProperty(FH,"__esModule",{value:!0});var PH=Kq;FH.default=function(t){return PH.default.format.rgba.stringify(PH.default.parse(t))};var YH={};Object.defineProperty(YH,"__esModule",{value:!0});var zH=Kq;YH.default=function(t){return zH.default.format.hsla.stringify(zH.default.parse(t))};var UH={};Object.defineProperty(UH,"__esModule",{value:!0});var $H=Bq,WH=Kq;UH.default=function(t,e){return $H.default.lang.round(WH.default.parse(t)[e])};var qH={};Object.defineProperty(qH,"__esModule",{value:!0});var HH=UH;qH.default=function(t){return HH.default(t,"r")};var VH={};Object.defineProperty(VH,"__esModule",{value:!0});var GH=UH;VH.default=function(t){return GH.default(t,"g")};var XH={};Object.defineProperty(XH,"__esModule",{value:!0});var ZH=UH;XH.default=function(t){return ZH.default(t,"b")};var QH={};Object.defineProperty(QH,"__esModule",{value:!0});var KH=UH;QH.default=function(t){return KH.default(t,"h")};var JH={};Object.defineProperty(JH,"__esModule",{value:!0});var tV=UH;JH.default=function(t){return tV.default(t,"s")};var eV={};Object.defineProperty(eV,"__esModule",{value:!0});var nV=UH;eV.default=function(t){return nV.default(t,"l")};var rV={};Object.defineProperty(rV,"__esModule",{value:!0});var iV=UH;rV.default=function(t){return iV.default(t,"a")};var aV={},oV={};Object.defineProperty(oV,"__esModule",{value:!0});var sV=Bq,cV=Kq;oV.default=function(t){var e=cV.default.parse(t),n=e.r,r=e.g,i=e.b,a=.2126*sV.default.channel.toLinear(n)+.7152*sV.default.channel.toLinear(r)+.0722*sV.default.channel.toLinear(i);return sV.default.lang.round(a)},Object.defineProperty(aV,"__esModule",{value:!0});var lV=Bq,uV=oV;aV.default=function(t,e){var n=uV.default(t),r=uV.default(e),i=Math.max(n,r),a=Math.min(n,r),o=(i+Number.EPSILON)/(a+Number.EPSILON);return lV.default.lang.round(lV.default.lang.clamp(o,1,10))};var hV={},dV={};Object.defineProperty(dV,"__esModule",{value:!0});var fV=oV;dV.default=function(t){return fV.default(t)>=.5},Object.defineProperty(hV,"__esModule",{value:!0});var pV=dV;hV.default=function(t){return!pV.default(t)};var gV={};Object.defineProperty(gV,"__esModule",{value:!0});var yV=Kq;gV.default=function(t){try{return yV.default.parse(t),!0}catch(e){return!1}};var mV={},vV={};Object.defineProperty(vV,"__esModule",{value:!0});var bV=Bq,_V=Kq;vV.default=function(t,e,n){var r=_V.default.parse(t),i=r[e],a=bV.default.channel.clamp[e](i+n);return i!==a&&(r[e]=a),_V.default.stringify(r)},Object.defineProperty(mV,"__esModule",{value:!0});var wV=vV;mV.default=function(t,e){return wV.default(t,"s",e)};var xV={};Object.defineProperty(xV,"__esModule",{value:!0});var kV=vV;xV.default=function(t,e){return kV.default(t,"s",-e)};var CV={};Object.defineProperty(CV,"__esModule",{value:!0});var TV=vV;CV.default=function(t,e){return TV.default(t,"l",e)};var EV={};Object.defineProperty(EV,"__esModule",{value:!0});var SV=vV;EV.default=function(t,e){return SV.default(t,"l",-e)};var OV={};Object.defineProperty(OV,"__esModule",{value:!0});var AV=vV;OV.default=function(t,e){return AV.default(t,"a",e)};var MV={};Object.defineProperty(MV,"__esModule",{value:!0});var DV=vV;MV.default=function(t,e){return DV.default(t,"a",-e)};var jV={};Object.defineProperty(jV,"__esModule",{value:!0});var NV=vV;jV.default=function(t){return NV.default(t,"h",180)};var BV={};Object.defineProperty(BV,"__esModule",{value:!0});var LV=kH;BV.default=function(t){return LV.default(t,{s:0})};var RV={};Object.defineProperty(RV,"__esModule",{value:!0});var IV=Kq,FV=kH;RV.default=function(t,e){var n=IV.default.parse(t),r={};for(var i in e)e[i]&&(r[i]=n[i]+e[i]);return FV.default(t,r)};var PV={},YV={};Object.defineProperty(YV,"__esModule",{value:!0});var zV=Kq,UV=Nq;YV.default=function(t,e,n){void 0===n&&(n=50);var r=zV.default.parse(t),i=r.r,a=r.g,o=r.b,s=r.a,c=zV.default.parse(e),l=c.r,u=c.g,h=c.b,d=c.a,f=n/100,p=2*f-1,g=s-d,y=((p*g==-1?p:(p+g)/(1+p*g))+1)/2,m=1-y,v=i*y+l*m,b=a*y+u*m,_=o*y+h*m,w=s*f+d*(1-f);return UV.default(v,b,_,w)},Object.defineProperty(PV,"__esModule",{value:!0});var $V=Kq,WV=YV;PV.default=function(t,e){void 0===e&&(e=100);var n=$V.default.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,WV.default(n,t,e)};var qV={};Object.defineProperty(qV,"__esModule",{value:!0});var HV=Bq,VV=Kq,GV=RV;qV.default=function(t,e){var n,r,i,a=VV.default.parse(t),o={};for(var s in e)o[s]=(n=a[s],r=e[s],i=HV.default.channel.max[s],r>0?(i-n)*r/100:n*r/100);return GV.default(t,o)},Object.defineProperty(jq,"__esModule",{value:!0});var XV=Nq;jq.hex=XV.default;var ZV=Nq;jq.rgb=ZV.default;var QV=Nq;jq.rgba=QV.default;var KV=MH;jq.hsl=KV.default;var JV=MH;jq.hsla=JV.default;var tG=BH;jq.toKeyword=tG.default;var eG=RH;jq.toHex=eG.default;var nG=FH;jq.toRgba=nG.default;var rG=YH;jq.toHsla=rG.default;var iG=UH;jq.channel=iG.default;var aG=qH;jq.red=aG.default;var oG=VH;jq.green=oG.default;var sG=XH;jq.blue=sG.default;var cG=QH;jq.hue=cG.default;var lG=JH;jq.saturation=lG.default;var uG=eV;jq.lightness=uG.default;var hG=rV;jq.alpha=hG.default;var dG=rV;jq.opacity=dG.default;var fG=aV;jq.contrast=fG.default;var pG=oV;jq.luminance=pG.default;var gG=hV;jq.isDark=gG.default;var yG=dV;jq.isLight=yG.default;var mG=gV;jq.isValid=mG.default;var vG=mV;jq.saturate=vG.default;var bG=xV;jq.desaturate=bG.default;var _G=CV;jq.lighten=_G.default;var wG=EV;jq.darken=wG.default;var xG=OV;jq.opacify=xG.default;var kG=OV;jq.fadeIn=kG.default;var CG=MV;jq.transparentize=CG.default;var TG=MV;jq.fadeOut=TG.default;var EG=jV;jq.complement=EG.default;var SG=BV;jq.grayscale=SG.default;var OG=RV;jq.adjust=OG.default;var AG=kH;jq.change=AG.default;var MG=PV;jq.invert=MG.default;var DG=YV;jq.mix=DG.default;var jG=qV;jq.scale=jG.default,function(t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(jq)}(Dq);var NG={exports:{}};!function(t,e){t.exports=function(){var e,n;function r(){return e.apply(null,arguments)}function i(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function a(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function o(t){return void 0===t}function s(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function c(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function u(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function h(t,e){for(var n in e)u(e,n)&&(t[n]=e[n]);return u(e,"toString")&&(t.toString=e.toString),u(e,"valueOf")&&(t.valueOf=e.valueOf),t}function d(t,e,n,r){return Oe(t,e,n,r,!0).utc()}function f(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function p(t){if(null==t._isValid){var e=f(t),r=n.call(e.parsedDateParts,(function(t){return null!=t})),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&r);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function g(t){var e=d(NaN);return null!=t?h(f(e),t):f(e).userInvalidated=!0,e}n=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var y=r.momentProperties=[];function m(t,e){var n,r,i;if(o(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),o(e._i)||(t._i=e._i),o(e._f)||(t._f=e._f),o(e._l)||(t._l=e._l),o(e._strict)||(t._strict=e._strict),o(e._tzm)||(t._tzm=e._tzm),o(e._isUTC)||(t._isUTC=e._isUTC),o(e._offset)||(t._offset=e._offset),o(e._pf)||(t._pf=f(e)),o(e._locale)||(t._locale=e._locale),0<y.length)for(n=0;n<y.length;n++)o(i=e[r=y[n]])||(t[r]=i);return t}var v=!1;function b(t){m(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,r.updateOffset(this),v=!1)}function _(t){return t instanceof b||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function x(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=w(e)),n}function k(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&x(t[r])!==x(e[r]))&&o++;return o+a}function C(t){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function T(t,e){var n=!0;return h((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,t),n){for(var i,a=[],o=0;o<arguments.length;o++){if(i="","object"==typeof arguments[o]){for(var s in i+="\n["+o+"] ",arguments[0])i+=s+": "+arguments[0][s]+", ";i=i.slice(0,-2)}else i=arguments[o];a.push(i)}C(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var E,S={};function O(t,e){null!=r.deprecationHandler&&r.deprecationHandler(t,e),S[t]||(C(e),S[t]=!0)}function A(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function M(t,e){var n,r=h({},t);for(n in e)u(e,n)&&(a(t[n])&&a(e[n])?(r[n]={},h(r[n],t[n]),h(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)u(t,n)&&!u(e,n)&&a(t[n])&&(r[n]=h({},r[n]));return r}function D(t){null!=t&&this.set(t)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,E=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)u(t,e)&&n.push(e);return n};var j={};function N(t,e){var n=t.toLowerCase();j[n]=j[n+"s"]=j[e]=t}function B(t){return"string"==typeof t?j[t]||j[t.toLowerCase()]:void 0}function L(t){var e,n,r={};for(n in t)u(t,n)&&(e=B(n))&&(r[e]=t[n]);return r}var R={};function I(t,e){R[t]=e}function F(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var P=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Y=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,z={},U={};function $(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(U[t]=i),e&&(U[e[0]]=function(){return F(i.apply(this,arguments),e[1],e[2])}),n&&(U[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function W(t,e){return t.isValid()?(e=q(e,t.localeData()),z[e]=z[e]||function(t){var e,n,r,i=t.match(P);for(e=0,n=i.length;e<n;e++)U[i[e]]?i[e]=U[i[e]]:i[e]=(r=i[e]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(e){var r,a="";for(r=0;r<n;r++)a+=A(i[r])?i[r].call(e,t):i[r];return a}}(e),z[e](t)):t.localeData().invalidDate()}function q(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(Y.lastIndex=0;0<=n&&Y.test(t);)t=t.replace(Y,r),Y.lastIndex=0,n-=1;return t}var H=/\d/,V=/\d\d/,G=/\d{3}/,X=/\d{4}/,Z=/[+-]?\d{6}/,Q=/\d\d?/,K=/\d\d\d\d?/,J=/\d\d\d\d\d\d?/,tt=/\d{1,3}/,et=/\d{1,4}/,nt=/[+-]?\d{1,6}/,rt=/\d+/,it=/[+-]?\d+/,at=/Z|[+-]\d\d:?\d\d/gi,ot=/Z|[+-]\d\d(?::?\d\d)?/gi,st=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ct={};function lt(t,e,n){ct[t]=A(e)?e:function(t,r){return t&&n?n:e}}function ut(t,e){return u(ct,t)?ct[t](e._strict,e._locale):new RegExp(ht(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function ht(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var dt={};function ft(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),s(e)&&(r=function(t,n){n[e]=x(t)}),n=0;n<t.length;n++)dt[t[n]]=r}function pt(t,e){ft(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}var gt=0,yt=1,mt=2,vt=3,bt=4,_t=5,wt=6,xt=7,kt=8;function Ct(t){return Tt(t)?366:365}function Tt(t){return t%4==0&&t%100!=0||t%400==0}$("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),$(0,["YY",2],0,(function(){return this.year()%100})),$(0,["YYYY",4],0,"year"),$(0,["YYYYY",5],0,"year"),$(0,["YYYYYY",6,!0],0,"year"),N("year","y"),I("year",1),lt("Y",it),lt("YY",Q,V),lt("YYYY",et,X),lt("YYYYY",nt,Z),lt("YYYYYY",nt,Z),ft(["YYYYY","YYYYYY"],gt),ft("YYYY",(function(t,e){e[gt]=2===t.length?r.parseTwoDigitYear(t):x(t)})),ft("YY",(function(t,e){e[gt]=r.parseTwoDigitYear(t)})),ft("Y",(function(t,e){e[gt]=parseInt(t,10)})),r.parseTwoDigitYear=function(t){return x(t)+(68<x(t)?1900:2e3)};var Et,St=Ot("FullYear",!0);function Ot(t,e){return function(n){return null!=n?(Mt(this,t,n),r.updateOffset(this,e),this):At(this,t)}}function At(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Mt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&Tt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),Dt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function Dt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n,r=(e%(n=12)+n)%n;return t+=(e-r)/12,1===r?Tt(t)?29:28:31-r%7%2}Et=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},$("M",["MM",2],"Mo",(function(){return this.month()+1})),$("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),$("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),N("month","M"),I("month",8),lt("M",Q),lt("MM",Q,V),lt("MMM",(function(t,e){return e.monthsShortRegex(t)})),lt("MMMM",(function(t,e){return e.monthsRegex(t)})),ft(["M","MM"],(function(t,e){e[yt]=x(t)-1})),ft(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[yt]=i:f(n).invalidMonth=t}));var jt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Nt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Bt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Lt(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=x(e);else if(!s(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),Dt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function Rt(t){return null!=t?(Lt(this,t),r.updateOffset(this,!0),this):At(this,"Month")}var It=st,Ft=st;function Pt(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=d([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=ht(r[e]),i[e]=ht(i[e]);for(e=0;e<24;e++)a[e]=ht(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Yt(t){var e;if(t<100&&0<=t){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function zt(t,e,n){var r=7+e-n;return-(7+Yt(t,0,r).getUTCDay()-e)%7+r-1}function Ut(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+zt(t,r,i);return o=s<=0?Ct(a=t-1)+s:s>Ct(t)?(a=t+1,s-Ct(t)):(a=t,s),{year:a,dayOfYear:o}}function $t(t,e,n){var r,i,a=zt(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Wt(i=t.year()-1,e,n):o>Wt(t.year(),e,n)?(r=o-Wt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Wt(t,e,n){var r=zt(t,e,n),i=zt(t+1,e,n);return(Ct(t)-r+i)/7}function qt(t,e){return t.slice(e,7).concat(t.slice(0,e))}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),N("week","w"),N("isoWeek","W"),I("week",5),I("isoWeek",5),lt("w",Q),lt("ww",Q,V),lt("W",Q),lt("WW",Q,V),pt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=x(t)})),$("d",0,"do","day"),$("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),$("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),$("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),N("day","d"),N("weekday","e"),N("isoWeekday","E"),I("day",11),I("weekday",11),I("isoWeekday",11),lt("d",Q),lt("e",Q),lt("E",Q),lt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),lt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),lt("dddd",(function(t,e){return e.weekdaysRegex(t)})),pt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:f(n).invalidWeekday=t})),pt(["d","e","E"],(function(t,e,n,r){e[r]=x(t)}));var Ht="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Vt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Gt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Xt=st,Zt=st,Qt=st;function Kt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],l=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),c.push(a),l.push(r),l.push(i),l.push(a);for(o.sort(t),s.sort(t),c.sort(t),l.sort(t),e=0;e<7;e++)s[e]=ht(s[e]),c[e]=ht(c[e]),l[e]=ht(l[e]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Jt(){return this.hours()%12||12}function te(t,e){$(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function ee(t,e){return e._meridiemParse}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,Jt),$("k",["kk",2],0,(function(){return this.hours()||24})),$("hmm",0,0,(function(){return""+Jt.apply(this)+F(this.minutes(),2)})),$("hmmss",0,0,(function(){return""+Jt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),$("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),$("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),te("a",!0),te("A",!1),N("hour","h"),I("hour",13),lt("a",ee),lt("A",ee),lt("H",Q),lt("h",Q),lt("k",Q),lt("HH",Q,V),lt("hh",Q,V),lt("kk",Q,V),lt("hmm",K),lt("hmmss",J),lt("Hmm",K),lt("Hmmss",J),ft(["H","HH"],vt),ft(["k","kk"],(function(t,e,n){var r=x(t);e[vt]=24===r?0:r})),ft(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),ft(["h","hh"],(function(t,e,n){e[vt]=x(t),f(n).bigHour=!0})),ft("hmm",(function(t,e,n){var r=t.length-2;e[vt]=x(t.substr(0,r)),e[bt]=x(t.substr(r)),f(n).bigHour=!0})),ft("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[vt]=x(t.substr(0,r)),e[bt]=x(t.substr(r,2)),e[_t]=x(t.substr(i)),f(n).bigHour=!0})),ft("Hmm",(function(t,e,n){var r=t.length-2;e[vt]=x(t.substr(0,r)),e[bt]=x(t.substr(r))})),ft("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[vt]=x(t.substr(0,r)),e[bt]=x(t.substr(r,2)),e[_t]=x(t.substr(i))}));var ne,re=Ot("Hours",!0),ie={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Nt,monthsShort:Bt,week:{dow:0,doy:6},weekdays:Ht,weekdaysMin:Gt,weekdaysShort:Vt,meridiemParse:/[ap]\.?m?\.?/i},ae={},oe={};function se(t){return t?t.toLowerCase().replace("_","-"):t}function ce(e){var n=null;if(!ae[e]&&t&&t.exports)try{n=ne._abbr,require("./locale/"+e),le(n)}catch(r){}return ae[e]}function le(t,e){var n;return t&&((n=o(e)?he(t):ue(t,e))?ne=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),ne._abbr}function ue(t,e){if(null===e)return delete ae[t],null;var n,r=ie;if(e.abbr=t,null!=ae[t])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ae[t]._config;else if(null!=e.parentLocale)if(null!=ae[e.parentLocale])r=ae[e.parentLocale]._config;else{if(null==(n=ce(e.parentLocale)))return oe[e.parentLocale]||(oe[e.parentLocale]=[]),oe[e.parentLocale].push({name:t,config:e}),null;r=n._config}return ae[t]=new D(M(r,e)),oe[t]&&oe[t].forEach((function(t){ue(t.name,t.config)})),le(t),ae[t]}function he(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ne;if(!i(t)){if(e=ce(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=se(t[a]).split("-")).length,n=(n=se(t[a+1]))?n.split("-"):null;0<e;){if(r=ce(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&k(i,n,!0)>=e-1)break;e--}a++}return ne}(t)}function de(t){var e,n=t._a;return n&&-2===f(t).overflow&&(e=n[yt]<0||11<n[yt]?yt:n[mt]<1||n[mt]>Dt(n[gt],n[yt])?mt:n[vt]<0||24<n[vt]||24===n[vt]&&(0!==n[bt]||0!==n[_t]||0!==n[wt])?vt:n[bt]<0||59<n[bt]?bt:n[_t]<0||59<n[_t]?_t:n[wt]<0||999<n[wt]?wt:-1,f(t)._overflowDayOfYear&&(e<gt||mt<e)&&(e=mt),f(t)._overflowWeeks&&-1===e&&(e=xt),f(t)._overflowWeekday&&-1===e&&(e=kt),f(t).overflow=e),t}function fe(t,e,n){return null!=t?t:null!=e?e:n}function pe(t){var e,n,i,a,o,s=[];if(!t._d){var c,l;for(c=t,l=new Date(r.now()),i=c._useUTC?[l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()]:[l.getFullYear(),l.getMonth(),l.getDate()],t._w&&null==t._a[mt]&&null==t._a[yt]&&function(t){var e,n,r,i,a,o,s,c;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,n=fe(e.GG,t._a[gt],$t(Ae(),1,4).year),r=fe(e.W,1),((i=fe(e.E,1))<1||7<i)&&(c=!0);else{a=t._locale._week.dow,o=t._locale._week.doy;var l=$t(Ae(),a,o);n=fe(e.gg,t._a[gt],l.year),r=fe(e.w,l.week),null!=e.d?((i=e.d)<0||6<i)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||6<e.e)&&(c=!0)):i=a}r<1||r>Wt(n,a,o)?f(t)._overflowWeeks=!0:null!=c?f(t)._overflowWeekday=!0:(s=Ut(n,r,i,a,o),t._a[gt]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=fe(t._a[gt],i[gt]),(t._dayOfYear>Ct(o)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),n=Yt(o,0,t._dayOfYear),t._a[yt]=n.getUTCMonth(),t._a[mt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=i[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[vt]&&0===t._a[bt]&&0===t._a[_t]&&0===t._a[wt]&&(t._nextDay=!0,t._a[vt]=0),t._d=(t._useUTC?Yt:function(t,e,n,r,i,a,o){var s;return t<100&&0<=t?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[vt]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(f(t).weekdayMismatch=!0)}}var ge=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ye=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,me=/Z|[+-]\d\d(?::?\d\d)?/,ve=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],be=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],_e=/^\/?Date\((\-?\d+)/i;function we(t){var e,n,r,i,a,o,s=t._i,c=ge.exec(s)||ye.exec(s);if(c){for(f(t).iso=!0,e=0,n=ve.length;e<n;e++)if(ve[e][1].exec(c[1])){i=ve[e][0],r=!1!==ve[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=be.length;e<n;e++)if(be[e][1].exec(c[3])){a=(c[2]||" ")+be[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(c[4]){if(!me.exec(c[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),Ee(t)}else t._isValid=!1}var xe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function ke(t,e,n,r,i,a){var o,s,c=[(o=t,s=parseInt(o,10),s<=49?2e3+s:s<=999?1900+s:s),Bt.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&c.push(parseInt(a,10)),c}var Ce={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Te(t){var e,n,r,i=xe.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var a=ke(i[4],i[3],i[2],i[5],i[6],i[7]);if(n=a,r=t,(e=i[1])&&Vt.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(f(r).weekdayMismatch=!0,!(r._isValid=!1)))return;t._a=a,t._tzm=function(t,e,n){if(t)return Ce[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(i[8],i[9],i[10]),t._d=Yt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),f(t).rfc2822=!0}else t._isValid=!1}function Ee(t){if(t._f!==r.ISO_8601)if(t._f!==r.RFC_2822){t._a=[],f(t).empty=!0;var e,n,i,a,o,s,c,l,h=""+t._i,d=h.length,p=0;for(i=q(t._f,t._locale).match(P)||[],e=0;e<i.length;e++)a=i[e],(n=(h.match(ut(a,t))||[])[0])&&(0<(o=h.substr(0,h.indexOf(n))).length&&f(t).unusedInput.push(o),h=h.slice(h.indexOf(n)+n.length),p+=n.length),U[a]?(n?f(t).empty=!1:f(t).unusedTokens.push(a),s=a,l=t,null!=(c=n)&&u(dt,s)&&dt[s](c,l._a,l,s)):t._strict&&!n&&f(t).unusedTokens.push(a);f(t).charsLeftOver=d-p,0<h.length&&f(t).unusedInput.push(h),t._a[vt]<=12&&!0===f(t).bigHour&&0<t._a[vt]&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[vt]=(g=t._locale,y=t._a[vt],null==(m=t._meridiem)?y:null!=g.meridiemHour?g.meridiemHour(y,m):(null!=g.isPM&&((v=g.isPM(m))&&y<12&&(y+=12),v||12!==y||(y=0)),y)),pe(t),de(t)}else Te(t);else we(t);var g,y,m,v}function Se(t){var e,n,u,d,y=t._i,v=t._f;return t._locale=t._locale||he(t._l),null===y||void 0===v&&""===y?g({nullInput:!0}):("string"==typeof y&&(t._i=y=t._locale.preparse(y)),_(y)?new b(de(y)):(c(y)?t._d=y:i(v)?function(t){var e,n,r,i,a;if(0===t._f.length)return f(t).invalidFormat=!0,t._d=new Date(NaN);for(i=0;i<t._f.length;i++)a=0,e=m({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],Ee(e),p(e)&&(a+=f(e).charsLeftOver,a+=10*f(e).unusedTokens.length,f(e).score=a,(null==r||a<r)&&(r=a,n=e));h(t,n||e)}(t):v?Ee(t):o(n=(e=t)._i)?e._d=new Date(r.now()):c(n)?e._d=new Date(n.valueOf()):"string"==typeof n?(u=e,null===(d=_e.exec(u._i))?(we(u),!1===u._isValid&&(delete u._isValid,Te(u),!1===u._isValid&&(delete u._isValid,r.createFromInputFallback(u)))):u._d=new Date(+d[1])):i(n)?(e._a=l(n.slice(0),(function(t){return parseInt(t,10)})),pe(e)):a(n)?function(t){if(!t._d){var e=L(t._i);t._a=l([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),pe(t)}}(e):s(n)?e._d=new Date(n):r.createFromInputFallback(e),p(t)||(t._d=null),t))}function Oe(t,e,n,r,o){var s,c={};return!0!==n&&!1!==n||(r=n,n=void 0),(a(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||i(t)&&0===t.length)&&(t=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=o,c._l=n,c._i=t,c._f=e,c._strict=r,(s=new b(de(Se(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Ae(t,e,n,r){return Oe(t,e,n,r,!1)}r.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Me=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Ae.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:g()})),De=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Ae.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:g()}));function je(t,e){var n,r;if(1===e.length&&i(e[0])&&(e=e[0]),!e.length)return Ae();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Ne=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Be(t){var e=L(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,c=e.minute||0,l=e.second||0,u=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===Et.call(Ne,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Ne.length;++r)if(t[Ne[r]]){if(n)return!1;parseFloat(t[Ne[r]])!==x(t[Ne[r]])&&(n=!0)}return!0}(e),this._milliseconds=+u+1e3*l+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=he(),this._bubble()}function Le(t){return t instanceof Be}function Re(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ie(t,e){$(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+F(~~(t/60),2)+e+F(~~t%60,2)}))}Ie("Z",":"),Ie("ZZ",""),lt("Z",ot),lt("ZZ",ot),ft(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Pe(ot,t)}));var Fe=/([\+\-]|\d\d)/gi;function Pe(t,e){var n=(e||"").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Fe)||["-",0,0],i=60*r[1]+x(r[2]);return 0===i?0:"+"===r[0]?i:-i}function Ye(t,e){var n,i;return e._isUTC?(n=e.clone(),i=(_(t)||c(t)?t.valueOf():Ae(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Ae(t).local()}function ze(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Ue(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var $e=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,We=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function qe(t,e){var n,r,i,a,o,c,l=t,h=null;return Le(t)?l={ms:t._milliseconds,d:t._days,M:t._months}:s(t)?(l={},e?l[e]=t:l.milliseconds=t):(h=$e.exec(t))?(n="-"===h[1]?-1:1,l={y:0,d:x(h[mt])*n,h:x(h[vt])*n,m:x(h[bt])*n,s:x(h[_t])*n,ms:x(Re(1e3*h[wt]))*n}):(h=We.exec(t))?(n="-"===h[1]?-1:1,l={y:He(h[2],n),M:He(h[3],n),w:He(h[4],n),d:He(h[5],n),h:He(h[6],n),m:He(h[7],n),s:He(h[8],n)}):null==l?l={}:"object"==typeof l&&("from"in l||"to"in l)&&(a=Ae(l.from),o=Ae(l.to),i=a.isValid()&&o.isValid()?(o=Ye(o,a),a.isBefore(o)?c=Ve(a,o):((c=Ve(o,a)).milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0},(l={}).ms=i.milliseconds,l.M=i.months),r=new Be(l),Le(t)&&u(t,"_locale")&&(r._locale=t._locale),r}function He(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Ve(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Ge(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(O(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Xe(this,qe(n="string"==typeof n?+n:n,r),t),this}}function Xe(t,e,n,i){var a=e._milliseconds,o=Re(e._days),s=Re(e._months);t.isValid()&&(i=null==i||i,s&&Lt(t,At(t,"Month")+s*n),o&&Mt(t,"Date",At(t,"Date")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),i&&r.updateOffset(t,o||s))}qe.fn=Be.prototype,qe.invalid=function(){return qe(NaN)};var Ze=Ge(1,"add"),Qe=Ge(-1,"subtract");function Ke(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function Je(t){var e;return void 0===t?this._locale._abbr:(null!=(e=he(t))&&(this._locale=e),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var tn=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function en(){return this._locale}var nn=126227808e5;function rn(t,e){return(t%e+e)%e}function an(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-nn:new Date(t,e,n).valueOf()}function on(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-nn:Date.UTC(t,e,n)}function sn(t,e){$(0,[t,t.length],0,e)}function cn(t,e,n,r,i){var a;return null==t?$t(this,r,i).year:((a=Wt(t,r,i))<e&&(e=a),function(t,e,n,r,i){var a=Ut(t,e,n,r,i),o=Yt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,n,r,i))}$(0,["gg",2],0,(function(){return this.weekYear()%100})),$(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),sn("gggg","weekYear"),sn("ggggg","weekYear"),sn("GGGG","isoWeekYear"),sn("GGGGG","isoWeekYear"),N("weekYear","gg"),N("isoWeekYear","GG"),I("weekYear",1),I("isoWeekYear",1),lt("G",it),lt("g",it),lt("GG",Q,V),lt("gg",Q,V),lt("GGGG",et,X),lt("gggg",et,X),lt("GGGGG",nt,Z),lt("ggggg",nt,Z),pt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=x(t)})),pt(["gg","GG"],(function(t,e,n,i){e[i]=r.parseTwoDigitYear(t)})),$("Q",0,"Qo","quarter"),N("quarter","Q"),I("quarter",7),lt("Q",H),ft("Q",(function(t,e){e[yt]=3*(x(t)-1)})),$("D",["DD",2],"Do","date"),N("date","D"),I("date",9),lt("D",Q),lt("DD",Q,V),lt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),ft(["D","DD"],mt),ft("Do",(function(t,e){e[mt]=x(t.match(Q)[0])}));var ln=Ot("Date",!0);$("DDD",["DDDD",3],"DDDo","dayOfYear"),N("dayOfYear","DDD"),I("dayOfYear",4),lt("DDD",tt),lt("DDDD",G),ft(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=x(t)})),$("m",["mm",2],0,"minute"),N("minute","m"),I("minute",14),lt("m",Q),lt("mm",Q,V),ft(["m","mm"],bt);var un=Ot("Minutes",!1);$("s",["ss",2],0,"second"),N("second","s"),I("second",15),lt("s",Q),lt("ss",Q,V),ft(["s","ss"],_t);var hn,dn=Ot("Seconds",!1);for($("S",0,0,(function(){return~~(this.millisecond()/100)})),$(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),$(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),$(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),$(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),$(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),$(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),N("millisecond","ms"),I("millisecond",16),lt("S",tt,H),lt("SS",tt,V),lt("SSS",tt,G),hn="SSSS";hn.length<=9;hn+="S")lt(hn,rt);function fn(t,e){e[wt]=x(1e3*("0."+t))}for(hn="S";hn.length<=9;hn+="S")ft(hn,fn);var pn=Ot("Milliseconds",!1);$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");var gn=b.prototype;function yn(t){return t}gn.add=Ze,gn.calendar=function(t,e){var n=t||Ae(),i=Ye(n,this).startOf("day"),a=r.calendarFormat(this,i)||"sameElse",o=e&&(A(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,Ae(n)))},gn.clone=function(){return new b(this)},gn.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=Ye(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=B(e)){case"year":a=Ke(this,r)/12;break;case"month":a=Ke(this,r);break;case"quarter":a=Ke(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:w(a)},gn.endOf=function(t){var e;if(void 0===(t=B(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?on:an;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-rn(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-rn(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-rn(e,1e3)-1}return this._d.setTime(e),r.updateOffset(this,!0),this},gn.format=function(t){t||(t=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var e=W(this,t);return this.localeData().postformat(e)},gn.from=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||Ae(t).isValid())?qe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},gn.fromNow=function(t){return this.from(Ae(),t)},gn.to=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||Ae(t).isValid())?qe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},gn.toNow=function(t){return this.to(Ae(),t)},gn.get=function(t){return A(this[t=B(t)])?this[t]():this},gn.invalidAt=function(){return f(this).overflow},gn.isAfter=function(t,e){var n=_(t)?t:Ae(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=B(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},gn.isBefore=function(t,e){var n=_(t)?t:Ae(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=B(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},gn.isBetween=function(t,e,n,r){var i=_(t)?t:Ae(t),a=_(e)?e:Ae(e);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))},gn.isSame=function(t,e){var n,r=_(t)?t:Ae(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=B(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},gn.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},gn.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},gn.isValid=function(){return p(this)},gn.lang=tn,gn.locale=Je,gn.localeData=en,gn.max=De,gn.min=Me,gn.parsingFlags=function(){return h({},f(this))},gn.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:R[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=L(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(A(this[t=B(t)]))return this[t](e);return this},gn.startOf=function(t){var e;if(void 0===(t=B(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?on:an;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=rn(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=rn(e,6e4);break;case"second":e=this._d.valueOf(),e-=rn(e,1e3)}return this._d.setTime(e),r.updateOffset(this,!0),this},gn.subtract=Qe,gn.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},gn.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},gn.toDate=function(){return new Date(this.valueOf())},gn.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?W(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},gn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},gn.toJSON=function(){return this.isValid()?this.toISOString():null},gn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},gn.unix=function(){return Math.floor(this.valueOf()/1e3)},gn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},gn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},gn.year=St,gn.isLeapYear=function(){return Tt(this.year())},gn.weekYear=function(t){return cn.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},gn.isoWeekYear=function(t){return cn.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},gn.quarter=gn.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},gn.month=Rt,gn.daysInMonth=function(){return Dt(this.year(),this.month())},gn.week=gn.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},gn.isoWeek=gn.isoWeeks=function(t){var e=$t(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},gn.weeksInYear=function(){var t=this.localeData()._week;return Wt(this.year(),t.dow,t.doy)},gn.isoWeeksInYear=function(){return Wt(this.year(),1,4)},gn.date=ln,gn.day=gn.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-r,"d")):r},gn.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},gn.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e,n,r=(e=t,n=this.localeData(),"string"==typeof e?n.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},gn.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},gn.hour=gn.hours=re,gn.minute=gn.minutes=un,gn.second=gn.seconds=dn,gn.millisecond=gn.milliseconds=pn,gn.utcOffset=function(t,e,n){var i,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?a:ze(this);if("string"==typeof t){if(null===(t=Pe(ot,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(i=ze(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),a!==t&&(!e||this._changeInProgress?Xe(this,qe(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this},gn.utc=function(t){return this.utcOffset(0,t)},gn.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(ze(this),"m")),this},gn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Pe(at,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},gn.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Ae(t).utcOffset():0,(this.utcOffset()-t)%60==0)},gn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},gn.isLocal=function(){return!!this.isValid()&&!this._isUTC},gn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},gn.isUtc=Ue,gn.isUTC=Ue,gn.zoneAbbr=function(){return this._isUTC?"UTC":""},gn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},gn.dates=T("dates accessor is deprecated. Use date instead.",ln),gn.months=T("months accessor is deprecated. Use month instead",Rt),gn.years=T("years accessor is deprecated. Use year instead",St),gn.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),gn.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var t={};if(m(t,this),(t=Se(t))._a){var e=t._isUTC?d(t._a):Ae(t._a);this._isDSTShifted=this.isValid()&&0<k(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var mn=D.prototype;function vn(t,e,n,r){var i=he(),a=d().set(r,e);return i[n](a,t)}function bn(t,e,n){if(s(t)&&(e=t,t=void 0),t=t||"",null!=e)return vn(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=vn(t,r,n,"month");return i}function _n(t,e,n,r){"boolean"==typeof t?s(e)&&(n=e,e=void 0):(e=t,t=!1,s(n=e)&&(n=e,e=void 0)),e=e||"";var i,a=he(),o=t?a._week.dow:0;if(null!=n)return vn(e,(n+o)%7,r,"day");var c=[];for(i=0;i<7;i++)c[i]=vn(e,(i+o)%7,r,"day");return c}mn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return A(r)?r.call(e,n):r},mn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},mn.invalidDate=function(){return this._invalidDate},mn.ordinal=function(t){return this._ordinal.replace("%d",t)},mn.preparse=yn,mn.postformat=yn,mn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return A(i)?i(t,e,n,r):i.replace(/%d/i,t)},mn.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return A(n)?n(e):n.replace(/%s/i,e)},mn.set=function(t){var e,n;for(n in t)A(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},mn.months=function(t,e){return t?i(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||jt).test(e)?"format":"standalone"][t.month()]:i(this._months)?this._months:this._months.standalone},mn.monthsShort=function(t,e){return t?i(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[jt.test(e)?"format":"standalone"][t.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},mn.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=Et.call(this._shortMonthsParse,o))?i:null:-1!==(i=Et.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=Et.call(this._shortMonthsParse,o))||-1!==(i=Et.call(this._longMonthsParse,o))?i:null:-1!==(i=Et.call(this._longMonthsParse,o))||-1!==(i=Et.call(this._shortMonthsParse,o))?i:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},mn.monthsRegex=function(t){return this._monthsParseExact?(u(this,"_monthsRegex")||Pt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(u(this,"_monthsRegex")||(this._monthsRegex=Ft),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},mn.monthsShortRegex=function(t){return this._monthsParseExact?(u(this,"_monthsRegex")||Pt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(u(this,"_monthsShortRegex")||(this._monthsShortRegex=It),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},mn.week=function(t){return $t(t,this._week.dow,this._week.doy).week},mn.firstDayOfYear=function(){return this._week.doy},mn.firstDayOfWeek=function(){return this._week.dow},mn.weekdays=function(t,e){var n=i(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?qt(n,this._week.dow):t?n[t.day()]:n},mn.weekdaysMin=function(t){return!0===t?qt(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},mn.weekdaysShort=function(t){return!0===t?qt(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},mn.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=Et.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=Et.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=Et.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=Et.call(this._weekdaysParse,o))||-1!==(i=Et.call(this._shortWeekdaysParse,o))||-1!==(i=Et.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=Et.call(this._shortWeekdaysParse,o))||-1!==(i=Et.call(this._weekdaysParse,o))||-1!==(i=Et.call(this._minWeekdaysParse,o))?i:null:-1!==(i=Et.call(this._minWeekdaysParse,o))||-1!==(i=Et.call(this._weekdaysParse,o))||-1!==(i=Et.call(this._shortWeekdaysParse,o))?i:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},mn.weekdaysRegex=function(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Kt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=Xt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},mn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Kt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Zt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},mn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Kt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Qt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},mn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},mn.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},le("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===x(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),r.lang=T("moment.lang is deprecated. Use moment.locale instead.",le),r.langData=T("moment.langData is deprecated. Use moment.localeData instead.",he);var wn=Math.abs;function xn(t,e,n,r){var i=qe(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function kn(t){return t<0?Math.floor(t):Math.ceil(t)}function Cn(t){return 4800*t/146097}function Tn(t){return 146097*t/4800}function En(t){return function(){return this.as(t)}}var Sn=En("ms"),On=En("s"),An=En("m"),Mn=En("h"),Dn=En("d"),jn=En("w"),Nn=En("M"),Bn=En("Q"),Ln=En("y");function Rn(t){return function(){return this.isValid()?this._data[t]:NaN}}var In=Rn("milliseconds"),Fn=Rn("seconds"),Pn=Rn("minutes"),Yn=Rn("hours"),zn=Rn("days"),Un=Rn("months"),$n=Rn("years"),Wn=Math.round,qn={ss:44,s:45,m:45,h:22,d:26,M:11},Hn=Math.abs;function Vn(t){return(0<t)-(t<0)||+t}function Gn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Hn(this._milliseconds)/1e3,r=Hn(this._days),i=Hn(this._months);e=w((t=w(n/60))/60),n%=60,t%=60;var a=w(i/12),o=i%=12,s=r,c=e,l=t,u=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var d=h<0?"-":"",f=Vn(this._months)!==Vn(h)?"-":"",p=Vn(this._days)!==Vn(h)?"-":"",g=Vn(this._milliseconds)!==Vn(h)?"-":"";return d+"P"+(a?f+a+"Y":"")+(o?f+o+"M":"")+(s?p+s+"D":"")+(c||l||u?"T":"")+(c?g+c+"H":"")+(l?g+l+"M":"")+(u?g+u+"S":"")}var Xn=Be.prototype;return Xn.isValid=function(){return this._isValid},Xn.abs=function(){var t=this._data;return this._milliseconds=wn(this._milliseconds),this._days=wn(this._days),this._months=wn(this._months),t.milliseconds=wn(t.milliseconds),t.seconds=wn(t.seconds),t.minutes=wn(t.minutes),t.hours=wn(t.hours),t.months=wn(t.months),t.years=wn(t.years),this},Xn.add=function(t,e){return xn(this,t,e,1)},Xn.subtract=function(t,e){return xn(this,t,e,-1)},Xn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=B(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+Cn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Tn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},Xn.asMilliseconds=Sn,Xn.asSeconds=On,Xn.asMinutes=An,Xn.asHours=Mn,Xn.asDays=Dn,Xn.asWeeks=jn,Xn.asMonths=Nn,Xn.asQuarters=Bn,Xn.asYears=Ln,Xn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*x(this._months/12):NaN},Xn._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return 0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*kn(Tn(s)+o),s=o=0),c.milliseconds=a%1e3,t=w(a/1e3),c.seconds=t%60,e=w(t/60),c.minutes=e%60,n=w(e/60),c.hours=n%24,s+=i=w(Cn(o+=w(n/24))),o-=kn(Tn(i)),r=w(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},Xn.clone=function(){return qe(this)},Xn.get=function(t){return t=B(t),this.isValid()?this[t+"s"]():NaN},Xn.milliseconds=In,Xn.seconds=Fn,Xn.minutes=Pn,Xn.hours=Yn,Xn.days=zn,Xn.weeks=function(){return w(this.days()/7)},Xn.months=Un,Xn.years=$n,Xn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,r,i,a,o,s,c,l,u,h,d=this.localeData(),f=(n=!t,r=d,i=qe(e=this).abs(),a=Wn(i.as("s")),o=Wn(i.as("m")),s=Wn(i.as("h")),c=Wn(i.as("d")),l=Wn(i.as("M")),u=Wn(i.as("y")),(h=a<=qn.ss&&["s",a]||a<qn.s&&["ss",a]||o<=1&&["m"]||o<qn.m&&["mm",o]||s<=1&&["h"]||s<qn.h&&["hh",s]||c<=1&&["d"]||c<qn.d&&["dd",c]||l<=1&&["M"]||l<qn.M&&["MM",l]||u<=1&&["y"]||["yy",u])[2]=n,h[3]=0<+e,h[4]=r,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,h));return t&&(f=d.pastFuture(+this,f)),d.postformat(f)},Xn.toISOString=Gn,Xn.toString=Gn,Xn.toJSON=Gn,Xn.locale=Je,Xn.localeData=en,Xn.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gn),Xn.lang=tn,$("X",0,0,"unix"),$("x",0,0,"valueOf"),lt("x",it),lt("X",/[+-]?\d+(\.\d{1,3})?/),ft("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),ft("x",(function(t,e,n){n._d=new Date(x(t))})),r.version="2.24.0",e=Ae,r.fn=gn,r.min=function(){return je("isBefore",[].slice.call(arguments,0))},r.max=function(){return je("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=d,r.unix=function(t){return Ae(1e3*t)},r.months=function(t,e){return bn(t,e,"months")},r.isDate=c,r.locale=le,r.invalid=g,r.duration=qe,r.isMoment=_,r.weekdays=function(t,e,n){return _n(t,e,n,"weekdays")},r.parseZone=function(){return Ae.apply(null,arguments).parseZone()},r.localeData=he,r.isDuration=Le,r.monthsShort=function(t,e){return bn(t,e,"monthsShort")},r.weekdaysMin=function(t,e,n){return _n(t,e,n,"weekdaysMin")},r.defineLocale=ue,r.updateLocale=function(t,e){if(null!=e){var n,r,i=ie;null!=(r=ce(t))&&(i=r._config),(n=new D(e=M(i,e))).parentLocale=ae[t],ae[t]=n,le(t)}else null!=ae[t]&&(null!=ae[t].parentLocale?ae[t]=ae[t].parentLocale:null!=ae[t]&&delete ae[t]);return ae[t]},r.locales=function(){return E(ae)},r.weekdaysShort=function(t,e,n){return _n(t,e,n,"weekdaysShort")},r.normalizeUnits=B,r.relativeTimeRounding=function(t){return void 0===t?Wn:"function"==typeof t&&(Wn=t,!0)},r.relativeTimeThreshold=function(t,e){return void 0!==qn[t]&&(void 0===e?qn[t]:(qn[t]=e,"s"===t&&(qn.ss=e-1),!0))},r.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=gn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}(NG);var BG={exports:{}};!function(t){var e="-ms-",n="-moz-",r="-webkit-",i="comm",a="rule",o="decl",s="@page",c="@media",l="@import",u="@charset",h="@viewport",d="@supports",f="@document",p="@namespace",g="@keyframes",y="@font-face",m="@counter-style",v="@font-feature-values",b=Math.abs,_=String.fromCharCode;function w(t,e){return(((e<<2^E(t,0))<<2^E(t,1))<<2^E(t,2))<<2^E(t,3)}function x(t){return t.trim()}function k(t,e){return(t=e.exec(t))?t[0]:t}function C(t,e,n){return t.replace(e,n)}function T(t,e){return t.indexOf(e)}function E(t,e){return 0|t.charCodeAt(e)}function S(t,e,n){return t.slice(e,n)}function O(t){return t.length}function A(t){return t.length}function M(t,e){return e.push(t),t}function D(t,e){return t.map(e).join("")}function j(e,n,r,i,a,o,s){return{value:e,root:n,parent:r,type:i,props:a,children:o,line:t.line,column:t.column,length:s,return:""}}function N(t,e,n){return j(t,e.root,e.parent,n,e.props,e.children,0)}function B(){return t.character}function L(){return t.character=t.position>0?E(t.characters,--t.position):0,t.column--,10===t.character&&(t.column=1,t.line--),t.character}function R(){return t.character=t.position<t.length?E(t.characters,t.position++):0,t.column++,10===t.character&&(t.column=1,t.line++),t.character}function I(){return E(t.characters,t.position)}function F(){return t.position}function P(e,n){return S(t.characters,e,n)}function Y(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function z(e){return t.line=t.column=1,t.length=O(t.characters=e),t.position=0,[]}function U(e){return t.characters="",e}function $(e){return x(P(t.position-1,G(91===e?e+2:40===e?e+1:e)))}function W(t){return U(H(z(t)))}function q(e){for(;(t.character=I())&&t.character<33;)R();return Y(e)>2||Y(t.character)>3?"":" "}function H(e){for(;R();)switch(Y(t.character)){case 0:M(Z(t.position-1),e);break;case 2:M($(t.character),e);break;default:M(_(t.character),e)}return e}function V(e,n){for(;--n&&R()&&!(t.character<48||t.character>102||t.character>57&&t.character<65||t.character>70&&t.character<97););return P(e,F()+(n<6&&32==I()&&32==R()))}function G(e){for(;R();)switch(t.character){case e:return t.position;case 34:case 39:return G(34===e||39===e?e:t.character);case 40:41===e&&G(e);break;case 92:R()}return t.position}function X(e,n){for(;R()&&e+t.character!==57&&(e+t.character!==84||47!==I()););return"/*"+P(n,t.position-1)+"*"+_(47===e?e:R())}function Z(e){for(;!Y(I());)R();return P(e,t.position)}function Q(t){return U(K("",null,null,null,[""],t=z(t),0,[0],t))}function K(t,e,n,r,i,a,o,s,c){for(var l=0,u=0,h=o,d=0,f=0,p=0,g=1,y=1,m=1,v=0,b="",w=i,x=a,k=r,T=b;y;)switch(p=v,v=R()){case 34:case 39:case 91:case 40:T+=$(v);break;case 9:case 10:case 13:case 32:T+=q(p);break;case 92:T+=V(F()-1,7);continue;case 47:switch(I()){case 42:case 47:M(tt(X(R(),F()),e,n),c);break;default:T+="/"}break;case 123*g:s[l++]=O(T)*m;case 125*g:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+u:f>0&&O(T)-h&&M(f>32?et(T+";",r,n,h-1):et(C(T," ","")+";",r,n,h-2),c);break;case 59:T+=";";default:if(M(k=J(T,e,n,l,u,i,s,b,w=[],x=[],h),a),123===v)if(0===u)K(T,e,k,k,w,a,h,s,x);else switch(d){case 100:case 109:case 115:K(t,k,k,r&&M(J(t,k,k,0,0,i,s,b,i,w=[],h),x),i,x,h,s,r?w:x);break;default:K(T,k,k,k,[""],x,h,s,x)}}l=u=f=0,g=m=1,b=T="",h=o;break;case 58:h=1+O(T),f=p;default:if(g<1)if(123==v)--g;else if(125==v&&0==g++&&125==L())continue;switch(T+=_(v),v*g){case 38:m=u>0?1:(T+="\f",-1);break;case 44:s[l++]=(O(T)-1)*m,m=1;break;case 64:45===I()&&(T+=$(R())),d=I(),u=O(b=T+=Z(F())),v++;break;case 45:45===p&&2==O(T)&&(g=0)}}return a}function J(t,e,n,r,i,o,s,c,l,u,h){for(var d=i-1,f=0===i?o:[""],p=A(f),g=0,y=0,m=0;g<r;++g)for(var v=0,_=S(t,d+1,d=b(y=s[g])),w=t;v<p;++v)(w=x(y>0?f[v]+" "+_:C(_,/&\f/g,f[v])))&&(l[m++]=w);return j(t,e,n,0===i?a:c,l,u,h)}function tt(t,e,n){return j(t,e,n,i,_(B()),S(t,2,-2),0)}function et(t,e,n,r){return j(t,e,n,o,S(t,0,r),S(t,r+1,-1),r)}function nt(t,i){switch(w(t,i)){case 5103:return r+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return r+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return r+t+n+t+e+t+t;case 6828:case 4268:return r+t+e+t+t;case 6165:return r+t+e+"flex-"+t+t;case 5187:return r+t+C(t,/(\w+).+(:[^]+)/,r+"box-$1$2"+e+"flex-$1$2")+t;case 5443:return r+t+e+"flex-item-"+C(t,/flex-|-self/,"")+t;case 4675:return r+t+e+"flex-line-pack"+C(t,/align-content|flex-|-self/,"")+t;case 5548:return r+t+e+C(t,"shrink","negative")+t;case 5292:return r+t+e+C(t,"basis","preferred-size")+t;case 6060:return r+"box-"+C(t,"-grow","")+r+t+e+C(t,"grow","positive")+t;case 4554:return r+C(t,/([^-])(transform)/g,"$1"+r+"$2")+t;case 6187:return C(C(C(t,/(zoom-|grab)/,r+"$1"),/(image-set)/,r+"$1"),t,"")+t;case 5495:case 3959:return C(t,/(image-set\([^]*)/,r+"$1$`$1");case 4968:return C(C(t,/(.+:)(flex-)?(.*)/,r+"box-pack:$3"+e+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+r+t+t;case 4095:case 3583:case 4068:case 2532:return C(t,/(.+)-inline(.+)/,r+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(O(t)-1-i>6)switch(E(t,i+1)){case 109:if(45!==E(t,i+4))break;case 102:return C(t,/(.+:)(.+)-([^]+)/,"$1"+r+"$2-$3$1"+n+(108==E(t,i+3)?"$3":"$2-$3"))+t;case 115:return~T(t,"stretch")?nt(C(t,"stretch","fill-available"),i)+t:t}break;case 4949:if(115!==E(t,i+1))break;case 6444:switch(E(t,O(t)-3-(~T(t,"!important")&&10))){case 107:return C(t,":",":"+r)+t;case 101:return C(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+r+(45===E(t,14)?"inline-":"")+"box$3$1"+r+"$2$3$1"+e+"$2box$3")+t}break;case 5936:switch(E(t,i+11)){case 114:return r+t+e+C(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return r+t+e+C(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return r+t+e+C(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return r+t+e+t+t}return t}function rt(t,e){for(var n="",r=A(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function it(t,e,n,r){switch(t.type){case l:case o:return t.return=t.return||t.value;case i:return"";case a:t.value=t.props.join(",")}return O(n=rt(t.children,r))?t.return=t.value+"{"+n+"}":""}function at(t){var e=A(t);return function(n,r,i,a){for(var o="",s=0;s<e;s++)o+=t[s](n,r,i,a)||"";return o}}function ot(t){return function(e){e.root||(e=e.return)&&t(e)}}function st(t,i,s,c){if(!t.return)switch(t.type){case o:t.return=nt(t.value,t.length);break;case g:return rt([N(C(t.value,"@","@"+r),t,"")],c);case a:if(t.length)return D(t.props,(function(i){switch(k(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return rt([N(C(i,/:(read-\w+)/,":"+n+"$1"),t,"")],c);case"::placeholder":return rt([N(C(i,/:(plac\w+)/,":"+r+"input-$1"),t,""),N(C(i,/:(plac\w+)/,":"+n+"$1"),t,""),N(C(i,/:(plac\w+)/,e+"input-$1"),t,"")],c)}return""}))}}function ct(t){switch(t.type){case a:t.props=t.props.map((function(e){return D(W(e),(function(e,n,r){switch(E(e,0)){case 12:return S(e,1,O(e));case 0:case 40:case 43:case 62:case 126:return e;case 58:"global"===r[++n]&&(r[n]="",r[++n]="\f"+S(r[n],n=1,-1));case 32:return 1===n?"":e;default:switch(n){case 0:return t=e,A(r)>1?"":e;case n=A(r)-1:case 2:return 2===n?e+t+t:e+t;default:return e}}}))}))}}t.line=1,t.column=1,t.length=0,t.position=0,t.character=0,t.characters="",t.CHARSET=u,t.COMMENT=i,t.COUNTER_STYLE=m,t.DECLARATION=o,t.DOCUMENT=f,t.FONT_FACE=y,t.FONT_FEATURE_VALUES=v,t.IMPORT=l,t.KEYFRAMES=g,t.MEDIA=c,t.MOZ=n,t.MS=e,t.NAMESPACE=p,t.PAGE=s,t.RULESET=a,t.SUPPORTS=d,t.VIEWPORT=h,t.WEBKIT=r,t.abs=b,t.alloc=z,t.append=M,t.caret=F,t.char=B,t.charat=E,t.combine=D,t.comment=tt,t.commenter=X,t.compile=Q,t.copy=N,t.dealloc=U,t.declaration=et,t.delimit=$,t.delimiter=G,t.escaping=V,t.from=_,t.hash=w,t.identifier=Z,t.indexof=T,t.match=k,t.middleware=at,t.namespace=ct,t.next=R,t.node=j,t.parse=K,t.peek=I,t.prefix=nt,t.prefixer=st,t.prev=L,t.replace=C,t.ruleset=J,t.rulesheet=ot,t.serialize=rt,t.sizeof=A,t.slice=P,t.stringify=it,t.strlen=O,t.substr=S,t.token=Y,t.tokenize=W,t.tokenizer=H,t.trim=x,t.whitespace=q,Object.defineProperty(t,"__esModule",{value:!0})}(BG.exports),"undefined"!=typeof self&&self,pa.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="./src/mermaid.js")}({"./node_modules/node-libs-browser/mock/empty.js":function(t,e){},"./node_modules/path-browserify/index.js":function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}e.resolve=function(){for(var e="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(e=o+"/"+e,i="/"===o.charAt(0))}return(i?"/":"")+(e=n(r(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var a=e.isAbsolute(t),o="/"===i(t,-1);return(t=n(r(t.split("/"),(function(t){return!!t})),!a).join("/"))||a||(t="."),t&&o&&(t+="/"),(a?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),s=o,c=0;c<o;c++)if(i[c]!==a[c]){s=c;break}var l=[];for(c=s;c<i.length;c++)l.push("..");return(l=l.concat(a.slice(s))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var n=function(t){"string"!=typeof t&&(t+="");var e,n=0,r=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){n=e+1;break}}else-1===r&&(i=!1,r=e+1);return-1===r?"":t.slice(n,r)}(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,n=0,r=-1,i=!0,a=0,o=t.length-1;o>=0;--o){var s=t.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===e?e=o:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){n=o+1;break}}return-1===e||-1===r||0===a||1===a&&e===r-1&&e===n+1?"":t.slice(e,r)};var i="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n("./node_modules/process/browser.js"))},"./node_modules/process/browser.js":function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(zG){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(zG){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(zG){r=o}}();var c,l=[],u=!1,h=-1;function d(){u&&c&&(u=!1,c.length?l=c.concat(l):h=-1,l.length&&f())}function f(){if(!u){var t=s(d);u=!0;for(var e=l.length;e;){for(c=l,l=[];++h<e;)c&&c[h].run();h=-1,e=l.length}c=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(zG){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new p(t,e)),1!==l.length||u||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},"./node_modules/webpack/buildin/module.js":function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},"./package.json":function(t){t.exports=JSON.parse('{"name":"mermaid","version":"8.11.1","description":"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.","main":"dist/mermaid.core.js","keywords":["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],"scripts":{"build:development":"webpack --progress --colors","build:production":"yarn build:development -p --config webpack.config.prod.babel.js","build":"yarn build:development && yarn build:production","postbuild":"documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md","build:watch":"yarn build --watch","release":"yarn build","lint":"eslint src","e2e:depr":"yarn lint && jest e2e --config e2e/jest.config.js","cypress":"percy exec -- cypress run","e2e":"start-server-and-test dev http://localhost:9000/ cypress","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src/.*","test:watch":"jest --watch src","prepublishOnly":"yarn build && yarn test","prepare":"yarn build"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^3.1.0","@percy/migrate":"^0.10.0","d3":"^5.7.0","dagre":"^0.8.5","dagre-d3":"^0.6.4","dompurify":"2.3.0","graphlib":"^2.1.8","khroma":"^1.4.1","moment-mini":"^2.24.0","stylis":"^4.0.10"},"devDependencies":{"@babel/core":"^7.14.6","@babel/preset-env":"^7.14.7","@babel/register":"^7.14.5","@percy/cli":"^1.0.0-beta.58","@percy/cypress":"^3.1.0","babel-core":"7.0.0-bridge.0","babel-eslint":"^10.1.0","babel-jest":"^27.0.6","babel-loader":"^8.2.2","coveralls":"^3.0.2","css-to-string-loader":"^0.1.3","cypress":"7.6.0","documentation":"13.2.0","eslint":"^7.30.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.0","husky":"^7.0.1","identity-obj-proxy":"^3.0.0","jest":"^27.0.6","jison":"^0.4.18","js-base64":"3.6.1","moment":"^2.23.0","prettier":"^2.3.2","start-server-and-test":"^1.12.6","terser-webpack-plugin":"^2.2.2","webpack":"^4.41.2","webpack-bundle-analyzer":"^4.4.2","webpack-cli":"^3.1.2","webpack-dev-server":"^3.4.1","webpack-node-externals":"^1.7.2"},"files":["dist"],"yarn-upgrade-all":{"ignore":["babel-core"]},"sideEffects":["**/*.css","**/*.scss"],"husky":{"hooks":{"pre-push":"yarn test"}}}')},"./src/config.js":function(t,e,n){n.r(e),n.d(e,"defaultConfig",(function(){return l})),n.d(e,"updateCurrentConfig",(function(){return f})),n.d(e,"setSiteConfig",(function(){return p})),n.d(e,"saveConfigFromInitilize",(function(){return g})),n.d(e,"updateSiteConfig",(function(){return y})),n.d(e,"getSiteConfig",(function(){return m})),n.d(e,"setConfig",(function(){return v})),n.d(e,"getConfig",(function(){return b})),n.d(e,"sanitize",(function(){return _})),n.d(e,"addDirective",(function(){return w})),n.d(e,"reset",(function(){return x}));var r=n("./src/utils.js"),i=n("./src/logger.js"),a=n("./src/themes/index.js"),o=n("./src/defaultConfig.js");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var c,l=Object.freeze(o.default),u=Object(r.assignWithDepth)({},l),h=[],d=Object(r.assignWithDepth)({},l),f=function(t,e){for(var n=Object(r.assignWithDepth)({},t),i={},o=0;o<e.length;o++){var s=e[o];_(s),i=Object(r.assignWithDepth)(i,s)}if(n=Object(r.assignWithDepth)(n,i),i.theme){var l=Object(r.assignWithDepth)({},c),u=Object(r.assignWithDepth)(l.themeVariables||{},i.themeVariables);n.themeVariables=a.default[n.theme].getThemeVariables(u)}return d=n,n},p=function(t){return u=Object(r.assignWithDepth)({},l),u=Object(r.assignWithDepth)(u,t),t.theme&&(u.themeVariables=a.default[t.theme].getThemeVariables(t.themeVariables)),d=f(u,h),u},g=function(t){c=Object(r.assignWithDepth)({},t)},y=function(t){return u=Object(r.assignWithDepth)(u,t),f(u,h),u},m=function(){return Object(r.assignWithDepth)({},u)},v=function(t){return Object(r.assignWithDepth)(d,t),b()},b=function(){return Object(r.assignWithDepth)({},d)},_=function t(e){Object.keys(u.secure).forEach((function(t){void 0!==e[u.secure[t]]&&(i.log.debug("Denied attempt to modify a secure key ".concat(u.secure[t]),e[u.secure[t]]),delete e[u.secure[t]])})),Object.keys(e).forEach((function(t){0===t.indexOf("__")&&delete e[t]})),Object.keys(e).forEach((function(n){"string"==typeof e[n]&&(e[n].indexOf("<")>-1||e[n].indexOf(">")>-1||e[n].indexOf("url(data:")>-1)&&delete e[n],"object"===s(e[n])&&t(e[n])}))},w=function(t){t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),h.push(t),f(u,h)},x=function(){f(u,h=[])}},"./src/dagre-wrapper/clusters.js":function(t,e,n){n.r(e),n.d(e,"insertCluster",(function(){return h})),n.d(e,"getClusterTitleWidth",(function(){return d})),n.d(e,"clear",(function(){return f})),n.d(e,"positionCluster",(function(){return p}));var r=n("./src/dagre-wrapper/intersect/intersect-rect.js"),i=n("./src/logger.js"),a=n("./src/dagre-wrapper/createLabel.js"),o=n("d3"),s=n("./src/config.js"),c=n("./src/diagrams/common/common.js"),l={rect:function(t,e){i.log.trace("Creating subgraph rect for ",e.id,e);var n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),l=n.insert("rect",":first-child"),u=n.insert("g").attr("class","cluster-label"),h=u.node().appendChild(Object(a.default)(e.labelText,e.labelStyle,void 0,!0)),d=h.getBBox();if(Object(c.evaluate)(Object(s.getConfig)().flowchart.htmlLabels)){var f=h.children[0],p=Object(o.select)(h);d=f.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}var g=0*e.padding,y=g/2,m=e.width<=d.width+g?d.width+g:e.width;e.width<=d.width+g?e.diff=(d.width-e.width)/2:e.diff=-e.padding/2,i.log.trace("Data ",e,JSON.stringify(e)),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-m/2).attr("y",e.y-e.height/2-y).attr("width",m).attr("height",e.height+g),u.attr("transform","translate("+(e.x-d.width/2)+", "+(e.y-e.height/2+e.padding/3)+")");var v=l.node().getBBox();return e.width=v.width,e.height=v.height,e.intersect=function(t){return Object(r.default)(e,t)},n},roundedWithTitle:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),i=n.insert("rect",":first-child"),l=n.insert("g").attr("class","cluster-label"),u=n.append("rect"),h=l.node().appendChild(Object(a.default)(e.labelText,e.labelStyle,void 0,!0)),d=h.getBBox();if(Object(c.evaluate)(Object(s.getConfig)().flowchart.htmlLabels)){var f=h.children[0],p=Object(o.select)(h);d=f.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}d=h.getBBox();var g=0*e.padding,y=g/2,m=e.width<=d.width+e.padding?d.width+e.padding:e.width;e.width<=d.width+e.padding?e.diff=(d.width+0*e.padding-e.width)/2:e.diff=-e.padding/2,i.attr("class","outer").attr("x",e.x-m/2-y).attr("y",e.y-e.height/2-y).attr("width",m+g).attr("height",e.height+g),u.attr("class","inner").attr("x",e.x-m/2-y).attr("y",e.y-e.height/2-y+d.height-1).attr("width",m+g).attr("height",e.height+g-d.height-3),l.attr("transform","translate("+(e.x-d.width/2)+", "+(e.y-e.height/2-e.padding/3+(Object(c.evaluate)(Object(s.getConfig)().flowchart.htmlLabels)?5:3))+")");var v=i.node().getBBox();return e.height=v.height,e.intersect=function(t){return Object(r.default)(e,t)},n},noteGroup:function(t,e){var n=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=n.insert("rect",":first-child"),a=0*e.padding,o=a/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2-o).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");var s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return Object(r.default)(e,t)},n},divider:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),i=n.insert("rect",":first-child"),a=0*e.padding,o=a/2;i.attr("class","divider").attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2).attr("width",e.width+a).attr("height",e.height+a);var s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.diff=-e.padding/2,e.intersect=function(t){return Object(r.default)(e,t)},n}},u={},h=function(t,e){i.log.trace("Inserting cluster");var n=e.shape||"rect";u[e.id]=l[n](t,e)},d=function(t,e){var n=Object(a.default)(e.labelText,e.labelStyle,void 0,!0);t.node().appendChild(n);var r=n.getBBox().width;return t.node().removeChild(n),r},f=function(){u={}},p=function(t){i.log.info("Position cluster ("+t.id+", "+t.x+", "+t.y+")"),u[t.id].attr("transform","translate("+t.x+", "+t.y+")")}},"./src/dagre-wrapper/createLabel.js":function(t,e,n){n.r(e);var r=n("d3"),i=n("./src/logger.js"),a=n("./src/diagrams/common/common.js"),o=n("./src/config.js");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.default=function(t,e,n,c){var l=t||"";if("object"===s(l)&&(l=l[0]),Object(a.evaluate)(Object(o.getConfig)().flowchart.htmlLabels))return l=l.replace(/\\n|\n/g,"<br />"),i.log.info("vertexText"+l),function(t){var e,n,i=Object(r.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=i.append("xhtml:div"),o=t.label,s=t.isNode?"nodeLabel":"edgeLabel";return a.html('<span class="'+s+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+o+"</span>"),e=a,(n=t.labelStyle)&&e.attr("style",n),a.style("display","inline-block"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),i.node()}({isNode:c,label:l.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),labelStyle:e.replace("fill:","color:")});var u=document.createElementNS("http://www.w3.org/2000/svg","text");u.setAttribute("style",e.replace("color:","fill:"));var h=[];h="string"==typeof l?l.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(l)?l:[];for(var d=0;d<h.length;d++){var f=document.createElementNS("http://www.w3.org/2000/svg","tspan");f.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),f.setAttribute("dy","1em"),f.setAttribute("x","0"),n?f.setAttribute("class","title-row"):f.setAttribute("class","row"),f.textContent=h[d].trim(),u.appendChild(f)}return u}},"./src/dagre-wrapper/edges.js":function(t,e,n){n.r(e),n.d(e,"clear",(function(){return h})),n.d(e,"insertEdgeLabel",(function(){return d})),n.d(e,"positionEdgeLabel",(function(){return f})),n.d(e,"intersection",(function(){return p})),n.d(e,"insertEdge",(function(){return y}));var r=n("./src/logger.js"),i=n("./src/dagre-wrapper/createLabel.js"),a=n("d3"),o=n("./src/config.js"),s=n("./src/utils.js"),c=n("./src/diagrams/common/common.js"),l={},u={},h=function(){l={},u={}},d=function(t,e){var n=Object(i.default)(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),s=r.insert("g").attr("class","label");s.node().appendChild(n);var h=n.getBBox();if(Object(c.evaluate)(Object(o.getConfig)().flowchart.htmlLabels)){var d=n.children[0],f=Object(a.select)(n);h=d.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}if(s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),l[e.id]=r,e.width=h.width,e.height=h.height,e.startLabelLeft){var p=Object(i.default)(e.startLabelLeft,e.labelStyle),g=t.insert("g").attr("class","edgeTerminals"),y=g.insert("g").attr("class","inner");y.node().appendChild(p);var m=p.getBBox();y.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),u[e.id]||(u[e.id]={}),u[e.id].startLeft=g}if(e.startLabelRight){var v=Object(i.default)(e.startLabelRight,e.labelStyle),b=t.insert("g").attr("class","edgeTerminals"),_=b.insert("g").attr("class","inner");b.node().appendChild(v),_.node().appendChild(v);var w=v.getBBox();_.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),u[e.id]||(u[e.id]={}),u[e.id].startRight=b}if(e.endLabelLeft){var x=Object(i.default)(e.endLabelLeft,e.labelStyle),k=t.insert("g").attr("class","edgeTerminals"),C=k.insert("g").attr("class","inner");C.node().appendChild(x);var T=x.getBBox();C.attr("transform","translate("+-T.width/2+", "+-T.height/2+")"),k.node().appendChild(x),u[e.id]||(u[e.id]={}),u[e.id].endLeft=k}if(e.endLabelRight){var E=Object(i.default)(e.endLabelRight,e.labelStyle),S=t.insert("g").attr("class","edgeTerminals"),O=S.insert("g").attr("class","inner");O.node().appendChild(E);var A=E.getBBox();O.attr("transform","translate("+-A.width/2+", "+-A.height/2+")"),S.node().appendChild(E),u[e.id]||(u[e.id]={}),u[e.id].endRight=S}},f=function(t,e){r.log.info("Moving label abc78 ",t.id,t.label,l[t.id]);var n=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){var i=l[t.id],a=t.x,o=t.y;if(n){var c=s.default.calcLabelPosition(n);r.log.info("Moving label from (",a,",",o,") to (",c.x,",",c.y,") abc78")}i.attr("transform","translate("+a+", "+o+")")}if(t.startLabelLeft){var h=u[t.id].startLeft,d=t.x,f=t.y;if(n){var p=s.default.calcTerminalLabelPosition(0,"start_left",n);d=p.x,f=p.y}h.attr("transform","translate("+d+", "+f+")")}if(t.startLabelRight){var g=u[t.id].startRight,y=t.x,m=t.y;if(n){var v=s.default.calcTerminalLabelPosition(0,"start_right",n);y=v.x,m=v.y}g.attr("transform","translate("+y+", "+m+")")}if(t.endLabelLeft){var b=u[t.id].endLeft,_=t.x,w=t.y;if(n){var x=s.default.calcTerminalLabelPosition(0,"end_left",n);_=x.x,w=x.y}b.attr("transform","translate("+_+", "+w+")")}if(t.endLabelRight){var k=u[t.id].endRight,C=t.x,T=t.y;if(n){var E=s.default.calcTerminalLabelPosition(0,"end_right",n);C=E.x,T=E.y}k.attr("transform","translate("+C+", "+T+")")}},p=function(t,e,n){r.log.warn("intersection calc abc89:\n outsidePoint: ".concat(JSON.stringify(e),"\n insidePoint : ").concat(JSON.stringify(n),"\n node : x:").concat(t.x," y:").concat(t.y," w:").concat(t.width," h:").concat(t.height));var i=t.x,a=t.y,o=Math.abs(i-n.x),s=t.width/2,c=n.x<e.x?s-o:s+o,l=t.height/2,u=Math.abs(e.y-n.y),h=Math.abs(e.x-n.x);if(Math.abs(a-e.y)*s>Math.abs(i-e.x)*l){var d=n.y<e.y?e.y-l-a:a-l-e.y;c=h*d/u;var f={x:n.x<e.x?n.x+c:n.x-h+c,y:n.y<e.y?n.y+u-d:n.y-u+d};return 0===c&&(f.x=e.x,f.y=e.y),0===h&&(f.x=e.x),0===u&&(f.y=e.y),r.log.warn("abc89 topp/bott calc, Q ".concat(u,", q ").concat(d,", R ").concat(h,", r ").concat(c),f),f}var p=u*(c=n.x<e.x?e.x-s-i:i-s-e.x)/h,g=n.x<e.x?n.x+h-c:n.x-h+c,y=n.y<e.y?n.y+p:n.y-p;return r.log.warn("sides calc abc89, Q ".concat(u,", q ").concat(p,", R ").concat(h,", r ").concat(c),{_x:g,_y:y}),0===c&&(g=e.x,y=e.y),0===h&&(g=e.x),0===u&&(y=e.y),{x:g,y:y}},g=function(t,e){r.log.warn("abc88 cutPathAtIntersect",t,e);var n=[],i=t[0],a=!1;return t.forEach((function(t){if(r.log.info("abc88 checking point",t,e),function(t,e){var n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),o=t.width/2,s=t.height/2;return i>=o||a>=s}(e,t)||a)r.log.warn("abc88 outside",t,i),i=t,a||n.push(t);else{var o=p(e,i,t);r.log.warn("abc88 inside",t,i,o),r.log.warn("abc88 intersection",o);var s=!1;n.forEach((function(t){s=s||t.x===o.x&&t.y===o.y})),n.find((function(t){return t.x===o.x&&t.y===o.y}))?r.log.warn("abc88 no intersect",o,n):n.push(o),a=!0}})),r.log.warn("abc88 returning points",n),n},y=function(t,e,n,i,s,c){var l=n.points,u=!1,h=c.node(e.v),d=c.node(e.w);r.log.info("abc88 InsertEdge: ",n),d.intersect&&h.intersect&&((l=l.slice(1,n.points.length-1)).unshift(h.intersect(l[0])),r.log.info("Last point",l[l.length-1],d,d.intersect(l[l.length-1])),l.push(d.intersect(l[l.length-1]))),n.toCluster&&(r.log.info("to cluster abc88",i[n.toCluster]),l=g(n.points,i[n.toCluster].node),u=!0),n.fromCluster&&(r.log.info("from cluster abc88",i[n.fromCluster]),l=g(l.reverse(),i[n.fromCluster].node).reverse(),u=!0);var f,p=l.filter((function(t){return!Number.isNaN(t.y)}));f=("graph"===s||"flowchart"===s)&&n.curve||a.curveBasis;var y,m=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(f);switch(n.thickness){case"normal":y="edge-thickness-normal";break;case"thick":y="edge-thickness-thick";break;default:y=""}switch(n.pattern){case"solid":y+=" edge-pattern-solid";break;case"dotted":y+=" edge-pattern-dotted";break;case"dashed":y+=" edge-pattern-dashed"}var v=t.append("path").attr("d",m(p)).attr("id",n.id).attr("class"," "+y+(n.classes?" "+n.classes:"")).attr("style",n.style),b="";switch(Object(o.getConfig)().state.arrowMarkerAbsolute&&(b=(b=(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),r.log.info("arrowTypeStart",n.arrowTypeStart),r.log.info("arrowTypeEnd",n.arrowTypeEnd),n.arrowTypeStart){case"arrow_cross":v.attr("marker-start","url("+b+"#"+s+"-crossStart)");break;case"arrow_point":v.attr("marker-start","url("+b+"#"+s+"-pointStart)");break;case"arrow_barb":v.attr("marker-start","url("+b+"#"+s+"-barbStart)");break;case"arrow_circle":v.attr("marker-start","url("+b+"#"+s+"-circleStart)");break;case"aggregation":v.attr("marker-start","url("+b+"#"+s+"-aggregationStart)");break;case"extension":v.attr("marker-start","url("+b+"#"+s+"-extensionStart)");break;case"composition":v.attr("marker-start","url("+b+"#"+s+"-compositionStart)");break;case"dependency":v.attr("marker-start","url("+b+"#"+s+"-dependencyStart)")}switch(n.arrowTypeEnd){case"arrow_cross":v.attr("marker-end","url("+b+"#"+s+"-crossEnd)");break;case"arrow_point":v.attr("marker-end","url("+b+"#"+s+"-pointEnd)");break;case"arrow_barb":v.attr("marker-end","url("+b+"#"+s+"-barbEnd)");break;case"arrow_circle":v.attr("marker-end","url("+b+"#"+s+"-circleEnd)");break;case"aggregation":v.attr("marker-end","url("+b+"#"+s+"-aggregationEnd)");break;case"extension":v.attr("marker-end","url("+b+"#"+s+"-extensionEnd)");break;case"composition":v.attr("marker-end","url("+b+"#"+s+"-compositionEnd)");break;case"dependency":v.attr("marker-end","url("+b+"#"+s+"-dependencyEnd)")}var _={};return u&&(_.updatedPath=l),_.originalPath=n.points,_}},"./src/dagre-wrapper/index.js":function(t,e,n){n.r(e),n.d(e,"render",(function(){return g}));var r=n("dagre"),i=n.n(r),a=n("graphlib"),o=n.n(a),s=n("./src/dagre-wrapper/markers.js"),c=n("./src/dagre-wrapper/shapes/util.js"),l=n("./src/dagre-wrapper/mermaid-graphlib.js"),u=n("./src/dagre-wrapper/nodes.js"),h=n("./src/dagre-wrapper/clusters.js"),d=n("./src/dagre-wrapper/edges.js"),f=n("./src/logger.js"),p=function t(e,n,r,a){f.log.info("Graph in recursive render: XXX",o.a.json.write(n),a);var s=n.graph().rankdir;f.log.trace("Dir in recursive render - dir:",s);var p=e.insert("g").attr("class","root");n.nodes()?f.log.info("Recursive render XXX",n.nodes()):f.log.info("No nodes found for",n),n.edges().length>0&&f.log.trace("Recursive edges",n.edge(n.edges()[0]));var g=p.insert("g").attr("class","clusters"),y=p.insert("g").attr("class","edgePaths"),m=p.insert("g").attr("class","edgeLabels"),v=p.insert("g").attr("class","nodes");n.nodes().forEach((function(e){var i=n.node(e);if(void 0!==a){var o=JSON.parse(JSON.stringify(a.clusterData));f.log.info("Setting data for cluster XXX (",e,") ",o,a),n.setNode(a.id,o),n.parent(e)||(f.log.trace("Setting parent",e,a.id),n.setParent(e,a.id,o))}if(f.log.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),i&&i.clusterNode){f.log.info("Cluster identified",e,i.width,n.node(e));var h=t(v,i.graph,r,n.node(e)),d=h.elem;Object(c.updateNodeBounds)(i,d),i.diff=h.diff||0,f.log.info("Node bounds (abc123)",e,i,i.width,i.x,i.y),Object(u.setNodeElem)(d,i),f.log.warn("Recursive render complete ",d,i)}else n.children(e).length>0?(f.log.info("Cluster - the non recursive path XXX",e,i.id,i,n),f.log.info(Object(l.findNonClusterChild)(i.id,n)),l.clusterDb[i.id]={id:Object(l.findNonClusterChild)(i.id,n),node:i}):(f.log.info("Node - the non recursive path",e,i.id,i),Object(u.insertNode)(v,n.node(e),s))})),n.edges().forEach((function(t){var e=n.edge(t.v,t.w,t.name);f.log.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),f.log.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),f.log.info("Fix",l.clusterDb,"ids:",t.v,t.w,"Translateing: ",l.clusterDb[t.v],l.clusterDb[t.w]),Object(d.insertEdgeLabel)(m,e)})),n.edges().forEach((function(t){f.log.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),f.log.info("#############################################"),f.log.info("### Layout ###"),f.log.info("#############################################"),f.log.info(n),i.a.layout(n),f.log.info("Graph after layout:",o.a.json.write(n));var b=0;return Object(l.sortNodesByHierarchy)(n).forEach((function(t){var e=n.node(t);f.log.info("Position "+t+": "+JSON.stringify(n.node(t))),f.log.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e&&e.clusterNode?Object(u.positionNode)(e):n.children(t).length>0?(Object(h.insertCluster)(g,e),l.clusterDb[e.id].node=e):Object(u.positionNode)(e)})),n.edges().forEach((function(t){var e=n.edge(t);f.log.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e);var i=Object(d.insertEdge)(y,t,e,l.clusterDb,r,n);Object(d.positionEdgeLabel)(e,i)})),n.nodes().forEach((function(t){var e=n.node(t);f.log.info(t,e.type,e.diff),"group"===e.type&&(b=e.diff)})),{elem:p,diff:b}},g=function(t,e,n,r,i){Object(s.default)(t,n,r,i),Object(u.clear)(),Object(d.clear)(),Object(h.clear)(),Object(l.clear)(),f.log.warn("Graph at first:",o.a.json.write(e)),Object(l.adjustClustersAndEdges)(e),f.log.warn("Graph after:",o.a.json.write(e)),p(t,e,r)}},"./src/dagre-wrapper/intersect/index.js":function(t,e,n){n.r(e);var r=n("./src/dagre-wrapper/intersect/intersect-node.js"),i=n.n(r),a=n("./src/dagre-wrapper/intersect/intersect-circle.js"),o=n("./src/dagre-wrapper/intersect/intersect-ellipse.js"),s=n("./src/dagre-wrapper/intersect/intersect-polygon.js"),c=n("./src/dagre-wrapper/intersect/intersect-rect.js");e.default={node:i.a,circle:a.default,ellipse:o.default,polygon:s.default,rect:c.default}},"./src/dagre-wrapper/intersect/intersect-circle.js":function(t,e,n){n.r(e);var r=n("./src/dagre-wrapper/intersect/intersect-ellipse.js");e.default=function(t,e,n){return Object(r.default)(t,e,e,n)}},"./src/dagre-wrapper/intersect/intersect-ellipse.js":function(t,e,n){n.r(e),e.default=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),l=Math.abs(e*n*o/c);r.x<i&&(l=-l);var u=Math.abs(e*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}},"./src/dagre-wrapper/intersect/intersect-line.js":function(t,e,n){function r(t,e){return t*e>0}n.r(e),e.default=function(t,e,n,i){var a,o,s,c,l,u,h,d,f,p,g,y,m;if(a=e.y-t.y,s=t.x-e.x,l=e.x*t.y-t.x*e.y,f=a*n.x+s*n.y+l,p=a*i.x+s*i.y+l,!(0!==f&&0!==p&&r(f,p)||(o=i.y-n.y,c=n.x-i.x,u=i.x*n.y-n.x*i.y,h=o*t.x+c*t.y+u,d=o*e.x+c*e.y+u,0!==h&&0!==d&&r(h,d)||0==(g=a*c-o*s))))return y=Math.abs(g/2),{x:(m=s*u-c*l)<0?(m-y)/g:(m+y)/g,y:(m=o*l-a*u)<0?(m-y)/g:(m+y)/g}}},"./src/dagre-wrapper/intersect/intersect-node.js":function(t,e){t.exports=function(t,e){return t.intersect(e)}},"./src/dagre-wrapper/intersect/intersect-polygon.js":function(t,e,n){n.r(e);var r=n("./src/dagre-wrapper/intersect/intersect-line.js");e.default=function(t,e,n){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){s=Math.min(s,t.x),c=Math.min(c,t.y)})):(s=Math.min(s,e.x),c=Math.min(c,e.y));for(var l=i-t.width/2-s,u=a-t.height/2-c,h=0;h<e.length;h++){var d=e[h],f=e[h<e.length-1?h+1:0],p=Object(r.default)(t,n,{x:l+d.x,y:u+d.y},{x:l+f.x,y:u+f.y});p&&o.push(p)}return o.length?(o.length>1&&o.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1})),o[0]):t}},"./src/dagre-wrapper/intersect/intersect-rect.js":function(t,e,n){n.r(e),e.default=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,l=t.height/2;return Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),n=0===s?0:l*o/s,r=l):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}}},"./src/dagre-wrapper/markers.js":function(t,e,n){n.r(e);var r=n("./src/logger.js"),i={extension:function(t,e,n){r.log.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:function(t,e){t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:function(t,e){t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:function(t,e){t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},point:function(t,e){t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:function(t,e){t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:function(t,e){t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:function(t,e){t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}};e.default=function(t,e,n,r){e.forEach((function(e){i[e](t,n,r)}))}},"./src/dagre-wrapper/mermaid-graphlib.js":function(t,e,n){n.r(e),n.d(e,"clusterDb",(function(){return o})),n.d(e,"clear",(function(){return l})),n.d(e,"extractDecendants",(function(){return d})),n.d(e,"validate",(function(){return f})),n.d(e,"findNonClusterChild",(function(){return p})),n.d(e,"adjustClustersAndEdges",(function(){return y})),n.d(e,"extractor",(function(){return m})),n.d(e,"sortNodesByHierarchy",(function(){return b}));var r=n("./src/logger.js"),i=n("graphlib"),a=n.n(i),o={},s={},c={},l=function(){s={},c={},o={}},u=function(t,e){return r.log.trace("In isDecendant",e," ",t," = ",s[e].indexOf(t)>=0),s[e].indexOf(t)>=0},h=function t(e,n,i,a){r.log.warn("Copying children of ",e,"root",a,"data",n.node(e),a);var o=n.children(e)||[];e!==a&&o.push(e),r.log.warn("Copying (nodes) clusterId",e,"nodes",o),o.forEach((function(o){if(n.children(o).length>0)t(o,n,i,a);else{var c=n.node(o);r.log.info("cp ",o," to ",a," with parent ",e),i.setNode(o,c),a!==n.parent(o)&&(r.log.warn("Setting parent",o,n.parent(o)),i.setParent(o,n.parent(o))),e!==a&&o!==e?(r.log.debug("Setting parent",o,e),i.setParent(o,e)):(r.log.info("In copy ",e,"root",a,"data",n.node(e),a),r.log.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));var l=n.edges(o);r.log.debug("Copying Edges",l),l.forEach((function(t){r.log.info("Edge",t);var o=n.edge(t.v,t.w,t.name);r.log.info("Edge data",o,a);try{!function(t,e){return r.log.info("Decendants of ",e," is ",s[e]),r.log.info("Edge is ",t),t.v!==e&&t.w!==e&&(s[e]?(r.log.info("Here "),s[e].indexOf(t.v)>=0||!!u(t.v,e)||!!u(t.w,e)||s[e].indexOf(t.w)>=0):(r.log.debug("Tilt, ",e,",not in decendants"),!1))}(t,a)?r.log.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",a," clusterId:",e):(r.log.info("Copying as ",t.v,t.w,o,t.name),i.setEdge(t.v,t.w,o,t.name),r.log.info("newGraph edges ",i.edges(),i.edge(i.edges()[0])))}catch(zG){r.log.error(zG)}}))}r.log.debug("Removing node",o),n.removeNode(o)}))},d=function t(e,n){for(var r=n.children(e),i=[].concat(r),a=0;a<r.length;a++)c[r[a]]=e,i=i.concat(t(r[a],n));return i},f=function(t){var e=t.edges();r.log.trace("Edges: ",e);for(var n=0;n<e.length;n++){if(t.children(e[n].v).length>0)return r.log.trace("The node ",e[n].v," is part of and edge even though it has children"),!1;if(t.children(e[n].w).length>0)return r.log.trace("The node ",e[n].w," is part of and edge even though it has children"),!1}return!0},p=function t(e,n){r.log.trace("Searching",e);var i=n.children(e);if(r.log.trace("Searching children of id ",e,i),i.length<1)return r.log.trace("This is a valid node",e),e;for(var a=0;a<i.length;a++){var o=t(i[a],n);if(o)return r.log.trace("Found replacement for",e," => ",o),o}},g=function(t){return o[t]&&o[t].externalConnections&&o[t]?o[t].id:t},y=function(t,e){!t||e>10?r.log.debug("Opting out, no graph "):(r.log.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(r.log.warn("Cluster identified",e," Replacement id in edges: ",p(e,t)),s[e]=d(e,t),o[e]={id:p(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){var n=t.children(e),i=t.edges();n.length>0?(r.log.debug("Cluster identified",e,s),i.forEach((function(t){t.v!==e&&t.w!==e&&u(t.v,e)^u(t.w,e)&&(r.log.warn("Edge: ",t," leaves cluster ",e),r.log.warn("Decendants of XXX ",e,": ",s[e]),o[e].externalConnections=!0)}))):r.log.debug("Not a cluster ",e,s)})),t.edges().forEach((function(e){var n=t.edge(e);r.log.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),r.log.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));var i=e.v,a=e.w;r.log.warn("Fix XXX",o,"ids:",e.v,e.w,"Translateing: ",o[e.v]," --- ",o[e.w]),(o[e.v]||o[e.w])&&(r.log.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),i=g(e.v),a=g(e.w),t.removeEdge(e.v,e.w,e.name),i!==e.v&&(n.fromCluster=e.v),a!==e.w&&(n.toCluster=e.w),r.log.warn("Fix Replacing with XXX",i,a,e.name),t.setEdge(i,a,n,e.name))})),r.log.warn("Adjusted Graph",a.a.json.write(t)),m(t,0),r.log.trace(o))},m=function t(e,n){if(r.log.warn("extractor - ",n,a.a.json.write(e),e.children("D")),n>10)r.log.error("Bailing out");else{for(var i=e.nodes(),s=!1,c=0;c<i.length;c++){var l=i[c],u=e.children(l);s=s||u.length>0}if(s){r.log.debug("Nodes = ",i,n);for(var d=0;d<i.length;d++){var f=i[d];if(r.log.debug("Extracting node",f,o,o[f]&&!o[f].externalConnections,!e.parent(f),e.node(f),e.children("D")," Depth ",n),o[f])if(!o[f].externalConnections&&e.children(f)&&e.children(f).length>0){r.log.warn("Cluster without external connections, without a parent and with children",f,n);var p="TB"===e.graph().rankdir?"LR":"TB";o[f]&&o[f].clusterData&&o[f].clusterData.dir&&(p=o[f].clusterData.dir,r.log.warn("Fixing dir",o[f].clusterData.dir,p));var g=new a.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:p,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));r.log.warn("Old graph before copy",a.a.json.write(e)),h(f,e,g,f),e.setNode(f,{clusterNode:!0,id:f,clusterData:o[f].clusterData,labelText:o[f].labelText,graph:g}),r.log.warn("New graph after copy node: (",f,")",a.a.json.write(g)),r.log.debug("Old graph after copy",a.a.json.write(e))}else r.log.warn("Cluster ** ",f," **not meeting the criteria !externalConnections:",!o[f].externalConnections," no parent: ",!e.parent(f)," children ",e.children(f)&&e.children(f).length>0,e.children("D"),n),r.log.debug(o);else r.log.debug("Not a cluster",f,n)}i=e.nodes(),r.log.warn("New list of nodes",i);for(var y=0;y<i.length;y++){var m=i[y],v=e.node(m);r.log.warn(" Now next level",m,v),v.clusterNode&&t(v.graph,n+1)}}else r.log.debug("Done, no node has children",e.nodes())}},v=function t(e,n){if(0===n.length)return[];var r=Object.assign(n);return n.forEach((function(n){var i=e.children(n),a=t(e,i);r=r.concat(a)})),r},b=function(t){return v(t,t.children())}},"./src/dagre-wrapper/nodes.js":function(t,e,n){n.r(e),n.d(e,"insertNode",(function(){return y})),n.d(e,"setNodeElem",(function(){return m})),n.d(e,"clear",(function(){return v})),n.d(e,"positionNode",(function(){return b}));var r=n("d3"),i=n("./src/logger.js"),a=n("./src/dagre-wrapper/shapes/util.js"),o=n("./src/config.js"),s=n("./src/dagre-wrapper/intersect/index.js"),c=n("./src/dagre-wrapper/createLabel.js"),l=n("./src/dagre-wrapper/shapes/note.js"),u=n("./src/diagrams/class/svgDraw.js"),h=n("./src/diagrams/common/common.js");function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var f=function(t,e,n){var r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,o=10;"LR"===n&&(i=10,o=70);var c=r.append("rect").attr("x",-1*i/2).attr("y",-1*o/2).attr("width",i).attr("height",o).attr("class","fork-join");return Object(a.updateNodeBounds)(e,c),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return s.default.rect(e,t)},r},p={question:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,o=n.bbox,c=o.width+e.padding+(o.height+e.padding),l=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}];i.log.info("Question main (Circle)");var u=Object(a.insertPolygonShape)(r,c,c,l);return u.attr("style",e.style),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return i.log.warn("Intersect called"),s.default.polygon(e,l,t)},r},rect:function(t,e){var n=Object(a.labelHelper)(t,e,"node "+e.classes,!0),r=n.shapeSvg,o=n.bbox,c=n.halfPadding;i.log.trace("Classes = ",e.classes);var l=r.insert("rect",":first-child");return l.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-o.width/2-c).attr("y",-o.height/2-c).attr("width",o.width+e.padding).attr("height",o.height+e.padding),Object(a.updateNodeBounds)(e,l),e.intersect=function(t){return s.default.rect(e,t)},r},rectWithTitle:function(t,e){var n;n=e.classes?"node "+e.classes:"node default";var l=t.insert("g").attr("class",n).attr("id",e.domId||e.id),u=l.insert("rect",":first-child"),f=l.insert("line"),p=l.insert("g").attr("class","label"),g=e.labelText.flat?e.labelText.flat():e.labelText,y="";y="object"===d(g)?g[0]:g,i.log.info("Label text abc79",y,g,"object"===d(g));var m,v=p.node().appendChild(Object(c.default)(y,e.labelStyle,!0,!0));if(Object(h.evaluate)(Object(o.getConfig)().flowchart.htmlLabels)){var b=v.children[0],_=Object(r.select)(v);m=b.getBoundingClientRect(),_.attr("width",m.width),_.attr("height",m.height)}i.log.info("Text 2",g);var w=g.slice(1,g.length),x=v.getBBox(),k=p.node().appendChild(Object(c.default)(w.join?w.join("<br/>"):w,e.labelStyle,!0,!0));if(Object(h.evaluate)(Object(o.getConfig)().flowchart.htmlLabels)){var C=k.children[0],T=Object(r.select)(k);m=C.getBoundingClientRect(),T.attr("width",m.width),T.attr("height",m.height)}var E=e.padding/2;return Object(r.select)(k).attr("transform","translate( "+(m.width>x.width?0:(x.width-m.width)/2)+", "+(x.height+E+5)+")"),Object(r.select)(v).attr("transform","translate( "+(m.width<x.width?0:-(x.width-m.width)/2)+", 0)"),m=p.node().getBBox(),p.attr("transform","translate("+-m.width/2+", "+(-m.height/2-E+3)+")"),u.attr("class","outer title-state").attr("x",-m.width/2-E).attr("y",-m.height/2-E).attr("width",m.width+e.padding).attr("height",m.height+e.padding),f.attr("class","divider").attr("x1",-m.width/2-E).attr("x2",m.width/2+E).attr("y1",-m.height/2-E+x.height+E).attr("y2",-m.height/2-E+x.height+E),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.rect(e,t)},l},choice:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return n.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return s.default.circle(e,14,t)},n},circle:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,o=n.bbox,c=n.halfPadding,l=r.insert("circle",":first-child");return l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",o.width/2+c).attr("width",o.width+e.padding).attr("height",o.height+e.padding),i.log.info("Circle main"),Object(a.updateNodeBounds)(e,l),e.intersect=function(t){return i.log.info("Circle intersect",e,o.width/2+c,t),s.default.circle(e,o.width/2+c,t)},r},stadium:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.height+e.padding,c=i.width+o/4+e.padding,l=r.insert("rect",":first-child").attr("style",e.style).attr("rx",o/2).attr("ry",o/2).attr("x",-c/2).attr("y",-o/2).attr("width",c).attr("height",o);return Object(a.updateNodeBounds)(e,l),e.intersect=function(t){return s.default.rect(e,t)},r},hexagon:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.height+e.padding,c=o/4,l=i.width+2*c+e.padding,u=[{x:c,y:0},{x:l-c,y:0},{x:l,y:-o/2},{x:l-c,y:-o},{x:c,y:-o},{x:0,y:-o/2}],h=Object(a.insertPolygonShape)(r,l,o,u);return h.attr("style",e.style),Object(a.updateNodeBounds)(e,h),e.intersect=function(t){return s.default.polygon(e,u,t)},r},rect_left_inv_arrow:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:-c/2,y:0},{x:o,y:0},{x:o,y:-c},{x:-c/2,y:-c},{x:0,y:-c/2}];return Object(a.insertPolygonShape)(r,o,c,l).attr("style",e.style),e.width=o+c,e.height=c,e.intersect=function(t){return s.default.polygon(e,l,t)},r},lean_right:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:-2*c/6,y:0},{x:o-c/6,y:0},{x:o+2*c/6,y:-c},{x:c/6,y:-c}],u=Object(a.insertPolygonShape)(r,o,c,l);return u.attr("style",e.style),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,l,t)},r},lean_left:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:2*c/6,y:0},{x:o+c/6,y:0},{x:o-2*c/6,y:-c},{x:-c/6,y:-c}],u=Object(a.insertPolygonShape)(r,o,c,l);return u.attr("style",e.style),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,l,t)},r},trapezoid:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:-2*c/6,y:0},{x:o+2*c/6,y:0},{x:o-c/6,y:-c},{x:c/6,y:-c}],u=Object(a.insertPolygonShape)(r,o,c,l);return u.attr("style",e.style),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,l,t)},r},inv_trapezoid:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:c/6,y:0},{x:o-c/6,y:0},{x:o+2*c/6,y:-c},{x:-2*c/6,y:-c}],u=Object(a.insertPolygonShape)(r,o,c,l);return u.attr("style",e.style),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,l,t)},r},rect_right_inv_arrow:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:0,y:0},{x:o+c/2,y:0},{x:o,y:-c/2},{x:o+c/2,y:-c},{x:0,y:-c}],u=Object(a.insertPolygonShape)(r,o,c,l);return u.attr("style",e.style),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,l,t)},r},cylinder:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=o/2,l=c/(2.5+o/50),u=i.height+l+e.padding,h="M 0,"+l+" a "+c+","+l+" 0,0,0 "+o+" 0 a "+c+","+l+" 0,0,0 "+-o+" 0 l 0,"+u+" a "+c+","+l+" 0,0,0 "+o+" 0 l 0,"+-u,d=r.attr("label-offset-y",l).insert("path",":first-child").attr("style",e.style).attr("d",h).attr("transform","translate("+-o/2+","+-(u/2+l)+")");return Object(a.updateNodeBounds)(e,d),e.intersect=function(t){var n=s.default.rect(e,t),r=n.x-e.x;if(0!=c&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(n.y-e.y)>e.height/2-l)){var i=l*l*(1-r*r/(c*c));0!=i&&(i=Math.sqrt(i)),i=l-i,t.y-e.y>0&&(i=-i),n.y+=i}return n},r},start:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Object(a.updateNodeBounds)(e,r),e.intersect=function(t){return s.default.circle(e,7,t)},n},end:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child"),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Object(a.updateNodeBounds)(e,i),e.intersect=function(t){return s.default.circle(e,7,t)},n},note:l.default,subroutine:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:0,y:0},{x:o,y:0},{x:o,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-c},{x:-8,y:-c},{x:-8,y:0}],u=Object(a.insertPolygonShape)(r,o,c,l);return u.attr("style",e.style),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,l,t)},r},fork:f,join:f,class_box:function(t,e){var n,i=e.padding/2;n=e.classes?"node "+e.classes:"node default";var l=t.insert("g").attr("class",n).attr("id",e.domId||e.id),d=l.insert("rect",":first-child"),f=l.insert("line"),p=l.insert("line"),g=0,y=4,m=l.insert("g").attr("class","label"),v=0,b=e.classData.annotations&&e.classData.annotations[0],_=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",w=m.node().appendChild(Object(c.default)(_,e.labelStyle,!0,!0)),x=w.getBBox();if(Object(h.evaluate)(Object(o.getConfig)().flowchart.htmlLabels)){var k=w.children[0],C=Object(r.select)(w);x=k.getBoundingClientRect(),C.attr("width",x.width),C.attr("height",x.height)}e.classData.annotations[0]&&(y+=x.height+4,g+=x.width);var T=e.classData.id;void 0!==e.classData.type&&""!==e.classData.type&&(T+="<"+e.classData.type+">");var E=m.node().appendChild(Object(c.default)(T,e.labelStyle,!0,!0));Object(r.select)(E).attr("class","classTitle");var S=E.getBBox();if(Object(h.evaluate)(Object(o.getConfig)().flowchart.htmlLabels)){var O=E.children[0],A=Object(r.select)(E);S=O.getBoundingClientRect(),A.attr("width",S.width),A.attr("height",S.height)}y+=S.height+4,S.width>g&&(g=S.width);var M=[];e.classData.members.forEach((function(t){var n=Object(u.parseMember)(t).displayText,i=m.node().appendChild(Object(c.default)(n,e.labelStyle,!0,!0)),a=i.getBBox();if(Object(h.evaluate)(Object(o.getConfig)().flowchart.htmlLabels)){var s=i.children[0],l=Object(r.select)(i);a=s.getBoundingClientRect(),l.attr("width",a.width),l.attr("height",a.height)}a.width>g&&(g=a.width),y+=a.height+4,M.push(i)})),y+=8;var D=[];if(e.classData.methods.forEach((function(t){var n=Object(u.parseMember)(t).displayText,i=m.node().appendChild(Object(c.default)(n,e.labelStyle,!0,!0)),a=i.getBBox();if(Object(h.evaluate)(Object(o.getConfig)().flowchart.htmlLabels)){var s=i.children[0],l=Object(r.select)(i);a=s.getBoundingClientRect(),l.attr("width",a.width),l.attr("height",a.height)}a.width>g&&(g=a.width),y+=a.height+4,D.push(i)})),y+=8,b){var j=(g-x.width)/2;Object(r.select)(w).attr("transform","translate( "+(-1*g/2+j)+", "+-1*y/2+")"),v=x.height+4}var N=(g-S.width)/2;return Object(r.select)(E).attr("transform","translate( "+(-1*g/2+N)+", "+(-1*y/2+v)+")"),v+=S.height+4,f.attr("class","divider").attr("x1",-g/2-i).attr("x2",g/2+i).attr("y1",-y/2-i+8+v).attr("y2",-y/2-i+8+v),v+=8,M.forEach((function(t){Object(r.select)(t).attr("transform","translate( "+-g/2+", "+(-1*y/2+v+4)+")"),v+=S.height+4})),v+=8,p.attr("class","divider").attr("x1",-g/2-i).attr("x2",g/2+i).attr("y1",-y/2-i+8+v).attr("y2",-y/2-i+8+v),v+=8,D.forEach((function(t){Object(r.select)(t).attr("transform","translate( "+-g/2+", "+(-1*y/2+v)+")"),v+=S.height+4})),d.attr("class","outer title-state").attr("x",-g/2-i).attr("y",-y/2-i).attr("width",g+e.padding).attr("height",y+e.padding),Object(a.updateNodeBounds)(e,d),e.intersect=function(t){return s.default.rect(e,t)},l}},g={},y=function(t,e,n){var r,i;e.link?(r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget||"_blank"),i=p[e.shape](r,e,n)):r=i=p[e.shape](t,e,n),e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),g[e.id]=r,e.haveCallback&&g[e.id].attr("class",g[e.id].attr("class")+" clickable")},m=function(t,e){g[e.id]=t},v=function(){g={}},b=function(t){var e=g[t.id];i.log.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");var n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n}},"./src/dagre-wrapper/shapes/note.js":function(t,e,n){n.r(e);var r=n("./src/dagre-wrapper/shapes/util.js"),i=n("./src/logger.js"),a=n("./src/dagre-wrapper/intersect/index.js");e.default=function(t,e){var n=Object(r.labelHelper)(t,e,"node "+e.classes,!0),o=n.shapeSvg,s=n.bbox,c=n.halfPadding;i.log.info("Classes = ",e.classes);var l=o.insert("rect",":first-child");return l.attr("rx",e.rx).attr("ry",e.ry).attr("x",-s.width/2-c).attr("y",-s.height/2-c).attr("width",s.width+e.padding).attr("height",s.height+e.padding),Object(r.updateNodeBounds)(e,l),e.intersect=function(t){return a.default.rect(e,t)},o}},"./src/dagre-wrapper/shapes/util.js":function(t,e,n){n.r(e),n.d(e,"labelHelper",(function(){return s})),n.d(e,"updateNodeBounds",(function(){return c})),n.d(e,"insertPolygonShape",(function(){return l}));var r=n("./src/dagre-wrapper/createLabel.js"),i=n("./src/config.js"),a=n("d3"),o=n("./src/diagrams/common/common.js"),s=function(t,e,n,s){var c;c=n||"node default";var l=t.insert("g").attr("class",c).attr("id",e.domId||e.id),u=l.insert("g").attr("class","label").attr("style",e.labelStyle),h=u.node().appendChild(Object(r.default)(e.labelText,e.labelStyle,!1,s)),d=h.getBBox();if(Object(o.evaluate)(Object(i.getConfig)().flowchart.htmlLabels)){var f=h.children[0],p=Object(a.select)(h);d=f.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}var g=e.padding/2;return u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),{shapeSvg:l,bbox:d,halfPadding:g,label:u}},c=function(t,e){var n=e.node().getBBox();t.width=n.width,t.height=n.height};function l(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}},"./src/defaultConfig.js":function(t,e,n){n.r(e);var r={theme:"default",themeVariables:n("./src/themes/index.js").default.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-d3"},sequence:{activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open-Sans", "sans-serif"',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open-Sans", "sans-serif"',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{arrowMarkerAbsolute:!1,useMaxWidth:!0,defaultRenderer:"dagre-d3"},git:{arrowMarkerAbsolute:!1,useWidth:void 0,useMaxWidth:!0},state:{dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20}};r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute,r.git.arrowMarkerAbsolute=r.arrowMarkerAbsolute,e.default=r},"./src/diagrams/class/classDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return y})),n.d(e,"addClass",(function(){return v})),n.d(e,"lookUpDomId",(function(){return b})),n.d(e,"clear",(function(){return _})),n.d(e,"getClass",(function(){return w})),n.d(e,"getClasses",(function(){return x})),n.d(e,"getRelations",(function(){return k})),n.d(e,"addRelation",(function(){return C})),n.d(e,"addAnnotation",(function(){return T})),n.d(e,"addMember",(function(){return E})),n.d(e,"addMembers",(function(){return S})),n.d(e,"cleanupLabel",(function(){return O})),n.d(e,"setCssClass",(function(){return A})),n.d(e,"setLink",(function(){return M})),n.d(e,"setClickEvent",(function(){return D})),n.d(e,"bindFunctions",(function(){return N})),n.d(e,"lineType",(function(){return B})),n.d(e,"relationType",(function(){return L}));var r=n("d3"),i=n("./src/logger.js"),a=n("./src/config.js"),o=n("./src/diagrams/common/common.js"),s=n("./src/utils.js"),c=n("./src/mermaidAPI.js");function l(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var h="classid-",d=[],f={},p=0,g=[],y=function(t,e,n){c.default.parseDirective(this,t,e,n)},m=function(t){var e="",n=t;if(t.indexOf("~")>0){var r=t.split("~");n=r[0],e=r[1]}return{className:n,type:e}},v=function(t){var e=m(t);void 0===f[e.className]&&(f[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:h+e.className+"-"+p},p++)},b=function(t){for(var e=Object.keys(f),n=0;n<e.length;n++)if(f[e[n]].id===t)return f[e[n]].domId},_=function(){d=[],f={},(g=[]).push(R)},w=function(t){return f[t]},x=function(){return f},k=function(){return d},C=function(t){i.log.debug("Adding relation: "+JSON.stringify(t)),v(t.id1),v(t.id2),t.id1=m(t.id1).className,t.id2=m(t.id2).className,d.push(t)},T=function(t,e){var n=m(t).className;f[n].annotations.push(e)},E=function(t,e){var n=m(t).className,r=f[n];if("string"==typeof e){var i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?r.annotations.push(i.substring(2,i.length-2)):i.indexOf(")")>0?r.methods.push(i):i&&r.members.push(i)}},S=function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return E(t,e)})))},O=function(t){return":"===t.substring(0,1)?t.substr(1).trim():t.trim()},A=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=h+n),void 0!==f[n]&&f[n].cssClasses.push(e)}))},M=function(t,e,n){var r=a.getConfig();t.split(",").forEach((function(t){var i=t;t[0].match(/\d/)&&(i=h+i),void 0!==f[i]&&(f[i].link=s.default.formatUrl(e,r),f[i].linkTarget="string"==typeof n?n:"_blank")})),A(t,"clickable")},D=function(t,e,n){t.split(",").forEach((function(t){j(t,e,n),f[t].haveCallback=!0})),A(t,"clickable")},j=function(t,e,n){var r=a.getConfig(),i=t,o=b(i);if("loose"===r.securityLevel&&void 0!==e&&void 0!==f[i]){var c=[];if("string"==typeof n){c=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var u=0;u<c.length;u++){var h=c[u].trim();'"'===h.charAt(0)&&'"'===h.charAt(h.length-1)&&(h=h.substr(1,h.length-2)),c[u]=h}}0===c.length&&c.push(o),g.push((function(){var t=document.querySelector('[id="'.concat(o,'"]'));null!==t&&t.addEventListener("click",(function(){s.default.runFunc.apply(s.default,[e].concat(l(c)))}),!1)}))}},N=function(t){g.forEach((function(e){e(t)}))},B={LINE:0,DOTTED_LINE:1},L={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},R=function(t){var e=Object(r.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(r.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(r.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(r.select)(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(r.select)(this).classed("hover",!1)}))};g.push(R),e.default={parseDirective:y,getConfig:function(){return a.getConfig().class},addClass:v,bindFunctions:N,clear:_,getClass:w,getClasses:x,addAnnotation:T,getRelations:k,addRelation:C,addMember:E,addMembers:S,cleanupLabel:O,lineType:B,relationType:L,setClickEvent:D,setCssClass:A,setLink:M,setTooltip:function(t,e){var n=a.getConfig();t.split(",").forEach((function(t){void 0!==e&&(f[t].tooltip=o.default.sanitizeText(e,n))}))},lookUpDomId:b}},"./src/diagrams/class/classRenderer-v2.js":function(t,e,n){n.r(e),n.d(e,"addClasses",(function(){return v})),n.d(e,"addRelations",(function(){return b})),n.d(e,"setConf",(function(){return w})),n.d(e,"drawOld",(function(){return x})),n.d(e,"draw",(function(){return k}));var r=n("d3"),i=n("dagre"),a=n.n(i),o=n("graphlib"),s=n.n(o),c=n("./src/logger.js"),l=n("./src/diagrams/class/classDb.js"),u=n("./src/diagrams/class/parser/classDiagram.jison"),h=n("./src/diagrams/class/svgDraw.js"),d=n("./src/config.js"),f=n("./src/dagre-wrapper/index.js"),p=n("./src/utils.js"),g=n("./src/diagrams/common/common.js");u.parser.yy=l.default;var y={},m={dividerMargin:10,padding:5,textHeight:10},v=function(t,e){var n=Object.keys(t);c.log.info("keys:",n),c.log.info(t),n.forEach((function(n){var r=t[n],i="";r.cssClasses.length>0&&(i=i+" "+r.cssClasses.join(" "));var a={labelStyle:""},o=void 0!==r.text?r.text:r.id,s="";switch(r.type){case"class":s="class_box";break;default:s="class_box"}e.setNode(r.id,{labelStyle:a.labelStyle,shape:s,labelText:o,classData:r,rx:0,ry:0,class:i,style:a.style,id:r.id,domId:r.domId,haveCallback:r.haveCallback,link:r.link,width:"group"===r.type?500:void 0,type:r.type,padding:Object(d.getConfig)().flowchart.padding}),c.log.info("setNode",{labelStyle:a.labelStyle,shape:s,labelText:o,rx:0,ry:0,class:i,style:a.style,id:r.id,width:"group"===r.type?500:void 0,type:r.type,padding:Object(d.getConfig)().flowchart.padding})}))},b=function(t,e){var n=0;t.forEach((function(i){n++;var a={classes:"relation"};a.pattern=1==i.relation.lineType?"dashed":"solid",a.id="id"+n,"arrow_open"===i.type?a.arrowhead="none":a.arrowhead="normal",c.log.info(a,i),a.startLabelRight="none"===i.relationTitle1?"":i.relationTitle1,a.endLabelLeft="none"===i.relationTitle2?"":i.relationTitle2,a.arrowTypeStart=C(i.relation.type1),a.arrowTypeEnd=C(i.relation.type2);var o="",s="";if(void 0!==i.style){var l=Object(p.getStylesFromArray)(i.style);o=l.style,s=l.labelStyle}else o="fill:none";a.style=o,a.labelStyle=s,void 0!==i.interpolate?a.curve=Object(p.interpolateToCurve)(i.interpolate,r.curveLinear):void 0!==t.defaultInterpolate?a.curve=Object(p.interpolateToCurve)(t.defaultInterpolate,r.curveLinear):a.curve=Object(p.interpolateToCurve)(m.curve,r.curveLinear),i.text=i.title,void 0===i.text?void 0!==i.style&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333",a.labelpos="c",Object(d.getConfig)().flowchart.htmlLabels,a.labelType="text",a.label=i.text.replace(g.default.lineBreakRegex,"\n"),void 0===i.style&&(a.style=a.style||"stroke: #333; stroke-width: 1.5px;fill:none"),a.labelStyle=a.labelStyle.replace("color:","fill:")),e.setEdge(i.id1,i.id2,a,n)}))},_=function(t){for(var e=Object.keys(y),n=0;n<e.length;n++)if(y[e[n]].label===t)return e[n]},w=function(t){Object.keys(t).forEach((function(e){m[e]=t[e]}))},x=function(t,e){y={},u.parser.yy.clear(),u.parser.parse(t),c.log.info("Rendering diagram "+t);var n=Object(r.select)("[id='".concat(e,"']")),i=new s.a.Graph({multigraph:!0});i.setGraph({isMultiGraph:!0}),i.setDefaultEdgeLabel((function(){return{}}));var o=l.default.getClasses();c.log.info("classes:"),c.log.info(o);for(var d=Object.keys(o),f=0;f<d.length;f++){var g=o[d[f]],v=h.default.drawClass(n,g,m);y[v.id]=v,i.setNode(v.id,v),c.log.info("Org height: "+v.height)}var b=l.default.getRelations();c.log.info("relations:",b),b.forEach((function(t){c.log.info("tjoho"+_(t.id1)+_(t.id2)+JSON.stringify(t)),i.setEdge(_(t.id1),_(t.id2),{relation:t},t.title||"DEFAULT")})),a.a.layout(i),i.nodes().forEach((function(t){void 0!==t&&void 0!==i.node(t)&&(c.log.debug("Node "+t+": "+JSON.stringify(i.node(t))),Object(r.select)("#"+Object(l.lookUpDomId)(t)).attr("transform","translate("+(i.node(t).x-i.node(t).width/2)+","+(i.node(t).y-i.node(t).height/2)+" )"))})),i.edges().forEach((function(t){void 0!==t&&void 0!==i.edge(t)&&(c.log.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i.edge(t))),h.default.drawEdge(n,i.edge(t),i.edge(t).relation,m))}));var w=n.node().getBBox(),x=w.width+40,k=w.height+40;Object(p.configureSvgSize)(n,k,x,m.useMaxWidth);var C="".concat(w.x-20," ").concat(w.y-20," ").concat(x," ").concat(k);c.log.debug("viewBox ".concat(C)),n.attr("viewBox",C)},k=function(t,e){c.log.info("Drawing class"),l.default.clear(),u.parser.parse(t);var n=Object(d.getConfig)().flowchart;c.log.info("config:",n);var i=n.nodeSpacing||50,a=n.rankSpacing||50,o=new s.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TD",nodesep:i,ranksep:a,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),h=l.default.getClasses(),g=l.default.getRelations();c.log.info(g),v(h,o),b(g,o);var y=Object(r.select)('[id="'.concat(e,'"]'));y.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var m=Object(r.select)("#"+e+" g");Object(f.render)(m,o,["aggregation","extension","composition","dependency"],"classDiagram",e);var _=y.node().getBBox(),w=_.width+16,x=_.height+16;if(c.log.debug("new ViewBox 0 0 ".concat(w," ").concat(x),"translate(".concat(8-o._label.marginx,", ").concat(8-o._label.marginy,")")),Object(p.configureSvgSize)(y,x,w,n.useMaxWidth),y.attr("viewBox","0 0 ".concat(w," ").concat(x)),y.select("g").attr("transform","translate(".concat(8-o._label.marginx,", ").concat(8-_.y,")")),!n.htmlLabels)for(var k=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),C=0;C<k.length;C++){var T=k[C],E=T.getBBox(),S=document.createElementNS("http://www.w3.org/2000/svg","rect");S.setAttribute("rx",0),S.setAttribute("ry",0),S.setAttribute("width",E.width),S.setAttribute("height",E.height),S.setAttribute("style","fill:#e8e8e8;"),T.insertBefore(S,T.firstChild)}};function C(t){var e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;default:e="none"}return e}e.default={setConf:w,draw:k}},"./src/diagrams/class/classRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return y})),n.d(e,"draw",(function(){return m}));var r=n("d3"),i=n("dagre"),a=n.n(i),o=n("graphlib"),s=n.n(o),c=n("./src/logger.js"),l=n("./src/diagrams/class/classDb.js"),u=n("./src/diagrams/class/parser/classDiagram.jison"),h=n("./src/diagrams/class/svgDraw.js"),d=n("./src/utils.js");u.parser.yy=l.default;var f={},p={dividerMargin:10,padding:5,textHeight:10},g=function(t){for(var e=Object.keys(f),n=0;n<e.length;n++)if(f[e[n]].label===t)return e[n]},y=function(t){Object.keys(t).forEach((function(e){p[e]=t[e]}))},m=function(t,e){f={},u.parser.yy.clear(),u.parser.parse(t),c.log.info("Rendering diagram "+t);var n,i=Object(r.select)("[id='".concat(e,"']"));i.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),(n=i).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),n.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),n.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");var o=new s.a.Graph({multigraph:!0});o.setGraph({isMultiGraph:!0}),o.setDefaultEdgeLabel((function(){return{}}));for(var y=l.default.getClasses(),m=Object.keys(y),v=0;v<m.length;v++){var b=y[m[v]],_=h.default.drawClass(i,b,p);f[_.id]=_,o.setNode(_.id,_),c.log.info("Org height: "+_.height)}l.default.getRelations().forEach((function(t){c.log.info("tjoho"+g(t.id1)+g(t.id2)+JSON.stringify(t)),o.setEdge(g(t.id1),g(t.id2),{relation:t},t.title||"DEFAULT")})),a.a.layout(o),o.nodes().forEach((function(t){void 0!==t&&void 0!==o.node(t)&&(c.log.debug("Node "+t+": "+JSON.stringify(o.node(t))),Object(r.select)("#"+Object(l.lookUpDomId)(t)).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y-o.node(t).height/2)+" )"))})),o.edges().forEach((function(t){void 0!==t&&void 0!==o.edge(t)&&(c.log.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),h.default.drawEdge(i,o.edge(t),o.edge(t).relation,p))}));var w=i.node().getBBox(),x=w.width+40,k=w.height+40;Object(d.configureSvgSize)(i,k,x,p.useMaxWidth);var C="".concat(w.x-20," ").concat(w.y-20," ").concat(x," ").concat(k);c.log.debug("viewBox ".concat(C)),i.attr("viewBox",C)};e.default={setConf:y,draw:m}},"./src/diagrams/class/parser/classDiagram.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,7],n=[1,6],r=[1,14],i=[1,25],a=[1,28],o=[1,26],s=[1,27],c=[1,29],l=[1,30],u=[1,31],h=[1,32],d=[1,35],f=[1,36],p=[1,37],g=[1,38],y=[10,19],m=[1,50],v=[1,51],b=[1,52],_=[1,53],w=[1,54],x=[1,55],k=[10,19,26,33,34,42,45,46,47,48,49,50,55,57],C=[10,19,24,26,33,34,38,42,45,46,47,48,49,50,55,57,72,73,74,75],T=[10,13,17,19],E=[42,72,73,74,75],S=[42,49,50,72,73,74,75],O=[42,45,46,47,48,72,73,74,75],A=[10,19,26],M=[1,87],D={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,graphConfig:6,openDirective:7,typeDirective:8,closeDirective:9,NEWLINE:10,":":11,argDirective:12,open_directive:13,type_directive:14,arg_directive:15,close_directive:16,CLASS_DIAGRAM:17,statements:18,EOF:19,statement:20,className:21,alphaNumToken:22,classLiteralName:23,GENERICTYPE:24,relationStatement:25,LABEL:26,classStatement:27,methodStatement:28,annotationStatement:29,clickStatement:30,cssClassStatement:31,CLASS:32,STYLE_SEPARATOR:33,STRUCT_START:34,members:35,STRUCT_STOP:36,ANNOTATION_START:37,ANNOTATION_END:38,MEMBER:39,SEPARATOR:40,relation:41,STR:42,relationType:43,lineType:44,AGGREGATION:45,EXTENSION:46,COMPOSITION:47,DEPENDENCY:48,LINE:49,DOTTED_LINE:50,CALLBACK:51,LINK:52,LINK_TARGET:53,CLICK:54,CALLBACK_NAME:55,CALLBACK_ARGS:56,HREF:57,CSSCLASS:58,commentToken:59,textToken:60,graphCodeTokens:61,textNoTagsToken:62,TAGSTART:63,TAGEND:64,"==":65,"--":66,PCT:67,DEFAULT:68,SPACE:69,MINUS:70,keywords:71,UNICODE_TEXT:72,NUM:73,ALPHA:74,BQUOTE_STR:75,$accept:0,$end:1},terminals_:{2:"error",10:"NEWLINE",11:":",13:"open_directive",14:"type_directive",15:"arg_directive",16:"close_directive",17:"CLASS_DIAGRAM",19:"EOF",24:"GENERICTYPE",26:"LABEL",32:"CLASS",33:"STYLE_SEPARATOR",34:"STRUCT_START",36:"STRUCT_STOP",37:"ANNOTATION_START",38:"ANNOTATION_END",39:"MEMBER",40:"SEPARATOR",42:"STR",45:"AGGREGATION",46:"EXTENSION",47:"COMPOSITION",48:"DEPENDENCY",49:"LINE",50:"DOTTED_LINE",51:"CALLBACK",52:"LINK",53:"LINK_TARGET",54:"CLICK",55:"CALLBACK_NAME",56:"CALLBACK_ARGS",57:"HREF",58:"CSSCLASS",61:"graphCodeTokens",63:"TAGSTART",64:"TAGEND",65:"==",66:"--",67:"PCT",68:"DEFAULT",69:"SPACE",70:"MINUS",71:"keywords",72:"UNICODE_TEXT",73:"NUM",74:"ALPHA",75:"BQUOTE_STR"},productions_:[0,[3,1],[3,2],[4,1],[5,4],[5,6],[7,1],[8,1],[12,1],[9,1],[6,4],[18,1],[18,2],[18,3],[21,1],[21,1],[21,2],[21,2],[21,2],[20,1],[20,2],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[27,2],[27,4],[27,5],[27,7],[29,4],[35,1],[35,2],[28,1],[28,2],[28,1],[28,1],[25,3],[25,4],[25,4],[25,5],[41,3],[41,2],[41,2],[41,1],[43,1],[43,1],[43,1],[43,1],[44,1],[44,1],[30,3],[30,4],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[31,3],[59,1],[59,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[62,1],[62,1],[62,1],[62,1],[22,1],[22,1],[22,1],[23,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:r.parseDirective("%%{","open_directive");break;case 7:r.parseDirective(a[s],"type_directive");break;case 8:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 9:r.parseDirective("}%%","close_directive","class");break;case 14:case 15:this.$=a[s];break;case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+"~"+a[s];break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 27:r.addClass(a[s]);break;case 28:r.addClass(a[s-2]),r.setCssClass(a[s-2],a[s]);break;case 29:r.addClass(a[s-3]),r.addMembers(a[s-3],a[s-1]);break;case 30:r.addClass(a[s-5]),r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 31:r.addAnnotation(a[s],a[s-2]);break;case 32:this.$=[a[s]];break;case 33:a[s].push(a[s-1]),this.$=a[s];break;case 34:break;case 35:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 36:case 37:break;case 38:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 39:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 40:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 41:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 42:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 43:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 44:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 45:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 46:this.$=r.relationType.AGGREGATION;break;case 47:this.$=r.relationType.EXTENSION;break;case 48:this.$=r.relationType.COMPOSITION;break;case 49:this.$=r.relationType.DEPENDENCY;break;case 50:this.$=r.lineType.LINE;break;case 51:this.$=r.lineType.DOTTED_LINE;break;case 52:case 58:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 53:case 59:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 54:case 62:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 55:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 56:case 64:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 57:case 65:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 60:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 61:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 63:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 66:r.setCssClass(a[s-1],a[s])}},table:[{3:1,4:2,5:3,6:4,7:5,13:e,17:n},{1:[3]},{1:[2,1]},{3:8,4:2,5:3,6:4,7:5,13:e,17:n},{1:[2,3]},{8:9,14:[1,10]},{10:[1,11]},{14:[2,6]},{1:[2,2]},{9:12,11:[1,13],16:r},t([11,16],[2,7]),{5:23,7:5,13:e,18:15,20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:i,37:a,39:o,40:s,51:c,52:l,54:u,58:h,72:d,73:f,74:p,75:g},{10:[1,39]},{12:40,15:[1,41]},{10:[2,9]},{19:[1,42]},{10:[1,43],19:[2,11]},t(y,[2,19],{26:[1,44]}),t(y,[2,21]),t(y,[2,22]),t(y,[2,23]),t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,34],{41:45,43:48,44:49,26:[1,47],42:[1,46],45:m,46:v,47:b,48:_,49:w,50:x}),{21:56,22:33,23:34,72:d,73:f,74:p,75:g},t(y,[2,36]),t(y,[2,37]),{22:57,72:d,73:f,74:p},{21:58,22:33,23:34,72:d,73:f,74:p,75:g},{21:59,22:33,23:34,72:d,73:f,74:p,75:g},{21:60,22:33,23:34,72:d,73:f,74:p,75:g},{42:[1,61]},t(k,[2,14],{22:33,23:34,21:62,24:[1,63],72:d,73:f,74:p,75:g}),t(k,[2,15],{24:[1,64]}),t(C,[2,80]),t(C,[2,81]),t(C,[2,82]),t([10,19,24,26,33,34,42,45,46,47,48,49,50,55,57],[2,83]),t(T,[2,4]),{9:65,16:r},{16:[2,8]},{1:[2,10]},{5:23,7:5,13:e,18:66,19:[2,12],20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:i,37:a,39:o,40:s,51:c,52:l,54:u,58:h,72:d,73:f,74:p,75:g},t(y,[2,20]),{21:67,22:33,23:34,42:[1,68],72:d,73:f,74:p,75:g},{41:69,43:48,44:49,45:m,46:v,47:b,48:_,49:w,50:x},t(y,[2,35]),{44:70,49:w,50:x},t(E,[2,45],{43:71,45:m,46:v,47:b,48:_}),t(S,[2,46]),t(S,[2,47]),t(S,[2,48]),t(S,[2,49]),t(O,[2,50]),t(O,[2,51]),t(y,[2,27],{33:[1,72],34:[1,73]}),{38:[1,74]},{42:[1,75]},{42:[1,76]},{55:[1,77],57:[1,78]},{22:79,72:d,73:f,74:p},t(k,[2,16]),t(k,[2,17]),t(k,[2,18]),{10:[1,80]},{19:[2,13]},t(A,[2,38]),{21:81,22:33,23:34,72:d,73:f,74:p,75:g},{21:82,22:33,23:34,42:[1,83],72:d,73:f,74:p,75:g},t(E,[2,44],{43:84,45:m,46:v,47:b,48:_}),t(E,[2,43]),{22:85,72:d,73:f,74:p},{35:86,39:M},{21:88,22:33,23:34,72:d,73:f,74:p,75:g},t(y,[2,52],{42:[1,89]}),t(y,[2,54],{42:[1,91],53:[1,90]}),t(y,[2,58],{42:[1,92],56:[1,93]}),t(y,[2,62],{42:[1,95],53:[1,94]}),t(y,[2,66]),t(T,[2,5]),t(A,[2,40]),t(A,[2,39]),{21:96,22:33,23:34,72:d,73:f,74:p,75:g},t(E,[2,42]),t(y,[2,28],{34:[1,97]}),{36:[1,98]},{35:99,36:[2,32],39:M},t(y,[2,31]),t(y,[2,53]),t(y,[2,55]),t(y,[2,56],{53:[1,100]}),t(y,[2,59]),t(y,[2,60],{42:[1,101]}),t(y,[2,63]),t(y,[2,64],{53:[1,102]}),t(A,[2,41]),{35:103,39:M},t(y,[2,29]),{36:[2,33]},t(y,[2,57]),t(y,[2,61]),t(y,[2,65]),{36:[1,104]},t(y,[2,30])],defaultActions:{2:[2,1],4:[2,3],7:[2,6],8:[2,2],14:[2,9],41:[2,8],42:[2,10],66:[2,13],99:[2,33]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},j={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),13;case 1:return this.begin("type_directive"),14;case 2:return this.popState(),this.begin("arg_directive"),11;case 3:return this.popState(),this.popState(),16;case 4:return 15;case 5:case 6:break;case 7:return 10;case 8:break;case 9:case 10:return 17;case 11:return this.begin("struct"),34;case 12:return"EOF_IN_STRUCT";case 13:return"OPEN_IN_STRUCT";case 14:return this.popState(),36;case 15:break;case 16:return"MEMBER";case 17:return 32;case 18:return 58;case 19:return 51;case 20:return 52;case 21:return 54;case 22:return 37;case 23:return 38;case 24:this.begin("generic");break;case 25:this.popState();break;case 26:return"GENERICTYPE";case 27:this.begin("string");break;case 28:this.popState();break;case 29:return"STR";case 30:this.begin("bqstring");break;case 31:this.popState();break;case 32:return"BQUOTE_STR";case 33:this.begin("href");break;case 34:this.popState();break;case 35:return 57;case 36:this.begin("callback_name");break;case 37:this.popState();break;case 38:this.popState(),this.begin("callback_args");break;case 39:return 55;case 40:this.popState();break;case 41:return 56;case 42:case 43:case 44:case 45:return 53;case 46:case 47:return 46;case 48:case 49:return 48;case 50:return 47;case 51:return 45;case 52:return 49;case 53:return 50;case 54:return 26;case 55:return 33;case 56:return 70;case 57:return"DOT";case 58:return"PLUS";case 59:return 67;case 60:case 61:return"EQUALS";case 62:return 74;case 63:return"PUNCTUATION";case 64:return 73;case 65:return 72;case 66:return 69;case 67:return 19}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callback_args:{rules:[40,41],inclusive:!1},callback_name:{rules:[37,38,39],inclusive:!1},href:{rules:[34,35],inclusive:!1},struct:{rules:[12,13,14,15,16],inclusive:!1},generic:{rules:[25,26],inclusive:!1},bqstring:{rules:[31,32],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,17,18,19,20,21,22,23,24,27,30,33,36,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};function N(){this.yy={}}return D.lexer=j,N.prototype=D,D.Parser=N,new N}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/class/styles.js":function(t,e,n){n.r(e),e.default=function(t){return"g.classGroup text {\n fill: ".concat(t.nodeBorder,";\n fill: ").concat(t.classText,";\n stroke: none;\n font-family: ").concat(t.fontFamily,";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(t.nodeBorder,";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.classGroup line {\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(t.nodeBorder,";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n")}},"./src/diagrams/class/svgDraw.js":function(t,e,n){n.r(e),n.d(e,"drawEdge",(function(){return c})),n.d(e,"drawClass",(function(){return l})),n.d(e,"parseMember",(function(){return u}));var r=n("d3"),i=n("./src/diagrams/class/classDb.js"),a=n("./src/utils.js"),o=n("./src/logger.js"),s=0,c=function(t,e,n,c){var l=function(t){switch(t){case i.relationType.AGGREGATION:return"aggregation";case i.relationType.EXTENSION:return"extension";case i.relationType.COMPOSITION:return"composition";case i.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var u,h,d=e.points,f=Object(r.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(r.curveBasis),p=t.append("path").attr("d",f(d)).attr("id","edge"+s).attr("class","relation"),g="";c.arrowMarkerAbsolute&&(g=(g=(g=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==n.relation.lineType&&p.attr("class","relation dashed-line"),"none"!==n.relation.type1&&p.attr("marker-start","url("+g+"#"+l(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&p.attr("marker-end","url("+g+"#"+l(n.relation.type2)+"End)");var y,m,v,b,_=e.points.length,w=a.default.calcLabelPosition(e.points);if(u=w.x,h=w.y,_%2!=0&&_>1){var x=a.default.calcCardinalityPosition("none"!==n.relation.type1,e.points,e.points[0]),k=a.default.calcCardinalityPosition("none"!==n.relation.type2,e.points,e.points[_-1]);o.log.debug("cardinality_1_point "+JSON.stringify(x)),o.log.debug("cardinality_2_point "+JSON.stringify(k)),y=x.x,m=x.y,v=k.x,b=k.y}if(void 0!==n.title){var C=t.append("g").attr("class","classLabel"),T=C.append("text").attr("class","label").attr("x",u).attr("y",h).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=T;var E=T.node().getBBox();C.insert("rect",":first-child").attr("class","box").attr("x",E.x-c.padding/2).attr("y",E.y-c.padding/2).attr("width",E.width+c.padding).attr("height",E.height+c.padding)}o.log.info("Rendering relation "+JSON.stringify(n)),void 0!==n.relationTitle1&&"none"!==n.relationTitle1&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",y).attr("y",m).attr("fill","black").attr("font-size","6").text(n.relationTitle1),void 0!==n.relationTitle2&&"none"!==n.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",v).attr("y",b).attr("fill","black").attr("font-size","6").text(n.relationTitle2),s++},l=function(t,e,n){o.log.info("Rendering class "+e);var r,a=e.id,s={id:a,label:e.id,width:0,height:0},c=t.append("g").attr("id",Object(i.lookUpDomId)(a)).attr("class","classGroup");r=e.link?c.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",n.textHeight+n.padding).attr("x",0):c.append("text").attr("y",n.textHeight+n.padding).attr("x",0);var l=!0;e.annotations.forEach((function(t){var e=r.append("tspan").text("«"+t+"»");l||e.attr("dy",n.textHeight),l=!1}));var u=e.id;void 0!==e.type&&""!==e.type&&(u+="<"+e.type+">");var h=r.append("tspan").text(u).attr("class","title");l||h.attr("dy",n.textHeight);var d=r.node().getBBox().height,f=c.append("line").attr("x1",0).attr("y1",n.padding+d+n.dividerMargin/2).attr("y2",n.padding+d+n.dividerMargin/2),g=c.append("text").attr("x",n.padding).attr("y",d+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach((function(t){p(g,t,l,n),l=!1}));var y=g.node().getBBox(),m=c.append("line").attr("x1",0).attr("y1",n.padding+d+n.dividerMargin+y.height).attr("y2",n.padding+d+n.dividerMargin+y.height),v=c.append("text").attr("x",n.padding).attr("y",d+2*n.dividerMargin+y.height+n.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach((function(t){p(v,t,l,n),l=!1}));var b=c.node().getBBox(),_=" ";e.cssClasses.length>0&&(_+=e.cssClasses.join(" "));var w=c.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",b.width+2*n.padding).attr("height",b.height+n.padding+.5*n.dividerMargin).attr("class",_).node().getBBox().width;return r.node().childNodes.forEach((function(t){t.setAttribute("x",(w-t.getBBox().width)/2)})),e.tooltip&&r.insert("title").text(e.tooltip),f.attr("x2",w),m.attr("x2",w),s.width=w,s.height=b.height+n.padding+.5*n.dividerMargin,s},u=function(t){var e=t.match(/(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+)/),n=t.match(/^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/);return e&&!n?h(e):n?d(n):f(t)},h=function(t){var e="";try{e=(t[1]?t[1].trim():"")+(t[2]?t[2].trim():"")+(t[3]?g(t[3].trim()):"")+" "+(t[4]?t[4].trim():"")}catch(n){e=t}return{displayText:e,cssStyle:""}},d=function(t){var e="",n="";try{var r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?g(t[3].trim()):"",o=t[4]?t[4].trim():"";n=r+i+"("+a+")"+(t[5]?" : "+g(t[5]).trim():""),e=y(o)}catch(s){n=t}return{displayText:n,cssStyle:e}},f=function(t){var e="",n="",r="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){var o="",s="",c=t.substring(0,1);c.match(/\w/)?s=t.substring(0,i).trim():(c.match(/\+|-|~|#/)&&(o=c),s=t.substring(1,i).trim());var l=t.substring(i+1,a),u=t.substring(a+1,1);n=y(u),e=o+s+"("+g(l.trim())+")",a<"".length&&""!==(r=t.substring(a+2).trim())&&(r=" : "+g(r))}else e=g(t);return{displayText:e,cssStyle:n}},p=function(t,e,n,r){var i=u(e),a=t.append("tspan").attr("x",r.padding).text(i.displayText);""!==i.cssStyle&&a.attr("style",i.cssStyle),n||a.attr("dy",r.textHeight)},g=function t(e){var n=e;return-1!=e.indexOf("~")?t(n=(n=n.replace("~","<")).replace("~",">")):n},y=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}};e.default={drawClass:l,drawEdge:c,parseMember:u}},"./src/diagrams/common/common.js":function(t,e,n){n.r(e),n.d(e,"getRows",(function(){return a})),n.d(e,"removeScript",(function(){return o})),n.d(e,"sanitizeText",(function(){return s})),n.d(e,"lineBreakRegex",(function(){return c})),n.d(e,"hasBreaks",(function(){return l})),n.d(e,"splitBreaks",(function(){return u})),n.d(e,"evaluate",(function(){return d}));var r=n("dompurify"),i=n.n(r),a=function(t){if(!t)return 1;var e=h(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},o=function(t){for(var e="",n=0;n>=0;){if(!((n=t.indexOf("<script"))>=0)){e+=t,n=-1;break}e+=t.substr(0,n),(n=(t=t.substr(n+1)).indexOf("<\/script>"))>=0&&(n+=9,t=t.substr(n))}return e=(e=(e=e.replace(/javascript:/g,"#")).replace(/onerror=/g,"onerror:")).replace(/<iframe/g,"")},s=function(t){return i.a.sanitize(t)},c=/<br\s*\/?>/gi,l=function(t){return/<br\s*[/]?>/gi.test(t)},u=function(t){return t.split(/<br\s*[/]?>/gi)},h=function(t){return t.replace(c,"#br#")},d=function(t){return"false"!==t&&!1!==t};e.default={getRows:a,sanitizeText:s,hasBreaks:l,splitBreaks:u,lineBreakRegex:c,removeScript:o,getUrl:function(t){var e="";return t&&(e=(e=(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e},evaluate:d}},"./src/diagrams/er/erDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return l}));var r=n("./src/logger.js"),i=n("./src/mermaidAPI.js"),a=n("./src/config.js"),o={},s=[],c="",l=function(t,e,n){i.default.parseDirective(this,t,e,n)},u=function(t){return void 0===o[t]&&(o[t]={attributes:[]},r.log.info("Added new entity :",t)),o[t]};e.default={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},parseDirective:l,getConfig:function(){return a.getConfig().er},addEntity:u,addAttributes:function(t,e){var n,i=u(t);for(n=e.length-1;n>=0;n--)i.attributes.push(e[n]),r.log.debug("Added attribute ",e[n].attributeName)},getEntities:function(){return o},addRelationship:function(t,e,n,i){var a={entityA:t,roleA:e,entityB:n,relSpec:i};s.push(a),r.log.debug("Added new relationship :",a)},getRelationships:function(){return s},clear:function(){o={},s=[],c=""},setTitle:function(t){c=t},getTitle:function(){return c}}},"./src/diagrams/er/erMarkers.js":function(t,e,n){n.r(e);var r={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"};e.default={ERMarkers:r,insertMarkers:function(t,e){var n;t.append("defs").append("marker").attr("id",r.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",r.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",r.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",r.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),(n=t.append("defs").append("marker").attr("id",r.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=t.append("defs").append("marker").attr("id",r.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}}},"./src/diagrams/er/erRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return y})),n.d(e,"draw",(function(){return _}));var r=n("graphlib"),i=n.n(r),a=n("d3"),o=n("./src/diagrams/er/erDb.js"),s=n("./src/diagrams/er/parser/erDiagram.jison"),c=n.n(s),l=n("dagre"),u=n.n(l),h=n("./src/config.js"),d=n("./src/logger.js"),f=n("./src/diagrams/er/erMarkers.js"),p=n("./src/utils.js"),g={},y=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)g[e[n]]=t[e[n]]},m=function(t,e,n){var r;return Object.keys(e).forEach((function(i){var a=t.append("g").attr("id",i);r=void 0===r?i:r;var o="entity-"+i,s=a.append("text").attr("class","er entityLabel").attr("id",o).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+Object(h.getConfig)().fontFamily+"; font-size: "+g.fontSize+"px").text(i),c=function(t,e,n){var r=g.entityPadding/3,i=g.entityPadding/3,a=.85*g.fontSize,o=e.node().getBBox(),s=[],c=0,l=0,u=o.height+2*r,d=1;n.forEach((function(n){var i="".concat(e.node().id,"-attr-").concat(d),o=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-type")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+Object(h.getConfig)().fontFamily+"; font-size: "+a+"px").text(n.attributeType),f=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-name")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+Object(h.getConfig)().fontFamily+"; font-size: "+a+"px").text(n.attributeName);s.push({tn:o,nn:f});var p=o.node().getBBox(),g=f.node().getBBox();c=Math.max(c,p.width),l=Math.max(l,g.width),u+=Math.max(p.height,g.height)+2*r,d+=1}));var f={width:Math.max(g.minEntityWidth,Math.max(o.width+2*g.entityPadding,c+l+4*i)),height:n.length>0?u:Math.max(g.minEntityHeight,o.height+2*g.entityPadding)},p=Math.max(0,f.width-(c+l)-4*i);if(n.length>0){e.attr("transform","translate("+f.width/2+","+(r+o.height/2)+")");var y=o.height+2*r,m="attributeBoxOdd";s.forEach((function(e){var n=y+r+Math.max(e.tn.node().getBBox().height,e.nn.node().getBBox().height)/2;e.tn.attr("transform","translate("+i+","+n+")");var a=t.insert("rect","#"+e.tn.node().id).attr("class","er ".concat(m)).attr("fill",g.fill).attr("fill-opacity","100%").attr("stroke",g.stroke).attr("x",0).attr("y",y).attr("width",c+2*i+p/2).attr("height",e.tn.node().getBBox().height+2*r);e.nn.attr("transform","translate("+(parseFloat(a.attr("width"))+i)+","+n+")"),t.insert("rect","#"+e.nn.node().id).attr("class","er ".concat(m)).attr("fill",g.fill).attr("fill-opacity","100%").attr("stroke",g.stroke).attr("x","".concat(a.attr("x")+a.attr("width"))).attr("y",y).attr("width",l+2*i+p/2).attr("height",e.nn.node().getBBox().height+2*r),y+=Math.max(e.tn.node().getBBox().height,e.nn.node().getBBox().height)+2*r,m="attributeBoxOdd"==m?"attributeBoxEven":"attributeBoxOdd"}))}else f.height=Math.max(g.minEntityHeight,u),e.attr("transform","translate("+f.width/2+","+f.height/2+")");return f}(a,s,e[i].attributes),l=c.width,u=c.height,d=a.insert("rect","#"+o).attr("class","er entityBox").attr("fill",g.fill).attr("fill-opacity","100%").attr("stroke",g.stroke).attr("x",0).attr("y",0).attr("width",l).attr("height",u).node().getBBox();n.setNode(i,{width:d.width,height:d.height,shape:"rect",id:i})})),r},v=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},b=0,_=function(t,e){d.log.info("Drawing ER diagram"),o.default.clear();var n=c.a.parser;n.yy=o.default;try{n.parse(t)}catch(E){d.log.debug("Parsing failed")}var r,s=Object(a.select)("[id='".concat(e,"']"));f.default.insertMarkers(s,g),r=new i.a.Graph({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:g.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));var l,y,_=m(s,o.default.getEntities(),r),w=function(t,e){return t.forEach((function(t){e.setEdge(t.entityA,t.entityB,{relationship:t},v(t))})),t}(o.default.getRelationships(),r);u.a.layout(r),l=s,(y=r).nodes().forEach((function(t){void 0!==t&&void 0!==y.node(t)&&l.select("#"+t).attr("transform","translate("+(y.node(t).x-y.node(t).width/2)+","+(y.node(t).y-y.node(t).height/2)+" )")})),w.forEach((function(t){!function(t,e,n,r){b++;var i=n.edge(e.entityA,e.entityB,v(e)),s=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(a.curveBasis),c=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",s(i.points)).attr("stroke",g.stroke).attr("fill","none");e.relSpec.relType===o.default.Identification.NON_IDENTIFYING&&c.attr("stroke-dasharray","8,8");var l="";switch(g.arrowMarkerAbsolute&&(l=(l=(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case o.default.Cardinality.ZERO_OR_ONE:c.attr("marker-end","url("+l+"#"+f.default.ERMarkers.ZERO_OR_ONE_END+")");break;case o.default.Cardinality.ZERO_OR_MORE:c.attr("marker-end","url("+l+"#"+f.default.ERMarkers.ZERO_OR_MORE_END+")");break;case o.default.Cardinality.ONE_OR_MORE:c.attr("marker-end","url("+l+"#"+f.default.ERMarkers.ONE_OR_MORE_END+")");break;case o.default.Cardinality.ONLY_ONE:c.attr("marker-end","url("+l+"#"+f.default.ERMarkers.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case o.default.Cardinality.ZERO_OR_ONE:c.attr("marker-start","url("+l+"#"+f.default.ERMarkers.ZERO_OR_ONE_START+")");break;case o.default.Cardinality.ZERO_OR_MORE:c.attr("marker-start","url("+l+"#"+f.default.ERMarkers.ZERO_OR_MORE_START+")");break;case o.default.Cardinality.ONE_OR_MORE:c.attr("marker-start","url("+l+"#"+f.default.ERMarkers.ONE_OR_MORE_START+")");break;case o.default.Cardinality.ONLY_ONE:c.attr("marker-start","url("+l+"#"+f.default.ERMarkers.ONLY_ONE_START+")")}var u=c.node().getTotalLength(),d=c.node().getPointAtLength(.5*u),p="rel"+b,y=t.append("text").attr("class","er relationshipLabel").attr("id",p).attr("x",d.x).attr("y",d.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+Object(h.getConfig)().fontFamily+"; font-size: "+g.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+p).attr("class","er relationshipLabelBox").attr("x",d.x-y.width/2).attr("y",d.y-y.height/2).attr("width",y.width).attr("height",y.height).attr("fill","white").attr("fill-opacity","85%")}(s,t,r,_)}));var x=g.diagramPadding,k=s.node().getBBox(),C=k.width+2*x,T=k.height+2*x;Object(p.configureSvgSize)(s,T,C,g.useMaxWidth),s.attr("viewBox","".concat(k.x-x," ").concat(k.y-x," ").concat(C," ").concat(T))};e.default={setConf:y,draw:_}},"./src/diagrams/er/parser/erDiagram.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,23,37],i=[1,17],a=[1,20],o=[1,25],s=[1,26],c=[1,27],l=[1,28],u=[1,37],h=[23,34,35],d=[4,6,9,11,23,37],f=[30,31,32,33],p=[22,27],g={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,ALPHANUM:23,attribute:24,attributeType:25,attributeName:26,ATTRIBUTE_WORD:27,cardinality:28,relType:29,ZERO_OR_ONE:30,ZERO_OR_MORE:31,ONE_OR_MORE:32,ONLY_ONE:33,NON_IDENTIFYING:34,IDENTIFYING:35,WORD:36,open_directive:37,type_directive:38,arg_directive:39,close_directive:40,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"ALPHANUM",27:"ATTRIBUTE_WORD",30:"ZERO_OR_ONE",31:"ZERO_OR_MORE",32:"ONE_OR_MORE",33:"ONLY_ONE",34:"NON_IDENTIFYING",35:"IDENTIFYING",36:"WORD",37:"open_directive",38:"type_directive",39:"arg_directive",40:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[17,1],[21,1],[21,2],[24,2],[25,1],[26,1],[18,3],[28,1],[28,1],[28,1],[28,1],[29,1],[29,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 12:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 13:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s]);break;case 16:this.$=a[s];break;case 17:this.$=[a[s]];break;case 18:a[s].push(a[s-1]),this.$=a[s];break;case 19:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 20:case 21:this.$=a[s];break;case 22:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 23:this.$=r.Cardinality.ZERO_OR_ONE;break;case 24:this.$=r.Cardinality.ZERO_OR_MORE;break;case 25:this.$=r.Cardinality.ONE_OR_MORE;break;case 26:this.$=r.Cardinality.ONLY_ONE;break;case 27:this.$=r.Identification.NON_IDENTIFYING;break;case 28:this.$=r.Identification.IDENTIFYING;break;case 29:this.$=a[s].replace(/"/g,"");break;case 30:this.$=a[s];break;case 31:r.parseDirective("%%{","open_directive");break;case 32:r.parseDirective(a[s],"type_directive");break;case 33:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 34:r.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:e,7:3,12:4,37:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,37:n},{13:8,38:[1,9]},{38:[2,31]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:i,37:n},{1:[2,2]},{14:18,15:[1,19],40:a},t([15,40],[2,32]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:15,10:21,12:4,17:16,23:i,37:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,15],{18:22,28:24,20:[1,23],30:o,31:s,32:c,33:l}),t([6,9,11,15,20,23,30,31,32,33,37],[2,16]),{11:[1,29]},{16:30,39:[1,31]},{11:[2,34]},t(r,[2,5]),{17:32,23:i},{21:33,22:[1,34],24:35,25:36,27:u},{29:38,34:[1,39],35:[1,40]},t(h,[2,23]),t(h,[2,24]),t(h,[2,25]),t(h,[2,26]),t(d,[2,9]),{14:41,40:a},{40:[2,33]},{15:[1,42]},{22:[1,43]},t(r,[2,14]),{21:44,22:[2,17],24:35,25:36,27:u},{26:45,27:[1,46]},{27:[2,20]},{28:47,30:o,31:s,32:c,33:l},t(f,[2,27]),t(f,[2,28]),{11:[1,48]},{19:49,23:[1,51],36:[1,50]},t(r,[2,13]),{22:[2,18]},t(p,[2,19]),t(p,[2,21]),{23:[2,22]},t(d,[2,10]),t(r,[2,12]),t(r,[2,29]),t(r,[2,30])],defaultActions:{5:[2,31],7:[2,2],20:[2,34],31:[2,33],37:[2,20],44:[2,18],47:[2,22]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},y={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),37;case 1:return this.begin("type_directive"),38;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),40;case 4:return 39;case 5:case 6:break;case 7:return 11;case 8:break;case 9:return 9;case 10:return 36;case 11:return 4;case 12:return this.begin("block"),20;case 13:break;case 14:return 27;case 15:break;case 16:return this.popState(),22;case 17:return e.yytext[0];case 18:return 30;case 19:return 31;case 20:return 32;case 21:return 33;case 22:return 30;case 23:return 31;case 24:return 32;case 25:return 34;case 26:return 35;case 27:case 28:return 34;case 29:return 23;case 30:return e.yytext[0];case 31:return 6}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},block:{rules:[13,14,15,16,17],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31],inclusive:!0}}};function m(){this.yy={}}return g.lexer=y,m.prototype=g,g.Parser=m,new m}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/er/styles.js":function(t,e,n){n.r(e),e.default=function(t){return"\n .entityBox {\n fill: ".concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxOdd {\n fill: #ffffff;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxEven {\n fill: #f2f2f2;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .relationshipLabelBox {\n fill: ").concat(t.tertiaryColor,";\n opacity: 0.7;\n background-color: ").concat(t.tertiaryColor,";\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ").concat(t.lineColor,";\n }\n")}},"./src/diagrams/flowchart/flowChartShapes.js":function(t,e,n){n.r(e),n.d(e,"addToRender",(function(){return y})),n.d(e,"addToRenderV2",(function(){return m}));var r=n("dagre-d3"),i=n.n(r);function a(t,e,n){var r=.9*(e.width+e.height),a=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],o=v(t,r,r,a);return n.intersect=function(t){return i.a.intersect.polygon(n,a,t)},o}function o(t,e,n){var r=e.height,a=r/4,o=e.width+2*a,s=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-r/2},{x:o-a,y:-r},{x:a,y:-r},{x:0,y:-r/2}],c=v(t,o,r,s);return n.intersect=function(t){return i.a.intersect.polygon(n,s,t)},c}function s(t,e,n){var r=e.width,a=e.height,o=[{x:-a/2,y:0},{x:r,y:0},{x:r,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}],s=v(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function c(t,e,n){var r=e.width,a=e.height,o=[{x:-2*a/6,y:0},{x:r-a/6,y:0},{x:r+2*a/6,y:-a},{x:a/6,y:-a}],s=v(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function l(t,e,n){var r=e.width,a=e.height,o=[{x:2*a/6,y:0},{x:r+a/6,y:0},{x:r-2*a/6,y:-a},{x:-a/6,y:-a}],s=v(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function u(t,e,n){var r=e.width,a=e.height,o=[{x:-2*a/6,y:0},{x:r+2*a/6,y:0},{x:r-a/6,y:-a},{x:a/6,y:-a}],s=v(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function h(t,e,n){var r=e.width,a=e.height,o=[{x:a/6,y:0},{x:r-a/6,y:0},{x:r+2*a/6,y:-a},{x:-2*a/6,y:-a}],s=v(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function d(t,e,n){var r=e.width,a=e.height,o=[{x:0,y:0},{x:r+a/2,y:0},{x:r,y:-a/2},{x:r+a/2,y:-a},{x:0,y:-a}],s=v(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function f(t,e,n){var r=e.height,a=e.width+r/4,o=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-a/2).attr("y",-r/2).attr("width",a).attr("height",r);return n.intersect=function(t){return i.a.intersect.rect(n,t)},o}function p(t,e,n){var r=e.width,a=e.height,o=[{x:0,y:0},{x:r,y:0},{x:r,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],s=v(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function g(t,e,n){var r=e.width,a=r/2,o=a/(2.5+r/50),s=e.height+o,c="M 0,"+o+" a "+a+","+o+" 0,0,0 "+r+" 0 a "+a+","+o+" 0,0,0 "+-r+" 0 l 0,"+s+" a "+a+","+o+" 0,0,0 "+r+" 0 l 0,"+-s,l=t.attr("label-offset-y",o).insert("path",":first-child").attr("d",c).attr("transform","translate("+-r/2+","+-(s/2+o)+")");return n.intersect=function(t){var e=i.a.intersect.rect(n,t),r=e.x-n.x;if(0!=a&&(Math.abs(r)<n.width/2||Math.abs(r)==n.width/2&&Math.abs(e.y-n.y)>n.height/2-o)){var s=o*o*(1-r*r/(a*a));0!=s&&(s=Math.sqrt(s)),s=o-s,t.y-n.y>0&&(s=-s),e.y+=s}return e},l}function y(t){t.shapes().question=a,t.shapes().hexagon=o,t.shapes().stadium=f,t.shapes().subroutine=p,t.shapes().cylinder=g,t.shapes().rect_left_inv_arrow=s,t.shapes().lean_right=c,t.shapes().lean_left=l,t.shapes().trapezoid=u,t.shapes().inv_trapezoid=h,t.shapes().rect_right_inv_arrow=d}function m(t){t({question:a}),t({hexagon:o}),t({stadium:f}),t({subroutine:p}),t({cylinder:g}),t({rect_left_inv_arrow:s}),t({lean_right:c}),t({lean_left:l}),t({trapezoid:u}),t({inv_trapezoid:h}),t({rect_right_inv_arrow:d})}function v(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+-e/2+","+n/2+")")}e.default={addToRender:y,addToRenderV2:m}},"./src/diagrams/flowchart/flowDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return T})),n.d(e,"lookUpDomId",(function(){return E})),n.d(e,"addVertex",(function(){return S})),n.d(e,"addSingleLink",(function(){return O})),n.d(e,"addLink",(function(){return A})),n.d(e,"updateLinkInterpolate",(function(){return M})),n.d(e,"updateLink",(function(){return D})),n.d(e,"addClass",(function(){return j})),n.d(e,"setDirection",(function(){return N})),n.d(e,"setClass",(function(){return B})),n.d(e,"setLink",(function(){return L})),n.d(e,"getTooltip",(function(){return R})),n.d(e,"setClickEvent",(function(){return I})),n.d(e,"bindFunctions",(function(){return F})),n.d(e,"getDirection",(function(){return P})),n.d(e,"getVertices",(function(){return Y})),n.d(e,"getEdges",(function(){return z})),n.d(e,"getClasses",(function(){return U})),n.d(e,"clear",(function(){return W})),n.d(e,"setGen",(function(){return q})),n.d(e,"defaultStyle",(function(){return H})),n.d(e,"addSubGraph",(function(){return V})),n.d(e,"getDepthFirstPos",(function(){return K})),n.d(e,"indexNodes",(function(){return J})),n.d(e,"getSubGraphs",(function(){return tt})),n.d(e,"firstGraph",(function(){return et}));var r=n("d3"),i=n("./src/utils.js"),a=n("./src/config.js"),o=n("./src/diagrams/common/common.js"),s=n("./src/mermaidAPI.js"),c=n("./src/logger.js");function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var d,f,p=0,g=a.getConfig(),y={},m=[],v=[],b=[],_={},w={},x=0,k=!0,C=[],T=function(t,e,n){s.default.parseDirective(this,t,e,n)},E=function(t){for(var e=Object.keys(y),n=0;n<e.length;n++)if(y[e[n]].id===t)return y[e[n]].domId;return t},S=function(t,e,n,r,i,s){var c,l=t;void 0!==l&&0!==l.trim().length&&(void 0===y[l]&&(y[l]={id:l,domId:"flowchart-"+l+"-"+p,styles:[],classes:[]}),p++,void 0!==e?(g=a.getConfig(),'"'===(c=o.default.sanitizeText(e.trim(),g))[0]&&'"'===c[c.length-1]&&(c=c.substring(1,c.length-1)),y[l].text=c):void 0===y[l].text&&(y[l].text=t),void 0!==n&&(y[l].type=n),null!=r&&r.forEach((function(t){y[l].styles.push(t)})),null!=i&&i.forEach((function(t){y[l].classes.push(t)})),void 0!==s&&(y[l].dir=s))},O=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};void 0!==(r=n.text)&&(i.text=o.default.sanitizeText(r.trim(),g),'"'===i.text[0]&&'"'===i.text[i.text.length-1]&&(i.text=i.text.substring(1,i.text.length-1))),void 0!==n&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length),m.push(i)},A=function(t,e,n,r){var i,a;for(i=0;i<t.length;i++)for(a=0;a<e.length;a++)O(t[i],e[a],n,r)},M=function(t,e){t.forEach((function(t){"default"===t?m.defaultInterpolate=e:m[t].interpolate=e}))},D=function(t,e){t.forEach((function(t){"default"===t?m.defaultStyle=e:(-1===i.default.isSubstringInArray("fill",e)&&e.push("fill:none"),m[t].style=e)}))},j=function(t,e){void 0===v[t]&&(v[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){var n=e.replace("fill","bgFill").replace("color","fill");v[t].textStyles.push(n)}v[t].styles.push(e)}))},N=function(t){(d=t).match(/.*</)&&(d="RL"),d.match(/.*\^/)&&(d="BT"),d.match(/.*>/)&&(d="LR"),d.match(/.*v/)&&(d="TB")},B=function(t,e){t.split(",").forEach((function(t){var n=t;void 0!==y[n]&&y[n].classes.push(e),void 0!==_[n]&&_[n].classes.push(e)}))},L=function(t,e,n){t.split(",").forEach((function(t){void 0!==y[t]&&(y[t].link=i.default.formatUrl(e,g),y[t].linkTarget=n)})),B(t,"clickable")},R=function(t){return w[t]},I=function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){var r=E(t);if("loose"===a.getConfig().securityLevel&&void 0!==e){var o=[];if("string"==typeof n){o=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var s=0;s<o.length;s++){var c=o[s].trim();'"'===c.charAt(0)&&'"'===c.charAt(c.length-1)&&(c=c.substr(1,c.length-2)),o[s]=c}}0===o.length&&o.push(t),void 0!==y[t]&&(y[t].haveCallback=!0,C.push((function(){var t=document.querySelector('[id="'.concat(r,'"]'));null!==t&&t.addEventListener("click",(function(){i.default.runFunc.apply(i.default,[e].concat(u(o)))}),!1)})))}}(t,e,n)})),B(t,"clickable")},F=function(t){C.forEach((function(e){e(t)}))},P=function(){return d.trim()},Y=function(){return y},z=function(){return m},U=function(){return v},$=function(t){var e=Object(r.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(r.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(r.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(r.select)(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(r.select)(this).classed("hover",!1)}))};C.push($);var W=function(t){y={},v={},m=[],(C=[]).push($),b=[],_={},x=0,w=[],k=!0,f=t||"gen-1"},q=function(t){f=t||"gen-1"},H=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},V=function(t,e,n){var r=t.trim(),i=n;t===n&&n.match(/\s/)&&(r=void 0);var a,s,u,h,d=[],p=(a=d.concat.apply(d,e),u={boolean:{},number:{},string:{}},h=[],{nodeList:a.filter((function(t){var e=l(t);return t.stmt&&"dir"===t.stmt?(s=t.value,!1):""!==t.trim()&&(e in u?!u[e].hasOwnProperty(t)&&(u[e][t]=!0):!(h.indexOf(t)>=0)&&h.push(t))})),dir:s}),y=p.dir;if(d=p.nodeList,"gen-1"===f){c.log.warn("LOOKING UP");for(var m=0;m<d.length;m++)d[m]=E(d[m])}r=r||"subGraph"+x,i=i||"",i=o.default.sanitizeText(i,g),x+=1;var v={id:r,nodes:d,title:i.trim(),classes:[],dir:y};return c.log.info("Adding",v.id,v.nodes,v.dir),v.nodes=rt(v,b).nodes,b.push(v),_[r]=v,r},G=function(t){for(var e=0;e<b.length;e++)if(b[e].id===t)return e;return-1},X=-1,Z=[],Q=function t(e,n){var r=b[n].nodes;if(!((X+=1)>2e3)){if(Z[X]=n,b[n].id===e)return{result:!0,count:0};for(var i=0,a=1;i<r.length;){var o=G(r[i]);if(o>=0){var s=t(e,o);if(s.result)return{result:!0,count:a+s.count};a+=s.count}i+=1}return{result:!1,count:a}}},K=function(t){return Z[t]},J=function(){X=-1,b.length>0&&Q("none",b.length-1)},tt=function(){return b},et=function(){return!!k&&(k=!1,!0)},nt=function(t,e){var n=!1;return t.forEach((function(t){t.nodes.indexOf(e)>=0&&(n=!0)})),n},rt=function(t,e){var n=[];return t.nodes.forEach((function(r,i){nt(e,r)||n.push(t.nodes[i])})),{nodes:n}};e.default={parseDirective:T,defaultConfig:function(){return a.defaultConfig.flowchart},addVertex:S,lookUpDomId:E,addLink:A,updateLinkInterpolate:M,updateLink:D,addClass:j,setDirection:N,setClass:B,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(w["gen-1"===f?E(t):t]=o.default.sanitizeText(e,g))}))},getTooltip:R,setClickEvent:I,setLink:L,bindFunctions:F,getDirection:P,getVertices:Y,getEdges:z,getClasses:U,clear:W,setGen:q,defaultStyle:H,addSubGraph:V,getDepthFirstPos:K,indexNodes:J,getSubGraphs:tt,destructLink:function(t,e){var n,r=function(t){var e=t.trim(),n=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross","x"===e[0]&&(r="double_"+r,n=n.slice(1));break;case">":r="arrow_point","<"===e[0]&&(r="double_"+r,n=n.slice(1));break;case"o":r="arrow_circle","o"===e[0]&&(r="double_"+r,n=n.slice(1))}var i="normal",a=n.length-1;"="===n[0]&&(i="thick");var o=function(t,e){for(var n=e.length,r=0,i=0;i<n;++i)e[i]===t&&++r;return r}(".",n);return o&&(i="dotted",a=o),{type:r,stroke:i,length:a}}(t);if(e){if((n=function(t){var e=t.trim(),n="arrow_open";switch(e[0]){case"<":n="arrow_point",e=e.slice(1);break;case"x":n="arrow_cross",e=e.slice(1);break;case"o":n="arrow_circle",e=e.slice(1)}var r="normal";return-1!==e.indexOf("=")&&(r="thick"),-1!==e.indexOf(".")&&(r="dotted"),{type:n,stroke:r}}(e)).stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n.length=r.length,n}return r},lex:{firstGraph:et},exists:nt,makeUniq:rt}},"./src/diagrams/flowchart/flowRenderer-v2.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return m})),n.d(e,"addVertices",(function(){return v})),n.d(e,"addEdges",(function(){return b})),n.d(e,"getClasses",(function(){return _})),n.d(e,"draw",(function(){return w}));var r=n("graphlib"),i=n.n(r),a=n("d3"),o=n("./src/diagrams/flowchart/flowDb.js"),s=n("./src/diagrams/flowchart/parser/flow.jison"),c=n.n(s),l=n("./src/config.js"),u=n("./src/dagre-wrapper/index.js"),h=n("dagre-d3/lib/label/add-html-label.js"),d=n.n(h),f=n("./src/logger.js"),p=n("./src/diagrams/common/common.js"),g=n("./src/utils.js"),y={},m=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)y[e[n]]=t[e[n]]},v=function(t,e,n){var r=Object(a.select)('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],a="default";i.classes.length>0&&(a=i.classes.join(" "));var s,c=Object(g.getStylesFromArray)(i.styles),u=void 0!==i.text?i.text:i.id;if(Object(p.evaluate)(Object(l.getConfig)().flowchart.htmlLabels)){var h={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(s=d()(r,h).node()).parentNode.removeChild(s)}else{var y=document.createElementNS("http://www.w3.org/2000/svg","text");y.setAttribute("style",c.labelStyle.replace("color:","fill:"));for(var m=u.split(p.default.lineBreakRegex),v=0;v<m.length;v++){var b=document.createElementNS("http://www.w3.org/2000/svg","tspan");b.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),b.setAttribute("dy","1em"),b.setAttribute("x","1"),b.textContent=m[v],y.appendChild(b)}s=y}var _=0,w="";switch(i.type){case"round":_=5,w="rect";break;case"square":w="rect";break;case"diamond":w="question";break;case"hexagon":w="hexagon";break;case"odd":w="rect_left_inv_arrow";break;case"lean_right":w="lean_right";break;case"lean_left":w="lean_left";break;case"trapezoid":w="trapezoid";break;case"inv_trapezoid":w="inv_trapezoid";break;case"odd_right":w="rect_left_inv_arrow";break;case"circle":w="circle";break;case"ellipse":w="ellipse";break;case"stadium":w="stadium";break;case"subroutine":w="subroutine";break;case"cylinder":w="cylinder";break;case"group":w="rect";break;default:w="rect"}e.setNode(i.id,{labelStyle:c.labelStyle,shape:w,labelText:u,rx:_,ry:_,class:a,style:c.style,id:i.id,link:i.link,linkTarget:i.linkTarget,tooltip:o.default.getTooltip(i.id)||"",domId:o.default.lookUpDomId(i.id),haveCallback:i.haveCallback,width:"group"===i.type?500:void 0,dir:i.dir,type:i.type,padding:Object(l.getConfig)().flowchart.padding}),f.log.info("setNode",{labelStyle:c.labelStyle,shape:w,labelText:u,rx:_,ry:_,class:a,style:c.style,id:i.id,domId:o.default.lookUpDomId(i.id),width:"group"===i.type?500:void 0,type:i.type,dir:i.dir,padding:Object(l.getConfig)().flowchart.padding})}))},b=function(t,e){f.log.info("abc78 edges = ",t);var n,r,i=0,o={};if(void 0!==t.defaultStyle){var s=Object(g.getStylesFromArray)(t.defaultStyle);n=s.style,r=s.labelStyle}t.forEach((function(s){i++;var c="L-"+s.start+"-"+s.end;void 0===o[c]?(o[c]=0,f.log.info("abc78 new entry",c,o[c])):(o[c]++,f.log.info("abc78 new entry",c,o[c]));var l=c+"-"+o[c];f.log.info("abc78 new link id to be used is",c,l,o[c]);var u="LS-"+s.start,h="LE-"+s.end,d={style:"",labelStyle:""};switch(d.minlen=s.length||1,"arrow_open"===s.type?d.arrowhead="none":d.arrowhead="normal",d.arrowTypeStart="arrow_open",d.arrowTypeEnd="arrow_open",s.type){case"double_arrow_cross":d.arrowTypeStart="arrow_cross";case"arrow_cross":d.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":d.arrowTypeStart="arrow_point";case"arrow_point":d.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":d.arrowTypeStart="arrow_circle";case"arrow_circle":d.arrowTypeEnd="arrow_circle"}var m="",v="";switch(s.stroke){case"normal":m="fill:none;",void 0!==n&&(m=n),void 0!==r&&(v=r),d.thickness="normal",d.pattern="solid";break;case"dotted":d.thickness="normal",d.pattern="dotted",d.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":d.thickness="thick",d.pattern="solid",d.style="stroke-width: 3.5px;fill:none;"}if(void 0!==s.style){var b=Object(g.getStylesFromArray)(s.style);m=b.style,v=b.labelStyle}d.style=d.style+=m,d.labelStyle=d.labelStyle+=v,void 0!==s.interpolate?d.curve=Object(g.interpolateToCurve)(s.interpolate,a.curveLinear):void 0!==t.defaultInterpolate?d.curve=Object(g.interpolateToCurve)(t.defaultInterpolate,a.curveLinear):d.curve=Object(g.interpolateToCurve)(y.curve,a.curveLinear),void 0===s.text?void 0!==s.style&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c"),d.labelType="text",d.label=s.text.replace(p.default.lineBreakRegex,"\n"),void 0===s.style&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),d.labelStyle=d.labelStyle.replace("color:","fill:"),d.id=l,d.classes="flowchart-link "+u+" "+h,e.setEdge(s.start,s.end,d,i)}))},_=function(t){f.log.info("Extracting classes"),o.default.clear();var e=c.a.parser;e.yy=o.default;try{e.parse(t)}catch(zG){return}return o.default.getClasses()},w=function(t,e){f.log.info("Drawing flowchart"),o.default.clear(),o.default.setGen("gen-2");var n=c.a.parser;n.yy=o.default,n.parse(t);var r=o.default.getDirection();void 0===r&&(r="TD");var s,h=Object(l.getConfig)().flowchart,d=h.nodeSpacing||50,p=h.rankSpacing||50,y=new i.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:d,ranksep:p,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),m=o.default.getSubGraphs();f.log.info("Subgraphs - ",m);for(var _=m.length-1;_>=0;_--)s=m[_],f.log.info("Subgraph - ",s),o.default.addVertex(s.id,s.title,"group",void 0,s.classes,s.dir);var w=o.default.getVertices(),x=o.default.getEdges();f.log.info(x);var k=0;for(k=m.length-1;k>=0;k--){s=m[k],Object(a.selectAll)("cluster").append("text");for(var C=0;C<s.nodes.length;C++)f.log.info("Setting up subgraphs",s.nodes[C],s.id),y.setParent(s.nodes[C],s.id)}v(w,y,e),b(x,y);var T=Object(a.select)('[id="'.concat(e,'"]'));T.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var E=Object(a.select)("#"+e+" g");Object(u.render)(E,y,["point","circle","cross"],"flowchart",e);var S=h.diagramPadding,O=T.node().getBBox(),A=O.width+2*S,M=O.height+2*S;if(f.log.debug("new ViewBox 0 0 ".concat(A," ").concat(M),"translate(".concat(S-y._label.marginx,", ").concat(S-y._label.marginy,")")),Object(g.configureSvgSize)(T,M,A,h.useMaxWidth),T.attr("viewBox","0 0 ".concat(A," ").concat(M)),T.select("g").attr("transform","translate(".concat(S-y._label.marginx,", ").concat(S-O.y,")")),o.default.indexNodes("subGraph"+k),!h.htmlLabels)for(var D=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),j=0;j<D.length;j++){var N=D[j],B=N.getBBox(),L=document.createElementNS("http://www.w3.org/2000/svg","rect");L.setAttribute("rx",0),L.setAttribute("ry",0),L.setAttribute("width",B.width),L.setAttribute("height",B.height),N.insertBefore(L,N.firstChild)}Object.keys(w).forEach((function(t){var n=w[t];if(n.link){var r=Object(a.select)("#"+e+' [id="'+t+'"]');if(r){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var o=r.insert((function(){return i}),":first-child"),s=r.select(".label-container");s&&o.append((function(){return s.node()}));var c=r.select(".label");c&&o.append((function(){return c.node()}))}}}))};e.default={setConf:m,addVertices:v,addEdges:b,getClasses:_,draw:w}},"./src/diagrams/flowchart/flowRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return b})),n.d(e,"addVertices",(function(){return _})),n.d(e,"addEdges",(function(){return w})),n.d(e,"getClasses",(function(){return x})),n.d(e,"draw",(function(){return k}));var r=n("graphlib"),i=n.n(r),a=n("d3"),o=n("./src/diagrams/flowchart/flowDb.js"),s=n("./src/diagrams/flowchart/parser/flow.jison"),c=n.n(s),l=n("./src/config.js"),u=n("dagre-d3"),h=n.n(u),d=n("dagre-d3/lib/label/add-html-label.js"),f=n.n(d),p=n("./src/logger.js"),g=n("./src/diagrams/common/common.js"),y=n("./src/utils.js"),m=n("./src/diagrams/flowchart/flowChartShapes.js"),v={},b=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)v[e[n]]=t[e[n]]},_=function(t,e,n){var r=Object(a.select)('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],a="default";i.classes.length>0&&(a=i.classes.join(" "));var s,c=Object(y.getStylesFromArray)(i.styles),u=void 0!==i.text?i.text:i.id;if(Object(g.evaluate)(Object(l.getConfig)().flowchart.htmlLabels)){var h={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(s=f()(r,h).node()).parentNode.removeChild(s)}else{var d=document.createElementNS("http://www.w3.org/2000/svg","text");d.setAttribute("style",c.labelStyle.replace("color:","fill:"));for(var m=u.split(g.default.lineBreakRegex),v=0;v<m.length;v++){var b=document.createElementNS("http://www.w3.org/2000/svg","tspan");b.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),b.setAttribute("dy","1em"),b.setAttribute("x","1"),b.textContent=m[v],d.appendChild(b)}s=d}var _=0,w="";switch(i.type){case"round":_=5,w="rect";break;case"square":w="rect";break;case"diamond":w="question";break;case"hexagon":w="hexagon";break;case"odd":w="rect_left_inv_arrow";break;case"lean_right":w="lean_right";break;case"lean_left":w="lean_left";break;case"trapezoid":w="trapezoid";break;case"inv_trapezoid":w="inv_trapezoid";break;case"odd_right":w="rect_left_inv_arrow";break;case"circle":w="circle";break;case"ellipse":w="ellipse";break;case"stadium":w="stadium";break;case"subroutine":w="subroutine";break;case"cylinder":w="cylinder";break;case"group":w="rect";break;default:w="rect"}p.log.warn("Adding node",i.id,i.domId),e.setNode(o.default.lookUpDomId(i.id),{labelType:"svg",labelStyle:c.labelStyle,shape:w,label:s,rx:_,ry:_,class:a,style:c.style,id:o.default.lookUpDomId(i.id)})}))},w=function(t,e){var n,r,i=0;if(void 0!==t.defaultStyle){var s=Object(y.getStylesFromArray)(t.defaultStyle);n=s.style,r=s.labelStyle}t.forEach((function(s){i++;var c="L-"+s.start+"-"+s.end,u="LS-"+s.start,h="LE-"+s.end,d={};"arrow_open"===s.type?d.arrowhead="none":d.arrowhead="normal";var f="",p="";if(void 0!==s.style){var m=Object(y.getStylesFromArray)(s.style);f=m.style,p=m.labelStyle}else switch(s.stroke){case"normal":f="fill:none",void 0!==n&&(f=n),void 0!==r&&(p=r);break;case"dotted":f="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f=" stroke-width: 3.5px;fill:none"}d.style=f,d.labelStyle=p,void 0!==s.interpolate?d.curve=Object(y.interpolateToCurve)(s.interpolate,a.curveLinear):void 0!==t.defaultInterpolate?d.curve=Object(y.interpolateToCurve)(t.defaultInterpolate,a.curveLinear):d.curve=Object(y.interpolateToCurve)(v.curve,a.curveLinear),void 0===s.text?void 0!==s.style&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c",Object(g.evaluate)(Object(l.getConfig)().flowchart.htmlLabels)?(d.labelType="html",d.label='<span id="L-'.concat(c,'" class="edgeLabel L-').concat(u,"' L-").concat(h,'">').concat(s.text.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),"</span>")):(d.labelType="text",d.label=s.text.replace(g.default.lineBreakRegex,"\n"),void 0===s.style&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none"),d.labelStyle=d.labelStyle.replace("color:","fill:"))),d.id=c,d.class=u+" "+h,d.minlen=s.length||1,e.setEdge(o.default.lookUpDomId(s.start),o.default.lookUpDomId(s.end),d,i)}))},x=function(t){p.log.info("Extracting classes"),o.default.clear();try{var e=c.a.parser;return e.yy=o.default,e.parse(t),o.default.getClasses()}catch(zG){return}},k=function(t,e){p.log.info("Drawing flowchart"),o.default.clear(),o.default.setGen("gen-1");var n=c.a.parser;n.yy=o.default,n.parse(t);var r=o.default.getDirection();void 0===r&&(r="TD");for(var s,u=Object(l.getConfig)().flowchart,d=u.nodeSpacing||50,f=u.rankSpacing||50,v=new i.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:d,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),b=o.default.getSubGraphs(),x=b.length-1;x>=0;x--)s=b[x],o.default.addVertex(s.id,s.title,"group",void 0,s.classes);var k=o.default.getVertices();p.log.warn("Get vertices",k);var C=o.default.getEdges(),T=0;for(T=b.length-1;T>=0;T--){s=b[T],Object(a.selectAll)("cluster").append("text");for(var E=0;E<s.nodes.length;E++)p.log.warn("Setting subgraph",s.nodes[E],o.default.lookUpDomId(s.nodes[E]),o.default.lookUpDomId(s.id)),v.setParent(o.default.lookUpDomId(s.nodes[E]),o.default.lookUpDomId(s.id))}_(k,v,e),w(C,v);var S=new(0,h.a.render);m.default.addToRender(S),S.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");h.a.util.applyStyle(i,n[r+"Style"])},S.arrows().normal=function(t,e){t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};var O=Object(a.select)('[id="'.concat(e,'"]'));O.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),p.log.warn(v);var A=Object(a.select)("#"+e+" g");S(A,v),A.selectAll("g.node").attr("title",(function(){return o.default.getTooltip(this.id)}));var M=u.diagramPadding,D=O.node().getBBox(),j=D.width+2*M,N=D.height+2*M;Object(y.configureSvgSize)(O,N,j,u.useMaxWidth);var B="".concat(D.x-M," ").concat(D.y-M," ").concat(j," ").concat(N);for(p.log.debug("viewBox ".concat(B)),O.attr("viewBox",B),o.default.indexNodes("subGraph"+T),T=0;T<b.length;T++)if("undefined"!==(s=b[T]).title){var L=document.querySelectorAll("#"+e+' [id="'+o.default.lookUpDomId(s.id)+'"] rect'),R=document.querySelectorAll("#"+e+' [id="'+o.default.lookUpDomId(s.id)+'"]'),I=L[0].x.baseVal.value,F=L[0].y.baseVal.value,P=L[0].width.baseVal.value,Y=Object(a.select)(R[0]).select(".label");Y.attr("transform","translate(".concat(I+P/2,", ").concat(F+14,")")),Y.attr("id",e+"Text");for(var z=0;z<s.classes.length;z++)R[0].classList.add(s.classes[z])}Object(g.evaluate)(u.htmlLabels);for(var U=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),$=0;$<U.length;$++){var W=U[$],q=W.getBBox(),H=document.createElementNS("http://www.w3.org/2000/svg","rect");H.setAttribute("rx",0),H.setAttribute("ry",0),H.setAttribute("width",q.width),H.setAttribute("height",q.height),W.insertBefore(H,W.firstChild)}Object.keys(k).forEach((function(t){var n=k[t];if(n.link){var r=Object(a.select)("#"+e+' [id="'+o.default.lookUpDomId(t)+'"]');if(r){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var s=r.insert((function(){return i}),":first-child"),c=r.select(".label-container");c&&s.append((function(){return c.node()}));var l=r.select(".label");l&&s.append((function(){return l.node()}))}}}))};e.default={setConf:b,addVertices:_,addEdges:w,getClasses:x,draw:k}},"./src/diagrams/flowchart/parser/flow.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,9],n=[1,7],r=[1,6],i=[1,8],a=[1,20,21,22,23,38,47,76,77,78,79,80,81,95,96,99,100,101,103,104,110,111,112,113,114,115,116,117,118,119],o=[2,10],s=[1,20],c=[1,21],l=[1,22],u=[1,23],h=[1,30],d=[1,59],f=[1,33],p=[1,34],g=[1,35],y=[1,36],m=[1,37],v=[1,53],b=[1,48],_=[1,50],w=[1,45],x=[1,49],k=[1,52],C=[1,56],T=[1,57],E=[1,38],S=[1,39],O=[1,40],A=[1,41],M=[1,58],D=[1,47],j=[1,51],N=[1,54],B=[1,55],L=[1,46],R=[1,62],I=[1,67],F=[1,20,21,22,23,38,42,47,76,77,78,79,80,81,95,96,99,100,101,103,104,110,111,112,113,114,115,116,117,118,119],P=[1,71],Y=[1,70],z=[1,72],U=[20,21,23,70,71],$=[1,93],W=[1,98],q=[1,95],H=[1,100],V=[1,103],G=[1,101],X=[1,102],Z=[1,96],Q=[1,108],K=[1,107],J=[1,97],tt=[1,99],et=[1,104],nt=[1,105],rt=[1,106],it=[1,109],at=[20,21,22,23,70,71],ot=[20,21,22,23,48,70,71],st=[20,21,22,23,40,47,48,50,52,54,56,58,60,62,63,65,70,71,81,95,96,99,100,101,103,104,114,115,116,117,118,119],ct=[20,21,23],lt=[20,21,23,47,70,71,81,95,96,99,100,101,103,104,114,115,116,117,118,119],ut=[1,12,20,21,22,23,24,38,42,47,76,77,78,79,80,81,95,96,99,100,101,103,104,110,111,112,113,114,115,116,117,118,119],ht=[47,81,95,96,99,100,101,103,104,114,115,116,117,118,119],dt=[1,141],ft=[1,149],pt=[1,150],gt=[1,151],yt=[1,152],mt=[1,136],vt=[1,137],bt=[1,133],_t=[1,144],wt=[1,145],xt=[1,146],kt=[1,147],Ct=[1,148],Tt=[1,153],Et=[1,154],St=[1,139],Ot=[1,142],At=[1,138],Mt=[1,135],Dt=[20,21,22,23,38,42,47,76,77,78,79,80,81,95,96,99,100,101,103,104,110,111,112,113,114,115,116,117,118,119],jt=[1,157],Nt=[20,21,22,23,26,47,81,95,96,99,100,101,103,104,114,115,116,117,118,119],Bt=[20,21,22,23,24,26,38,40,41,42,47,51,53,55,57,59,61,62,64,66,70,71,72,76,77,78,79,80,81,82,85,95,96,99,100,101,103,104,105,106,114,115,116,117,118,119],Lt=[12,21,22,24],Rt=[22,96],It=[1,238],Ft=[1,242],Pt=[1,239],Yt=[1,236],zt=[1,233],Ut=[1,234],$t=[1,235],Wt=[1,237],qt=[1,240],Ht=[1,241],Vt=[1,243],Gt=[1,260],Xt=[20,21,23,96],Zt=[20,21,22,23,76,92,95,96,99,100,101,102,103,104,105],Qt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,link:44,node:45,vertex:46,AMP:47,STYLE_SEPARATOR:48,idString:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,CYLINDERSTART:58,CYLINDEREND:59,DIAMOND_START:60,DIAMOND_STOP:61,TAGEND:62,TRAPSTART:63,TRAPEND:64,INVTRAPSTART:65,INVTRAPEND:66,linkStatement:67,arrowText:68,TESTSTR:69,START_LINK:70,LINK:71,PIPE:72,textToken:73,STR:74,keywords:75,STYLE:76,LINKSTYLE:77,CLASSDEF:78,CLASS:79,CLICK:80,DOWN:81,UP:82,textNoTags:83,textNoTagsToken:84,DEFAULT:85,stylesOpt:86,alphaNum:87,CALLBACKNAME:88,CALLBACKARGS:89,HREF:90,LINK_TARGET:91,HEX:92,numList:93,INTERPOLATE:94,NUM:95,COMMA:96,style:97,styleComponent:98,ALPHA:99,COLON:100,MINUS:101,UNIT:102,BRKT:103,DOT:104,PCT:105,TAGSTART:106,alphaNumToken:107,idStringToken:108,alphaNumStatement:109,direction_tb:110,direction_bt:111,direction_rl:112,direction_lr:113,PUNCTUATION:114,UNICODE_TEXT:115,PLUS:116,EQUALS:117,MULT:118,UNDERSCORE:119,graphCodeTokens:120,ARROW_CROSS:121,ARROW_POINT:122,ARROW_CIRCLE:123,ARROW_OPEN:124,QUOTE:125,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",47:"AMP",48:"STYLE_SEPARATOR",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"CYLINDERSTART",59:"CYLINDEREND",60:"DIAMOND_START",61:"DIAMOND_STOP",62:"TAGEND",63:"TRAPSTART",64:"TRAPEND",65:"INVTRAPSTART",66:"INVTRAPEND",69:"TESTSTR",70:"START_LINK",71:"LINK",72:"PIPE",74:"STR",76:"STYLE",77:"LINKSTYLE",78:"CLASSDEF",79:"CLASS",80:"CLICK",81:"DOWN",82:"UP",85:"DEFAULT",88:"CALLBACKNAME",89:"CALLBACKARGS",90:"HREF",91:"LINK_TARGET",92:"HEX",94:"INTERPOLATE",95:"NUM",96:"COMMA",99:"ALPHA",100:"COLON",101:"MINUS",102:"UNIT",103:"BRKT",104:"DOT",105:"PCT",106:"TAGSTART",110:"direction_tb",111:"direction_bt",112:"direction_rl",113:"direction_lr",114:"PUNCTUATION",115:"UNICODE_TEXT",116:"PLUS",117:"EQUALS",118:"MULT",119:"UNDERSCORE",121:"ARROW_CROSS",122:"ARROW_POINT",123:"ARROW_CIRCLE",124:"ARROW_OPEN",125:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[45,1],[45,5],[45,3],[46,4],[46,6],[46,4],[46,4],[46,4],[46,4],[46,4],[46,4],[46,6],[46,4],[46,4],[46,4],[46,4],[46,4],[46,1],[44,2],[44,3],[44,3],[44,1],[44,3],[67,1],[68,3],[39,1],[39,2],[39,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[83,1],[83,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[93,1],[93,3],[86,1],[86,3],[97,1],[97,2],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[84,1],[84,1],[84,1],[84,1],[49,1],[49,2],[87,1],[87,2],[109,1],[109,1],[109,1],[109,1],[43,1],[43,1],[43,1],[43,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(a[s],"type_directive");break;case 7:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:a[s]!==[]&&a[s-1].push(a[s]),this.$=a[s-1];break;case 12:case 77:case 79:case 91:case 147:case 149:case 150:this.$=a[s];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(a[s-1]),this.$=a[s-1];break;case 35:this.$=a[s-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 42:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 43:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 48:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 49:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 50:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 51:this.$={stmt:a[s],nodes:a[s]};break;case 52:this.$=[a[s]];break;case 53:this.$=a[s-4].concat(a[s]);break;case 54:this.$=[a[s-2]],r.setClass(a[s-2],a[s]);break;case 55:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"square");break;case 56:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"circle");break;case 57:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"ellipse");break;case 58:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"stadium");break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"subroutine");break;case 60:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"cylinder");break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"round");break;case 62:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"diamond");break;case 63:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"hexagon");break;case 64:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"odd");break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"trapezoid");break;case 66:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"inv_trapezoid");break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_right");break;case 68:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_left");break;case 69:this.$=a[s],r.addVertex(a[s]);break;case 70:a[s-1].text=a[s],this.$=a[s-1];break;case 71:case 72:a[s-2].text=a[s-1],this.$=a[s-2];break;case 73:this.$=a[s];break;case 74:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 75:c=r.destructLink(a[s]),this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 76:this.$=a[s-1];break;case 78:case 92:case 148:this.$=a[s-1]+""+a[s];break;case 93:case 94:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 95:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 96:case 104:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 97:case 105:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 98:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 99:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 100:case 106:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 101:case 107:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 102:case 108:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 103:case 109:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 110:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 111:case 113:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 112:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 114:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 115:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 116:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 117:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 118:case 120:this.$=[a[s]];break;case 119:case 121:a[s-2].push(a[s]),this.$=a[s-2];break;case 123:this.$=a[s-1]+a[s];break;case 145:this.$=a[s];break;case 146:this.$=a[s-1]+""+a[s];break;case 151:this.$="v";break;case 152:this.$="-";break;case 153:this.$={stmt:"dir",value:"TB"};break;case 154:this.$={stmt:"dir",value:"BT"};break;case 155:this.$={stmt:"dir",value:"RL"};break;case 156:this.$={stmt:"dir",value:"LR"}}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},t(a,o,{17:11}),{7:12,13:[1,13]},{16:14,21:n,22:r,24:i},{16:15,21:n,22:r,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:h,43:31,45:32,46:42,47:d,49:43,76:f,77:p,78:g,79:y,80:m,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,108:44,110:E,111:S,112:O,113:A,114:M,115:D,116:j,117:N,118:B,119:L},{8:60,10:[1,61],15:R},t([10,15],[2,6]),t(a,[2,17]),t(a,[2,18]),t(a,[2,19]),{20:[1,64],21:[1,65],22:I,27:63,30:66},t(F,[2,11]),t(F,[2,12]),t(F,[2,13]),t(F,[2,14]),t(F,[2,15]),t(F,[2,16]),{9:68,20:P,21:Y,23:z,44:69,67:73,70:[1,74],71:[1,75]},{9:76,20:P,21:Y,23:z},{9:77,20:P,21:Y,23:z},{9:78,20:P,21:Y,23:z},{9:79,20:P,21:Y,23:z},{9:80,20:P,21:Y,23:z},{9:82,20:P,21:Y,22:[1,81],23:z},t(F,[2,44]),t(U,[2,51],{30:83,22:I}),{22:[1,84]},{22:[1,85]},{22:[1,86]},{22:[1,87]},{26:$,47:W,74:[1,91],81:q,87:90,88:[1,88],90:[1,89],95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:92,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(F,[2,153]),t(F,[2,154]),t(F,[2,155]),t(F,[2,156]),t(at,[2,52],{48:[1,110]}),t(ot,[2,69],{108:121,40:[1,111],47:d,50:[1,112],52:[1,113],54:[1,114],56:[1,115],58:[1,116],60:[1,117],62:[1,118],63:[1,119],65:[1,120],81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,114:M,115:D,116:j,117:N,118:B,119:L}),t(st,[2,145]),t(st,[2,170]),t(st,[2,171]),t(st,[2,172]),t(st,[2,173]),t(st,[2,174]),t(st,[2,175]),t(st,[2,176]),t(st,[2,177]),t(st,[2,178]),t(st,[2,179]),t(st,[2,180]),t(st,[2,181]),t(st,[2,182]),t(st,[2,183]),t(st,[2,184]),{9:122,20:P,21:Y,23:z},{11:123,14:[1,124]},t(ct,[2,8]),t(a,[2,20]),t(a,[2,26]),t(a,[2,27]),{21:[1,125]},t(lt,[2,34],{30:126,22:I}),t(F,[2,35]),{45:127,46:42,47:d,49:43,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,108:44,114:M,115:D,116:j,117:N,118:B,119:L},t(ut,[2,45]),t(ut,[2,46]),t(ut,[2,47]),t(ht,[2,73],{68:128,69:[1,129],72:[1,130]}),{22:dt,24:ft,26:pt,38:gt,39:131,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t([47,69,72,81,95,96,99,100,101,103,104,114,115,116,117,118,119],[2,75]),t(F,[2,36]),t(F,[2,37]),t(F,[2,38]),t(F,[2,39]),t(F,[2,40]),{22:dt,24:ft,26:pt,38:gt,39:155,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(Dt,o,{17:156}),t(U,[2,50],{47:jt}),{26:$,47:W,81:q,87:158,92:[1,159],95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:92,114:J,115:tt,116:et,117:nt,118:rt,119:it},{85:[1,160],93:161,95:[1,162]},{26:$,47:W,81:q,85:[1,163],87:164,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:92,114:J,115:tt,116:et,117:nt,118:rt,119:it},{26:$,47:W,81:q,87:165,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:92,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(ct,[2,96],{22:[1,166],89:[1,167]}),t(ct,[2,100],{22:[1,168]}),t(ct,[2,104],{107:94,109:170,22:[1,169],26:$,47:W,81:q,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,114:J,115:tt,116:et,117:nt,118:rt,119:it}),t(ct,[2,106],{22:[1,171]}),t(Nt,[2,147]),t(Nt,[2,149]),t(Nt,[2,150]),t(Nt,[2,151]),t(Nt,[2,152]),t(Bt,[2,157]),t(Bt,[2,158]),t(Bt,[2,159]),t(Bt,[2,160]),t(Bt,[2,161]),t(Bt,[2,162]),t(Bt,[2,163]),t(Bt,[2,164]),t(Bt,[2,165]),t(Bt,[2,166]),t(Bt,[2,167]),t(Bt,[2,168]),t(Bt,[2,169]),{47:d,49:172,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,108:44,114:M,115:D,116:j,117:N,118:B,119:L},{22:dt,24:ft,26:pt,38:gt,39:173,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:175,42:yt,47:W,50:[1,174],62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:176,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:177,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:178,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:179,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:180,42:yt,47:W,60:[1,181],62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:182,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:183,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:184,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(st,[2,146]),t(Lt,[2,3]),{8:185,15:R},{15:[2,7]},t(a,[2,28]),t(lt,[2,33]),t(U,[2,48],{30:186,22:I}),t(ht,[2,70],{22:[1,187]}),{22:[1,188]},{22:dt,24:ft,26:pt,38:gt,39:189,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,62:mt,70:vt,71:[1,190],73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(Bt,[2,77]),t(Bt,[2,79]),t(Bt,[2,135]),t(Bt,[2,136]),t(Bt,[2,137]),t(Bt,[2,138]),t(Bt,[2,139]),t(Bt,[2,140]),t(Bt,[2,141]),t(Bt,[2,142]),t(Bt,[2,143]),t(Bt,[2,144]),t(Bt,[2,80]),t(Bt,[2,81]),t(Bt,[2,82]),t(Bt,[2,83]),t(Bt,[2,84]),t(Bt,[2,85]),t(Bt,[2,86]),t(Bt,[2,87]),t(Bt,[2,88]),t(Bt,[2,89]),t(Bt,[2,90]),{9:193,20:P,21:Y,22:dt,23:z,24:ft,26:pt,38:gt,40:[1,192],42:yt,47:W,62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,194],43:31,45:32,46:42,47:d,49:43,76:f,77:p,78:g,79:y,80:m,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,108:44,110:E,111:S,112:O,113:A,114:M,115:D,116:j,117:N,118:B,119:L},{22:I,30:195},{22:[1,196],26:$,47:W,81:q,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:170,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:[1,197]},{22:[1,198]},{22:[1,199],96:[1,200]},t(Rt,[2,118]),{22:[1,201]},{22:[1,202],26:$,47:W,81:q,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:170,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:[1,203],26:$,47:W,81:q,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:170,114:J,115:tt,116:et,117:nt,118:rt,119:it},{74:[1,204]},t(ct,[2,98],{22:[1,205]}),{74:[1,206],91:[1,207]},{74:[1,208]},t(Nt,[2,148]),{74:[1,209],91:[1,210]},t(at,[2,54],{108:121,47:d,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,114:M,115:D,116:j,117:N,118:B,119:L}),{22:dt,24:ft,26:pt,38:gt,41:[1,211],42:yt,47:W,62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:212,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,51:[1,213],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,53:[1,214],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,55:[1,215],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,57:[1,216],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,59:[1,217],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,61:[1,218],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:219,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,41:[1,220],42:yt,47:W,62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,62:mt,64:[1,221],66:[1,222],70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,62:mt,64:[1,224],66:[1,223],70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{9:225,20:P,21:Y,23:z},t(U,[2,49],{47:jt}),t(ht,[2,72]),t(ht,[2,71]),{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,62:mt,70:vt,72:[1,226],73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(ht,[2,74]),t(Bt,[2,78]),{22:dt,24:ft,26:pt,38:gt,39:227,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(Dt,o,{17:228}),t(F,[2,43]),{46:229,47:d,49:43,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,108:44,114:M,115:D,116:j,117:N,118:B,119:L},{22:It,76:Ft,86:230,92:Pt,95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},{22:It,76:Ft,86:244,92:Pt,95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},{22:It,76:Ft,86:245,92:Pt,94:[1,246],95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},{22:It,76:Ft,86:247,92:Pt,94:[1,248],95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},{95:[1,249]},{22:It,76:Ft,86:250,92:Pt,95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},{22:It,76:Ft,86:251,92:Pt,95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},{26:$,47:W,81:q,87:252,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:92,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(ct,[2,97]),{74:[1,253]},t(ct,[2,101],{22:[1,254]}),t(ct,[2,102]),t(ct,[2,105]),t(ct,[2,107],{22:[1,255]}),t(ct,[2,108]),t(ot,[2,55]),{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,51:[1,256],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(ot,[2,61]),t(ot,[2,57]),t(ot,[2,58]),t(ot,[2,59]),t(ot,[2,60]),t(ot,[2,62]),{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,61:[1,257],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(ot,[2,64]),t(ot,[2,65]),t(ot,[2,67]),t(ot,[2,66]),t(ot,[2,68]),t(Lt,[2,4]),t([22,47,81,95,96,99,100,101,103,104,114,115,116,117,118,119],[2,76]),{22:dt,24:ft,26:pt,38:gt,41:[1,258],42:yt,47:W,62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,259],43:31,45:32,46:42,47:d,49:43,76:f,77:p,78:g,79:y,80:m,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,108:44,110:E,111:S,112:O,113:A,114:M,115:D,116:j,117:N,118:B,119:L},t(at,[2,53]),t(ct,[2,110],{96:Gt}),t(Xt,[2,120],{98:261,22:It,76:Ft,92:Pt,95:Yt,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt}),t(Zt,[2,122]),t(Zt,[2,124]),t(Zt,[2,125]),t(Zt,[2,126]),t(Zt,[2,127]),t(Zt,[2,128]),t(Zt,[2,129]),t(Zt,[2,130]),t(Zt,[2,131]),t(Zt,[2,132]),t(Zt,[2,133]),t(Zt,[2,134]),t(ct,[2,111],{96:Gt}),t(ct,[2,112],{96:Gt}),{22:[1,262]},t(ct,[2,113],{96:Gt}),{22:[1,263]},t(Rt,[2,119]),t(ct,[2,93],{96:Gt}),t(ct,[2,94],{96:Gt}),t(ct,[2,95],{107:94,109:170,26:$,47:W,81:q,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,114:J,115:tt,116:et,117:nt,118:rt,119:it}),t(ct,[2,99]),{91:[1,264]},{91:[1,265]},{51:[1,266]},{61:[1,267]},{9:268,20:P,21:Y,23:z},t(F,[2,42]),{22:It,76:Ft,92:Pt,95:Yt,97:269,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},t(Zt,[2,123]),{26:$,47:W,81:q,87:270,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:92,114:J,115:tt,116:et,117:nt,118:rt,119:it},{26:$,47:W,81:q,87:271,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:92,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(ct,[2,103]),t(ct,[2,109]),t(ot,[2,56]),t(ot,[2,63]),t(Dt,o,{17:272}),t(Xt,[2,121],{98:261,22:It,76:Ft,92:Pt,95:Yt,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt}),t(ct,[2,116],{107:94,109:170,22:[1,273],26:$,47:W,81:q,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,114:J,115:tt,116:et,117:nt,118:rt,119:it}),t(ct,[2,117],{107:94,109:170,22:[1,274],26:$,47:W,81:q,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,114:J,115:tt,116:et,117:nt,118:rt,119:it}),{18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,275],43:31,45:32,46:42,47:d,49:43,76:f,77:p,78:g,79:y,80:m,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,108:44,110:E,111:S,112:O,113:A,114:M,115:D,116:j,117:N,118:B,119:L},{22:It,76:Ft,86:276,92:Pt,95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},{22:It,76:Ft,86:277,92:Pt,95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},t(F,[2,41]),t(ct,[2,114],{96:Gt}),t(ct,[2,115],{96:Gt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],124:[2,7]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},Kt={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:this.begin("string");break;case 8:this.popState();break;case 9:return"STR";case 10:return 76;case 11:return 85;case 12:return 77;case 13:return 94;case 14:return 78;case 15:return 79;case 16:this.begin("href");break;case 17:this.popState();break;case 18:return 90;case 19:this.begin("callbackname");break;case 20:this.popState();break;case 21:this.popState(),this.begin("callbackargs");break;case 22:return 88;case 23:this.popState();break;case 24:return 89;case 25:this.begin("click");break;case 26:this.popState();break;case 27:return 80;case 28:case 29:return t.lex.firstGraph()&&this.begin("dir"),24;case 30:return 38;case 31:return 42;case 32:case 33:case 34:case 35:return 91;case 36:return this.popState(),25;case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:return this.popState(),26;case 47:return 110;case 48:return 111;case 49:return 112;case 50:return 113;case 51:return 95;case 52:return 103;case 53:return 48;case 54:return 100;case 55:return 47;case 56:return 20;case 57:return 96;case 58:return 118;case 59:case 60:case 61:return 71;case 62:case 63:case 64:return 70;case 65:return 52;case 66:return 53;case 67:return 54;case 68:return 55;case 69:return 56;case 70:return 57;case 71:return 58;case 72:return 59;case 73:return 101;case 74:return 104;case 75:return 119;case 76:return 116;case 77:return 105;case 78:case 79:return 117;case 80:return 106;case 81:return 62;case 82:return 82;case 83:return"SEP";case 84:return 81;case 85:return 99;case 86:return 64;case 87:return 63;case 88:return 66;case 89:return 65;case 90:return 114;case 91:return 115;case 92:return 72;case 93:return 50;case 94:return 51;case 95:return 40;case 96:return 41;case 97:return 60;case 98:return 61;case 99:return 125;case 100:return 21;case 101:return 22;case 102:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\()/,/^(?:\)\])/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[23,24],inclusive:!1},callbackname:{rules:[20,21,22],inclusive:!1},href:{rules:[17,18],inclusive:!1},click:{rules:[26,27],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[36,37,38,39,40,41,42,43,44,45,46],inclusive:!1},string:{rules:[8,9],inclusive:!1},INITIAL:{rules:[0,5,6,7,10,11,12,13,14,15,16,19,25,28,29,30,31,32,33,34,35,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102],inclusive:!0}}};function Jt(){this.yy={}}return Qt.lexer=Kt,Jt.prototype=Qt,Qt.Parser=Jt,new Jt}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/flowchart/styles.js":function(t,e,n){n.r(e),e.default=function(t){return".label {\n font-family: ".concat(t.fontFamily,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n .cluster-label text {\n fill: ").concat(t.titleColor,";\n }\n .cluster-label span {\n color: ").concat(t.titleColor,";\n }\n\n .label text,span {\n fill: ").concat(t.nodeTextColor||t.textColor,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n background-color: ").concat(t.edgeLabelBackground,";\n fill: ").concat(t.edgeLabelBackground,";\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(t.clusterBkg,";\n stroke: ").concat(t.clusterBorder,";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n .cluster span {\n color: ").concat(t.titleColor,";\n }\n // .cluster div {\n // color: ").concat(t.titleColor,";\n // }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(t.fontFamily,";\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n")}},"./src/diagrams/gantt/ganttDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return S})),n.d(e,"clear",(function(){return O})),n.d(e,"setAxisFormat",(function(){return A})),n.d(e,"getAxisFormat",(function(){return M})),n.d(e,"setTodayMarker",(function(){return D})),n.d(e,"getTodayMarker",(function(){return j})),n.d(e,"setDateFormat",(function(){return N})),n.d(e,"enableInclusiveEndDates",(function(){return B})),n.d(e,"endDatesAreInclusive",(function(){return L})),n.d(e,"enableTopAxis",(function(){return R})),n.d(e,"topAxisEnabled",(function(){return I})),n.d(e,"getDateFormat",(function(){return F})),n.d(e,"setExcludes",(function(){return P})),n.d(e,"getExcludes",(function(){return Y})),n.d(e,"setTitle",(function(){return z})),n.d(e,"getTitle",(function(){return U})),n.d(e,"addSection",(function(){return $})),n.d(e,"getSections",(function(){return W})),n.d(e,"getTasks",(function(){return q})),n.d(e,"addTask",(function(){return nt})),n.d(e,"findTaskById",(function(){return rt})),n.d(e,"addTaskOrg",(function(){return it})),n.d(e,"setLink",(function(){return ot})),n.d(e,"setClass",(function(){return st})),n.d(e,"setClickEvent",(function(){return lt})),n.d(e,"bindFunctions",(function(){return ut}));var r=n("moment-mini"),i=n.n(r),a=n("@braintree/sanitize-url"),o=n("./src/logger.js"),s=n("./src/config.js"),c=n("./src/utils.js"),l=n("./src/mermaidAPI.js");function u(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var d,f,p="",g="",y="",m=[],v="",b=[],_=[],w="",x=["active","done","crit","milestone"],k=[],C=!1,T=!1,E=0,S=function(t,e,n){l.default.parseDirective(this,t,e,n)},O=function(){b=[],_=[],w="",k=[],v="",K=0,d=void 0,f=void 0,tt=[],p="",g="",y="",m=[],C=!1,T=!1,E=0},A=function(t){g=t},M=function(){return g},D=function(t){y=t},j=function(){return y},N=function(t){p=t},B=function(){C=!0},L=function(){return C},R=function(){T=!0},I=function(){return T},F=function(){return p},P=function(t){m=t.toLowerCase().split(/[\s,]+/)},Y=function(){return m},z=function(t){v=t},U=function(){return v},$=function(t){w=t,b.push(t)},W=function(){return b},q=function(){for(var t=at(),e=0;!t&&e<10;)t=at(),e++;return _=tt},H=function(t,e,n){return t.isoWeekday()>=6&&n.indexOf("weekends")>=0||n.indexOf(t.format("dddd").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0},V=function(t,e,n){if(n.length&&!t.manualEndTime){var r=i()(t.startTime,e,!0);r.add(1,"d");var a=i()(t.endTime,e,!0),o=G(r,a,e,n);t.endTime=a.toDate(),t.renderEndTime=o}},G=function(t,e,n,r){for(var i=!1,a=null;t<=e;)i||(a=e.toDate()),(i=H(t,n,r))&&e.add(1,"d"),t.add(1,"d");return a},X=function(t,e,n){n=n.trim();var r=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==r){var a=null;if(r[1].split(" ").forEach((function(t){var e=rt(t);void 0!==e&&(a?e.endTime>a.endTime&&(a=e):a=e)})),a)return a.endTime;var s=new Date;return s.setHours(0,0,0,0),s}var c=i()(n,e.trim(),!0);return c.isValid()?c.toDate():(o.log.debug("Invalid date:"+n),o.log.debug("With date format:"+e.trim()),new Date)},Z=function(t,e){if(null!==t)switch(t[2]){case"s":e.add(t[1],"seconds");break;case"m":e.add(t[1],"minutes");break;case"h":e.add(t[1],"hours");break;case"d":e.add(t[1],"days");break;case"w":e.add(t[1],"weeks")}return e.toDate()},Q=function(t,e,n,r){r=r||!1,n=n.trim();var a=i()(n,e.trim(),!0);return a.isValid()?(r&&a.add(1,"d"),a.toDate()):Z(/^([\d]+)([wdhms])/.exec(n.trim()),i()(t))},K=0,J=function(t){return void 0===t?"task"+(K+=1):t},tt=[],et={},nt=function(t,e){var n={section:w,type:w,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};ht(n,r,x);for(var i=0;i<n.length;i++)n[i]=n[i].trim();switch(n.length){case 1:r.id=J(),r.startTime={type:"prevTaskEnd",id:t},r.endTime={data:n[0]};break;case 2:r.id=J(),r.startTime={type:"getStartDate",startData:n[0]},r.endTime={data:n[1]};break;case 3:r.id=J(n[0]),r.startTime={type:"getStartDate",startData:n[1]},r.endTime={data:n[2]}}return r}(f,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=f,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.order=E,E++;var i=tt.push(n);f=n.id,et[n.id]=i-1},rt=function(t){var e=et[t];return tt[e]},it=function(t,e){var n={section:w,type:w,description:t,task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};ht(n,r,x);for(var a=0;a<n.length;a++)n[a]=n[a].trim();var o="";switch(n.length){case 1:r.id=J(),r.startTime=t.endTime,o=n[0];break;case 2:r.id=J(),r.startTime=X(0,p,n[0]),o=n[1];break;case 3:r.id=J(n[0]),r.startTime=X(0,p,n[1]),o=n[2]}return o&&(r.endTime=Q(r.startTime,p,o,C),r.manualEndTime=i()(o,"YYYY-MM-DD",!0).isValid(),V(r,p,m)),r}(d,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,d=n,_.push(n)},at=function(){for(var t=function(t){var e=tt[t],n="";switch(tt[t].raw.startTime.type){case"prevTaskEnd":var r=rt(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(n=X(0,p,tt[t].raw.startTime.startData))&&(tt[t].startTime=n)}return tt[t].startTime&&(tt[t].endTime=Q(tt[t].startTime,p,tt[t].raw.endTime.data,C),tt[t].endTime&&(tt[t].processed=!0,tt[t].manualEndTime=i()(tt[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),V(tt[t],p,m))),tt[t].processed},e=!0,n=0;n<tt.length;n++)t(n),e=e&&tt[n].processed;return e},ot=function(t,e){var n=e;"loose"!==s.getConfig().securityLevel&&(n=Object(a.sanitizeUrl)(e)),t.split(",").forEach((function(t){void 0!==rt(t)&&ct(t,(function(){window.open(n,"_self")}))})),st(t,"clickable")},st=function(t,e){t.split(",").forEach((function(t){var n=rt(t);void 0!==n&&n.classes.push(e)}))},ct=function(t,e){k.push((function(){var n=document.querySelector('[id="'.concat(t,'"]'));null!==n&&n.addEventListener("click",(function(){e()}))})),k.push((function(){var n=document.querySelector('[id="'.concat(t,'-text"]'));null!==n&&n.addEventListener("click",(function(){e()}))}))},lt=function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"===s.getConfig().securityLevel&&void 0!==e){var r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var i=0;i<r.length;i++){var a=r[i].trim();'"'===a.charAt(0)&&'"'===a.charAt(a.length-1)&&(a=a.substr(1,a.length-2)),r[i]=a}}0===r.length&&r.push(t),void 0!==rt(t)&&ct(t,(function(){c.default.runFunc.apply(c.default,[e].concat(u(r)))}))}}(t,e,n)})),st(t,"clickable")},ut=function(t){k.forEach((function(e){e(t)}))};function ht(t,e,n){for(var r=!0;r;)r=!1,n.forEach((function(n){var i=new RegExp("^\\s*"+n+"\\s*$");t[0].match(i)&&(e[n]=!0,t.shift(1),r=!0)}))}e.default={parseDirective:S,getConfig:function(){return s.getConfig().gantt},clear:O,setDateFormat:N,getDateFormat:F,enableInclusiveEndDates:B,endDatesAreInclusive:L,enableTopAxis:R,topAxisEnabled:I,setAxisFormat:A,getAxisFormat:M,setTodayMarker:D,getTodayMarker:j,setTitle:z,getTitle:U,addSection:$,getSections:W,getTasks:q,addTask:nt,findTaskById:rt,addTaskOrg:it,setExcludes:P,getExcludes:Y,setClickEvent:lt,setLink:ot,bindFunctions:ut,durationToDate:Z}},"./src/diagrams/gantt/ganttRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return u})),n.d(e,"draw",(function(){return h}));var r=n("d3"),i=n("./src/diagrams/gantt/parser/gantt.jison"),a=n("./src/diagrams/common/common.js"),o=n("./src/diagrams/gantt/ganttDb.js"),s=n("./src/config.js"),c=n("./src/utils.js");i.parser.yy=o.default;var l,u=function(){},h=function(t,e){var n=Object(s.getConfig)().gantt;i.parser.yy.clear(),i.parser.parse(t);var u=document.getElementById(e);void 0===(l=u.parentElement.offsetWidth)&&(l=1200),void 0!==n.useWidth&&(l=n.useWidth);var h=i.parser.yy.getTasks(),d=h.length*(n.barHeight+n.barGap)+2*n.topPadding;u.setAttribute("viewBox","0 0 "+l+" "+d);for(var f=Object(r.select)('[id="'.concat(e,'"]')),p=Object(r.scaleTime)().domain([Object(r.min)(h,(function(t){return t.startTime})),Object(r.max)(h,(function(t){return t.endTime}))]).rangeRound([0,l-n.leftPadding-n.rightPadding]),g=[],y=0;y<h.length;y++)g.push(h[y].type);var m,v,b,_,w,x,k,C=g;function T(t,e){return function(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}(e)[t]||0}g=function(t){for(var e={},n=[],r=0,i=t.length;r<i;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}(g),h.sort((function(t,e){var n=t.startTime,r=e.startTime,i=0;return n>r?i=1:n<r&&(i=-1),i})),m=h,v=l,b=d,_=n.barHeight,w=_+n.barGap,x=n.topPadding,k=n.leftPadding,Object(r.scaleLinear)().domain([0,g.length]).range(["#00B9FA","#F95002"]).interpolate(r.interpolateHcl),function(t,e,a,s){var c=Object(r.axisBottom)(p).tickSize(-s+e+n.gridLineStartPadding).tickFormat(Object(r.timeFormat)(i.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));if(f.append("g").attr("class","grid").attr("transform","translate("+t+", "+(s-50)+")").call(c).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),o.default.topAxisEnabled()||n.topAxis){var l=Object(r.axisTop)(p).tickSize(-s+e+n.gridLineStartPadding).tickFormat(Object(r.timeFormat)(i.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));f.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(l).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}(k,x,0,b),function(t,e,r,i,a,o,s){f.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,n){return t.order*e+r-2})).attr("width",(function(){return s-n.rightPadding/2})).attr("height",e).attr("class",(function(t){for(var e=0;e<g.length;e++)if(t.type===g[e])return"section section"+e%n.numberSectionStyles;return"section section0"}));var c=f.append("g").selectAll("rect").data(t).enter();c.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?p(t.startTime)+i+.5*(p(t.endTime)-p(t.startTime))-.5*a:p(t.startTime)+i})).attr("y",(function(t,n){return t.order*e+r})).attr("width",(function(t){return t.milestone?a:p(t.renderEndTime||t.endTime)-p(t.startTime)})).attr("height",a).attr("transform-origin",(function(t,n){return n=t.order,(p(t.startTime)+i+.5*(p(t.endTime)-p(t.startTime))).toString()+"px "+(n*e+r+.5*a).toString()+"px"})).attr("class",(function(t){var e="task",r="";t.classes.length>0&&(r=t.classes.join(" "));for(var i=0,a=0;a<g.length;a++)t.type===g[a]&&(i=a%n.numberSectionStyles);var o="";return t.active?t.crit?o+=" activeCrit":o=" active":t.done?o=t.crit?" doneCrit":" done":t.crit&&(o+=" crit"),0===o.length&&(o=" task"),t.milestone&&(o=" milestone "+o),o+=i,e+(o+=" "+r)})),c.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",n.fontSize).attr("x",(function(t){var e=p(t.startTime),r=p(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(p(t.endTime)-p(t.startTime))-.5*a),t.milestone&&(r=e+a);var o=this.getBBox().width;return o>r-e?r+o+1.5*n.leftPadding>s?e+i-5:r+i+5:(r-e)/2+e+i})).attr("y",(function(t,i){return t.order*e+n.barHeight/2+(n.fontSize/2-2)+r})).attr("text-height",a).attr("class",(function(t){var e=p(t.startTime),r=p(t.endTime);t.milestone&&(r=e+a);var i=this.getBBox().width,o="";t.classes.length>0&&(o=t.classes.join(" "));for(var c=0,l=0;l<g.length;l++)t.type===g[l]&&(c=l%n.numberSectionStyles);var u="";return t.active&&(u=t.crit?"activeCritText"+c:"activeText"+c),t.done?u=t.crit?u+" doneCritText"+c:u+" doneText"+c:t.crit&&(u=u+" critText"+c),t.milestone&&(u+=" milestoneText"),i>r-e?r+i+1.5*n.leftPadding>s?o+" taskTextOutsideLeft taskTextOutside"+c+" "+u:o+" taskTextOutsideRight taskTextOutside"+c+" "+u+" width-"+i:o+" taskText taskText"+c+" "+u+" width-"+i}))}(m,w,x,k,_,0,v),function(t,e){for(var r=[],i=0,o=0;o<g.length;o++)r[o]=[g[o],T(g[o],C)];f.append("g").selectAll("text").data(r).enter().append((function(t){var e=t[0].split(a.default.lineBreakRegex),n=-(e.length-1)/2,r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("dy",n+"em");for(var i=0;i<e.length;i++){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttribute("alignment-baseline","central"),o.setAttribute("x","10"),i>0&&o.setAttribute("dy","1em"),o.textContent=e[i],r.appendChild(o)}return r})).attr("x",10).attr("y",(function(n,a){if(!(a>0))return n[1]*t/2+e;for(var o=0;o<a;o++)return i+=r[a-1][1],n[1]*t/2+i*t+e})).attr("font-size",n.sectionFontSize).attr("font-size",n.sectionFontSize).attr("class",(function(t){for(var e=0;e<g.length;e++)if(t[0]===g[e])return"sectionTitle sectionTitle"+e%n.numberSectionStyles;return"sectionTitle"}))}(w,x),function(t,e,r,i){var a=o.default.getTodayMarker();if("off"!==a){var s=f.append("g").attr("class","today"),c=new Date,l=s.append("line");l.attr("x1",p(c)+t).attr("x2",p(c)+t).attr("y1",n.titleTopMargin).attr("y2",i-n.titleTopMargin).attr("class","today"),""!==a&&l.attr("style",a.replace(/,/g,";"))}}(k,0,0,b),Object(c.configureSvgSize)(f,d,l,n.useMaxWidth),f.append("text").text(i.parser.yy.getTitle()).attr("x",l/2).attr("y",n.titleTopMargin).attr("class","titleText")};e.default={setConf:u,draw:h}},"./src/diagrams/gantt/parser/gantt.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[7,9,11,12,13,14,15,16,17,18,19,21,28,33],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],l=[1,20],u=[1,21],h=[1,22],d=[1,24],f=[1,26],p=[1,29],g=[5,7,9,11,12,13,14,15,16,17,18,19,21,28,33],y={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,excludes:16,todayMarker:17,title:18,section:19,clickStatement:20,taskTxt:21,taskData:22,openDirective:23,typeDirective:24,closeDirective:25,":":26,argDirective:27,click:28,callbackname:29,callbackargs:30,href:31,clickStatementDebug:32,open_directive:33,type_directive:34,arg_directive:35,close_directive:36,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"excludes",17:"todayMarker",18:"title",19:"section",21:"taskTxt",22:"taskData",26:":",28:"click",29:"callbackname",30:"callbackargs",31:"href",33:"open_directive",34:"type_directive",35:"arg_directive",36:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[20,2],[20,3],[20,3],[20,4],[20,3],[20,4],[20,2],[32,2],[32,3],[32,3],[32,4],[32,3],[32,4],[32,2],[23,1],[24,1],[27,1],[25,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 2:return a[s-1];case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 9:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 10:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 11:r.TopAxis(),this.$=a[s].substr(8);break;case 12:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 13:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 14:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 15:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 16:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s-1],a[s]),this.$="task";break;case 22:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 23:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 24:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 25:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 26:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 27:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 28:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 29:case 35:this.$=a[s-1]+" "+a[s];break;case 30:case 31:case 33:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 32:case 34:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s];break;case 36:r.parseDirective("%%{","open_directive");break;case 37:r.parseDirective(a[s],"type_directive");break;case 38:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 39:r.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:e,23:4,33:n},{1:[3]},{3:6,4:2,5:e,23:4,33:n},t(r,[2,3],{6:7}),{24:8,34:[1,9]},{34:[2,36]},{1:[2,1]},{4:25,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:a,14:o,15:s,16:c,17:l,18:u,19:h,20:23,21:d,23:4,28:f,33:n},{25:27,26:[1,28],36:p},t([26,36],[2,37]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:25,10:30,12:i,13:a,14:o,15:s,16:c,17:l,18:u,19:h,20:23,21:d,23:4,28:f,33:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,17]),{22:[1,31]},t(r,[2,19]),{29:[1,32],31:[1,33]},{11:[1,34]},{27:35,35:[1,36]},{11:[2,39]},t(r,[2,5]),t(r,[2,18]),t(r,[2,22],{30:[1,37],31:[1,38]}),t(r,[2,28],{29:[1,39]}),t(g,[2,20]),{25:40,36:p},{36:[2,38]},t(r,[2,23],{31:[1,41]}),t(r,[2,24]),t(r,[2,26],{30:[1,42]}),{11:[1,43]},t(r,[2,25]),t(r,[2,27]),t(g,[2,21])],defaultActions:{5:[2,36],6:[2,1],29:[2,39],36:[2,38]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},m={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),33;case 1:return this.begin("type_directive"),34;case 2:return this.popState(),this.begin("arg_directive"),26;case 3:return this.popState(),this.popState(),36;case 4:return 35;case 5:case 6:case 7:break;case 8:return 11;case 9:case 10:case 11:break;case 12:this.begin("href");break;case 13:this.popState();break;case 14:return 31;case 15:this.begin("callbackname");break;case 16:this.popState();break;case 17:this.popState(),this.begin("callbackargs");break;case 18:return 29;case 19:this.popState();break;case 20:return 30;case 21:this.begin("click");break;case 22:this.popState();break;case 23:return 28;case 24:return 5;case 25:return 12;case 26:return 13;case 27:return 14;case 28:return 15;case 29:return 16;case 30:return 17;case 31:return"date";case 32:return 18;case 33:return 19;case 34:return 21;case 35:return 22;case 36:return 26;case 37:return 7;case 38:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[19,20],inclusive:!1},callbackname:{rules:[16,17,18],inclusive:!1},href:{rules:[13,14],inclusive:!1},click:{rules:[22,23],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,15,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!0}}};function v(){this.yy={}}return y.lexer=m,v.prototype=y,y.Parser=v,new v}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/gantt/styles.js":function(t,e,n){n.r(e),e.default=function(t){return'\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: '.concat(t.sectionBkgColor,";\n }\n\n .section2 {\n fill: ").concat(t.sectionBkgColor2,";\n }\n\n .section1,\n .section3 {\n fill: ").concat(t.altSectionBkgColor,";\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle1 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle2 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle3 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ").concat(t.gridColor,";\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.textColor,";\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ").concat(t.todayLineColor,";\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ").concat(t.ganttFontSize,";\n // }\n\n .taskTextOutsideRight {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: end;\n // font-size: ").concat(t.ganttFontSize,";\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ").concat(t.taskTextColor,";\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ").concat(t.taskBkgColor,";\n stroke: ").concat(t.taskBorderColor,";\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ").concat(t.activeTaskBkgColor,";\n stroke: ").concat(t.activeTaskBorderColor,";\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ").concat(t.doneTaskBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.critBkgColor,";\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.activeTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(t.textColor," ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n")}},"./src/diagrams/git/gitGraphAst.js":function(t,e,n){n.r(e),n.d(e,"setDirection",(function(){return f})),n.d(e,"setOptions",(function(){return g})),n.d(e,"getOptions",(function(){return y})),n.d(e,"commit",(function(){return m})),n.d(e,"branch",(function(){return v})),n.d(e,"merge",(function(){return b})),n.d(e,"checkout",(function(){return _})),n.d(e,"reset",(function(){return w})),n.d(e,"prettyPrint",(function(){return C})),n.d(e,"clear",(function(){return T})),n.d(e,"getBranchesAsObjArray",(function(){return E})),n.d(e,"getBranches",(function(){return S})),n.d(e,"getCommits",(function(){return O})),n.d(e,"getCommitsArray",(function(){return A})),n.d(e,"getCurrentBranch",(function(){return M})),n.d(e,"getDirection",(function(){return D})),n.d(e,"getHead",(function(){return j}));var r=n("./src/logger.js"),i=n("./src/utils.js"),a={},o=null,s={master:o},c="master",l="LR",u=0;function h(){return Object(i.random)({length:7})}function d(t,e){for(r.log.debug("Entering isfastforwardable:",t.id,e.id);t.seq<=e.seq&&t!==e&&null!=e.parent;){if(Array.isArray(e.parent))return r.log.debug("In merge commit:",e.parent),d(t,a[e.parent[0]])||d(t,a[e.parent[1]]);e=a[e.parent]}return r.log.debug(t.id,e.id),t.id===e.id}var f=function(t){l=t},p={},g=function(t){r.log.debug("options str",t),t=(t=t&&t.trim())||"{}";try{p=JSON.parse(t)}catch(zG){r.log.error("error while parsing gitGraph options",zG.message)}},y=function(){return p},m=function(t){var e={id:h(),message:t,seq:u++,parent:null==o?null:o.id};o=e,a[e.id]=e,s[c]=e.id,r.log.debug("in pushCommit "+e.id)},v=function(t){s[t]=null!=o?o.id:null,r.log.debug("in createBranch")},b=function(t){var e=a[s[c]],n=a[s[t]];if(function(t,e){return t.seq>e.seq&&d(e,t)}(e,n))r.log.debug("Already merged");else{if(d(e,n))s[c]=s[t],o=a[s[c]];else{var i={id:h(),message:"merged branch "+t+" into "+c,seq:u++,parent:[null==o?null:o.id,s[t]]};o=i,a[i.id]=i,s[c]=i.id}r.log.debug(s),r.log.debug("in mergeBranch")}},_=function(t){r.log.debug("in checkout");var e=s[c=t];o=a[e]},w=function(t){r.log.debug("in reset",t);var e=t.split(":")[0],n=parseInt(t.split(":")[1]),i="HEAD"===e?o:a[s[e]];for(r.log.debug(i,n);n>0;)if(n--,!(i=a[i.parent])){var l="Critical error - unique parent commit not found during reset";throw r.log.error(l),l}o=i,s[c]=i.id};function x(t,e,n){var r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}function k(t){var e=t.reduce((function(t,e){return t.seq>e.seq?t:e}),t[0]),n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));var i,o,c,l=[n,e.id,e.seq];for(var u in s)s[u]===e.id&&l.push(u);if(r.log.debug(l.join(" ")),Array.isArray(e.parent)){var h=a[e.parent[0]];x(t,e,h),t.push(a[e.parent[1]])}else{if(null==e.parent)return;var d=a[e.parent];x(t,e,d)}i=t,o=function(t){return t.id},c=Object.create(null),k(t=i.reduce((function(t,e){var n=o(e);return c[n]||(c[n]=!0,t.push(e)),t}),[]))}var C=function(){r.log.debug(a),k([A()[0]])},T=function(){a={},s={master:o=null},c="master",u=0},E=function(){var t=[];for(var e in s)t.push({name:e,commit:a[s[e]]});return t},S=function(){return s},O=function(){return a},A=function(){var t=Object.keys(a).map((function(t){return a[t]}));return t.forEach((function(t){r.log.debug(t.id)})),t.sort((function(t,e){return e.seq-t.seq})),t},M=function(){return c},D=function(){return l},j=function(){return o};e.default={setDirection:f,setOptions:g,getOptions:y,commit:m,branch:v,merge:b,checkout:_,reset:w,prettyPrint:C,clear:T,getBranchesAsObjArray:E,getBranches:S,getCommits:O,getCommitsArray:A,getCurrentBranch:M,getDirection:D,getHead:j}},"./src/diagrams/git/gitGraphRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return f})),n.d(e,"draw",(function(){return _}));var r,i=n("d3"),a=n("./src/diagrams/git/gitGraphAst.js"),o=n("./src/diagrams/git/parser/gitGraph.jison"),s=n.n(o),c=n("./src/logger.js"),l=n("./src/utils.js"),u={},h={nodeSpacing:150,nodeFillColor:"yellow",nodeStrokeWidth:2,nodeStrokeColor:"grey",lineStrokeWidth:4,branchOffset:50,lineColor:"grey",leftMargin:50,branchColors:["#442f74","#983351","#609732","#AA9A39"],nodeRadius:10,nodeLabel:{width:75,height:100,x:-25,y:0}},d={},f=function(t){d=t};function p(t,e,n,r){var a=Object(l.interpolateToCurve)(r,i.curveBasis),o=h.branchColors[n%h.branchColors.length],s=Object(i.line)().x((function(t){return Math.round(t.x)})).y((function(t){return Math.round(t.y)})).curve(a);t.append("svg:path").attr("d",s(e)).style("stroke",o).style("stroke-width",h.lineStrokeWidth).style("fill","none")}function g(t,e){e=e||t.node().getBBox();var n=t.node().getCTM();return{left:n.e+e.x*n.a,top:n.f+e.y*n.d,width:e.width,height:e.height}}function y(t,e,n,r,i){c.log.debug("svgDrawLineForCommits: ",e,n);var a=g(t.select("#node-"+e+" circle")),o=g(t.select("#node-"+n+" circle"));switch(r){case"LR":if(a.left-o.left>h.nodeSpacing){var s={x:a.left-h.nodeSpacing,y:o.top+o.height/2};p(t,[s,{x:o.left+o.width,y:o.top+o.height/2}],i,"linear"),p(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-h.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-h.nodeSpacing/2,y:s.y},s],i)}else p(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-h.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-h.nodeSpacing/2,y:o.top+o.height/2},{x:o.left+o.width,y:o.top+o.height/2}],i);break;case"BT":if(o.top-a.top>h.nodeSpacing){var l={x:o.left+o.width/2,y:a.top+a.height+h.nodeSpacing};p(t,[l,{x:o.left+o.width/2,y:o.top}],i,"linear"),p(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+a.height+h.nodeSpacing/2},{x:o.left+o.width/2,y:l.y-h.nodeSpacing/2},l],i)}else p(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+h.nodeSpacing/2},{x:o.left+o.width/2,y:o.top-h.nodeSpacing/2},{x:o.left+o.width/2,y:o.top}],i)}}function m(t,e){return t.select(e).node().cloneNode(!0)}function v(t,e,n,i){var a,o=Object.keys(u).length;if("string"==typeof e)do{if(a=u[e],c.log.debug("in renderCommitHistory",a.id,a.seq),t.select("#node-"+e).size()>0)return;t.append((function(){return m(t,"#def-commit")})).attr("class","commit").attr("id",(function(){return"node-"+a.id})).attr("transform",(function(){switch(i){case"LR":return"translate("+(a.seq*h.nodeSpacing+h.leftMargin)+", "+r*h.branchOffset+")";case"BT":return"translate("+(r*h.branchOffset+h.leftMargin)+", "+(o-a.seq)*h.nodeSpacing+")"}})).attr("fill",h.nodeFillColor).attr("stroke",h.nodeStrokeColor).attr("stroke-width",h.nodeStrokeWidth);var s=void 0;for(var l in n)if(n[l].commit===a){s=n[l];break}s&&(c.log.debug("found branch ",s.name),t.select("#node-"+a.id+" p").append("xhtml:span").attr("class","branch-label").text(s.name+", ")),t.select("#node-"+a.id+" p").append("xhtml:span").attr("class","commit-id").text(a.id),""!==a.message&&"BT"===i&&t.select("#node-"+a.id+" p").append("xhtml:span").attr("class","commit-msg").text(", "+a.message),e=a.parent}while(e&&u[e]);Array.isArray(e)&&(c.log.debug("found merge commmit",e),v(t,e[0],n,i),r++,v(t,e[1],n,i),r--)}function b(t,e,n,r){for(r=r||0;e.seq>0&&!e.lineDrawn;)"string"==typeof e.parent?(y(t,e.id,e.parent,n,r),e.lineDrawn=!0,e=u[e.parent]):Array.isArray(e.parent)&&(y(t,e.id,e.parent[0],n,r),y(t,e.id,e.parent[1],n,r+1),b(t,u[e.parent[1]],n,r+1),e.lineDrawn=!0,e=u[e.parent[0]])}var _=function(t,e,n){try{var o=s.a.parser;o.yy=a.default,o.yy.clear(),c.log.debug("in gitgraph renderer",t+"\n","id:",e,n),o.parse(t+"\n"),h=Object.assign(h,d,a.default.getOptions()),c.log.debug("effective options",h);var l=a.default.getDirection();u=a.default.getCommits();var f=a.default.getBranchesAsObjArray();"BT"===l&&(h.nodeLabel.x=f.length*h.branchOffset,h.nodeLabel.width="100%",h.nodeLabel.y=-2*h.nodeRadius);var p=Object(i.select)('[id="'.concat(e,'"]'));for(var g in function(t){t.append("defs").append("g").attr("id","def-commit").append("circle").attr("r",h.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",h.nodeLabel.width).attr("height",h.nodeLabel.height).attr("x",h.nodeLabel.x).attr("y",h.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("p").html("")}(p),r=1,f){var y=f[g];v(p,y.commit.id,f,l),b(p,y.commit,l),r++}p.attr("height",(function(){return"BT"===l?Object.keys(u).length*h.nodeSpacing:(f.length+1)*h.branchOffset}))}catch(zG){c.log.error("Error while rendering gitgraph"),c.log.error(zG.message)}};e.default={setConf:f,draw:_}},"./src/diagrams/git/parser/gitGraph.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[2,3],n=[1,7],r=[7,12,15,17,19,20,21],i=[7,11,12,15,17,19,20,21],a=[2,20],o=[1,32],s={trace:function(){},yy:{},symbols_:{error:2,start:3,GG:4,":":5,document:6,EOF:7,DIR:8,options:9,body:10,OPT:11,NL:12,line:13,statement:14,COMMIT:15,commit_arg:16,BRANCH:17,ID:18,CHECKOUT:19,MERGE:20,RESET:21,reset_arg:22,STR:23,HEAD:24,reset_parents:25,CARET:26,$accept:0,$end:1},terminals_:{2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},productions_:[0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:return r.setDirection(a[s-3]),a[s-1];case 4:r.setOptions(a[s-1]),this.$=a[s];break;case 5:a[s-1]+=a[s],this.$=a[s-1];break;case 7:this.$=[];break;case 8:a[s-1].push(a[s]),this.$=a[s-1];break;case 9:this.$=a[s-1];break;case 11:r.commit(a[s]);break;case 12:r.branch(a[s]);break;case 13:r.checkout(a[s]);break;case 14:r.merge(a[s]);break;case 15:r.reset(a[s]);break;case 16:this.$="";break;case 17:this.$=a[s];break;case 18:this.$=a[s-1]+":"+a[s];break;case 19:this.$=a[s-1]+":"+r.count,r.count=0;break;case 20:r.count=0;break;case 21:r.count+=1}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:e,9:6,12:n},{5:[1,8]},{7:[1,9]},t(r,[2,7],{10:10,11:[1,11]}),t(i,[2,6]),{6:12,7:e,9:6,12:n},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},t(i,[2,5]),{7:[1,21]},t(r,[2,8]),{12:[1,22]},t(r,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},t(r,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:a,25:31,26:o},{12:a,25:33,26:o},{12:[2,18]},{12:a,25:34,26:o},{12:[2,19]},{12:[2,21]}],defaultActions:{9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},c={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 12;case 1:case 2:case 3:break;case 4:return 4;case 5:return 15;case 6:return 17;case 7:return 20;case 8:return 21;case 9:return 19;case 10:case 11:return 8;case 12:return 5;case 13:return 26;case 14:this.begin("options");break;case 15:this.popState();break;case 16:return 11;case 17:this.begin("string");break;case 18:this.popState();break;case 19:return 23;case 20:return 18;case 21:return 7}},rules:[/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][-_\.a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],conditions:{options:{rules:[15,16],inclusive:!1},string:{rules:[18,19],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],inclusive:!0}}};function l(){this.yy={}}return s.lexer=c,l.prototype=s,s.Parser=l,new l}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/git/styles.js":function(t,e,n){n.r(e),e.default=function(){return"\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n"}},"./src/diagrams/info/infoDb.js":function(t,e,n){n.r(e),n.d(e,"setMessage",(function(){return o})),n.d(e,"getMessage",(function(){return s})),n.d(e,"setInfo",(function(){return c})),n.d(e,"getInfo",(function(){return l}));var r=n("./src/logger.js"),i="",a=!1,o=function(t){r.log.debug("Setting message to: "+t),i=t},s=function(){return i},c=function(t){a=t},l=function(){return a};e.default={setMessage:o,getMessage:s,setInfo:c,getInfo:l}},"./src/diagrams/info/infoRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return c})),n.d(e,"draw",(function(){return l}));var r=n("d3"),i=n("./src/diagrams/info/infoDb.js"),a=n("./src/diagrams/info/parser/info.jison"),o=n.n(a),s=n("./src/logger.js"),c=function(t){Object.keys(t).forEach((function(e){t[e]}))},l=function(t,e,n){try{var a=o.a.parser;a.yy=i.default,s.log.debug("Renering info diagram\n"+t),a.parse(t),s.log.debug("Parsed info diagram");var c=Object(r.select)("#"+e);c.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),c.attr("height",100),c.attr("width",400)}catch(zG){s.log.error("Error while rendering info diagram"),s.log.error(zG.message)}};e.default={setConf:c,draw:l}},"./src/diagrams/info/parser/info.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,r,i,a,o){switch(a.length,i){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/info/styles.js":function(t,e,n){n.r(e),e.default=function(){return""}},"./src/diagrams/pie/parser/pie.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,5],r=[1,6],i=[1,7],a=[1,9],o=[1,11,13,20,21,22,23],s=[2,5],c=[1,6,11,13,20,21,22,23],l=[20,21,22],u=[2,8],h=[1,18],d=[1,19],f=[1,24],p=[6,20,21,22,23],g={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,openDirective:15,typeDirective:16,closeDirective:17,":":18,argDirective:19,NEWLINE:20,";":21,EOF:22,open_directive:23,type_directive:24,arg_directive:25,close_directive:26,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",18:":",20:"NEWLINE",21:";",22:"EOF",23:"open_directive",24:"type_directive",25:"arg_directive",26:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[15,1],[16,1],[19,1],[17,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.setShowData(!0);break;case 7:this.$=a[s-1];break;case 9:r.addSection(a[s-1],r.cleanupValue(a[s]));break;case 10:this.$=a[s].trim(),r.setTitle(this.$);break;case 17:r.parseDirective("%%{","open_directive");break;case 18:r.parseDirective(a[s],"type_directive");break;case 19:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 20:r.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},{1:[3]},{3:10,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},{3:11,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},t(o,s,{7:12,8:[1,13]}),t(c,[2,14]),t(c,[2,15]),t(c,[2,16]),{16:14,24:[1,15]},{24:[2,17]},{1:[2,1]},{1:[2,2]},t(l,u,{15:8,9:16,10:17,5:20,1:[2,3],11:h,13:d,23:a}),t(o,s,{7:21}),{17:22,18:[1,23],26:f},t([18,26],[2,18]),t(o,[2,6]),{4:25,20:n,21:r,22:i},{12:[1,26]},{14:[1,27]},t(l,[2,11]),t(l,u,{15:8,9:16,10:17,5:20,1:[2,4],11:h,13:d,23:a}),t(p,[2,12]),{19:28,25:[1,29]},t(p,[2,20]),t(o,[2,7]),t(l,[2,9]),t(l,[2,10]),{17:30,26:f},{26:[2,19]},t(p,[2,13])],defaultActions:{9:[2,17],10:[2,1],11:[2,2],29:[2,19]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},y={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),23;case 1:return this.begin("type_directive"),24;case 2:return this.popState(),this.begin("arg_directive"),18;case 3:return this.popState(),this.popState(),26;case 4:return 25;case 5:case 6:break;case 7:return 20;case 8:case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:this.begin("string");break;case 13:this.popState();break;case 14:return"txt";case 15:return 6;case 16:return 8;case 17:return"value";case 18:return 22}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,15,16,17,18],inclusive:!0}}};function m(){this.yy={}}return g.lexer=y,m.prototype=g,g.Parser=m,new m}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/pie/pieDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return l}));var r=n("./src/logger.js"),i=n("./src/mermaidAPI.js"),a=n("./src/config.js"),o={},s="",c=!1,l=function(t,e,n){i.default.parseDirective(this,t,e,n)};e.default={parseDirective:l,getConfig:function(){return a.getConfig().pie},addSection:function(t,e){void 0===o[t]&&(o[t]=e,r.log.debug("Added new section :",t))},getSections:function(){return o},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){o={},s="",c=!1},setTitle:function(t){s=t},getTitle:function(){return s},setShowData:function(t){c=t},getShowData:function(){return c}}},"./src/diagrams/pie/pieRenderer.js":function(t,e,n){n.r(e),n.d(e,"draw",(function(){return f}));var r,i=n("d3"),a=n("./src/diagrams/pie/pieDb.js"),o=n("./src/diagrams/pie/parser/pie.jison"),s=n.n(o),c=n("./src/logger.js"),l=n("./src/utils.js"),u=n("./src/config.js"),h=u.getConfig(),d=450,f=function(t,e){try{h=u.getConfig();var n=s.a.parser;n.yy=a.default,c.log.debug("Rendering info diagram\n"+t),n.yy.clear(),n.parse(t),c.log.debug("Parsed info diagram");var o=document.getElementById(e);void 0===(r=o.parentElement.offsetWidth)&&(r=1200),void 0!==h.useWidth&&(r=h.useWidth),void 0!==h.pie.useWidth&&(r=h.pie.useWidth);var f=Object(i.select)("#"+e);Object(l.configureSvgSize)(f,d,r,h.pie.useMaxWidth),o.setAttribute("viewBox","0 0 "+r+" "+d);var p=18,g=Math.min(r,d)/2-40,y=f.append("g").attr("transform","translate("+r/2+",225)"),m=a.default.getSections(),v=0;Object.keys(m).forEach((function(t){v+=m[t]}));var b=h.themeVariables,_=[b.pie1,b.pie2,b.pie3,b.pie4,b.pie5,b.pie6,b.pie7,b.pie8,b.pie9,b.pie10,b.pie11,b.pie12],w=Object(i.scaleOrdinal)().domain(m).range(_),x=Object(i.pie)().value((function(t){return t.value}))(Object(i.entries)(m)),k=Object(i.arc)().innerRadius(0).outerRadius(g);y.selectAll("mySlices").data(x).enter().append("path").attr("d",k).attr("fill",(function(t){return w(t.data.key)})).attr("class","pieCircle"),y.selectAll("mySlices").data(x.filter((function(t){return 0!==t.data.value}))).enter().append("text").text((function(t){return(t.data.value/v*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+k.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice"),y.append("text").text(n.yy.getTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var C=y.selectAll(".legend").data(w.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*w.domain().length/2)+")"}));C.append("rect").attr("width",p).attr("height",p).style("fill",w).style("stroke",w),C.data(x.filter((function(t){return 0!==t.data.value}))).append("text").attr("x",22).attr("y",14).text((function(t){return n.yy.getShowData()||h.showData||h.pie.showData?t.data.key+" ["+t.data.value+"]":t.data.key}))}catch(zG){c.log.error("Error while rendering info diagram"),c.log.error(zG)}};e.default={draw:f}},"./src/diagrams/pie/styles.js":function(t,e,n){n.r(e),e.default=function(t){return"\n .pieCircle{\n stroke: ".concat(t.pieStrokeColor,";\n stroke-width : ").concat(t.pieStrokeWidth,";\n opacity : ").concat(t.pieOpacity,";\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ").concat(t.pieTitleTextSize,";\n fill: ").concat(t.pieTitleTextColor,";\n font-family: ").concat(t.fontFamily,";\n }\n .slice {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.pieSectionTextColor,";\n font-size:").concat(t.pieSectionTextSize,";\n // fill: white;\n }\n .legend text {\n fill: ").concat(t.pieLegendTextColor,";\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.pieLegendTextSize,";\n }\n")}},"./src/diagrams/requirement/parser/requirementDiagram.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[1,17],i=[2,10],a=[1,21],o=[1,22],s=[1,23],c=[1,24],l=[1,25],u=[1,26],h=[1,19],d=[1,27],f=[1,28],p=[1,31],g=[66,67],y=[5,8,14,35,36,37,38,39,40,48,55,57,66,67],m=[5,6,8,14,35,36,37,38,39,40,48,66,67],v=[1,51],b=[1,52],_=[1,53],w=[1,54],x=[1,55],k=[1,56],C=[1,57],T=[57,58],E=[1,69],S=[1,65],O=[1,66],A=[1,67],M=[1,68],D=[1,70],j=[1,74],N=[1,75],B=[1,72],L=[1,73],R=[5,8,14,35,36,37,38,39,40,48,66,67],I={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,open_directive:14,type_directive:15,arg_directive:16,close_directive:17,requirementDef:18,elementDef:19,relationshipDef:20,requirementType:21,requirementName:22,STRUCT_START:23,requirementBody:24,ID:25,COLONSEP:26,id:27,TEXT:28,text:29,RISK:30,riskLevel:31,VERIFYMTHD:32,verifyType:33,STRUCT_STOP:34,REQUIREMENT:35,FUNCTIONAL_REQUIREMENT:36,INTERFACE_REQUIREMENT:37,PERFORMANCE_REQUIREMENT:38,PHYSICAL_REQUIREMENT:39,DESIGN_CONSTRAINT:40,LOW_RISK:41,MED_RISK:42,HIGH_RISK:43,VERIFY_ANALYSIS:44,VERIFY_DEMONSTRATION:45,VERIFY_INSPECTION:46,VERIFY_TEST:47,ELEMENT:48,elementName:49,elementBody:50,TYPE:51,type:52,DOCREF:53,ref:54,END_ARROW_L:55,relationship:56,LINE:57,END_ARROW_R:58,CONTAINS:59,COPIES:60,DERIVES:61,SATISFIES:62,VERIFIES:63,REFINES:64,TRACES:65,unqString:66,qString:67,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"open_directive",15:"type_directive",16:"arg_directive",17:"close_directive",23:"STRUCT_START",25:"ID",26:"COLONSEP",28:"TEXT",30:"RISK",32:"VERIFYMTHD",34:"STRUCT_STOP",35:"REQUIREMENT",36:"FUNCTIONAL_REQUIREMENT",37:"INTERFACE_REQUIREMENT",38:"PERFORMANCE_REQUIREMENT",39:"PHYSICAL_REQUIREMENT",40:"DESIGN_CONSTRAINT",41:"LOW_RISK",42:"MED_RISK",43:"HIGH_RISK",44:"VERIFY_ANALYSIS",45:"VERIFY_DEMONSTRATION",46:"VERIFY_INSPECTION",47:"VERIFY_TEST",48:"ELEMENT",51:"TYPE",53:"DOCREF",55:"END_ARROW_L",57:"LINE",58:"END_ARROW_R",59:"CONTAINS",60:"COPIES",61:"DERIVES",62:"SATISFIES",63:"VERIFIES",64:"REFINES",65:"TRACES",66:"unqString",67:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[18,5],[24,5],[24,5],[24,5],[24,5],[24,2],[24,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[31,1],[31,1],[31,1],[33,1],[33,1],[33,1],[33,1],[19,5],[50,5],[50,5],[50,2],[50,1],[20,5],[20,5],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[22,1],[22,1],[27,1],[27,1],[29,1],[29,1],[49,1],[49,1],[52,1],[52,1],[54,1],[54,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:r.parseDirective("%%{","open_directive");break;case 7:r.parseDirective(a[s],"type_directive");break;case 8:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 9:r.parseDirective("}%%","close_directive","pie");break;case 10:this.$=[];break;case 16:r.addRequirement(a[s-3],a[s-4]);break;case 17:r.setNewReqId(a[s-2]);break;case 18:r.setNewReqText(a[s-2]);break;case 19:r.setNewReqRisk(a[s-2]);break;case 20:r.setNewReqVerifyMethod(a[s-2]);break;case 23:this.$=r.RequirementType.REQUIREMENT;break;case 24:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 25:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 26:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 27:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 28:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 29:this.$=r.RiskLevel.LOW_RISK;break;case 30:this.$=r.RiskLevel.MED_RISK;break;case 31:this.$=r.RiskLevel.HIGH_RISK;break;case 32:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 33:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 34:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 35:this.$=r.VerifyType.VERIFY_TEST;break;case 36:r.addElement(a[s-3]);break;case 37:r.setNewElementType(a[s-2]);break;case 38:r.setNewElementDocRef(a[s-2]);break;case 41:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 42:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 43:this.$=r.Relationships.CONTAINS;break;case 44:this.$=r.Relationships.COPIES;break;case 45:this.$=r.Relationships.DERIVES;break;case 46:this.$=r.Relationships.SATISFIES;break;case 47:this.$=r.Relationships.VERIFIES;break;case 48:this.$=r.Relationships.REFINES;break;case 49:this.$=r.Relationships.TRACES}},table:[{3:1,4:2,6:e,9:4,14:n},{1:[3]},{3:7,4:2,5:[1,6],6:e,9:4,14:n},{5:[1,8]},{10:9,15:[1,10]},{15:[2,6]},{3:11,4:2,6:e,9:4,14:n},{1:[2,2]},{4:16,5:r,7:12,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:l,40:u,48:h,66:d,67:f},{11:29,12:[1,30],17:p},t([12,17],[2,7]),{1:[2,1]},{8:[1,32]},{4:16,5:r,7:33,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:l,40:u,48:h,66:d,67:f},{4:16,5:r,7:34,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:l,40:u,48:h,66:d,67:f},{4:16,5:r,7:35,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:l,40:u,48:h,66:d,67:f},{4:16,5:r,7:36,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:l,40:u,48:h,66:d,67:f},{4:16,5:r,7:37,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:l,40:u,48:h,66:d,67:f},{22:38,66:[1,39],67:[1,40]},{49:41,66:[1,42],67:[1,43]},{55:[1,44],57:[1,45]},t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),t(g,[2,26]),t(g,[2,27]),t(g,[2,28]),t(y,[2,52]),t(y,[2,53]),t(m,[2,4]),{13:46,16:[1,47]},t(m,[2,9]),{1:[2,3]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{23:[1,48]},{23:[2,50]},{23:[2,51]},{23:[1,49]},{23:[2,56]},{23:[2,57]},{56:50,59:v,60:b,61:_,62:w,63:x,64:k,65:C},{56:58,59:v,60:b,61:_,62:w,63:x,64:k,65:C},{11:59,17:p},{17:[2,8]},{5:[1,60]},{5:[1,61]},{57:[1,62]},t(T,[2,43]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(T,[2,49]),{58:[1,63]},t(m,[2,5]),{5:E,24:64,25:S,28:O,30:A,32:M,34:D},{5:j,34:N,50:71,51:B,53:L},{27:76,66:d,67:f},{27:77,66:d,67:f},t(R,[2,16]),{26:[1,78]},{26:[1,79]},{26:[1,80]},{26:[1,81]},{5:E,24:82,25:S,28:O,30:A,32:M,34:D},t(R,[2,22]),t(R,[2,36]),{26:[1,83]},{26:[1,84]},{5:j,34:N,50:85,51:B,53:L},t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),{27:86,66:d,67:f},{29:87,66:[1,88],67:[1,89]},{31:90,41:[1,91],42:[1,92],43:[1,93]},{33:94,44:[1,95],45:[1,96],46:[1,97],47:[1,98]},t(R,[2,21]),{52:99,66:[1,100],67:[1,101]},{54:102,66:[1,103],67:[1,104]},t(R,[2,39]),{5:[1,105]},{5:[1,106]},{5:[2,54]},{5:[2,55]},{5:[1,107]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[1,108]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[1,109]},{5:[2,58]},{5:[2,59]},{5:[1,110]},{5:[2,60]},{5:[2,61]},{5:E,24:111,25:S,28:O,30:A,32:M,34:D},{5:E,24:112,25:S,28:O,30:A,32:M,34:D},{5:E,24:113,25:S,28:O,30:A,32:M,34:D},{5:E,24:114,25:S,28:O,30:A,32:M,34:D},{5:j,34:N,50:115,51:B,53:L},{5:j,34:N,50:116,51:B,53:L},t(R,[2,17]),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,37]),t(R,[2,38])],defaultActions:{5:[2,6],7:[2,2],11:[2,1],32:[2,3],33:[2,11],34:[2,12],35:[2,13],36:[2,14],37:[2,15],39:[2,50],40:[2,51],42:[2,56],43:[2,57],47:[2,8],88:[2,54],89:[2,55],91:[2,29],92:[2,30],93:[2,31],95:[2,32],96:[2,33],97:[2,34],98:[2,35],100:[2,58],101:[2,59],103:[2,60],104:[2,61]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},F={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),14;case 1:return this.begin("type_directive"),15;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),17;case 4:return 16;case 5:return 5;case 6:case 7:case 8:break;case 9:return 8;case 10:return 6;case 11:return 23;case 12:return 34;case 13:return 26;case 14:return 25;case 15:return 28;case 16:return 30;case 17:return 32;case 18:return 35;case 19:return 36;case 20:return 37;case 21:return 38;case 22:return 39;case 23:return 40;case 24:return 41;case 25:return 42;case 26:return 43;case 27:return 44;case 28:return 45;case 29:return 46;case 30:return 47;case 31:return 48;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 62;case 36:return 63;case 37:return 64;case 38:return 65;case 39:return 51;case 40:return 53;case 41:return 55;case 42:return 58;case 43:return 57;case 44:this.begin("string");break;case 45:this.popState();break;case 46:return"qString";case 47:return e.yytext=e.yytext.trim(),66}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[45,46],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,47],inclusive:!0}}};function P(){this.yy={}}return I.lexer=F,P.prototype=I,I.Parser=P,new P}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/requirement/requirementDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return h}));var r=n("./src/config.js"),i=n("./src/logger.js"),a=n("./src/mermaidAPI.js"),o=[],s={},c={},l={},u={},h=function(t,e,n){a.default.parseDirective(this,t,e,n)};e.default={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:h,getConfig:function(){return r.getConfig().req},addRequirement:function(t,e){return void 0===c[t]&&(c[t]={name:t,type:e,id:s.id,text:s.text,risk:s.risk,verifyMethod:s.verifyMethod}),s={},c[t]},getRequirements:function(){return c},setNewReqId:function(t){void 0!==s&&(s.id=t)},setNewReqText:function(t){void 0!==s&&(s.text=t)},setNewReqRisk:function(t){void 0!==s&&(s.risk=t)},setNewReqVerifyMethod:function(t){void 0!==s&&(s.verifyMethod=t)},addElement:function(t){return void 0===u[t]&&(u[t]={name:t,type:l.type,docRef:l.docRef},i.log.info("Added new requirement: ",t)),l={},u[t]},getElements:function(){return u},setNewElementType:function(t){void 0!==l&&(l.type=t)},setNewElementDocRef:function(t){void 0!==l&&(l.docRef=t)},addRelationship:function(t,e,n){o.push({type:t,src:e,dst:n})},getRelationships:function(){return o},clear:function(){o=[],s={},c={},l={},u={}}}},"./src/diagrams/requirement/requirementMarkers.js":function(t,e,n){n.r(e);var r={CONTAINS:"contains",ARROW:"arrow"};e.default={ReqMarkers:r,insertLineEndings:function(t,e){var n=t.append("defs").append("marker").attr("id",r.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");n.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),n.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),n.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",r.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d","M0,0\n L".concat(e.line_height,",").concat(e.line_height/2,"\n M").concat(e.line_height,",").concat(e.line_height/2,"\n L0,").concat(e.line_height)).attr("stroke-width",1)}}},"./src/diagrams/requirement/requirementRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return y})),n.d(e,"drawReqs",(function(){return w})),n.d(e,"drawElements",(function(){return x})),n.d(e,"draw",(function(){return C}));var r=n("d3"),i=n("dagre"),a=n.n(i),o=n("graphlib"),s=n.n(o),c=n("./src/logger.js"),l=n("./src/utils.js"),u=n("./src/diagrams/common/common.js"),h=n("./src/diagrams/requirement/parser/requirementDiagram.jison"),d=n("./src/diagrams/requirement/requirementDb.js"),f=n("./src/diagrams/requirement/requirementMarkers.js"),p={},g=0,y=function(t){if(void 0!==t)for(var e=Object.keys(t),n=0;n<e.length;n++)p[e[n]]=t[e[n]]},m=function(t,e){return t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",p.rect_min_width+"px").attr("height",p.rect_min_height+"px")},v=function(t,e,n){var r=p.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",r).attr("y",p.rect_padding).attr("dominant-baseline","hanging"),a=0;n.forEach((function(t){0==a?i.append("tspan").attr("text-anchor","middle").attr("x",p.rect_min_width/2).attr("dy",0).text(t):i.append("tspan").attr("text-anchor","middle").attr("x",p.rect_min_width/2).attr("dy",.75*p.line_height).text(t),a++}));var o=1.5*p.rect_padding+a*p.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",p.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:i,y:o}},b=function(t,e,n,r){var i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",p.rect_padding).attr("y",r).attr("dominant-baseline","hanging"),a=0,o=[];return n.forEach((function(t){for(var e=t.length;e>30&&a<3;){var n=t.substring(0,30);e=(t=t.substring(30,t.length)).length,o[o.length]=n,a++}if(3==a){var r=o[o.length-1];o[o.length-1]=r.substring(0,r.length-4)+"..."}else o[o.length]=t;a=0})),o.forEach((function(t){i.append("tspan").attr("x",p.rect_padding).attr("dy",p.line_height).text(t)})),i},_=function(t,e,n,i){var a=n.edge(k(e.src),k(e.dst)),o=Object(r.line)().x((function(t){return t.x})).y((function(t){return t.y})),s=t.insert("path","#"+i).attr("class","er relationshipLine").attr("d",o(a.points)).attr("fill","none");e.type==d.default.Relationships.CONTAINS?s.attr("marker-start","url("+u.default.getUrl(p.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(s.attr("stroke-dasharray","10,7"),s.attr("marker-end","url("+u.default.getUrl(p.arrowMarkerAbsolute)+"#"+f.default.ReqMarkers.ARROW+"_line_ending)")),function(t,e,n,r){var i=e.node().getTotalLength(),a=e.node().getPointAtLength(.5*i),o="rel"+g;g++;var s=t.append("text").attr("class","req relationshipLabel").attr("id",o).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(r).node().getBBox();t.insert("rect","#"+o).attr("class","req reqLabelBox").attr("x",a.x-s.width/2).attr("y",a.y-s.height/2).attr("width",s.width).attr("height",s.height).attr("fill","white").attr("fill-opacity","85%")}(t,s,0,"<<".concat(e.type,">>"))},w=function(t,e,n){Object.keys(t).forEach((function(r){var i=t[r];r=k(r),c.log.info("Added new requirement: ",r);var a=n.append("g").attr("id",r),o=m(a,"req-"+r),s=v(a,r+"_title",["<<".concat(i.type,">>"),"".concat(i.name)]);b(a,r+"_body",["Id: ".concat(i.id),"Text: ".concat(i.text),"Risk: ".concat(i.risk),"Verification: ".concat(i.verifyMethod)],s.y);var l=o.node().getBBox();e.setNode(r,{width:l.width,height:l.height,shape:"rect",id:r})}))},x=function(t,e,n){Object.keys(t).forEach((function(r){var i=t[r],a=k(r),o=n.append("g").attr("id",a),s="element-"+a,c=m(o,s),l=v(o,s+"_title",["<<Element>>","".concat(r)]);b(o,s+"_body",["Type: ".concat(i.type||"Not Specified"),"Doc Ref: ".concat(i.docRef||"None")],l.y);var u=c.node().getBBox();e.setNode(a,{width:u.width,height:u.height,shape:"rect",id:a})}))},k=function(t){return t.replace(/\s/g,"").replace(/\./g,"_")},C=function(t,e){h.parser.yy=d.default,h.parser.yy.clear(),h.parser.parse(t);var n=Object(r.select)("[id='".concat(e,"']"));f.default.insertLineEndings(n,p);var i,o,c=new s.a.Graph({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:p.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}})),u=d.default.getRequirements(),g=d.default.getElements(),y=d.default.getRelationships();w(u,c,n),x(g,c,n),function(t,e){t.forEach((function(t){var n=k(t.src),r=k(t.dst);e.setEdge(n,r,{relationship:t})}))}(y,c),a.a.layout(c),i=n,(o=c).nodes().forEach((function(t){void 0!==t&&void 0!==o.node(t)&&(i.select("#"+t),i.select("#"+t).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y-o.node(t).height/2)+" )"))})),y.forEach((function(t){_(n,t,c,e)}));var m=p.rect_padding,v=n.node().getBBox(),b=v.width+2*m,C=v.height+2*m;Object(l.configureSvgSize)(n,C,b,p.useMaxWidth),n.attr("viewBox","".concat(v.x-m," ").concat(v.y-m," ").concat(b," ").concat(C))};e.default={setConf:y,draw:C}},"./src/diagrams/requirement/styles.js":function(t,e,n){n.r(e),e.default=function(t){return"\n\n marker {\n fill: ".concat(t.relationColor,";\n stroke: ").concat(t.relationColor,";\n }\n\n marker.cross {\n stroke: ").concat(t.lineColor,";\n }\n\n svg {\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.fontSize,";\n }\n\n .reqBox {\n fill: ").concat(t.requirementBackground,";\n fill-opacity: 100%;\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n \n .reqTitle, .reqLabel{\n fill: ").concat(t.requirementTextColor,";\n }\n .reqLabelBox {\n fill: ").concat(t.relationLabelBackground,";\n fill-opacity: 100%;\n }\n\n .req-title-line {\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n .relationshipLine {\n stroke: ").concat(t.relationColor,";\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ").concat(t.relationLabelColor,";\n }\n\n")}},"./src/diagrams/sequence/parser/sequenceDiagram.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,18],l=[1,20],u=[1,21],h=[1,22],d=[1,24],f=[1,25],p=[1,26],g=[1,27],y=[1,28],m=[1,29],v=[1,32],b=[1,33],_=[1,36],w=[1,4,5,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,58],x=[1,44],k=[4,5,16,21,22,23,25,27,28,29,30,31,33,37,48,58],C=[4,5,16,21,22,23,25,27,28,29,30,31,33,36,37,48,58],T=[4,5,16,21,22,23,25,27,28,29,30,31,33,35,37,48,58],E=[46,47,48],S=[1,4,5,7,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,58],O={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,signal:20,autonumber:21,activate:22,deactivate:23,note_statement:24,title:25,text2:26,loop:27,end:28,rect:29,opt:30,alt:31,else_sections:32,par:33,par_sections:34,and:35,else:36,note:37,placement:38,over:39,actor_pair:40,spaceList:41,",":42,left_of:43,right_of:44,signaltype:45,"+":46,"-":47,ACTOR:48,SOLID_OPEN_ARROW:49,DOTTED_OPEN_ARROW:50,SOLID_ARROW:51,DOTTED_ARROW:52,SOLID_CROSS:53,DOTTED_CROSS:54,SOLID_POINT:55,DOTTED_POINT:56,TXT:57,open_directive:58,type_directive:59,arg_directive:60,close_directive:61,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",21:"autonumber",22:"activate",23:"deactivate",25:"title",27:"loop",28:"end",29:"rect",30:"opt",31:"alt",33:"par",35:"and",36:"else",37:"note",39:"over",42:",",43:"left_of",44:"right_of",46:"+",47:"-",48:"ACTOR",49:"SOLID_OPEN_ARROW",50:"DOTTED_OPEN_ARROW",51:"SOLID_ARROW",52:"DOTTED_ARROW",53:"SOLID_CROSS",54:"DOTTED_CROSS",55:"SOLID_POINT",56:"DOTTED_POINT",57:"TXT",58:"open_directive",59:"type_directive",60:"arg_directive",61:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,2],[10,1],[10,3],[10,3],[10,2],[10,3],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[34,1],[34,4],[32,1],[32,4],[24,4],[24,4],[41,2],[41,1],[40,3],[40,1],[38,1],[38,1],[20,5],[20,5],[20,4],[17,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[26,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.apply(a[s]),a[s];case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:this.$=[];break;case 12:a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 13:this.$=a[s-1];break;case 15:r.enableSequenceNumbers();break;case 16:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]};break;case 17:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1]};break;case 19:this.$=[{type:"setTitle",text:a[s-1]}];break;case 20:a[s-1].unshift({type:"loopStart",loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 21:a[s-1].unshift({type:"rectStart",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 22:a[s-1].unshift({type:"optStart",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 23:a[s-1].unshift({type:"altStart",altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 24:a[s-1].unshift({type:"parStart",parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 27:this.$=a[s-3].concat([{type:"and",parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 29:this.$=a[s-3].concat([{type:"else",altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 30:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 31:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 34:this.$=[a[s-2],a[s]];break;case 35:this.$=a[s];break;case 36:this.$=r.PLACEMENT.LEFTOF;break;case 37:this.$=r.PLACEMENT.RIGHTOF;break;case 38:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]}];break;case 39:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4]}];break;case 40:this.$=[a[s-3],a[s-1],{type:"addMessage",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 41:this.$={type:"addActor",actor:a[s]};break;case 42:this.$=r.LINETYPE.SOLID_OPEN;break;case 43:this.$=r.LINETYPE.DOTTED_OPEN;break;case 44:this.$=r.LINETYPE.SOLID;break;case 45:this.$=r.LINETYPE.DOTTED;break;case 46:this.$=r.LINETYPE.SOLID_CROSS;break;case 47:this.$=r.LINETYPE.DOTTED_CROSS;break;case 48:this.$=r.LINETYPE.SOLID_POINT;break;case 49:this.$=r.LINETYPE.DOTTED_POINT;break;case 50:this.$=r.parseMessage(a[s].trim().substring(1));break;case 51:r.parseDirective("%%{","open_directive");break;case 52:r.parseDirective(a[s],"type_directive");break;case 53:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 54:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:n,6:4,7:r,11:6,58:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,11:6,58:i},{3:9,4:e,5:n,6:4,7:r,11:6,58:i},{3:10,4:e,5:n,6:4,7:r,11:6,58:i},t([1,4,5,16,21,22,23,25,27,29,30,31,33,37,48,58],a,{8:11}),{12:12,59:[1,13]},{59:[2,51]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:h,24:23,25:d,27:f,29:p,30:g,31:y,33:m,37:v,48:b,58:i},{13:34,14:[1,35],61:_},t([14,61],[2,52]),t(w,[2,6]),{6:30,10:37,11:6,16:c,17:31,20:19,21:l,22:u,23:h,24:23,25:d,27:f,29:p,30:g,31:y,33:m,37:v,48:b,58:i},t(w,[2,8]),t(w,[2,9]),{17:38,48:b},{5:[1,39]},t(w,[2,15]),{17:40,48:b},{17:41,48:b},{5:[1,42]},{26:43,57:x},{19:[1,45]},{19:[1,46]},{19:[1,47]},{19:[1,48]},{19:[1,49]},t(w,[2,25]),{45:50,49:[1,51],50:[1,52],51:[1,53],52:[1,54],53:[1,55],54:[1,56],55:[1,57],56:[1,58]},{38:59,39:[1,60],43:[1,61],44:[1,62]},t([5,18,42,49,50,51,52,53,54,55,56,57],[2,41]),{5:[1,63]},{15:64,60:[1,65]},{5:[2,54]},t(w,[2,7]),{5:[1,67],18:[1,66]},t(w,[2,14]),{5:[1,68]},{5:[1,69]},t(w,[2,18]),{5:[1,70]},{5:[2,50]},t(k,a,{8:71}),t(k,a,{8:72}),t(k,a,{8:73}),t(C,a,{32:74,8:75}),t(T,a,{34:76,8:77}),{17:80,46:[1,78],47:[1,79],48:b},t(E,[2,42]),t(E,[2,43]),t(E,[2,44]),t(E,[2,45]),t(E,[2,46]),t(E,[2,47]),t(E,[2,48]),t(E,[2,49]),{17:81,48:b},{17:83,40:82,48:b},{48:[2,36]},{48:[2,37]},t(S,[2,10]),{13:84,61:_},{61:[2,53]},{19:[1,85]},t(w,[2,13]),t(w,[2,16]),t(w,[2,17]),t(w,[2,19]),{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:h,24:23,25:d,27:f,28:[1,86],29:p,30:g,31:y,33:m,37:v,48:b,58:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:h,24:23,25:d,27:f,28:[1,87],29:p,30:g,31:y,33:m,37:v,48:b,58:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:h,24:23,25:d,27:f,28:[1,88],29:p,30:g,31:y,33:m,37:v,48:b,58:i},{28:[1,89]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:h,24:23,25:d,27:f,28:[2,28],29:p,30:g,31:y,33:m,36:[1,90],37:v,48:b,58:i},{28:[1,91]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:h,24:23,25:d,27:f,28:[2,26],29:p,30:g,31:y,33:m,35:[1,92],37:v,48:b,58:i},{17:93,48:b},{17:94,48:b},{26:95,57:x},{26:96,57:x},{26:97,57:x},{42:[1,98],57:[2,35]},{5:[1,99]},{5:[1,100]},t(w,[2,20]),t(w,[2,21]),t(w,[2,22]),t(w,[2,23]),{19:[1,101]},t(w,[2,24]),{19:[1,102]},{26:103,57:x},{26:104,57:x},{5:[2,40]},{5:[2,30]},{5:[2,31]},{17:105,48:b},t(S,[2,11]),t(w,[2,12]),t(C,a,{8:75,32:106}),t(T,a,{8:77,34:107}),{5:[2,38]},{5:[2,39]},{57:[2,34]},{28:[2,29]},{28:[2,27]}],defaultActions:{7:[2,51],8:[2,1],9:[2,2],10:[2,3],36:[2,54],44:[2,50],61:[2,36],62:[2,37],65:[2,53],95:[2,40],96:[2,30],97:[2,31],103:[2,38],104:[2,39],105:[2,34],106:[2,29],107:[2,27]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},A={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),58;case 1:return this.begin("type_directive"),59;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),61;case 4:return 60;case 5:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return this.begin("ID"),16;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),48;case 13:return this.popState(),this.popState(),this.begin("LINE"),18;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),27;case 16:return this.begin("LINE"),29;case 17:return this.begin("LINE"),30;case 18:return this.begin("LINE"),31;case 19:return this.begin("LINE"),36;case 20:return this.begin("LINE"),33;case 21:return this.begin("LINE"),35;case 22:return this.popState(),19;case 23:return 28;case 24:return 43;case 25:return 44;case 26:return 39;case 27:return 37;case 28:return this.begin("ID"),22;case 29:return this.begin("ID"),23;case 30:return 25;case 31:return 7;case 32:return 21;case 33:return 42;case 34:return 5;case 35:return e.yytext=e.yytext.trim(),48;case 36:return 51;case 37:return 52;case 38:return 49;case 39:return 50;case 40:return 53;case 41:return 54;case 42:return 55;case 43:return 56;case 44:return 57;case 45:return 46;case 46:return 47;case 47:return 5;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,12],inclusive:!1},ALIAS:{rules:[7,8,13,14],inclusive:!1},LINE:{rules:[7,8,22],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};function M(){this.yy={}}return O.lexer=A,M.prototype=O,O.Parser=M,new M}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/sequence/sequenceDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return f})),n.d(e,"addActor",(function(){return p})),n.d(e,"addMessage",(function(){return y})),n.d(e,"addSignal",(function(){return m})),n.d(e,"getMessages",(function(){return v})),n.d(e,"getActors",(function(){return b})),n.d(e,"getActor",(function(){return _})),n.d(e,"getActorKeys",(function(){return w})),n.d(e,"getTitle",(function(){return x})),n.d(e,"getTitleWrapped",(function(){return k})),n.d(e,"enableSequenceNumbers",(function(){return C})),n.d(e,"showSequenceNumbers",(function(){return T})),n.d(e,"setWrap",(function(){return E})),n.d(e,"autoWrap",(function(){return S})),n.d(e,"clear",(function(){return O})),n.d(e,"parseMessage",(function(){return A})),n.d(e,"LINETYPE",(function(){return M})),n.d(e,"ARROWTYPE",(function(){return D})),n.d(e,"PLACEMENT",(function(){return j})),n.d(e,"addNote",(function(){return N})),n.d(e,"setTitle",(function(){return B})),n.d(e,"apply",(function(){return L}));var r=n("./src/mermaidAPI.js"),i=n("./src/config.js"),a=n("./src/logger.js"),o=void 0,s={},c=[],l="",u=!1,h=!1,d=!1,f=function(t,e,n){r.default.parseDirective(this,t,e,n)},p=function(t,e,n){var r=s[t];r&&e===r.name&&null==n||(null!=n&&null!=n.text||(n={text:e,wrap:null}),s[t]={name:e,description:n.text,wrap:void 0===n.wrap&&S()||!!n.wrap,prevActor:o},o&&s[o]&&(s[o].nextActor=t),o=t)},g=function(t){var e,n=0;for(e=0;e<c.length;e++)c[e].type===M.ACTIVE_START&&c[e].from.actor===t&&n++,c[e].type===M.ACTIVE_END&&c[e].from.actor===t&&n--;return n},y=function(t,e,n,r){c.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&S()||!!n.wrap,answer:r})},m=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{text:void 0,wrap:void 0},r=arguments.length>3?arguments[3]:void 0;if(r===M.ACTIVE_END){var i=g(t.actor);if(i<1){var a=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw a.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a}}return c.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&S()||!!n.wrap,type:r}),!0},v=function(){return c},b=function(){return s},_=function(t){return s[t]},w=function(){return Object.keys(s)},x=function(){return l},k=function(){return u},C=function(){h=!0},T=function(){return h},E=function(t){d=t},S=function(){return d},O=function(){s={},c=[]},A=function(t){var e=t.trim(),n={text:e.replace(/^[:]?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^[:]?wrap:/)||null===e.match(/^[:]?nowrap:/)&&void 0};return a.log.debug("parseMessage:",n),n},M={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},D={FILLED:0,OPEN:1},j={LEFTOF:0,RIGHTOF:1,OVER:2},N=function(t,e,n){n.text,void 0===n.wrap&&S()||n.wrap;var r=[].concat(t,t);c.push({from:r[0],to:r[1],message:n.text,wrap:void 0===n.wrap&&S()||!!n.wrap,type:M.NOTE,placement:e})},B=function(t){l=t.text,u=void 0===t.wrap&&S()||!!t.wrap},L=function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"addActor":p(e.actor,e.actor,e.description);break;case"activeStart":case"activeEnd":m(e.actor,void 0,void 0,e.signalType);break;case"addNote":N(e.actor,e.placement,e.text);break;case"addMessage":m(e.from,e.to,e.msg,e.signalType);break;case"loopStart":m(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":m(void 0,void 0,void 0,e.signalType);break;case"rectStart":m(void 0,void 0,e.color,e.signalType);break;case"rectEnd":m(void 0,void 0,void 0,e.signalType);break;case"optStart":m(void 0,void 0,e.optText,e.signalType);break;case"optEnd":m(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":m(void 0,void 0,e.altText,e.signalType);break;case"altEnd":m(void 0,void 0,void 0,e.signalType);break;case"setTitle":B(e.text);break;case"parStart":case"and":m(void 0,void 0,e.parText,e.signalType);break;case"parEnd":m(void 0,void 0,void 0,e.signalType)}};e.default={addActor:p,addMessage:y,addSignal:m,autoWrap:S,setWrap:E,enableSequenceNumbers:C,showSequenceNumbers:T,getMessages:v,getActors:b,getActor:_,getActorKeys:w,getTitle:x,parseDirective:f,getConfig:function(){return i.getConfig().sequence},getTitleWrapped:k,clear:O,parseMessage:A,LINETYPE:M,ARROWTYPE:D,PLACEMENT:j,addNote:N,setTitle:B,apply:L}},"./src/diagrams/sequence/sequenceRenderer.js":function(t,e,n){n.r(e),n.d(e,"bounds",(function(){return d})),n.d(e,"drawActors",(function(){return y})),n.d(e,"setConf",(function(){return m})),n.d(e,"draw",(function(){return w}));var r=n("d3"),i=n("./src/diagrams/sequence/svgDraw.js"),a=n("./src/logger.js"),o=n("./src/diagrams/sequence/parser/sequenceDiagram.jison"),s=n("./src/diagrams/common/common.js"),c=n("./src/diagrams/sequence/sequenceDb.js"),l=n("./src/config.js"),u=n("./src/utils.js");o.parser.yy=c.default;var h={},d={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((function(t){return t.height||0})))+(0===this.loops.length?0:this.loops.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.messages.length?0:this.messages.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.notes.length?0:this.notes.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,m(o.parser.yy.getConfig())},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i=this,a=0;function o(o){return function(s){a++;var c=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-c*h.boxMargin,Math.min),i.updateVal(s,"stopy",r+c*h.boxMargin,Math.max),i.updateVal(d.data,"startx",t-c*h.boxMargin,Math.min),i.updateVal(d.data,"stopx",n+c*h.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-c*h.boxMargin,Math.min),i.updateVal(s,"stopx",n+c*h.boxMargin,Math.max),i.updateVal(d.data,"starty",e-c*h.boxMargin,Math.min),i.updateVal(d.data,"stopy",r+c*h.boxMargin,Math.max))}}this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(d.data,"startx",i,Math.min),this.updateVal(d.data,"starty",o,Math.min),this.updateVal(d.data,"stopx",a,Math.max),this.updateVal(d.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},newActivation:function(t,e,n){var r=n[t.from.actor],a=v(t.from.actor).length||0,o=r.x+r.width/2+(a-1)*h.activationWidth/2;this.activations.push({startx:o,starty:this.verticalPos+2,stopx:o+h.activationWidth,stopy:void 0,actor:t.from.actor,anchored:i.default.anchorElement(e)})},endActivation:function(t){var e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:d.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},f=function(t){return{fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}},p=function(t){return{fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}},g=function(t){return{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}},y=function(t,e,n,r){for(var a=0,o=0,s=0;s<n.length;s++){var c=e[n[s]];c.width=c.width||h.width,c.height=Math.max(c.height||h.height,h.height),c.margin=c.margin||h.actorMargin,c.x=a+o,c.y=r,i.default.drawActor(t,c,h),d.insert(c.x,r,c.x+c.width,c.height),a+=c.width,o+=c.margin,d.models.addActor(c)}d.bumpVerticalPos(h.height)},m=function(t){Object(u.assignWithDepth)(h,t),t.fontFamily&&(h.actorFontFamily=h.noteFontFamily=h.messageFontFamily=t.fontFamily),t.fontSize&&(h.actorFontSize=h.noteFontSize=h.messageFontSize=t.fontSize),t.fontWeight&&(h.actorFontWeight=h.noteFontWeight=h.messageFontWeight=t.fontWeight)},v=function(t){return d.activations.filter((function(e){return e.actor===t}))},b=function(t,e){var n=e[t],r=v(t);return[r.reduce((function(t,e){return Math.min(t,e.startx)}),n.x+n.width/2),r.reduce((function(t,e){return Math.max(t,e.stopx)}),n.x+n.width/2)]};function _(t,e,n,r,i){d.bumpVerticalPos(n);var o=r;if(e.id&&e.message&&t[e.id]){var s=t[e.id].width,c=f(h);e.message=u.default.wrapLabel("[".concat(e.message,"]"),s-2*h.wrapPadding,c),e.width=s,e.wrap=!0;var l=u.default.calculateTextDimensions(e.message,c),p=Math.max(l.height,h.labelBoxHeight);o=r+p,a.log.debug("".concat(p," - ").concat(e.message))}i(e),d.bumpVerticalPos(o)}var w=function(t,e){h=l.getConfig().sequence,o.parser.yy.clear(),o.parser.yy.setWrap(h.wrap),o.parser.parse(t+"\n"),d.init(),a.log.debug("C:".concat(JSON.stringify(h,null,2)));var n=Object(r.select)('[id="'.concat(e,'"]')),p=o.parser.yy.getActors(),g=o.parser.yy.getActorKeys(),m=o.parser.yy.getMessages(),b=o.parser.yy.getTitle(),w=x(p,m);h.height=k(p,w),y(n,p,g,0);var T=C(m,p);i.default.insertArrowHead(n),i.default.insertArrowCrossHead(n),i.default.insertArrowFilledHead(n),i.default.insertSequenceNumber(n);var E=1;m.forEach((function(t){var e,r,l;switch(t.type){case o.parser.yy.LINETYPE.NOTE:r=t.noteModel,function(t,e){d.bumpVerticalPos(h.boxMargin),e.height=h.boxMargin,e.starty=d.getVerticalPos();var n=i.default.getNoteRect();n.x=e.startx,n.y=e.starty,n.width=e.width||h.width,n.class="note";var r=t.append("g"),a=i.default.drawRect(r,n),o=i.default.getTextObj();o.x=e.startx,o.y=e.starty,o.width=n.width,o.dy="1em",o.text=e.message,o.class="noteText",o.fontFamily=h.noteFontFamily,o.fontSize=h.noteFontSize,o.fontWeight=h.noteFontWeight,o.anchor=h.noteAlign,o.textMargin=h.noteMargin,o.valign=h.noteAlign;var s=Object(i.drawText)(r,o),c=Math.round(s.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));a.attr("height",c+2*h.noteMargin),e.height+=c+2*h.noteMargin,d.bumpVerticalPos(c+2*h.noteMargin),e.stopy=e.starty+c+2*h.noteMargin,e.stopx=e.startx+n.width,d.insert(e.startx,e.starty,e.stopx,e.stopy),d.models.addNote(e)}(n,r);break;case o.parser.yy.LINETYPE.ACTIVE_START:d.newActivation(t,n,p);break;case o.parser.yy.LINETYPE.ACTIVE_END:!function(t,e){var r=d.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),i.default.drawActivation(n,r,e,h,v(t.from.actor).length),d.insert(r.startx,e-10,r.stopx,e)}(t,d.getVerticalPos());break;case o.parser.yy.LINETYPE.LOOP_START:_(T,t,h.boxMargin,h.boxMargin+h.boxTextMargin,(function(t){return d.newLoop(t)}));break;case o.parser.yy.LINETYPE.LOOP_END:e=d.endLoop(),i.default.drawLoop(n,e,"loop",h),d.bumpVerticalPos(e.stopy-d.getVerticalPos()),d.models.addLoop(e);break;case o.parser.yy.LINETYPE.RECT_START:_(T,t,h.boxMargin,h.boxMargin,(function(t){return d.newLoop(void 0,t.message)}));break;case o.parser.yy.LINETYPE.RECT_END:e=d.endLoop(),i.default.drawBackgroundRect(n,e),d.models.addLoop(e),d.bumpVerticalPos(e.stopy-d.getVerticalPos());break;case o.parser.yy.LINETYPE.OPT_START:_(T,t,h.boxMargin,h.boxMargin+h.boxTextMargin,(function(t){return d.newLoop(t)}));break;case o.parser.yy.LINETYPE.OPT_END:e=d.endLoop(),i.default.drawLoop(n,e,"opt",h),d.bumpVerticalPos(e.stopy-d.getVerticalPos()),d.models.addLoop(e);break;case o.parser.yy.LINETYPE.ALT_START:_(T,t,h.boxMargin,h.boxMargin+h.boxTextMargin,(function(t){return d.newLoop(t)}));break;case o.parser.yy.LINETYPE.ALT_ELSE:_(T,t,h.boxMargin+h.boxTextMargin,h.boxMargin,(function(t){return d.addSectionToLoop(t)}));break;case o.parser.yy.LINETYPE.ALT_END:e=d.endLoop(),i.default.drawLoop(n,e,"alt",h),d.bumpVerticalPos(e.stopy-d.getVerticalPos()),d.models.addLoop(e);break;case o.parser.yy.LINETYPE.PAR_START:_(T,t,h.boxMargin,h.boxMargin+h.boxTextMargin,(function(t){return d.newLoop(t)}));break;case o.parser.yy.LINETYPE.PAR_AND:_(T,t,h.boxMargin+h.boxTextMargin,h.boxMargin,(function(t){return d.addSectionToLoop(t)}));break;case o.parser.yy.LINETYPE.PAR_END:e=d.endLoop(),i.default.drawLoop(n,e,"par",h),d.bumpVerticalPos(e.stopy-d.getVerticalPos()),d.models.addLoop(e);break;default:try{(l=t.msgModel).starty=d.getVerticalPos(),l.sequenceIndex=E,function(t,e){d.bumpVerticalPos(10);var n=e.startx,r=e.stopx,a=e.starty,l=e.message,p=e.type,g=e.sequenceIndex,y=s.default.splitBreaks(l).length,m=u.default.calculateTextDimensions(l,f(h)),v=m.height/y;e.height+=v,d.bumpVerticalPos(v);var b=i.default.getTextObj();b.x=n,b.y=a+10,b.width=r-n,b.class="messageText",b.dy="1em",b.text=l,b.fontFamily=h.messageFontFamily,b.fontSize=h.messageFontSize,b.fontWeight=h.messageFontWeight,b.anchor=h.messageAlign,b.valign=h.messageAlign,b.textMargin=h.wrapPadding,b.tspan=!1,Object(i.drawText)(t,b);var _,w,x=m.height-10,k=m.width;if(n===r){w=d.getVerticalPos()+x,h.rightAngles?_=t.append("path").attr("d","M ".concat(n,",").concat(w," H ").concat(n+Math.max(h.width/2,k/2)," V ").concat(w+25," H ").concat(n)):(x+=h.boxMargin,w=d.getVerticalPos()+x,_=t.append("path").attr("d","M "+n+","+w+" C "+(n+60)+","+(w-10)+" "+(n+60)+","+(w+30)+" "+n+","+(w+20))),x+=30;var C=Math.max(k/2,h.width/2);d.insert(n-C,d.getVerticalPos()-10+x,r+C,d.getVerticalPos()+30+x)}else x+=h.boxMargin,w=d.getVerticalPos()+x,(_=t.append("line")).attr("x1",n),_.attr("y1",w),_.attr("x2",r),_.attr("y2",w),d.insert(n,w-10,r,w);p===o.parser.yy.LINETYPE.DOTTED||p===o.parser.yy.LINETYPE.DOTTED_CROSS||p===o.parser.yy.LINETYPE.DOTTED_POINT||p===o.parser.yy.LINETYPE.DOTTED_OPEN?(_.style("stroke-dasharray","3, 3"),_.attr("class","messageLine1")):_.attr("class","messageLine0");var T="";h.arrowMarkerAbsolute&&(T=(T=(T=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),_.attr("stroke-width",2),_.attr("stroke","none"),_.style("fill","none"),p!==o.parser.yy.LINETYPE.SOLID&&p!==o.parser.yy.LINETYPE.DOTTED||_.attr("marker-end","url("+T+"#arrowhead)"),p!==o.parser.yy.LINETYPE.SOLID_POINT&&p!==o.parser.yy.LINETYPE.DOTTED_POINT||_.attr("marker-end","url("+T+"#filled-head)"),p!==o.parser.yy.LINETYPE.SOLID_CROSS&&p!==o.parser.yy.LINETYPE.DOTTED_CROSS||_.attr("marker-end","url("+T+"#crosshead)"),(c.default.showSequenceNumbers()||h.showSequenceNumbers)&&(_.attr("marker-start","url("+T+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",w+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("textLength","16px").attr("class","sequenceNumber").text(g)),d.bumpVerticalPos(x),e.height+=x,e.stopy=e.starty+e.height,d.insert(e.fromBounds,e.starty,e.toBounds,e.stopy)}(n,l),d.models.addMessage(l)}catch(zG){a.log.error("error while drawing message",zG)}}[o.parser.yy.LINETYPE.SOLID_OPEN,o.parser.yy.LINETYPE.DOTTED_OPEN,o.parser.yy.LINETYPE.SOLID,o.parser.yy.LINETYPE.DOTTED,o.parser.yy.LINETYPE.SOLID_CROSS,o.parser.yy.LINETYPE.DOTTED_CROSS,o.parser.yy.LINETYPE.SOLID_POINT,o.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&E++})),h.mirrorActors&&(d.bumpVerticalPos(2*h.boxMargin),y(n,p,g,d.getVerticalPos()));var S=d.getBounds().bounds;a.log.debug("For line height fix Querying: #"+e+" .actor-line"),Object(r.selectAll)("#"+e+" .actor-line").attr("y2",S.stopy);var O=S.stopy-S.starty+2*h.diagramMarginY;h.mirrorActors&&(O=O-h.boxMargin+h.bottomMarginAdj);var A=S.stopx-S.startx+2*h.diagramMarginX;b&&n.append("text").text(b).attr("x",(S.stopx-S.startx)/2-2*h.diagramMarginX).attr("y",-25),Object(u.configureSvgSize)(n,O,A,h.useMaxWidth);var M=b?40:0;n.attr("viewBox",S.startx-h.diagramMarginX+" -"+(h.diagramMarginY+M)+" "+A+" "+(O+M)),a.log.debug("models:",d.models)},x=function(t,e){var n={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){var r=t[e.to];if(e.placement===o.parser.yy.PLACEMENT.LEFTOF&&!r.prevActor)return;if(e.placement===o.parser.yy.PLACEMENT.RIGHTOF&&!r.nextActor)return;var i=void 0!==e.placement,a=!i,s=i?p(h):f(h),c=e.wrap?u.default.wrapLabel(e.message,h.width-2*h.wrapPadding,s):e.message,l=u.default.calculateTextDimensions(c,s).width+2*h.wrapPadding;a&&e.from===r.nextActor?n[e.to]=Math.max(n[e.to]||0,l):a&&e.from===r.prevActor?n[e.from]=Math.max(n[e.from]||0,l):a&&e.from===e.to?(n[e.from]=Math.max(n[e.from]||0,l/2),n[e.to]=Math.max(n[e.to]||0,l/2)):e.placement===o.parser.yy.PLACEMENT.RIGHTOF?n[e.from]=Math.max(n[e.from]||0,l):e.placement===o.parser.yy.PLACEMENT.LEFTOF?n[r.prevActor]=Math.max(n[r.prevActor]||0,l):e.placement===o.parser.yy.PLACEMENT.OVER&&(r.prevActor&&(n[r.prevActor]=Math.max(n[r.prevActor]||0,l/2)),r.nextActor&&(n[e.from]=Math.max(n[e.from]||0,l/2)))}})),a.log.debug("maxMessageWidthPerActor:",n),n},k=function(t,e){var n=0;for(var r in Object.keys(t).forEach((function(e){var r=t[e];r.wrap&&(r.description=u.default.wrapLabel(r.description,h.width-2*h.wrapPadding,g(h)));var i=u.default.calculateTextDimensions(r.description,g(h));r.width=r.wrap?h.width:Math.max(h.width,i.width+2*h.wrapPadding),r.height=r.wrap?Math.max(i.height,h.height):h.height,n=Math.max(n,r.height)})),e){var i=t[r];if(i){var a=t[i.nextActor];if(a){var o=e[r]+h.actorMargin-i.width/2-a.width/2;i.margin=Math.max(o,h.actorMargin)}}}return Math.max(n,h.height)},C=function(t,e){var n,r,i,s={},c=[];return t.forEach((function(t){switch(t.id=u.default.random({length:10}),t.type){case o.parser.yy.LINETYPE.LOOP_START:case o.parser.yy.LINETYPE.ALT_START:case o.parser.yy.LINETYPE.OPT_START:case o.parser.yy.LINETYPE.PAR_START:c.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case o.parser.yy.LINETYPE.ALT_ELSE:case o.parser.yy.LINETYPE.PAR_AND:t.message&&(n=c.pop(),s[n.id]=n,s[t.id]=n,c.push(n));break;case o.parser.yy.LINETYPE.LOOP_END:case o.parser.yy.LINETYPE.ALT_END:case o.parser.yy.LINETYPE.OPT_END:case o.parser.yy.LINETYPE.PAR_END:n=c.pop(),s[n.id]=n;break;case o.parser.yy.LINETYPE.ACTIVE_START:var l=e[t.from?t.from.actor:t.to.actor],g=v(t.from?t.from.actor:t.to.actor).length,y=l.x+l.width/2+(g-1)*h.activationWidth/2,m={startx:y,stopx:y+h.activationWidth,actor:t.from.actor,enabled:!0};d.activations.push(m);break;case o.parser.yy.LINETYPE.ACTIVE_END:var _=d.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);delete d.activations.splice(_,1)[0]}void 0!==t.placement?(r=function(t,e){var n=e[t.from].x,r=e[t.to].x,i=t.wrap&&t.message,s=u.default.calculateTextDimensions(i?u.default.wrapLabel(t.message,h.width,p(h)):t.message,p(h)),c={width:i?h.width:Math.max(h.width,s.width+2*h.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===o.parser.yy.PLACEMENT.RIGHTOF?(c.width=i?Math.max(h.width,s.width):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*h.noteMargin),c.startx=n+(e[t.from].width+h.actorMargin)/2):t.placement===o.parser.yy.PLACEMENT.LEFTOF?(c.width=i?Math.max(h.width,s.width+2*h.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*h.noteMargin),c.startx=n-c.width+(e[t.from].width-h.actorMargin)/2):t.to===t.from?(s=u.default.calculateTextDimensions(i?u.default.wrapLabel(t.message,Math.max(h.width,e[t.from].width),p(h)):t.message,p(h)),c.width=i?Math.max(h.width,e[t.from].width):Math.max(e[t.from].width,h.width,s.width+2*h.noteMargin),c.startx=n+(e[t.from].width-c.width)/2):(c.width=Math.abs(n+e[t.from].width/2-(r+e[t.to].width/2))+h.actorMargin,c.startx=n<r?n+e[t.from].width/2-h.actorMargin/2:r+e[t.to].width/2-h.actorMargin/2),i&&(c.message=u.default.wrapLabel(t.message,c.width-2*h.wrapPadding,p(h))),a.log.debug("NM:[".concat(c.startx,",").concat(c.stopx,",").concat(c.starty,",").concat(c.stopy,":").concat(c.width,",").concat(c.height,"=").concat(t.message,"]")),c}(t,e),t.noteModel=r,c.forEach((function(t){(n=t).from=Math.min(n.from,r.startx),n.to=Math.max(n.to,r.startx+r.width),n.width=Math.max(n.width,Math.abs(n.from-n.to))-h.labelBoxWidth}))):(i=function(t,e){var n=!1;if([o.parser.yy.LINETYPE.SOLID_OPEN,o.parser.yy.LINETYPE.DOTTED_OPEN,o.parser.yy.LINETYPE.SOLID,o.parser.yy.LINETYPE.DOTTED,o.parser.yy.LINETYPE.SOLID_CROSS,o.parser.yy.LINETYPE.DOTTED_CROSS,o.parser.yy.LINETYPE.SOLID_POINT,o.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&(n=!0),!n)return{};var r=b(t.from,e),i=b(t.to,e),a=r[0]<=i[0]?1:0,s=r[0]<i[0]?0:1,c=r.concat(i),l=Math.abs(i[s]-r[a]);t.wrap&&t.message&&(t.message=u.default.wrapLabel(t.message,Math.max(l+2*h.wrapPadding,h.width),f(h)));var d=u.default.calculateTextDimensions(t.message,f(h));return{width:Math.max(t.wrap?0:d.width+2*h.wrapPadding,l+2*h.wrapPadding,h.width),height:0,startx:r[a],stopx:i[s],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,c),toBounds:Math.max.apply(null,c)}}(t,e),t.msgModel=i,i.startx&&i.stopx&&c.length>0&&c.forEach((function(r){if(n=r,i.startx===i.stopx){var a=e[t.from],o=e[t.to];n.from=Math.min(a.x-i.width/2,a.x-a.width/2,n.from),n.to=Math.max(o.x+i.width/2,o.x+a.width/2,n.to),n.width=Math.max(n.width,Math.abs(n.to-n.from))-h.labelBoxWidth}else n.from=Math.min(i.startx,n.from),n.to=Math.max(i.stopx,n.to),n.width=Math.max(n.width,i.width)-h.labelBoxWidth})))})),d.activations=[],a.log.debug("Loop type widths:",s),s};e.default={bounds:d,drawActors:y,setConf:m,draw:w}},"./src/diagrams/sequence/styles.js":function(t,e,n){n.r(e),e.default=function(t){return".actor {\n stroke: ".concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n }\n\n text.actor > tspan {\n fill: ").concat(t.actorTextColor,";\n stroke: none;\n }\n\n .actor-line {\n stroke: ").concat(t.actorLineColor,";\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ").concat(t.signalColor,";\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.signalColor,";\n }\n\n #arrowhead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .sequenceNumber {\n fill: ").concat(t.sequenceNumberColor,";\n }\n\n #sequencenumber {\n fill: ").concat(t.signalColor,";\n }\n\n #crosshead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .messageText {\n fill: ").concat(t.signalTextColor,";\n stroke: ").concat(t.signalTextColor,";\n }\n\n .labelBox {\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBkgColor,";\n }\n\n .labelText, .labelText > tspan {\n fill: ").concat(t.labelTextColor,";\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ").concat(t.loopTextColor,";\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBorderColor,";\n }\n\n .note {\n //stroke: #decc93;\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n }\n\n .noteText, .noteText > tspan {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n }\n\n .activation0 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation1 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation2 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n")}},"./src/diagrams/sequence/svgDraw.js":function(t,e,n){n.r(e),n.d(e,"drawRect",(function(){return i})),n.d(e,"drawText",(function(){return a})),n.d(e,"drawLabel",(function(){return o})),n.d(e,"drawActor",(function(){return c})),n.d(e,"anchorElement",(function(){return l})),n.d(e,"drawActivation",(function(){return u})),n.d(e,"drawLoop",(function(){return h})),n.d(e,"drawBackgroundRect",(function(){return d})),n.d(e,"insertArrowHead",(function(){return f})),n.d(e,"insertArrowFilledHead",(function(){return p})),n.d(e,"insertSequenceNumber",(function(){return g})),n.d(e,"insertArrowCrossHead",(function(){return y})),n.d(e,"getTextObj",(function(){return m})),n.d(e,"getNoteRect",(function(){return v}));var r=n("./src/diagrams/common/common.js"),i=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},a=function(t,e){var n=0,i=0,a=e.text.split(r.default.lineBreakRegex),o=[],s=0,c=function(){return e.y};if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":c=function(){return Math.round(e.y+e.textMargin)};break;case"middle":case"center":c=function(){return Math.round(e.y+(n+i+e.textMargin)/2)};break;case"bottom":case"end":c=function(){return Math.round(e.y+(n+i+2*e.textMargin)-e.textMargin)}}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="text-after-edge",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="text-before-edge",e.alignmentBaseline="middle"}for(var l=0;l<a.length;l++){var u=a[l];void 0!==e.textMargin&&0===e.textMargin&&void 0!==e.fontSize&&(s=l*e.fontSize);var h=t.append("text");if(h.attr("x",e.x),h.attr("y",c()),void 0!==e.anchor&&h.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&h.style("font-family",e.fontFamily),void 0!==e.fontSize&&h.style("font-size",e.fontSize),void 0!==e.fontWeight&&h.style("font-weight",e.fontWeight),void 0!==e.fill&&h.attr("fill",e.fill),void 0!==e.class&&h.attr("class",e.class),void 0!==e.dy?h.attr("dy",e.dy):0!==s&&h.attr("dy",s),e.tspan){var d=h.append("tspan");d.attr("x",e.x),void 0!==e.fill&&d.attr("fill",e.fill),d.text(u)}else h.text(u);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(i+=(h._groups||h)[0][0].getBBox().height,n=i),o.push(h)}return o},o=function(t,e){var n,r,i,o,s,c=t.append("polygon");return c.attr("points",(n=e.x,r=e.y,i=e.width,o=e.height,n+","+r+" "+(n+i)+","+r+" "+(n+i)+","+(r+o-(s=7))+" "+(n+i-1.2*s)+","+(r+o)+" "+n+","+(r+o))),c.attr("class","labelBox"),e.y=e.y+e.height/2,a(t,e),c},s=-1,c=function(t,e,n){var r=e.x+e.width/2,a=t.append("g");0===e.y&&(s++,a.append("line").attr("id","actor"+s).attr("x1",r).attr("y1",5).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var o=v();o.x=e.x,o.y=e.y,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,i(a,o),b(n)(e.description,a,o.x,o.y,o.width,o.height,{class:"actor"},n)},l=function(t){return t.append("g")},u=function(t,e,n,r,a){var o=v(),s=e.anchored;o.x=e.startx,o.y=e.starty,o.class="activation"+a%3,o.width=e.stopx-e.startx,o.height=n-e.starty,i(s,o)},h=function(t,e,n,r){var i=r.boxMargin,s=r.boxTextMargin,c=r.labelBoxHeight,l=r.labelBoxWidth,u=r.messageFontFamily,h=r.messageFontSize,d=r.messageFontWeight,f=t.append("g"),p=function(t,e,n,r){return f.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};p(e.startx,e.starty,e.stopx,e.starty),p(e.stopx,e.starty,e.stopx,e.stopy),p(e.startx,e.stopy,e.stopx,e.stopy),p(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){p(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));var g=m();g.text=n,g.x=e.startx,g.y=e.starty,g.fontFamily=u,g.fontSize=h,g.fontWeight=d,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=l||50,g.height=c||20,g.textMargin=s,g.class="labelText",o(f,g),(g=m()).text=e.title,g.x=e.startx+l/2+(e.stopx-e.startx)/2,g.y=e.starty+i+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=u,g.fontSize=h,g.fontWeight=d,g.wrap=!0;var y=a(f,g);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){if(t.message){g.text=t.message,g.x=e.startx+(e.stopx-e.startx)/2,g.y=e.sections[n].y+i+s,g.class="loopText",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=u,g.fontSize=h,g.fontWeight=d,g.wrap=e.wrap,y=a(f,g);var r=Math.round(y.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));e.sections[n].height+=r-(i+s)}})),e.height=Math.round(e.stopy-e.starty),f},d=function(t,e){i(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},f=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},p=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},g=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},y=function(t){var e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},m=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},v=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},b=function(){function t(t,e,n,r,a,o,s){i(e.append("text").attr("x",n+a/2).attr("y",r+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,n,a,o,s,c,l){for(var u=l.actorFontSize,h=l.actorFontFamily,d=l.actorFontWeight,f=t.split(r.default.lineBreakRegex),p=0;p<f.length;p++){var g=p*u-u*(f.length-1)/2,y=e.append("text").attr("x",n+o/2).attr("y",a).style("text-anchor","middle").style("font-size",u).style("font-weight",d).style("font-family",h);y.append("tspan").attr("x",n+o/2).attr("dy",g).text(f[p]),y.attr("y",a+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(y,c)}}function n(t,n,r,a,o,s,c,l){var u=n.append("switch"),h=u.append("foreignObject").attr("x",r).attr("y",a).attr("width",o).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,u,r,a,o,s,c,l),i(h,c)}function i(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}();e.default={drawRect:i,drawText:a,drawLabel:o,drawActor:c,anchorElement:l,drawActivation:u,drawLoop:h,drawBackgroundRect:d,insertArrowHead:f,insertArrowFilledHead:p,insertSequenceNumber:g,insertArrowCrossHead:y,getTextObj:m,getNoteRect:v}},"./src/diagrams/state/id-cache.js":function(t,e,n){n.r(e),n.d(e,"set",(function(){return i})),n.d(e,"get",(function(){return a})),n.d(e,"keys",(function(){return o})),n.d(e,"size",(function(){return s}));var r={},i=function(t,e){r[t]=e},a=function(t){return r[t]},o=function(){return Object.keys(r)},s=function(){return o().length};e.default={get:a,set:i,keys:o,size:s}},"./src/diagrams/state/parser/stateDiagram.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,19],l=[1,20],u=[1,21],h=[1,22],d=[1,30],f=[1,23],p=[1,24],g=[1,25],y=[1,26],m=[1,27],v=[1,32],b=[1,33],_=[1,34],w=[1,35],x=[1,31],k=[1,38],C=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],T=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],E=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],S=[4,5,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],O={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,idStatement:11,DESCR:12,"--\x3e":13,HIDE_EMPTY:14,scale:15,WIDTH:16,COMPOSIT_STATE:17,STRUCT_START:18,STRUCT_STOP:19,STATE_DESCR:20,AS:21,ID:22,FORK:23,JOIN:24,CHOICE:25,CONCURRENT:26,note:27,notePosition:28,NOTE_TEXT:29,direction:30,openDirective:31,typeDirective:32,closeDirective:33,":":34,argDirective:35,direction_tb:36,direction_bt:37,direction_rl:38,direction_lr:39,eol:40,";":41,EDGE_STATE:42,left_of:43,right_of:44,open_directive:45,type_directive:46,arg_directive:47,close_directive:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"--\x3e",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CHOICE",26:"CONCURRENT",27:"note",29:"NOTE_TEXT",34:":",36:"direction_tb",37:"direction_bt",38:"direction_rl",39:"direction_lr",41:";",42:"EDGE_STATE",43:"left_of",44:"right_of",45:"open_directive",46:"type_directive",47:"arg_directive",48:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[40,1],[40,1],[11,1],[11,1],[28,1],[28,1],[31,1],[32,1],[35,1],[33,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.setRootDoc(a[s]),a[s];case 5:this.$=[];break;case 6:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 7:case 8:this.$=a[s];break;case 9:this.$="nl";break;case 10:this.$={stmt:"state",id:a[s],type:"default",description:""};break;case 11:this.$={stmt:"state",id:a[s-1],type:"default",description:r.trimColon(a[s])};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-2],type:"default",description:""},state2:{stmt:"state",id:a[s],type:"default",description:""}};break;case 13:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-3],type:"default",description:""},state2:{stmt:"state",id:a[s-1],type:"default",description:""},description:a[s].substr(1).trim()};break;case 17:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 18:var c=a[s],l=a[s-2].trim();if(a[s].match(":")){var u=a[s].split(":");c=u[0],l=[l,u[1]]}this.$={stmt:"state",id:c,type:"default",description:l};break;case 19:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 20:this.$={stmt:"state",id:a[s],type:"fork"};break;case 21:this.$={stmt:"state",id:a[s],type:"join"};break;case 22:this.$={stmt:"state",id:a[s],type:"choice"};break;case 23:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 24:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 30:r.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 31:r.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 32:r.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 33:r.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 36:case 37:this.$=a[s];break;case 40:r.parseDirective("%%{","open_directive");break;case 41:r.parseDirective(a[s],"type_directive");break;case 42:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 43:r.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:e,5:n,6:4,7:r,31:6,45:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,31:6,45:i},{3:9,4:e,5:n,6:4,7:r,31:6,45:i},{3:10,4:e,5:n,6:4,7:r,31:6,45:i},t([1,4,5,14,15,17,20,22,23,24,25,26,27,36,37,38,39,42,45],a,{8:11}),{32:12,46:[1,13]},{46:[2,40]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:l,17:u,20:h,22:d,23:f,24:p,25:g,26:y,27:m,30:29,31:6,36:v,37:b,38:_,39:w,42:x,45:i},{33:36,34:[1,37],48:k},t([34,48],[2,41]),t(C,[2,6]),{6:28,10:39,11:18,14:c,15:l,17:u,20:h,22:d,23:f,24:p,25:g,26:y,27:m,30:29,31:6,36:v,37:b,38:_,39:w,42:x,45:i},t(C,[2,8]),t(C,[2,9]),t(C,[2,10],{12:[1,40],13:[1,41]}),t(C,[2,14]),{16:[1,42]},t(C,[2,16],{18:[1,43]}),{21:[1,44]},t(C,[2,20]),t(C,[2,21]),t(C,[2,22]),t(C,[2,23]),{28:45,29:[1,46],43:[1,47],44:[1,48]},t(C,[2,26]),t(C,[2,27]),t(T,[2,36]),t(T,[2,37]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),t(E,[2,28]),{35:49,47:[1,50]},t(E,[2,43]),t(C,[2,7]),t(C,[2,11]),{11:51,22:d,42:x},t(C,[2,15]),t(S,a,{8:52}),{22:[1,53]},{22:[1,54]},{21:[1,55]},{22:[2,38]},{22:[2,39]},{33:56,48:k},{48:[2,42]},t(C,[2,12],{12:[1,57]}),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:l,17:u,19:[1,58],20:h,22:d,23:f,24:p,25:g,26:y,27:m,30:29,31:6,36:v,37:b,38:_,39:w,42:x,45:i},t(C,[2,18],{18:[1,59]}),{29:[1,60]},{22:[1,61]},t(E,[2,29]),t(C,[2,13]),t(C,[2,17]),t(S,a,{8:62}),t(C,[2,24]),t(C,[2,25]),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:l,17:u,19:[1,63],20:h,22:d,23:f,24:p,25:g,26:y,27:m,30:29,31:6,36:v,37:b,38:_,39:w,42:x,45:i},t(C,[2,19])],defaultActions:{7:[2,40],8:[2,1],9:[2,2],10:[2,3],47:[2,38],48:[2,39],50:[2,42]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},A={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 36;case 1:return 37;case 2:return 38;case 3:return 39;case 4:return this.begin("open_directive"),45;case 5:return this.begin("type_directive"),46;case 6:return this.popState(),this.begin("arg_directive"),34;case 7:return this.popState(),this.popState(),48;case 8:return 47;case 9:case 10:break;case 11:return 5;case 12:case 13:case 14:case 15:break;case 16:return this.pushState("SCALE"),15;case 17:return 16;case 18:this.popState();break;case 19:this.pushState("STATE");break;case 20:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 21:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 22:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 23:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 24:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 25:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:this.begin("STATE_STRING");break;case 31:return this.popState(),this.pushState("STATE_ID"),"AS";case 32:return this.popState(),"ID";case 33:this.popState();break;case 34:return"STATE_DESCR";case 35:return 17;case 36:this.popState();break;case 37:return this.popState(),this.pushState("struct"),18;case 38:return this.popState(),19;case 39:break;case 40:return this.begin("NOTE"),27;case 41:return this.popState(),this.pushState("NOTE_ID"),43;case 42:return this.popState(),this.pushState("NOTE_ID"),44;case 43:this.popState(),this.pushState("FLOATING_NOTE");break;case 44:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 45:break;case 46:return"NOTE_TEXT";case 47:return this.popState(),"ID";case 48:return this.popState(),this.pushState("NOTE_TEXT"),22;case 49:return this.popState(),e.yytext=e.yytext.substr(2).trim(),29;case 50:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),29;case 51:case 52:return 7;case 53:return 14;case 54:return 42;case 55:return 22;case 56:return e.yytext=e.yytext.trim(),12;case 57:return 13;case 58:return 26;case 59:return 5;case 60:return"INVALID"}},rules:[/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[13,14],inclusive:!1},close_directive:{rules:[13,14],inclusive:!1},arg_directive:{rules:[7,8,13,14],inclusive:!1},type_directive:{rules:[6,7,13,14],inclusive:!1},open_directive:{rules:[5,13,14],inclusive:!1},struct:{rules:[13,14,19,26,27,28,29,38,39,40,54,55,56,57,58],inclusive:!1},FLOATING_NOTE_ID:{rules:[47],inclusive:!1},FLOATING_NOTE:{rules:[44,45,46],inclusive:!1},NOTE_TEXT:{rules:[49,50],inclusive:!1},NOTE_ID:{rules:[48],inclusive:!1},NOTE:{rules:[41,42,43],inclusive:!1},SCALE:{rules:[17,18],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[32],inclusive:!1},STATE_STRING:{rules:[33,34],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[13,14,20,21,22,23,24,25,30,31,35,36,37],inclusive:!1},ID:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,14,15,16,19,37,40,51,52,53,54,55,56,57,59,60],inclusive:!0}}};function M(){this.yy={}}return O.lexer=A,M.prototype=O,O.Parser=M,new M}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/state/shapes.js":function(t,e,n){n.r(e),n.d(e,"drawStartState",(function(){return d})),n.d(e,"drawDivider",(function(){return f})),n.d(e,"drawSimpleState",(function(){return p})),n.d(e,"drawDescrState",(function(){return g})),n.d(e,"addTitleAndBox",(function(){return y})),n.d(e,"drawText",(function(){return m})),n.d(e,"drawNote",(function(){return v})),n.d(e,"drawState",(function(){return b})),n.d(e,"drawEdge",(function(){return w}));var r=n("d3"),i=n("./src/diagrams/state/id-cache.js"),a=n("./src/diagrams/state/stateDb.js"),o=n("./src/utils.js"),s=n("./src/diagrams/common/common.js"),c=n("./src/config.js"),l=n("./src/logger.js");function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var d=function(t){return t.append("circle").attr("class","start-state").attr("r",Object(c.getConfig)().state.sizeUnit).attr("cx",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit).attr("cy",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit)},f=function(t){return t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Object(c.getConfig)().state.textHeight).attr("class","divider").attr("x2",2*Object(c.getConfig)().state.textHeight).attr("y1",0).attr("y2",0)},p=function(t,e){var n=t.append("text").attr("x",2*Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.textHeight+2*Object(c.getConfig)().state.padding).attr("font-size",Object(c.getConfig)().state.fontSize).attr("class","state-title").text(e.id),r=n.node().getBBox();return t.insert("rect",":first-child").attr("x",Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.padding).attr("width",r.width+2*Object(c.getConfig)().state.padding).attr("height",r.height+2*Object(c.getConfig)().state.padding).attr("rx",Object(c.getConfig)().state.radius),n},g=function(t,e){var n=t.append("text").attr("x",2*Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.textHeight+1.3*Object(c.getConfig)().state.padding).attr("font-size",Object(c.getConfig)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append("text").attr("x",Object(c.getConfig)().state.padding).attr("y",r+.4*Object(c.getConfig)().state.padding+Object(c.getConfig)().state.dividerMargin+Object(c.getConfig)().state.textHeight).attr("class","state-description"),a=!0,o=!0;e.descriptions.forEach((function(t){var e,n,r;a||(e=t,n=o,r=i.append("tspan").attr("x",2*Object(c.getConfig)().state.padding).text(e),n||r.attr("dy",Object(c.getConfig)().state.textHeight),o=!1),a=!1}));var s=t.append("line").attr("x1",Object(c.getConfig)().state.padding).attr("y1",Object(c.getConfig)().state.padding+r+Object(c.getConfig)().state.dividerMargin/2).attr("y2",Object(c.getConfig)().state.padding+r+Object(c.getConfig)().state.dividerMargin/2).attr("class","descr-divider"),l=i.node().getBBox(),u=Math.max(l.width,n.width);return s.attr("x2",u+3*Object(c.getConfig)().state.padding),t.insert("rect",":first-child").attr("x",Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.padding).attr("width",u+2*Object(c.getConfig)().state.padding).attr("height",l.height+r+2*Object(c.getConfig)().state.padding).attr("rx",Object(c.getConfig)().state.radius),t},y=function(t,e,n){var r,i=Object(c.getConfig)().state.padding,a=2*Object(c.getConfig)().state.padding,o=t.node().getBBox(),s=o.width,l=o.x,u=t.append("text").attr("x",0).attr("y",Object(c.getConfig)().state.titleShift).attr("font-size",Object(c.getConfig)().state.fontSize).attr("class","state-title").text(e.id),h=u.node().getBBox().width+a,d=Math.max(h,s);d===s&&(d+=a);var f=t.node().getBBox();e.doc,r=l-i,h>s&&(r=(s-d)/2+i),Math.abs(l-f.x)<i&&h>s&&(r=l-(h-s)/2);var p=1-Object(c.getConfig)().state.textHeight;return t.insert("rect",":first-child").attr("x",r).attr("y",p).attr("class",n?"alt-composit":"composit").attr("width",d).attr("height",f.height+Object(c.getConfig)().state.textHeight+Object(c.getConfig)().state.titleShift+1).attr("rx","0"),u.attr("x",r+i),h<=s&&u.attr("x",l+(d-a)/2-h/2+i),t.insert("rect",":first-child").attr("x",r).attr("y",Object(c.getConfig)().state.titleShift-Object(c.getConfig)().state.textHeight-Object(c.getConfig)().state.padding).attr("width",d).attr("height",3*Object(c.getConfig)().state.textHeight).attr("rx",Object(c.getConfig)().state.radius),t.insert("rect",":first-child").attr("x",r).attr("y",Object(c.getConfig)().state.titleShift-Object(c.getConfig)().state.textHeight-Object(c.getConfig)().state.padding).attr("width",d).attr("height",f.height+3+2*Object(c.getConfig)().state.textHeight).attr("rx",Object(c.getConfig)().state.radius),t},m=function(t,e){var n=e.text.replace(s.default.lineBreakRegex," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(n),r},v=function(t,e){e.attr("class","state-note");var n=e.append("rect").attr("x",0).attr("y",Object(c.getConfig)().state.padding),r=function(t,e,n,r){var i=0,a=r.append("text");a.style("text-anchor","start"),a.attr("class","noteText");var o,l=t.replace(/\r\n/g,"<br/>"),h=(l=l.replace(/\n/g,"<br/>")).split(s.default.lineBreakRegex),d=1.25*Object(c.getConfig)().state.noteMargin,f=u(h);try{for(f.s();!(o=f.n()).done;){var p=o.value.trim();if(p.length>0){var g=a.append("tspan");g.text(p),0===d&&(d+=g.node().getBBox().height),i+=d,g.attr("x",e+Object(c.getConfig)().state.noteMargin),g.attr("y",n+i+1.25*Object(c.getConfig)().state.noteMargin)}}}catch(y){f.e(y)}finally{f.f()}return{textWidth:a.node().getBBox().width,textHeight:i}}(t,0,0,e.append("g")),i=r.textWidth,a=r.textHeight;return n.attr("height",a+2*Object(c.getConfig)().state.noteMargin),n.attr("width",i+2*Object(c.getConfig)().state.noteMargin),n},b=function(t,e){var n=e.id,r={id:n,label:e.id,width:0,height:0},a=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&d(a),"end"===e.type&&function(t){t.append("circle").attr("class","end-state-outer").attr("r",Object(c.getConfig)().state.sizeUnit+Object(c.getConfig)().state.miniPadding).attr("cx",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+Object(c.getConfig)().state.miniPadding).attr("cy",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+Object(c.getConfig)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",Object(c.getConfig)().state.sizeUnit).attr("cx",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+2).attr("cy",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+2)}(a),"fork"!==e.type&&"join"!==e.type||function(t,e){var n=Object(c.getConfig)().state.forkWidth,r=Object(c.getConfig)().state.forkHeight;if(e.parentId){var i=n;n=r,r=i}t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",r).attr("x",Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.padding)}(a,e),"note"===e.type&&v(e.note.text,a),"divider"===e.type&&f(a),"default"===e.type&&0===e.descriptions.length&&p(a,e),"default"===e.type&&e.descriptions.length>0&&g(a,e);var o=a.node().getBBox();return r.width=o.width+2*Object(c.getConfig)().state.padding,r.height=o.height+2*Object(c.getConfig)().state.padding,i.default.set(n,r),r},_=0,w=function(t,e,n){e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var i=e.points,u=Object(r.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(r.curveBasis),h=t.append("path").attr("d",u(i)).attr("id","edge"+_).attr("class","transition"),d="";if(Object(c.getConfig)().state.arrowMarkerAbsolute&&(d=(d=(d=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),h.attr("marker-end","url("+d+"#"+function(t){switch(t){case a.default.relationType.AGGREGATION:return"aggregation";case a.default.relationType.EXTENSION:return"extension";case a.default.relationType.COMPOSITION:return"composition";case a.default.relationType.DEPENDENCY:return"dependency"}}(a.default.relationType.DEPENDENCY)+"End)"),void 0!==n.title){for(var f=t.append("g").attr("class","stateLabel"),p=o.default.calcLabelPosition(e.points),g=p.x,y=p.y,m=s.default.getRows(n.title),v=0,b=[],w=0,x=0,k=0;k<=m.length;k++){var C=f.append("text").attr("text-anchor","middle").text(m[k]).attr("x",g).attr("y",y+v),T=C.node().getBBox();if(w=Math.max(w,T.width),x=Math.min(x,T.x),l.log.info(T.x,g,y+v),0===v){var E=C.node().getBBox();v=E.height,l.log.info("Title height",v,y)}b.push(C)}var S=v*m.length;if(m.length>1){var O=(m.length-1)*v*.5;b.forEach((function(t,e){return t.attr("y",y+e*v-O)})),S=v*m.length}var A=f.node().getBBox();f.insert("rect",":first-child").attr("class","box").attr("x",g-w/2-Object(c.getConfig)().state.padding/2).attr("y",y-S/2-Object(c.getConfig)().state.padding/2-3.5).attr("width",w+Object(c.getConfig)().state.padding).attr("height",S+Object(c.getConfig)().state.padding),l.log.info(A)}_++}},"./src/diagrams/state/stateDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return u})),n.d(e,"addState",(function(){return g})),n.d(e,"clear",(function(){return y})),n.d(e,"getState",(function(){return m})),n.d(e,"getStates",(function(){return v})),n.d(e,"logDocuments",(function(){return b})),n.d(e,"getRelations",(function(){return _})),n.d(e,"addRelation",(function(){return w})),n.d(e,"cleanupLabel",(function(){return k})),n.d(e,"lineType",(function(){return C})),n.d(e,"relationType",(function(){return O}));var r=n("./src/logger.js"),i=n("./src/utils.js"),a=n("./src/mermaidAPI.js"),o=n("./src/config.js");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var c=function(t){return JSON.parse(JSON.stringify(t))},l=[],u=function(t,e,n){a.default.parseDirective(this,t,e,n)},h=function t(e,n,r){if("relation"===n.stmt)t(e,n.state1,!0),t(e,n.state2,!1);else if("state"===n.stmt&&"[*]"===n.id&&(n.id=r?e.id+"_start":e.id+"_end",n.start=r),n.doc){var a=[],o=0,s=[];for(o=0;o<n.doc.length;o++)if("divider"===n.doc[o].type){var l=c(n.doc[o]);l.doc=c(s),a.push(l),s=[]}else s.push(n.doc[o]);if(a.length>0&&s.length>0){var u={stmt:"state",id:Object(i.generateId)(),type:"divider",doc:c(s)};a.push(c(u)),n.doc=a}n.doc.forEach((function(e){return t(n,e,!0)}))}},d={root:{relations:[],states:{},documents:{}}},f=d.root,p=0,g=function(t,e,n,i,a){void 0===f.states[t]?f.states[t]={id:t,descriptions:[],type:e,doc:n,note:a}:(f.states[t].doc||(f.states[t].doc=n),f.states[t].type||(f.states[t].type=e)),i&&(r.log.info("Adding state ",t,i),"string"==typeof i&&x(t,i.trim()),"object"===s(i)&&i.forEach((function(e){return x(t,e.trim())}))),a&&(f.states[t].note=a)},y=function(){f=(d={root:{relations:[],states:{},documents:{}}}).root,f=d.root,p=0,E=[]},m=function(t){return f.states[t]},v=function(){return f.states},b=function(){r.log.info("Documents = ",d)},_=function(){return f.relations},w=function(t,e,n){var r=t,i=e,a="default",o="default";"[*]"===t&&(r="start"+ ++p,a="start"),"[*]"===e&&(i="end"+p,o="end"),g(r,a),g(i,o),f.relations.push({id1:r,id2:i,title:n})},x=function(t,e){var n=f.states[t],r=e;":"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push(r)},k=function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},C={LINE:0,DOTTED_LINE:1},T=0,E=[],S="TB",O={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3};e.default={parseDirective:u,getConfig:function(){return o.getConfig().state},addState:g,clear:y,getState:m,getStates:v,getRelations:_,getClasses:function(){return E},getDirection:function(){return S},addRelation:w,getDividerId:function(){return"divider-id-"+ ++T},setDirection:function(t){S=t},cleanupLabel:k,lineType:C,relationType:O,logDocuments:b,getRootDoc:function(){return l},setRootDoc:function(t){r.log.info("Setting root doc",t),l=t},getRootDocV2:function(){return h({id:"root"},{id:"root",doc:l},!0),{id:"root",doc:l}},extract:function(t){var e;e=t.doc?t.doc:t,r.log.info(e),y(),r.log.info("Extract",e),e.forEach((function(t){"state"===t.stmt&&g(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&w(t.state1.id,t.state2.id,t.description)}))},trimColon:function(t){return t&&":"===t[0]?t.substr(1).trim():t.trim()}}},"./src/diagrams/state/stateRenderer-v2.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return p})),n.d(e,"getClasses",(function(){return y})),n.d(e,"draw",(function(){return w}));var r=n("graphlib"),i=n.n(r),a=n("d3"),o=n("./src/diagrams/state/stateDb.js"),s=n("./src/diagrams/state/parser/stateDiagram.jison"),c=n.n(s),l=n("./src/config.js"),u=n("./src/dagre-wrapper/index.js"),h=n("./src/logger.js"),d=n("./src/utils.js"),f={},p=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)f[e[n]]=t[e[n]]},g={},y=function(t){h.log.trace("Extracting classes"),o.default.clear();var e=c.a.parser;return e.yy=o.default,e.parse(t),o.default.getClasses()},m=function(t,e,n,r){if("root"!==n.id){var i="rect";!0===n.start&&(i="start"),!1===n.start&&(i="end"),"default"!==n.type&&(i=n.type),g[n.id]||(g[n.id]={id:n.id,shape:i,description:n.id,classes:"statediagram-state"}),n.description&&(Array.isArray(g[n.id].description)?(g[n.id].shape="rectWithTitle",g[n.id].description.push(n.description)):g[n.id].description.length>0?(g[n.id].shape="rectWithTitle",g[n.id].description===n.id?g[n.id].description=[n.description]:g[n.id].description=[g[n.id].description,n.description]):(g[n.id].shape="rect",g[n.id].description=n.description)),!g[n.id].type&&n.doc&&(h.log.info("Setting cluster for ",n.id,_(n)),g[n.id].type="group",g[n.id].dir=_(n),g[n.id].shape="divider"===n.type?"divider":"roundedWithTitle",g[n.id].classes=g[n.id].classes+" "+(r?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));var a={labelStyle:"",shape:g[n.id].shape,labelText:g[n.id].description,classes:g[n.id].classes,style:"",id:n.id,dir:g[n.id].dir,domId:"state-"+n.id+"-"+v,type:g[n.id].type,padding:15};if(n.note){var o={labelStyle:"",shape:"note",labelText:n.note.text,classes:"statediagram-note",style:"",id:n.id+"----note-"+v,domId:"state-"+n.id+"----note-"+v,type:g[n.id].type,padding:15},s={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:g[n.id].classes,style:"",id:n.id+"----parent",domId:"state-"+n.id+"----parent-"+v,type:"group",padding:0};v++,t.setNode(n.id+"----parent",s),t.setNode(o.id,o),t.setNode(n.id,a),t.setParent(n.id,n.id+"----parent"),t.setParent(o.id,n.id+"----parent");var c=n.id,l=o.id;"left of"===n.note.position&&(c=o.id,l=n.id),t.setEdge(c,l,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"transition note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal"})}else t.setNode(n.id,a)}e&&"root"!==e.id&&(h.log.trace("Setting node ",n.id," to be child of its parent ",e.id),t.setParent(n.id,e.id)),n.doc&&(h.log.trace("Adding nodes children "),b(t,n,n.doc,!r))},v=0,b=function(t,e,n,r){h.log.trace("items",n),n.forEach((function(n){if("state"===n.stmt||"default"===n.stmt)m(t,e,n,r);else if("relation"===n.stmt){m(t,e,n.state1,r),m(t,e,n.state2,r);var i={id:"edge"+v,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:"fill:none",labelStyle:"",label:n.description,arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal",classes:"transition"},a=n.state1.id,o=n.state2.id;t.setEdge(a,o,i,v),v++}}))},_=function(t,e){var n=e||"TB";if(t.doc)for(var r=0;r<t.doc.length;r++){var i=t.doc[r];"dir"===i.stmt&&(n=i.value)}return n},w=function(t,e){h.log.info("Drawing state diagram (v2)",e),o.default.clear(),g={};var n=c.a.parser;n.yy=o.default,n.parse(t),o.default.getDirection();var r=Object(l.getConfig)().state,s=r.nodeSpacing||50,f=r.rankSpacing||50;h.log.info(o.default.getRootDocV2()),o.default.extract(o.default.getRootDocV2()),h.log.info(o.default.getRootDocV2());var p=new i.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:_(o.default.getRootDocV2()),nodesep:s,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));m(p,void 0,o.default.getRootDocV2(),!0);var y=Object(a.select)('[id="'.concat(e,'"]')),v=Object(a.select)("#"+e+" g");Object(u.render)(v,p,["barb"],"statediagram",e);var b=y.node().getBBox(),w=b.width+16,x=b.height+16;y.attr("class","statediagram");var k=y.node().getBBox();Object(d.configureSvgSize)(y,x,1.75*w,r.useMaxWidth);var C="".concat(k.x-8," ").concat(k.y-8," ").concat(w," ").concat(x);h.log.debug("viewBox ".concat(C)),y.attr("viewBox",C);for(var T=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),E=0;E<T.length;E++){var S=T[E],O=S.getBBox(),A=document.createElementNS("http://www.w3.org/2000/svg","rect");A.setAttribute("rx",0),A.setAttribute("ry",0),A.setAttribute("width",O.width),A.setAttribute("height",O.height),S.insertBefore(A,S.firstChild)}};e.default={setConf:p,getClasses:y,draw:w}},"./src/diagrams/state/stateRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return m})),n.d(e,"draw",(function(){return v}));var r,i=n("d3"),a=n("dagre"),o=n.n(a),s=n("graphlib"),c=n.n(s),l=n("./src/logger.js"),u=n("./src/diagrams/state/stateDb.js"),h=n("./src/diagrams/common/common.js"),d=n("./src/diagrams/state/parser/stateDiagram.jison"),f=n("./src/diagrams/state/shapes.js"),p=n("./src/config.js"),g=n("./src/utils.js");d.parser.yy=u.default;var y={},m=function(){},v=function(t,e){r=Object(p.getConfig)().state,d.parser.yy.clear(),d.parser.parse(t),l.log.debug("Rendering diagram "+t);var n=Object(i.select)("[id='".concat(e,"']"));n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z"),new c.a.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));var a=u.default.getRootDoc();b(a,n,void 0,!1);var o=r.padding,s=n.node().getBBox(),h=s.width+2*o,f=s.height+2*o,y=1.75*h;Object(g.configureSvgSize)(n,f,y,r.useMaxWidth),n.attr("viewBox","".concat(s.x-r.padding," ").concat(s.y-r.padding," ")+h+" "+f)},b=function t(e,n,a,s){var d,p=new c.a.Graph({compound:!0,multigraph:!0}),g=!0;for(d=0;d<e.length;d++)if("relation"===e[d].stmt){g=!1;break}a?p.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:g?1:r.edgeLengthFactor,nodeSep:g?1:50,isMultiGraph:!0}):p.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:g?1:r.edgeLengthFactor,nodeSep:g?1:50,ranker:"tight-tree",isMultiGraph:!0}),p.setDefaultEdgeLabel((function(){return{}})),u.default.extract(e);for(var m=u.default.getStates(),v=u.default.getRelations(),b=Object.keys(m),_=0;_<b.length;_++){var w=m[b[_]];a&&(w.parentId=a);var x=void 0;if(w.doc){var k=n.append("g").attr("id",w.id).attr("class","stateGroup");x=t(w.doc,k,w.id,!s);var C=(k=Object(f.addTitleAndBox)(k,w,s)).node().getBBox();x.width=C.width,x.height=C.height+r.padding/2,y[w.id]={y:r.compositTitleSize}}else x=Object(f.drawState)(n,w,p);if(w.note){var T={descriptions:[],id:w.id+"-note",note:w.note,type:"note"},E=Object(f.drawState)(n,T,p);"left of"===w.note.position?(p.setNode(x.id+"-note",E),p.setNode(x.id,x)):(p.setNode(x.id,x),p.setNode(x.id+"-note",E)),p.setParent(x.id,x.id+"-group"),p.setParent(x.id+"-note",x.id+"-group")}else p.setNode(x.id,x)}l.log.debug("Count=",p.nodeCount(),p);var S=0;v.forEach((function(t){var e;S++,l.log.debug("Setting edge",t),p.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*r.fontSizeFactor:1),height:r.labelHeight*h.default.getRows(t.title).length,labelpos:"c"},"id"+S)})),o.a.layout(p),l.log.debug("Graph after layout",p.nodes());var O=n.node();p.nodes().forEach((function(t){void 0!==t&&void 0!==p.node(t)?(l.log.warn("Node "+t+": "+JSON.stringify(p.node(t))),Object(i.select)("#"+O.id+" #"+t).attr("transform","translate("+(p.node(t).x-p.node(t).width/2)+","+(p.node(t).y+(y[t]?y[t].y:0)-p.node(t).height/2)+" )"),Object(i.select)("#"+O.id+" #"+t).attr("data-x-shift",p.node(t).x-p.node(t).width/2),document.querySelectorAll("#"+O.id+" #"+t+" .divider").forEach((function(t){var e=t.parentElement,n=0,r=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r)&&(r=0)),t.setAttribute("x1",0-r+8),t.setAttribute("x2",n-r-8)}))):l.log.debug("No Node "+t+": "+JSON.stringify(p.node(t)))}));var A=O.getBBox();p.edges().forEach((function(t){void 0!==t&&void 0!==p.edge(t)&&(l.log.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(p.edge(t))),Object(f.drawEdge)(n,p.edge(t),p.edge(t).relation))})),A=O.getBBox();var M={id:a||"root",label:a||"root",width:0,height:0};return M.width=A.width+2*r.padding,M.height=A.height+2*r.padding,l.log.debug("Doc rendered",M,p),M};e.default={setConf:m,draw:v}},"./src/diagrams/state/styles.js":function(t,e,n){n.r(e),e.default=function(t){return"\ndefs #statediagram-barbEnd {\n fill: ".concat(t.transitionColor,";\n stroke: ").concat(t.transitionColor,";\n }\ng.stateGroup text {\n fill: ").concat(t.nodeBorder,";\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ").concat(t.textColor,";\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ").concat(t.stateLabelColor,";\n}\n\ng.stateGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.stateGroup line {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n\n.transition {\n stroke: ").concat(t.transitionColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ").concat(t.background,";\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n\n text {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ").concat(t.labelBackgroundColor,";\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n.label div .edgeLabel {\n color: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n\n.stateLabel text {\n fill: ").concat(t.stateLabelColor,";\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ").concat(t.specialStateColor,";\n stroke: ").concat(t.specialStateColor,";\n}\n\n.node .fork-join {\n fill: ").concat(t.specialStateColor,";\n stroke: ").concat(t.specialStateColor,";\n}\n\n.node circle.state-end {\n fill: ").concat(t.innerEndBackground,";\n stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ").concat(t.compositeBackground||t.background,";\n // stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ").concat(t.stateBkg||t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n.node polygon {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ").concat(t.lineColor,";\n}\n\n.statediagram-cluster rect {\n fill: ").concat(t.compositeTitleBackground,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ").concat(t.stateLabelColor,";\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ").concat(t.compositeBackground||t.background,";\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ").concat(t.noteTextColor,";\n}\n\n.statediagram-note .nodeLabel {\n color: ").concat(t.noteTextColor,";\n}\n.statediagram .edgeLabel {\n color: red; // ").concat(t.noteTextColor,";\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ").concat(t.lineColor,";\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n")}},"./src/diagrams/user-journey/journeyDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return d})),n.d(e,"clear",(function(){return f})),n.d(e,"setTitle",(function(){return p})),n.d(e,"getTitle",(function(){return g})),n.d(e,"addSection",(function(){return y})),n.d(e,"getSections",(function(){return m})),n.d(e,"getTasks",(function(){return v})),n.d(e,"addTask",(function(){return b})),n.d(e,"addTaskOrg",(function(){return _}));var r=n("./src/mermaidAPI.js"),i=n("./src/config.js");function a(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var s="",c="",l=[],u=[],h=[],d=function(t,e,n){r.default.parseDirective(this,t,e,n)},f=function(){l.length=0,u.length=0,c="",s="",h.length=0},p=function(t){s=t},g=function(){return s},y=function(t){c=t,l.push(t)},m=function(){return l},v=function(){for(var t=w(),e=0;!t&&e<100;)t=w(),e++;return u.push.apply(u,h),u},b=function(t,e){var n=e.substr(1).split(":"),r=0,i=[];1===n.length?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(","));var a=i.map((function(t){return t.trim()})),o={section:c,type:c,people:a,task:t,score:r};h.push(o)},_=function(t){var e={section:c,type:c,description:t,task:t,classes:[]};u.push(e)},w=function(){for(var t=!0,e=0;e<h.length;e++)h[e].processed,t=t&&h[e].processed;return t};e.default={parseDirective:d,getConfig:function(){return i.getConfig().journey},clear:f,setTitle:p,getTitle:g,addSection:y,getSections:m,getTasks:v,addTask:b,addTaskOrg:_,getActors:function(){return t=[],u.forEach((function(e){e.people&&t.push.apply(t,a(e.people))})),a(new Set(t)).sort();var t}}},"./src/diagrams/user-journey/journeyRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return l})),n.d(e,"draw",(function(){return f})),n.d(e,"bounds",(function(){return p})),n.d(e,"drawTasks",(function(){return m}));var r=n("d3"),i=n("./src/diagrams/user-journey/parser/journey.jison"),a=n("./src/diagrams/user-journey/journeyDb.js"),o=n("./src/diagrams/user-journey/svgDraw.js"),s=n("./src/config.js"),c=n("./src/utils.js");i.parser.yy=a.default;var l=function(t){Object.keys(t).forEach((function(e){h[e]=t[e]}))},u={},h=Object(s.getConfig)().journey,d=Object(s.getConfig)().journey.leftMargin,f=function(t,e){var n=Object(s.getConfig)().journey;i.parser.yy.clear(),i.parser.parse(t+"\n"),p.init();var a=Object(r.select)("#"+e);a.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),o.default.initGraphics(a);var l=i.parser.yy.getTasks(),h=i.parser.yy.getTitle(),f=i.parser.yy.getActors();for(var g in u)delete u[g];var y=0;f.forEach((function(t){u[t]={color:n.actorColours[y%n.actorColours.length],position:y},y++})),function(t){var e=Object(s.getConfig)().journey,n=60;Object.keys(u).forEach((function(r){var i=u[r].color,a={cx:20,cy:n,r:7,fill:i,stroke:"#000",pos:u[r].position};o.default.drawCircle(t,a);var s={x:40,y:n+7,fill:"#666",text:r,textMargin:5|e.boxTextMargin};o.default.drawText(t,s),n+=20}))}(a),p.insert(0,0,d,50*Object.keys(u).length),m(a,l,0);var v=p.getBounds();h&&a.append("text").text(h).attr("x",d).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);var b=v.stopy-v.starty+2*n.diagramMarginY,_=d+v.stopx+2*n.diagramMarginX;Object(c.configureSvgSize)(a,b,_,n.useMaxWidth),a.append("line").attr("x1",d).attr("y1",4*n.height).attr("x2",_-d-4).attr("y2",4*n.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");var w=h?70:0;a.attr("viewBox","".concat(v.startx," -25 ").concat(_," ").concat(b+w)),a.attr("preserveAspectRatio","xMinYMin meet"),a.attr("height",b+w+25)},p={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i,a=Object(s.getConfig)().journey,o=this,c=0;this.sequenceItems.forEach((function(s){c++;var l=o.sequenceItems.length-c+1;o.updateVal(s,"starty",e-l*a.boxMargin,Math.min),o.updateVal(s,"stopy",r+l*a.boxMargin,Math.max),o.updateVal(p.data,"startx",t-l*a.boxMargin,Math.min),o.updateVal(p.data,"stopx",n+l*a.boxMargin,Math.max),"activation"!==i&&(o.updateVal(s,"startx",t-l*a.boxMargin,Math.min),o.updateVal(s,"stopx",n+l*a.boxMargin,Math.max),o.updateVal(p.data,"starty",e-l*a.boxMargin,Math.min),o.updateVal(p.data,"stopy",r+l*a.boxMargin,Math.max))}))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(p.data,"startx",i,Math.min),this.updateVal(p.data,"starty",o,Math.min),this.updateVal(p.data,"stopx",a,Math.max),this.updateVal(p.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},g=h.sectionFills,y=h.sectionColours,m=function(t,e,n){for(var r=Object(s.getConfig)().journey,i="",a=n+(2*r.height+r.diagramMarginY),c=0,l="#CCC",h="black",f=0,m=0;m<e.length;m++){var v=e[m];if(i!==v.section){l=g[c%g.length],f=c%g.length,h=y[c%y.length];var b={x:m*r.taskMargin+m*r.width+d,y:50,text:v.section,fill:l,num:f,colour:h};o.default.drawSection(t,b,r),i=v.section,c++}var _=v.people.reduce((function(t,e){return u[e]&&(t[e]=u[e]),t}),{});v.x=m*r.taskMargin+m*r.width+d,v.y=a,v.width=r.diagramMarginX,v.height=r.diagramMarginY,v.colour=h,v.fill=l,v.num=f,v.actors=_,o.default.drawTask(t,v,r),p.insert(v.x,v.y,v.x+v.width+r.taskMargin,450)}};e.default={setConf:l,draw:f}},"./src/diagrams/user-journey/parser/journey.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,17,18,19,21],i=[1,15],a=[1,16],o=[1,17],s=[1,21],c=[4,6,9,11,17,18,19,21],l={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,section:18,taskName:19,taskData:20,open_directive:21,type_directive:22,arg_directive:23,close_directive:24,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"section",19:"taskName",20:"taskData",21:"open_directive",22:"type_directive",23:"arg_directive",24:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 11:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$="task";break;case 15:r.parseDirective("%%{","open_directive");break;case 16:r.parseDirective(a[s],"type_directive");break;case 17:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 18:r.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:e,7:3,12:4,21:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,21:n},{13:8,22:[1,9]},{22:[2,15]},{6:[1,10],7:18,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:a,19:o,21:n},{1:[2,2]},{14:19,15:[1,20],24:s},t([15,24],[2,16]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:18,10:22,12:4,17:i,18:a,19:o,21:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,12]),{20:[1,23]},t(r,[2,14]),{11:[1,24]},{16:25,23:[1,26]},{11:[2,18]},t(r,[2,5]),t(r,[2,13]),t(c,[2,9]),{14:27,24:s},{24:[2,17]},{11:[1,28]},t(c,[2,10])],defaultActions:{5:[2,15],7:[2,2],21:[2,18],26:[2,17]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},u={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),21;case 1:return this.begin("type_directive"),22;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),24;case 4:return 23;case 5:case 6:break;case 7:return 11;case 8:case 9:break;case 10:return 4;case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 15:return 15;case 16:return 6;case 17:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}};function h(){this.yy={}}return l.lexer=u,h.prototype=l,l.Parser=h,new h}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/user-journey/styles.js":function(t,e,n){n.r(e),e.default=function(t){return".label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ".concat(t.textColor,";\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ").concat(t.textColor,"\n }\n\n .legend {\n fill: ").concat(t.textColor,";\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ").concat(t.textColor,"\n }\n\n .face {\n ").concat(t.faceColor?"fill: ".concat(t.faceColor):"fill: #FFF8DC",";\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType0):"",";\n }\n .task-type-1, .section-type-1 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType1):"",";\n }\n .task-type-2, .section-type-2 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType2):"",";\n }\n .task-type-3, .section-type-3 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType3):"",";\n }\n .task-type-4, .section-type-4 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType4):"",";\n }\n .task-type-5, .section-type-5 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType5):"",";\n }\n .task-type-6, .section-type-6 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType6):"",";\n }\n .task-type-7, .section-type-7 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType7):"",";\n }\n\n .actor-0 {\n ").concat(t.actor0?"fill: ".concat(t.actor0):"",";\n }\n .actor-1 {\n ").concat(t.actor1?"fill: ".concat(t.actor1):"",";\n }\n .actor-2 {\n ").concat(t.actor2?"fill: ".concat(t.actor2):"",";\n }\n .actor-3 {\n ").concat(t.actor3?"fill: ".concat(t.actor3):"",";\n }\n .actor-4 {\n ").concat(t.actor4?"fill: ".concat(t.actor4):"",";\n }\n .actor-5 {\n ").concat(t.actor5?"fill: ".concat(t.actor5):"",";\n }\n\n }\n")}},"./src/diagrams/user-journey/svgDraw.js":function(t,e,n){n.r(e),n.d(e,"drawRect",(function(){return i})),n.d(e,"drawFace",(function(){return a})),n.d(e,"drawCircle",(function(){return o})),n.d(e,"drawText",(function(){return s})),n.d(e,"drawLabel",(function(){return c})),n.d(e,"drawSection",(function(){return l})),n.d(e,"drawTask",(function(){return h})),n.d(e,"drawBackgroundRect",(function(){return d})),n.d(e,"getTextObj",(function(){return f})),n.d(e,"getNoteRect",(function(){return p}));var r=n("d3"),i=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},a=function(t,e){var n,i,a=15,o=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",a).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");return s.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.score>3?(n=s,i=Object(r.arc)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(a/2.2),n.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")):e.score<3?function(t){var n=Object(r.arc)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(a/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}(s):function(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(s),o},o=function(t,e){var n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},s=function(t,e){var n=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),r},c=function(t,e){var n,r,i,a,o,c=t.append("polygon");c.attr("points",(n=e.x,r=e.y,n+","+r+" "+(n+(i=50))+","+r+" "+(n+i)+","+(r+(a=20)-(o=7))+" "+(n+i-1.2*o)+","+(r+a)+" "+n+","+(r+a))),c.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,s(t,e)},l=function(t,e,n){var r=t.append("g"),a=p();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=n.width,a.height=n.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,i(r,a),g(n)(e.text,r,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},n,e.colour)},u=-1,h=function(t,e,n){var r=e.x+n.width/2,s=t.append("g");u++,s.append("line").attr("id","task"+u).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),a(s,{cx:r,cy:300+30*(5-e.score),score:e.score});var c=p();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=n.width,c.height=n.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,i(s,c);var l=e.x+14;e.people.forEach((function(t){var n=e.actors[t].color,r={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};o(s,r),l+=10})),g(n)(e.task,s,c.x,c.y,c.width,c.height,{class:"task"},n,e.colour)},d=function(t,e){i(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},f=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},p=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},g=function(){function t(t,e,n,i,a,o,s,c){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("font-color",c).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c,l){for(var u=c.taskFontSize,h=c.taskFontFamily,d=t.split(/<br\s*\/?>/gi),f=0;f<d.length;f++){var p=f*u-u*(d.length-1)/2,g=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",l).style("text-anchor","middle").style("font-size",u).style("font-family",h);g.append("tspan").attr("x",n+a/2).attr("dy",p).text(d[f]),g.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(g,s)}}function n(t,n,i,a,o,s,c,l){var u=n.append("switch"),h=u.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,u,i,a,o,s,c,l),r(h,c)}function r(t,e){for(var n in e)n in e&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}();e.default={drawRect:i,drawCircle:o,drawSection:l,drawText:s,drawLabel:c,drawTask:h,drawBackgroundRect:d,getTextObj:f,getNoteRect:p,initGraphics:function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")}}},"./src/errorRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return a})),n.d(e,"draw",(function(){return o}));var r=n("d3"),i=n("./src/logger.js"),a=function(t){Object.keys(t).forEach((function(e){t[e]}))},o=function(t,e){try{i.log.debug("Renering svg for syntax error\n");var n=Object(r.select)("#"+t),a=n.append("g");a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1240).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),a.append("text").attr("class","error-text").attr("x",1050).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+e),n.attr("height",100),n.attr("width",400),n.attr("viewBox","768 0 512 512")}catch(zG){i.log.error("Error while rendering info diagram"),i.log.error(zG.message)}};e.default={setConf:a,draw:o}},"./src/logger.js":function(t,e,n){n.r(e),n.d(e,"LEVELS",(function(){return a})),n.d(e,"log",(function(){return o})),n.d(e,"setLogLevel",(function(){return s}));var r=n("moment-mini"),i=n.n(r),a={debug:1,info:2,warn:3,error:4,fatal:5},o={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fatal";isNaN(t)&&(t=t.toLowerCase(),void 0!==a[t]&&(t=a[t])),o.trace=function(){},o.debug=function(){},o.info=function(){},o.warn=function(){},o.error=function(){},o.fatal=function(){},t<=a.fatal&&(o.fatal=console.error?console.error.bind(console,c("FATAL"),"color: orange"):console.log.bind(console,"",c("FATAL"))),t<=a.error&&(o.error=console.error?console.error.bind(console,c("ERROR"),"color: orange"):console.log.bind(console,"",c("ERROR"))),t<=a.warn&&(o.warn=console.warn?console.warn.bind(console,c("WARN"),"color: orange"):console.log.bind(console,"",c("WARN"))),t<=a.info&&(o.info=console.info?console.info.bind(console,c("INFO"),"color: lightblue"):console.log.bind(console,"",c("INFO"))),t<=a.debug&&(o.debug=console.debug?console.debug.bind(console,c("DEBUG"),"color: lightgreen"):console.log.bind(console,"",c("DEBUG")))},c=function(t){var e=i()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")}},"./src/mermaid.js":function(t,e,n){n.r(e);var r=n("./src/logger.js"),i=n("./src/mermaidAPI.js"),a=n("./src/utils.js"),o=function(){s.startOnLoad?i.default.getConfig().startOnLoad&&s.init():void 0===s.startOnLoad&&(r.log.debug("In start, no config"),i.default.getConfig().startOnLoad&&s.init())};"undefined"!=typeof document&&
/*!
* Wait for document loaded before starting the execution
*/
window.addEventListener("load",(function(){o()}),!1);var s={startOnLoad:!0,htmlLabels:!0,mermaidAPI:i.default,parse:i.default.parse,render:i.default.render,init:function(){var t,e,n=this,o=i.default.getConfig();arguments.length>=2?(
/*! sequence config was passed as #1 */
void 0!==arguments[0]&&(s.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],r.log.debug("Callback function found")):void 0!==o.mermaid&&("function"==typeof o.mermaid.callback?(e=o.mermaid.callback,r.log.debug("Callback function found")):r.log.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,r.log.debug("Start On Load before: "+s.startOnLoad),void 0!==s.startOnLoad&&(r.log.debug("Start On Load inner: "+s.startOnLoad),i.default.updateSiteConfig({startOnLoad:s.startOnLoad})),void 0!==s.ganttConfig&&i.default.updateSiteConfig({gantt:s.ganttConfig});for(var c,l=new a.default.initIdGeneratior(o.deterministicIds,o.deterministicIDSeed),u=function(o){var s=t[o];
/*! Check if previously processed */if(s.getAttribute("data-processed"))return"continue";s.setAttribute("data-processed",!0);var u="mermaid-".concat(l.next());c=s.innerHTML,c=a.default.entityDecode(c).trim().replace(/<br\s*\/?>/gi,"<br/>");var h=a.default.detectInit(c);h&&r.log.debug("Detected early reinit: ",h);try{i.default.render(u,c,(function(t,n){s.innerHTML=t,void 0!==e&&e(u),n&&n(s)}),s)}catch(zG){r.log.warn("Syntax Error rendering"),r.log.warn(zG),n.parseError&&n.parseError(zG)}},h=0;h<t.length;h++)u(h)},initialize:function(t){void 0!==t.mermaid&&(void 0!==t.mermaid.startOnLoad&&(s.startOnLoad=t.mermaid.startOnLoad),void 0!==t.mermaid.htmlLabels&&(s.htmlLabels="false"!==t.mermaid.htmlLabels&&!1!==t.mermaid.htmlLabels)),i.default.initialize(t)},contentLoaded:o};e.default=s},"./src/mermaidAPI.js":function(t,e,n){n.r(e),n.d(e,"encodeEntities",(function(){return ot})),n.d(e,"decodeEntities",(function(){return st}));var r=n("d3"),i=n("stylis"),a=n("./package.json"),o=n("./src/config.js"),s=n("./src/diagrams/class/classDb.js"),c=n("./src/diagrams/class/classRenderer.js"),l=n("./src/diagrams/class/classRenderer-v2.js"),u=n("./src/diagrams/class/parser/classDiagram.jison"),h=n.n(u),d=n("./src/diagrams/er/erDb.js"),f=n("./src/diagrams/er/erRenderer.js"),p=n("./src/diagrams/er/parser/erDiagram.jison"),g=n.n(p),y=n("./src/diagrams/flowchart/flowDb.js"),m=n("./src/diagrams/flowchart/flowRenderer.js"),v=n("./src/diagrams/flowchart/flowRenderer-v2.js"),b=n("./src/diagrams/flowchart/parser/flow.jison"),_=n.n(b),w=n("./src/diagrams/gantt/ganttDb.js"),x=n("./src/diagrams/gantt/ganttRenderer.js"),k=n("./src/diagrams/gantt/parser/gantt.jison"),C=n.n(k),T=n("./src/diagrams/git/gitGraphAst.js"),E=n("./src/diagrams/git/gitGraphRenderer.js"),S=n("./src/diagrams/git/parser/gitGraph.jison"),O=n.n(S),A=n("./src/diagrams/info/infoDb.js"),M=n("./src/diagrams/info/infoRenderer.js"),D=n("./src/diagrams/info/parser/info.jison"),j=n.n(D),N=n("./src/diagrams/pie/parser/pie.jison"),B=n.n(N),L=n("./src/diagrams/pie/pieDb.js"),R=n("./src/diagrams/pie/pieRenderer.js"),I=n("./src/diagrams/requirement/parser/requirementDiagram.jison"),F=n.n(I),P=n("./src/diagrams/requirement/requirementDb.js"),Y=n("./src/diagrams/requirement/requirementRenderer.js"),z=n("./src/diagrams/sequence/parser/sequenceDiagram.jison"),U=n.n(z),$=n("./src/diagrams/sequence/sequenceDb.js"),W=n("./src/diagrams/sequence/sequenceRenderer.js"),q=n("./src/diagrams/state/parser/stateDiagram.jison"),H=n.n(q),V=n("./src/diagrams/state/stateDb.js"),G=n("./src/diagrams/state/stateRenderer.js"),X=n("./src/diagrams/state/stateRenderer-v2.js"),Z=n("./src/diagrams/user-journey/journeyDb.js"),Q=n("./src/diagrams/user-journey/journeyRenderer.js"),K=n("./src/diagrams/user-journey/parser/journey.jison"),J=n.n(K),tt=n("./src/errorRenderer.js"),et=n("./src/logger.js"),nt=n("./src/styles.js"),rt=n("./src/themes/index.js"),it=n("./src/utils.js");function at(t){return(at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ot=function(t){var e=t;return e=(e=(e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/#\w+;/g,(function(t){var e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}))},st=function(t){var e=t;return e=(e=(e=e.replace(/fl°°/g,(function(){return"&#"}))).replace(/fl°/g,(function(){return"&"}))).replace(/¶ß/g,(function(){return";"}))},ct={},lt=function(t,e,n){switch(et.log.debug("Directive type=".concat(e.type," with args:"),e.args),e.type){case"init":case"initialize":["config"].forEach((function(t){void 0!==e.args[t]&&("flowchart-v2"===n&&(n="flowchart"),e.args[n]=e.args[t],delete e.args[t])})),e.args,o.addDirective(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;default:et.log.warn("Unhandled directive: source: '%%{".concat(e.type,": ").concat(JSON.stringify(e.args?e.args:{}),"}%%"),e)}};function ut(t){E.default.setConf(t.git),m.default.setConf(t.flowchart),v.default.setConf(t.flowchart),void 0!==t.sequenceDiagram&&W.default.setConf(Object(it.assignWithDepth)(t.sequence,t.sequenceDiagram)),W.default.setConf(t.sequence),x.default.setConf(t.gantt),c.default.setConf(t.class),G.default.setConf(t.state),X.default.setConf(t.state),M.default.setConf(t.class),f.default.setConf(t.er),Q.default.setConf(t.journey),Y.default.setConf(t.requirement),tt.default.setConf(t.class)}function ht(){}var dt=Object.freeze({render:function(t,e,n,u){o.reset();var h=e,d=it.default.detectInit(h);d&&o.addDirective(d);var p=o.getConfig();if(e.length>p.maxTextSize&&(h="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"),void 0!==u)u.innerHTML="",Object(r.select)(u).append("div").attr("id","d"+t).attr("style","font-family: "+p.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var g=document.getElementById(t);g&&g.remove();var b=document.querySelector("#d"+t);b&&b.remove(),Object(r.select)("body").append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}window.txt=h,h=ot(h);var _=Object(r.select)("#d"+t).node(),k=it.default.detectType(h,p),C=_.firstChild,T=C.firstChild,S="";if(void 0!==p.themeCSS&&(S+="\n".concat(p.themeCSS)),void 0!==p.fontFamily&&(S+="\n:root { --mermaid-font-family: ".concat(p.fontFamily,"}")),void 0!==p.altFontFamily&&(S+="\n:root { --mermaid-alt-font-family: ".concat(p.altFontFamily,"}")),"flowchart"===k||"flowchart-v2"===k||"graph"===k){var O=m.default.getClasses(h),A=p.htmlLabels||p.flowchart.htmlLabels;for(var D in O)A?(S+="\n.".concat(D," > * { ").concat(O[D].styles.join(" !important; ")," !important; }"),S+="\n.".concat(D," span { ").concat(O[D].styles.join(" !important; ")," !important; }")):(S+="\n.".concat(D," path { ").concat(O[D].styles.join(" !important; ")," !important; }"),S+="\n.".concat(D," rect { ").concat(O[D].styles.join(" !important; ")," !important; }"),S+="\n.".concat(D," polygon { ").concat(O[D].styles.join(" !important; ")," !important; }"),S+="\n.".concat(D," ellipse { ").concat(O[D].styles.join(" !important; ")," !important; }"),S+="\n.".concat(D," circle { ").concat(O[D].styles.join(" !important; ")," !important; }"),O[D].textStyles&&(S+="\n.".concat(D," tspan { ").concat(O[D].textStyles.join(" !important; ")," !important; }")))}var j,N,B=(j="#".concat(t),N=Object(nt.default)(k,S,p.themeVariables),Object(i.serialize)(Object(i.compile)("".concat(j,"{").concat(N,"}")),i.stringify)),L=document.createElement("style");L.innerHTML="#".concat(t," ")+B,C.insertBefore(L,T);try{switch(k){case"git":p.flowchart.arrowMarkerAbsolute=p.arrowMarkerAbsolute,E.default.setConf(p.git),E.default.draw(h,t,!1);break;case"flowchart":p.flowchart.arrowMarkerAbsolute=p.arrowMarkerAbsolute,m.default.setConf(p.flowchart),m.default.draw(h,t,!1);break;case"flowchart-v2":p.flowchart.arrowMarkerAbsolute=p.arrowMarkerAbsolute,v.default.setConf(p.flowchart),v.default.draw(h,t,!1);break;case"sequence":p.sequence.arrowMarkerAbsolute=p.arrowMarkerAbsolute,p.sequenceDiagram?(W.default.setConf(Object.assign(p.sequence,p.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):W.default.setConf(p.sequence),W.default.draw(h,t);break;case"gantt":p.gantt.arrowMarkerAbsolute=p.arrowMarkerAbsolute,x.default.setConf(p.gantt),x.default.draw(h,t);break;case"class":p.class.arrowMarkerAbsolute=p.arrowMarkerAbsolute,c.default.setConf(p.class),c.default.draw(h,t);break;case"classDiagram":p.class.arrowMarkerAbsolute=p.arrowMarkerAbsolute,l.default.setConf(p.class),l.default.draw(h,t);break;case"state":p.class.arrowMarkerAbsolute=p.arrowMarkerAbsolute,G.default.setConf(p.state),G.default.draw(h,t);break;case"stateDiagram":p.class.arrowMarkerAbsolute=p.arrowMarkerAbsolute,X.default.setConf(p.state),X.default.draw(h,t);break;case"info":p.class.arrowMarkerAbsolute=p.arrowMarkerAbsolute,M.default.setConf(p.class),M.default.draw(h,t,a.version);break;case"pie":R.default.draw(h,t,a.version);break;case"er":f.default.setConf(p.er),f.default.draw(h,t,a.version);break;case"journey":Q.default.setConf(p.journey),Q.default.draw(h,t,a.version);break;case"requirement":Y.default.setConf(p.requirement),Y.default.draw(h,t,a.version)}}catch(zG){throw tt.default.draw(t,a.version),zG}Object(r.select)('[id="'.concat(t,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var I=Object(r.select)("#d"+t).node().innerHTML;if(et.log.debug("cnf.arrowMarkerAbsolute",p.arrowMarkerAbsolute),p.arrowMarkerAbsolute&&"false"!==p.arrowMarkerAbsolute||(I=I.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),I=(I=st(I)).replace(/<br>/g,"<br/>"),void 0!==n)switch(k){case"flowchart":case"flowchart-v2":n(I,y.default.bindFunctions);break;case"gantt":n(I,w.default.bindFunctions);break;case"class":case"classDiagram":n(I,s.default.bindFunctions);break;default:n(I)}else et.log.debug("CB = undefined!");var F=Object(r.select)("#d"+t).node();return null!==F&&"function"==typeof F.remove&&Object(r.select)("#d"+t).node().remove(),I},parse:function(t){var e=o.getConfig(),n=it.default.detectInit(t,e);n&&et.log.debug("reinit ",n);var r,i=it.default.detectType(t,e);switch(et.log.debug("Type "+i),i){case"git":(r=O.a).parser.yy=T.default;break;case"flowchart":case"flowchart-v2":y.default.clear(),(r=_.a).parser.yy=y.default;break;case"sequence":(r=U.a).parser.yy=$.default;break;case"gantt":(r=C.a).parser.yy=w.default;break;case"class":case"classDiagram":(r=h.a).parser.yy=s.default;break;case"state":case"stateDiagram":(r=H.a).parser.yy=V.default;break;case"info":et.log.debug("info info info"),(r=j.a).parser.yy=A.default;break;case"pie":et.log.debug("pie"),(r=B.a).parser.yy=L.default;break;case"er":et.log.debug("er"),(r=g.a).parser.yy=d.default;break;case"journey":et.log.debug("Journey"),(r=J.a).parser.yy=Z.default;break;case"requirement":case"requirementDiagram":et.log.debug("RequirementDiagram"),(r=F.a).parser.yy=P.default}return r.parser.yy.graphType=i,r.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},r.parse(t),r},parseDirective:function(t,e,n,r){try{if(void 0!==e)switch(e=e.trim(),n){case"open_directive":ct={};break;case"type_directive":ct.type=e.toLowerCase();break;case"arg_directive":ct.args=JSON.parse(e);break;case"close_directive":lt(t,ct,r),ct=null}}catch(i){et.log.error("Error while rendering sequenceDiagram directive: ".concat(e," jison context: ").concat(n)),et.log.error(i.message)}},initialize:function(t){t&&t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),o.saveConfigFromInitilize(t),t&&t.theme&&rt.default[t.theme]?t.themeVariables=rt.default[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=rt.default.default.getThemeVariables(t.themeVariables));var e="object"===at(t)?o.setSiteConfig(t):o.getSiteConfig();ut(e),Object(et.setLogLevel)(e.logLevel)},reinitialize:ht,getConfig:o.getConfig,setConfig:o.setConfig,getSiteConfig:o.getSiteConfig,updateSiteConfig:o.updateSiteConfig,reset:function(){o.reset()},globalReset:function(){o.reset(o.defaultConfig),ut(o.getConfig())},defaultConfig:o.defaultConfig});Object(et.setLogLevel)(o.getConfig().logLevel),o.reset(o.getConfig()),e.default=dt},"./src/styles.js":function(t,e,n){n.r(e),n.d(e,"calcThemeVariables",(function(){return g}));var r=n("./src/diagrams/class/styles.js"),i=n("./src/diagrams/er/styles.js"),a=n("./src/diagrams/flowchart/styles.js"),o=n("./src/diagrams/gantt/styles.js"),s=n("./src/diagrams/git/styles.js"),c=n("./src/diagrams/info/styles.js"),l=n("./src/diagrams/pie/styles.js"),u=n("./src/diagrams/requirement/styles.js"),h=n("./src/diagrams/sequence/styles.js"),d=n("./src/diagrams/state/styles.js"),f=n("./src/diagrams/user-journey/styles.js"),p={flowchart:a.default,"flowchart-v2":a.default,sequence:h.default,gantt:o.default,classDiagram:r.default,"classDiagram-v2":r.default,class:r.default,stateDiagram:d.default,state:d.default,git:s.default,info:c.default,pie:l.default,er:i.default,journey:f.default,requirement:u.default},g=function(t,e){return t.calcColors(e)};e.default=function(t,e,n){return" {\n font-family: ".concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n fill: ").concat(n.textColor,"\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ").concat(n.errorBkgColor,";\n }\n .error-text {\n fill: ").concat(n.errorTextColor,";\n stroke: ").concat(n.errorTextColor,";\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ").concat(n.lineColor,";\n stroke: ").concat(n.lineColor,";\n }\n .marker.cross {\n stroke: ").concat(n.lineColor,";\n }\n\n svg {\n font-family: ").concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n }\n\n ").concat(p[t](n),"\n\n ").concat(e,"\n")}},"./src/themes/index.js":function(t,e,n){n.r(e);var r=n("./src/themes/theme-base.js"),i=n("./src/themes/theme-dark.js"),a=n("./src/themes/theme-default.js"),o=n("./src/themes/theme-forest.js"),s=n("./src/themes/theme-neutral.js");e.default={base:{getThemeVariables:r.getThemeVariables},dark:{getThemeVariables:i.getThemeVariables},default:{getThemeVariables:a.getThemeVariables},forest:{getThemeVariables:o.getThemeVariables},neutral:{getThemeVariables:s.getThemeVariables}}},"./src/themes/theme-base.js":function(t,e,n){n.r(e),n.d(e,"getThemeVariables",(function(){return c}));var r=n("khroma"),i=n("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}var e,n,s;return e=t,(n=[{key:"updateColors",value:function(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#ddd":"#333"),this.secondaryColor=this.secondaryColor||Object(r.adjust)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Object(r.adjust)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Object(i.mkBorder)(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Object(r.invert)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Object(r.invert)(this.tertiaryColor),this.lineColor=this.lineColor||Object(r.invert)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Object(r.darken)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Object(r.darken)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Object(r.invert)(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Object(r.lighten)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Object(r.adjust)(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Object(r.adjust)(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Object(r.adjust)(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Object(r.adjust)(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Object(r.adjust)(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Object(r.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Object(r.adjust)(this.primaryColor,{l:-10}),this.pie5=this.pie5||Object(r.adjust)(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Object(r.adjust)(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Object(r.adjust)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Object(r.adjust)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Object(r.adjust)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Object(r.adjust)(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Object(r.adjust)(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Object(r.adjust)(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Object(r.darken)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&o(e.prototype,n),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),e}},"./src/themes/theme-dark.js":function(t,e,n){n.r(e),n.d(e,"getThemeVariables",(function(){return c}));var r=n("khroma"),i=n("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Object(r.lighten)(this.primaryColor,16),this.tertiaryColor=Object(r.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(r.invert)(this.primaryColor),this.secondaryTextColor=Object(r.invert)(this.secondaryColor),this.tertiaryTextColor=Object(r.invert)(this.tertiaryColor),this.lineColor=Object(r.invert)(this.background),this.textColor=Object(r.invert)(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Object(r.lighten)(Object(r.invert)("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=Object(r.rgba)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Object(r.darken)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=Object(r.rgba)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Object(r.rgba)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}var e,n,s;return e=t,(n=[{key:"updateColors",value:function(){this.secondBkg=Object(r.lighten)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Object(r.lighten)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Object(r.lighten)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(r.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(r.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(r.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(r.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(r.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(r.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#0b0000",this.pie2=this.pie2||"#4d1037",this.pie3=this.pie3||"#3f5258",this.pie4=this.pie4||"#4f2f1b",this.pie5=this.pie5||"#6e0a0a",this.pie6=this.pie6||"#3b0048",this.pie7=this.pie7||"#995a01",this.pie8=this.pie8||"#154706",this.pie9=this.pie9||"#161722",this.pie10=this.pie10||"#00296f",this.pie11=this.pie11||"#01629c",this.pie12=this.pie12||"#010029",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Object(r.darken)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&o(e.prototype,n),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),e}},"./src/themes/theme-default.js":function(t,e,n){n.r(e),n.d(e,"getThemeVariables",(function(){return c}));var r=n("khroma"),i=n("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Object(r.adjust)(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Object(r.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(r.invert)(this.primaryColor),this.secondaryTextColor=Object(r.invert)(this.secondaryColor),this.tertiaryTextColor=Object(r.invert)(this.tertiaryColor),this.lineColor=Object(r.invert)(this.background),this.textColor=Object(r.invert)(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Object(r.rgba)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}var e,n,s;return e=t,(n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=Object(r.lighten)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(r.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(r.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(r.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(r.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(r.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(r.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Object(r.adjust)(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Object(r.adjust)(this.primaryColor,{l:-10}),this.pie5=this.pie5||Object(r.adjust)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Object(r.adjust)(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Object(r.adjust)(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Object(r.adjust)(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Object(r.adjust)(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Object(r.adjust)(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Object(r.adjust)(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Object(r.adjust)(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&o(e.prototype,n),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),e}},"./src/themes/theme-forest.js":function(t,e,n){n.r(e),n.d(e,"getThemeVariables",(function(){return c}));var r=n("khroma"),i=n("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Object(r.lighten)("#cde498",10),this.primaryBorderColor=Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(r.invert)(this.primaryColor),this.secondaryTextColor=Object(r.invert)(this.secondaryColor),this.tertiaryTextColor=Object(r.invert)(this.primaryColor),this.lineColor=Object(r.invert)(this.background),this.textColor=Object(r.invert)(this.background),this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n,s;return e=t,(n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=Object(r.darken)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(r.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(r.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(r.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(r.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(r.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(r.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Object(r.adjust)(this.primaryColor,{l:-30}),this.pie5=this.pie5||Object(r.adjust)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Object(r.adjust)(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Object(r.adjust)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Object(r.adjust)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Object(r.adjust)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Object(r.adjust)(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Object(r.adjust)(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Object(r.adjust)(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&o(e.prototype,n),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),e}},"./src/themes/theme-helpers.js":function(t,e,n){n.r(e),n.d(e,"mkBorder",(function(){return i}));var r=n("khroma"),i=function(t,e){return e?Object(r.adjust)(t,{s:-40,l:10}):Object(r.adjust)(t,{s:-40,l:-10})}},"./src/themes/theme-neutral.js":function(t,e,n){n.r(e),n.d(e,"getThemeVariables",(function(){return c}));var r=n("khroma"),i=n("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Object(r.lighten)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Object(r.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(r.invert)(this.primaryColor),this.secondaryTextColor=Object(r.invert)(this.secondaryColor),this.tertiaryTextColor=Object(r.invert)(this.tertiaryColor),this.lineColor=Object(r.invert)(this.background),this.textColor=Object(r.invert)(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n,s;return e=t,(n=[{key:"updateColors",value:function(){this.secondBkg=Object(r.lighten)(this.contrast,55),this.border2=this.contrast,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=Object(r.lighten)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=Object(r.lighten)(this.contrast,30),this.sectionBkgColor2=Object(r.lighten)(this.contrast,30),this.taskBorderColor=Object(r.darken)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Object(r.lighten)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Object(r.darken)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(r.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(r.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(r.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(r.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(r.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(r.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#F4F4F4",this.pie2=this.pie2||"#555",this.pie3=this.pie3||"#BBB",this.pie4=this.pie4||"#777",this.pie5=this.pie5||"#999",this.pie6=this.pie6||"#DDD",this.pie7=this.pie7||"#FFF",this.pie8=this.pie8||"#DDD",this.pie9=this.pie9||"#BBB",this.pie10=this.pie10||"#999",this.pie11=this.pie11||"#777",this.pie12=this.pie12||"#555",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&o(e.prototype,n),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),e}},"./src/utils.js":function(t,e,n){n.r(e),n.d(e,"detectInit",(function(){return b})),n.d(e,"detectDirective",(function(){return _})),n.d(e,"detectType",(function(){return w})),n.d(e,"isSubstringInArray",(function(){return k})),n.d(e,"interpolateToCurve",(function(){return C})),n.d(e,"formatUrl",(function(){return T})),n.d(e,"runFunc",(function(){return E})),n.d(e,"getStylesFromArray",(function(){return O})),n.d(e,"generateId",(function(){return M})),n.d(e,"random",(function(){return D})),n.d(e,"assignWithDepth",(function(){return j})),n.d(e,"getTextObj",(function(){return N})),n.d(e,"drawSimpleText",(function(){return B})),n.d(e,"wrapLabel",(function(){return L})),n.d(e,"calculateTextHeight",(function(){return I})),n.d(e,"calculateTextWidth",(function(){return F})),n.d(e,"calculateTextDimensions",(function(){return P})),n.d(e,"calculateSvgSizeAttrs",(function(){return Y})),n.d(e,"configureSvgSize",(function(){return z})),n.d(e,"initIdGeneratior",(function(){return U})),n.d(e,"entityDecode",(function(){return $}));var r=n("@braintree/sanitize-url"),i=n("d3"),a=n("./src/diagrams/common/common.js"),o=n("./src/logger.js"),s=void 0;function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=d(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||d(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var p,g={curveBasis:i.curveBasis,curveBasisClosed:i.curveBasisClosed,curveBasisOpen:i.curveBasisOpen,curveLinear:i.curveLinear,curveLinearClosed:i.curveLinearClosed,curveMonotoneX:i.curveMonotoneX,curveMonotoneY:i.curveMonotoneY,curveNatural:i.curveNatural,curveStep:i.curveStep,curveStepAfter:i.curveStepAfter,curveStepBefore:i.curveStepBefore},y=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,m=/\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,v=/\s*%%.*\n/gm,b=function(t,e){var n=_(t,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){var i=n.map((function(t){return t.args}));r=j(r,h(i))}else r=n.args;if(r){var a=w(t,e);["config"].forEach((function(t){void 0!==r[t]&&("flowchart-v2"===a&&(a="flowchart"),r[a]=r[t],delete r[t])}))}return r},_=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n=new RegExp("[%]{2}(?![{]".concat(m.source,")(?=[}][%]{2}).*\n"),"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),o.log.debug("Detecting diagram directive".concat(null!==e?" type:"+e:""," based on the text:").concat(t));for(var r,i=[];null!==(r=y.exec(t));)if(r.index===y.lastIndex&&y.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){var a=r[1]?r[1]:r[2],s=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:a,args:s})}return 0===i.length&&i.push({type:t,args:null}),1===i.length?i[0]:i}catch(c){return o.log.error("ERROR: ".concat(c.message," - Unable to parse directive\n ").concat(null!==e?" type:"+e:""," based on the text:").concat(t)),{type:null,args:null}}},w=function(t,e){return t=t.replace(y,"").replace(v,"\n"),o.log.debug("Detecting diagram type based on the text "+t),t.match(/^\s*sequenceDiagram/)?"sequence":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram-v2/)?"classDiagram":t.match(/^\s*classDiagram/)?e&&e.class&&"dagre-wrapper"===e.class.defaultRenderer?"classDiagram":"class":t.match(/^\s*stateDiagram-v2/)?"stateDiagram":t.match(/^\s*stateDiagram/)?e&&e.class&&"dagre-wrapper"===e.state.defaultRenderer?"stateDiagram":"state":t.match(/^\s*gitGraph/)?"git":t.match(/^\s*flowchart/)?"flowchart-v2":t.match(/^\s*info/)?"info":t.match(/^\s*pie/)?"pie":t.match(/^\s*erDiagram/)?"er":t.match(/^\s*journey/)?"journey":t.match(/^\s*requirement/)||t.match(/^\s*requirementDiagram/)?"requirement":e&&e.flowchart&&"dagre-wrapper"===e.flowchart.defaultRenderer?"flowchart-v2":"flowchart"},x=function(t,e){var n={};return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=e?e.apply(s,i):i[0];if(o in n)return n[o];var c=t.apply(void 0,i);return n[o]=c,c}},k=function(t,e){for(var n=0;n<e.length;n++)if(e[n].match(t))return n;return-1},C=function(t,e){if(!t)return e;var n="curve".concat(t.charAt(0).toUpperCase()+t.slice(1));return g[n]||e},T=function(t,e){var n=t.trim();if(n)return"loose"!==e.securityLevel?Object(r.sanitizeUrl)(n):n},E=function(t){for(var e,n=t.split("."),r=n.length-1,i=n[r],a=window,o=0;o<r;o++)if(!(a=a[n[o]]))return;for(var s=arguments.length,c=new Array(s>1?s-1:0),l=1;l<s;l++)c[l-1]=arguments[l];(e=a)[i].apply(e,c)},S=function(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0},O=function(t){for(var e="",n="",r=0;r<t.length;r++)void 0!==t[r]&&(t[r].startsWith("color:")||t[r].startsWith("text-align:")?n=n+t[r]+";":e=e+t[r]+";");return{style:e,labelStyle:n}},A=0,M=function(){return A++,"id-"+Math.random().toString(36).substr(2,12)+"-"+A},D=function(t){return function(t){for(var e="",n="0123456789abcdef",r=n.length,i=0;i<t;i++)e+=n.charAt(Math.floor(Math.random()*r));return e}(t.length)},j=function t(e,n,r){var i=Object.assign({depth:2,clobber:!1},r),a=i.depth,o=i.clobber;return Array.isArray(n)&&!Array.isArray(e)?(n.forEach((function(n){return t(e,n,r)})),e):Array.isArray(n)&&Array.isArray(e)?(n.forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),e):void 0===e||a<=0?null!=e&&"object"===u(e)&&"object"===u(n)?Object.assign(e,n):n:(void 0!==n&&"object"===u(e)&&"object"===u(n)&&Object.keys(n).forEach((function(r){"object"!==u(n[r])||void 0!==e[r]&&"object"!==u(e[r])?(o||"object"!==u(e[r])&&"object"!==u(n[r]))&&(e[r]=n[r]):(void 0===e[r]&&(e[r]=Array.isArray(n[r])?[]:{}),e[r]=t(e[r],n[r],{depth:a-1,clobber:o}))})),e)},N=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},B=function(t,e){var n=e.text.replace(a.default.lineBreakRegex," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",e.fontSize),r.style("font-weight",e.fontWeight),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(n),r},L=x((function(t,e,n){if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),a.default.lineBreakRegex.test(t))return t;var r=t.split(" "),i=[],o="";return r.forEach((function(t,a){var s=F("".concat(t," "),n),c=F(o,n);if(s>e){var l=R(t,e,"-",n),u=l.hyphenatedStrings,d=l.remainingWord;i.push.apply(i,[o].concat(h(u))),o=d}else c+s>=e?(i.push(o),o=t):o=[o,t].filter(Boolean).join(" ");a+1===r.length&&i.push(o)})),i.filter((function(t){return""!==t})).join(n.joinWith)}),(function(t,e,n){return"".concat(t,"-").concat(e,"-").concat(n.fontSize,"-").concat(n.fontWeight,"-").concat(n.fontFamily,"-").concat(n.joinWith)})),R=x((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);var i=t.split(""),a=[],o="";return i.forEach((function(t,s){var c="".concat(o).concat(t);if(F(c,r)>=e){var l=s+1,u=i.length===l,h="".concat(c).concat(n);a.push(u?c:h),o=""}else o=c})),{hyphenatedStrings:a,remainingWord:o}}),(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;return"".concat(t,"-").concat(e,"-").concat(n,"-").concat(r.fontSize,"-").concat(r.fontWeight,"-").concat(r.fontFamily)})),I=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),P(t,e).height},F=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),P(t,e).width},P=x((function(t,e){var n=e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),r=n.fontSize,o=n.fontFamily,s=n.fontWeight;if(!t)return{width:0,height:0};var c=["sans-serif",o],u=t.split(a.default.lineBreakRegex),h=[],d=Object(i.select)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};for(var f=d.append("svg"),p=0,g=c;p<g.length;p++){var y,m=g[p],v=0,b={width:0,height:0,lineHeight:0},_=l(u);try{for(_.s();!(y=_.n()).done;){var w=y.value,x=N();x.text=w;var k=B(f,x).style("font-size",r).style("font-weight",s).style("font-family",m),C=(k._groups||k)[0][0].getBBox();b.width=Math.round(Math.max(b.width,C.width)),v=Math.round(C.height),b.height+=v,b.lineHeight=Math.round(Math.max(b.lineHeight,v))}}catch(T){_.e(T)}finally{_.f()}h.push(b)}return f.remove(),h[isNaN(h[1].height)||isNaN(h[1].width)||isNaN(h[1].lineHeight)||h[0].height>h[1].height&&h[0].width>h[1].width&&h[0].lineHeight>h[1].lineHeight?0:1]}),(function(t,e){return"".concat(t,"-").concat(e.fontSize,"-").concat(e.fontWeight,"-").concat(e.fontFamily)})),Y=function(t,e,n){var r=new Map;return r.set("height",t),n?(r.set("width","100%"),r.set("style","max-width: ".concat(e,"px;"))):r.set("width",e),r},z=function(t,e,n,r){!function(t,e){var n,r=l(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.attr(i[0],i[1])}}catch(a){r.e(a)}finally{r.f()}}(t,Y(e,n,r))},U=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.deterministic=e,this.seed=n,this.count=n?n.length:0}var e,n,r;return e=t,(n=[{key:"next",value:function(){return this.deterministic?this.count++:Date.now()}}])&&c(e.prototype,n),r&&c(e,r),t}(),$=function(t){return p=p||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),p.innerHTML=t,unescape(p.textContent)};e.default={assignWithDepth:j,wrapLabel:L,calculateTextHeight:I,calculateTextWidth:F,calculateTextDimensions:P,calculateSvgSizeAttrs:Y,configureSvgSize:z,detectInit:b,detectDirective:_,detectType:w,isSubstringInArray:k,interpolateToCurve:C,calcLabelPosition:function(t){return function(t){var e,n=0;t.forEach((function(t){n+=S(t,e),e=t}));var r=n/2,i=void 0;return e=void 0,t.forEach((function(t){if(e&&!i){var n=S(t,e);if(n<r)r-=n;else{var a=r/n;a<=0&&(i=e),a>=1&&(i={x:t.x,y:t.y}),a>0&&a<1&&(i={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),i}(t)},calcCardinalityPosition:function(t,e,n){var r;o.log.info("our points",e),e[0]!==n&&(e=e.reverse()),e.forEach((function(t){S(t,r),r=t}));var i,a=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=S(t,r);if(e<a)a-=e;else{var n=a/e;n<=0&&(i=r),n>=1&&(i={x:t.x,y:t.y}),n>0&&n<1&&(i={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var s=t?10:5,c=Math.atan2(e[0].y-i.y,e[0].x-i.x),l={x:0,y:0};return l.x=Math.sin(c)*s+(e[0].x+i.x)/2,l.y=-Math.cos(c)*s+(e[0].y+i.y)/2,l},calcTerminalLabelPosition:function(t,e,n){var r,i=JSON.parse(JSON.stringify(n));o.log.info("our points",i),"start_left"!==e&&"start_right"!==e&&(i=i.reverse()),i.forEach((function(t){S(t,r),r=t}));var a,s=25;r=void 0,i.forEach((function(t){if(r&&!a){var e=S(t,r);if(e<s)s-=e;else{var n=s/e;n<=0&&(a=r),n>=1&&(a={x:t.x,y:t.y}),n>0&&n<1&&(a={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var c=10,l=Math.atan2(i[0].y-a.y,i[0].x-a.x),u={x:0,y:0};return u.x=Math.sin(l)*c+(i[0].x+a.x)/2,u.y=-Math.cos(l)*c+(i[0].y+a.y)/2,"start_left"===e&&(u.x=Math.sin(l+Math.PI)*c+(i[0].x+a.x)/2,u.y=-Math.cos(l+Math.PI)*c+(i[0].y+a.y)/2),"end_right"===e&&(u.x=Math.sin(l-Math.PI)*c+(i[0].x+a.x)/2-5,u.y=-Math.cos(l-Math.PI)*c+(i[0].y+a.y)/2-5),"end_left"===e&&(u.x=Math.sin(l)*c+(i[0].x+a.x)/2-5,u.y=-Math.cos(l)*c+(i[0].y+a.y)/2-5),u},formatUrl:T,getStylesFromArray:O,generateId:M,random:D,memoize:x,runFunc:E,entityDecode:$,initIdGeneratior:U}},"@braintree/sanitize-url":function(t,e){t.exports=ba},d3:function(t,e){t.exports=WE},dagre:function(t,e){t.exports=g$},"dagre-d3":function(t,e){t.exports=BW},"dagre-d3/lib/label/add-html-label.js":function(t,e){t.exports=I$},dompurify:function(t,e){t.exports=Mq},graphlib:function(t,e){t.exports=$I},khroma:function(t,e){t.exports=Dq},"moment-mini":function(t,e){t.exports=NG.exports},stylis:function(t,e){t.exports=BG.exports}}).default;var LG={},RG={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getWordsByCategory=t.wordList=void 0,t.wordList={noun:[{word:"mother",categories:["people","family"]},{word:"father",categories:["people","family"]},{word:"baby",categories:["people","family"]},{word:"child",categories:["people","family"]},{word:"toddler",categories:["people","family"]},{word:"teenager",categories:["people","family"]},{word:"grandmother",categories:["people","family"]},{word:"student",categories:["people","education"]},{word:"teacher",categories:["people","education"]},{word:"minister",categories:["people","religion"]},{word:"businessperson",categories:["people","business"]},{word:"salesclerk",categories:["people","business"]},{word:"woman",categories:["people"]},{word:"man",categories:["people"]},{word:"lion",categories:["animals"]},{word:"tiger",categories:["animals"]},{word:"bear",categories:["animals"]},{word:"dog",categories:["animals"]},{word:"cat",categories:["animals"]},{word:"alligator",categories:["animals"]},{word:"cricket",categories:["animals"]},{word:"bird",categories:["animals"]},{word:"wolf",categories:["animals"]},{word:"table",categories:["thing"]},{word:"truck",categories:["thing","transportation"]},{word:"book",categories:["thing","education"]},{word:"pencil",categories:["thing","education"]},{word:"computer",categories:["thing","technology"]},{word:"coat",categories:["thing"]},{word:"boots",categories:["thing"]},{word:"city",categories:["place"]},{word:"state",categories:["place"]},{word:"country",categories:["place"]},{word:"continent",categories:["place"]},{word:"coffeeshop",categories:["place"]},{word:"restaurant",categories:["place"]},{word:"park",categories:["place"]},{word:"actor",categories:["profession"]},{word:"advertisement",categories:["media"]},{word:"afternoon",categories:["time"]},{word:"airport",categories:["transportation"]},{word:"ambulance",categories:["health"]},{word:"animal",categories:["animals"]},{word:"answer",categories:["thing"]},{word:"apple",categories:["food"]},{word:"army",categories:["thing"]},{word:"australia",categories:["place"]},{word:"balloon",categories:["thing"]},{word:"banana",categories:["food"]},{word:"battery",categories:["thing"]},{word:"beach",categories:["place"]},{word:"beard",categories:["thing"]},{word:"bed",categories:["thing"]},{word:"belgium",categories:["place"]},{word:"boy",categories:["people"]},{word:"branch",categories:["thing"]},{word:"breakfast",categories:["thing"]},{word:"brother",categories:["family"]},{word:"camera",categories:["thing"]},{word:"candle",categories:["thing"]},{word:"car",categories:["transportation"]},{word:"caravan",categories:["transportation"]},{word:"carpet",categories:["thing"]},{word:"cartoon",categories:["media"]},{word:"china",categories:["place"]},{word:"church",categories:["religion"]},{word:"crayon",categories:["thing"]},{word:"crowd",categories:["people"]},{word:"daughter",categories:["family"]},{word:"death",categories:["thing"]},{word:"denmark",categories:["place"]},{word:"diamond",categories:["thing"]},{word:"dinner",categories:["food"]},{word:"disease",categories:["thing"]},{word:"doctor",categories:["profession"]},{word:"dog",categories:["animals"]},{word:"dream",categories:["thing"]},{word:"dress",categories:["thing"]},{word:"easter",categories:["religion"]},{word:"egg",categories:["food"]},{word:"eggplant",categories:["food"]},{word:"egypt",categories:["place"]},{word:"elephant",categories:["animals"]},{word:"energy",categories:["thing"]},{word:"engine",categories:["transportation"]},{word:"england",categories:["place"]},{word:"evening",categories:["thing"]},{word:"eye",categories:["thing"]},{word:"family",categories:["family"]},{word:"finland",categories:["place"]},{word:"fish",categories:["animals"]},{word:"flag",categories:["thing"]},{word:"flower",categories:["thing"]},{word:"football",categories:["sports"]},{word:"forest",categories:["place"]},{word:"fountain",categories:["thing"]},{word:"france",categories:["place"]},{word:"furniture",categories:["thing"]},{word:"garage",categories:["place"]},{word:"gold",categories:["thing"]},{word:"grass",categories:["thing"]},{word:"greece",categories:["place"]},{word:"guitar",categories:["thing"]},{word:"hair",categories:["thing"]},{word:"hamburger",categories:["food"]},{word:"helicopter",categories:["transportation"]},{word:"helmet",categories:["thing"]},{word:"holiday",categories:["thing"]},{word:"honey",categories:["food"]},{word:"horse",categories:["animals"]},{word:"hospital",categories:["place"]},{word:"house",categories:["place"]},{word:"hydrogen",categories:["science"]},{word:"ice",categories:["science"]},{word:"insect",categories:["animals"]},{word:"insurance",categories:["thing"]},{word:"iron",categories:["science"]},{word:"island",categories:["place"]},{word:"jackal",categories:["animals"]},{word:"jelly",categories:["food"]},{word:"jewellery",categories:["thing"]},{word:"jordan",categories:["place"]},{word:"juice",categories:["food"]},{word:"kangaroo",categories:["animals"]},{word:"king",categories:["people"]},{word:"kitchen",categories:["place"]},{word:"kite",categories:["thing"]},{word:"knife",categories:["thing"]},{word:"lamp",categories:["thing"]},{word:"lawyer",categories:["profession"]},{word:"leather",categories:["thing"]},{word:"library",categories:["place"]},{word:"lighter",categories:["thing"]},{word:"lion",categories:["animals"]},{word:"lizard",categories:["animals"]},{word:"lock",categories:["thing"]},{word:"london",categories:["place"]},{word:"lunch",categories:["food"]},{word:"machine",categories:["science"]},{word:"magazine",categories:["media"]},{word:"magician",categories:["people"]},{word:"manchester",categories:["place"]},{word:"market",categories:["place"]},{word:"match",categories:["thing"]},{word:"microphone",categories:["thing"]},{word:"monkey",categories:["animals"]},{word:"morning",categories:["thing"]},{word:"motorcycle",categories:["transportation"]},{word:"nail",categories:["thing"]},{word:"napkin",categories:["thing"]},{word:"needle",categories:["thing"]},{word:"nest",categories:["thing"]},{word:"nigeria",categories:["place"]},{word:"night",categories:["thing"]},{word:"notebook",categories:["thing"]},{word:"ocean",categories:["place"]},{word:"oil",categories:["thing"]},{word:"orange",categories:["food"]},{word:"oxygen",categories:["science"]},{word:"oyster",categories:["animals"]},{word:"ghost",categories:["thing"]},{word:"painting",categories:["media"]},{word:"parrot",categories:["animals"]},{word:"pencil",categories:["thing"]},{word:"piano",categories:["thing"]},{word:"pillow",categories:["thing"]},{word:"pizza",categories:["food"]},{word:"planet",categories:["science"]},{word:"plastic",categories:["thing"]},{word:"portugal",categories:["place"]},{word:"potato",categories:["food"]},{word:"queen",categories:["people"]},{word:"quill",categories:["thing"]},{word:"rain",categories:["thing"]},{word:"rainbow",categories:["science"]},{word:"raincoat",categories:["thing"]},{word:"refrigerator",categories:["food"]},{word:"restaurant",categories:["place"]},{word:"river",categories:["thing"]},{word:"rocket",categories:["science"]},{word:"room",categories:["place"]},{word:"rose",categories:["thing"]},{word:"russia",categories:["place"]},{word:"sandwich",categories:["food"]},{word:"school",categories:["education"]},{word:"scooter",categories:["transportation"]},{word:"shampoo",categories:["thing"]},{word:"shoe",categories:["thing"]},{word:"soccer",categories:["sports"]},{word:"spoon",categories:["thing"]},{word:"stone",categories:["thing"]},{word:"sugar",categories:["food"]},{word:"sweden",categories:["place"]},{word:"teacher",categories:["education"]},{word:"telephone",categories:["thing"]},{word:"television",categories:["media"]},{word:"tent",categories:["thing"]},{word:"thailand",categories:["place"]},{word:"tomato",categories:["food"]},{word:"toothbrush",categories:["thing"]},{word:"traffic",categories:["thing"]},{word:"train",categories:["transportation"]},{word:"truck",categories:["transportation"]},{word:"uganda",categories:["place"]},{word:"umbrella",categories:["thing"]},{word:"van",categories:["transportation"]},{word:"vase",categories:["thing"]},{word:"vegetable",categories:["food"]},{word:"vulture",categories:["animals"]},{word:"wall",categories:["thing"]},{word:"whale",categories:["animals"]},{word:"window",categories:["thing"]},{word:"wire",categories:["thing"]},{word:"xylophone",categories:["thing"]},{word:"yacht",categories:["transportation"]},{word:"yak",categories:["animals"]},{word:"zebra",categories:["animals"]},{word:"zoo",categories:["animals"]},{word:"garden",categories:["food"]},{word:"gas",categories:["transportation"]},{word:"girl",categories:["people"]},{word:"glass",categories:["thing"]}],adjective:[{word:"attractive",categories:["appearance"]},{word:"bald",categories:["appearance"]},{word:"beautiful",categories:["appearance"]},{word:"chubby",categories:["appearance"]},{word:"clean",categories:["appearance"]},{word:"dazzling",categories:["appearance"]},{word:"drab",categories:["appearance"]},{word:"elegant",categories:["appearance"]},{word:"fancy",categories:["appearance"]},{word:"fit",categories:["appearance"]},{word:"flabby",categories:["appearance"]},{word:"glamorous",categories:["appearance"]},{word:"gorgeous",categories:["appearance"]},{word:"handsome",categories:["appearance"]},{word:"long",categories:["appearance"]},{word:"magnificent",categories:["appearance"]},{word:"muscular",categories:["appearance"]},{word:"plain",categories:["appearance"]},{word:"plump",categories:["appearance"]},{word:"quaint",categories:["appearance"]},{word:"scruffy",categories:["appearance"]},{word:"shapely",categories:["appearance"]},{word:"short",categories:["appearance"]},{word:"skinny",categories:["appearance"]},{word:"stocky",categories:["appearance"]},{word:"ugly",categories:["appearance"]},{word:"unkempt",categories:["appearance"]},{word:"unsightly",categories:["appearance"]},{word:"black",categories:["color"]},{word:"blue",categories:["color"]},{word:"gray",categories:["color"]},{word:"green",categories:["color"]},{word:"icy",categories:["color"]},{word:"lemon",categories:["color"]},{word:"mango",categories:["color"]},{word:"orange",categories:["color"]},{word:"purple",categories:["color"]},{word:"red",categories:["color"]},{word:"salmon",categories:["color"]},{word:"white",categories:["color"]},{word:"yellow",categories:["color"]},{word:"alive",categories:["condition"]},{word:"better",categories:["condition"]},{word:"careful",categories:["condition"]},{word:"clever",categories:["condition"]},{word:"dead",categories:["condition"]},{word:"easy",categories:["condition"]},{word:"famous",categories:["condition"]},{word:"gifted",categories:["condition"]},{word:"hallowed",categories:["condition"]},{word:"helpful",categories:["condition"]},{word:"important",categories:["condition"]},{word:"inexpensive",categories:["condition"]},{word:"mealy",categories:["condition"]},{word:"mushy",categories:["condition"]},{word:"odd",categories:["condition"]},{word:"poor",categories:["condition"]},{word:"powerful",categories:["condition"]},{word:"rich",categories:["condition"]},{word:"shy",categories:["condition"]},{word:"tender",categories:["condition"]},{word:"unimportant",categories:["condition"]},{word:"uninterested",categories:["condition"]},{word:"vast",categories:["condition"]},{word:"wrong",categories:["condition"]},{word:"aggressive",categories:["personality"]},{word:"agreeable",categories:["personality"]},{word:"ambitious",categories:["personality"]},{word:"brave",categories:["personality"]},{word:"calm",categories:["personality"]},{word:"delightful",categories:["personality"]},{word:"eager",categories:["personality"]},{word:"faithful",categories:["personality"]},{word:"gentle",categories:["personality"]},{word:"happy",categories:["personality"]},{word:"jolly",categories:["personality"]},{word:"kind",categories:["personality"]},{word:"lively",categories:["personality"]},{word:"nice",categories:["personality"]},{word:"obedient",categories:["personality"]},{word:"polite",categories:["personality"]},{word:"proud",categories:["personality"]},{word:"silly",categories:["personality"]},{word:"thankful",categories:["personality"]},{word:"victorious",categories:["personality"]},{word:"witty",categories:["personality"]},{word:"wonderful",categories:["personality"]},{word:"zealous",categories:["personality"]},{word:"angry",categories:["personality"]},{word:"bewildered",categories:["personality"]},{word:"clumsy",categories:["personality"]},{word:"defeated",categories:["personality"]},{word:"embarrassed",categories:["personality"]},{word:"fierce",categories:["personality"]},{word:"grumpy",categories:["personality"]},{word:"helpless",categories:["personality"]},{word:"itchy",categories:["personality"]},{word:"jealous",categories:["personality"]},{word:"lazy",categories:["personality"]},{word:"mysterious",categories:["personality"]},{word:"nervous",categories:["personality"]},{word:"obnoxious",categories:["personality"]},{word:"panicky",categories:["personality"]},{word:"pitiful",categories:["personality"]},{word:"repulsive",categories:["personality"]},{word:"scary",categories:["personality"]},{word:"thoughtless",categories:["personality"]},{word:"uptight",categories:["personality"]},{word:"worried",categories:["personality"]},{word:"broad",categories:["shapes"]},{word:"chubby",categories:["shapes"]},{word:"crooked",categories:["shapes"]},{word:"curved",categories:["shapes"]},{word:"deep",categories:["shapes"]},{word:"flat",categories:["shapes"]},{word:"high",categories:["shapes"]},{word:"hollow",categories:["shapes"]},{word:"low",categories:["shapes"]},{word:"narrow",categories:["shapes"]},{word:"refined",categories:["shapes"]},{word:"round",categories:["shapes"]},{word:"shallow",categories:["shapes"]},{word:"skinny",categories:["shapes"]},{word:"square",categories:["shapes"]},{word:"steep",categories:["shapes"]},{word:"straight",categories:["shapes"]},{word:"wide",categories:["shapes"]},{word:"big",categories:["size"]},{word:"colossal",categories:["size"]},{word:"fat",categories:["size"]},{word:"gigantic",categories:["size"]},{word:"great",categories:["size"]},{word:"huge",categories:["size"]},{word:"immense",categories:["size"]},{word:"large",categories:["size"]},{word:"little",categories:["size"]},{word:"mammoth",categories:["size"]},{word:"massive",categories:["size"]},{word:"microscopic",categories:["size"]},{word:"miniature",categories:["size"]},{word:"petite",categories:["size"]},{word:"puny",categories:["size"]},{word:"scrawny",categories:["size"]},{word:"short",categories:["size"]},{word:"small",categories:["size"]},{word:"tall",categories:["size"]},{word:"teeny",categories:["size"]},{word:"tiny",categories:["size"]},{word:"crashing",categories:["sounds"]},{word:"deafening",categories:["sounds"]},{word:"echoing",categories:["sounds"]},{word:"faint",categories:["sounds"]},{word:"harsh",categories:["sounds"]},{word:"hissing",categories:["sounds"]},{word:"howling",categories:["sounds"]},{word:"loud",categories:["sounds"]},{word:"melodic",categories:["sounds"]},{word:"noisy",categories:["sounds"]},{word:"purring",categories:["sounds"]},{word:"quiet",categories:["sounds"]},{word:"rapping",categories:["sounds"]},{word:"raspy",categories:["sounds"]},{word:"rhythmic",categories:["sounds"]},{word:"screeching",categories:["sounds"]},{word:"shrilling",categories:["sounds"]},{word:"squeaking",categories:["sounds"]},{word:"thundering",categories:["sounds"]},{word:"tinkling",categories:["sounds"]},{word:"wailing",categories:["sounds"]},{word:"whining",categories:["sounds"]},{word:"whispering",categories:["sounds"]},{word:"ancient",categories:["time"]},{word:"brief",categories:["time"]},{word:"early",categories:["time"]},{word:"fast",categories:["time"]},{word:"future",categories:["time"]},{word:"late",categories:["time"]},{word:"long",categories:["time"]},{word:"modern",categories:["time"]},{word:"old",categories:["time"]},{word:"prehistoric",categories:["time"]},{word:"quick",categories:["time"]},{word:"rapid",categories:["time"]},{word:"short",categories:["time"]},{word:"slow",categories:["time"]},{word:"swift",categories:["time"]},{word:"young",categories:["time"]},{word:"acidic",categories:["taste"]},{word:"bitter",categories:["taste"]},{word:"cool",categories:["taste"]},{word:"creamy",categories:["taste"]},{word:"delicious",categories:["taste"]},{word:"disgusting",categories:["taste"]},{word:"fresh",categories:["taste"]},{word:"greasy",categories:["taste"]},{word:"juicy",categories:["taste"]},{word:"hot",categories:["taste"]},{word:"moldy",categories:["taste"]},{word:"nutritious",categories:["taste"]},{word:"nutty",categories:["taste"]},{word:"putrid",categories:["taste"]},{word:"rancid",categories:["taste"]},{word:"ripe",categories:["taste"]},{word:"rotten",categories:["taste"]},{word:"salty",categories:["taste"]},{word:"savory",categories:["taste"]},{word:"sour",categories:["taste"]},{word:"spicy",categories:["taste"]},{word:"spoiled",categories:["taste"]},{word:"stale",categories:["taste"]},{word:"sweet",categories:["taste"]},{word:"tangy",categories:["taste"]},{word:"tart",categories:["taste"]},{word:"tasteless",categories:["taste"]},{word:"tasty",categories:["taste"]},{word:"yummy",categories:["taste"]},{word:"breezy",categories:["touch"]},{word:"bumpy",categories:["touch"]},{word:"chilly",categories:["touch"]},{word:"cold",categories:["touch"]},{word:"cool",categories:["touch"]},{word:"cuddly",categories:["touch"]},{word:"damaged",categories:["touch"]},{word:"damp",categories:["touch"]},{word:"dirty",categories:["touch"]},{word:"dry",categories:["touch"]},{word:"flaky",categories:["touch"]},{word:"fluffy",categories:["touch"]},{word:"freezing",categories:["touch"]},{word:"greasy",categories:["touch"]},{word:"hot",categories:["touch"]},{word:"icy",categories:["touch"]},{word:"loose",categories:["touch"]},{word:"melted",categories:["touch"]},{word:"prickly",categories:["touch"]},{word:"rough",categories:["touch"]},{word:"shaggy",categories:["touch"]},{word:"sharp",categories:["touch"]},{word:"slimy",categories:["touch"]},{word:"sticky",categories:["touch"]},{word:"strong",categories:["touch"]},{word:"tight",categories:["touch"]},{word:"uneven",categories:["touch"]},{word:"warm",categories:["touch"]},{word:"weak",categories:["touch"]},{word:"wet",categories:["touch"]},{word:"wooden",categories:["touch"]},{word:"abundant",categories:["quantity"]},{word:"billions",categories:["quantity"]},{word:"enough",categories:["quantity"]},{word:"few",categories:["quantity"]},{word:"full",categories:["quantity"]},{word:"hundreds",categories:["quantity"]},{word:"incalculable",categories:["quantity"]},{word:"limited",categories:["quantity"]},{word:"little",categories:["quantity"]},{word:"many",categories:["quantity"]},{word:"most",categories:["quantity"]},{word:"millions",categories:["quantity"]},{word:"numerous",categories:["quantity"]},{word:"scarce",categories:["quantity"]},{word:"some",categories:["quantity"]},{word:"sparse",categories:["quantity"]},{word:"substantial",categories:["quantity"]},{word:"thousands",categories:["quantity"]}]},t.getWordsByCategory=function(e,n){void 0===n&&(n=[]);for(var r=new Set(n),i=[],a=0,o=t.wordList[e];a<o.length;a++){var s=o[a];(0===n.length||s.categories.some((function(t){return r.has(t)})))&&i.push(s.word)}return i}}(RG);var IG=da&&da.__assign||function(){return(IG=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};Object.defineProperty(LG,"__esModule",{value:!0}),LG.totalUniqueSlugs=LG.generateSlug=void 0;var FG=RG;var PG=LG.generateSlug=function(t,e){for(var n=t||3,r={partsOfSpeech:YG(n),categories:{},format:"kebab"},i=IG(IG({},r),e),a=[],o=0;o<n;o++){var s=i.partsOfSpeech[o],c=FG.getWordsByCategory(i.partsOfSpeech[o],i.categories[s]),l=c[Math.floor(Math.random()*c.length)];a.push(l)}return function(t,e){if("kebab"===e)return t.join("-").toLowerCase();if("camel"===e)return t.map((function(t,e){return 0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})).join("");if("lower"===e)return t.join(" ").toLowerCase();if("sentence"===e)return t.map((function(t,e){return 0===e?t[0].toUpperCase()+t.slice(1).toLowerCase():t})).join(" ");return t.map((function(t){return t[0].toUpperCase()+t.slice(1).toLowerCase()})).join(" ")}(a,i.format)};function YG(t){for(var e=[],n=0;n<t-1;n++)e.push("adjective");return e.push("noun"),e}LG.totalUniqueSlugs=function(t,e){for(var n,r,i={adjective:FG.getWordsByCategory("adjective",null===(n=null==e?void 0:e.categories)||void 0===n?void 0:n.adjective).length,noun:FG.getWordsByCategory("noun",null===(r=null==e?void 0:e.categories)||void 0===r?void 0:r.noun).length},a=t||3,o=(null==e?void 0:e.partsOfSpeech)||YG(a),s=1,c=0;c<a;c++)s*=i[o[c]];return s};export{L as $,n as A,_t as B,It as C,h as D,f as E,k as F,t as G,u as H,et as I,at as J,he as K,O as L,E as M,W as N,p as O,j as P,N as Q,ut as R,Lt as S,Tt as T,fe as U,Ot as V,ht as W,pe as X,rt as Y,ee as Z,U as _,R as a,a as a0,me as a1,ce as a2,ue as a3,Ft as a4,PG as a5,l as a6,$ as a7,g as a8,pa as a9,se as aa,B as b,F as c,T as d,S as e,C as f,P as g,z as h,Bt as i,At as j,M as k,D as l,Mt as m,Y as n,Dt as o,Et as p,St as q,kt as r,s,A as t,wt as u,xt as v,jt as w,nt as x,tt as y,J as z};