textbrowser 0.54.0 → 0.54.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/CHANGES.md +8 -0
  2. package/dist/WorkInfo-es.js +172 -355
  3. package/dist/activateCallback-es.js +0 -1
  4. package/dist/index-es.js +3294 -3414
  5. package/dist/index-es.min.js +4 -4
  6. package/eslint.config.js +2 -2
  7. package/package.json +44 -38
  8. package/resources/activateCallback.js +0 -1
  9. package/resources/index.js +0 -1
  10. package/resources/resultsDisplay.js +1 -9
  11. package/resources/templates/workDisplay.js +0 -1
  12. package/resources/utils/Plugin.js +2 -5
  13. package/resources/utils/WorkInfo.js +7 -15
  14. package/resources/workDisplay.js +0 -1
  15. package/resources/workSelect.js +0 -1
  16. package/server/main.js +15 -7
  17. package/sw-sample.js +0 -2
  18. package/tsconfig.json +2 -1
  19. package/dist/assets/index-_11XnUty.css +0 -9
  20. package/dist/assets/languages-1sAACTKG.json +0 -67
  21. package/dist/dist/WorkInfo-es.d.ts +0 -331
  22. package/dist/dist/WorkInfo-es.d.ts.map +0 -1
  23. package/dist/dist/activateCallback-es.d.ts +0 -17
  24. package/dist/dist/activateCallback-es.d.ts.map +0 -1
  25. package/dist/dist/index-es.d.ts +0 -619
  26. package/dist/dist/index-es.d.ts.map +0 -1
  27. package/dist/dist/sw-helper.d.ts +0 -3
  28. package/dist/dist/sw-helper.d.ts.map +0 -1
  29. package/dist/eslint.config.d.ts +0 -126
  30. package/dist/eslint.config.d.ts.map +0 -1
  31. package/dist/resources/activateCallback.d.ts +0 -23
  32. package/dist/resources/activateCallback.d.ts.map +0 -1
  33. package/dist/resources/index.d.ts +0 -128
  34. package/dist/resources/index.d.ts.map +0 -1
  35. package/dist/resources/resultsDisplay.d.ts +0 -110
  36. package/dist/resources/resultsDisplay.d.ts.map +0 -1
  37. package/dist/resources/templates/index.d.ts +0 -59
  38. package/dist/resources/templates/index.d.ts.map +0 -1
  39. package/dist/resources/templates/languageSelect.d.ts +0 -18
  40. package/dist/resources/templates/languageSelect.d.ts.map +0 -1
  41. package/dist/resources/templates/resultsDisplayClient.d.ts +0 -26
  42. package/dist/resources/templates/resultsDisplayClient.d.ts.map +0 -1
  43. package/dist/resources/templates/resultsDisplayServerOrClient.d.ts +0 -131
  44. package/dist/resources/templates/resultsDisplayServerOrClient.d.ts.map +0 -1
  45. package/dist/resources/templates/utils/dom.d.ts +0 -15
  46. package/dist/resources/templates/utils/dom.d.ts.map +0 -1
  47. package/dist/resources/templates/utils/html.d.ts +0 -3
  48. package/dist/resources/templates/utils/html.d.ts.map +0 -1
  49. package/dist/resources/templates/workDisplay.d.ts +0 -183
  50. package/dist/resources/templates/workDisplay.d.ts.map +0 -1
  51. package/dist/resources/templates/workSelect.d.ts +0 -18
  52. package/dist/resources/templates/workSelect.d.ts.map +0 -1
  53. package/dist/resources/user-sample.d.ts +0 -2
  54. package/dist/resources/user-sample.d.ts.map +0 -1
  55. package/dist/resources/user.d.ts +0 -2
  56. package/dist/resources/user.d.ts.map +0 -1
  57. package/dist/resources/utils/IntlURLSearchParams.d.ts +0 -56
  58. package/dist/resources/utils/IntlURLSearchParams.d.ts.map +0 -1
  59. package/dist/resources/utils/Languages.d.ts +0 -81
  60. package/dist/resources/utils/Languages.d.ts.map +0 -1
  61. package/dist/resources/utils/Metadata.d.ts +0 -133
  62. package/dist/resources/utils/Metadata.d.ts.map +0 -1
  63. package/dist/resources/utils/Params.d.ts +0 -30
  64. package/dist/resources/utils/Params.d.ts.map +0 -1
  65. package/dist/resources/utils/Plugin.d.ts +0 -278
  66. package/dist/resources/utils/Plugin.d.ts.map +0 -1
  67. package/dist/resources/utils/ServiceWorker.d.ts +0 -26
  68. package/dist/resources/utils/ServiceWorker.d.ts.map +0 -1
  69. package/dist/resources/utils/WorkInfo.d.ts +0 -104
  70. package/dist/resources/utils/WorkInfo.d.ts.map +0 -1
  71. package/dist/resources/utils/dialogs.d.ts +0 -155
  72. package/dist/resources/utils/dialogs.d.ts.map +0 -1
  73. package/dist/resources/utils/getLocaleFallbackResults.d.ts +0 -19
  74. package/dist/resources/utils/getLocaleFallbackResults.d.ts.map +0 -1
  75. package/dist/resources/utils/sanitize.d.ts +0 -6
  76. package/dist/resources/utils/sanitize.d.ts.map +0 -1
  77. package/dist/resources/vendor/json-refs-min.d.ts +0 -3
  78. package/dist/resources/vendor/json-refs-min.d.ts.map +0 -1
  79. package/dist/resources/workDisplay.d.ts +0 -81
  80. package/dist/resources/workDisplay.d.ts.map +0 -1
  81. package/dist/resources/workSelect.d.ts +0 -17
  82. package/dist/resources/workSelect.d.ts.map +0 -1
  83. package/dist/rollup.config.d.ts +0 -19
  84. package/dist/rollup.config.d.ts.map +0 -1
  85. package/dist/server/main.d.ts +0 -47
  86. package/dist/server/main.d.ts.map +0 -1
  87. package/dist/sw-helper.d.ts +0 -3
  88. package/dist/sw-helper.d.ts.map +0 -1
  89. package/dist/sw-helper.js +0 -355
  90. package/dist/sw-sample.d.ts +0 -2
  91. package/dist/sw-sample.d.ts.map +0 -1
@@ -1,8 +1,8 @@
1
- function e(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}let t,n;function r(){}const o=(i=function(){return function(e){var t=e();if(t&&t.then)return t.then(r)}((function(){if(!t)return e=import("node:path"),n=function(e){({dirname:t}=e)},e&&e.then||(e=Promise.resolve(e)),n?e.then(n):e;var e,n}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(i.apply(this,e))}catch(e){return Promise.reject(e)}});var i;function a(e){return r=t(new URL(e).pathname),n||(n="win32"===process.platform),r.slice(n?1:0);var r}function s(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}let u;function c(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const l=function({baseURL:t,cwd:n}={}){const r="undefined"!=typeof window||"undefined"!=typeof self?"undefined"!=typeof window?window.fetch:self.fetch:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e){let r=!1;return c((function(){if(/^https?:/u.test(e))return c((function(){if(!u)return s(import("node-fetch"),(function(e){u=e}))}),(function(){const t=u.default(e);return r=!0,t}))}),(function(i){return r?i:c((function(){if(!n)return function(e,t,n){try{var r=Promise.resolve(e());return t?r.then(t):r}catch(e){return Promise.reject(e)}}(o,(function(){n=t?a(t):"undefined"==typeof window&&process.cwd()}))}),(function(){return s(import("local-xmlhttprequest"),(function(t){const r=t.default({basePath:n});return new Promise(((t,n)=>{const o=new r;o.open("GET",e,!0),o.onreadystatechange=function(){if(4===o.readyState)if(200!==o.status)n(new SyntaxError("Failed to fetch URL: "+e+"state: "+o.readyState+"; status: "+o.status));else{const e=o.responseText;t({json:()=>JSON.parse(e)})}},o.send()}))}))}))}))})),i=function({fetch:t=("undefined"!=typeof window?window.fetch:self.fetch)}={}){return function n(r,o,i){try{let a=!1;return e(function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return function(e,t){var n=e();return n&&n.then?n.then(t):t(n)}((function(){if(Array.isArray(r))return e(Promise.all(r.map((e=>n(e)))),(function(e){return o&&o(...e),a=!0,e}))}),(function(n){return a?n:e(t(r),(function(t){return e(t.json(),(function(e){return"function"==typeof o?o(e):e}))}))}))}),(function(e){const t=e;if(t.message+=` (File: ${r})`,i)return i(t,r);throw t})))}catch(e){return Promise.reject(e)}}}({fetch:r});return i._fetch=r,i.hasURLBasePath=Boolean(t),i.basePath=n,i}();function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(){h=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var i=new RegExp(e,r);return t.set(i,o||t.get(e)),_(i,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce((function(t,n){var o=r[n];if("number"==typeof o)t[n]=e[o];else{for(var i=0;void 0===e[o[i]]&&i+1<o.length;)i++;t[n]=e[o[i]]}return t}),Object.create(null))}return b(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=r(n,this);var o=n.indices;o&&(o.groups=r(o,this))}return n},n.prototype[Symbol.replace]=function(n,o){if("string"==typeof o){var i=t.get(this);return e[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)>/g,(function(e,t){var n=i[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof o){var a=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(r(e,a)),o.apply(this,e)}))}return e[Symbol.replace].call(this,n,o)},h.apply(this,arguments)}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,A(r.key),r)}}function y(e,t,n){return t&&g(e.prototype,t),n&&g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t,n){return(t=A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function x(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w(e);if(t){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x(this,n)}}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||k(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||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 k(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var F=globalThis.jsonExtra,I=function(e){return e.replace(/\\+/g,(function(e){return e.slice(0,e.length/2)}))},D=function(e){return F.parse("{"+(e||"").replace(/^\{/,"").replace(/\}$/,"")+"}")},P=function(e,t,n){var r,o=n.onMatch,i=n.extra,a=n.betweenMatches,s=n.afterMatch,u=n.escapeAtOne,c=0;if(i&&(a=i,s=i,u=i),!a||!s)throw new Error("You must have `extra` or `betweenMatches` and `afterMatch` arguments.");for(;null!==(r=e.exec(t));){var l=j(r,2),f=l[0],p=l[1],d=e.lastIndex,h=d-f.length;h>c&&a(t.slice(c,h)),u&&p.length%2?(c=d,u(f)):(o.apply(void 0,E(r)),c=d)}c!==t.length&&s(t.slice(c))},N="undefined"!=typeof fetch?fetch:null,T=function(){return N},C="undefined"!=typeof document?document:null,$=function(){return C};var L=function(e,t,n){return t.sort(new Intl.Collator(e,n).compare)},R=function(e,t,n){return new Intl.ListFormat(e,n).format(t)},U=function(e,t,n,r,o){if("function"!=typeof n)return function(e,t,n,r){return L(e,t,r),R(e,t,n)}(e,t,n,r);L(e,t,o);var i,a=(i=Date.now(),"undefined"!=typeof performance&&"function"==typeof performance.now&&(i+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=Math.trunc((i+16*Math.random())%16);return i=Math.floor(i/16),("x"===e?t:3&t|8).toString(16)}))),s=E(t).map((function(e,t){return"<<".concat(a).concat(t,">>")})),u=[],c=function(e){u.push(e)};P(new RegExp("<<".concat(a,"(\\d)>>"),"gu"),R(e,s,r),{betweenMatches:c,afterMatch:c,onMatch:function(e,r){c(n(t[Number(r)],Number(r)))}});var l=$().createDocumentFragment();return l.append.apply(l,u),l},M=function(e){var t=e.object;if(Array.isArray(t)){if("function"==typeof t[1]){var n=j(t,4);return{value:n[0],callback:n[1],options:n[2],extraOpts:n[3]}}var r=j(t,3);return{value:r[0],options:r[1],extraOpts:r[2]}}return{value:t}},z=function(e){var t=e.value,n=e.arg;e.key;var r,o=e.locale;if("string"==typeof t||t&&"object"===d(t)&&"nodeType"in t)return t;var i=function(e){var t=e.type,o=e.options,i=void 0===o?r:o,a=e.checkArgOptions,s=void 0!==a&&a;if("string"==typeof n){var u=j(n.split("|"),3),c=u[0],l=u[1],f=u[2];"DATE"===c&&(c="DATETIME"),c===t&&(l?s&&!f||(i=p(p({},i),D(s&&f?f:l))):i={})}return i},a=!1;if(t&&"object"===d(t)&&!Array.isArray(t)){var s=Object.keys(t)[0];if(["number","date","datetime","dateRange","datetimeRange","relative","region","language","script","currency","list","plural"].includes(s)){var u,c,l=t[s],f=M({object:l});switch(t=f.value,r=f.options,u=f.extraOpts,c=f.callback,s){case"date":case"datetime":a=!0;break;case"dateRange":case"datetimeRange":var h=new Intl.DateTimeFormat(o,i({type:"DATERANGE",options:u}));return h.formatRange.apply(h,E([t,r].map((function(e){return"number"==typeof e?new Date(e):e}))));case"region":case"language":case"script":case"currency":return new Intl.DisplayNames(o,p(p({},i({type:s.toUpperCase()})),{},{type:s})).of(t);case"relative":var v=[r,u];return u=v[0],r=v[1],new Intl.RelativeTimeFormat(o,i({type:"RELATIVE"})).format(t,u);case"list":return c?U(o,t,c,i({type:"LIST"}),i({type:"LIST",options:u,checkArgOptions:!0})):U(o,t,i({type:"LIST"}),i({type:"LIST",options:u,checkArgOptions:!0}))}}}if(t&&("number"==typeof t&&(a||/^DATE(?:TIME)(?:\||$)/.test(n))&&(t=new Date(t)),"object"===d(t)&&"getTime"in t&&"function"==typeof t.getTime))return new Intl.DateTimeFormat(o,i({type:"DATETIME"})).format(t);if(Array.isArray(t)){var g,y=t[2];return(g=new Intl.DateTimeFormat(o,i({type:"DATERANGE",options:y}))).formatRange.apply(g,E(t.slice(0,2).map((function(e){return"number"==typeof e?new Date(e):e}))))}if("number"==typeof t)return new Intl.NumberFormat(o,i({type:"NUMBER"})).format(t);throw new TypeError("Unknown formatter")},B=y((function e(){v(this,e)})),q=function(e){var t=e.key,n=e.body,r=e.type,o=e.messageStyle,i=ee({messageStyle:void 0===o?"richNested":o})({body:n},t);if(!i)throw new Error("Key value not found for ".concat(r," key: (").concat(t,")"));return i.value},W=function(e){b(n,B);var t=S(n);function n(e){var r;return v(this,n),(r=t.call(this)).locals=e,r}return y(n,[{key:"getSubstitution",value:function(e){return q({key:e.slice(1),body:this.locals,type:"local"})}},{key:"isMatch",value:function(e){var t=e.slice(1).split("."),n=this.locals;return this.constructor.isMatchingKey(e)&&t.every((function(e){var t=e in n;return n=n[e],t}))}}],[{key:"isMatchingKey",value:function(e){return e.startsWith("-")}}]),n}(),V=function(e){b(n,B);var t=S(n);function n(e){var r;return v(this,n),(r=t.call(this)).substitutions=e,r}return y(n,[{key:"isMatch",value:function(e){return this.constructor.isMatchingKey(e)&&e in this.substitutions}}],[{key:"isMatchingKey",value:function(e){return/^[0-9A-Z_a-z]/.test(e)}}]),n}(),H=function(e){b(n,B);var t=S(n);function n(e,r){var o,i=r.substitutions;return v(this,n),(o=t.call(this)).switches=e,o.substitutions=i,o}return y(n,[{key:"getSubstitution",value:function(e,t){var n,r,o=t.locale,i=t.usedKeys,a=t.arg,s=t.missingSuppliedFormatters,u=this.constructor.getKey(e).slice(1),c=j(this.getMatch(u),3),l=c[0],f=c[1],h=c[2];if(i.push(h),l&&l.includes("|")){var v=j(l.split("|"),3);n=v[1],r=v[2]}if(!f)return s({key:e,formatter:this}),"\\{"+e+"}";var g=function(e,t){var n=D(r);return new Intl.NumberFormat(o,p(p({},t),n)).format(e)},y=function(e,t){var n=D(r);return new Intl.PluralRules(o,p(p({},t),n)).select(e)},m=this.substitutions[h],b=m;if("number"==typeof m)switch(n){case"NUMBER":b=g(m);break;case"PLURAL":b=y(m);break;default:b=new Intl.PluralRules(o).select(m)}else if(m&&"object"===d(m)){var w=Object.keys(m)[0];if(["number","plural"].includes(w)){var _=M({object:m[w]}),x=_.value,S=_.options;if(n||(n=w.toUpperCase()),!(w.toUpperCase()===n))throw new TypeError('Expecting type "'.concat(n.toLowerCase(),'"; instead found "').concat(w,'".'));switch(n){case"NUMBER":b=g(x,S);break;case"PLURAL":b=y(x,S)}}}var E="richNested",k=function(e){return e.replace(/\\/g,"\\\\").replace(/\./g,"\\.")};try{return q({messageStyle:E,key:b?k(b):a,body:f,type:"switch"})}catch(e){try{return q({messageStyle:E,key:"*"+k(b),body:f,type:"switch"})}catch(e){var O=Object.keys(f).find((function(e){return e.startsWith("*")}));if(!O)throw new Error("No defaults found for switch ".concat(u));return q({messageStyle:E,key:k(O),body:f,type:"switch"})}}}},{key:"isMatch",value:function(e){return Boolean(e&&this.constructor.isMatchingKey(e)&&this.getMatch(e.slice(1)).length)}},{key:"getMatch",value:function(e){var t=this,n=e.split(".");return n.reduce((function(r,o,i){if(i<n.length-1){if(!(o in r))throw new Error('Switch key "'.concat(o,'" not found (from "~').concat(e,'")'));return r[o]}var a=Object.entries(r).find((function(e){var n=j(e,1)[0];return o===t.constructor.getKey(n)}));return a?[].concat(E(a),[o]):[]}),this.switches)}}],[{key:"isMatchingKey",value:function(e){return e.startsWith("~")}},{key:"getKey",value:function(e){var t=e.match(/^(?:[\0-\{\}-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*/);return t&&t[0]}}]),n}();function J(e,t,n){if(!e.s){if(n instanceof K){if(!n.s)return void(n.o=J.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(J.bind(null,e,t),J.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}var K=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,o=this.s;if(o){var i=1&o?t:n;if(i){try{J(r,1,i(this.v))}catch(e){J(r,2,e)}return r}return this}return this.o=function(e){try{var o=e.v;1&e.s?J(r,1,t?t(o):o):n?J(r,1,n(o)):J(r,2,o)}catch(e){J(r,2,e)}},r},e}();function G(e){return e instanceof K&&1&e.s}var Z=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Reached end of values array.";if(!Array.isArray(e))throw new TypeError("The `values` argument to `promiseChainForValues` must be an array.");if("function"!=typeof t)throw new TypeError("The `errBack` argument to `promiseChainForValues` must be a function.");return function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(){var r,o,i,a,s=!1,u=Promise.reject(new Error("Intentionally reject so as to begin checking chain"));return i=function(e,t,n){for(var r;;){var o=e();if(G(o)&&(o=o.v),!o)return i;if(o.then){r=0;break}var i=n();if(i&&i.then){if(!G(i)){r=1;break}i=i.s}}var a=new K,s=J.bind(null,a,2);return(0===r?o.then(c):1===r?i.then(u):(void 0).then((function(){(o=e())?o.then?o.then(c).then(void 0,s):c(o):J(a,1,i)}))).then(void 0,s),a;function u(t){i=t;do{if(!(o=e())||G(o)&&!o.v)return void J(a,1,i);if(o.then)return void o.then(c).then(void 0,s);G(i=n())&&(i=i.v)}while(!i||!i.then);i.then(u).then(void 0,s)}function c(e){e?(i=n())&&i.then?i.then(u).then(void 0,s):u(i):J(a,1,i)}}((function(){return!s}),0,(function(){var i=e.shift();return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return function(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}(u,(function(e){r=e,s=!0}))}),(function(){if(o)throw new Error(n);e.length||(o=!0),u=t(i)}))})),a=function(e){return r},i&&i.then?i.then(a):a(i)}))()},X=function(e,t){if("string"!=typeof e)throw new TypeError("`defaultLocaleResolver` expects a string `localesBasePath`.");if("string"!=typeof t)throw new TypeError("`defaultLocaleResolver` expects a string `locale`.");if(/[\.\/\\]/.test(t))throw new TypeError("Locales cannot use file-reserved characters, `.`, `/` or `\\`");return"".concat(e.replace(/\/$/,""),"/_locales/").concat(t,"/messages.json")},Y=function(e){var t=e.string,n=e.dom,r=e.usedKeys,o=e.substitutions,i=e.allSubstitutions,a=e.locale,s=e.locals,u=e.switches,c=e.maximumLocalNestingDepth,l=void 0===c?3:c,f=e.missingSuppliedFormatters,h=e.checkExtraSuppliedFormatters;if("number"!=typeof l)throw new TypeError("`maximumLocalNestingDepth` must be a number.");var v=function(){Object.entries(o).forEach((function(e){var t=j(e,2),n=t[0];"function"==typeof t[1]&&r.push(n)}))};v();var g=new W(s),y=new V(o),m=new H(u,{substitutions:o}),b=/(\\*)\{((?:(?:[\0-\|~-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|\\\})*?)(?:(\|)((?:[\0-\|~-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*))?\}/g;i&&(i=Array.isArray(i)?i:[i]);var w=function(e){var t,n=e.key,o=e.arg,s=e.substs;return g.constructor.isMatchingKey(n)?t=g.getSubstitution(n):m.constructor.isMatchingKey(n)?t=m.getSubstitution(n,{locale:a,usedKeys:r,arg:o,missingSuppliedFormatters:f}):"function"==typeof(t=s[n])&&(t=t({arg:o,key:n})),i?t=i.reduce((function(e,t){return t({value:e,arg:o,key:n,locale:a})}),t):o&&/^(?:NUMBER|DATE(?:TIME|RANGE|TIMERANGE)?|REGION|LANGUAGE|SCRIPT|CURRENCY|RELATIVE|LIST)(?:\||$)/.test(o)&&(t=z({value:t,arg:o,key:n,locale:a})),t},_=1,x=function(e){var t=e.substitution,n=e.ky,r=e.arg,i=e.processSubsts,a=t;if("string"==typeof t&&t.includes("{")){if(_++>l)throw new TypeError("Too much recursion in local variables.");if(g.constructor.isMatchingKey(n)){var s,u=o;r&&(s=D(r),u=p(p({},o),s)),a=i({str:t,substs:u,formatter:g}),s&&h({substitutions:s})}else m.constructor.isMatchingKey(n)&&(a=i({str:t}))}return a};if(!n){var S=!1,k=function e(t){var n=t.str,i=t.substs,a=void 0===i?o:i,s=t.formatter,u=void 0===s?y:s;return n.replace(b,(function(t,n,o,i,s){if(n.length%2)return t;if(f({key:o,formatter:u}))return t;var c=w({key:o,arg:s,substs:a});return c=x({substitution:c,ky:o,arg:s,processSubsts:e}),S=S||null!==c&&"object"===d(c)&&"nodeType"in c,r.push(o),n+c}))}({str:t});if(!S)return h({substitutions:o}),r.length=0,v(),I(k);r.length=0,v()}_=1;var O=function e(t){var n=t.str,i=t.substs,a=void 0===i?o:i,s=t.formatter,u=void 0===s?y:s,c=[],l=new RegExp(b,"gu"),p=function(){c.push.apply(c,arguments)};return P(l,n,{extra:p,onMatch:function(t,n,o,i,s){if(f({key:o,formatter:u}))p(t);else{n.length&&p(n);var c=w({key:o,arg:s,substs:a});c=x({substitution:c,ky:o,arg:s,processSubsts:e}),Array.isArray(c)?p.apply(void 0,E(c)):c&&"object"===d(c)&&"nodeType"in c?p(c.cloneNode(!0)):p(c)}r.push(o)}}),c}({str:t});return h({substitutions:o}),r.length=0,O.map((function(e){return"string"==typeof e?I(e):e}))};function Q(e,t){if(Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))&&"string"==typeof t&&t.endsWith("Nested"))return e.map((function(e){return e.replace(h(/(\\+)/g,{backslashes:1}),"\\$<backslashes>").replace(/\./g,"\\.")})).join(".");if("string"!=typeof e)throw new TypeError("`key` is expected to be a string (or array of strings for nested style)");return e}var ee=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).messageStyle,t=void 0===e?"richNested":e;return"function"==typeof t?t:"richNested"===t?function(e,t){var n=e&&"object"===d(e)&&e.body,r=[],o=function(e){r.length||(r[0]=""),r[r.length-1]+=e};P(/(\\*)\./g,t,{extra:o,onMatch:function(e,t){o(t),r.push("")}});var i=r.map((function(e){return I(e)})),a=!1,s=n;return i.some((function(e,t,n){return!s||"object"!==d(s)||(t===n.length-1&&e in s&&s[e]&&"object"===d(s[e])&&"message"in s[e]&&"string"==typeof s[e].message&&(a={value:s[e].message,info:s[e]}),s=s[e],!1)})),a}:"rich"===t?function(e,t){var n=e&&"object"===d(e)&&e.body;return!!(n&&"object"===d(n)&&t in n&&n[t]&&"object"===d(n[t])&&"message"in n[t]&&"string"==typeof n[t].message)&&{value:n[t].message,info:n[t]}}:"plain"===t?function(e,t){var n=e&&"object"===d(e)&&e.body;return!!(n&&"object"===d(n)&&t in n&&n[t]&&"string"==typeof n[t])&&{value:n[t]}}:"plainNested"===t?function(e,t){var n=e&&"object"===d(e)&&e.body;if(n&&"object"===d(n)){var r=t.split(/(?<!\\)\./).reduce((function(e,t){return e&&"object"===d(e)&&e[t]?e[t]:null}),n);if(r&&"string"==typeof r)return{value:r}}return!1}:function(){throw new TypeError("Unknown `messageStyle` ".concat(t))}()};function te(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}function ne(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}var re=function(e){if(!e.includes("-"))throw new Error("Locale not available");return e.replace(/\x2D(?:[\0-,\.-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*$/,"")},oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locales,n=e.defaultLocales,r=e.localeResolver,o=e.localesBasePath,i=e.localeMatcher;return ie({locales:t,defaultLocales:n,localeResolver:r,localesBasePath:o,localeMatcher:i})},ie=ne((function(e){var t=ne((function(e){if("string"!=typeof e)throw new TypeError("Non-string locale type");var n=s(c,e);if("string"!=typeof n)throw new TypeError("`localeResolver` expected to resolve to (URL) string.");return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){var t=T();return te(d?t(n,{method:"HEAD"}):t(n),(function(t){if(404===t.status)throw new Error("Trying again");return d?e:te(t.json(),(function(t){return{locale:e,strings:t}}))}))}),(function(n){if("SyntaxError"===n.name)throw n;return te(f(e),t)}))})),n=e.locales,r=void 0===n?"undefined"!=typeof intlDomLocale?[intlDomLocale]:"undefined"==typeof navigator?[]:navigator.languages:n,o=e.defaultLocales,i=void 0===o?["en-US"]:o,a=e.localeResolver,s=void 0===a?X:a,u=e.localesBasePath,c=void 0===u?".":u,l=e.localeMatcher,f=void 0===l?"lookup":l,p=e.headOnly,d=void 0!==p&&p;if("lookup"===f)f=re;else if("function"!=typeof f)throw new TypeError('`localeMatcher` must be "lookup" or a function!');return Z([].concat(E(r),E(i)),t,"No matching locale found for "+[].concat(E(r),E(i)).join(", "))}));function ae(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}var se=function(e){var t=e.strings,n=e.resolvedLocale,r=e.messageStyle,o=void 0===r?"richNested":r,i=e.allSubstitutions,a=e.insertNodes,s=e.keyCheckerConverter,u=void 0===s?Q:s,c=e.defaults,l=e.substitutions,f=e.dom,h=void 0!==f&&f,v=e.forceNodeReturn,g=void 0!==v&&v,y=e.throwOnMissingSuppliedFormatters,m=void 0===y||y,b=e.throwOnExtraSuppliedFormatters,w=void 0===b||b;if(!t||"object"!==d(t))throw new TypeError("Locale strings must be an object!");var _=ee({messageStyle:o}),x=function(e,r){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},f=s.allSubstitutions,v=void 0===f?i:f,y=s.defaults,b=void 0===y?c:y,x=s.dom,S=void 0===x?h:x,j=s.forceNodeReturn,k=void 0===j?g:j,O=s.throwOnMissingSuppliedFormatters,A=void 0===O?m:O,F=s.throwOnExtraSuppliedFormatters,I=void 0===F?w:F;e=u(e,o);var D=_(t,e),P=function(e){var t,n=e.message,r=e.defaults,o=e.messageStyle,i=e.messageForKey,a=void 0===i?ee({messageStyle:o}):i,s=e.key;if("string"==typeof n)t=n;else if(!1===r||null==r)t=!1;else{if(!r||"object"!==d(r))throw new TypeError("Default locale strings must resolve to `false`, nullish, or an object!");var u=a(r,s);t=u?u.value:u}if(!1===t)throw new Error("Key value not found for key: (".concat(s,")"));return t}({message:!(!D||"string"!=typeof D.value)&&D.value,defaults:b,messageForKey:_,key:e});return function(e){var t=e.string,n=e.locale,r=e.locals,o=e.switches,i=e.allSubstitutions,a=void 0===i?[z]:i,s=e.insertNodes,u=void 0===s?Y:s,c=e.substitutions,l=void 0!==c&&c,f=e.dom,p=void 0!==f&&f,d=e.forceNodeReturn,h=void 0!==d&&d,v=e.throwOnMissingSuppliedFormatters,g=void 0===v||v,y=e.throwOnExtraSuppliedFormatters,m=void 0===y||y;if("string"!=typeof t)throw new TypeError("An options object with a `string` property set to a string must be provided for `getDOMForLocaleString`.");var b=function(e){var t=$();return h?t.createTextNode(e):e},w=[];if(!l&&!a&&!g)return b(t);l||(l={});var _=u({string:t,dom:p,usedKeys:w,substitutions:l,allSubstitutions:a,locale:n,locals:r,switches:o,missingSuppliedFormatters:function(e){var t=e.key,n=e.formatter,r=n.isMatch(t);if(n.constructor.isMatchingKey(t)&&!r){if(g)throw new Error("Missing formatting key: ".concat(t));return!0}return!1},checkExtraSuppliedFormatters:function(e){var t=e.substitutions;m&&Object.keys(t).forEach((function(e){if(!w.includes(e))throw new Error("Extra formatting key: ".concat(e))}))}});if("string"==typeof _)return b(_);var x=$().createDocumentFragment();return x.append.apply(x,E(_)),x}({string:P,locals:t.head&&t.head.locals,switches:t.head&&t.head.switches,locale:n,allSubstitutions:v,insertNodes:a,substitutions:p(p({},l),r),dom:S,forceNodeReturn:k,throwOnMissingSuppliedFormatters:A,throwOnExtraSuppliedFormatters:I})};return x.resolvedLocale=n,x.strings=t,x.sort=function(e,t){return L(n,e,t)},x.sortList=function(e,t,r,o){return U(n,e,t,r,o)},x.list=function(e,t){return R(n,e,t)},x},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locales,n=e.defaultLocales,r=e.localeStringFinder,o=void 0===r?oe:r,i=e.localesBasePath,a=e.localeResolver,s=e.localeMatcher,u=e.messageStyle,c=e.allSubstitutions,l=e.insertNodes,f=e.keyCheckerConverter,p=e.defaults,d=e.substitutions,h=e.maximumLocalNestingDepth,v=e.dom,g=e.forceNodeReturn,y=e.throwOnMissingSuppliedFormatters,m=e.throwOnExtraSuppliedFormatters;try{return ae(o({locales:t,defaultLocales:n,localeResolver:a,localesBasePath:i,localeMatcher:s}),(function(e){var t=e.strings,r=e.locale;return function(e,t){var n=e();return n&&n.then?n.then(t):t(n)}((function(){if(!p&&n)return ae(o({locales:n,defaultLocales:[],localeResolver:a,localesBasePath:i,localeMatcher:s}),(function(e){p=e.strings,e.locale===r&&(p=null)}))}),(function(){return se({strings:t,resolvedLocale:r,messageStyle:u,allSubstitutions:c,insertNodes:l,keyCheckerConverter:f,defaults:p,substitutions:d,maximumLocalNestingDepth:h,dom:v,forceNodeReturn:g,throwOnMissingSuppliedFormatters:y,throwOnExtraSuppliedFormatters:m})}))}))}catch(e){return Promise.reject(e)}};function ce(e,{before:t,after:n,favicon:r,canvas:o,image:i=!0,acceptErrors:a}={}){return e=Array.isArray(e)?e:[e],Promise.all(e.map((e=>function(e){let s,u={};Array.isArray(e)?[s,u={}]=e:s=e;let{favicon:c=r}=u;const{before:l=t,after:f=n,canvas:p=o,image:d=i}=u;function h(){l?l.before(v):f?f.after(v):document.head.append(v)}const v=document.createElement("link");return new Promise(((e,t)=>{let n=t;if(a&&(n="function"==typeof a?n=>{a({error:n,stylesheetURL:s,options:u,resolve:e,reject:t})}:e),s.endsWith(".css")?c=!1:s.endsWith(".ico")&&(c=!0),c){if(v.rel="shortcut icon",v.type="image/x-icon",!1===d)return v.href=s,h(),void e(v);const n=document.createElement("canvas");n.width=16,n.height=16;const r=n.getContext("2d"),o=document.createElement("img");return o.addEventListener("error",(e=>{t(e)})),o.addEventListener("load",(()=>{if(!r)throw new Error("Canvas context could not be found");r.drawImage(o,0,0),v.href=p?n.toDataURL("image/x-icon"):s,h(),e(v)})),void(o.src=s)}v.rel="stylesheet",v.type="text/css",v.href=s,h(),v.addEventListener("error",(e=>{n(e)})),v.addEventListener("load",(()=>{e(v)}))}))}(e))))}function le(e){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le(e)}function fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||de(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pe(e){return function(e){if(Array.isArray(e))return he(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||de(e)||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 de(e,t){if(e){if("string"==typeof e)return he(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?he(e,t):void 0}}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ve=/^(?:submit|button|image|reset|file)$/i,ge=/^(?:input|select|textarea|keygen)/i,ye=/(\[[^[\]]*])/g;function me(e,t){"object"!==le(t)?t={hash:Boolean(t)}:void 0===t.hash&&(t.hash=!0);var n=t.hash?{}:"",r=t.serializer||(t.hash?we:_e),o=e&&e.elements?pe(e.elements):[],i=Object.create(null);return o.forEach((function(e){if((t.disabled||!e.disabled)&&e.name&&ge.test(e.nodeName)&&!ve.test(e.type)){var o=e.name,a=e.type,s=e.name,u=e.checked,c=e.value;if("checkbox"!==a&&"radio"!==a||u||(c=void 0),t.empty){if("checkbox"!==a||u||(c=""),"radio"===a&&(i[s]||u?u&&(i[s]=!0):i[s]=!1,void 0===c))return}else if(!c)return;if("select-multiple"===a){var l=!1;return pe(e.options).forEach((function(e){var i=t.empty&&!e.value,a=e.value||i;e.selected&&a&&(l=!0,n=t.hash&&"[]"!==o.slice(-2)?r(n,o+"[]",e.value):r(n,o,e.value))})),void(!l&&t.empty&&(n=r(n,o,"")))}n=r(n,o,c)}})),t.empty&&Object.entries(i).forEach((function(e){var t=fe(e,2),o=t[0];t[1]||(n=r(n,o,""))})),n}function be(e,t,n){if(0===t.length)return n;var r=t.shift(),o=r.match(/^\[(.+?)]$/);if("[]"===r)return e=e||[],Array.isArray(e)?e.push(be(null,t,n)):(e._values=e._values||[],e._values.push(be(null,t,n))),e;if(o){var i=o[1],a=Number(i);isNaN(a)?(e=e||{})[i]=be(e[i],t,n):(e=e||[])[a]=be(e[a],t,n)}else e[r]=be(e[r],t,n);return e}function we(e,t,n){if(t.match(ye)){be(e,function(e){var t=[],n=new RegExp(ye),r=/^([^[\]]*)/.exec(e);for(r[1]&&t.push(r[1]);null!==(r=n.exec(e));)t.push(r[1]);return t}(t),n)}else{var r=e[t];r?(Array.isArray(r)||(e[t]=[r]),e[t].push(n)):e[t]=n}return e}function _e(e,t,n){return n=n.replace(/(\r)?\n/g,"\r\n"),n=(n=encodeURIComponent(n)).replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+n}function xe(e,t){Object.entries(t).forEach((function(t){var n=fe(t,2),r=n[0],o=n[1],i=e[r],a=!1;if(!i&&!(i=e.querySelector('[name="'.concat(r,'"]')))){if(!((i=e[r+"[]"])&&"object"===le(i)&&"length"in i||(i=e.querySelectorAll('[name="'.concat(r,'[]"]'))).length))throw new Error("Name not found ".concat(r));a=!0}var s=i.type;if("checkbox"===s&&(i.checked=""!==o),("radio"===s||i[0]&&"radio"===i[0].type)&&pe(e.querySelectorAll('[name="'.concat(r+(a?"[]":""),'"]'))).forEach((function(e){e.checked=o===e.value})),i[0]&&"select-multiple"===i[0].type)pe(i[0].options).forEach((function(e){o.includes(e.value)&&(e.selected=!0)}));else if(Array.isArray(o)){if("select-multiple"===s)return void pe(i.options).forEach((function(e){o.includes(e.value)&&(e.selected=!0)}));o.forEach((function(e,t){var n=i[t];if("checkbox"!==n.type)"select-multiple"!==n.type?n.value=e:pe(n.options).forEach((function(t){e.includes(t.value)&&(t.selected=!0)}));else{var r=n.value===e||"on"===e;n.checked=r}}))}else i.value=o}))}let Se;"undefined"!=typeof window&&window&&(Se=window);let je="undefined"!=typeof document&&document||Se?.document;const Ee=["$plugins","$map"],ke="http://www.w3.org/1999/xhtml",Oe=/-([a-z])/gu,Ae=new Map([["maxlength","maxLength"],["minlength","minLength"],["readonly","readOnly"]]),Fe=["checked","defaultChecked","defaultSelected","disabled","indeterminate","open","readOnly","selected","accessKey","async","autocapitalize","autofocus","contentEditable","defaultValue","defer","draggable","formnovalidate","hidden","innerText","inputMode","ismap","multiple","novalidate","pattern","required","spellcheck","translate","value","willvalidate"],Ie=["autocomplete","dir","integrity","lang","max","min","minLength","maxLength","title"],De=e=>{if(!je)throw new Error("No document object");return je.querySelector(e)},Pe=e=>{if(!je)throw new Error("No document object");return[...je.querySelectorAll(e)]};function Ne(e,t){var n;"template"!==((n=e).nodeName&&n.nodeName.toLowerCase())?e.append(t):e.content.append(t)}function Te(e,t,n){if(!je)throw new Error("No document defined");if(!/^\w+$/u.test(n))throw new TypeError(`Bad ${e} reference; with prefix "${t}" and arg "${n}"`);const r=je.createElement("div");return r.innerHTML="&"+t+n+";",je.createTextNode(r.innerHTML)}function Ce(e,t){return t.toUpperCase()}function $e(e){return null==e}function Le(e){const t=typeof e;if("string"==typeof e||void 0===e)return"string";if("object"===t){if(null===e)return"null";if(Array.isArray(e))return"array";if("nodeType"in e)switch(e.nodeType){case 1:return"element";case 9:return"document";case 11:return"fragment";default:return"non-container node"}}return t}function Re(e,t){return e.append(t),e}function Ue(e){return function(...t){const n=t[0];let r=e[""]?' xmlns="'+e[""]+'"':n;for(const[t,n]of Object.entries(e))""!==t&&(r+=" xmlns:"+t+'="'+n+'"');return r}}function Me(e){return function(t,n){const r=e.childNodes[n],o=Array.isArray(t)?Ve(...t):Ve(t);r.replaceWith(o)}}function ze(e){return function(t){if("string"==typeof t||"number"==typeof t)throw new TypeError("Unexpected text string/number in the head");Array.isArray(t)?e.append(Ve(...t)):"object"==typeof t&&"nodeType"in t?e.append(t):e.append(Ve(t))}}function Be(e){return function(t){"string"==typeof t||"number"==typeof t?e.append(String(t)):Array.isArray(t)?e.append(Ve(...t)):"object"==typeof t&&"nodeType"in t?e.append(t):e.append(Ve(t))}}function qe(e,t,n,r,o){if(r.$state=o??"attributeValue",n&&"object"==typeof n){const o=We(r,Object.keys(n)[0]);if(o)return o.set({opts:r,element:e,attribute:{name:t,value:n}})}return n}function We(e,t){return e.$plugins&&e.$plugins.find((e=>e.name===t))}const Ve=function e(...t){if(!Se)throw new Error("No window object");if(!je)throw new Error("No document object");let n=je.createDocumentFragment();function r(r){if(!je)throw new Error("No document object");for(let[p,d]of Object.entries(r))if(p=Ae.get(p)??p,Ie.includes(p))d=qe(n,p,d,a),$e(d)||(n[p]=d);else if(Fe.includes(p))d=qe(n,p,d,a),n[p]=d;else switch(p){case"#":a.$state="fragmentChildren",o[o.length]=e(a,d);break;case"$shadow":{const{open:t,closed:r}=d;let{content:o,template:i}=d;const a=n.attachShadow({mode:r||!1===t?"closed":"open"});i?(Array.isArray(i)?i="object"===Le(i[0])?e("template",...i,je.body):e("template",i,je.body):"string"==typeof i&&(i=De(i)),e(i.content.cloneNode(!0),a)):(o||!0!==t&&(o=t||"boolean"==typeof r?o:r),o&&"boolean"!=typeof o&&(Array.isArray(o)?e({"#":o},a):e(o,a)));break}case"$state":case"is":case"xmlns":break;case"$custom":Object.assign(n,d);break;case"$define":{if(!("localName"in n))throw new Error("Element expected for `$define`");const e=n.localName.toLowerCase(),o=!e.includes("-");let i;if(o&&(i=n.getAttribute("is"),!i)){if(!Object.hasOwn(r,"is"))throw new TypeError(`Expected \`is\` with \`$define\` on built-in; args: ${JSON.stringify(t)}`);r.is=qe(n,"is",r.is,a),n.setAttribute("is",r.is),({is:i}=r)}const s=o?i:e;if(window.customElements.get(s))break;const u=t=>{if(!je)throw new Error("No document object");const n="object"==typeof l&&"string"==typeof l.extends?je.createElement(l.extends).constructor:o?je.createElement(e).constructor:window.HTMLElement;return t?class extends n{constructor(){super(),t.call(this)}}:class extends n{}};let c,l,f;const p=d;Array.isArray(p)?p.length<=2?([c,l]=p,"string"==typeof l?l={extends:l}:l&&!Object.hasOwn(l,"extends")&&(f=l),"object"==typeof c&&(f=c,c=u())):([c,f,l]=p,"string"==typeof l&&(l={extends:l})):"function"==typeof p?c=p:(f=p,c=u()),c.toString().startsWith("class")||(c=u(c)),!l&&o&&(l={extends:e}),f&&Object.entries(f).forEach((([e,t])=>{c.prototype[e]=t})),window.customElements.define(s,c,"object"==typeof l?l:void 0);break}case"$symbol":{const[e,t]=d;if("function"==typeof t){const r=t.bind(n);"string"==typeof e?n[Symbol.for(e)]=r:n[e]=r}else{const r=t;r.elem=n,"string"==typeof e?n[Symbol.for(e)]=r:n[e]=r}break}case"$data":f(d);break;case"$attribute":{const e=d,t=3===e.length?je.createAttributeNS(e[0],e[1]):je.createAttribute(e[0]);t.value=e[e.length-1],o[o.length]=t;break}case"$text":{const e=je.createTextNode(d);o[o.length]=e;break}case"$document":{const t=je.implementation.createHTMLDocument();if(!d)throw new Error("Bad attribute value");const n=d;if(n.childNodes){const e=n.childNodes.length;for(;t.childNodes[e];){t.childNodes[e].remove()}n.childNodes.forEach(Me(t))}else{if(n.$DOCTYPE){const r={$DOCTYPE:n.$DOCTYPE},o=e(r);t.firstChild?.replaceWith(o)}const r=t.querySelector("html"),o=r?.querySelector("head"),i=r?.querySelector("body");if(n.title||n.head){const e=je.createElement("meta");e.setAttribute("charset","utf-8"),o?.append(e),n.title&&(t.title=n.title),n.head&&o&&n.head.forEach(ze(o))}n.body&&i&&n.body.forEach(Be(i))}o[o.length]=t;break}case"$DOCTYPE":{const e=d,t=je.implementation.createDocumentType(e.name,e.publicId||"",e.systemId||"");o[o.length]=t;break}case"$on":for(let[e,r]of Object.entries(d||{})){if("function"==typeof r&&(r=[r,!1]),"function"!=typeof r[0])throw new TypeError(`Expect a function for \`$on\`; args: ${JSON.stringify(t)}`);s=n,u=e,c=r[0],l=r[1],s.addEventListener(u,c,Boolean(l))}break;case"className":case"class":d=qe(n,p,d,a),$e(d)||(n.className=d);break;case"dataset":{const e=(t,r)=>{let o="";const i=""!==r;Object.keys(t).forEach((a=>{const s=t[a];if(o=i?r+a.replace(Oe,Ce).replace(/^([a-z])/u,Ce):r+a.replace(Oe,Ce),null===s||"object"!=typeof s)return $e(s)||(n.dataset[o]=s),void(o=r);e(s,o)}))};e(d,"");break}case"innerHTML":$e(d)||(n.innerHTML=d);break;case"htmlFor":case"for":if("label"===i){d=qe(n,p,d,a),$e(d)||(n.htmlFor=d);break}d=qe(n,p,d,a),n.setAttribute(p,d);break;default:{if(p.startsWith("on")){d=qe(n,p,d,a),n[p]=d;break}if("style"===p){if(d=qe(n,p,d,a),$e(d))break;if("object"==typeof d){for(const[e,t]of Object.entries(d))$e(t)||("float"===e?(n.style.cssFloat=t,n.style.styleFloat=t):n.style[e.replace(Oe,Ce)]=t);break}n.setAttribute(p,d);break}const e=p,t=We(a,e);if(t){t.set({opts:a,element:o[0],attribute:{name:e,value:d}});break}d=qe(n,p,d,a),n.setAttribute(p,d);break}}var s,u,c,l}const o=[];let i,a,s=!1,u=0;if("object"===Le(t[0])&&Object.keys(t[0]).some((e=>Ee.includes(e)))){if(a=t[0],void 0===a.$state&&(s=!0,a.$state="root"),Array.isArray(a.$map)&&(a.$map={root:a.$map}),"$plugins"in a){if(!Array.isArray(a.$plugins))throw new TypeError(`\`$plugins\` must be an array; args: ${JSON.stringify(t)}`);a.$plugins.forEach((e=>{if(!e||"object"!=typeof e)throw new TypeError(`Plugin must be an object; args: ${JSON.stringify(t)}`);if(!e.name||!e.name.startsWith("$_"))throw new TypeError(`Plugin object name must be present and begin with \`$_\`; args: ${JSON.stringify(t)}`);if("function"!=typeof e.set)throw new TypeError(`Plugin object must have a \`set\` method; args: ${JSON.stringify(t)}`)}))}u=1}else a={$state:void 0};const c=t.length,l=a.$map&&a.$map.root,f=e=>{let t,r;const o=l;if(!0===e)[t,r]=o;else if(Array.isArray(e)){if("string"==typeof e[0])return void e.forEach((e=>{f(a.$map[e])}));t=e[0]||o[0],r=e[1]||o[1]}else/^\[object (?:Weak)?Map\]$/u.test([].toString.call(e))?(t=e,r=o[1]):(t=o[0],r=e);t.set(n,r)};for(let s=u;s<c;s++){let u=t[s];const l=Le(u);switch(l){case"null":if(s===c-1)return o.length<=1?o[0]:o.reduce(Re,je.createDocumentFragment());throw new TypeError(`\`null\` values not allowed except as final Jamilih argument; index ${s} on args: ${JSON.stringify(t)}`);case"string":switch(u){case"!":o[o.length]=je.createComment(t[++s]);break;case"?":{u=t[++s];let e=t[++s];const n=e;if(n&&"object"==typeof n){const t=[];for(const[e,r]of Object.entries(n))t.push(e+'="'+r.replace(/"/gu,"&quot;")+'"');e=t.join(" ")}try{o[o.length]=je.createProcessingInstruction(u,e)}catch(t){o[o.length]=je.createComment("?"+u+" "+e+"?")}break}case"&":o[o.length]=Te("entity","",t[++s]);break;case"#":o[o.length]=Te("decimal",u,String(t[++s]));break;case"#x":o[o.length]=Te("hexadecimal",u,t[++s]);break;case"![":try{o[o.length]=je.createCDATASection(t[++s])}catch(e){o[o.length]=je.createTextNode(t[s])}break;case"":o[o.length]=n=je.createDocumentFragment(),a.$state="fragment";break;default:{i=u;const e=t[s+1];if(e&&"object"===Le(e)&&e.is){const{is:t}=e;n=je.createElementNS?je.createElementNS(ke,i,{is:t}):je.createElement(i,{is:t})}else n=je.createElementNS?je.createElementNS(ke,i):je.createElement(i);a.$state="element",o[o.length]=n;break}}break;case"object":{if(!u||"object"!=typeof u)throw new Error("Null should not reach here");const e=u;if("xmlns"in e){const t=e,r=t.xmlns&&"object"==typeof t.xmlns?Ue(t.xmlns):' xmlns="'+t.xmlns+'"';n=o[o.length-1]=(new Se.DOMParser).parseFromString((new Se.XMLSerializer).serializeToString(n).replace(' xmlns="'+ke+'"',r),"application/xml").documentElement,a.$state="element"}r(e);break}case"document":case"fragment":case"element":if(0===s&&(n=u,a.$state="element"),s===c-1||s===c-2&&null===t[s+1]){const e=o.length;for(let t=0;t<e;t++)Ne(u,o[t])}else o[o.length]=u;break;case"array":{const r=u,o=r.length;for(let i=0;i<o;i++){const o=r[i],s=typeof o;if(null===o||$e(o))throw new TypeError(`Bad children (parent array: ${JSON.stringify(t)}; index ${i} of child: ${JSON.stringify(r)})`);switch(s){case"string":case"number":case"boolean":Ne(n,je.createTextNode(String(o)));break;default:if("object"!=typeof o)throw new TypeError(`Bad children (parent array: ${JSON.stringify(t)}; index ${i} of child: ${JSON.stringify(r)})`);if(Array.isArray(o))a.$state="children",Ne(n,e(a,...o));else if("#"in o)a.$state="fragmentChildren",Ne(n,e(a,o["#"]));else{let e;"nodeType"in o||(e=qe(n,null,o,a,"children")),Ne(n,e||o)}}}break}default:throw new TypeError(`Unexpected type: ${l}; arg: ${u}; index ${s} on args: ${JSON.stringify(t)}`)}}const p=o[0]||n;return s&&a.$map&&a.$map.root&&f(!0),p};class He extends Error{constructor(e,t){super(e),this.code=0,this.name=t}}Ve.toJML=function(e,{stringOutput:t=!1,reportInvalidState:n=!0,stripWhitespace:r=!1}={}){if(!Se)throw new Error("No window object set");"string"==typeof e&&(e=(new Se.DOMParser).parseFromString(e,"text/html"));const o=[];let i=o,a=0;function s(e){if(n){const t=new He(e,"INVALID_STATE_ERR");throw t.code=11,t}}function u(e){i[a]=e,a++}function c(){u([]),i=i[a-1],a=0}function l(e,t){i=i[a-1][e],a=0,t&&(i=i[t])}return function e(t,n){const o="nodeType"in t?t.nodeType:null;if(!o)throw new TypeError("Not an XML type");if(5===o)return void u(["&",t.nodeName]);let f,p;function d(){f=i,p=a}function h(){i=f,a=p,a++}switch(n={...n},[2,3,4,7,8].includes(o)&&t.nodeValue&&!/^([\u0009\u000A\u000D\u0020-\uD7FF\uE000-\uFFFD]|[\uD800-\uDBFF][\uDC00-\uDFFF])*$/u.test(t.nodeValue)&&s("Node has bad XML character value"),o){case 1:{const r=t;d();const o=r.nodeName.toLowerCase();c(),u(o);const i={};let a=!1;n[r.prefix||""]!==r.namespaceURI&&(n[r.prefix||""]=r.namespaceURI,r.prefix?i["xmlns:"+r.prefix]=r.namespaceURI:r.namespaceURI?i.xmlns=r.namespaceURI:i.xmlns=null,a=!0),r.attributes.length?u([...r.attributes].reduce((function(e,t){return e[t.name]=t.value,e}),i)):a&&u(i);const{childNodes:s}=r;s.length&&(c(),[...s].forEach((function(t){e(t,n)}))),h();break}case 2:{const e=t;u({$attribute:[e.namespaceURI,e.name,e.value]});break}case 3:{const e=t;if(!e.nodeValue)throw new Error("Unexpected null comment value");if(r&&/^\s+$/u.test(e.nodeValue))return void u("");u(e.nodeValue);break}case 4:{const e=t;e.nodeValue?.includes("]]>")&&s("CDATA cannot end with closing ]]>"),u(["![",e.nodeValue]);break}case 7:{const e=t;/^xml$/iu.test(e.target)&&s('Processing instructions cannot be "xml".'),e.target.includes("?>")&&s("Processing instruction targets cannot include ?>"),e.target.includes(":")&&s('The processing instruction target cannot include ":"'),e.data.includes("?>")&&s("Processing instruction data cannot include ?>"),u(["?",e.target,e.data]);break}case 8:{const e=t;if(!e.nodeValue)throw new Error("Unexpected null comment value");(e.nodeValue.includes("--")||e.nodeValue.length&&e.nodeValue.lastIndexOf("-")===e.nodeValue.length-1)&&s("Comments cannot include --"),u(["!",e.nodeValue]);break}case 9:{const r=t;d();u({$document:{childNodes:[]}}),l("$document","childNodes");const{childNodes:o}=r;o.length||s("Documents must have a child node"),[...o].forEach((function(t){e(t,n)})),h();break}case 10:{const e=t;d();const n={$DOCTYPE:{name:e.name}};/^(\u0020|\u000D|\u000A|[a-zA-Z0-9]|[-'()+,./:=?;!*#@$_%])*$/u.test(e.publicId)||s("A publicId must have valid characters."),function(e,t){t.systemId.includes('"')&&t.systemId.includes("'")&&s("systemId cannot have both single and double quotes.");const{publicId:n,systemId:r}=t;r&&(e.systemId=r),n&&(e.publicId=n)}(n.$DOCTYPE,e),u(n),h();break}case 11:{const r=t;d(),u({"#":[]}),l("#");const{childNodes:o}=r;[...o].forEach((function(t){e(t,n)})),h();break}default:throw new TypeError("Not an XML type")}}(e,{}),t?JSON.stringify(o[0]):o[0]},Ve.toJMLString=function(e,t){return Ve.toJML(e,Object.assign(t||{},{stringOutput:!0}))},Ve.toDOM=function(...e){return Ve(...e)},Ve.toHTML=function(...e){const t=Ve(...e);switch(t.nodeType){case 1:return t.outerHTML;case 2:return`${t.name}="${t.value.replace(/"/gu,"&quot;")}"`;case 3:if(!t.nodeValue)throw new TypeError("Unexpected null Text node");return t.nodeValue;case 9:case 11:return[...t.childNodes].map((e=>Ve.toHTML(e))).join("");case 10:{const e=t;return`<!DOCTYPE ${e.name}${e.publicId?` PUBLIC "${e.publicId}" "${e.systemId}"`:e.systemId?` SYSTEM "${e.systemId}"`:""}>`}default:throw new Error("Unexpected node type")}},Ve.toDOMString=function(...e){return Ve.toHTML(...e)},Ve.toXML=function(...e){if(!Se)throw new Error("No window object set");const t=Ve(...e);return(new Se.XMLSerializer).serializeToString(t)},Ve.toXMLDOMString=function(...e){return Ve.toXML(...e)};class Je extends Map{get(e){const t="string"==typeof e?De(e):e;return super.get.call(this,t)}set(e,t){const n="string"==typeof e?De(e):e;return super.set.call(this,n,t)}invoke(e,t,...n){const r="string"==typeof e?De(e):e;return this.get(r)[t](r,...n)}}class Ke extends WeakMap{get(e){const t="string"==typeof e?De(e):e;if(!t)throw new Error("Can't find the element");return super.get.call(this,t)}set(e,t){const n="string"==typeof e?De(e):e;if(!n)throw new Error("Can't find the element");return super.set.call(this,n,t)}invoke(e,t,...n){const r="string"==typeof e?De(e):e;if(!r)throw new Error("Can't find the element");return this.get(r)[t](r,...n)}}let Ge;Ve.Map=Je,Ve.WeakMap=Ke,Ve.weak=function(e,...t){const n=new Ke;return[n,Ve({$map:[n,e]},...t)]},Ve.strong=function(e,...t){const n=new Je;return[n,Ve({$map:[n,e]},...t)]},Ve.symbol=Ve.sym=Ve.for=function(e,t){return("string"==typeof e?De(e):e)["symbol"==typeof t?t:Symbol.for(t)]},Ve.command=function(e,t,n,...r){if(!(e="string"==typeof e?De(e):e))throw new Error("No element found");let o;if(["symbol","string"].includes(typeof t))return o=Ve.sym(e,t),"function"==typeof o?o(n,...r):o[n](...r);if(o=t.get(e),!o)throw new Error("No map found");return"function"==typeof o?o.call(e,n,...r):o[n](e,...r)},Ve.setWindow=e=>{Se=e,je=Se?.document,je&&je.body&&(Ge=je.body)},Ve.getWindow=()=>{if(!Se)throw new Error("No window object set");return Se},je&&je.body&&(Ge=je.body);const Ze=" ",Xe=(e,t)=>{const n="string"==typeof e?(r=e,document.querySelector(r)):e;var r;return n?.querySelector(t)},Ye={en:{submit:"Submit",cancel:"Cancel",ok:"Ok"}};const Qe=new class{constructor({locale:e,localeObject:t}={}){this.localeStrings=Ye.en,this.setLocale({locale:e,localeObject:t})}setLocale({locale:e,localeObject:t={}}){this.localeStrings={...Ye.en,...e?Ye[e]:{},...t}}makeDialog({atts:e={$on:null},children:t=[],close:n,remove:r=!0}){n&&(e.$on||(e.$on={}),e.$on.close||(e.$on.close=n));const o=Ve("dialog",e,t,De("#main"));return o.showModal(),r&&o.addEventListener("close",(()=>{o.remove()})),o}makeSubmitDialog({submit:e,submitClass:t="submit",...n}){const r=this.makeCancelDialog(n);return Xe(r,`button.${n.cancelClass||"cancel"}`).before(Ve("button",{class:t,$on:{click(t){e&&e.call(this,{e:t,dialog:r})}}},[this.localeStrings.submit]),Ze.repeat(2)),r}makeCancelDialog({submit:e,cancel:t,cancelClass:n="cancel",submitClass:r="submit",...o}){const i=this.makeDialog(o);return Ve("div",{class:r},[["br"],["br"],["button",{class:n,$on:{click(e){e.preventDefault(),t&&!1===t.call(this,{e:e,dialog:i})||i.close()}}},[this.localeStrings.cancel]]],i),i}alert(e,t){e="string"==typeof e?{message:e}:e;const{ok:n=("object"==typeof t?!1!==t.ok:!1!==t),message:r,submitClass:o="submit"}=e;return new Promise((e=>{const t=Ve("dialog",[r,...n?[["br"],["br"],["div",{class:o},[["button",{$on:{click(){t.close(),e()}}},[this.localeStrings.ok]]]]]:[]],De("#main"));t.showModal()}))}prompt(e){e="string"==typeof e?{message:e}:e;const{message:t,submit:n,...r}=e;return new Promise(((e,o)=>{this.makeSubmitDialog({...r,submit:function({e:t,dialog:r}){n&&n.call(this,{e:t,dialog:r}),r.close(),e(Xe(r,"input").value)},cancel(){o(new Error("cancelled"))},children:[["label",[t,Ze.repeat(3),["input"]]]]})}))}confirm(e){e="string"==typeof e?{message:e}:e;const{message:t,submitClass:n="submit"}=e;return new Promise(((e,r)=>{const o=Ve("dialog",[t,["br"],["br"],["div",{class:n},[["button",{$on:{click(){o.close(),e()}}},[this.localeStrings.ok]],Ze.repeat(2),["button",{$on:{click(){o.close(),r(new Error("cancelled"))}}},[this.localeStrings.cancel]]]]],De("#main"));o.showModal()}))}};class et{constructor({langData:e}){this.langData=e}localeFromLangData(e){return this.langData["localization-strings"][e]}getLanguageFromCode(e){return this.localeFromLangData(e).languages[e]}getFieldNameFromPluginNameAndLocales({pluginName:e,workI18n:t,targetLanguage:n,applicableFieldI18N:r,meta:o,metaApplicableField:i}){return t(["plugins",e,"fieldname"],{...o,...i,applicableField:r,targetLanguage:n?this.getLanguageFromCode(n):""},{throwOnExtraSuppliedFormatters:!1})}getLanguageInfo({$p:e}){const t=this.langData.languages,n=e=>!!t.some((({code:t})=>t===e))&&e,r=e.get("lang",!0),o=navigator.languages.filter(n),i=o.length?o:[n(navigator.language)||"en-US"];return{lang:[...(r||i[0]).split("."),...i],langs:t,languageParam:r,fallbackLanguages:i}}}var tt=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=84)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;try{r={clone:n(88),constant:n(64),each:n(146),filter:n(152),has:n(175),isArray:n(0),isEmpty:n(177),isFunction:n(17),isUndefined:n(178),keys:n(6),map:n(179),reduce:n(181),size:n(184),transform:n(190),union:n(191),values:n(210)}}catch(e){}r||(r=window._),e.exports=r},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(47),i="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,a=o||i||Function("return this")();e.exports=a},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return null!=e&&"object"==n(e)}},function(e,t,n){var r=n(100),o=n(105);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){var t=n(e);return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(52),o=n(37),i=n(7);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(9),o=n(101),i=n(102),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(132),o=n(31),i=n(133),a=n(61),s=n(134),u=n(8),c=n(48),l=c(r),f=c(o),p=c(i),d=c(a),h=c(s),v=u;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=v(new o)||i&&"[object Promise]"!=v(i.resolve())||a&&"[object Set]"!=v(new a)||s&&"[object WeakMap]"!=v(new s))&&(v=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=v},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},function(e,t,n){(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(2),i=n(121),a="object"==r(t)&&t&&!t.nodeType&&t,s=a&&"object"==r(e)&&e&&!e.nodeType&&e,u=s&&s.exports===a?o.Buffer:void 0,c=(u?u.isBuffer:void 0)||i;e.exports=c}).call(this,n(14)(e))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=s(p);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(90),o=n(91),i=n(92),a=n(93),s=n(94);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(30);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(8),o=n(5);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(4)(Object,"create");e.exports=r},function(e,t,n){var r=n(114);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(49),o=n(50);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=i?i(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),a?o(n,c,l):r(n,c,l)}return n}},function(e,t,n){var r=n(120),o=n(3),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},function(e,t,n){var r=n(122),o=n(35),i=n(36),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(65),o=n(150)(r);e.exports=o},function(e,t){e.exports=function(e){return e}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(154),i=n(164),a=n(25),s=n(0),u=n(173);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==r(e)?s(e)?i(e[0],e[1]):o(e):u(e)}},function(e,t,n){var r=n(44);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(1);function i(e){this._isDirected=!o.has(e,"directed")||e.directed,this._isMultigraph=!!o.has(e,"multigraph")&&e.multigraph,this._isCompound=!!o.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=o.constant(void 0),this._defaultEdgeLabelFn=o.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 a(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function u(e,t,n,r){var i=""+t,a=""+n;if(!e&&i>a){var s=i;i=a,a=s}return i+""+a+""+(o.isUndefined(r)?"\0":r)}function c(e,t){return u(e,t.v,t.w,t.name)}e.exports=i,i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(e){return this._label=e,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(e){return o.isFunction(e)||(e=o.constant(e)),this._defaultNodeLabelFn=e,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return o.keys(this._nodes)},i.prototype.sources=function(){var e=this;return o.filter(this.nodes(),(function(t){return o.isEmpty(e._in[t])}))},i.prototype.sinks=function(){var e=this;return o.filter(this.nodes(),(function(t){return o.isEmpty(e._out[t])}))},i.prototype.setNodes=function(e,t){var n=arguments,r=this;return o.each(e,(function(e){n.length>1?r.setNode(e,t):r.setNode(e)})),this},i.prototype.setNode=function(e,t){return o.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},i.prototype.node=function(e){return this._nodes[e]},i.prototype.hasNode=function(e){return o.has(this._nodes,e)},i.prototype.removeNode=function(e){var t=this;if(o.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],o.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),o.each(o.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],o.each(o.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},i.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(o.isUndefined(t))t="\0";else{for(var n=t+="";!o.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},i.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},i.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}},i.prototype.children=function(e){if(o.isUndefined(e)&&(e="\0"),this._isCompound){var t=this._children[e];if(t)return o.keys(t)}else{if("\0"===e)return this.nodes();if(this.hasNode(e))return[]}},i.prototype.predecessors=function(e){var t=this._preds[e];if(t)return o.keys(t)},i.prototype.successors=function(e){var t=this._sucs[e];if(t)return o.keys(t)},i.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return o.union(t,this.successors(e))},i.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},i.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;o.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),o.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var r={};return this._isCompound&&o.each(t.nodes(),(function(e){t.setParent(e,function e(o){var i=n.parent(o);return void 0===i||t.hasNode(i)?(r[o]=i,i):i in r?r[i]:e(i)}(e))})),t},i.prototype.setDefaultEdgeLabel=function(e){return o.isFunction(e)||(e=o.constant(e)),this._defaultEdgeLabelFn=e,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return o.values(this._edgeObjs)},i.prototype.setPath=function(e,t){var n=this,r=arguments;return o.reduce(e,(function(e,o){return r.length>1?n.setEdge(e,o,t):n.setEdge(e,o),o})),this},i.prototype.setEdge=function(){var e,t,n,i,s=!1,c=arguments[0];"object"===r(c)&&null!==c&&"v"in c?(e=c.v,t=c.w,n=c.name,2===arguments.length&&(i=arguments[1],s=!0)):(e=c,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),e=""+e,t=""+t,o.isUndefined(n)||(n=""+n);var l=u(this._isDirected,e,t,n);if(o.has(this._edgeLabels,l))return s&&(this._edgeLabels[l]=i),this;if(!o.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=s?i:this._defaultEdgeLabelFn(e,t,n);var f=function(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return r&&(s.name=r),s}(this._isDirected,e,t,n);return e=f.v,t=f.w,Object.freeze(f),this._edgeObjs[l]=f,a(this._preds[t],e),a(this._sucs[e],t),this._in[t][l]=f,this._out[e][l]=f,this._edgeCount++,this},i.prototype.edge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return o.has(this._edgeLabels,r)},i.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},i.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var r=o.values(n);return t?o.filter(r,(function(e){return e.v===t})):r}},i.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var r=o.values(n);return t?o.filter(r,(function(e){return e.w===t})):r}},i.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},function(e,t,n){var r=n(15),o=n(95),i=n(96),a=n(97),s=n(98),u=n(99);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(4)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(106),o=n(113),i=n(115),a=n(116),s=n(117);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(47),i="object"==r(t)&&t&&!t.nodeType&&t,a=i&&"object"==r(e)&&e&&!e.nodeType&&e,s=a&&a.exports===i&&o.process,u=function(){try{return a&&a.require&&a.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=u}).call(this,n(14)(e))},function(e,t,n){var r=n(23),o=n(123),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(56),o=n(57),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(54)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(62);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(0),i=n(44),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(o(e))return!1;var n=r(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||s.test(e)||!a.test(e)||null!=t&&e in Object(t)}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(8),i=n(3);e.exports=function(e){return"symbol"==r(e)||i(e)&&"[object Symbol]"==o(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r="object"==(void 0===t?"undefined":n(t))&&t&&t.Object===Object&&t;e.exports=r}).call(this,n(11))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(50),o=n(30),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(51);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(4),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(119),o=n(21),i=n(0),a=n(12),s=n(53),u=n(22),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&o(e),f=!n&&!l&&a(e),p=!n&&!l&&!f&&u(e),d=n||l||f||p,h=d?r(e.length,String):[],v=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,v))||h.push(g);return h}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var o=n(e);return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(52),o=n(125),i=n(7);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(39),o=n(40),i=n(38),a=n(57),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=s},function(e,t,n){var r=n(60),o=n(38),i=n(6);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(39),o=n(0);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},function(e,t,n){var r=n(4)(n(2),"Set");e.exports=r},function(e,t,n){var r=n(2).Uint8Array;e.exports=r},function(e,t,n){var r=n(5),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t,n){var r=n(148),o=n(6);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(156),o=n(3);e.exports=function e(t,n,i,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,s))}},function(e,t,n){var r=n(68),o=n(159),i=n(69);e.exports=function(e,t,n,a,s,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var p=u.get(e);if(p&&u.get(t))return p==t;var d=-1,h=!0,v=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++d<l;){var g=e[d],y=t[d];if(a)var m=c?a(y,g,d,t,e,u):a(g,y,d,e,t,u);if(void 0!==m){if(m)continue;h=!1;break}if(v){if(!o(t,(function(e,t){if(!i(v,t)&&(g===e||s(g,e,n,a,u)))return v.push(t)}))){h=!1;break}}else if(g!==y&&!s(g,y,n,a,u)){h=!1;break}}return u.delete(e),u.delete(t),h}},function(e,t,n){var r=n(32),o=n(157),i=n(158);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(5);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},function(e,t,n){var r=n(73),o=n(27);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},function(e,t,n){var r=n(0),o=n(43),i=n(166),a=n(169);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,n){var r=n(73),o=n(21),i=n(0),a=n(53),s=n(34),u=n(27);e.exports=function(e,t,n){for(var c=-1,l=(t=r(t,e)).length,f=!1;++c<l;){var p=u(t[c]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&s(l)&&a(p,l)&&(i(e)||o(e))}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(1),o=n(77);e.exports=function(e,t,n,r){return function(e,t,n,r){var i,a,s={},u=new o,c=function(e){var t=e.v!==i?e.v:e.w,r=s[t],o=n(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<r.distance&&(r.distance=c,r.predecessor=i,u.decrease(t,c))};for(e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},u.add(e,n)}));u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return s}(e,String(t),n||i,r||function(t){return e.outEdges(t)})};var i=r.constant(1)},function(e,t,n){var r=n(1);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))},o.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},o.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t}},function(e,t,n){var r=n(1);e.exports=function(e){var t=0,n=[],o={},i=[];return e.nodes().forEach((function(a){r.has(o,a)||function a(s){var u=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(o,e)?o[e].onStack&&(u.lowlink=Math.min(u.lowlink,o[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,o[e].lowlink))})),u.lowlink===u.index){var c,l=[];do{c=n.pop(),o[c].onStack=!1,l.push(c)}while(s!==c);i.push(l)}}(a)})),i}},function(e,t,n){var r=n(1);function o(e){var t={},n={},o=[];if(r.each(e.sinks(),(function a(s){if(r.has(n,s))throw new i;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],o.push(s))})),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}e.exports=o,o.CycleException=i,i.prototype=new Error},function(e,t,n){var r=n(1);e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);!function e(t,n,o,i,a,s){r.has(i,n)||(i[n]=!0,o||s.push(n),r.each(a(n),(function(n){e(t,n,o,i,a,s)})),o&&s.push(n))}(e,t,"post"===n,a,o,i)})),i}},function(e,t,n){(function(t){var r=n(226),o=["delete","get","head","patch","post","put"];e.exports.load=function(e,n,i){var a,s,u=n.method?n.method.toLowerCase():"get";function c(e,n){e?i(e):("[object process]"===Object.prototype.toString.call(void 0!==t?t:0)&&"function"==typeof n.buffer&&n.buffer(!0),n.end((function(e,t){e?i(e):i(void 0,t)})))}if(void 0!==n.method?"string"!=typeof n.method?a=new TypeError("options.method must be a string"):-1===o.indexOf(n.method)&&(a=new TypeError("options.method must be one of the following: "+o.slice(0,o.length-1).join(", ")+" or "+o[o.length-1])):void 0!==n.prepareRequest&&"function"!=typeof n.prepareRequest&&(a=new TypeError("options.prepareRequest must be a function")),a)i(a);else if(s=r["delete"===u?"del":u](e),n.prepareRequest)try{n.prepareRequest(s,c)}catch(e){i(e)}else c(void 0,s)}}).call(this,n(13))},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return null!==e&&"object"===r(e)}},function(e,t,n){(function(r,o){var i,a,s,u;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
1
+ var e,t={exports:{}};var n=(e||(e=1,t.exports=function(){function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(t){if(Array.isArray(t))return e(t)}function n(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function r(){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(e){return t(e)||n(e)||i(e)||r()}function i(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}function a(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}function s(e,t){var n=e();return n&&n.then?n.then(t):t(n)}function u(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function c(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).fetch,t=void 0===e?"undefined"!=typeof window?window.fetch:self.fetch:e;return function e(n,r,i){try{var c=!1;return a(u((function(){return s((function(){if(Array.isArray(n))return a(Promise.all(n.map((function(t){return e(t)}))),(function(e){return r&&r.apply(void 0,o(e)),c=!0,e}))}),(function(e){return c?e:a(t(n),(function(e){return a(e.json(),(function(e){return"function"==typeof r?r(e):e}))}))}))}),(function(e){var t=e;if(t.message+=" (File: ".concat(n,")"),i)return i(t,n);throw t})))}catch(e){return Promise.reject(e)}}}return c()}()),t.exports);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var i=new RegExp(e,r);return t.set(i,o||t.get(e)),d(i,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce((function(t,n){var o=r[n];if("number"==typeof o)t[n]=e[o];else{for(var i=0;void 0===e[o[i]]&&i+1<o.length;)i++;t[n]=e[o[i]]}return t}),Object.create(null))}return f(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=r(n,this);var o=n.indices;o&&(o.groups=r(o,this))}return n},n.prototype[Symbol.replace]=function(n,o){if("string"==typeof o){var i=t.get(this);return e[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)>/g,(function(e,t){var n=i[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof o){var a=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(r(e,a)),o.apply(this,e)}))}return e[Symbol.replace].call(this,n,o)},a.apply(this,arguments)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,w(r.key),r)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function h(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||m(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||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 m(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var _=globalThis.jsonExtra,x=function(e){return e.replace(/\\+/g,(function(e){return e.slice(0,e.length/2)}))},S=function(e){return _.parse("{"+(e||"").replace(/^\{/,"").replace(/\}$/,"")+"}")},j=function(e,t,n){var r,o=n.onMatch,i=n.extra,a=n.betweenMatches,s=n.afterMatch,u=n.escapeAtOne,c=0;if(i&&(a=i,s=i,u=i),!a||!s)throw new Error("You must have `extra` or `betweenMatches` and `afterMatch` arguments.");for(;null!==(r=e.exec(t));){var l=g(r,2),f=l[0],p=l[1],d=e.lastIndex,h=d-f.length;h>c&&a(t.slice(c,h)),u&&p.length%2?(c=d,u(f)):(o.apply(void 0,y(r)),c=d)}c!==t.length&&s(t.slice(c))},E="undefined"!=typeof fetch?fetch:null,k=function(){return E},O="undefined"!=typeof document?document:null,A=function(){return O};var F=function(e,t,n){return t.sort(new Intl.Collator(e,n).compare)},I=function(e,t,n){return new Intl.ListFormat(e,n).format(t)},D=function(e,t,n,r,o){if("function"!=typeof n)return function(e,t,n,r){return F(e,t,r),I(e,t,n)}(e,t,n,r);F(e,t,o);var i,a=(i=Date.now(),"undefined"!=typeof performance&&"function"==typeof performance.now&&(i+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=Math.trunc((i+16*Math.random())%16);return i=Math.floor(i/16),("x"===e?t:3&t|8).toString(16)}))),s=y(t).map((function(e,t){return"<<".concat(a).concat(t,">>")})),u=[],c=function(e){u.push(e)};j(new RegExp("<<".concat(a,"(\\d)>>"),"gu"),I(e,s,r),{betweenMatches:c,afterMatch:c,onMatch:function(e,r){c(n(t[Number(r)],Number(r)))}});var l=A().createDocumentFragment();return l.append.apply(l,u),l},N=function(e){var t=e.object;if(Array.isArray(t)){if("function"==typeof t[1]){var n=g(t,4);return{value:n[0],callback:n[1],options:n[2],extraOpts:n[3]}}var r=g(t,3);return{value:r[0],options:r[1],extraOpts:r[2]}}return{value:t}},P=function(e){var t=e.value,n=e.arg;e.key;var r,a=e.locale;if("string"==typeof t||t&&"object"===i(t)&&"nodeType"in t)return t;var s=function(e){var t=e.type,i=e.options,a=void 0===i?r:i,s=e.checkArgOptions,u=void 0!==s&&s;if("string"==typeof n){var c=g(n.split("|"),3),l=c[0],f=c[1],p=c[2];"DATE"===l&&(l="DATETIME"),l===t&&(f?u&&!p||(a=o(o({},a),S(u&&p?p:f))):a={})}return a},u=!1;if(t&&"object"===i(t)&&!Array.isArray(t)){var c=Object.keys(t)[0];if(["number","date","datetime","dateRange","datetimeRange","relative","region","language","script","currency","list","plural"].includes(c)){var l,f,p=t[c],d=N({object:p});switch(t=d.value,r=d.options,l=d.extraOpts,f=d.callback,c){case"date":case"datetime":u=!0;break;case"dateRange":case"datetimeRange":var h=new Intl.DateTimeFormat(a,s({type:"DATERANGE",options:l}));return h.formatRange.apply(h,y([t,r].map((function(e){return"number"==typeof e?new Date(e):e}))));case"region":case"language":case"script":case"currency":return new Intl.DisplayNames(a,o(o({},s({type:c.toUpperCase()})),{},{type:c})).of(t);case"relative":var v=[r,l];return l=v[0],r=v[1],new Intl.RelativeTimeFormat(a,s({type:"RELATIVE"})).format(t,l);case"list":return f?D(a,t,f,s({type:"LIST"}),s({type:"LIST",options:l,checkArgOptions:!0})):D(a,t,s({type:"LIST"}),s({type:"LIST",options:l,checkArgOptions:!0}))}}}if(t&&("number"==typeof t&&(u||/^DATE(?:TIME)(?:\||$)/.test(n))&&(t=new Date(t)),"object"===i(t)&&"getTime"in t&&"function"==typeof t.getTime))return new Intl.DateTimeFormat(a,s({type:"DATETIME"})).format(t);if(Array.isArray(t)){var m,b=t[2];return(m=new Intl.DateTimeFormat(a,s({type:"DATERANGE",options:b}))).formatRange.apply(m,y(t.slice(0,2).map((function(e){return"number"==typeof e?new Date(e):e}))))}if("number"==typeof t)return new Intl.NumberFormat(a,s({type:"NUMBER"})).format(t);throw new TypeError("Unknown formatter")},T=c((function e(){s(this,e)})),C=function(e){var t=e.key,n=e.body,r=e.type,o=e.messageStyle,i=H({messageStyle:void 0===o?"richNested":o})({body:n},t);if(!i)throw new Error("Key value not found for ".concat(r," key: (").concat(t,")"));return i.value},$=function(e){f(n,T);var t=v(n);function n(e){var r;return s(this,n),(r=t.call(this)).locals=e,r}return c(n,[{key:"getSubstitution",value:function(e){return C({key:e.slice(1),body:this.locals,type:"local"})}},{key:"isMatch",value:function(e){var t=e.slice(1).split("."),n=this.locals;return this.constructor.isMatchingKey(e)&&t.every((function(e){var t=e in n;return n=n[e],t}))}}],[{key:"isMatchingKey",value:function(e){return e.startsWith("-")}}]),n}(),L=function(e){f(n,T);var t=v(n);function n(e){var r;return s(this,n),(r=t.call(this)).substitutions=e,r}return c(n,[{key:"isMatch",value:function(e){return this.constructor.isMatchingKey(e)&&e in this.substitutions}}],[{key:"isMatchingKey",value:function(e){return/^[0-9A-Z_a-z]/.test(e)}}]),n}(),R=function(e){f(n,T);var t=v(n);function n(e,r){var o,i=r.substitutions;return s(this,n),(o=t.call(this)).switches=e,o.substitutions=i,o}return c(n,[{key:"getSubstitution",value:function(e,t){var n,r,a=t.locale,s=t.usedKeys,u=t.arg,c=t.missingSuppliedFormatters,l=this.constructor.getKey(e).slice(1),f=g(this.getMatch(l),3),p=f[0],d=f[1],h=f[2];if(s.push(h),p&&p.includes("|")){var v=g(p.split("|"),3);n=v[1],r=v[2]}if(!d)return c({key:e,formatter:this}),"\\{"+e+"}";var y=function(e,t){var n=S(r);return new Intl.NumberFormat(a,o(o({},t),n)).format(e)},m=function(e,t){var n=S(r);return new Intl.PluralRules(a,o(o({},t),n)).select(e)},b=this.substitutions[h],w=b;if("number"==typeof b)switch(n){case"NUMBER":w=y(b);break;case"PLURAL":w=m(b);break;default:w=new Intl.PluralRules(a).select(b)}else if(b&&"object"===i(b)){var _=Object.keys(b)[0];if(["number","plural"].includes(_)){var x=N({object:b[_]}),j=x.value,E=x.options;if(n||(n=_.toUpperCase()),!(_.toUpperCase()===n))throw new TypeError('Expecting type "'.concat(n.toLowerCase(),'"; instead found "').concat(_,'".'));switch(n){case"NUMBER":w=y(j,E);break;case"PLURAL":w=m(j,E)}}}var k="richNested",O=function(e){return e.replace(/\\/g,"\\\\").replace(/\./g,"\\.")};try{return C({messageStyle:k,key:w?O(w):u,body:d,type:"switch"})}catch(e){try{return C({messageStyle:k,key:"*"+O(w),body:d,type:"switch"})}catch(e){var A=Object.keys(d).find((function(e){return e.startsWith("*")}));if(!A)throw new Error("No defaults found for switch ".concat(l));return C({messageStyle:k,key:O(A),body:d,type:"switch"})}}}},{key:"isMatch",value:function(e){return Boolean(e&&this.constructor.isMatchingKey(e)&&this.getMatch(e.slice(1)).length)}},{key:"getMatch",value:function(e){var t=this,n=e.split(".");return n.reduce((function(r,o,i){if(i<n.length-1){if(!(o in r))throw new Error('Switch key "'.concat(o,'" not found (from "~').concat(e,'")'));return r[o]}var a=Object.entries(r).find((function(e){var n=g(e,1)[0];return o===t.constructor.getKey(n)}));return a?[].concat(y(a),[o]):[]}),this.switches)}}],[{key:"isMatchingKey",value:function(e){return e.startsWith("~")}},{key:"getKey",value:function(e){var t=e.match(/^(?:[\0-\{\}-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*/);return t&&t[0]}}]),n}();function M(e,t,n){if(!e.s){if(n instanceof U){if(!n.s)return void(n.o=M.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(M.bind(null,e,t),M.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}var U=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,o=this.s;if(o){var i=1&o?t:n;if(i){try{M(r,1,i(this.v))}catch(e){M(r,2,e)}return r}return this}return this.o=function(e){try{var o=e.v;1&e.s?M(r,1,t?t(o):o):n?M(r,1,n(o)):M(r,2,o)}catch(e){M(r,2,e)}},r},e}();function z(e){return e instanceof U&&1&e.s}var B=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Reached end of values array.";if(!Array.isArray(e))throw new TypeError("The `values` argument to `promiseChainForValues` must be an array.");if("function"!=typeof t)throw new TypeError("The `errBack` argument to `promiseChainForValues` must be a function.");return(n=function(){var n,o,i,a,s=!1,u=Promise.reject(new Error("Intentionally reject so as to begin checking chain"));return i=function(e,t,n){for(var r;;){var o=e();if(z(o)&&(o=o.v),!o)return i;if(o.then){r=0;break}var i=n();if(i&&i.then){if(!z(i)){r=1;break}i=i.s}}var a=new U,s=M.bind(null,a,2);return(0===r?o.then(c):1===r?i.then(u):(void 0).then((function(){(o=e())?o.then?o.then(c).then(void 0,s):c(o):M(a,1,i)}))).then(void 0,s),a;function u(t){i=t;do{if(!(o=e())||z(o)&&!o.v)return void M(a,1,i);if(o.then)return void o.then(c).then(void 0,s);z(i=n())&&(i=i.v)}while(!i||!i.then);i.then(u).then(void 0,s)}function c(e){e?(i=n())&&i.then?i.then(u).then(void 0,s):u(i):M(a,1,i)}}((function(){return!s}),0,(function(){var i=e.shift();return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return function(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}(u,(function(e){n=e,s=!0}))}),(function(){if(o)throw new Error(r);e.length||(o=!0),u=t(i)}))})),a=function(e){return n},i&&i.then?i.then(a):a(i)},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(n.apply(this,e))}catch(e){return Promise.reject(e)}})()},q=function(e,t){if("string"!=typeof e)throw new TypeError("`defaultLocaleResolver` expects a string `localesBasePath`.");if("string"!=typeof t)throw new TypeError("`defaultLocaleResolver` expects a string `locale`.");if(/[\.\/\\]/.test(t))throw new TypeError("Locales cannot use file-reserved characters, `.`, `/` or `\\`");return"".concat(e.replace(/\/$/,""),"/_locales/").concat(t,"/messages.json")},W=function(e){var t=e.string,n=e.dom,r=e.usedKeys,a=e.substitutions,s=e.allSubstitutions,u=e.locale,c=e.locals,l=e.switches,f=e.maximumLocalNestingDepth,p=void 0===f?3:f,d=e.missingSuppliedFormatters,h=e.checkExtraSuppliedFormatters;if("number"!=typeof p)throw new TypeError("`maximumLocalNestingDepth` must be a number.");var v=function(){Object.entries(a).forEach((function(e){var t=g(e,2),n=t[0];"function"==typeof t[1]&&r.push(n)}))};v();var m=new $(c),b=new L(a),w=new R(l,{substitutions:a}),_=/(\\*)\{((?:(?:[\0-\|~-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|\\\})*?)(?:(\|)((?:[\0-\|~-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*))?\}/g;s&&(s=Array.isArray(s)?s:[s]);var E=function(e){var t,n=e.key,o=e.arg,i=e.substs;return m.constructor.isMatchingKey(n)?t=m.getSubstitution(n):w.constructor.isMatchingKey(n)?t=w.getSubstitution(n,{locale:u,usedKeys:r,arg:o,missingSuppliedFormatters:d}):"function"==typeof(t=i[n])&&(t=t({arg:o,key:n})),s?t=s.reduce((function(e,t){return t({value:e,arg:o,key:n,locale:u})}),t):o&&/^(?:NUMBER|DATE(?:TIME|RANGE|TIMERANGE)?|REGION|LANGUAGE|SCRIPT|CURRENCY|RELATIVE|LIST)(?:\||$)/.test(o)&&(t=P({value:t,arg:o,key:n,locale:u})),t},k=1,O=function(e){var t=e.substitution,n=e.ky,r=e.arg,i=e.processSubsts,s=t;if("string"==typeof t&&t.includes("{")){if(k++>p)throw new TypeError("Too much recursion in local variables.");if(m.constructor.isMatchingKey(n)){var u,c=a;r&&(u=S(r),c=o(o({},a),u)),s=i({str:t,substs:c,formatter:m}),u&&h({substitutions:u})}else w.constructor.isMatchingKey(n)&&(s=i({str:t}))}return s};if(!n){var A=!1,F=function e(t){var n=t.str,o=t.substs,s=void 0===o?a:o,u=t.formatter,c=void 0===u?b:u;return n.replace(_,(function(t,n,o,a,u){if(n.length%2)return t;if(d({key:o,formatter:c}))return t;var l=E({key:o,arg:u,substs:s});return l=O({substitution:l,ky:o,arg:u,processSubsts:e}),A=A||null!==l&&"object"===i(l)&&"nodeType"in l,r.push(o),n+l}))}({str:t});if(!A)return h({substitutions:a}),r.length=0,v(),x(F);r.length=0,v()}k=1;var I=function e(t){var n=t.str,o=t.substs,s=void 0===o?a:o,u=t.formatter,c=void 0===u?b:u,l=[],f=new RegExp(_,"gu"),p=function(){l.push.apply(l,arguments)};return j(f,n,{extra:p,onMatch:function(t,n,o,a,u){if(d({key:o,formatter:c}))p(t);else{n.length&&p(n);var l=E({key:o,arg:u,substs:s});l=O({substitution:l,ky:o,arg:u,processSubsts:e}),Array.isArray(l)?p.apply(void 0,y(l)):l&&"object"===i(l)&&"nodeType"in l?p(l.cloneNode(!0)):p(l)}r.push(o)}}),l}({str:t});return h({substitutions:a}),r.length=0,I.map((function(e){return"string"==typeof e?x(e):e}))};function V(e,t){if(Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))&&"string"==typeof t&&t.endsWith("Nested"))return e.map((function(e){return e.replace(a(/(\\+)/g,{backslashes:1}),"\\$<backslashes>").replace(/\./g,"\\.")})).join(".");if("string"!=typeof e)throw new TypeError("`key` is expected to be a string (or array of strings for nested style)");return e}var H=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).messageStyle,t=void 0===e?"richNested":e;return"function"==typeof t?t:"richNested"===t?function(e,t){var n=e&&"object"===i(e)&&e.body,r=[],o=function(e){r.length||(r[0]=""),r[r.length-1]+=e};j(/(\\*)\./g,t,{extra:o,onMatch:function(e,t){o(t),r.push("")}});var a=r.map((function(e){return x(e)})),s=!1,u=n;return a.some((function(e,t,n){return!u||"object"!==i(u)||(t===n.length-1&&e in u&&u[e]&&"object"===i(u[e])&&"message"in u[e]&&"string"==typeof u[e].message&&(s={value:u[e].message,info:u[e]}),u=u[e],!1)})),s}:"rich"===t?function(e,t){var n=e&&"object"===i(e)&&e.body;return!!(n&&"object"===i(n)&&t in n&&n[t]&&"object"===i(n[t])&&"message"in n[t]&&"string"==typeof n[t].message)&&{value:n[t].message,info:n[t]}}:"plain"===t?function(e,t){var n=e&&"object"===i(e)&&e.body;return!!(n&&"object"===i(n)&&t in n&&n[t]&&"string"==typeof n[t])&&{value:n[t]}}:"plainNested"===t?function(e,t){var n=e&&"object"===i(e)&&e.body;if(n&&"object"===i(n)){var r=t.split(/(?<!\\)\./).reduce((function(e,t){return e&&"object"===i(e)&&e[t]?e[t]:null}),n);if(r&&"string"==typeof r)return{value:r}}return!1}:function(){throw new TypeError("Unknown `messageStyle` ".concat(t))}()};function J(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}function K(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}var G=function(e){if(!e.includes("-"))throw new Error("Locale not available");return e.replace(/\x2D(?:[\0-,\.-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*$/,"")},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locales,n=e.defaultLocales,r=e.localeResolver,o=e.localesBasePath,i=e.localeMatcher;return X({locales:t,defaultLocales:n,localeResolver:r,localesBasePath:o,localeMatcher:i})},X=K((function(e){var t=K((function(e){if("string"!=typeof e)throw new TypeError("Non-string locale type");var n=s(c,e);if("string"!=typeof n)throw new TypeError("`localeResolver` expected to resolve to (URL) string.");return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){var t=k();return J(d?t(n,{method:"HEAD"}):t(n),(function(t){if(404===t.status)throw new Error("Trying again");return d?e:J(t.json(),(function(t){return{locale:e,strings:t}}))}))}),(function(n){if("SyntaxError"===n.name)throw n;return J(f(e),t)}))})),n=e.locales,r=void 0===n?"undefined"!=typeof intlDomLocale?[intlDomLocale]:"undefined"==typeof navigator?[]:navigator.languages:n,o=e.defaultLocales,i=void 0===o?["en-US"]:o,a=e.localeResolver,s=void 0===a?q:a,u=e.localesBasePath,c=void 0===u?".":u,l=e.localeMatcher,f=void 0===l?"lookup":l,p=e.headOnly,d=void 0!==p&&p;if("lookup"===f)f=G;else if("function"!=typeof f)throw new TypeError('`localeMatcher` must be "lookup" or a function!');return B([].concat(y(r),y(i)),t,"No matching locale found for "+[].concat(y(r),y(i)).join(", "))}));function Y(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}var Q=function(e){var t=e.strings,n=e.resolvedLocale,r=e.messageStyle,a=void 0===r?"richNested":r,s=e.allSubstitutions,u=e.insertNodes,c=e.keyCheckerConverter,l=void 0===c?V:c,f=e.defaults,p=e.substitutions,d=e.dom,h=void 0!==d&&d,v=e.forceNodeReturn,g=void 0!==v&&v,m=e.throwOnMissingSuppliedFormatters,b=void 0===m||m,w=e.throwOnExtraSuppliedFormatters,_=void 0===w||w;if(!t||"object"!==i(t))throw new TypeError("Locale strings must be an object!");var x=H({messageStyle:a}),S=function(e,r){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=c.allSubstitutions,v=void 0===d?s:d,m=c.defaults,w=void 0===m?f:m,S=c.dom,j=void 0===S?h:S,E=c.forceNodeReturn,k=void 0===E?g:E,O=c.throwOnMissingSuppliedFormatters,F=void 0===O?b:O,I=c.throwOnExtraSuppliedFormatters,D=void 0===I?_:I;e=l(e,a);var N=x(t,e),T=function(e){var t,n=e.message,r=e.defaults,o=e.messageStyle,a=e.messageForKey,s=void 0===a?H({messageStyle:o}):a,u=e.key;if("string"==typeof n)t=n;else if(!1===r||null==r)t=!1;else{if(!r||"object"!==i(r))throw new TypeError("Default locale strings must resolve to `false`, nullish, or an object!");var c=s(r,u);t=c?c.value:c}if(!1===t)throw new Error("Key value not found for key: (".concat(u,")"));return t}({message:!(!N||"string"!=typeof N.value)&&N.value,defaults:w,messageForKey:x,key:e});return function(e){var t=e.string,n=e.locale,r=e.locals,o=e.switches,i=e.allSubstitutions,a=void 0===i?[P]:i,s=e.insertNodes,u=void 0===s?W:s,c=e.substitutions,l=void 0!==c&&c,f=e.dom,p=void 0!==f&&f,d=e.forceNodeReturn,h=void 0!==d&&d,v=e.throwOnMissingSuppliedFormatters,g=void 0===v||v,m=e.throwOnExtraSuppliedFormatters,b=void 0===m||m;if("string"!=typeof t)throw new TypeError("An options object with a `string` property set to a string must be provided for `getDOMForLocaleString`.");var w=function(e){var t=A();return h?t.createTextNode(e):e},_=[];if(!l&&!a&&!g)return w(t);l||(l={});var x=u({string:t,dom:p,usedKeys:_,substitutions:l,allSubstitutions:a,locale:n,locals:r,switches:o,missingSuppliedFormatters:function(e){var t=e.key,n=e.formatter,r=n.isMatch(t);if(n.constructor.isMatchingKey(t)&&!r){if(g)throw new Error("Missing formatting key: ".concat(t));return!0}return!1},checkExtraSuppliedFormatters:function(e){var t=e.substitutions;b&&Object.keys(t).forEach((function(e){if(!_.includes(e))throw new Error("Extra formatting key: ".concat(e))}))}});if("string"==typeof x)return w(x);var S=A().createDocumentFragment();return S.append.apply(S,y(x)),S}({string:T,locals:t.head&&t.head.locals,switches:t.head&&t.head.switches,locale:n,allSubstitutions:v,insertNodes:u,substitutions:o(o({},p),r),dom:j,forceNodeReturn:k,throwOnMissingSuppliedFormatters:F,throwOnExtraSuppliedFormatters:D})};return S.resolvedLocale=n,S.strings=t,S.sort=function(e,t){return F(n,e,t)},S.sortList=function(e,t,r,o){return D(n,e,t,r,o)},S.list=function(e,t){return I(n,e,t)},S},ee=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locales,n=e.defaultLocales,r=e.localeStringFinder,o=void 0===r?Z:r,i=e.localesBasePath,a=e.localeResolver,s=e.localeMatcher,u=e.messageStyle,c=e.allSubstitutions,l=e.insertNodes,f=e.keyCheckerConverter,p=e.defaults,d=e.substitutions,h=e.maximumLocalNestingDepth,v=e.dom,g=e.forceNodeReturn,y=e.throwOnMissingSuppliedFormatters,m=e.throwOnExtraSuppliedFormatters;try{return Y(o({locales:t,defaultLocales:n,localeResolver:a,localesBasePath:i,localeMatcher:s}),(function(e){var t,r,b=e.strings,w=e.locale;return t=function(){return Q({strings:b,resolvedLocale:w,messageStyle:u,allSubstitutions:c,insertNodes:l,keyCheckerConverter:f,defaults:p,substitutions:d,maximumLocalNestingDepth:h,dom:v,forceNodeReturn:g,throwOnMissingSuppliedFormatters:y,throwOnExtraSuppliedFormatters:m})},(r=function(){if(!p&&n)return Y(o({locales:n,defaultLocales:[],localeResolver:a,localesBasePath:i,localeMatcher:s}),(function(e){p=e.strings,e.locale===w&&(p=null)}))}())&&r.then?r.then(t):t(r)}))}catch(e){return Promise.reject(e)}};function te(e,{before:t,after:n,favicon:r,canvas:o,image:i=!0,acceptErrors:a}={}){return e=Array.isArray(e)?e:[e],Promise.all(e.map((e=>function(e){let s,u={};Array.isArray(e)?[s,u={}]=e:s=e;let{favicon:c=r}=u;const{before:l=t,after:f=n,canvas:p=o,image:d=i}=u;function h(){l?l.before(v):f?f.after(v):document.head.append(v)}const v=document.createElement("link");return new Promise(((e,t)=>{let n=t;if(a&&(n="function"==typeof a?n=>{a({error:n,stylesheetURL:s,options:u,resolve:e,reject:t})}:e),s.endsWith(".css")?c=!1:s.endsWith(".ico")&&(c=!0),c){if(v.rel="shortcut icon",v.type="image/x-icon",!1===d)return v.href=s,h(),void e(v);const n=document.createElement("canvas");n.width=16,n.height=16;const r=n.getContext("2d"),o=document.createElement("img");return o.addEventListener("error",(e=>{t(e)})),o.addEventListener("load",(()=>{if(!r)throw new Error("Canvas context could not be found");r.drawImage(o,0,0),v.href=p?n.toDataURL("image/x-icon"):s,h(),e(v)})),void(o.src=s)}v.rel="stylesheet",v.type="text/css",v.href=s,h(),v.addEventListener("error",(e=>{n(e)})),v.addEventListener("load",(()=>{e(v)}))}))}(e))))}var ne,re={exports:{}};var oe=(ne||(ne=1,function(e){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,t){return i(e)||s(e,t)||u(e,t)||f()}function r(e){return o(e)||a(e)||u(e)||l()}function o(e){if(Array.isArray(e))return c(e)}function i(e){if(Array.isArray(e))return e}function a(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function s(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(){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 f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var p=/^(?:submit|button|image|reset|file)$/i,d=/^(?:input|select|textarea|keygen)/i,h=/(\[[^[\]]*])/g;function v(e,o){"object"!==t(o)?o={hash:Boolean(o)}:void 0===o.hash&&(o.hash=!0);var i=o.hash?{}:"",a=o.serializer||(o.hash?m:b),s=e&&e.elements?r(e.elements):[],u=Object.create(null);return s.forEach((function(e){if((o.disabled||!e.disabled)&&e.name&&d.test(e.nodeName)&&!p.test(e.type)){var t=e.name,n=e.type,s=e.name,c=e.checked,l=e.value;if("checkbox"!==n&&"radio"!==n||c||(l=void 0),o.empty){if("checkbox"!==n||c||(l=""),"radio"===n&&(u[s]||c?c&&(u[s]=!0):u[s]=!1,void 0===l))return}else if(!l)return;if("select-multiple"===n){var f=!1;return r(e.options).forEach((function(e){var n=o.empty&&!e.value,r=e.value||n;e.selected&&r&&(f=!0,i=o.hash&&"[]"!==t.slice(-2)?a(i,t+"[]",e.value):a(i,t,e.value))})),void(!f&&o.empty&&(i=a(i,t,"")))}i=a(i,t,l)}})),o.empty&&Object.entries(u).forEach((function(e){var t=n(e,2),r=t[0];t[1]||(i=a(i,r,""))})),i}function g(e){var t=[],n=/^([^[\]]*)/,r=new RegExp(h),o=n.exec(e);for(o[1]&&t.push(o[1]);null!==(o=r.exec(e));)t.push(o[1]);return t}function y(e,t,n){if(0===t.length)return n;var r=t.shift(),o=r.match(/^\[(.+?)]$/);if("[]"===r)return e=e||[],Array.isArray(e)?e.push(y(null,t,n)):(e._values=e._values||[],e._values.push(y(null,t,n))),e;if(o){var i=o[1],a=Number(i);isNaN(a)?(e=e||{})[i]=y(e[i],t,n):(e=e||[])[a]=y(e[a],t,n)}else e[r]=y(e[r],t,n);return e}function m(e,t,n){if(t.match(h))y(e,g(t),n);else{var r=e[t];r?(Array.isArray(r)||(e[t]=[r]),e[t].push(n)):e[t]=n}return e}function b(e,t,n){return n=n.replace(/(\r)?\n/g,"\r\n"),n=(n=encodeURIComponent(n)).replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+n}function w(e,o){Object.entries(o).forEach((function(o){var i=n(o,2),a=i[0],s=i[1],u=e[a],c=!1;if(!u&&!(u=e.querySelector('[name="'.concat(a,'"]')))){if(!((u=e[a+"[]"])&&"object"===t(u)&&"length"in u||(u=e.querySelectorAll('[name="'.concat(a,'[]"]'))).length))throw new Error("Name not found ".concat(a));c=!0}var l=u.type;if("checkbox"===l&&(u.checked=""!==s),("radio"===l||u[0]&&"radio"===u[0].type)&&r(e.querySelectorAll('[name="'.concat(a+(c?"[]":""),'"]'))).forEach((function(e){e.checked=s===e.value})),u[0]&&"select-multiple"===u[0].type)r(u[0].options).forEach((function(e){s.includes(e.value)&&(e.selected=!0)}));else if(Array.isArray(s)){if("select-multiple"===l)return void r(u.options).forEach((function(e){s.includes(e.value)&&(e.selected=!0)}));s.forEach((function(e,t){var n=u[t];if("checkbox"!==n.type)"select-multiple"!==n.type?n.value=e:r(n.options).forEach((function(t){e.includes(t.value)&&(t.selected=!0)}));else{var o=n.value===e||"on"===e;n.checked=o}}))}else u.value=s}))}e.deserialize=w,e.serialize=v,Object.defineProperty(e,"__esModule",{value:!0})}(re.exports)),re.exports);var ie,ae={exports:{}};var se=(ie||(ie=1,function(e){let t;"undefined"!=typeof window&&window&&(t=window);let n="undefined"!=typeof document&&document||t?.document;const r=["$plugins","$map"],o="http://www.w3.org/1999/xhtml",i=/-([a-z])/gu,a=new Map([["maxlength","maxLength"],["minlength","minLength"],["readonly","readOnly"]]),s=new Set(["checked","defaultChecked","defaultSelected","disabled","indeterminate","open","readOnly","selected","accessKey","async","autocapitalize","autofocus","contentEditable","defaultValue","defer","draggable","formnovalidate","hidden","innerText","inputMode","ismap","multiple","novalidate","pattern","required","spellcheck","translate","value","willvalidate"]),u=new Set(["autocomplete","dir","integrity","lang","max","min","minLength","maxLength","title"]),c=e=>{if(!n)throw new Error("No document object");return n.querySelector(e)},l=e=>{if(!n)throw new Error("No document object");return[...n.querySelectorAll(e)]};function f(e,t){const n=e.nodeName?.toLowerCase();"template"!==n?e.append(t):e.content.append(t)}function p(e,t,n,r){e.addEventListener(t,n,Boolean(r))}function d(e,t,r){if(!n)throw new Error("No document defined");if(!/^\w+$/u.test(r))throw new TypeError(`Bad ${e} reference; with prefix "${t}" and arg "${r}"`);const o=n.createElement("div");return o.innerHTML="&"+t+r+";",n.createTextNode(o.innerHTML)}function h(e,t){return t.toUpperCase()}function v(e){return null==e}function g(e){const t=typeof e;if("string"==typeof e||void 0===e)return"string";if("object"===t){if(null===e)return"null";if(Array.isArray(e))return"array";if("nodeType"in e)switch(e.nodeType){case 1:return"element";case 7:return"processing-instruction";case 9:return"document";case 11:return"fragment";default:return"non-container node"}}return t}function y(e,t){return e.append(t),e}function m(e){return function(...t){const n=t[0];let r=e[""]?' xmlns="'+e[""]+'"':n;for(const[t,n]of Object.entries(e))""!==t&&(r+=" xmlns:"+t+'="'+n+'"');return r}}function b(e){return function(t,n){const r=e.childNodes[n],o=Array.isArray(t)?j(...t):j(t);r.replaceWith(o)}}function w(e){return function(t){if("string"==typeof t||"number"==typeof t)throw new TypeError("Unexpected text string/number in the head");Array.isArray(t)?e.append(j(...t)):"object"==typeof t&&"nodeType"in t?e.append(t):e.append(j(t))}}function _(e){return function(t){"string"==typeof t||"number"==typeof t?e.append(String(t)):Array.isArray(t)?e.append(j(...t)):"object"==typeof t&&"nodeType"in t?e.append(t):e.append(j(t))}}function x(e,t,n,r,o){if(r.$state=o??"attributeValue",n&&"object"==typeof n){const o=S(r,Object.keys(n)[0]);if(o)return o.set({opts:r,element:e,attribute:{name:t,value:n}})}return n}function S(e,t){return e.$plugins&&e.$plugins.find((e=>e.name===t))}const j=function e(...l){if(!t)throw new Error("No window object");if(!n)throw new Error("No document object");let j=n.createDocumentFragment();function E(t){if(!n)throw new Error("No document object");for(let[r,o]of Object.entries(t))if(r=a.has(r)?String(a.get(r)):r,u.has(r))o=x(j,r,o,A),v(o)||(j[r]=o);else if(s.has(r))o=x(j,r,o,A),j[r]=o;else switch(r){case"#":A.$state="fragmentChildren",k[k.length]=e(A,o);break;case"$shadow":{const{open:t,closed:r}=o;let{content:i,template:a}=o;const s=j.attachShadow({mode:r||!1===t?"closed":"open"});a?(Array.isArray(a)?a="object"===g(a[0])?e("template",...a,n.body):e("template",a,n.body):"string"==typeof a&&(a=c(a)),e(a.content.cloneNode(!0),s)):(i||!0!==t&&(i=t||"boolean"==typeof r?i:r),i&&"boolean"!=typeof i&&(Array.isArray(i)?e({"#":i},s):e(i,s)));break}case"$state":case"is":case"xmlns":break;case"$custom":Object.assign(j,o);break;case"$define":{if(!("localName"in j))throw new Error("Element expected for `$define`");const e=j.localName.toLowerCase(),r=!e.includes("-");let i;if(r&&(i=j.getAttribute("is"),!i)){if(!Object.hasOwn(t,"is"))throw new TypeError(`Expected \`is\` with \`$define\` on built-in; args: ${JSON.stringify(l)}`);t.is=x(j,"is",t.is,A),j.setAttribute("is",t.is),({is:i}=t)}const a=r?i:e;if(window.customElements.get(a))break;const s=t=>{if(!n)throw new Error("No document object");const o="object"==typeof c&&"string"==typeof c.extends?n.createElement(c.extends).constructor:r?n.createElement(e).constructor:window.HTMLElement;return t?class extends o{constructor(){super(),t.call(this)}}:class extends o{}};let u,c,f;const p=o;Array.isArray(p)?p.length<=2?([u,c]=p,"string"==typeof c?c={extends:c}:c&&!Object.hasOwn(c,"extends")&&(f=c),"object"==typeof u&&(f=u,u=s())):([u,f,c]=p,"string"==typeof c&&(c={extends:c})):"function"==typeof p?u=p:(f=p,u=s()),u.toString().startsWith("class")||(u=s(u)),!c&&r&&(c={extends:e}),f&&Object.entries(f).forEach((([e,t])=>{u.prototype[e]=t})),window.customElements.define(a,u,"object"==typeof c?c:void 0);break}case"$symbol":{const[e,t]=o;if("function"==typeof t){const n=t.bind(j);"string"==typeof e?j[Symbol.for(e)]=n:j[e]=n}else{const n=t;n.elem=j,"string"==typeof e?j[Symbol.for(e)]=n:j[e]=n}break}case"$data":P(o);break;case"$attribute":{const e=o,t=3===e.length?n.createAttributeNS(e[0],e[1]):n.createAttribute(e[0]);t.value=e.at(-1),k[k.length]=t;break}case"$text":{const e=n.createTextNode(o);k[k.length]=e;break}case"$document":{const t=n.implementation.createHTMLDocument();if(!o)throw new Error("Bad attribute value");const r=o;if(r.childNodes){const e=r.childNodes.length;for(;t.childNodes[e];)t.childNodes[e].remove();r.childNodes.forEach(b(t))}else{if(r.$DOCTYPE){const n={$DOCTYPE:r.$DOCTYPE},o=e(n);t.firstChild?.replaceWith(o)}const o=t.querySelector("html"),i=o?.querySelector("head"),a=o?.querySelector("body");if(r.title||r.head){const e=n.createElement("meta");e.setAttribute("charset","utf-8"),i?.append(e),r.title&&(t.title=r.title),r.head&&i&&r.head.forEach(w(i))}r.body&&a&&r.body.forEach(_(a))}if(r.xmlDeclaration){const{version:e,encoding:o,standalone:i}=r.xmlDeclaration,a=`${e?` version="${e}"`:""}${o?` encoding="${o}"`:""}${i?' standalone="yes"':""}`.slice(1),s=n.createProcessingInstruction("xml",a);t.insertBefore(s,t.firstChild)}k[k.length]=t;break}case"$DOCTYPE":{const e=o,t=n.implementation.createDocumentType(e.name,e.publicId||"",e.systemId||"");k[k.length]=t;break}case"$on":for(let[e,t]of Object.entries(o||{})){if("function"==typeof t&&(t=[t,!1]),"function"!=typeof t[0])throw new TypeError(`Expect a function for \`$on\`; args: ${JSON.stringify(l)}`);p(j,e,t[0],t[1])}break;case"className":case"class":o=x(j,r,o,A),v(o)||(j.className=o);break;case"dataset":{const e=(t,n)=>{let r="";const o=""!==n;Object.keys(t).forEach((a=>{const s=t[a];if(r=o?n+a.replaceAll(i,h).replace(/^([a-z])/u,h):n+a.replaceAll(i,h),null===s||"object"!=typeof s)return v(s)||(j.dataset[r]=s),void(r=n);e(s,r)}))};e(o,"");break}case"innerHTML":v(o)||(j.innerHTML=o);break;case"htmlFor":case"for":if("label"===O){o=x(j,r,o,A),v(o)||(j.htmlFor=o);break}o=x(j,r,o,A),j.setAttribute(r,o);break;default:{if(r.startsWith("on")){o=x(j,r,o,A),j[r]=o;break}if("style"===r){if(o=x(j,r,o,A),v(o))break;if("object"==typeof o){for(const[e,t]of Object.entries(o))v(t)||("float"===e?(j.style.cssFloat=t,j.style.styleFloat=t):j.style[e.replaceAll(i,h)]=t);break}j.setAttribute(r,o);break}const e=r,t=S(A,e);if(t){t.set({opts:A,element:k[0],attribute:{name:e,value:o}});break}o=x(j,r,o,A),j.setAttribute(r,o);break}}}const k=[];let O,A,F=!1,I=0;if("object"===g(l[0])&&Object.keys(l[0]).some((e=>r.includes(e)))){if(A=l[0],void 0===A.$state&&(F=!0,A.$state="root"),Array.isArray(A.$map)&&(A.$map={root:A.$map}),"$plugins"in A){if(!Array.isArray(A.$plugins))throw new TypeError(`\`$plugins\` must be an array; args: ${JSON.stringify(l)}`);A.$plugins.forEach((e=>{if(!e||"object"!=typeof e)throw new TypeError(`Plugin must be an object; args: ${JSON.stringify(l)}`);if(!e.name||!e.name.startsWith("$_"))throw new TypeError(`Plugin object name must be present and begin with \`$_\`; args: ${JSON.stringify(l)}`);if("function"!=typeof e.set)throw new TypeError(`Plugin object must have a \`set\` method; args: ${JSON.stringify(l)}`)}))}I=1}else A={$state:void 0};const D=l.length,N=A.$map&&A.$map.root,P=e=>{let t,n;const r=N;if(!0===e)[t,n]=r;else if(Array.isArray(e)){if("string"==typeof e[0])return void e.forEach((e=>{P(A.$map[e])}));t=e[0]||r[0],n=e[1]||r[1]}else/^\[object (?:Weak)?Map\]$/u.test([].toString.call(e))?(t=e,n=r[1]):(t=r[0],n=e);t.set(j,n)};for(let r=I;r<D;r++){let i=l[r];const a=g(i);switch(a){case"null":if(r===D-1)return k.length<=1?k[0]:k.reduce(y,n.createDocumentFragment());throw new TypeError(`\`null\` values not allowed except as final Jamilih argument; index ${r} on args: ${JSON.stringify(l)}`);case"string":switch(i){case"!":k[k.length]=n.createComment(l[++r]);break;case"?":{i=l[++r];let e=l[++r];const t=e;if(t&&"object"==typeof t){const n=[];for(const[e,r]of Object.entries(t))n.push(e+'="'+r.replaceAll('"',"&quot;")+'"');e=n.join(" ")}try{k[k.length]=n.createProcessingInstruction(i,e)}catch(t){k[k.length]=n.createComment("?"+i+" "+e+"?")}break}case"&":k[k.length]=d("entity","",l[++r]);break;case"#":k[k.length]=d("decimal",i,String(l[++r]));break;case"#x":k[k.length]=d("hexadecimal",i,l[++r]);break;case"![":try{k[k.length]=n.createCDATASection(l[++r])}catch(e){k[k.length]=n.createTextNode(l[r])}break;case"":k[k.length]=j=n.createDocumentFragment(),A.$state="fragment";break;default:{O=i;const e=l[r+1];if(e&&"object"===g(e)&&e.is){const{is:t}=e;j=n.createElementNS?n.createElementNS(o,O,{is:t}):n.createElement(O,{is:t})}else j=n.createElementNS?n.createElementNS(o,O):n.createElement(O);A.$state="element",k[k.length]=j;break}}break;case"object":{if(!i||"object"!=typeof i)throw new Error("Null should not reach here");const e=i;if("xmlns"in e){const n=e,r=n.xmlns&&"object"==typeof n.xmlns?m(n.xmlns):' xmlns="'+n.xmlns+'"';j=k[k.length-1]=(new t.DOMParser).parseFromString((new t.XMLSerializer).serializeToString(j).replace(' xmlns="'+o+'"',r),"application/xml").documentElement,A.$state="element"}E(e);break}case"processing-instruction":case"document":case"fragment":case"element":if(0===r&&(j=i,A.$state="element"),r===D-1||r===D-2&&null===l[r+1]){const e=k.length;for(let t=0;t<e;t++)f(i,k[t])}else k[k.length]=i;break;case"array":{const t=i,r=t.length;for(let o=0;o<r;o++){const r=t[o],i=typeof r;if(null===r||v(r))throw new TypeError(`Bad children (parent array: ${JSON.stringify(l)}; index ${o} of child: ${JSON.stringify(t)})`);switch(i){case"string":case"number":case"boolean":f(j,n.createTextNode(String(r)));break;default:if("object"!=typeof r)throw new TypeError(`Bad children (parent array: ${JSON.stringify(l)}; index ${o} of child: ${JSON.stringify(t)})`);if(Array.isArray(r))A.$state="children",f(j,e(A,...r));else if("#"in r)A.$state="fragmentChildren",f(j,e(A,r["#"]));else{let e;"nodeType"in r||(e=x(j,null,r,A,"children")),f(j,e||r)}}}break}default:throw new TypeError(`Unexpected type: ${a}; arg: ${i}; index ${r} on args: ${JSON.stringify(l)}`)}}const T=k[0]||j;return F&&A.$map&&A.$map.root&&P(!0),T};class E extends Error{constructor(e,t){super(e),this.code=0,this.name=t}}j.toJML=function(e,{stringOutput:n=!1,reportInvalidState:r=!0,stripWhitespace:o=!1}={}){if(!t)throw new Error("No window object set");"string"==typeof e&&(e=(new t.DOMParser).parseFromString(e,"text/html"));const i=[];let a=i,s=0;function u(e){if(r){const t=new E(e,"INVALID_STATE_ERR");throw t.code=11,t}}function c(e,t){t.systemId.includes('"')&&t.systemId.includes("'")&&u("systemId cannot have both single and double quotes.");const{publicId:n,systemId:r}=t;r&&(e.systemId=r),n&&(e.publicId=n)}function l(e){a[s]=e,s++}function f(){l([]),a=a[s-1],s=0}function p(e,t){a=a[s-1][e],s=0,t&&(a=a[t])}function d(e,t){const n="nodeType"in e?e.nodeType:null;if(!n)throw new TypeError("Not an XML type");if(5===n)return void l(["&",e.nodeName]);t={...t};const r=/^([\u0009\u000A\u000D\u0020-\uD7FF\uE000-\uFFFD]|[\uD800-\uDBFF][\uDC00-\uDFFF])*$/u;let i,h;function v(){i=a,h=s}function g(){a=i,s=h,s++}switch([2,3,4,7,8].includes(n)&&e.nodeValue&&!r.test(e.nodeValue)&&u("Node has bad XML character value"),n){case 1:{const n=e;v();const r=n.nodeName.toLowerCase();f(),l(r);const o={};let i=!1;t[n.prefix||""]!==n.namespaceURI&&(t[n.prefix||""]=n.namespaceURI,n.prefix?o["xmlns:"+n.prefix]=n.namespaceURI:n.namespaceURI?o.xmlns=n.namespaceURI:o.xmlns=null,i=!0),n.attributes.length?l([...n.attributes].reduce((function(e,t){return e[t.name]=t.value,e}),o)):i&&l(o);const{childNodes:a}=n;a.length&&(f(),[...a].forEach((function(e){d(e,t)}))),g();break}case 2:{const t=e;l({$attribute:[t.namespaceURI,t.name,t.value]});break}case 3:{const t=e;if(!t.nodeValue)throw new Error("Unexpected null comment value");if(o&&/^\s+$/u.test(t.nodeValue))return void l("");l(t.nodeValue);break}case 4:{const t=e;t.nodeValue?.includes("]]>")&&u("CDATA cannot end with closing ]]>"),l(["![",t.nodeValue]);break}case 7:{const t=e;/^xml$/iu.test(t.target)&&u('Processing instructions cannot be "xml".'),t.target.includes("?>")&&u("Processing instruction targets cannot include ?>"),t.target.includes(":")&&u('The processing instruction target cannot include ":"'),t.data.includes("?>")&&u("Processing instruction data cannot include ?>"),l(["?",t.target,t.data]);break}case 8:{const t=e;if(!t.nodeValue)throw new Error("Unexpected null comment value");(t.nodeValue.includes("--")||t.nodeValue.length&&t.nodeValue.lastIndexOf("-")===t.nodeValue.length-1)&&u("Comments cannot include --"),l(["!",t.nodeValue]);break}case 9:{const n=e;v(),l({$document:{childNodes:[]}}),p("$document","childNodes");const{childNodes:r}=n;r.length||u("Documents must have a child node"),[...r].forEach((function(e){d(e,t)})),g();break}case 10:{const t=e;v();const n={$DOCTYPE:{name:t.name}};/^(\u0020|\u000D|\u000A|[a-zA-Z0-9]|[-'()+,./:=?;!*#@$_%])*$/u.test(t.publicId)||u("A publicId must have valid characters."),c(n.$DOCTYPE,t),l(n),g();break}case 11:{const n=e;v(),l({"#":[]}),p("#");const{childNodes:r}=n;[...r].forEach((function(e){d(e,t)})),g();break}default:throw new TypeError("Not an XML type")}}return d(e,{}),n?JSON.stringify(i[0]):i[0]},j.toJMLString=function(e,t){return j.toJML(e,Object.assign(t||{},{stringOutput:!0}))},j.toDOM=function(...e){return j(...e)},j.toHTML=function(...e){const t=j(...e);switch(t.nodeType){case 1:return t.outerHTML;case 2:return`${t.name}="${t.value.replaceAll('"',"&quot;")}"`;case 3:if(!t.nodeValue)throw new TypeError("Unexpected null Text node");return t.nodeValue;case 7:{const e=t;return`<?${e.target} ${e.data}?>`}case 9:case 11:return[...t.childNodes].map((e=>j.toHTML(e))).join("");case 10:{const e=t;return`<!DOCTYPE ${e.name}${e.publicId?` PUBLIC "${e.publicId}" "${e.systemId}"`:e.systemId?` SYSTEM "${e.systemId}"`:""}>`}default:throw new Error("Unexpected node type")}},j.toDOMString=function(...e){return j.toHTML(...e)},j.toXML=function(...e){if(!t)throw new Error("No window object set");const n=j(...e);return(new t.XMLSerializer).serializeToString(n)},j.toXMLDOMString=function(...e){return j.toXML(...e)};class k extends Map{get(e){const t="string"==typeof e?c(e):e;return super.get.call(this,t)}set(e,t){const n="string"==typeof e?c(e):e;return super.set.call(this,n,t)}invoke(e,t,...n){const r="string"==typeof e?c(e):e;return this.get(r)[t](r,...n)}}class O extends WeakMap{get(e){const t="string"==typeof e?c(e):e;if(!t)throw new Error("Can't find the element");return super.get.call(this,t)}set(e,t){const n="string"==typeof e?c(e):e;if(!n)throw new Error("Can't find the element");return super.set.call(this,n,t)}invoke(e,t,...n){const r="string"==typeof e?c(e):e;if(!r)throw new Error("Can't find the element");return this.get(r)[t](r,...n)}}function A(e,t){return[...e].reduce(((e,n)=>(e.push(n,t),e)),[]).slice(0,-1)}j.Map=k,j.WeakMap=O,j.weak=function(e,...t){const n=new O;return[n,j({$map:[n,e]},...t)]},j.strong=function(e,...t){const n=new k;return[n,j({$map:[n,e]},...t)]},j.symbol=j.sym=j.for=function(e,t){return("string"==typeof e?c(e):e)["symbol"==typeof t?t:Symbol.for(t)]},j.command=function(e,t,n,...r){if(!(e="string"==typeof e?c(e):e))throw new Error("No element found");let o;if(["symbol","string"].includes(typeof t))return o=j.sym(e,t),"function"==typeof o?o(n,...r):o[n](...r);if(o=t.get(e),!o)throw new Error("No map found");return"function"==typeof o?o.call(e,n,...r):o[n](e,...r)},j.setWindow=r=>{t=r,n=t?.document,n&&n.body&&(e.body=n.body)},j.getWindow=()=>{if(!t)throw new Error("No window object set");return t},e.body=void 0,n&&n.body&&(e.body=n.body);const F=" ";e.$=c,e.$$=l,e.DOMException=E,e.default=j,e.glue=A,e.jml=j,e.nbsp=F,Object.defineProperty(e,"__esModule",{value:!0})}(ae.exports)),ae.exports);const ue=(e,t)=>{const n="string"==typeof e?(r=e,document.querySelector(r)):e;var r;return n?.querySelector(t)},ce={en:{submit:"Submit",cancel:"Cancel",ok:"Ok"}};const le=new class{constructor({locale:e,localeObject:t}={}){this.localeStrings=ce.en,this.setLocale({locale:e,localeObject:t})}setLocale({locale:e,localeObject:t={}}){this.localeStrings={...ce.en,...e?ce[e]:{},...t}}makeDialog({atts:e={$on:null},children:t=[],close:n,remove:r=!0}){n&&(e.$on||(e.$on={}),e.$on.close||(e.$on.close=n));const o=se.jml("dialog",e,t,se.$("#main"));return o.showModal(),r&&o.addEventListener("close",(()=>{o.remove()})),o}makeSubmitDialog({submit:e,submitClass:t="submit",...n}){const r=this.makeCancelDialog(n);return ue(r,`button.${n.cancelClass||"cancel"}`).before(se.jml("button",{class:t,$on:{click(t){e&&e.call(this,{e:t,dialog:r})}}},[this.localeStrings.submit]),se.nbsp.repeat(2)),r}makeCancelDialog({submit:e,cancel:t,cancelClass:n="cancel",submitClass:r="submit",...o}){const i=this.makeDialog(o);return se.jml("div",{class:r},[["br"],["br"],["button",{class:n,$on:{click(e){e.preventDefault(),t&&!1===t.call(this,{e:e,dialog:i})||i.close()}}},[this.localeStrings.cancel]]],i),i}alert(e,t){e="string"==typeof e?{message:e}:e;const{ok:n=("object"==typeof t?!1!==t.ok:!1!==t),message:r,submitClass:o="submit"}=e;return new Promise((e=>{const t=se.jml("dialog",[r,...n?[["br"],["br"],["div",{class:o},[["button",{$on:{click(){t.close(),e()}}},[this.localeStrings.ok]]]]]:[]],se.$("#main"));t.showModal()}))}prompt(e){e="string"==typeof e?{message:e}:e;const{message:t,submit:n,...r}=e;return new Promise(((e,o)=>{this.makeSubmitDialog({...r,submit:function({e:t,dialog:r}){n&&n.call(this,{e:t,dialog:r}),r.close(),e(ue(r,"input").value)},cancel(){o(new Error("cancelled"))},children:[["label",[t,se.nbsp.repeat(3),["input"]]]]})}))}confirm(e){e="string"==typeof e?{message:e}:e;const{message:t,submitClass:n="submit"}=e;return new Promise(((e,r)=>{const o=se.jml("dialog",[t,["br"],["br"],["div",{class:n},[["button",{$on:{click(){o.close(),e()}}},[this.localeStrings.ok]],se.nbsp.repeat(2),["button",{$on:{click(){o.close(),r(new Error("cancelled"))}}},[this.localeStrings.cancel]]]]],se.$("#main"));o.showModal()}))}};class fe{constructor({langData:e}){this.langData=e}localeFromLangData(e){return this.langData["localization-strings"][e]}getLanguageFromCode(e){return this.localeFromLangData(e).languages[e]}getFieldNameFromPluginNameAndLocales({pluginName:e,workI18n:t,targetLanguage:n,applicableFieldI18N:r,meta:o,metaApplicableField:i}){return t(["plugins",e,"fieldname"],{...o,...i,applicableField:r,targetLanguage:n?this.getLanguageFromCode(n):""},{throwOnExtraSuppliedFormatters:!1})}getLanguageInfo({$p:e}){const t=this.langData.languages,n=e=>!!t.some((({code:t})=>t===e))&&e,r=e.get("lang",!0),o=navigator.languages.filter(n),i=o.length?o:[n(navigator.language)||"en-US"];return{lang:[...(r||i[0]).split("."),...i],langs:t,languageParam:r,fallbackLanguages:i}}}var pe=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=84)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;try{r={clone:n(88),constant:n(64),each:n(146),filter:n(152),has:n(175),isArray:n(0),isEmpty:n(177),isFunction:n(17),isUndefined:n(178),keys:n(6),map:n(179),reduce:n(181),size:n(184),transform:n(190),union:n(191),values:n(210)}}catch(e){}r||(r=window._),e.exports=r},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(47),i="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,a=o||i||Function("return this")();e.exports=a},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return null!=e&&"object"==n(e)}},function(e,t,n){var r=n(100),o=n(105);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){var t=n(e);return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(52),o=n(37),i=n(7);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(9),o=n(101),i=n(102),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(132),o=n(31),i=n(133),a=n(61),s=n(134),u=n(8),c=n(48),l=c(r),f=c(o),p=c(i),d=c(a),h=c(s),v=u;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=v(new o)||i&&"[object Promise]"!=v(i.resolve())||a&&"[object Set]"!=v(new a)||s&&"[object WeakMap]"!=v(new s))&&(v=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=v},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},function(e,t,n){(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(2),i=n(121),a="object"==r(t)&&t&&!t.nodeType&&t,s=a&&"object"==r(e)&&e&&!e.nodeType&&e,u=s&&s.exports===a?o.Buffer:void 0,c=(u?u.isBuffer:void 0)||i;e.exports=c}).call(this,n(14)(e))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=s(p);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(90),o=n(91),i=n(92),a=n(93),s=n(94);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(30);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(8),o=n(5);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(4)(Object,"create");e.exports=r},function(e,t,n){var r=n(114);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(49),o=n(50);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=i?i(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),a?o(n,c,l):r(n,c,l)}return n}},function(e,t,n){var r=n(120),o=n(3),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},function(e,t,n){var r=n(122),o=n(35),i=n(36),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(65),o=n(150)(r);e.exports=o},function(e,t){e.exports=function(e){return e}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(154),i=n(164),a=n(25),s=n(0),u=n(173);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==r(e)?s(e)?i(e[0],e[1]):o(e):u(e)}},function(e,t,n){var r=n(44);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(1);function i(e){this._isDirected=!o.has(e,"directed")||e.directed,this._isMultigraph=!!o.has(e,"multigraph")&&e.multigraph,this._isCompound=!!o.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=o.constant(void 0),this._defaultEdgeLabelFn=o.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 a(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function u(e,t,n,r){var i=""+t,a=""+n;if(!e&&i>a){var s=i;i=a,a=s}return i+""+a+""+(o.isUndefined(r)?"\0":r)}function c(e,t){return u(e,t.v,t.w,t.name)}e.exports=i,i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(e){return this._label=e,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(e){return o.isFunction(e)||(e=o.constant(e)),this._defaultNodeLabelFn=e,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return o.keys(this._nodes)},i.prototype.sources=function(){var e=this;return o.filter(this.nodes(),(function(t){return o.isEmpty(e._in[t])}))},i.prototype.sinks=function(){var e=this;return o.filter(this.nodes(),(function(t){return o.isEmpty(e._out[t])}))},i.prototype.setNodes=function(e,t){var n=arguments,r=this;return o.each(e,(function(e){n.length>1?r.setNode(e,t):r.setNode(e)})),this},i.prototype.setNode=function(e,t){return o.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},i.prototype.node=function(e){return this._nodes[e]},i.prototype.hasNode=function(e){return o.has(this._nodes,e)},i.prototype.removeNode=function(e){var t=this;if(o.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],o.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),o.each(o.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],o.each(o.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},i.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(o.isUndefined(t))t="\0";else{for(var n=t+="";!o.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},i.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},i.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}},i.prototype.children=function(e){if(o.isUndefined(e)&&(e="\0"),this._isCompound){var t=this._children[e];if(t)return o.keys(t)}else{if("\0"===e)return this.nodes();if(this.hasNode(e))return[]}},i.prototype.predecessors=function(e){var t=this._preds[e];if(t)return o.keys(t)},i.prototype.successors=function(e){var t=this._sucs[e];if(t)return o.keys(t)},i.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return o.union(t,this.successors(e))},i.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},i.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;o.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),o.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var r={};return this._isCompound&&o.each(t.nodes(),(function(e){t.setParent(e,function e(o){var i=n.parent(o);return void 0===i||t.hasNode(i)?(r[o]=i,i):i in r?r[i]:e(i)}(e))})),t},i.prototype.setDefaultEdgeLabel=function(e){return o.isFunction(e)||(e=o.constant(e)),this._defaultEdgeLabelFn=e,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return o.values(this._edgeObjs)},i.prototype.setPath=function(e,t){var n=this,r=arguments;return o.reduce(e,(function(e,o){return r.length>1?n.setEdge(e,o,t):n.setEdge(e,o),o})),this},i.prototype.setEdge=function(){var e,t,n,i,s=!1,c=arguments[0];"object"===r(c)&&null!==c&&"v"in c?(e=c.v,t=c.w,n=c.name,2===arguments.length&&(i=arguments[1],s=!0)):(e=c,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),e=""+e,t=""+t,o.isUndefined(n)||(n=""+n);var l=u(this._isDirected,e,t,n);if(o.has(this._edgeLabels,l))return s&&(this._edgeLabels[l]=i),this;if(!o.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=s?i:this._defaultEdgeLabelFn(e,t,n);var f=function(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return r&&(s.name=r),s}(this._isDirected,e,t,n);return e=f.v,t=f.w,Object.freeze(f),this._edgeObjs[l]=f,a(this._preds[t],e),a(this._sucs[e],t),this._in[t][l]=f,this._out[e][l]=f,this._edgeCount++,this},i.prototype.edge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return o.has(this._edgeLabels,r)},i.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},i.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var r=o.values(n);return t?o.filter(r,(function(e){return e.v===t})):r}},i.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var r=o.values(n);return t?o.filter(r,(function(e){return e.w===t})):r}},i.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},function(e,t,n){var r=n(15),o=n(95),i=n(96),a=n(97),s=n(98),u=n(99);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(4)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(106),o=n(113),i=n(115),a=n(116),s=n(117);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(47),i="object"==r(t)&&t&&!t.nodeType&&t,a=i&&"object"==r(e)&&e&&!e.nodeType&&e,s=a&&a.exports===i&&o.process,u=function(){try{return a&&a.require&&a.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=u}).call(this,n(14)(e))},function(e,t,n){var r=n(23),o=n(123),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(56),o=n(57),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(54)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(62);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(0),i=n(44),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(o(e))return!1;var n=r(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||s.test(e)||!a.test(e)||null!=t&&e in Object(t)}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(8),i=n(3);e.exports=function(e){return"symbol"==r(e)||i(e)&&"[object Symbol]"==o(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r="object"==(void 0===t?"undefined":n(t))&&t&&t.Object===Object&&t;e.exports=r}).call(this,n(11))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(50),o=n(30),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(51);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(4),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(119),o=n(21),i=n(0),a=n(12),s=n(53),u=n(22),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&o(e),f=!n&&!l&&a(e),p=!n&&!l&&!f&&u(e),d=n||l||f||p,h=d?r(e.length,String):[],v=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,v))||h.push(g);return h}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var o=n(e);return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(52),o=n(125),i=n(7);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(39),o=n(40),i=n(38),a=n(57),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=s},function(e,t,n){var r=n(60),o=n(38),i=n(6);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(39),o=n(0);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},function(e,t,n){var r=n(4)(n(2),"Set");e.exports=r},function(e,t,n){var r=n(2).Uint8Array;e.exports=r},function(e,t,n){var r=n(5),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t,n){var r=n(148),o=n(6);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(156),o=n(3);e.exports=function e(t,n,i,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,s))}},function(e,t,n){var r=n(68),o=n(159),i=n(69);e.exports=function(e,t,n,a,s,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var p=u.get(e);if(p&&u.get(t))return p==t;var d=-1,h=!0,v=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++d<l;){var g=e[d],y=t[d];if(a)var m=c?a(y,g,d,t,e,u):a(g,y,d,e,t,u);if(void 0!==m){if(m)continue;h=!1;break}if(v){if(!o(t,(function(e,t){if(!i(v,t)&&(g===e||s(g,e,n,a,u)))return v.push(t)}))){h=!1;break}}else if(g!==y&&!s(g,y,n,a,u)){h=!1;break}}return u.delete(e),u.delete(t),h}},function(e,t,n){var r=n(32),o=n(157),i=n(158);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(5);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},function(e,t,n){var r=n(73),o=n(27);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},function(e,t,n){var r=n(0),o=n(43),i=n(166),a=n(169);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,n){var r=n(73),o=n(21),i=n(0),a=n(53),s=n(34),u=n(27);e.exports=function(e,t,n){for(var c=-1,l=(t=r(t,e)).length,f=!1;++c<l;){var p=u(t[c]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&s(l)&&a(p,l)&&(i(e)||o(e))}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(1),o=n(77);e.exports=function(e,t,n,r){return function(e,t,n,r){var i,a,s={},u=new o,c=function(e){var t=e.v!==i?e.v:e.w,r=s[t],o=n(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<r.distance&&(r.distance=c,r.predecessor=i,u.decrease(t,c))};for(e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},u.add(e,n)}));u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return s}(e,String(t),n||i,r||function(t){return e.outEdges(t)})};var i=r.constant(1)},function(e,t,n){var r=n(1);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))},o.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},o.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t}},function(e,t,n){var r=n(1);e.exports=function(e){var t=0,n=[],o={},i=[];return e.nodes().forEach((function(a){r.has(o,a)||function a(s){var u=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(o,e)?o[e].onStack&&(u.lowlink=Math.min(u.lowlink,o[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,o[e].lowlink))})),u.lowlink===u.index){var c,l=[];do{c=n.pop(),o[c].onStack=!1,l.push(c)}while(s!==c);i.push(l)}}(a)})),i}},function(e,t,n){var r=n(1);function o(e){var t={},n={},o=[];if(r.each(e.sinks(),(function a(s){if(r.has(n,s))throw new i;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],o.push(s))})),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}e.exports=o,o.CycleException=i,i.prototype=new Error},function(e,t,n){var r=n(1);e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);!function e(t,n,o,i,a,s){r.has(i,n)||(i[n]=!0,o||s.push(n),r.each(a(n),(function(n){e(t,n,o,i,a,s)})),o&&s.push(n))}(e,t,"post"===n,a,o,i)})),i}},function(e,t,n){(function(t){var r=n(226),o=["delete","get","head","patch","post","put"];e.exports.load=function(e,n,i){var a,s,u=n.method?n.method.toLowerCase():"get";function c(e,n){e?i(e):("[object process]"===Object.prototype.toString.call(void 0!==t?t:0)&&"function"==typeof n.buffer&&n.buffer(!0),n.end((function(e,t){e?i(e):i(void 0,t)})))}if(void 0!==n.method?"string"!=typeof n.method?a=new TypeError("options.method must be a string"):-1===o.indexOf(n.method)&&(a=new TypeError("options.method must be one of the following: "+o.slice(0,o.length-1).join(", ")+" or "+o[o.length-1])):void 0!==n.prepareRequest&&"function"!=typeof n.prepareRequest&&(a=new TypeError("options.prepareRequest must be a function")),a)i(a);else if(s=r["delete"===u?"del":u](e),n.prepareRequest)try{n.prepareRequest(s,c)}catch(e){i(e)}else c(void 0,s)}}).call(this,n(13))},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return null!==e&&"object"===r(e)}},function(e,t,n){(function(r,o){var i,a,s,u;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
2
2
  /*! Native Promise Only
3
3
  v0.8.1 (c) Kyle Simpson
4
4
  MIT License: http://getify.mit-license.org
5
- */u=function(){var e,t,n,r=Object.prototype.toString,i=void 0!==o?function(e){return o(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(t){e=function(e,t,n){return e[t]=n,e}}function a(e,r){n.add(e,r),t||(t=i(n.drain))}function s(e){var t,n=c(e);return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function u(){for(var e=0;e<this.chain.length;e++)l(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function l(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=s(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}function f(e){var t,n=this;if(!n.triggered){n.triggered=!0,n.def&&(n=n.def);try{(t=s(e))?a((function(){var r=new h(n);try{t.call(e,(function(){f.apply(r,arguments)}),(function(){p.apply(r,arguments)}))}catch(e){p.call(r,e)}})):(n.msg=e,n.state=1,n.chain.length>0&&a(u,n))}catch(e){p.call(new h(n),e)}}}function p(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(u,t))}function d(e,t,n,r){for(var o=0;o<t.length;o++)!function(o){e.resolve(t[o]).then((function(e){n(o,e)}),r)}(o)}function h(e){this.def=e,this.triggered=!1}function v(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new v(this);this.then=function(e,n){var r={success:"function"!=typeof e||e,failure:"function"==typeof n&&n};return r.promise=new this.constructor((function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");r.resolve=e,r.reject=t})),t.chain.push(r),0!==t.state&&a(u,t),r.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,(function(e){f.call(t,e)}),(function(e){p.call(t,e)}))}catch(e){p.call(t,e)}}n=function(){var e,n,r;function o(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(t,i){r=new o(t,i),n?n.next=r:e=r,n=r,r=void 0},drain:function(){var r=e;for(e=n=t=void 0;r;)r.fn.call(r.self),r=r.next}}}();var y=e({},"constructor",g,!1);return g.prototype=y,e(y,"__NPO__",0,!1),e(g,"resolve",(function(e){return e&&"object"==c(e)&&1===e.__NPO__?e:new this((function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");t(e)}))})),e(g,"reject",(function(e){return new this((function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");n(e)}))})),e(g,"all",(function(e){var t=this;return"[object Array]"!=r.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t((function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var o=e.length,i=Array(o),a=0;d(t,e,(function(e,t){i[e]=t,++a===o&&n(i)}),r)}))})),e(g,"race",(function(e){var t=this;return"[object Array]"!=r.call(e)?t.reject(TypeError("Not an array")):new t((function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");d(t,e,(function(e,t){n(t)}),r)}))})),g},(s=void 0!==r?r:this)[a="Promise"]=s[a]||u(),e.exports?e.exports=s[a]:void 0===(i=function(){return s[a]}.call(t,n,t,e))||(e.exports=i)}).call(this,n(11),n(232).setImmediate)},function(e,t,n){(function(t){var r=n(85),o=n(86),i=n(223),a=n(224),s=n(234),u=n(237),c=n(238),l=/~(?:[^01]|$)/g,f={},p=["relative","remote"],d=["absolute","uri"],h={};function v(e,t){r.isString(e)&&(e=u(e)),r.isString(t)&&(t=u(t));var n,o,a=E(r.isUndefined(t)?"":t);return d.indexOf(a.reference)>-1?o=a:(n=r.isUndefined(e)?void 0:E(e),r.isUndefined(n)?o=a:((o=n).path=u(i.join(n.path,a.path)),o.query=function(e,t){var n={};function o(e){r.forOwn(e,(function(e,t){n[t]=e}))}return o(s.parse(e||"")),o(s.parse(t||"")),0===Object.keys(n).length?void 0:s.stringify(n)}(n.query,a.query))),o.fragment=void 0,(-1===d.indexOf(o.reference)&&0===o.path.indexOf("../")?"../":"")+c.serialize(o)}function g(e){return p.indexOf(w(e))>-1}function y(e){return r.isUndefined(e.error)&&"invalid"!==e.type}function m(e,t){var n=e;return t.forEach((function(e){if(!(e in n))throw Error("JSON Pointer points to missing location: "+T(t));n=n[e]})),n}function b(e){return Object.keys(e).filter((function(e){return"$ref"!==e}))}function w(e){var t;switch(e.uriDetails.reference){case"absolute":case"uri":t="remote";break;case"same-document":t="local";break;default:t=e.uriDetails.reference}return t}function _(e,t){var n=f[e],o=Promise.resolve(),i=r.cloneDeep(t.loaderOptions||{});return r.isUndefined(n)?(r.isUndefined(i.processContent)&&(i.processContent=function(e,t){t(void 0,JSON.parse(e.text))}),o=(o=a.load(decodeURI(e),i)).then((function(t){return f[e]={value:t},t})).catch((function(t){throw f[e]={error:t},t}))):o=o.then((function(){if(r.isError(n.error))throw n.error;return n.value})),o.then((function(e){return r.cloneDeep(e)}))}function x(e,t){var n=!0;try{if(!r.isPlainObject(e))throw new Error("obj is not an Object");if(!r.isString(e.$ref))throw new Error("obj.$ref is not a String")}catch(e){if(t)throw e;n=!1}return n}function S(e){return-1!==e.indexOf("://")||i.isAbsolute(e)?e:i.resolve(t.cwd(),e)}function j(e,t){e.error=t.message,e.missing=!0}function E(e){return c.parse(e)}function k(e,t,n){m(e,t.slice(0,t.length-1))[t[t.length-1]]=n}function O(e,t){var n,o;if(e=r.isUndefined(e)?{}:r.cloneDeep(e),!r.isObject(e))throw new TypeError("options must be an Object");if(!r.isUndefined(e.resolveCirculars)&&!r.isBoolean(e.resolveCirculars))throw new TypeError("options.resolveCirculars must be a Boolean");if(!(r.isUndefined(e.filter)||r.isArray(e.filter)||r.isFunction(e.filter)||r.isString(e.filter)))throw new TypeError("options.filter must be an Array, a Function of a String");if(!r.isUndefined(e.includeInvalid)&&!r.isBoolean(e.includeInvalid))throw new TypeError("options.includeInvalid must be a Boolean");if(!r.isUndefined(e.location)&&!r.isString(e.location))throw new TypeError("options.location must be a String");if(!r.isUndefined(e.refPreProcessor)&&!r.isFunction(e.refPreProcessor))throw new TypeError("options.refPreProcessor must be a Function");if(!r.isUndefined(e.refPostProcessor)&&!r.isFunction(e.refPostProcessor))throw new TypeError("options.refPostProcessor must be a Function");if(!r.isUndefined(e.subDocPath)&&!r.isArray(e.subDocPath)&&!P(e.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(r.isUndefined(e.resolveCirculars)&&(e.resolveCirculars=!1),e.filter=function(e){var t,n;return r.isArray(e.filter)||r.isString(e.filter)?(n=r.isString(e.filter)?[e.filter]:e.filter,t=function(e){return n.indexOf(e.type)>-1||n.indexOf(w(e))>-1}):r.isFunction(e.filter)?t=e.filter:r.isUndefined(e.filter)&&(t=function(){return!0}),function(n,r){return("invalid"!==n.type||!0===e.includeInvalid)&&t(n,r)}}(e),r.isUndefined(e.location)&&(e.location=S("./root.json")),(n=e.location.split("#")).length>1&&(e.subDocPath="#"+n[1]),o=decodeURI(e.location)===e.location,e.location=v(e.location,void 0),o&&(e.location=decodeURI(e.location)),e.subDocPath=function(e){var t;return r.isArray(e.subDocPath)?t=e.subDocPath:r.isString(e.subDocPath)?t=N(e.subDocPath):r.isUndefined(e.subDocPath)&&(t=[]),t}(e),!r.isUndefined(t))try{m(t,e.subDocPath)}catch(e){throw e.message=e.message.replace("JSON Pointer","options.subDocPath"),e}return e}function A(e){if(!r.isArray(e))throw new TypeError("path must be an array");return e.map((function(e){return r.isString(e)||(e=JSON.stringify(e)),e.replace(/~1/g,"/").replace(/~0/g,"~")}))}function F(e){if(!r.isArray(e))throw new TypeError("path must be an array");return e.map((function(e){return r.isString(e)||(e=JSON.stringify(e)),e.replace(/~/g,"~0").replace(/\//g,"~1")}))}function I(e,t){var n={};if(!r.isArray(e)&&!r.isObject(e))throw new TypeError("obj must be an Array or an Object");return function e(t,n,o,i){var a=!0;function s(n,r){o.push(r),e(t,n,o,i),o.pop()}r.isFunction(i)&&(a=i(t,n,o)),-1===t.indexOf(n)&&(t.push(n),!1!==a&&(r.isArray(n)?n.forEach((function(e,t){s(e,t.toString())})):r.isObject(n)&&r.forOwn(n,(function(e,t){s(e,t)}))),t.pop())}(function(e,t){var n,r=[];return t.length>0&&(n=e,t.slice(0,t.length-1).forEach((function(e){e in n&&(n=n[e],r.push(n))}))),r}(e,(t=O(t,e)).subDocPath),m(e,t.subDocPath),r.cloneDeep(t.subDocPath),(function(e,o,i){var a,s,u=!0;return x(o)&&(r.isUndefined(t.refPreProcessor)||(o=t.refPreProcessor(r.cloneDeep(o),i)),a=D(o),r.isUndefined(t.refPostProcessor)||(a=t.refPostProcessor(a,i)),t.filter(a,i)&&(s=T(i),n[s]=a),b(o).length>0&&(u=!1)),u})),n}function D(e){var t,n,o,i={def:e};try{if(x(e,!0),t=e.$ref,o=h[t],r.isUndefined(o)&&(o=h[t]=E(t)),i.uri=t,i.uriDetails=o,r.isUndefined(o.error)){i.type=w(i);try{["#","/"].indexOf(t[0])>-1?P(t,!0):t.indexOf("#")>-1&&P(o.fragment,!0)}catch(e){i.error=e.message,i.type="invalid"}}else i.error=i.uriDetails.error,i.type="invalid";(n=b(e)).length>0&&(i.warning="Extra JSON Reference properties will be ignored: "+n.join(", "))}catch(e){i.error=e.message,i.type="invalid"}return i}function P(e,t){var n,o=!0;try{if(!r.isString(e))throw new Error("ptr is not a String");if(""!==e){if(n=e.charAt(0),-1===["#","/"].indexOf(n))throw new Error("ptr must start with a / or #/");if("#"===n&&"#"!==e&&"/"!==e.charAt(1))throw new Error("ptr must start with a / or #/");if(e.match(l))throw new Error("ptr has invalid token(s)")}}catch(e){if(!0===t)throw e;o=!1}return o}function N(e){try{P(e,!0)}catch(e){throw new Error("ptr must be a JSON Pointer: "+e.message)}var t=e.split("/");return t.shift(),A(t)}function T(e,t){if(!r.isArray(e))throw new Error("path must be an Array");return(!1!==t?"#":"")+(e.length>0?"/":"")+F(e).join("/")}function C(e,t){var n=Promise.resolve();return n.then((function(){if(!r.isArray(e)&&!r.isObject(e))throw new TypeError("obj must be an Array or an Object");t=O(t,e),e=r.cloneDeep(e)})).then((function(){var n={deps:{},docs:{},refs:{}};return function e(t,n,o){var a,s,u=Promise.resolve(),c=T(n.subDocPath),l=S(n.location),f=i.dirname(n.location),p=l+c;return r.isUndefined(o.docs[l])&&(o.docs[l]=t),r.isUndefined(o.deps[p])&&(o.deps[p]={},a=I(t,n),r.forOwn(a,(function(i,a){var l,d,h=S(n.location)+a,m=i.refdId=decodeURI(S(g(i)?v(f,i.uri):n.location)+"#"+(i.uri.indexOf("#")>-1?i.uri.split("#")[1]:""));o.refs[h]=i,y(i)&&(i.fqURI=m,o.deps[p][a===c?"#":a.replace(c+"/","#/")]=m,0!==h.indexOf(m+"/")&&h!==m?((s=r.cloneDeep(n)).subDocPath=r.isUndefined(i.uriDetails.fragment)?[]:N(decodeURI(i.uriDetails.fragment)),g(i)?(delete s.filter,s.location=m.split("#")[0],u=u.then((l=o,d=s,function(){var e=S(d.location),t=l.docs[e];return r.isUndefined(t)?_(e,d).catch((function(t){return l.docs[e]=t,t})):Promise.resolve().then((function(){return t}))}))):u=u.then((function(){return t})),u=u.then(function(t,n,o){return function(i){if(r.isError(i))j(o,i);else try{return e(i,n,t).catch((function(e){j(o,e)}))}catch(e){j(o,e)}}}(o,s,i))):i.circular=!0)}))),u}(e,t,n).then((function(){return n}))})).then((function(e){var n={},a=[],s=[],u=new o.Graph,c=S(t.location),l=c+T(t.subDocPath),f=i.dirname(c);return Object.keys(e.deps).forEach((function(e){u.setNode(e)})),r.forOwn(e.deps,(function(e,t){r.forOwn(e,(function(e){u.setEdge(t,e)}))})),(a=o.alg.findCycles(u)).forEach((function(e){e.forEach((function(e){-1===s.indexOf(e)&&s.push(e)}))})),r.forOwn(e.deps,(function(t,n){r.forOwn(t,(function(t,r){var o,i=!1,u=n+r.slice(1),c=e.refs[n+r.slice(1)],l=g(c);s.indexOf(t)>-1&&a.forEach((function(e){i||(o=e.indexOf(t))>-1&&e.forEach((function(n){i||0===u.indexOf(n+"/")&&(l&&o!==e.length-1&&"#"===t[t.length-1]||(i=!0))}))})),i&&(c.circular=!0)}))})),r.forOwn(Object.keys(e.deps).reverse(),(function(n){var o=e.deps[n],i=n.split("#"),a=e.docs[i[0]],s=N(i[1]);r.forOwn(o,(function(n,o){var u=n.split("#"),c=e.docs[u[0]],l=s.concat(N(o)),f=e.refs[i[0]+T(l)];if(r.isUndefined(f.error)&&r.isUndefined(f.missing))if(!t.resolveCirculars&&f.circular)f.value=r.cloneDeep(f.def);else{try{f.value=m(c,N(u[1]))}catch(e){return void j(f,e)}""===i[1]&&"#"===o?e.docs[i[0]]=f.value:k(a,l,f.value)}}))})),Object.keys(e.refs).forEach((function(o){var i,a,s=e.refs[o];"invalid"!==s.type&&("#"===s.fqURI[s.fqURI.length-1]&&"#"!==s.uri[s.uri.length-1]&&(s.fqURI=s.fqURI.substr(0,s.fqURI.length-1)),i=s.fqURI.split("/"),a=s.uri.split("/"),r.times(a.length-1,(function(e){var t=a[a.length-e-1],n=a[a.length-e],r=i.length-e-1;"."!==t&&".."!==t&&".."!==n&&(i[r]=t)})),s.fqURI=i.join("/"),0===s.fqURI.indexOf(c)?s.fqURI=s.fqURI.replace(c,""):0===s.fqURI.indexOf(f)&&(s.fqURI=s.fqURI.replace(f,"")),"/"===s.fqURI[0]&&(s.fqURI="."+s.fqURI)),0===o.indexOf(l)&&function r(o,i,a){var s,u=i.split("#"),c=e.refs[i];n[u[0]===t.location?"#"+u[1]:T(t.subDocPath.concat(a))]=c,!c.circular&&y(c)?(s=e.deps[c.refdId],0!==c.refdId.indexOf(o)&&Object.keys(s).forEach((function(e){r(c.refdId,c.refdId+e.substr(1),a.concat(N(e)))}))):!c.circular&&c.error&&(c.error=c.error.replace("options.subDocPath","JSON Pointer"),c.error.indexOf("#")>-1&&(c.error=c.error.replace(c.uri.substr(c.uri.indexOf("#")),c.uri)),0!==c.error.indexOf("ENOENT:")&&0!==c.error.indexOf("Not Found")||(c.error="JSON Pointer points to missing location: "+c.uri))}(l,o,N(o.substr(l.length)))})),r.forOwn(n,(function(t,n){delete t.refdId,t.circular&&"local"===t.type&&(t.value.$ref=t.fqURI,k(e.docs[c],N(n),t.value)),t.missing&&(t.error=t.error.split(": ")[0]+": "+t.def.$ref)})),{refs:n,resolved:e.docs[c]}}))}"undefined"==typeof Promise&&n(83),e.exports.clearCache=function(){f={}},e.exports.decodePath=function(e){return A(e)},e.exports.encodePath=function(e){return F(e)},e.exports.findRefs=function(e,t){return I(e,t)},e.exports.findRefsAt=function(e,t){return function(e,t){var n=Promise.resolve();return n.then((function(){if(!r.isString(e))throw new TypeError("location must be a string");return r.isUndefined(t)&&(t={}),r.isObject(t)&&(t.location=e),_((t=O(t)).location,t)})).then((function(e){var n=r.cloneDeep(f[t.location]),o=r.cloneDeep(t);return r.isUndefined(n.refs)&&(delete o.filter,delete o.subDocPath,o.includeInvalid=!0,f[t.location].refs=I(e,o)),r.isUndefined(t.filter)||(o.filter=t.filter),{refs:I(e,o),value:e}}))}(e,t)},e.exports.getRefDetails=function(e){return D(e)},e.exports.isPtr=function(e,t){return P(e,t)},e.exports.isRef=function(e,t){return function(e,t){return x(e,t)&&"invalid"!==D(e).type}(e,t)},e.exports.pathFromPtr=function(e){return N(e)},e.exports.pathToPtr=function(e,t){return T(e,t)},e.exports.resolveRefs=function(e,t){return C(e,t)},e.exports.resolveRefsAt=function(e,t){return function(e,t){var n=Promise.resolve();return n.then((function(){if(!r.isString(e))throw new TypeError("location must be a string");return r.isUndefined(t)&&(t={}),r.isObject(t)&&(t.location=e),_((t=O(t)).location,t)})).then((function(e){return C(e,t).then((function(t){return{refs:t.refs,resolved:t.resolved,value:e}}))}))}(e,t)}}).call(this,n(13))},function(e,t,n){(function(e,r){var o;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
5
+ */u=function(){var e,t,n,r=Object.prototype.toString,i=void 0!==o?function(e){return o(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(t){e=function(e,t,n){return e[t]=n,e}}function a(e,r){n.add(e,r),t||(t=i(n.drain))}function s(e){var t,n=c(e);return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function u(){for(var e=0;e<this.chain.length;e++)l(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function l(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=s(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}function f(e){var t,n=this;if(!n.triggered){n.triggered=!0,n.def&&(n=n.def);try{(t=s(e))?a((function(){var r=new h(n);try{t.call(e,(function(){f.apply(r,arguments)}),(function(){p.apply(r,arguments)}))}catch(e){p.call(r,e)}})):(n.msg=e,n.state=1,n.chain.length>0&&a(u,n))}catch(e){p.call(new h(n),e)}}}function p(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(u,t))}function d(e,t,n,r){for(var o=0;o<t.length;o++)!function(o){e.resolve(t[o]).then((function(e){n(o,e)}),r)}(o)}function h(e){this.def=e,this.triggered=!1}function v(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new v(this);this.then=function(e,n){var r={success:"function"!=typeof e||e,failure:"function"==typeof n&&n};return r.promise=new this.constructor((function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");r.resolve=e,r.reject=t})),t.chain.push(r),0!==t.state&&a(u,t),r.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,(function(e){f.call(t,e)}),(function(e){p.call(t,e)}))}catch(e){p.call(t,e)}}n=function(){var e,n,r;function o(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(t,i){r=new o(t,i),n?n.next=r:e=r,n=r,r=void 0},drain:function(){var r=e;for(e=n=t=void 0;r;)r.fn.call(r.self),r=r.next}}}();var y=e({},"constructor",g,!1);return g.prototype=y,e(y,"__NPO__",0,!1),e(g,"resolve",(function(e){return e&&"object"==c(e)&&1===e.__NPO__?e:new this((function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");t(e)}))})),e(g,"reject",(function(e){return new this((function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");n(e)}))})),e(g,"all",(function(e){var t=this;return"[object Array]"!=r.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t((function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var o=e.length,i=Array(o),a=0;d(t,e,(function(e,t){i[e]=t,++a===o&&n(i)}),r)}))})),e(g,"race",(function(e){var t=this;return"[object Array]"!=r.call(e)?t.reject(TypeError("Not an array")):new t((function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");d(t,e,(function(e,t){n(t)}),r)}))})),g},(s=void 0!==r?r:this)[a="Promise"]=s[a]||u(),e.exports?e.exports=s[a]:void 0===(i=function(){return s[a]}.call(t,n,t,e))||(e.exports=i)}).call(this,n(11),n(232).setImmediate)},function(e,t,n){(function(t){var r=n(85),o=n(86),i=n(223),a=n(224),s=n(234),u=n(237),c=n(238),l=/~(?:[^01]|$)/g,f={},p=["relative","remote"],d=["absolute","uri"],h={};function v(e,t){r.isString(e)&&(e=u(e)),r.isString(t)&&(t=u(t));var n,o,a=E(r.isUndefined(t)?"":t);return d.indexOf(a.reference)>-1?o=a:(n=r.isUndefined(e)?void 0:E(e),r.isUndefined(n)?o=a:((o=n).path=u(i.join(n.path,a.path)),o.query=function(e,t){var n={};function o(e){r.forOwn(e,(function(e,t){n[t]=e}))}return o(s.parse(e||"")),o(s.parse(t||"")),0===Object.keys(n).length?void 0:s.stringify(n)}(n.query,a.query))),o.fragment=void 0,(-1===d.indexOf(o.reference)&&0===o.path.indexOf("../")?"../":"")+c.serialize(o)}function g(e){return p.indexOf(w(e))>-1}function y(e){return r.isUndefined(e.error)&&"invalid"!==e.type}function m(e,t){var n=e;return t.forEach((function(e){if(!(e in n))throw Error("JSON Pointer points to missing location: "+T(t));n=n[e]})),n}function b(e){return Object.keys(e).filter((function(e){return"$ref"!==e}))}function w(e){var t;switch(e.uriDetails.reference){case"absolute":case"uri":t="remote";break;case"same-document":t="local";break;default:t=e.uriDetails.reference}return t}function _(e,t){var n=f[e],o=Promise.resolve(),i=r.cloneDeep(t.loaderOptions||{});return r.isUndefined(n)?(r.isUndefined(i.processContent)&&(i.processContent=function(e,t){t(void 0,JSON.parse(e.text))}),o=(o=a.load(decodeURI(e),i)).then((function(t){return f[e]={value:t},t})).catch((function(t){throw f[e]={error:t},t}))):o=o.then((function(){if(r.isError(n.error))throw n.error;return n.value})),o.then((function(e){return r.cloneDeep(e)}))}function x(e,t){var n=!0;try{if(!r.isPlainObject(e))throw new Error("obj is not an Object");if(!r.isString(e.$ref))throw new Error("obj.$ref is not a String")}catch(e){if(t)throw e;n=!1}return n}function S(e){return-1!==e.indexOf("://")||i.isAbsolute(e)?e:i.resolve(t.cwd(),e)}function j(e,t){e.error=t.message,e.missing=!0}function E(e){return c.parse(e)}function k(e,t,n){m(e,t.slice(0,t.length-1))[t[t.length-1]]=n}function O(e,t){var n,o;if(e=r.isUndefined(e)?{}:r.cloneDeep(e),!r.isObject(e))throw new TypeError("options must be an Object");if(!r.isUndefined(e.resolveCirculars)&&!r.isBoolean(e.resolveCirculars))throw new TypeError("options.resolveCirculars must be a Boolean");if(!(r.isUndefined(e.filter)||r.isArray(e.filter)||r.isFunction(e.filter)||r.isString(e.filter)))throw new TypeError("options.filter must be an Array, a Function of a String");if(!r.isUndefined(e.includeInvalid)&&!r.isBoolean(e.includeInvalid))throw new TypeError("options.includeInvalid must be a Boolean");if(!r.isUndefined(e.location)&&!r.isString(e.location))throw new TypeError("options.location must be a String");if(!r.isUndefined(e.refPreProcessor)&&!r.isFunction(e.refPreProcessor))throw new TypeError("options.refPreProcessor must be a Function");if(!r.isUndefined(e.refPostProcessor)&&!r.isFunction(e.refPostProcessor))throw new TypeError("options.refPostProcessor must be a Function");if(!r.isUndefined(e.subDocPath)&&!r.isArray(e.subDocPath)&&!N(e.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(r.isUndefined(e.resolveCirculars)&&(e.resolveCirculars=!1),e.filter=function(e){var t,n;return r.isArray(e.filter)||r.isString(e.filter)?(n=r.isString(e.filter)?[e.filter]:e.filter,t=function(e){return n.indexOf(e.type)>-1||n.indexOf(w(e))>-1}):r.isFunction(e.filter)?t=e.filter:r.isUndefined(e.filter)&&(t=function(){return!0}),function(n,r){return("invalid"!==n.type||!0===e.includeInvalid)&&t(n,r)}}(e),r.isUndefined(e.location)&&(e.location=S("./root.json")),(n=e.location.split("#")).length>1&&(e.subDocPath="#"+n[1]),o=decodeURI(e.location)===e.location,e.location=v(e.location,void 0),o&&(e.location=decodeURI(e.location)),e.subDocPath=function(e){var t;return r.isArray(e.subDocPath)?t=e.subDocPath:r.isString(e.subDocPath)?t=P(e.subDocPath):r.isUndefined(e.subDocPath)&&(t=[]),t}(e),!r.isUndefined(t))try{m(t,e.subDocPath)}catch(e){throw e.message=e.message.replace("JSON Pointer","options.subDocPath"),e}return e}function A(e){if(!r.isArray(e))throw new TypeError("path must be an array");return e.map((function(e){return r.isString(e)||(e=JSON.stringify(e)),e.replace(/~1/g,"/").replace(/~0/g,"~")}))}function F(e){if(!r.isArray(e))throw new TypeError("path must be an array");return e.map((function(e){return r.isString(e)||(e=JSON.stringify(e)),e.replace(/~/g,"~0").replace(/\//g,"~1")}))}function I(e,t){var n={};if(!r.isArray(e)&&!r.isObject(e))throw new TypeError("obj must be an Array or an Object");return function e(t,n,o,i){var a=!0;function s(n,r){o.push(r),e(t,n,o,i),o.pop()}r.isFunction(i)&&(a=i(t,n,o)),-1===t.indexOf(n)&&(t.push(n),!1!==a&&(r.isArray(n)?n.forEach((function(e,t){s(e,t.toString())})):r.isObject(n)&&r.forOwn(n,(function(e,t){s(e,t)}))),t.pop())}(function(e,t){var n,r=[];return t.length>0&&(n=e,t.slice(0,t.length-1).forEach((function(e){e in n&&(n=n[e],r.push(n))}))),r}(e,(t=O(t,e)).subDocPath),m(e,t.subDocPath),r.cloneDeep(t.subDocPath),(function(e,o,i){var a,s,u=!0;return x(o)&&(r.isUndefined(t.refPreProcessor)||(o=t.refPreProcessor(r.cloneDeep(o),i)),a=D(o),r.isUndefined(t.refPostProcessor)||(a=t.refPostProcessor(a,i)),t.filter(a,i)&&(s=T(i),n[s]=a),b(o).length>0&&(u=!1)),u})),n}function D(e){var t,n,o,i={def:e};try{if(x(e,!0),t=e.$ref,o=h[t],r.isUndefined(o)&&(o=h[t]=E(t)),i.uri=t,i.uriDetails=o,r.isUndefined(o.error)){i.type=w(i);try{["#","/"].indexOf(t[0])>-1?N(t,!0):t.indexOf("#")>-1&&N(o.fragment,!0)}catch(e){i.error=e.message,i.type="invalid"}}else i.error=i.uriDetails.error,i.type="invalid";(n=b(e)).length>0&&(i.warning="Extra JSON Reference properties will be ignored: "+n.join(", "))}catch(e){i.error=e.message,i.type="invalid"}return i}function N(e,t){var n,o=!0;try{if(!r.isString(e))throw new Error("ptr is not a String");if(""!==e){if(n=e.charAt(0),-1===["#","/"].indexOf(n))throw new Error("ptr must start with a / or #/");if("#"===n&&"#"!==e&&"/"!==e.charAt(1))throw new Error("ptr must start with a / or #/");if(e.match(l))throw new Error("ptr has invalid token(s)")}}catch(e){if(!0===t)throw e;o=!1}return o}function P(e){try{N(e,!0)}catch(e){throw new Error("ptr must be a JSON Pointer: "+e.message)}var t=e.split("/");return t.shift(),A(t)}function T(e,t){if(!r.isArray(e))throw new Error("path must be an Array");return(!1!==t?"#":"")+(e.length>0?"/":"")+F(e).join("/")}function C(e,t){var n=Promise.resolve();return n.then((function(){if(!r.isArray(e)&&!r.isObject(e))throw new TypeError("obj must be an Array or an Object");t=O(t,e),e=r.cloneDeep(e)})).then((function(){var n={deps:{},docs:{},refs:{}};return function e(t,n,o){var a,s,u=Promise.resolve(),c=T(n.subDocPath),l=S(n.location),f=i.dirname(n.location),p=l+c;return r.isUndefined(o.docs[l])&&(o.docs[l]=t),r.isUndefined(o.deps[p])&&(o.deps[p]={},a=I(t,n),r.forOwn(a,(function(i,a){var l,d,h=S(n.location)+a,m=i.refdId=decodeURI(S(g(i)?v(f,i.uri):n.location)+"#"+(i.uri.indexOf("#")>-1?i.uri.split("#")[1]:""));o.refs[h]=i,y(i)&&(i.fqURI=m,o.deps[p][a===c?"#":a.replace(c+"/","#/")]=m,0!==h.indexOf(m+"/")&&h!==m?((s=r.cloneDeep(n)).subDocPath=r.isUndefined(i.uriDetails.fragment)?[]:P(decodeURI(i.uriDetails.fragment)),g(i)?(delete s.filter,s.location=m.split("#")[0],u=u.then((l=o,d=s,function(){var e=S(d.location),t=l.docs[e];return r.isUndefined(t)?_(e,d).catch((function(t){return l.docs[e]=t,t})):Promise.resolve().then((function(){return t}))}))):u=u.then((function(){return t})),u=u.then(function(t,n,o){return function(i){if(r.isError(i))j(o,i);else try{return e(i,n,t).catch((function(e){j(o,e)}))}catch(e){j(o,e)}}}(o,s,i))):i.circular=!0)}))),u}(e,t,n).then((function(){return n}))})).then((function(e){var n={},a=[],s=[],u=new o.Graph,c=S(t.location),l=c+T(t.subDocPath),f=i.dirname(c);return Object.keys(e.deps).forEach((function(e){u.setNode(e)})),r.forOwn(e.deps,(function(e,t){r.forOwn(e,(function(e){u.setEdge(t,e)}))})),(a=o.alg.findCycles(u)).forEach((function(e){e.forEach((function(e){-1===s.indexOf(e)&&s.push(e)}))})),r.forOwn(e.deps,(function(t,n){r.forOwn(t,(function(t,r){var o,i=!1,u=n+r.slice(1),c=e.refs[n+r.slice(1)],l=g(c);s.indexOf(t)>-1&&a.forEach((function(e){i||(o=e.indexOf(t))>-1&&e.forEach((function(n){i||0===u.indexOf(n+"/")&&(l&&o!==e.length-1&&"#"===t[t.length-1]||(i=!0))}))})),i&&(c.circular=!0)}))})),r.forOwn(Object.keys(e.deps).reverse(),(function(n){var o=e.deps[n],i=n.split("#"),a=e.docs[i[0]],s=P(i[1]);r.forOwn(o,(function(n,o){var u=n.split("#"),c=e.docs[u[0]],l=s.concat(P(o)),f=e.refs[i[0]+T(l)];if(r.isUndefined(f.error)&&r.isUndefined(f.missing))if(!t.resolveCirculars&&f.circular)f.value=r.cloneDeep(f.def);else{try{f.value=m(c,P(u[1]))}catch(e){return void j(f,e)}""===i[1]&&"#"===o?e.docs[i[0]]=f.value:k(a,l,f.value)}}))})),Object.keys(e.refs).forEach((function(o){var i,a,s=e.refs[o];"invalid"!==s.type&&("#"===s.fqURI[s.fqURI.length-1]&&"#"!==s.uri[s.uri.length-1]&&(s.fqURI=s.fqURI.substr(0,s.fqURI.length-1)),i=s.fqURI.split("/"),a=s.uri.split("/"),r.times(a.length-1,(function(e){var t=a[a.length-e-1],n=a[a.length-e],r=i.length-e-1;"."!==t&&".."!==t&&".."!==n&&(i[r]=t)})),s.fqURI=i.join("/"),0===s.fqURI.indexOf(c)?s.fqURI=s.fqURI.replace(c,""):0===s.fqURI.indexOf(f)&&(s.fqURI=s.fqURI.replace(f,"")),"/"===s.fqURI[0]&&(s.fqURI="."+s.fqURI)),0===o.indexOf(l)&&function r(o,i,a){var s,u=i.split("#"),c=e.refs[i];n[u[0]===t.location?"#"+u[1]:T(t.subDocPath.concat(a))]=c,!c.circular&&y(c)?(s=e.deps[c.refdId],0!==c.refdId.indexOf(o)&&Object.keys(s).forEach((function(e){r(c.refdId,c.refdId+e.substr(1),a.concat(P(e)))}))):!c.circular&&c.error&&(c.error=c.error.replace("options.subDocPath","JSON Pointer"),c.error.indexOf("#")>-1&&(c.error=c.error.replace(c.uri.substr(c.uri.indexOf("#")),c.uri)),0!==c.error.indexOf("ENOENT:")&&0!==c.error.indexOf("Not Found")||(c.error="JSON Pointer points to missing location: "+c.uri))}(l,o,P(o.substr(l.length)))})),r.forOwn(n,(function(t,n){delete t.refdId,t.circular&&"local"===t.type&&(t.value.$ref=t.fqURI,k(e.docs[c],P(n),t.value)),t.missing&&(t.error=t.error.split(": ")[0]+": "+t.def.$ref)})),{refs:n,resolved:e.docs[c]}}))}"undefined"==typeof Promise&&n(83),e.exports.clearCache=function(){f={}},e.exports.decodePath=function(e){return A(e)},e.exports.encodePath=function(e){return F(e)},e.exports.findRefs=function(e,t){return I(e,t)},e.exports.findRefsAt=function(e,t){return function(e,t){var n=Promise.resolve();return n.then((function(){if(!r.isString(e))throw new TypeError("location must be a string");return r.isUndefined(t)&&(t={}),r.isObject(t)&&(t.location=e),_((t=O(t)).location,t)})).then((function(e){var n=r.cloneDeep(f[t.location]),o=r.cloneDeep(t);return r.isUndefined(n.refs)&&(delete o.filter,delete o.subDocPath,o.includeInvalid=!0,f[t.location].refs=I(e,o)),r.isUndefined(t.filter)||(o.filter=t.filter),{refs:I(e,o),value:e}}))}(e,t)},e.exports.getRefDetails=function(e){return D(e)},e.exports.isPtr=function(e,t){return N(e,t)},e.exports.isRef=function(e,t){return function(e,t){return x(e,t)&&"invalid"!==D(e).type}(e,t)},e.exports.pathFromPtr=function(e){return P(e)},e.exports.pathToPtr=function(e,t){return T(e,t)},e.exports.resolveRefs=function(e,t){return C(e,t)},e.exports.resolveRefsAt=function(e,t){return function(e,t){var n=Promise.resolve();return n.then((function(){if(!r.isString(e))throw new TypeError("location must be a string");return r.isUndefined(t)&&(t={}),r.isObject(t)&&(t.location=e),_((t=O(t)).location,t)})).then((function(e){return C(e,t).then((function(t){return{refs:t.refs,resolved:t.resolved,value:e}}))}))}(e,t)}}).call(this,n(13))},function(e,t,n){(function(e,r){var o;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
6
6
  /**
7
7
  * @license
8
8
  * Lodash <https://lodash.com/>
@@ -10,5 +10,5 @@ function e(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}let t,n
10
10
  * Released under MIT license <https://lodash.com/license>
11
11
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
12
12
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
13
- */(function(){var a="Expected a function",s="__lodash_placeholder__",u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",l="[object Array]",f="[object Boolean]",p="[object Date]",d="[object Error]",h="[object Function]",v="[object GeneratorFunction]",g="[object Map]",y="[object Number]",m="[object Object]",b="[object RegExp]",w="[object Set]",_="[object String]",x="[object Symbol]",S="[object WeakMap]",j="[object ArrayBuffer]",E="[object DataView]",k="[object Float32Array]",O="[object Float64Array]",A="[object Int8Array]",F="[object Int16Array]",I="[object Int32Array]",D="[object Uint8Array]",P="[object Uint16Array]",N="[object Uint32Array]",T=/\b__p \+= '';/g,C=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,R=/[&<>"']/g,U=RegExp(L.source),M=RegExp(R.source),z=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,H=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,J=/[\\^$.*+?()[\]{}|]/g,K=RegExp(J.source),G=/^\s+|\s+$/g,Z=/^\s+/,X=/\s+$/,Y=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Q=/\{\n\/\* \[wrapped with (.+)\] \*/,ee=/,? & /,te=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ne=/\\(\\)?/g,re=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,oe=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,ae=/^0b[01]+$/i,se=/^\[object .+?Constructor\]$/,ue=/^0o[0-7]+$/i,ce=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fe=/($^)/,pe=/['\n\r\u2028\u2029\\]/g,de="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",he="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ve="["+he+"]",ge="["+de+"]",ye="\\d+",me="[a-z\\xdf-\\xf6\\xf8-\\xff]",be="[^\\ud800-\\udfff"+he+ye+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",we="\\ud83c[\\udffb-\\udfff]",_e="[^\\ud800-\\udfff]",xe="(?:\\ud83c[\\udde6-\\uddff]){2}",Se="[\\ud800-\\udbff][\\udc00-\\udfff]",je="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ee="(?:"+me+"|"+be+")",ke="(?:"+je+"|"+be+")",Oe="(?:"+ge+"|"+we+")?",Ae="[\\ufe0e\\ufe0f]?"+Oe+"(?:\\u200d(?:"+[_e,xe,Se].join("|")+")[\\ufe0e\\ufe0f]?"+Oe+")*",Fe="(?:"+["[\\u2700-\\u27bf]",xe,Se].join("|")+")"+Ae,Ie="(?:"+[_e+ge+"?",ge,xe,Se,"[\\ud800-\\udfff]"].join("|")+")",De=RegExp("['’]","g"),Pe=RegExp(ge,"g"),Ne=RegExp(we+"(?="+we+")|"+Ie+Ae,"g"),Te=RegExp([je+"?"+me+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ve,je,"$"].join("|")+")",ke+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ve,je+Ee,"$"].join("|")+")",je+"?"+Ee+"+(?:['’](?:d|ll|m|re|s|t|ve))?",je+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ye,Fe].join("|"),"g"),Ce=RegExp("[\\u200d\\ud800-\\udfff"+de+"\\ufe0e\\ufe0f]"),$e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Le=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Re=-1,Ue={};Ue[k]=Ue[O]=Ue[A]=Ue[F]=Ue[I]=Ue[D]=Ue["[object Uint8ClampedArray]"]=Ue[P]=Ue[N]=!0,Ue[c]=Ue[l]=Ue[j]=Ue[f]=Ue[E]=Ue[p]=Ue[d]=Ue[h]=Ue[g]=Ue[y]=Ue[m]=Ue[b]=Ue[w]=Ue[_]=Ue[S]=!1;var Me={};Me[c]=Me[l]=Me[j]=Me[E]=Me[f]=Me[p]=Me[k]=Me[O]=Me[A]=Me[F]=Me[I]=Me[g]=Me[y]=Me[m]=Me[b]=Me[w]=Me[_]=Me[x]=Me[D]=Me["[object Uint8ClampedArray]"]=Me[P]=Me[N]=!0,Me[d]=Me[h]=Me[S]=!1;var ze={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,qe=parseInt,We="object"==(void 0===e?"undefined":i(e))&&e&&e.Object===Object&&e,Ve="object"==("undefined"==typeof self?"undefined":i(self))&&self&&self.Object===Object&&self,He=We||Ve||Function("return this")(),Je="object"==i(t)&&t&&!t.nodeType&&t,Ke=Je&&"object"==i(r)&&r&&!r.nodeType&&r,Ge=Ke&&Ke.exports===Je,Ze=Ge&&We.process,Xe=function(){try{return Ke&&Ke.require&&Ke.require("util").types||Ze&&Ze.binding&&Ze.binding("util")}catch(e){}}(),Ye=Xe&&Xe.isArrayBuffer,Qe=Xe&&Xe.isDate,et=Xe&&Xe.isMap,tt=Xe&&Xe.isRegExp,nt=Xe&&Xe.isSet,rt=Xe&&Xe.isTypedArray;function ot(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function it(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function at(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function st(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ut(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ct(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function lt(e,t){return!(null==e||!e.length)&&wt(e,t,0)>-1}function ft(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function pt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function dt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function ht(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function vt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function gt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var yt=jt("length");function mt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function bt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function wt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):bt(e,xt,n)}function _t(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function xt(e){return e!=e}function St(e,t){var n=null==e?0:e.length;return n?Ot(e,t)/n:NaN}function jt(e){return function(t){return null==t?void 0:t[e]}}function Et(e){return function(t){return null==e?void 0:e[t]}}function kt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Ot(e,t){for(var n,r=-1,o=e.length;++r<o;){var i=t(e[r]);void 0!==i&&(n=void 0===n?i:n+i)}return n}function At(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ft(e){return function(t){return e(t)}}function It(e,t){return pt(t,(function(t){return e[t]}))}function Dt(e,t){return e.has(t)}function Pt(e,t){for(var n=-1,r=e.length;++n<r&&wt(t,e[n],0)>-1;);return n}function Nt(e,t){for(var n=e.length;n--&&wt(t,e[n],0)>-1;);return n}var Tt=Et({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ct=Et({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function $t(e){return"\\"+ze[e]}function Lt(e){return Ce.test(e)}function Rt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Ut(e,t){return function(n){return e(t(n))}}function Mt(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,i[o++]=n)}return i}function zt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Bt(e){return Lt(e)?function(e){for(var t=Ne.lastIndex=0;Ne.test(e);)++t;return t}(e):yt(e)}function qt(e){return Lt(e)?function(e){return e.match(Ne)||[]}(e):function(e){return e.split("")}(e)}var Wt=Et({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Vt=function e(t){var n,r=(t=null==t?He:Vt.defaults(He.Object(),t,Vt.pick(He,Le))).Array,o=t.Date,de=t.Error,he=t.Function,ve=t.Math,ge=t.Object,ye=t.RegExp,me=t.String,be=t.TypeError,we=r.prototype,_e=he.prototype,xe=ge.prototype,Se=t["__core-js_shared__"],je=_e.toString,Ee=xe.hasOwnProperty,ke=0,Oe=(n=/[^.]+$/.exec(Se&&Se.keys&&Se.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ae=xe.toString,Fe=je.call(ge),Ie=He._,Ne=ye("^"+je.call(Ee).replace(J,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ce=Ge?t.Buffer:void 0,ze=t.Symbol,We=t.Uint8Array,Ve=Ce?Ce.allocUnsafe:void 0,Je=Ut(ge.getPrototypeOf,ge),Ke=ge.create,Ze=xe.propertyIsEnumerable,Xe=we.splice,yt=ze?ze.isConcatSpreadable:void 0,Et=ze?ze.iterator:void 0,Ht=ze?ze.toStringTag:void 0,Jt=function(){try{var e=Yo(ge,"defineProperty");return e({},"",{}),e}catch(e){}}(),Kt=t.clearTimeout!==He.clearTimeout&&t.clearTimeout,Gt=o&&o.now!==He.Date.now&&o.now,Zt=t.setTimeout!==He.setTimeout&&t.setTimeout,Xt=ve.ceil,Yt=ve.floor,Qt=ge.getOwnPropertySymbols,en=Ce?Ce.isBuffer:void 0,tn=t.isFinite,nn=we.join,rn=Ut(ge.keys,ge),on=ve.max,an=ve.min,sn=o.now,un=t.parseInt,cn=ve.random,ln=we.reverse,fn=Yo(t,"DataView"),pn=Yo(t,"Map"),dn=Yo(t,"Promise"),hn=Yo(t,"Set"),vn=Yo(t,"WeakMap"),gn=Yo(ge,"create"),yn=vn&&new vn,mn={},bn=ji(fn),wn=ji(pn),_n=ji(dn),xn=ji(hn),Sn=ji(vn),jn=ze?ze.prototype:void 0,En=jn?jn.valueOf:void 0,kn=jn?jn.toString:void 0;function On(e){if(za(e)&&!Ia(e)&&!(e instanceof Dn)){if(e instanceof In)return e;if(Ee.call(e,"__wrapped__"))return Ei(e)}return new In(e)}var An=function(){function e(){}return function(t){if(!Ma(t))return{};if(Ke)return Ke(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Fn(){}function In(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Dn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Nn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Tn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Cn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Tn;++t<n;)this.add(e[t])}function $n(e){var t=this.__data__=new Nn(e);this.size=t.size}function Ln(e,t){var n=Ia(e),r=!n&&Fa(e),o=!n&&!r&&Ta(e),i=!n&&!r&&!o&&Ga(e),a=n||r||o||i,s=a?At(e.length,me):[],u=s.length;for(var c in e)!t&&!Ee.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ii(c,u))||s.push(c);return s}function Rn(e){var t=e.length;return t?e[Tr(0,t-1)]:void 0}function Un(e,t){return _i(go(e),Kn(t,0,e.length))}function Mn(e){return _i(go(e))}function zn(e,t,n){(void 0===n||ka(e[t],n))&&(void 0!==n||t in e)||Hn(e,t,n)}function Bn(e,t,n){var r=e[t];Ee.call(e,t)&&ka(r,n)&&(void 0!==n||t in e)||Hn(e,t,n)}function qn(e,t){for(var n=e.length;n--;)if(ka(e[n][0],t))return n;return-1}function Wn(e,t,n,r){return Qn(e,(function(e,o,i){t(r,e,n(e),i)})),r}function Vn(e,t){return e&&yo(t,ys(t),e)}function Hn(e,t,n){"__proto__"==t&&Jt?Jt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Jn(e,t){for(var n=-1,o=t.length,i=r(o),a=null==e;++n<o;)i[n]=a?void 0:ps(e,t[n]);return i}function Kn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Gn(e,t,n,r,o,i){var a,s=1&t,u=2&t,l=4&t;if(n&&(a=o?n(e,r,o,i):n(e)),void 0!==a)return a;if(!Ma(e))return e;var d=Ia(e);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ee.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return go(e,a)}else{var S=ti(e),T=S==h||S==v;if(Ta(e))return co(e,s);if(S==m||S==c||T&&!o){if(a=u||T?{}:ri(e),!s)return u?function(e,t){return yo(e,ei(e),t)}(e,function(e,t){return e&&yo(t,ms(t),e)}(a,e)):function(e,t){return yo(e,Qo(e),t)}(e,Vn(a,e))}else{if(!Me[S])return o?e:{};a=function(e,t,n){var r,o=e.constructor;switch(t){case j:return lo(e);case f:case p:return new o(+e);case E:return function(e,t){var n=t?lo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case k:case O:case A:case F:case I:case D:case"[object Uint8ClampedArray]":case P:case N:return fo(e,n);case g:return new o;case y:case _:return new o(e);case b:return function(e){var t=new e.constructor(e.source,oe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case w:return new o;case x:return r=e,En?ge(En.call(r)):{}}}(e,S,s)}}i||(i=new $n);var C=i.get(e);if(C)return C;i.set(e,a),Ha(e)?e.forEach((function(r){a.add(Gn(r,t,n,r,e,i))})):Ba(e)&&e.forEach((function(r,o){a.set(o,Gn(r,t,n,o,e,i))}));var $=d?void 0:(l?u?Vo:Wo:u?ms:ys)(e);return at($||e,(function(r,o){$&&(r=e[o=r]),Bn(a,o,Gn(r,t,n,o,e,i))})),a}function Zn(e,t,n){var r=n.length;if(null==e)return!r;for(e=ge(e);r--;){var o=n[r],i=t[o],a=e[o];if(void 0===a&&!(o in e)||!i(a))return!1}return!0}function Xn(e,t,n){if("function"!=typeof e)throw new be(a);return yi((function(){e.apply(void 0,n)}),t)}function Yn(e,t,n,r){var o=-1,i=lt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=pt(t,Ft(n))),r?(i=ft,a=!1):t.length>=200&&(i=Dt,a=!1,t=new Cn(t));e:for(;++o<s;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else i(t,f,r)||u.push(l)}return u}On.templateSettings={escape:z,evaluate:B,interpolate:q,variable:"",imports:{_:On}},On.prototype=Fn.prototype,On.prototype.constructor=On,In.prototype=An(Fn.prototype),In.prototype.constructor=In,Dn.prototype=An(Fn.prototype),Dn.prototype.constructor=Dn,Pn.prototype.clear=function(){this.__data__=gn?gn(null):{},this.size=0},Pn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Pn.prototype.get=function(e){var t=this.__data__;if(gn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ee.call(t,e)?t[e]:void 0},Pn.prototype.has=function(e){var t=this.__data__;return gn?void 0!==t[e]:Ee.call(t,e)},Pn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gn&&void 0===t?"__lodash_hash_undefined__":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(e){var t=this.__data__,n=qn(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Nn.prototype.get=function(e){var t=this.__data__,n=qn(t,e);return n<0?void 0:t[n][1]},Nn.prototype.has=function(e){return qn(this.__data__,e)>-1},Nn.prototype.set=function(e,t){var n=this.__data__,r=qn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Tn.prototype.clear=function(){this.size=0,this.__data__={hash:new Pn,map:new(pn||Nn),string:new Pn}},Tn.prototype.delete=function(e){var t=Zo(this,e).delete(e);return this.size-=t?1:0,t},Tn.prototype.get=function(e){return Zo(this,e).get(e)},Tn.prototype.has=function(e){return Zo(this,e).has(e)},Tn.prototype.set=function(e,t){var n=Zo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Cn.prototype.add=Cn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Cn.prototype.has=function(e){return this.__data__.has(e)},$n.prototype.clear=function(){this.__data__=new Nn,this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},$n.prototype.get=function(e){return this.__data__.get(e)},$n.prototype.has=function(e){return this.__data__.has(e)},$n.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Nn){var r=n.__data__;if(!pn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Tn(r)}return n.set(e,t),this.size=n.size,this};var Qn=wo(sr),er=wo(ur,!0);function tr(e,t){var n=!0;return Qn(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function nr(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],a=t(i);if(null!=a&&(void 0===s?a==a&&!Ka(a):n(a,s)))var s=a,u=i}return u}function rr(e,t){var n=[];return Qn(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function or(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=oi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?or(s,t-1,n,r,o):dt(o,s):r||(o[o.length]=s)}return o}var ir=_o(),ar=_o(!0);function sr(e,t){return e&&ir(e,t,ys)}function ur(e,t){return e&&ar(e,t,ys)}function cr(e,t){return ct(t,(function(t){return La(e[t])}))}function lr(e,t){for(var n=0,r=(t=io(t,e)).length;null!=e&&n<r;)e=e[Si(t[n++])];return n&&n==r?e:void 0}function fr(e,t,n){var r=t(e);return Ia(e)?r:dt(r,n(e))}function pr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ht&&Ht in ge(e)?function(e){var t=Ee.call(e,Ht),n=e[Ht];try{e[Ht]=void 0;var r=!0}catch(e){}var o=Ae.call(e);return r&&(t?e[Ht]=n:delete e[Ht]),o}(e):function(e){return Ae.call(e)}(e)}function dr(e,t){return e>t}function hr(e,t){return null!=e&&Ee.call(e,t)}function vr(e,t){return null!=e&&t in ge(e)}function gr(e,t,n){for(var o=n?ft:lt,i=e[0].length,a=e.length,s=a,u=r(a),c=1/0,l=[];s--;){var f=e[s];s&&t&&(f=pt(f,Ft(t))),c=an(f.length,c),u[s]=!n&&(t||i>=120&&f.length>=120)?new Cn(s&&f):void 0}f=e[0];var p=-1,d=u[0];e:for(;++p<i&&l.length<c;){var h=f[p],v=t?t(h):h;if(h=n||0!==h?h:0,!(d?Dt(d,v):o(l,v,n))){for(s=a;--s;){var g=u[s];if(!(g?Dt(g,v):o(e[s],v,n)))continue e}d&&d.push(v),l.push(h)}}return l}function yr(e,t,n){var r=null==(e=hi(e,t=io(t,e)))?e:e[Si($i(t))];return null==r?void 0:ot(r,e,n)}function mr(e){return za(e)&&pr(e)==c}function br(e,t,n,r,o){return e===t||(null==e||null==t||!za(e)&&!za(t)?e!=e&&t!=t:function(e,t,n,r,o,i){var a=Ia(e),s=Ia(t),u=a?l:ti(e),h=s?l:ti(t),v=(u=u==c?m:u)==m,S=(h=h==c?m:h)==m,k=u==h;if(k&&Ta(e)){if(!Ta(t))return!1;a=!0,v=!1}if(k&&!v)return i||(i=new $n),a||Ga(e)?Bo(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case j:return!(e.byteLength!=t.byteLength||!i(new We(e),new We(t)));case f:case p:case y:return ka(+e,+t);case d:return e.name==t.name&&e.message==t.message;case b:case _:return e==t+"";case g:var s=Rt;case w:var u=1&r;if(s||(s=zt),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=Bo(s(e),s(t),r,o,i,a);return a.delete(e),l;case x:if(En)return En.call(e)==En.call(t)}return!1}(e,t,u,n,r,o,i);if(!(1&n)){var O=v&&Ee.call(e,"__wrapped__"),A=S&&Ee.call(t,"__wrapped__");if(O||A){var F=O?e.value():e,I=A?t.value():t;return i||(i=new $n),o(F,I,n,r,i)}}return!!k&&(i||(i=new $n),function(e,t,n,r,o,i){var a=1&n,s=Wo(e),u=s.length;if(u!=Wo(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:Ee.call(t,l)))return!1}var f=i.get(e);if(f&&i.get(t))return f==t;var p=!0;i.set(e,t),i.set(t,e);for(var d=a;++c<u;){var h=e[l=s[c]],v=t[l];if(r)var g=a?r(v,h,l,t,e,i):r(h,v,l,e,t,i);if(!(void 0===g?h===v||o(h,v,n,r,i):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var y=e.constructor,m=t.constructor;y!=m&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m)&&(p=!1)}return i.delete(e),i.delete(t),p}(e,t,n,r,o,i))}(e,t,n,r,br,o))}function wr(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=ge(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var u=(s=n[o])[0],c=e[u],l=s[1];if(a&&s[2]){if(void 0===c&&!(u in e))return!1}else{var f=new $n;if(r)var p=r(c,l,u,e,t,f);if(!(void 0===p?br(l,c,3,r,f):p))return!1}}return!0}function _r(e){return!(!Ma(e)||(t=e,Oe&&Oe in t))&&(La(e)?Ne:se).test(ji(e));var t}function xr(e){return"function"==typeof e?e:null==e?qs:"object"==i(e)?Ia(e)?Or(e[0],e[1]):kr(e):Ys(e)}function Sr(e){if(!li(e))return rn(e);var t=[];for(var n in ge(e))Ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(e,t){return e<t}function Er(e,t){var n=-1,o=Pa(e)?r(e.length):[];return Qn(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function kr(e){var t=Xo(e);return 1==t.length&&t[0][2]?pi(t[0][0],t[0][1]):function(n){return n===e||wr(n,e,t)}}function Or(e,t){return si(e)&&fi(t)?pi(Si(e),t):function(n){var r=ps(n,e);return void 0===r&&r===t?ds(n,e):br(t,r,3)}}function Ar(e,t,n,r,o){e!==t&&ir(t,(function(i,a){if(o||(o=new $n),Ma(i))!function(e,t,n,r,o,i,a){var s=vi(e,n),u=vi(t,n),c=a.get(u);if(c)zn(e,n,c);else{var l=i?i(s,u,n+"",e,t,a):void 0,f=void 0===l;if(f){var p=Ia(u),d=!p&&Ta(u),h=!p&&!d&&Ga(u);l=u,p||d||h?Ia(s)?l=s:Na(s)?l=go(s):d?(f=!1,l=co(u,!0)):h?(f=!1,l=fo(u,!0)):l=[]:Wa(u)||Fa(u)?(l=s,Fa(s)?l=rs(s):Ma(s)&&!La(s)||(l=ri(u))):f=!1}f&&(a.set(u,l),o(l,u,r,i,a),a.delete(u)),zn(e,n,l)}}(e,t,a,n,Ar,r,o);else{var s=r?r(vi(e,a),i,a+"",e,t,o):void 0;void 0===s&&(s=i),zn(e,a,s)}}),ms)}function Fr(e,t){var n=e.length;if(n)return ii(t+=t<0?n:0,n)?e[t]:void 0}function Ir(e,t,n){var r=-1;return t=pt(t.length?t:[qs],Ft(Go())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Er(e,(function(e,n,o){return{criteria:pt(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var u=po(o[r],i[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Dr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=lr(e,a);n(s,a)&&Ur(i,io(a,e),s)}return i}function Pr(e,t,n,r){var o=r?_t:wt,i=-1,a=t.length,s=e;for(e===t&&(t=go(t)),n&&(s=pt(e,Ft(n)));++i<a;)for(var u=0,c=t[i],l=n?n(c):c;(u=o(s,l,u,r))>-1;)s!==e&&Xe.call(s,u,1),Xe.call(e,u,1);return e}function Nr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;ii(o)?Xe.call(e,o,1):Xr(e,o)}}return e}function Tr(e,t){return e+Yt(cn()*(t-e+1))}function Cr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Yt(t/2))&&(e+=e)}while(t);return n}function $r(e,t){return mi(di(e,t,qs),e+"")}function Lr(e){return Rn(ks(e))}function Rr(e,t){var n=ks(e);return _i(n,Kn(t,0,n.length))}function Ur(e,t,n,r){if(!Ma(e))return e;for(var o=-1,i=(t=io(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var u=Si(t[o]),c=n;if(o!=a){var l=s[u];void 0===(c=r?r(l,u,s):void 0)&&(c=Ma(l)?l:ii(t[o+1])?[]:{})}Bn(s,u,c),s=s[u]}return e}var Mr=yn?function(e,t){return yn.set(e,t),e}:qs,zr=Jt?function(e,t){return Jt(e,"toString",{configurable:!0,enumerable:!1,value:Ms(t),writable:!0})}:qs;function Br(e){return _i(ks(e))}function qr(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function Wr(e,t){var n;return Qn(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function Vr(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!Ka(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return Hr(e,t,qs,n)}function Hr(e,t,n,r){t=n(t);for(var o=0,i=null==e?0:e.length,a=t!=t,s=null===t,u=Ka(t),c=void 0===t;o<i;){var l=Yt((o+i)/2),f=n(e[l]),p=void 0!==f,d=null===f,h=f==f,v=Ka(f);if(a)var g=r||h;else g=c?h&&(r||p):s?h&&p&&(r||!d):u?h&&p&&!d&&(r||!v):!d&&!v&&(r?f<=t:f<t);g?o=l+1:i=l}return an(i,4294967294)}function Jr(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!ka(s,u)){var u=s;i[o++]=0===a?0:a}}return i}function Kr(e){return"number"==typeof e?e:Ka(e)?NaN:+e}function Gr(e){if("string"==typeof e)return e;if(Ia(e))return pt(e,Gr)+"";if(Ka(e))return kn?kn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Zr(e,t,n){var r=-1,o=lt,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=ft;else if(i>=200){var c=t?null:$o(e);if(c)return zt(c);a=!1,o=Dt,u=new Cn}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function Xr(e,t){return null==(e=hi(e,t=io(t,e)))||delete e[Si($i(t))]}function Yr(e,t,n,r){return Ur(e,t,n(lr(e,t)),r)}function Qr(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?qr(e,r?0:i,r?i+1:o):qr(e,r?i+1:0,r?o:i)}function eo(e,t){var n=e;return n instanceof Dn&&(n=n.value()),ht(t,(function(e,t){return t.func.apply(t.thisArg,dt([e],t.args))}),n)}function to(e,t,n){var o=e.length;if(o<2)return o?Zr(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var s=e[i],u=-1;++u<o;)u!=i&&(a[i]=Yn(a[i]||s,e[u],t,n));return Zr(or(a,1),t,n)}function no(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;){var s=r<i?t[r]:void 0;n(a,e[r],s)}return a}function ro(e){return Na(e)?e:[]}function oo(e){return"function"==typeof e?e:qs}function io(e,t){return Ia(e)?e:si(e,t)?[e]:xi(os(e))}var ao=$r;function so(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:qr(e,t,n)}var uo=Kt||function(e){return He.clearTimeout(e)};function co(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function lo(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function fo(e,t){var n=t?lo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function po(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=Ka(e),a=void 0!==t,s=null===t,u=t==t,c=Ka(t);if(!s&&!c&&!i&&e>t||i&&a&&u&&!s&&!c||r&&a&&u||!n&&u||!o)return 1;if(!r&&!i&&!c&&e<t||c&&n&&o&&!r&&!i||s&&n&&o||!a&&o||!u)return-1}return 0}function ho(e,t,n,o){for(var i=-1,a=e.length,s=n.length,u=-1,c=t.length,l=on(a-s,0),f=r(c+l),p=!o;++u<c;)f[u]=t[u];for(;++i<s;)(p||i<a)&&(f[n[i]]=e[i]);for(;l--;)f[u++]=e[i++];return f}function vo(e,t,n,o){for(var i=-1,a=e.length,s=-1,u=n.length,c=-1,l=t.length,f=on(a-u,0),p=r(f+l),d=!o;++i<f;)p[i]=e[i];for(var h=i;++c<l;)p[h+c]=t[c];for(;++s<u;)(d||i<a)&&(p[h+n[s]]=e[i++]);return p}function go(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function yo(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],u=r?r(n[s],e[s],s,n,e):void 0;void 0===u&&(u=e[s]),o?Hn(n,s,u):Bn(n,s,u)}return n}function mo(e,t){return function(n,r){var o=Ia(n)?it:Wn,i=t?t():{};return o(n,e,Go(r,2),i)}}function bo(e){return $r((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&ai(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=ge(t);++r<o;){var s=n[r];s&&e(t,s,r,i)}return t}))}function wo(e,t){return function(n,r){if(null==n)return n;if(!Pa(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=ge(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function _o(e){return function(t,n,r){for(var o=-1,i=ge(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}function xo(e){return function(t){var n=Lt(t=os(t))?qt(t):void 0,r=n?n[0]:t.charAt(0),o=n?so(n,1).join(""):t.slice(1);return r[e]()+o}}function So(e){return function(t){return ht(Ls(Fs(t).replace(De,"")),e,"")}}function jo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=An(e.prototype),r=e.apply(n,t);return Ma(r)?r:n}}function Eo(e){return function(t,n,r){var o=ge(t);if(!Pa(t)){var i=Go(n,3);t=ys(t),n=function(e){return i(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[i?t[a]:a]:void 0}}function ko(e){return qo((function(t){var n=t.length,r=n,o=In.prototype.thru;for(e&&t.reverse();r--;){var i=t[r];if("function"!=typeof i)throw new be(a);if(o&&!s&&"wrapper"==Jo(i))var s=new In([],!0)}for(r=s?r:n;++r<n;){var u=Jo(i=t[r]),c="wrapper"==u?Ho(i):void 0;s=c&&ui(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?s[Jo(c[0])].apply(s,c[3]):1==i.length&&ui(i)?s[u]():s.thru(i)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&Ia(r))return s.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function Oo(e,t,n,o,i,a,s,u,c,l){var f=128&t,p=1&t,d=2&t,h=24&t,v=512&t,g=d?void 0:jo(e);return function y(){for(var m=arguments.length,b=r(m),w=m;w--;)b[w]=arguments[w];if(h)var _=Ko(y),x=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,_);if(o&&(b=ho(b,o,i,h)),a&&(b=vo(b,a,s,h)),m-=x,h&&m<l){var S=Mt(b,_);return To(e,t,Oo,y.placeholder,n,b,S,u,c,l-m)}var j=p?n:this,E=d?j[e]:e;return m=b.length,u?b=function(e,t){for(var n=e.length,r=an(t.length,n),o=go(e);r--;){var i=t[r];e[r]=ii(i,n)?o[i]:void 0}return e}(b,u):v&&m>1&&b.reverse(),f&&c<m&&(b.length=c),this&&this!==He&&this instanceof y&&(E=g||jo(E)),E.apply(j,b)}}function Ao(e,t){return function(n,r){return function(e,t,n,r){return sr(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Fo(e,t){return function(n,r){var o;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(o=n),void 0!==r){if(void 0===o)return r;"string"==typeof n||"string"==typeof r?(n=Gr(n),r=Gr(r)):(n=Kr(n),r=Kr(r)),o=e(n,r)}return o}}function Io(e){return qo((function(t){return t=pt(t,Ft(Go())),$r((function(n){var r=this;return e(t,(function(e){return ot(e,r,n)}))}))}))}function Do(e,t){var n=(t=void 0===t?" ":Gr(t)).length;if(n<2)return n?Cr(t,e):t;var r=Cr(t,Xt(e/Bt(t)));return Lt(t)?so(qt(r),0,e).join(""):r.slice(0,e)}function Po(e){return function(t,n,o){return o&&"number"!=typeof o&&ai(t,n,o)&&(n=o=void 0),t=Qa(t),void 0===n?(n=t,t=0):n=Qa(n),function(e,t,n,o){for(var i=-1,a=on(Xt((t-e)/(n||1)),0),s=r(a);a--;)s[o?a:++i]=e,e+=n;return s}(t,n,o=void 0===o?t<n?1:-1:Qa(o),e)}}function No(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ns(t),n=ns(n)),e(t,n)}}function To(e,t,n,r,o,i,a,s,u,c){var l=8&t;t|=l?32:64,4&(t&=~(l?64:32))||(t&=-4);var f=[e,t,o,l?i:void 0,l?a:void 0,l?void 0:i,l?void 0:a,s,u,c],p=n.apply(void 0,f);return ui(e)&&gi(p,f),p.placeholder=r,bi(p,e,t)}function Co(e){var t=ve[e];return function(e,n){if(e=ns(e),(n=null==n?0:an(es(n),292))&&tn(e)){var r=(os(e)+"e").split("e");return+((r=(os(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var $o=hn&&1/zt(new hn([,-0]))[1]==1/0?function(e){return new hn(e)}:Ks;function Lo(e){return function(t){var n=ti(t);return n==g?Rt(t):n==w?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return pt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ro(e,t,n,o,i,u,c,l){var f=2&t;if(!f&&"function"!=typeof e)throw new be(a);var p=o?o.length:0;if(p||(t&=-97,o=i=void 0),c=void 0===c?c:on(es(c),0),l=void 0===l?l:es(l),p-=i?i.length:0,64&t){var d=o,h=i;o=i=void 0}var v=f?void 0:Ho(e),g=[e,t,n,o,i,d,h,u,c,l];if(v&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?ho(c,u,t[4]):u,e[4]=c?Mt(e[3],s):t[4]}(u=t[5])&&(c=e[5],e[5]=c?vo(c,u,t[6]):u,e[6]=c?Mt(e[5],s):t[6]),(u=t[7])&&(e[7]=u),128&r&&(e[8]=null==e[8]?t[8]:an(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(g,v),e=g[0],t=g[1],n=g[2],o=g[3],i=g[4],!(l=g[9]=void 0===g[9]?f?0:e.length:on(g[9]-p,0))&&24&t&&(t&=-25),t&&1!=t)y=8==t||16==t?function(e,t,n){var o=jo(e);return function i(){for(var a=arguments.length,s=r(a),u=a,c=Ko(i);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:Mt(s,c);return(a-=l.length)<n?To(e,t,Oo,i.placeholder,void 0,s,l,void 0,void 0,n-a):ot(this&&this!==He&&this instanceof i?o:e,this,s)}}(e,t,l):32!=t&&33!=t||i.length?Oo.apply(void 0,g):function(e,t,n,o){var i=1&t,a=jo(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=o.length,f=r(l+u),p=this&&this!==He&&this instanceof t?a:e;++c<l;)f[c]=o[c];for(;u--;)f[c++]=arguments[++s];return ot(p,i?n:this,f)}}(e,t,n,o);else var y=function(e,t,n){var r=1&t,o=jo(e);return function t(){return(this&&this!==He&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return bi((v?Mr:gi)(y,g),e,t)}function Uo(e,t,n,r){return void 0===e||ka(e,xe[n])&&!Ee.call(r,n)?t:e}function Mo(e,t,n,r,o,i){return Ma(e)&&Ma(t)&&(i.set(t,e),Ar(e,t,void 0,Mo,i),i.delete(t)),e}function zo(e){return Wa(e)?void 0:e}function Bo(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e);if(c&&i.get(t))return c==t;var l=-1,f=!0,p=2&n?new Cn:void 0;for(i.set(e,t),i.set(t,e);++l<s;){var d=e[l],h=t[l];if(r)var v=a?r(h,d,l,t,e,i):r(d,h,l,e,t,i);if(void 0!==v){if(v)continue;f=!1;break}if(p){if(!gt(t,(function(e,t){if(!Dt(p,t)&&(d===e||o(d,e,n,r,i)))return p.push(t)}))){f=!1;break}}else if(d!==h&&!o(d,h,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f}function qo(e){return mi(di(e,void 0,Di),e+"")}function Wo(e){return fr(e,ys,Qo)}function Vo(e){return fr(e,ms,ei)}var Ho=yn?function(e){return yn.get(e)}:Ks;function Jo(e){for(var t=e.name+"",n=mn[t],r=Ee.call(mn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function Ko(e){return(Ee.call(On,"placeholder")?On:e).placeholder}function Go(){var e=On.iteratee||Ws;return e=e===Ws?xr:e,arguments.length?e(arguments[0],arguments[1]):e}function Zo(e,t){var n,r,o=e.__data__;return("string"==(r=i(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Xo(e){for(var t=ys(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,fi(o)]}return t}function Yo(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return _r(n)?n:void 0}var Qo=Qt?function(e){return null==e?[]:(e=ge(e),ct(Qt(e),(function(t){return Ze.call(e,t)})))}:tu,ei=Qt?function(e){for(var t=[];e;)dt(t,Qo(e)),e=Je(e);return t}:tu,ti=pr;function ni(e,t,n){for(var r=-1,o=(t=io(t,e)).length,i=!1;++r<o;){var a=Si(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Ua(o)&&ii(a,o)&&(Ia(e)||Fa(e))}function ri(e){return"function"!=typeof e.constructor||li(e)?{}:An(Je(e))}function oi(e){return Ia(e)||Fa(e)||!!(yt&&e&&e[yt])}function ii(e,t){var n=i(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ce.test(e))&&e>-1&&e%1==0&&e<t}function ai(e,t,n){if(!Ma(n))return!1;var r=i(t);return!!("number"==r?Pa(n)&&ii(t,n.length):"string"==r&&t in n)&&ka(n[t],e)}function si(e,t){if(Ia(e))return!1;var n=i(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ka(e))||V.test(e)||!W.test(e)||null!=t&&e in ge(t)}function ui(e){var t=Jo(e),n=On[t];if("function"!=typeof n||!(t in Dn.prototype))return!1;if(e===n)return!0;var r=Ho(n);return!!r&&e===r[0]}(fn&&ti(new fn(new ArrayBuffer(1)))!=E||pn&&ti(new pn)!=g||dn&&"[object Promise]"!=ti(dn.resolve())||hn&&ti(new hn)!=w||vn&&ti(new vn)!=S)&&(ti=function(e){var t=pr(e),n=t==m?e.constructor:void 0,r=n?ji(n):"";if(r)switch(r){case bn:return E;case wn:return g;case _n:return"[object Promise]";case xn:return w;case Sn:return S}return t});var ci=Se?La:nu;function li(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xe)}function fi(e){return e==e&&!Ma(e)}function pi(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in ge(n))}}function di(e,t,n){return t=on(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=on(o.length-t,0),s=r(a);++i<a;)s[i]=o[t+i];i=-1;for(var u=r(t+1);++i<t;)u[i]=o[i];return u[t]=n(s),ot(e,this,u)}}function hi(e,t){return t.length<2?e:lr(e,qr(t,0,-1))}function vi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var gi=wi(Mr),yi=Zt||function(e,t){return He.setTimeout(e,t)},mi=wi(zr);function bi(e,t,n){var r=t+"";return mi(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Y,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return at(u,(function(n){var r="_."+n[0];t&n[1]&&!lt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(Q);return t?t[1].split(ee):[]}(r),n)))}function wi(e){var t=0,n=0;return function(){var r=sn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function _i(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n<t;){var i=Tr(n,o),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}var xi=function(e){var t=wa((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(H,(function(e,n,r,o){t.push(r?o.replace(ne,"$1"):n||e)})),t}),(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}();function Si(e){if("string"==typeof e||Ka(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ji(e){if(null!=e){try{return je.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ei(e){if(e instanceof Dn)return e.clone();var t=new In(e.__wrapped__,e.__chain__);return t.__actions__=go(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var ki=$r((function(e,t){return Na(e)?Yn(e,or(t,1,Na,!0)):[]})),Oi=$r((function(e,t){var n=$i(t);return Na(n)&&(n=void 0),Na(e)?Yn(e,or(t,1,Na,!0),Go(n,2)):[]})),Ai=$r((function(e,t){var n=$i(t);return Na(n)&&(n=void 0),Na(e)?Yn(e,or(t,1,Na,!0),void 0,n):[]}));function Fi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:es(n);return o<0&&(o=on(r+o,0)),bt(e,Go(t,3),o)}function Ii(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return void 0!==n&&(o=es(n),o=n<0?on(r+o,0):an(o,r-1)),bt(e,Go(t,3),o,!0)}function Di(e){return null!=e&&e.length?or(e,1):[]}function Pi(e){return e&&e.length?e[0]:void 0}var Ni=$r((function(e){var t=pt(e,ro);return t.length&&t[0]===e[0]?gr(t):[]})),Ti=$r((function(e){var t=$i(e),n=pt(e,ro);return t===$i(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?gr(n,Go(t,2)):[]})),Ci=$r((function(e){var t=$i(e),n=pt(e,ro);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?gr(n,void 0,t):[]}));function $i(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Li=$r(Ri);function Ri(e,t){return e&&e.length&&t&&t.length?Pr(e,t):e}var Ui=qo((function(e,t){var n=null==e?0:e.length,r=Jn(e,t);return Nr(e,pt(t,(function(e){return ii(e,n)?+e:e})).sort(po)),r}));function Mi(e){return null==e?e:ln.call(e)}var zi=$r((function(e){return Zr(or(e,1,Na,!0))})),Bi=$r((function(e){var t=$i(e);return Na(t)&&(t=void 0),Zr(or(e,1,Na,!0),Go(t,2))})),qi=$r((function(e){var t=$i(e);return t="function"==typeof t?t:void 0,Zr(or(e,1,Na,!0),void 0,t)}));function Wi(e){if(!e||!e.length)return[];var t=0;return e=ct(e,(function(e){if(Na(e))return t=on(e.length,t),!0})),At(t,(function(t){return pt(e,jt(t))}))}function Vi(e,t){if(!e||!e.length)return[];var n=Wi(e);return null==t?n:pt(n,(function(e){return ot(t,void 0,e)}))}var Hi=$r((function(e,t){return Na(e)?Yn(e,t):[]})),Ji=$r((function(e){return to(ct(e,Na))})),Ki=$r((function(e){var t=$i(e);return Na(t)&&(t=void 0),to(ct(e,Na),Go(t,2))})),Gi=$r((function(e){var t=$i(e);return t="function"==typeof t?t:void 0,to(ct(e,Na),void 0,t)})),Zi=$r(Wi),Xi=$r((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Vi(e,n)}));function Yi(e){var t=On(e);return t.__chain__=!0,t}function Qi(e,t){return t(e)}var ea=qo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Jn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Dn&&ii(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:Qi,args:[o],thisArg:void 0}),new In(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(o)})),ta=mo((function(e,t,n){Ee.call(e,n)?++e[n]:Hn(e,n,1)})),na=Eo(Fi),ra=Eo(Ii);function oa(e,t){return(Ia(e)?at:Qn)(e,Go(t,3))}function ia(e,t){return(Ia(e)?st:er)(e,Go(t,3))}var aa=mo((function(e,t,n){Ee.call(e,n)?e[n].push(t):Hn(e,n,[t])})),sa=$r((function(e,t,n){var o=-1,i="function"==typeof t,a=Pa(e)?r(e.length):[];return Qn(e,(function(e){a[++o]=i?ot(t,e,n):yr(e,t,n)})),a})),ua=mo((function(e,t,n){Hn(e,n,t)}));function ca(e,t){return(Ia(e)?pt:Er)(e,Go(t,3))}var la=mo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),fa=$r((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ai(e,t[0],t[1])?t=[]:n>2&&ai(t[0],t[1],t[2])&&(t=[t[0]]),Ir(e,or(t,1),[])})),pa=Gt||function(){return He.Date.now()};function da(e,t,n){return t=n?void 0:t,Ro(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function ha(e,t){var n;if("function"!=typeof t)throw new be(a);return e=es(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var va=$r((function(e,t,n){var r=1;if(n.length){var o=Mt(n,Ko(va));r|=32}return Ro(e,r,t,n,o)})),ga=$r((function(e,t,n){var r=3;if(n.length){var o=Mt(n,Ko(ga));r|=32}return Ro(t,r,e,n,o)}));function ya(e,t,n){var r,o,i,s,u,c,l=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new be(a);function h(t){var n=r,i=o;return r=o=void 0,l=t,s=e.apply(i,n)}function v(e){var n=e-c;return void 0===c||n>=t||n<0||p&&e-l>=i}function g(){var e=pa();if(v(e))return y(e);u=yi(g,function(e){var n=t-(e-c);return p?an(n,i-(e-l)):n}(e))}function y(e){return u=void 0,d&&r?h(e):(r=o=void 0,s)}function m(){var e=pa(),n=v(e);if(r=arguments,o=this,c=e,n){if(void 0===u)return function(e){return l=e,u=yi(g,t),f?h(e):s}(c);if(p)return uo(u),u=yi(g,t),h(c)}return void 0===u&&(u=yi(g,t)),s}return t=ns(t)||0,Ma(n)&&(f=!!n.leading,i=(p="maxWait"in n)?on(ns(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d),m.cancel=function(){void 0!==u&&uo(u),l=0,r=c=o=u=void 0},m.flush=function(){return void 0===u?s:y(pa())},m}var ma=$r((function(e,t){return Xn(e,1,t)})),ba=$r((function(e,t,n){return Xn(e,ns(t)||0,n)}));function wa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new be(a);var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(wa.Cache||Tn),n}function _a(e){if("function"!=typeof e)throw new be(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}wa.Cache=Tn;var xa=ao((function(e,t){var n=(t=1==t.length&&Ia(t[0])?pt(t[0],Ft(Go())):pt(or(t,1),Ft(Go()))).length;return $r((function(r){for(var o=-1,i=an(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return ot(e,this,r)}))})),Sa=$r((function(e,t){return Ro(e,32,void 0,t,Mt(t,Ko(Sa)))})),ja=$r((function(e,t){return Ro(e,64,void 0,t,Mt(t,Ko(ja)))})),Ea=qo((function(e,t){return Ro(e,256,void 0,void 0,void 0,t)}));function ka(e,t){return e===t||e!=e&&t!=t}var Oa=No(dr),Aa=No((function(e,t){return e>=t})),Fa=mr(function(){return arguments}())?mr:function(e){return za(e)&&Ee.call(e,"callee")&&!Ze.call(e,"callee")},Ia=r.isArray,Da=Ye?Ft(Ye):function(e){return za(e)&&pr(e)==j};function Pa(e){return null!=e&&Ua(e.length)&&!La(e)}function Na(e){return za(e)&&Pa(e)}var Ta=en||nu,Ca=Qe?Ft(Qe):function(e){return za(e)&&pr(e)==p};function $a(e){if(!za(e))return!1;var t=pr(e);return t==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Wa(e)}function La(e){if(!Ma(e))return!1;var t=pr(e);return t==h||t==v||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ra(e){return"number"==typeof e&&e==es(e)}function Ua(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ma(e){var t=i(e);return null!=e&&("object"==t||"function"==t)}function za(e){return null!=e&&"object"==i(e)}var Ba=et?Ft(et):function(e){return za(e)&&ti(e)==g};function qa(e){return"number"==typeof e||za(e)&&pr(e)==y}function Wa(e){if(!za(e)||pr(e)!=m)return!1;var t=Je(e);if(null===t)return!0;var n=Ee.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&je.call(n)==Fe}var Va=tt?Ft(tt):function(e){return za(e)&&pr(e)==b},Ha=nt?Ft(nt):function(e){return za(e)&&ti(e)==w};function Ja(e){return"string"==typeof e||!Ia(e)&&za(e)&&pr(e)==_}function Ka(e){return"symbol"==i(e)||za(e)&&pr(e)==x}var Ga=rt?Ft(rt):function(e){return za(e)&&Ua(e.length)&&!!Ue[pr(e)]},Za=No(jr),Xa=No((function(e,t){return e<=t}));function Ya(e){if(!e)return[];if(Pa(e))return Ja(e)?qt(e):go(e);if(Et&&e[Et])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Et]());var t=ti(e);return(t==g?Rt:t==w?zt:ks)(e)}function Qa(e){return e?(e=ns(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function es(e){var t=Qa(e),n=t%1;return t==t?n?t-n:t:0}function ts(e){return e?Kn(es(e),0,4294967295):0}function ns(e){if("number"==typeof e)return e;if(Ka(e))return NaN;if(Ma(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ma(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(G,"");var n=ae.test(e);return n||ue.test(e)?qe(e.slice(2),n?2:8):ie.test(e)?NaN:+e}function rs(e){return yo(e,ms(e))}function os(e){return null==e?"":Gr(e)}var is=bo((function(e,t){if(li(t)||Pa(t))yo(t,ys(t),e);else for(var n in t)Ee.call(t,n)&&Bn(e,n,t[n])})),as=bo((function(e,t){yo(t,ms(t),e)})),ss=bo((function(e,t,n,r){yo(t,ms(t),e,r)})),us=bo((function(e,t,n,r){yo(t,ys(t),e,r)})),cs=qo(Jn),ls=$r((function(e,t){e=ge(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&ai(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],a=ms(i),s=-1,u=a.length;++s<u;){var c=a[s],l=e[c];(void 0===l||ka(l,xe[c])&&!Ee.call(e,c))&&(e[c]=i[c])}return e})),fs=$r((function(e){return e.push(void 0,Mo),ot(ws,void 0,e)}));function ps(e,t,n){var r=null==e?void 0:lr(e,t);return void 0===r?n:r}function ds(e,t){return null!=e&&ni(e,t,vr)}var hs=Ao((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ae.call(t)),e[t]=n}),Ms(qs)),vs=Ao((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ae.call(t)),Ee.call(e,t)?e[t].push(n):e[t]=[n]}),Go),gs=$r(yr);function ys(e){return Pa(e)?Ln(e):Sr(e)}function ms(e){return Pa(e)?Ln(e,!0):function(e){if(!Ma(e))return function(e){var t=[];if(null!=e)for(var n in ge(e))t.push(n);return t}(e);var t=li(e),n=[];for(var r in e)("constructor"!=r||!t&&Ee.call(e,r))&&n.push(r);return n}(e)}var bs=bo((function(e,t,n){Ar(e,t,n)})),ws=bo((function(e,t,n,r){Ar(e,t,n,r)})),_s=qo((function(e,t){var n={};if(null==e)return n;var r=!1;t=pt(t,(function(t){return t=io(t,e),r||(r=t.length>1),t})),yo(e,Vo(e),n),r&&(n=Gn(n,7,zo));for(var o=t.length;o--;)Xr(n,t[o]);return n})),xs=qo((function(e,t){return null==e?{}:function(e,t){return Dr(e,t,(function(t,n){return ds(e,n)}))}(e,t)}));function Ss(e,t){if(null==e)return{};var n=pt(Vo(e),(function(e){return[e]}));return t=Go(t),Dr(e,n,(function(e,n){return t(e,n[0])}))}var js=Lo(ys),Es=Lo(ms);function ks(e){return null==e?[]:It(e,ys(e))}var Os=So((function(e,t,n){return t=t.toLowerCase(),e+(n?As(t):t)}));function As(e){return $s(os(e).toLowerCase())}function Fs(e){return(e=os(e))&&e.replace(le,Tt).replace(Pe,"")}var Is=So((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ds=So((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ps=xo("toLowerCase"),Ns=So((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ts=So((function(e,t,n){return e+(n?" ":"")+$s(t)})),Cs=So((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),$s=xo("toUpperCase");function Ls(e,t,n){return e=os(e),void 0===(t=n?void 0:t)?function(e){return $e.test(e)}(e)?function(e){return e.match(Te)||[]}(e):function(e){return e.match(te)||[]}(e):e.match(t)||[]}var Rs=$r((function(e,t){try{return ot(e,void 0,t)}catch(e){return $a(e)?e:new de(e)}})),Us=qo((function(e,t){return at(t,(function(t){t=Si(t),Hn(e,t,va(e[t],e))})),e}));function Ms(e){return function(){return e}}var zs=ko(),Bs=ko(!0);function qs(e){return e}function Ws(e){return xr("function"==typeof e?e:Gn(e,1))}var Vs=$r((function(e,t){return function(n){return yr(n,e,t)}})),Hs=$r((function(e,t){return function(n){return yr(e,n,t)}}));function Js(e,t,n){var r=ys(t),o=cr(t,r);null!=n||Ma(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=cr(t,ys(t)));var i=!(Ma(n)&&"chain"in n&&!n.chain),a=La(e);return at(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=go(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,dt([this.value()],arguments))})})),e}function Ks(){}var Gs=Io(pt),Zs=Io(ut),Xs=Io(gt);function Ys(e){return si(e)?jt(Si(e)):function(e){return function(t){return lr(t,e)}}(e)}var Qs=Po(),eu=Po(!0);function tu(){return[]}function nu(){return!1}var ru,ou=Fo((function(e,t){return e+t}),0),iu=Co("ceil"),au=Fo((function(e,t){return e/t}),1),su=Co("floor"),uu=Fo((function(e,t){return e*t}),1),cu=Co("round"),lu=Fo((function(e,t){return e-t}),0);return On.after=function(e,t){if("function"!=typeof t)throw new be(a);return e=es(e),function(){if(--e<1)return t.apply(this,arguments)}},On.ary=da,On.assign=is,On.assignIn=as,On.assignInWith=ss,On.assignWith=us,On.at=cs,On.before=ha,On.bind=va,On.bindAll=Us,On.bindKey=ga,On.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ia(e)?e:[e]},On.chain=Yi,On.chunk=function(e,t,n){t=(n?ai(e,t,n):void 0===t)?1:on(es(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=r(Xt(o/t));i<o;)s[a++]=qr(e,i,i+=t);return s},On.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},On.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return dt(Ia(n)?go(n):[n],or(t,1))},On.cond=function(e){var t=null==e?0:e.length,n=Go();return e=t?pt(e,(function(e){if("function"!=typeof e[1])throw new be(a);return[n(e[0]),e[1]]})):[],$r((function(n){for(var r=-1;++r<t;){var o=e[r];if(ot(o[0],this,n))return ot(o[1],this,n)}}))},On.conforms=function(e){return function(e){var t=ys(e);return function(n){return Zn(n,e,t)}}(Gn(e,1))},On.constant=Ms,On.countBy=ta,On.create=function(e,t){var n=An(e);return null==t?n:Vn(n,t)},On.curry=function e(t,n,r){var o=Ro(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=e.placeholder,o},On.curryRight=function e(t,n,r){var o=Ro(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=e.placeholder,o},On.debounce=ya,On.defaults=ls,On.defaultsDeep=fs,On.defer=ma,On.delay=ba,On.difference=ki,On.differenceBy=Oi,On.differenceWith=Ai,On.drop=function(e,t,n){var r=null==e?0:e.length;return r?qr(e,(t=n||void 0===t?1:es(t))<0?0:t,r):[]},On.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?qr(e,0,(t=r-(t=n||void 0===t?1:es(t)))<0?0:t):[]},On.dropRightWhile=function(e,t){return e&&e.length?Qr(e,Go(t,3),!0,!0):[]},On.dropWhile=function(e,t){return e&&e.length?Qr(e,Go(t,3),!0):[]},On.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&ai(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=es(n))<0&&(n=-n>o?0:o+n),(r=void 0===r||r>o?o:es(r))<0&&(r+=o),r=n>r?0:ts(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},On.filter=function(e,t){return(Ia(e)?ct:rr)(e,Go(t,3))},On.flatMap=function(e,t){return or(ca(e,t),1)},On.flatMapDeep=function(e,t){return or(ca(e,t),1/0)},On.flatMapDepth=function(e,t,n){return n=void 0===n?1:es(n),or(ca(e,t),n)},On.flatten=Di,On.flattenDeep=function(e){return null!=e&&e.length?or(e,1/0):[]},On.flattenDepth=function(e,t){return null!=e&&e.length?or(e,t=void 0===t?1:es(t)):[]},On.flip=function(e){return Ro(e,512)},On.flow=zs,On.flowRight=Bs,On.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},On.functions=function(e){return null==e?[]:cr(e,ys(e))},On.functionsIn=function(e){return null==e?[]:cr(e,ms(e))},On.groupBy=aa,On.initial=function(e){return null!=e&&e.length?qr(e,0,-1):[]},On.intersection=Ni,On.intersectionBy=Ti,On.intersectionWith=Ci,On.invert=hs,On.invertBy=vs,On.invokeMap=sa,On.iteratee=Ws,On.keyBy=ua,On.keys=ys,On.keysIn=ms,On.map=ca,On.mapKeys=function(e,t){var n={};return t=Go(t,3),sr(e,(function(e,r,o){Hn(n,t(e,r,o),e)})),n},On.mapValues=function(e,t){var n={};return t=Go(t,3),sr(e,(function(e,r,o){Hn(n,r,t(e,r,o))})),n},On.matches=function(e){return kr(Gn(e,1))},On.matchesProperty=function(e,t){return Or(e,Gn(t,1))},On.memoize=wa,On.merge=bs,On.mergeWith=ws,On.method=Vs,On.methodOf=Hs,On.mixin=Js,On.negate=_a,On.nthArg=function(e){return e=es(e),$r((function(t){return Fr(t,e)}))},On.omit=_s,On.omitBy=function(e,t){return Ss(e,_a(Go(t)))},On.once=function(e){return ha(2,e)},On.orderBy=function(e,t,n,r){return null==e?[]:(Ia(t)||(t=null==t?[]:[t]),Ia(n=r?void 0:n)||(n=null==n?[]:[n]),Ir(e,t,n))},On.over=Gs,On.overArgs=xa,On.overEvery=Zs,On.overSome=Xs,On.partial=Sa,On.partialRight=ja,On.partition=la,On.pick=xs,On.pickBy=Ss,On.property=Ys,On.propertyOf=function(e){return function(t){return null==e?void 0:lr(e,t)}},On.pull=Li,On.pullAll=Ri,On.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Pr(e,t,Go(n,2)):e},On.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Pr(e,t,void 0,n):e},On.pullAt=Ui,On.range=Qs,On.rangeRight=eu,On.rearg=Ea,On.reject=function(e,t){return(Ia(e)?ct:rr)(e,_a(Go(t,3)))},On.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Go(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Nr(e,o),n},On.rest=function(e,t){if("function"!=typeof e)throw new be(a);return $r(e,t=void 0===t?t:es(t))},On.reverse=Mi,On.sampleSize=function(e,t,n){return t=(n?ai(e,t,n):void 0===t)?1:es(t),(Ia(e)?Un:Rr)(e,t)},On.set=function(e,t,n){return null==e?e:Ur(e,t,n)},On.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Ur(e,t,n,r)},On.shuffle=function(e){return(Ia(e)?Mn:Br)(e)},On.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&ai(e,t,n)?(t=0,n=r):(t=null==t?0:es(t),n=void 0===n?r:es(n)),qr(e,t,n)):[]},On.sortBy=fa,On.sortedUniq=function(e){return e&&e.length?Jr(e):[]},On.sortedUniqBy=function(e,t){return e&&e.length?Jr(e,Go(t,2)):[]},On.split=function(e,t,n){return n&&"number"!=typeof n&&ai(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=os(e))&&("string"==typeof t||null!=t&&!Va(t))&&!(t=Gr(t))&&Lt(e)?so(qt(e),0,n):e.split(t,n):[]},On.spread=function(e,t){if("function"!=typeof e)throw new be(a);return t=null==t?0:on(es(t),0),$r((function(n){var r=n[t],o=so(n,0,t);return r&&dt(o,r),ot(e,this,o)}))},On.tail=function(e){var t=null==e?0:e.length;return t?qr(e,1,t):[]},On.take=function(e,t,n){return e&&e.length?qr(e,0,(t=n||void 0===t?1:es(t))<0?0:t):[]},On.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?qr(e,(t=r-(t=n||void 0===t?1:es(t)))<0?0:t,r):[]},On.takeRightWhile=function(e,t){return e&&e.length?Qr(e,Go(t,3),!1,!0):[]},On.takeWhile=function(e,t){return e&&e.length?Qr(e,Go(t,3)):[]},On.tap=function(e,t){return t(e),e},On.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new be(a);return Ma(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ya(e,t,{leading:r,maxWait:t,trailing:o})},On.thru=Qi,On.toArray=Ya,On.toPairs=js,On.toPairsIn=Es,On.toPath=function(e){return Ia(e)?pt(e,Si):Ka(e)?[e]:go(xi(os(e)))},On.toPlainObject=rs,On.transform=function(e,t,n){var r=Ia(e),o=r||Ta(e)||Ga(e);if(t=Go(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Ma(e)&&La(i)?An(Je(e)):{}}return(o?at:sr)(e,(function(e,r,o){return t(n,e,r,o)})),n},On.unary=function(e){return da(e,1)},On.union=zi,On.unionBy=Bi,On.unionWith=qi,On.uniq=function(e){return e&&e.length?Zr(e):[]},On.uniqBy=function(e,t){return e&&e.length?Zr(e,Go(t,2)):[]},On.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Zr(e,void 0,t):[]},On.unset=function(e,t){return null==e||Xr(e,t)},On.unzip=Wi,On.unzipWith=Vi,On.update=function(e,t,n){return null==e?e:Yr(e,t,oo(n))},On.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Yr(e,t,oo(n),r)},On.values=ks,On.valuesIn=function(e){return null==e?[]:It(e,ms(e))},On.without=Hi,On.words=Ls,On.wrap=function(e,t){return Sa(oo(t),e)},On.xor=Ji,On.xorBy=Ki,On.xorWith=Gi,On.zip=Zi,On.zipObject=function(e,t){return no(e||[],t||[],Bn)},On.zipObjectDeep=function(e,t){return no(e||[],t||[],Ur)},On.zipWith=Xi,On.entries=js,On.entriesIn=Es,On.extend=as,On.extendWith=ss,Js(On,On),On.add=ou,On.attempt=Rs,On.camelCase=Os,On.capitalize=As,On.ceil=iu,On.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=ns(n))==n?n:0),void 0!==t&&(t=(t=ns(t))==t?t:0),Kn(ns(e),t,n)},On.clone=function(e){return Gn(e,4)},On.cloneDeep=function(e){return Gn(e,5)},On.cloneDeepWith=function(e,t){return Gn(e,5,t="function"==typeof t?t:void 0)},On.cloneWith=function(e,t){return Gn(e,4,t="function"==typeof t?t:void 0)},On.conformsTo=function(e,t){return null==t||Zn(e,t,ys(t))},On.deburr=Fs,On.defaultTo=function(e,t){return null==e||e!=e?t:e},On.divide=au,On.endsWith=function(e,t,n){e=os(e),t=Gr(t);var r=e.length,o=n=void 0===n?r:Kn(es(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},On.eq=ka,On.escape=function(e){return(e=os(e))&&M.test(e)?e.replace(R,Ct):e},On.escapeRegExp=function(e){return(e=os(e))&&K.test(e)?e.replace(J,"\\$&"):e},On.every=function(e,t,n){var r=Ia(e)?ut:tr;return n&&ai(e,t,n)&&(t=void 0),r(e,Go(t,3))},On.find=na,On.findIndex=Fi,On.findKey=function(e,t){return mt(e,Go(t,3),sr)},On.findLast=ra,On.findLastIndex=Ii,On.findLastKey=function(e,t){return mt(e,Go(t,3),ur)},On.floor=su,On.forEach=oa,On.forEachRight=ia,On.forIn=function(e,t){return null==e?e:ir(e,Go(t,3),ms)},On.forInRight=function(e,t){return null==e?e:ar(e,Go(t,3),ms)},On.forOwn=function(e,t){return e&&sr(e,Go(t,3))},On.forOwnRight=function(e,t){return e&&ur(e,Go(t,3))},On.get=ps,On.gt=Oa,On.gte=Aa,On.has=function(e,t){return null!=e&&ni(e,t,hr)},On.hasIn=ds,On.head=Pi,On.identity=qs,On.includes=function(e,t,n,r){e=Pa(e)?e:ks(e),n=n&&!r?es(n):0;var o=e.length;return n<0&&(n=on(o+n,0)),Ja(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&wt(e,t,n)>-1},On.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:es(n);return o<0&&(o=on(r+o,0)),wt(e,t,o)},On.inRange=function(e,t,n){return t=Qa(t),void 0===n?(n=t,t=0):n=Qa(n),function(e,t,n){return e>=an(t,n)&&e<on(t,n)}(e=ns(e),t,n)},On.invoke=gs,On.isArguments=Fa,On.isArray=Ia,On.isArrayBuffer=Da,On.isArrayLike=Pa,On.isArrayLikeObject=Na,On.isBoolean=function(e){return!0===e||!1===e||za(e)&&pr(e)==f},On.isBuffer=Ta,On.isDate=Ca,On.isElement=function(e){return za(e)&&1===e.nodeType&&!Wa(e)},On.isEmpty=function(e){if(null==e)return!0;if(Pa(e)&&(Ia(e)||"string"==typeof e||"function"==typeof e.splice||Ta(e)||Ga(e)||Fa(e)))return!e.length;var t=ti(e);if(t==g||t==w)return!e.size;if(li(e))return!Sr(e).length;for(var n in e)if(Ee.call(e,n))return!1;return!0},On.isEqual=function(e,t){return br(e,t)},On.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?br(e,t,void 0,n):!!r},On.isError=$a,On.isFinite=function(e){return"number"==typeof e&&tn(e)},On.isFunction=La,On.isInteger=Ra,On.isLength=Ua,On.isMap=Ba,On.isMatch=function(e,t){return e===t||wr(e,t,Xo(t))},On.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,wr(e,t,Xo(t),n)},On.isNaN=function(e){return qa(e)&&e!=+e},On.isNative=function(e){if(ci(e))throw new de("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return _r(e)},On.isNil=function(e){return null==e},On.isNull=function(e){return null===e},On.isNumber=qa,On.isObject=Ma,On.isObjectLike=za,On.isPlainObject=Wa,On.isRegExp=Va,On.isSafeInteger=function(e){return Ra(e)&&e>=-9007199254740991&&e<=9007199254740991},On.isSet=Ha,On.isString=Ja,On.isSymbol=Ka,On.isTypedArray=Ga,On.isUndefined=function(e){return void 0===e},On.isWeakMap=function(e){return za(e)&&ti(e)==S},On.isWeakSet=function(e){return za(e)&&"[object WeakSet]"==pr(e)},On.join=function(e,t){return null==e?"":nn.call(e,t)},On.kebabCase=Is,On.last=$i,On.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=es(n))<0?on(r+o,0):an(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):bt(e,xt,o,!0)},On.lowerCase=Ds,On.lowerFirst=Ps,On.lt=Za,On.lte=Xa,On.max=function(e){return e&&e.length?nr(e,qs,dr):void 0},On.maxBy=function(e,t){return e&&e.length?nr(e,Go(t,2),dr):void 0},On.mean=function(e){return St(e,qs)},On.meanBy=function(e,t){return St(e,Go(t,2))},On.min=function(e){return e&&e.length?nr(e,qs,jr):void 0},On.minBy=function(e,t){return e&&e.length?nr(e,Go(t,2),jr):void 0},On.stubArray=tu,On.stubFalse=nu,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return!0},On.multiply=uu,On.nth=function(e,t){return e&&e.length?Fr(e,es(t)):void 0},On.noConflict=function(){return He._===this&&(He._=Ie),this},On.noop=Ks,On.now=pa,On.pad=function(e,t,n){e=os(e);var r=(t=es(t))?Bt(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Do(Yt(o),n)+e+Do(Xt(o),n)},On.padEnd=function(e,t,n){e=os(e);var r=(t=es(t))?Bt(e):0;return t&&r<t?e+Do(t-r,n):e},On.padStart=function(e,t,n){e=os(e);var r=(t=es(t))?Bt(e):0;return t&&r<t?Do(t-r,n)+e:e},On.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),un(os(e).replace(Z,""),t||0)},On.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ai(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=Qa(e),void 0===t?(t=e,e=0):t=Qa(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=cn();return an(e+o*(t-e+Be("1e-"+((o+"").length-1))),t)}return Tr(e,t)},On.reduce=function(e,t,n){var r=Ia(e)?ht:kt,o=arguments.length<3;return r(e,Go(t,4),n,o,Qn)},On.reduceRight=function(e,t,n){var r=Ia(e)?vt:kt,o=arguments.length<3;return r(e,Go(t,4),n,o,er)},On.repeat=function(e,t,n){return t=(n?ai(e,t,n):void 0===t)?1:es(t),Cr(os(e),t)},On.replace=function(){var e=arguments,t=os(e[0]);return e.length<3?t:t.replace(e[1],e[2])},On.result=function(e,t,n){var r=-1,o=(t=io(t,e)).length;for(o||(o=1,e=void 0);++r<o;){var i=null==e?void 0:e[Si(t[r])];void 0===i&&(r=o,i=n),e=La(i)?i.call(e):i}return e},On.round=cu,On.runInContext=e,On.sample=function(e){return(Ia(e)?Rn:Lr)(e)},On.size=function(e){if(null==e)return 0;if(Pa(e))return Ja(e)?Bt(e):e.length;var t=ti(e);return t==g||t==w?e.size:Sr(e).length},On.snakeCase=Ns,On.some=function(e,t,n){var r=Ia(e)?gt:Wr;return n&&ai(e,t,n)&&(t=void 0),r(e,Go(t,3))},On.sortedIndex=function(e,t){return Vr(e,t)},On.sortedIndexBy=function(e,t,n){return Hr(e,t,Go(n,2))},On.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Vr(e,t);if(r<n&&ka(e[r],t))return r}return-1},On.sortedLastIndex=function(e,t){return Vr(e,t,!0)},On.sortedLastIndexBy=function(e,t,n){return Hr(e,t,Go(n,2),!0)},On.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Vr(e,t,!0)-1;if(ka(e[n],t))return n}return-1},On.startCase=Ts,On.startsWith=function(e,t,n){return e=os(e),n=null==n?0:Kn(es(n),0,e.length),t=Gr(t),e.slice(n,n+t.length)==t},On.subtract=lu,On.sum=function(e){return e&&e.length?Ot(e,qs):0},On.sumBy=function(e,t){return e&&e.length?Ot(e,Go(t,2)):0},On.template=function(e,t,n){var r=On.templateSettings;n&&ai(e,t,n)&&(t=void 0),e=os(e),t=ss({},t,r,Uo);var o,i,a=ss({},t.imports,r.imports,Uo),s=ys(a),u=It(a,s),c=0,l=t.interpolate||fe,f="__p += '",p=ye((t.escape||fe).source+"|"+l.source+"|"+(l===q?re:fe).source+"|"+(t.evaluate||fe).source+"|$","g"),d="//# sourceURL="+(Ee.call(t,"sourceURL")?(t.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++Re+"]")+"\n";e.replace(p,(function(t,n,r,a,s,u){return r||(r=a),f+=e.slice(c,u).replace(pe,$t),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(i=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),f+="';\n";var h=Ee.call(t,"variable")&&t.variable;h||(f="with (obj) {\n"+f+"\n}\n"),f=(i?f.replace(T,""):f).replace(C,"$1").replace($,"$1;"),f="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=Rs((function(){return he(s,d+"return "+f).apply(void 0,u)}));if(v.source=f,$a(v))throw v;return v},On.times=function(e,t){if((e=es(e))<1||e>9007199254740991)return[];var n=4294967295,r=an(e,4294967295);e-=4294967295;for(var o=At(r,t=Go(t));++n<e;)t(n);return o},On.toFinite=Qa,On.toInteger=es,On.toLength=ts,On.toLower=function(e){return os(e).toLowerCase()},On.toNumber=ns,On.toSafeInteger=function(e){return e?Kn(es(e),-9007199254740991,9007199254740991):0===e?e:0},On.toString=os,On.toUpper=function(e){return os(e).toUpperCase()},On.trim=function(e,t,n){if((e=os(e))&&(n||void 0===t))return e.replace(G,"");if(!e||!(t=Gr(t)))return e;var r=qt(e),o=qt(t);return so(r,Pt(r,o),Nt(r,o)+1).join("")},On.trimEnd=function(e,t,n){if((e=os(e))&&(n||void 0===t))return e.replace(X,"");if(!e||!(t=Gr(t)))return e;var r=qt(e);return so(r,0,Nt(r,qt(t))+1).join("")},On.trimStart=function(e,t,n){if((e=os(e))&&(n||void 0===t))return e.replace(Z,"");if(!e||!(t=Gr(t)))return e;var r=qt(e);return so(r,Pt(r,qt(t))).join("")},On.truncate=function(e,t){var n=30,r="...";if(Ma(t)){var o="separator"in t?t.separator:o;n="length"in t?es(t.length):n,r="omission"in t?Gr(t.omission):r}var i=(e=os(e)).length;if(Lt(e)){var a=qt(e);i=a.length}if(n>=i)return e;var s=n-Bt(r);if(s<1)return r;var u=a?so(a,0,s).join(""):e.slice(0,s);if(void 0===o)return u+r;if(a&&(s+=u.length-s),Va(o)){if(e.slice(s).search(o)){var c,l=u;for(o.global||(o=ye(o.source,os(oe.exec(o))+"g")),o.lastIndex=0;c=o.exec(l);)var f=c.index;u=u.slice(0,void 0===f?s:f)}}else if(e.indexOf(Gr(o),s)!=s){var p=u.lastIndexOf(o);p>-1&&(u=u.slice(0,p))}return u+r},On.unescape=function(e){return(e=os(e))&&U.test(e)?e.replace(L,Wt):e},On.uniqueId=function(e){var t=++ke;return os(e)+t},On.upperCase=Cs,On.upperFirst=$s,On.each=oa,On.eachRight=ia,On.first=Pi,Js(On,(ru={},sr(On,(function(e,t){Ee.call(On.prototype,t)||(ru[t]=e)})),ru),{chain:!1}),On.VERSION="4.17.15",at(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){On[e].placeholder=On})),at(["drop","take"],(function(e,t){Dn.prototype[e]=function(n){n=void 0===n?1:on(es(n),0);var r=this.__filtered__&&!t?new Dn(this):this.clone();return r.__filtered__?r.__takeCount__=an(n,r.__takeCount__):r.__views__.push({size:an(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Dn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),at(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Dn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Go(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),at(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Dn.prototype[e]=function(){return this[n](1).value()[0]}})),at(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Dn.prototype[e]=function(){return this.__filtered__?new Dn(this):this[n](1)}})),Dn.prototype.compact=function(){return this.filter(qs)},Dn.prototype.find=function(e){return this.filter(e).head()},Dn.prototype.findLast=function(e){return this.reverse().find(e)},Dn.prototype.invokeMap=$r((function(e,t){return"function"==typeof e?new Dn(this):this.map((function(n){return yr(n,e,t)}))})),Dn.prototype.reject=function(e){return this.filter(_a(Go(e)))},Dn.prototype.slice=function(e,t){e=es(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Dn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=es(t))<0?n.dropRight(-t):n.take(t-e)),n)},Dn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Dn.prototype.toArray=function(){return this.take(4294967295)},sr(Dn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=On[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(On.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof Dn,u=a[0],c=s||Ia(t),l=function(e){var t=o.apply(On,dt([e],a));return r&&f?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(s=c=!1);var f=this.__chain__,p=!!this.__actions__.length,d=i&&!f,h=s&&!p;if(!i&&c){t=h?t:new Dn(this);var v=e.apply(t,a);return v.__actions__.push({func:Qi,args:[l],thisArg:void 0}),new In(v,f)}return d&&h?e.apply(this,a):(v=this.thru(l),d?r?v.value()[0]:v.value():v)})})),at(["pop","push","shift","sort","splice","unshift"],(function(e){var t=we[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);On.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ia(o)?o:[],e)}return this[n]((function(n){return t.apply(Ia(n)?n:[],e)}))}})),sr(Dn.prototype,(function(e,t){var n=On[t];if(n){var r=n.name+"";Ee.call(mn,r)||(mn[r]=[]),mn[r].push({name:t,func:n})}})),mn[Oo(void 0,2).name]=[{name:"wrapper",func:void 0}],Dn.prototype.clone=function(){var e=new Dn(this.__wrapped__);return e.__actions__=go(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=go(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=go(this.__views__),e},Dn.prototype.reverse=function(){if(this.__filtered__){var e=new Dn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Dn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ia(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=an(t,e+a);break;case"takeRight":e=on(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,d=an(u,this.__takeCount__);if(!n||!r&&o==u&&d==u)return eo(e,this.__actions__);var h=[];e:for(;u--&&p<d;){for(var v=-1,g=e[c+=t];++v<f;){var y=l[v],m=y.iteratee,b=y.type,w=m(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}h[p++]=g}return h},On.prototype.at=ea,On.prototype.chain=function(){return Yi(this)},On.prototype.commit=function(){return new In(this.value(),this.__chain__)},On.prototype.next=function(){void 0===this.__values__&&(this.__values__=Ya(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},On.prototype.plant=function(e){for(var t,n=this;n instanceof Fn;){var r=Ei(n);r.__index__=0,r.__values__=void 0,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},On.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Dn){var t=e;return this.__actions__.length&&(t=new Dn(this)),(t=t.reverse()).__actions__.push({func:Qi,args:[Mi],thisArg:void 0}),new In(t,this.__chain__)}return this.thru(Mi)},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return eo(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Et&&(On.prototype[Et]=function(){return this}),On}();"object"==i(n(46))&&n(46)?(He._=Vt,void 0===(o=function(){return Vt}.call(t,n,t,r))||(r.exports=o)):Ke?((Ke.exports=Vt)._=Vt,Je._=Vt):He._=Vt}).call(this)}).call(this,n(11),n(14)(e))},function(e,t,n){var r=n(87);e.exports={Graph:r.Graph,json:n(213),alg:n(214),version:r.version}},function(e,t,n){e.exports={Graph:n(28),version:n(212)}},function(e,t,n){var r=n(89);e.exports=function(e){return r(e,4)}},function(e,t,n){var r=n(29),o=n(33),i=n(49),a=n(118),s=n(124),u=n(127),c=n(128),l=n(129),f=n(130),p=n(59),d=n(131),h=n(10),v=n(135),g=n(136),y=n(141),m=n(0),b=n(12),w=n(142),_=n(5),x=n(144),S=n(6),j={};j["[object Arguments]"]=j["[object Array]"]=j["[object ArrayBuffer]"]=j["[object DataView]"]=j["[object Boolean]"]=j["[object Date]"]=j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Map]"]=j["[object Number]"]=j["[object Object]"]=j["[object RegExp]"]=j["[object Set]"]=j["[object String]"]=j["[object Symbol]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j["[object Error]"]=j["[object Function]"]=j["[object WeakMap]"]=!1,e.exports=function e(t,n,E,k,O,A){var F,I=1&n,D=2&n,P=4&n;if(E&&(F=O?E(t,k,O,A):E(t)),void 0!==F)return F;if(!_(t))return t;var N=m(t);if(N){if(F=v(t),!I)return c(t,F)}else{var T=h(t),C="[object Function]"==T||"[object GeneratorFunction]"==T;if(b(t))return u(t,I);if("[object Object]"==T||"[object Arguments]"==T||C&&!O){if(F=D||C?{}:y(t),!I)return D?f(t,s(F,t)):l(t,a(F,t))}else{if(!j[T])return O?t:{};F=g(t,T,I)}}A||(A=new r);var $=A.get(t);if($)return $;A.set(t,F),x(t)?t.forEach((function(r){F.add(e(r,n,E,r,t,A))})):w(t)&&t.forEach((function(r,o){F.set(o,e(r,n,E,o,t,A))}));var L=P?D?d:p:D?keysIn:S,R=N?void 0:L(t);return o(R||t,(function(r,o){R&&(r=t[o=r]),i(F,o,e(r,n,E,o,t,A))})),F}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(16),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},function(e,t,n){var r=n(16);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(16);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(16);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(15);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(15),o=n(31),i=n(32);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(17),o=n(103),i=n(5),a=n(48),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?p:s).test(a(e))}},function(e,t,n){var r=n(9),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(104),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(2)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(107),o=n(15),i=n(31);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(108),o=n(109),i=n(110),a=n(111),s=n(112);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(18);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(18),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(18),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(18);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(19);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){var t=n(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(19);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(19);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(19);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(20),o=n(6);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(8),o=n(3);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(8),o=n(34),i=n(3),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},function(e,t,n){var r=n(54)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(20),o=n(55);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(5),o=n(23),i=n(126),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(2),i="object"==r(t)&&t&&!t.nodeType&&t,a=i&&"object"==r(e)&&e&&!e.nodeType&&e,s=a&&a.exports===i?o.Buffer:void 0,u=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(14)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(20),o=n(38);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(20),o=n(58);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(60),o=n(58),i=n(55);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(4)(n(2),"DataView");e.exports=r},function(e,t,n){var r=n(4)(n(2),"Promise");e.exports=r},function(e,t,n){var r=n(4)(n(2),"WeakMap");e.exports=r},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(41),o=n(137),i=n(138),a=n(139),s=n(140);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return o(e,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 s(e,n);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return i(e);case"[object Symbol]":return a(e)}}},function(e,t,n){var r=n(41);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(9),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},function(e,t,n){var r=n(41);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(63),o=n(40),i=n(23);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},function(e,t,n){var r=n(143),o=n(35),i=n(36),a=i&&i.isMap,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(10),o=n(3);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(145),o=n(35),i=n(36),a=i&&i.isSet,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(10),o=n(3);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},function(e,t,n){e.exports=n(147)},function(e,t,n){var r=n(33),o=n(24),i=n(151),a=n(0);e.exports=function(e,t){return(a(e)?r:o)(e,i(t))}},function(e,t,n){var r=n(149)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}},function(e,t,n){var r=n(7);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a<i)&&!1!==o(s[a],a,s););return n}}},function(e,t,n){var r=n(25);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t,n){var r=n(56),o=n(153),i=n(26),a=n(0);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},function(e,t,n){var r=n(24);e.exports=function(e,t){var n=[];return r(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}},function(e,t,n){var r=n(155),o=n(163),i=n(71);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(29),o=n(66);e.exports=function(e,t,n,i){var a=n.length,s=a,u=!i;if(null==e)return!s;for(e=Object(e);a--;){var c=n[a];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var l=(c=n[a])[0],f=e[l],p=c[1];if(u&&c[2]){if(void 0===f&&!(l in e))return!1}else{var d=new r;if(i)var h=i(f,p,l,e,t,d);if(!(void 0===h?o(p,f,3,i,d):h))return!1}}return!0}},function(e,t,n){var r=n(29),o=n(67),i=n(160),a=n(162),s=n(10),u=n(0),c=n(12),l=n(22),f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,d,h,v){var g=u(e),y=u(t),m=g?"[object Array]":s(e),b=y?"[object Array]":s(t),w=(m="[object Arguments]"==m?f:m)==f,_=(b="[object Arguments]"==b?f:b)==f,x=m==b;if(x&&c(e)){if(!c(t))return!1;g=!0,w=!1}if(x&&!w)return v||(v=new r),g||l(e)?o(e,t,n,d,h,v):i(e,t,m,n,d,h,v);if(!(1&n)){var S=w&&p.call(e,"__wrapped__"),j=_&&p.call(t,"__wrapped__");if(S||j){var E=S?e.value():e,k=j?t.value():t;return v||(v=new r),h(E,k,n,d,v)}}return!!x&&(v||(v=new r),a(e,t,n,d,h,v))}},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t,n){var r=n(9),o=n(62),i=n(30),a=n(67),s=n(161),u=n(42),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var h=1&r;if(d||(d=u),e.size!=t.size&&!h)return!1;var v=p.get(e);if(v)return v==t;r|=2,p.set(e,t);var g=a(d(e),d(t),r,c,f,p);return p.delete(e),g;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t,n){var r=n(59),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,s){var u=1&n,c=r(e),l=c.length;if(l!=r(t).length&&!u)return!1;for(var f=l;f--;){var p=c[f];if(!(u?p in t:o.call(t,p)))return!1}var d=s.get(e);if(d&&s.get(t))return d==t;var h=!0;s.set(e,t),s.set(t,e);for(var v=u;++f<l;){var g=e[p=c[f]],y=t[p];if(i)var m=u?i(y,g,p,t,e,s):i(g,y,p,e,t,s);if(!(void 0===m?g===y||a(g,y,n,i,s):m)){h=!1;break}v||(v="constructor"==p)}if(h&&!v){var b=e.constructor,w=t.constructor;b!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(h=!1)}return s.delete(e),s.delete(t),h}},function(e,t,n){var r=n(70),o=n(6);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},function(e,t,n){var r=n(66),o=n(165),i=n(171),a=n(43),s=n(70),u=n(71),c=n(27);e.exports=function(e,t){return a(e)&&s(t)?u(c(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},function(e,t,n){var r=n(72);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=n(167),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=a},function(e,t,n){var r=n(168);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(32);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},function(e,t,n){var r=n(170);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(9),o=n(45),i=n(0),a=n(44),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(172),o=n(74);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(75),o=n(174),i=n(43),a=n(27);e.exports=function(e){return i(e)?r(a(e)):o(e)}},function(e,t,n){var r=n(72);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(176),o=n(74);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e,t){return null!=e&&n.call(e,t)}},function(e,t,n){var r=n(37),o=n(10),i=n(21),a=n(0),s=n(7),u=n(12),c=n(23),l=n(22),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},function(e,t){e.exports=function(e){return void 0===e}},function(e,t,n){var r=n(45),o=n(26),i=n(180),a=n(0);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){var r=n(24),o=n(7);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}},function(e,t,n){var r=n(182),o=n(24),i=n(26),a=n(183),s=n(0);e.exports=function(e,t,n){var u=s(e)?r:a,c=arguments.length<3;return u(e,i(t,4),n,c,o)}},function(e,t){e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}},function(e,t){e.exports=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}},function(e,t,n){var r=n(37),o=n(10),i=n(7),a=n(185),s=n(186);e.exports=function(e){if(null==e)return 0;if(i(e))return a(e)?s(e):e.length;var t=o(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},function(e,t,n){var r=n(8),o=n(0),i=n(3);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(187),o=n(188),i=n(189);e.exports=function(e){return o(e)?i(e):r(e)}},function(e,t,n){var r=n(75)("length");e.exports=r},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t){var n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+n+"|"+r+")?",u="[\\ufe0e\\ufe0f]?"+s+"(?:\\u200d(?:"+[o,i,a].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*",c="(?:"+[o+n+"?",n,i,a,"[\\ud800-\\udfff]"].join("|")+")",l=RegExp(r+"(?="+r+")|"+c+u,"g");e.exports=function(e){for(var t=l.lastIndex=0;l.test(e);)++t;return t}},function(e,t,n){var r=n(33),o=n(63),i=n(65),a=n(26),s=n(40),u=n(0),c=n(12),l=n(17),f=n(5),p=n(22);e.exports=function(e,t,n){var d=u(e),h=d||c(e)||p(e);if(t=a(t,4),null==n){var v=e&&e.constructor;n=h?d?new v:[]:f(e)&&l(v)?o(s(e)):{}}return(h?r:i)(e,(function(e,r,o){return t(n,e,r,o)})),n}},function(e,t,n){var r=n(192),o=n(194),i=n(200),a=n(209),s=o((function(e){return i(r(e,1,a,!0))}));e.exports=s},function(e,t,n){var r=n(39),o=n(193);e.exports=function e(t,n,i,a,s){var u=-1,c=t.length;for(i||(i=o),s||(s=[]);++u<c;){var l=t[u];n>0&&i(l)?n>1?e(l,n-1,i,a,s):r(s,l):a||(s[s.length]=l)}return s}},function(e,t,n){var r=n(9),o=n(21),i=n(0),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},function(e,t,n){var r=n(25),o=n(195),i=n(197);e.exports=function(e,t){return i(o(e,t,r),e+"")}},function(e,t,n){var r=n(196),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),u=Array(s);++a<s;)u[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];return c[t]=n(u),r(e,this,c)}}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(198),o=n(199)(r);e.exports=o},function(e,t,n){var r=n(64),o=n(51),i=n(25),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=a},function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(68),o=n(201),i=n(206),a=n(69),s=n(207),u=n(42);e.exports=function(e,t,n){var c=-1,l=o,f=e.length,p=!0,d=[],h=d;if(n)p=!1,l=i;else if(f>=200){var v=t?null:s(e);if(v)return u(v);p=!1,l=a,h=new r}else h=t?[]:d;e:for(;++c<f;){var g=e[c],y=t?t(g):g;if(g=n||0!==g?g:0,p&&y==y){for(var m=h.length;m--;)if(h[m]===y)continue e;t&&h.push(y),d.push(g)}else l(h,y,n)||(h!==d&&h.push(y),d.push(g))}return d}},function(e,t,n){var r=n(202);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},function(e,t,n){var r=n(203),o=n(204),i=n(205);e.exports=function(e,t,n){return t==t?i(e,t,n):r(e,o,n)}},function(e,t){e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}},function(e,t){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}},function(e,t,n){var r=n(61),o=n(208),i=n(42),a=r&&1/i(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=a},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(7),o=n(3);e.exports=function(e){return o(e)&&r(e)}},function(e,t,n){var r=n(211),o=n(6);e.exports=function(e){return null==e?[]:r(e,o(e))}},function(e,t,n){var r=n(45);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},function(e,t){e.exports="2.1.8"},function(e,t,n){var r=n(1),o=n(28);function i(e){return r.map(e.nodes(),(function(t){var n=e.node(t),o=e.parent(t),i={v:t};return r.isUndefined(n)||(i.value=n),r.isUndefined(o)||(i.parent=o),i}))}function a(e){return r.map(e.edges(),(function(t){var n=e.edge(t),o={v:t.v,w:t.w};return r.isUndefined(t.name)||(o.name=t.name),r.isUndefined(n)||(o.value=n),o}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:a(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t},read:function(e){var t=new o(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}}},function(e,t,n){e.exports={components:n(215),dijkstra:n(76),dijkstraAll:n(216),findCycles:n(217),floydWarshall:n(218),isAcyclic:n(219),postorder:n(220),preorder:n(221),prim:n(222),tarjan:n(78),topsort:n(79)}},function(e,t,n){var r=n(1);e.exports=function(e){var t,n={},o=[];function i(o){r.has(n,o)||(n[o]=!0,t.push(o),r.each(e.successors(o),i),r.each(e.predecessors(o),i))}return r.each(e.nodes(),(function(e){t=[],i(e),t.length&&o.push(t)})),o}},function(e,t,n){var r=n(76),o=n(1);e.exports=function(e,t,n){return o.transform(e.nodes(),(function(o,i){o[i]=r(e,i,t,n)}),{})}},function(e,t,n){var r=n(1),o=n(78);e.exports=function(e){return r.filter(o(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}},function(e,t,n){var r=n(1);e.exports=function(e,t,n){return function(e,t,n){var r={},o=e.nodes();return o.forEach((function(e){r[e]={},r[e][e]={distance:0},o.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var t=r[e];o.forEach((function(n){var i=r[n];o.forEach((function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)}))}))})),r}(e,t||o,n||function(t){return e.outEdges(t)})};var o=r.constant(1)},function(e,t,n){var r=n(79);e.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}},function(e,t,n){var r=n(80);e.exports=function(e,t){return r(e,t,"post")}},function(e,t,n){var r=n(80);e.exports=function(e,t){return r(e,t,"pre")}},function(e,t,n){var r=n(1),o=n(28),i=n(77);e.exports=function(e,t){var n,a=new o,s={},u=new i;function c(e){var r=e.v===n?e.w:e.v,o=u.priority(r);if(void 0!==o){var i=t(e);i<o&&(s[r]=n,u.decrease(r,i))}}if(0===e.nodeCount())return a;r.each(e.nodes(),(function(e){u.add(e,Number.POSITIVE_INFINITY),a.setNode(e)})),u.decrease(e.nodes()[0],0);for(var l=!1;u.size()>0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(n).forEach(c)}return a}},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var t="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,o="/"===a.charAt(0))}return(o?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!o).join("/"))||"."},t.normalize=function(e){var i=t.isAbsolute(e),a="/"===o(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!i).join("/"))||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var o=r(e.split("/")),i=r(n.split("/")),a=Math.min(o.length,i.length),s=a,u=0;u<a;u++)if(o[u]!==i[u]){s=u;break}var c=[];for(u=s;u<o.length;u++)c.push("..");return(c=c.concat(i.slice(s))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,o=!0,i=e.length-1;i>=1;--i)if(47===(t=e.charCodeAt(i))){if(!o){r=i;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){n=t+1;break}}else-1===r&&(o=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,o=!0,i=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(o=!1,r=a+1),46===s?-1===t?t=a:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){n=a+1;break}}return-1===t||-1===r||0===i||1===i&&t===r-1&&t===n+1?"":e.slice(t,r)};var o="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(13))},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o={file:n(225),http:n(81),https:n(81)},i="object"===("undefined"==typeof window?"undefined":r(window))||"function"==typeof importScripts?o.http:o.file;"undefined"==typeof Promise&&n(83),e.exports.load=function(e,t){var n=Promise.resolve();return void 0===t&&(t={}),(n=n.then((function(){if(void 0===e)throw new TypeError("location is required");if("string"!=typeof e)throw new TypeError("location must be a string");if(void 0!==t){if("object"!==r(t))throw new TypeError("options must be an object");if(void 0!==t.processContent&&"function"!=typeof t.processContent)throw new TypeError("options.processContent must be a function")}}))).then((function(){return new Promise((function(n,r){(function(e){var t=function(e){return void 0!==e&&(e=-1===e.indexOf("://")?"":e.split("://")[0]),e}(e),n=o[t];if(void 0===n){if(""!==t)throw new Error("Unsupported scheme: "+t);n=i}return n})(e).load(e,t||{},(function(e,t){e?r(e):n(t)}))}))})).then((function(n){return t.processContent?new Promise((function(o,i){"object"!==r(n)&&(n={text:n}),n.location=e,t.processContent(n,(function(e,t){e?i(e):o(t)}))})):"object"===r(n)?n.text:n}))}},function(e,t,n){var r=new TypeError("The 'file' scheme is not supported in the browser");e.exports.getBase=function(){throw r},e.exports.load=function(){var e=arguments[arguments.length-1];if("function"!=typeof e)throw r;e(r)}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o;"undefined"!=typeof window?o=window:"undefined"!=typeof self?o=self:(console.warn("Using browser-only version of superagent in non-browser environment"),o=this);var i=n(227),a=n(228),s=n(82),u=n(229),c=n(231);function l(){}var f=t=e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1==arguments.length?new t.Request("GET",e):new t.Request(e,n)};t.Request=m,f.getXHR=function(){if(!(!o.XMLHttpRequest||o.location&&"file:"==o.location.protocol&&o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only version of superagent could not find XHR")};var p="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function d(e){if(!s(e))return e;var t=[];for(var n in e)h(t,n,e[n]);return t.join("&")}function h(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach((function(n){h(e,t,n)}));else if(s(n))for(var r in n)h(e,t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function v(e){for(var t,n,r={},o=e.split("&"),i=0,a=o.length;i<a;++i)-1==(n=(t=o[i]).indexOf("="))?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function g(e){return/[\/+]json($|[^-\w])/.test(e)}function y(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.header=this.headers=function(e){for(var t,n,r,o,i=e.split(/\r?\n/),a={},s=0,u=i.length;s<u;++s)-1!==(t=(n=i[s]).indexOf(":"))&&(r=n.slice(0,t).toLowerCase(),o=p(n.slice(t+1)),a[r]=o);return a}(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function m(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,r=null;try{r=new y(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",r);try{n._isResponseOK(r)||(e=new Error(r.statusText||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=r,e.status=r.status,n.callback(e,r)):n.callback(null,r)}))}function b(e,t,n){var r=f("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}f.serializeObject=d,f.parseString=v,f.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},f.serialize={"application/x-www-form-urlencoded":d,"application/json":JSON.stringify},f.parse={"application/x-www-form-urlencoded":v,"application/json":JSON.parse},u(y.prototype),y.prototype._parseBody=function(e){var t=f.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&g(this.type)&&(t=f.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},y.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",o=new Error(r);return o.status=this.status,o.method=t,o.url=n,o},f.Response=y,i(m.prototype),a(m.prototype),m.prototype.type=function(e){return this.set("Content-Type",f.types[e]||e),this},m.prototype.accept=function(e){return this.set("Accept",f.types[e]||e),this},m.prototype.auth=function(e,t,n){1===arguments.length&&(t=""),"object"===r(t)&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});return this._auth(e,t,n,(function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")}))},m.prototype.query=function(e){return"string"!=typeof e&&(e=d(e)),e&&this._query.push(e),this},m.prototype.attach=function(e,t,n){if(t){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},m.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},m.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},m.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},m.prototype.buffer=m.prototype.ca=m.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},m.prototype.pipe=m.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},m.prototype._isHost=function(e){return e&&"object"===r(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},m.prototype.end=function(e){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||l,this._finalizeQueryString(),this._end()},m.prototype._end=function(){var e=this,t=this.xhr=f.getXHR(),n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.onprogress=r.bind(null,"download"),t.upload&&(t.upload.onprogress=r.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||f.serialize[o?o.split(";")[0]:""];!i&&g(o)&&(i=f.serialize["application/json"]),i&&(n=i(n))}for(var a in this.header)null!=this.header[a]&&this.header.hasOwnProperty(a)&&t.setRequestHeader(a,this.header[a]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0!==n?n:null),this},f.agent=function(){return new c},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){c.prototype[e.toLowerCase()]=function(t,n){var r=new f.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}})),c.prototype.del=c.prototype.delete,f.get=function(e,t,n){var r=f("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},f.head=function(e,t,n){var r=f("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},f.options=function(e,t,n){var r=f("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},f.del=b,f.delete=b,f.patch=function(e,t,n){var r=f("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},f.post=function(e,t,n){var r=f("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},f.put=function(e,t,n){var r=f("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var r=0,o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t);return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(82);function i(e){if(e)return function(e){for(var t in i.prototype)e[t]=i.prototype[t];return e}(e)}e.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},i.prototype.parse=function(e){return this._parser=e,this},i.prototype.responseType=function(e){return this._responseType=e,this},i.prototype.serialize=function(e){return this._serializer=e,this},i.prototype.timeout=function(e){if(!e||"object"!==r(e))return this._timeout=e,this._responseTimeout=0,this;for(var t in e)switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;default:console.warn("Unknown timeout option",t)}return this},i.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var a=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];i.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~a.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},i.prototype.then=function(e,t){if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){n.end((function(n,r){n?t(n):e(r)}))}))}return this._fullfilledPromise.then(e,t)},i.prototype.catch=function(e){return this.then(void 0,e)},i.prototype.use=function(e){return e(this),this},i.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},i.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},i.prototype.get=function(e){return this._header[e.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(e,t){if(o(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},i.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},i.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),o(e)){for(var n in e)this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)this.field(e,t[r]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic "+r(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},i.prototype.withCredentials=function(e){return null==e&&(e=!0),this._withCredentials=e,this},i.prototype.redirects=function(e){return this._maxRedirects=e,this},i.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(e){var t=o(e),n=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&o(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},i.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},i.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.substring(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,t)+"?"+n.join("&")}}},i.prototype._appendQueryString=function(){console.trace("Unsupported")},i.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error(e+t+"ms exceeded");r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.abort(),this.callback(r)}},i.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},function(e,t,n){var r=n(230);function o(e){if(e)return function(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}(e)}e.exports=o,o.prototype.get=function(e){return this.header[e.toLowerCase()]},o.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=r.type(t);var n=r.params(t);for(var o in n)this[o]=n[o];this.links={};try{e.link&&(this.links=r.parseLinks(e.link))}catch(e){}},o.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.created=201==e,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e,this.unprocessableEntity=422==e}},function(e,t,n){t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce((function(e,t){var n=t.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(e[r]=o),e}),{})},t.parseLinks=function(e){return e.split(/ *, */).reduce((function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e}),{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach((function(e){n.prototype[e]=function(){return this._defaults.push({fn:e,arguments:arguments}),this}})),n.prototype._setDefaults=function(e){this._defaults.forEach((function(t){e[t.fn].apply(e,t.arguments)}))},e.exports=n},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(233),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(e,t,n){(function(e,t){!function(e,n){if(!e.setImmediate){var r,o,i,a,s,u=1,c={},l=!1,f=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(h,0,e)},p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return c[u]=o,r(u),u++},p.clearImmediate=d}function d(e){delete c[e]}function h(e){if(l)setTimeout(h,0,e);else{var t=c[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{d(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(11),n(13))},function(e,t,n){t.decode=t.parse=n(235),t.encode=t.stringify=n(236)},function(e,t,n){function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var f,p,d,h,v=e[l].replace(s,"%20"),g=v.indexOf(n);g>=0?(f=v.substr(0,g),p=v.substr(g+1)):(f=v,p=""),d=decodeURIComponent(f),h=decodeURIComponent(p),r(a,d)?o(a[d])?a[d].push(h):a[d]=[a[d],h]:a[d]=h}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=function(e){switch(r(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,u){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"===r(e)?a(s(e),(function(r){var s=encodeURIComponent(o(r))+n;return i(e[r])?a(e[r],(function(e){return s+encodeURIComponent(o(e))})).join(t):s+encodeURIComponent(o(e[r]))})).join(t):u?encodeURIComponent(o(u))+n+encodeURIComponent(o(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){e.exports=function(e){var t=/^\\\\\?\\/.test(e),n=/[^\u0000-\u0080]+/.test(e);return t||n?e:e.replace(/\\/g,"/")}},function(e,t,n){var r,o,i,a;function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
14
- /** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */a=function(e){function t(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length>1){t[0]=t[0].slice(0,-1);for(var r=t.length-1,o=1;o<r;++o)t[o]=t[o].slice(1,-1);return t[r]=t[r].slice(1),t.join("")}return t[0]}function n(e){return"(?:"+e+")"}function r(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function i(e){var r=t("[0-9]","[A-Fa-f]"),o=n(n("%[EFef]"+r+"%"+r+r+"%"+r+r)+"|"+n("%[89A-Fa-f]"+r+"%"+r+r)+"|"+n("%"+r+r)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",a=t("[\\:\\/\\?\\#\\[\\]\\@]",i),s=e?"[\\uE000-\\uF8FF]":"[]",u=t("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");n("[A-Za-z]"+t("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),n(n(o+"|"+t(u,i,"[\\:]"))+"*");var c=n(n("25[0-5]")+"|"+n("2[0-4][0-9]")+"|"+n("1[0-9][0-9]")+"|"+n("0?[1-9][0-9]")+"|0?0?[0-9]"),l=n(c+"\\."+c+"\\."+c+"\\."+c),f=n(r+"{1,4}"),p=n(n(f+"\\:"+f)+"|"+l),d=n(n(f+"\\:")+"{6}"+p),h=n("\\:\\:"+n(f+"\\:")+"{5}"+p),v=n(n(f)+"?\\:\\:"+n(f+"\\:")+"{4}"+p),g=n(n(n(f+"\\:")+"{0,1}"+f)+"?\\:\\:"+n(f+"\\:")+"{3}"+p),y=n(n(n(f+"\\:")+"{0,2}"+f)+"?\\:\\:"+n(f+"\\:")+"{2}"+p),m=n(n(n(f+"\\:")+"{0,3}"+f)+"?\\:\\:"+f+"\\:"+p),b=n(n(n(f+"\\:")+"{0,4}"+f)+"?\\:\\:"+p),w=n(n(n(f+"\\:")+"{0,5}"+f)+"?\\:\\:"+f),_=n(n(n(f+"\\:")+"{0,6}"+f)+"?\\:\\:"),x=n([d,h,v,g,y,m,b,w,_].join("|")),S=n(n(u+"|"+o)+"+");n("[vV]"+r+"+\\."+t(u,i,"[\\:]")+"+"),n(n(o+"|"+t(u,i))+"*");var j=n(o+"|"+t(u,i,"[\\:\\@]"));return n(n(o+"|"+t(u,i,"[\\@]"))+"+"),n(n(j+"|"+t("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(t("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",u,i),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",u,i),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",u,i),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",u,i),"g"),NOT_QUERY:new RegExp(t("[^\\%]",u,i,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",u,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",u,i),"g"),UNRESERVED:new RegExp(u,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",u,a),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+l+")$"),IPV6ADDRESS:new RegExp("^\\[?("+x+")"+n(n("\\%25|\\%(?!"+r+"{2})")+"("+S+")")+"?\\]?$")}}var a=i(!1),s=i(!0),u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,l=/^xn--/,f=/[^\0-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,v=String.fromCharCode;function g(e){throw new RangeError(d[e])}function y(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]);var o=function(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}((e=e.replace(p,".")).split("."),t).join(".");return r+o}var m=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},b=function(e,t,n){var r=0;for(e=n?h(e/700):e>>1,e+=h(e/t);e>455;r+=36)e=h(e/35);return h(r+36*e/(e+38))},w=function(e){return y(e,(function(e){return f.test(e)?"xn--"+function(e){var t=[],n=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){var i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&o)<<10)+(1023&i)+65536):(t.push(o),n--)}else t.push(o)}return t}(e)).length,r=128,o=0,i=72,a=!0,s=!1,u=void 0;try{for(var l,f=e[Symbol.iterator]();!(a=(l=f.next()).done);a=!0){var p=l.value;p<128&&t.push(v(p))}}catch(e){s=!0,u=e}finally{try{!a&&f.return&&f.return()}finally{if(s)throw u}}var d=t.length,y=d;for(d&&t.push("-");y<n;){var w=c,_=!0,x=!1,S=void 0;try{for(var j,E=e[Symbol.iterator]();!(_=(j=E.next()).done);_=!0){var k=j.value;k>=r&&k<w&&(w=k)}}catch(e){x=!0,S=e}finally{try{!_&&E.return&&E.return()}finally{if(x)throw S}}var O=y+1;w-r>h((c-o)/O)&&g("overflow"),o+=(w-r)*O,r=w;var A=!0,F=!1,I=void 0;try{for(var D,P=e[Symbol.iterator]();!(A=(D=P.next()).done);A=!0){var N=D.value;if(N<r&&++o>c&&g("overflow"),N==r){for(var T=o,C=36;;C+=36){var $=C<=i?1:C>=i+26?26:C-i;if(T<$)break;var L=T-$,R=36-$;t.push(v(m($+L%R,0))),T=h(L/R)}t.push(v(m(T,0))),i=b(o,O,y==d),o=0,++y}}}catch(e){F=!0,I=e}finally{try{!A&&P.return&&P.return()}finally{if(F)throw I}}++o,++r}return t.join("")}(e):e}))},_=function(e){return y(e,(function(e){return l.test(e)?function(e){var t,n=[],r=e.length,o=0,i=128,a=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var u=0;u<s;++u)e.charCodeAt(u)>=128&&g("not-basic"),n.push(e.charCodeAt(u));for(var l=s>0?s+1:0;l<r;){for(var f=o,p=1,d=36;;d+=36){l>=r&&g("invalid-input");var v=(t=e.charCodeAt(l++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36;(v>=36||v>h((c-o)/p))&&g("overflow"),o+=v*p;var y=d<=a?1:d>=a+26?26:d-a;if(v<y)break;var m=36-y;p>h(c/m)&&g("overflow"),p*=m}var w=n.length+1;a=b(o-f,w,0==f),h(o/w)>c-i&&g("overflow"),i+=h(o/w),o%=w,n.splice(o++,0,i)}return String.fromCodePoint.apply(String,n)}(e.slice(4).toLowerCase()):e}))},x={};function S(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function j(e){for(var t="",n=0,r=e.length;n<r;){var o=parseInt(e.substr(n+1,2),16);if(o<128)t+=String.fromCharCode(o),n+=3;else if(o>=194&&o<224){if(r-n>=6){var i=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&o)<<6|63&i)}else t+=e.substr(n,6);n+=6}else if(o>=224){if(r-n>=9){var a=parseInt(e.substr(n+4,2),16),s=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&a)<<6|63&s)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function E(e,t){function n(e){var n=j(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,S).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,S).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,S).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,S).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,S).replace(t.PCT_ENCODED,o)),e}function k(e){return e.replace(/^0*(.*)/,"$1")||"0"}function O(e,t){var n=e.match(t.IPV4ADDRESS)||[],r=u(n,2)[1];return r?r.split(".").map(k).join("."):e}function A(e,t){var n=e.match(t.IPV6ADDRESS)||[],r=u(n,3),o=r[1],i=r[2];if(o){for(var a=o.toLowerCase().split("::").reverse(),s=u(a,2),c=s[0],l=s[1],f=l?l.split(":").map(k):[],p=c.split(":").map(k),d=t.IPV4ADDRESS.test(p[p.length-1]),h=d?7:8,v=p.length-h,g=Array(h),y=0;y<h;++y)g[y]=f[y]||p[v+y]||"";d&&(g[h-1]=O(g[h-1],t));var m=g.reduce((function(e,t,n){if(!t||"0"===t){var r=e[e.length-1];r&&r.index+r.length===n?r.length++:e.push({index:n,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],b=void 0;if(m&&m.length>1){var w=g.slice(0,m.index),_=g.slice(m.index+m.length);b=w.join(":")+"::"+_.join(":")}else b=g.join(":");return i&&(b+="%"+i),b}return e}var F=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,I=void 0==="".match(/(){0}/)[1];function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=!1!==t.iri?s:a;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(F);if(o){I?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||void 0,n.userinfo=-1!==e.indexOf("@")?o[3]:void 0,n.host=-1!==e.indexOf("//")?o[4]:void 0,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:void 0,n.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),n.host&&(n.host=A(O(n.host,r),r)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var i=x[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||i&&i.unicodeSupport)E(n,r);else{if(n.host&&(t.domainHost||i&&i.domainHost))try{n.host=w(n.host.replace(r.PCT_ENCODED,j).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}E(n,a)}i&&i.parse&&i.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}var P=/^\.\.?\//,N=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,C=/^\/?(?:.|\n)*?(?=\/|$)/;function $(e){for(var t=[];e.length;)if(e.match(P))e=e.replace(P,"");else if(e.match(N))e=e.replace(N,"/");else if(e.match(T))e=e.replace(T,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(C);if(!n)throw new Error("Unexpected dot segment condition");var r=n[0];e=e.slice(r.length),t.push(r)}return t.join("")}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?s:a,r=[],o=x[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?_(e.host):w(e.host.replace(n.PCT_ENCODED,j).toLowerCase())}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}E(e,n),"suffix"!==t.reference&&e.scheme&&(r.push(e.scheme),r.push(":"));var i=function(e,t){var n=!1!==t.iri?s:a,r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push(A(O(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"}))),"number"==typeof e.port&&(r.push(":"),r.push(e.port.toString(10))),r.length?r.join(""):void 0}(e,t);if(void 0!==i&&("suffix"!==t.reference&&r.push("//"),r.push(i),e.path&&"/"!==e.path.charAt(0)&&r.push("/")),void 0!==e.path){var u=e.path;t.absolutePath||o&&o.absolutePath||(u=$(u)),void 0===i&&(u=u.replace(/^\/\//,"/%2F")),r.push(u)}return void 0!==e.query&&(r.push("?"),r.push(e.query)),void 0!==e.fragment&&(r.push("#"),r.push(e.fragment)),r.join("")}function R(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={};return arguments[3]||(e=D(L(e,n),n),t=D(L(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=$(t.path||""),r.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=$(t.path||""),r.query=t.query):(t.path?("/"===t.path.charAt(0)?r.path=$(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path:r.path="/"+t.path,r.path=$(r.path)),r.query=t.query):(r.path=e.path,void 0!==t.query?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}function U(e,t){return e&&e.toString().replace(t&&t.iri?s.PCT_ENCODED:a.PCT_ENCODED,j)}var M={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},z={scheme:"https",domainHost:M.domainHost,parse:M.parse,serialize:M.serialize},B={},q="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",W="[0-9A-Fa-f]",V=n(n("%[EFef][0-9A-Fa-f]%"+W+W+"%"+W+W)+"|"+n("%[89A-Fa-f][0-9A-Fa-f]%"+W+W)+"|"+n("%"+W+W)),H=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),J=new RegExp(q,"g"),K=new RegExp(V,"g"),G=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',H),"g"),Z=new RegExp(t("[^]",q,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),X=Z;function Y(e){var t=j(e);return t.match(J)?t:e}var Q={scheme:"mailto",parse:function(e,t){var n=e,r=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var o=!1,i={},a=n.query.split("&"),s=0,u=a.length;s<u;++s){var c=a[s].split("=");switch(c[0]){case"to":for(var l=c[1].split(","),f=0,p=l.length;f<p;++f)r.push(l[f]);break;case"subject":n.subject=U(c[1],t);break;case"body":n.body=U(c[1],t);break;default:o=!0,i[U(c[0],t)]=U(c[1],t)}}o&&(n.headers=i)}n.query=void 0;for(var d=0,h=r.length;d<h;++d){var v=r[d].split("@");if(v[0]=U(v[0]),t.unicodeSupport)v[1]=U(v[1],t).toLowerCase();else try{v[1]=w(U(v[1],t).toLowerCase())}catch(e){n.error=n.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}r[d]=v.join("@")}return n},serialize:function(e,t){var n,r=e,i=null!=(n=e.to)?n instanceof Array?n:"number"!=typeof n.length||n.split||n.setInterval||n.call?[n]:Array.prototype.slice.call(n):[];if(i){for(var a=0,s=i.length;a<s;++a){var u=String(i[a]),c=u.lastIndexOf("@"),l=u.slice(0,c).replace(K,Y).replace(K,o).replace(G,S),f=u.slice(c+1);try{f=t.iri?_(f):w(U(f,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}i[a]=l+"@"+f}r.path=i.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var d=[];for(var h in p)p[h]!==B[h]&&d.push(h.replace(K,Y).replace(K,o).replace(Z,S)+"="+p[h].replace(K,Y).replace(K,o).replace(X,S));return d.length&&(r.query=d.join("&")),r}},ee=/^([^\:]+)\:(.*)/,te={scheme:"urn",parse:function(e,t){var n=e.path&&e.path.match(ee),r=e;if(n){var o=t.scheme||r.scheme||"urn",i=n[1].toLowerCase(),a=n[2],s=o+":"+(t.nid||i),u=x[s];r.nid=i,r.nss=a,r.path=void 0,u&&(r=u.parse(r,t))}else r.error=r.error||"URN can not be parsed.";return r},serialize:function(e,t){var n=t.scheme||e.scheme||"urn",r=e.nid,o=n+":"+(t.nid||r),i=x[o];i&&(e=i.serialize(e,t));var a=e,s=e.nss;return a.path=(r||t.nid)+":"+s,a}},ne=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,re={scheme:"urn:uuid",parse:function(e,t){var n=e;return n.uuid=n.nss,n.nss=void 0,t.tolerant||n.uuid&&n.uuid.match(ne)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e,t){var n=e;return n.nss=(e.uuid||"").toLowerCase(),n}};x[M.scheme]=M,x[z.scheme]=z,x[Q.scheme]=Q,x[te.scheme]=te,x[re.scheme]=re,e.SCHEMES=x,e.pctEncChar=S,e.pctDecChars=j,e.parse=D,e.removeDotSegments=$,e.serialize=L,e.resolveComponents=R,e.resolve=function(e,t,n){var r=function(e,t){var n={scheme:"null"};if(t)for(var r in t)n[r]=t[r];return n}(0,n);return L(R(D(e,r),D(t,r),r,!0),r)},e.normalize=function(e,t){return"string"==typeof e?e=L(D(e,t),t):"object"===r(e)&&(e=D(L(e,t),t)),e},e.equal=function(e,t,n){return"string"==typeof e?e=L(D(e,n),n):"object"===r(e)&&(e=L(e,n)),"string"==typeof t?t=L(D(t,n),n):"object"===r(t)&&(t=L(t,n)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?s.ESCAPE:a.ESCAPE,S)},e.unescapeComponent=U,Object.defineProperty(e,"__esModule",{value:!0})},"object"===s(t)&&void 0!==e?a(t):(o=[t],void 0===(i="function"==typeof(r=a)?r.apply(t,o):r)||(e.exports=i))}]);const nt=function(e,t,n,r){let o;n="string"==typeof n?[n]:n;for(const i of e){const e=[...n];let a=t["localization-strings"][i];for(;a&&e.length;)a=a[e.shift()];if(o=r||"string"==typeof a?a:void 0,o)break}return o},rt=async(e,t,n)=>{const r=new URL(n||globalThis.location.href.replace(/(index\.html)?#.*$/,""));return r.search="",r.pathname=e,r.hash=t?"#/"+t:"",(await tt.resolveRefsAt(r.toString(),{loaderOptions:{processContent(e,t){t(void 0,JSON.parse(e.text||e.body.toString()))}}})).resolved},ot=function({field:e,schemaItems:t,metadataObj:n,getFieldAliasOrName:r,lang:o}){const i=t.findIndex((t=>t.title===e)),a=t[i],s=n.fields[e],u={aliases:null,fieldValueAliasMap:null,rawFieldValueAliasMap:null,fieldName:r(e),fieldSchema:a,fieldSchemaIndex:i,preferAlias:s.prefer_alias,lang:s.lang};let c=s&&s["fieldvalue-aliases"];return c&&(c.localeKey&&(c=nt(o,n,c.localeKey.split("/"),!0)),u.rawFieldValueAliasMap=JSON.parse(JSON.stringify(c)),u.aliases=[],a.enum&&a.enum.length?a.enum.forEach((t=>{u.aliases.push(nt(o,n,["fieldvalue",e,t],!0)),t in c&&"string"==typeof c[t]&&u.aliases.push(...c[t])})):Object.entries(c).forEach((([e,t])=>{Array.isArray(t)||(t=Object.values(t)),u.aliases.push(...t.filter((e=>t.every((t=>t===e||!t.toLowerCase().startsWith(e.toLowerCase()))))).map((t=>t+" ("+e+")")))})),u.fieldValueAliasMap=JSON.parse(JSON.stringify(c))),u},it=function({metadataObj:e,schemaItems:t,getFieldAliasOrName:n,lang:r,callback:o}){e.table.browse_fields.forEach(((i,a)=>{"string"==typeof i&&(i={set:[i]}),i.name||(i.name=i.set.join(","));const s=i.name,u=i.set,{presort:c}=i,l=u.map((o=>ot({lang:r,field:o,schemaItems:t,metadataObj:e,getFieldAliasOrName:n})));o({setName:s,browseFields:l,i:a,presort:c})}))};class at{constructor({metadataObj:e}){this.metadataObj=e}getFieldLang(e){const{metadataObj:t}=this,n=t&&t.fields;return n&&n[e]&&n[e].lang}getFieldMatchesLocale({namespace:e,preferredLocale:t,schemaItems:n,pluginsForWork:r}){const{metadataObj:o}=this;return i=>{const a=(({namespace:e,preferredLocale:t})=>{const n=localStorage.getItem(e+"-langCodes"),r=n&&JSON.parse(n)||[t],o=[];return r.forEach((e=>{const t=e.replace(/-.*$/,"");t===e?o.push(e):o.push(e,t)})),o})({namespace:e,preferredLocale:t});if(r.isPluginField({namespace:e,field:i})){let[,,n]=r.getPluginFieldParts({namespace:e,field:i});return"{locale}"===n&&(n=t),!n||a.includes(n)}const s=this.getFieldLang(i),u=o&&o["localization-strings"];return u&&Object.keys(u).some((e=>{const t=u[e]&&u[e].fieldvalue;return t&&t[i]}))||s&&a.includes(s)||n.some((e=>e.title===i&&"string"!==e.type))}}}const st=e=>e.replaceAll("^","^^").replaceAll("-","^0"),ut=e=>e?e.replaceAll(/(\^+)0/g,((e,t)=>t.length%2?t.slice(1)+"-":e)).replaceAll("^^","^"):e;class ct{constructor({pluginsInWork:e,pluginFieldMappings:t,pluginObjects:n}){this.pluginsInWork=e,this.pluginFieldMappings=t,this.pluginObjects=n}getPluginObject(e){const t=this.pluginsInWork.findIndex((([t])=>t===e));return this.pluginObjects[t]}iterateMappings(e){this.pluginFieldMappings.forEach((({placement:t,"applicable-fields":n},r)=>{const[o,{onByDefault:i,lang:a,meta:s}]=this.pluginsInWork[r],u=this.getPluginObject(o);e({plugin:u,placement:t,applicableFields:n,pluginName:o,pluginLang:a,onByDefaultDefault:i,meta:s})}))}processTargetLanguages(e,t){return!!e&&(Object.entries(e).forEach((([e,{targetLanguage:n,onByDefault:r,meta:o}])=>{Array.isArray(n)?n.forEach((n=>{t({applicableField:e,targetLanguage:n,onByDefault:r,metaApplicableField:o})})):t({applicableField:e,targetLanguage:n,onByDefault:r,metaApplicableField:o})})),!0)}isPluginField({namespace:e,field:t}){return t.startsWith(`${e}-plugin-`)}getPluginFieldParts({namespace:e,field:t}){let n,r,o;return(t=t.replace(`${e}-plugin-`,"")).includes("-")?[n,r,o]=t.split("-"):n=t,[n,r,o].map(ut)}}const lt=async function({lang:e,fallbackLanguages:t,work:n,files:r,allowPlugins:o,basePath:i,languages:a,preferredLocale:s}){const u=await l(r),c=u?.["localization-strings"],f=await ue({messageStyle:"plainNested",locales:e,defaultLocales:t,async localeStringFinder({locales:e,defaultLocales:t}={}){const n=[...e,...t].find((e=>e in c));return{locale:n,strings:{head:{},body:c[n]}}}});let p;const d=u.groups.find((e=>(p=e.files.find((t=>n===f(["workNames",e.id,t.name]))),Boolean(p)))),h=u.groups.map((e=>({name:f(e.name.localeKey),workNames:e.files.map((t=>f(["workNames",e.id,t.name]))),shortcuts:e.files.map((e=>e.shortcut))}))),v=function(e,t,n){const r=(e.baseDirectory||"")+(t.baseDirectory||"")+"/",o=(e.schemaBaseDirectory||"")+(t.schemaBaseDirectory||"")+"/",i=(e.metadataBaseDirectory||"")+(t.metadataBaseDirectory||"")+"/";return{file:r+n.file.$ref,schemaFile:n.schemaFile?o+n.schemaFile:"",metadataFile:n.metadataFile?i+n.metadataFile:""}}(u,d,p),{file:g}=v;let y,m,{schemaFile:b,metadataFile:w}=v,_="",x="";b||(b=g,_="schema"),w||(w=g,x="metadata");let S,j=[],E=[];if(o){const e=u["plugin-field-mapping"][d.id][p.name];e&&(S=Object.keys(e),m=Object.entries(u.plugins).filter((([e])=>S.includes(e))),E=m.map((([t])=>e[t])),j=m.map((([,e])=>e.path)),y=m)}const k=await rt(w,x,i),O=function(t){const n=k.fields&&k.fields[t];let r,o;return n&&(o=n.alias),o?"string"==typeof o?r=o:(o=o.localeKey,r=nt(e,k,o.split("/"))):(r=n.name,"object"==typeof r&&(r=r.localeKey,r=nt(e,k,r.split("/")))),r},A=E,F="undefined"==typeof process?location.href.slice(0,location.href.lastIndexOf("/")+1):process.cwd()+"/",I=await Promise.all([rt(b,_,i),y?Promise.all(j.map((async e=>await import(F+e)))):null]),D=I[0],P=I[1],N=P?new ct({pluginsInWork:m,pluginFieldMappings:A,pluginObjects:P}):null,T=D.items.items,C=T.map((({title:e})=>({field:e,fieldAliasOrName:O(e)||e}))),$=new at({metadataObj:k});if(a&&N){console.log("pluginsForWork",N);const{lang:e,namespace:t}=this;N.iterateMappings((({pluginName:n,pluginLang:r,onByDefaultDefault:o,placement:i,applicableFields:u,meta:c})=>{const l=({applicableField:u,targetLanguage:l,onByDefault:p,metaApplicableField:d}={})=>{const h=N.getPluginObject(n)||{},v=$.getFieldLang(u);h.getTargetLanguage&&(l=h.getTargetLanguage({applicableField:u,targetLanguage:l,pluginLang:r,applicableFieldLang:v}));const g=(({pluginName:e,applicableField:t,targetLanguage:n})=>st(e)+(t?"-"+st(t):"-")+(n?"-"+st(n):""))({pluginName:n,applicableField:u,targetLanguage:l||r||v});"{locale}"===l&&(l=s);const y=nt(e,k,["fieldnames",u]),m=h.getFieldAliasOrName?h.getFieldAliasOrName({locales:e,workI18n:f,targetLanguage:l,applicableField:u,applicableFieldI18N:y,meta:c,metaApplicableField:d,targetLanguageI18N:a.getLanguageFromCode(l)}):a.getFieldNameFromPluginNameAndLocales({pluginName:n,workI18n:f,targetLanguage:l,applicableFieldI18N:y,meta:c,metaApplicableField:d});C.splice("end"===i?Number.POSITIVE_INFINITY:i,0,{field:`${t}-plugin-${g}`,fieldAliasOrName:m,onByDefault:"boolean"==typeof p?p:o||!1,applicableField:u,metaApplicableField:d,fieldLang:l})};N.processTargetLanguages(u,l)||l()}))}return{fileData:p,workI18n:f,getFieldAliasOrName:O,metadataObj:k,schemaObj:D,schemaItems:T,fieldInfo:C,pluginsForWork:N,groupsToWorks:h,metadata:$}},ft=({r:e})=>{e.addEventListener("updatefound",(t=>{console.log("update found",t);const n=e.installing;n.addEventListener("statechange",(async()=>{const{state:e}=n;switch(e){case"installing":console.log("Installing new worker");break;case"installed":console.log("Installation status",e),await Qe.alert("\nA new version of this offlinable app has been downloaded.\n\nIf you have work to complete in this tab, you can dismiss\nthis dialog now and continue working with the old version.\n\nHowever, when you are finished, you should close this tab\nand any other old tabs for this site in order to be able to\nbegin using the new version.\n");break;case"redundant":console.log("Installation status",e),await Qe.alert("\nThere was an error during installation (to allow offline/speeded\ncache use).\n\nIf you have work to complete in this tab, you can dismiss\nthis dialog now and continue working with the old version.\n\nHowever, when you are finished, you may wish to close this tab\nand any other old tabs for this site in order to try again\nfor offline installation.\n");break;case"activating":console.log("Activating new worker");break;case"activated":console.log("Activated new worker");break;default:throw new Error(`Unknown worker update state: ${e}`)}}))}))},pt=async({r:e,logger:t})=>new Promise((async()=>{navigator.serviceWorker.addEventListener("message",(({data:n})=>{const{message:r,type:o,name:i,errorType:a}=n;switch(console.log("msg1",r,e),o){case"log":return void t.addLogEntry({text:r});case"beginInstall":return void t.addLogEntry({text:"Install: Begun..."});case"finishedInstall":return void t.addLogEntry({text:"Install: Finished..."});case"beginActivate":return t.addLogEntry({text:"Activate: Caching finished"}),void t.addLogEntry({text:"Activate: Begin database resources storage..."});case"finishedActivate":return t.addLogEntry({text:"Activate: Finished..."}),void location.reload();case"error":t.addLogEntry({text:r+("dbError"===a?`Database error ${i}`:"")+"; trying again..."});break;default:console.error("Unexpected type",o)}}));const n=e.installing||e.waiting||e.active;n&&"redundant"===n.state?(await Qe.alert('\nThere was likely an error installing. Click "ok" to try again.\n(Error code: Service worker is redundant)\n'),location.reload()):e.installing?console.log("INSTALLING"):e.waiting&&await Qe.alert("\nAn update is in progress. After finishing any work\nyou have in them, please close this and any other existing tabs\nrunning this web application and then open the site again.\nPlease note it may take some time to install and may not show\nany indication it is installing.\n",{ok:!1})})),dt=async({serviceWorkerPath:e,logger:t})=>{let n;console.log("--ready to register service worker",e);try{n=await navigator.serviceWorker.register(e,{type:"module"})}catch(t){return console.log("serviceWorkerPath",e),void await Qe.alert("\nThere was an error during registration (for offline ability).\nPlease refresh the page if you wish to reattempt.\n")}return t.addLogEntry({text:"Worker registration: Complete"}),pt({r:n,logger:t})},ht=e=>e?e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;"):"";var vt={main({langs:e,languages:t,followParams:n,$p:r}){Ve("form",{class:"focus",id:"languageSelectionContainer",$on:{submit(e){e.preventDefault()}}},[["select",{name:"lang",size:e.length,$on:{click({target:{parentNode:{selectedOptions:e}}}){n("#languageSelectionContainer",(()=>{r.set("lang",e[0].value,!0)}))}}},e.map((({code:e})=>["option",{value:e},[t.getLanguageFromCode(e)]]))]],De("#main")),history.state&&"object"==typeof history.state&&xe(document.querySelector("#languageSelectionContainer"),history.state)}};const gt=["aqua","black","blue","fuchsia","gray","green","lime","maroon","navy","olive","purple","red","silver","teal","white","yellow"],yt=["Helvetica, sans-serif","Verdana, sans-serif","Gill Sans, sans-serif","Avantgarde, sans-serif","Helvetica Narrow, sans-serif","sans-serif","Times, serif","Times New Roman, serif","Palatino, serif","Bookman, serif","New Century Schoolbook, serif","serif","Andale Mono, monospace","Courier New, monospace","Courier, monospace","Lucidatypewriter, monospace","Fixed, monospace","monospace","Comic Sans, Comic Sans MS, cursive","Zapf Chancery, cursive","Coronetscript, cursive","Florence, cursive","Parkavenue, cursive","cursive","Impact, fantasy","Arnoldboecklin, fantasy","Oldtown, fantasy","Blippo, fantasy","Brushstroke, fantasy","fantasy"],mt=Ze.repeat(2),bt=Ze.repeat(3),wt=()=>({form:De("form#browse"),random:De("#rand")||{checked:!1},checkboxes:Pe("input[type=checkbox]")});var _t={bdo:({fallbackDirection:e,message:t})=>["div",{style:"display: inline; direction: "+e},[t]],columnsTable:({lDirectional:e,fieldInfo:t,$p:n,lElement:r,lIndexedParam:o,l:i,fieldMatchesLocale:a})=>["table",{border:"1",cellpadding:"5",align:"center"},[["tr",[["th",[e("fieldno")]],["th",{align:"left",width:"20"},[e("field_enabled")]],["th",[e("field_title")]],["th",[e("fieldinterlin")]],["th",[e("fieldcss")]]]],...t.map(((e,a)=>{const s=a+1,u="checked"+s,c="field"+s,l=n.get(c);return["tr",[["td",[String(s)]],r("check-columns-to-browse","td","title",{},[r("yes","input","value",{class:"fieldSelector",id:u,name:o("checked")+s,checked:n.get(u)!==i("no")&&(n.has(u)||!1!==e.onByDefault),type:"checkbox"})]),r("check-sequence","td","title",{},[["select",{name:o("field")+s,id:c,size:"1"},t.map((({field:e,fieldAliasOrName:t},r)=>["option",{dataset:{name:e},value:t,selected:l&&l===t||r===a&&!n.has(c)},[t]]))]]),["td",[r("interlinear-tips","input","title",{name:o("interlin")+s,value:n.get("interlin"+s)})]],["td",[["input",{name:o("css")+s,value:n.get("css"+s)}]]]]]})),["tr",[["td",{colspan:3},[r("check_all","input","value",{type:"button",$on:{click(){Pe(".fieldSelector").forEach((e=>{e.checked=!0}))}}}),r("uncheck_all","input","value",{type:"button",$on:{click(){Pe(".fieldSelector").forEach((e=>{e.checked=!1}))}}}),r("checkmark_locale_fields_only","input","value",{type:"button",$on:{click(){t.forEach(((e,t)=>{const n=t+1,r=De("#field"+n).selectedOptions[0].dataset.name;De("#checked"+n).checked=a(r)}))}}})]]]]]],advancedFormatting:({lDirectional:e,lParam:t,l:n,lOption:r,lElement:o,$p:i,hideFormattingSection:a})=>["td",{id:"advancedformatting",style:{display:a?"none":"block"}},[["h3",[e("advancedformatting")]],["label",[e("textcolor"),mt,["select",{name:t("colorName")},gt.map(((e,t)=>{const o={value:n(["param_values","colors",e]),selected:null};return(i.get("colorName")===n(["param_values","colors",e])||1===t&&!i.has("colorName"))&&(o.selected="selected"),r(["param_values","colors",e],o)}))]]],["label",[Ze,e("or_entercolor"),mt,["input",{name:t("color"),type:"text",value:i.get("color")||"#",size:"7",maxlength:"7"}]]],["br"],["br"],["label",[e("backgroundcolor"),mt,["select",{name:t("bgcolorName")},gt.map(((e,t)=>{const o={value:n(["param_values","colors",e]),selected:null};return(i.get("bgcolorName")===n(["param_values","colors",e])||14===t&&!i.has("bgcolorName"))&&(o.selected="selected"),r(["param_values","colors",e],o)}))]]],["label",[Ze,e("or_entercolor"),mt,["input",{name:t("bgcolor"),type:"text",value:i.get("bgcolor")||"#",size:"7",maxlength:"7"}]]],["br"],["br"],["label",[e("text_font"),mt,["select",{name:t("fontSeq"),dir:"ltr"},yt.map(((e,t)=>{const n={value:e,selected:null};return(i.get("fontSeq")===e||7===t&&!i.has("fontSeq"))&&(n.selected="selected"),["option",n,[e]]}))]]],["br"],["br"],["label",[e("font_style"),mt,["select",{name:t("fontstyle")},["italic","normal","oblique"].map(((e,t)=>{const o={value:n(["param_values","fontstyle",e]),selected:null};return(i.get("fontstyle")===n(["param_values","fontstyle",e])||1===t&&!i.has("fontstyle"))&&(o.selected="selected"),r(["param_values","fontstyle",e],o)}))]]],["br"],["div",[e("font_variant"),bt,["label",[["input",{name:t("fontvariant"),type:"radio",value:n(["param_values","fontvariant","normal"]),checked:i.get("fontvariant")!==e(["param_values","fontvariant","small-caps"])}],e(["param_values","fontvariant","normal"]),Ze]],["label",[["input",{name:t("fontvariant"),type:"radio",value:n(["param_values","fontvariant","small-caps"]),checked:i.get("fontvariant")===e(["param_values","fontvariant","small-caps"])}],e(["param_values","fontvariant","small-caps"]),Ze]]]],["br"],["label",[e("font_weight")," (normal, bold, 100-900, etc.):",mt,["input",{name:t("fontweight"),type:"text",value:i.has("fontweight")?i.get("fontweight"):"normal",size:"7",maxlength:"12"}]]],["br"],["label",[e("font_size")," (14pt, 14px, small, 75%, etc.):",mt,["input",{name:t("fontsize"),type:"text",value:i.get("fontsize"),size:"7",maxlength:"12"}]]],["br"],["label",{dir:"ltr"},[e("font_stretch"),Ze,["select",{name:t("fontstretch")},["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"].map((t=>{const n={value:e(["param_values","font-stretch",t]),selected:null};return(i.get("fontstretch")===t||!i.has("fontstretch")&&"normal"===t)&&(n.selected="selected"),["option",n,[e(["param_values","font-stretch",t])]]}))]]],["br"],["br"],["label",[e("letter_spacing")," (normal, .9em, -.05cm): ",["input",{name:t("letterspacing"),type:"text",value:i.has("letterspacing")?i.get("letterspacing"):"normal",size:"7",maxlength:"12"}]]],["br"],["label",[e("line_height")," (normal, 1.5, 22px, 150%): ",["input",{name:t("lineheight"),type:"text",value:i.has("lineheight")?i.get("lineheight"):"normal",size:"7",maxlength:"12"}]]],["br"],["br"],o("tableformatting_tips","h3","title",{},[e("tableformatting")]),["div",[e("header_wstyles"),mt,...[["yes",e(["param_values","y"])],["no",e(["param_values","n"])],["none",e(["param_values","0"])]].map((([n,r],o,a)=>["label",[["input",{name:t("header"),type:"radio",value:r,checked:i.get("header")===r||!i.has("header")&&1===o}],e(n),o===a.length-1?"":bt]]))]],["div",[e("footer_wstyles"),mt,...[["yes",e(["param_values","y"])],["no",e(["param_values","n"])],["none",e(["param_values","0"])]].map((([n,r],o,a)=>["label",[["input",{name:t("footer"),type:"radio",value:r,checked:i.get("footer")===r||!i.has("footer")&&2===o}],e(n),o===a.length-1?"":bt]]))]],["label",[["input",{name:t("headerfooterfixed"),type:"checkbox",value:n("yes"),checked:i.get("headerfooterfixed")===n("yes")}],mt,e("headerfooterfixed-wishtoscroll")]],["br"],["div",[e("caption_wstyles"),mt,...[["yes",e(["param_values","y"])],["no",e(["param_values","n"])],["none",e(["param_values","0"])]].map((([n,r],o,a)=>["label",[["input",{name:t("caption"),type:"radio",value:r,checked:i.get("caption")===r||!i.has("caption")&&2===o}],e(n),o===a.length-1?"":bt]]))]],["br"],["div",[e("table_wborder"),mt,["label",[["input",{name:t("border"),type:"radio",value:"1",checked:"0"!==i.get("border")}],e("yes"),bt]],["label",[["input",{name:t("border"),type:"radio",value:"0",checked:"0"===i.get("border")}],e("no")]]]],["div",[e("interlin_repeat_field_names"),mt,["label",[["input",{name:t("interlintitle"),type:"radio",value:"1",checked:"0"!==i.get("interlintitle")}],e("yes"),bt]],["label",[["input",{name:t("interlintitle"),type:"radio",value:"0",checked:"0"===i.get("interlintitle")}],e("no")]]]],["label",[e("interlintitle_css"),mt,["input",{name:t("interlintitle_css"),type:"text",value:i.get("interlintitle_css")||"",size:"12"}]]],["br"],["br"],o("pageformatting_tips","h3","title",{},[e("pageformatting")]),["label",[e("page_css"),mt,["textarea",{name:t("pagecss"),title:n("page_css_tips"),value:i.get("pagecss")}]]],["br"],o("outputmode_tips","label","title",{},[e("outputmode"),mt,["select",{name:t("outputmode")},["table","div"].map((e=>{const t={value:e,selected:null};return i.get("outputmode")===e&&(t.selected="selected"),r(["param_values","outputmode",e],t)}))]])]],addRandomFormFields({lParam:e,lDirectional:t,l:n,lElement:r,$p:o,serializeParamsAsURL:i,content:a}){[[["td",{colspan:12,align:"center"},[["br"],t("or"),["br"],["br"]]]],[["td",{colspan:12,align:"center"},[["label",[t("rnd"),bt,["input",{id:"rand",name:e("rand"),type:"checkbox",value:n("yes"),checked:o.get("rand")===n("yes")}]]],bt,["label",[t("verses-context"),Ze,["input",{name:e("context"),type:"number",min:1,size:4,value:o.get("context")}]]],bt,r("view-random-URL","input","value",{type:"button",$on:{click(){const e=i({...wt(),type:"randomResult"});De("#randomURL").value=e}}}),["input",{id:"randomURL",type:"text"}]]]]].forEach((e=>{e&&e.length&&a.push(["tr",e])}))},getPreferences:({paramsSetter:e,replaceHash:t,getFieldAliasOrNames:n,work:r,langs:o,languageI18n:i,l:a,localizeParamNames:s,namespace:u,hideFormattingSection:c,preferencesPlugin:l})=>["div",{style:{textAlign:"left"},id:"preferences",hidden:"true"},[["div",{style:"margin-top: 10px;"},[["label",[a("localizeParamNames"),["input",{id:"localizeParamNames",type:"checkbox",checked:s,$on:{change(e){const t=e.target.checked;localStorage.setItem(u+"-localizeParamNames",String(t))}}}]]]]],["div",[["label",[a("Hide formatting section"),["input",{id:"hideFormattingSection",type:"checkbox",checked:c,$on:{change(e){const t=e.target.checked;De("#advancedformatting").style.display=t?"none":"block",localStorage.setItem(u+"-hideFormattingSection",String(t))}}}]]]]],["div",[["label",{for:"prefLangs"},[a("Preferred language(s)")]],["br"],["select",{id:"prefLangs",multiple:"multiple",size:o.length,$on:{change(e){const t=e.target.selectedOptions;localStorage.setItem(u+"-langCodes",JSON.stringify([...t].map((e=>e.value))))}}},o.map((e=>{let t=localStorage.getItem(u+"-langCodes");t=t&&JSON.parse(t);const n={value:e.code,selected:null};return t&&t.includes(e.code)&&(n.selected="selected"),["option",n,[i(e.code)]]}))]]],l?l({$:De,l:a,jml:Ve,paramsSetter:e,getDataForSerializingParamsAsURL:wt,work:r,replaceHash:t,getFieldAliasOrNames:n}):""]],addBrowseFields({browseFields:e,fieldInfo:t,lDirectional:n,i:r,lIndexedParam:o,$p:i,content:a}){const s=i.get("work");[r>0?[["td",{colspan:12,align:"center"},[["br"],n("or"),["br"],["br"]]]]:"",[...(()=>{const t=t=>e.reduce(((e,{fieldName:n,aliases:a,fieldSchema:{minimum:u,maximum:c}},l)=>{const f=s+"-"+o(t)+(r+1)+"-"+(l+1),p=f;return e["#"].push(["td",[["label",{for:f},[n]]]],["td",[a?["datalist",{id:"dl-"+p},a.map((e=>["option",[e]]))]:"",a?["input",{name:f,id:p,class:"browseField",list:"dl-"+p,value:i.get(f,!0),$on:"start"===t?{change(e){Pe("input.browseField").forEach((t=>{t.id.includes(r+1+"-"+(l+1))&&(t.value=e.target.value)}))}}:void 0}]:["input",{name:f,id:p,type:"number",min:u,max:c,value:i.get(f,!0)}],bt]]),e}),{"#":[]});return[t("start"),["td",[["b",[n("to")]],bt]],t("end")]})(),["td",[e.length>1?n("versesendingdataoptional"):""]]],[["td",{colspan:4*e.length+2+1,align:"center"},[["table",[["tr",[e.reduce(((e,{fieldName:t,aliases:n,fieldSchema:{minimum:a,maximum:u}},c)=>{const l=s+"-"+o("anchor")+(r+1)+"-"+(c+1),f=l;return e["#"].push(["td",[["label",{for:l},[t]]]],["td",[n?["datalist",{id:"dl-"+f},n.map((e=>["option",[e]]))]:"",n?["input",{name:l,id:f,class:"browseField",list:"dl-"+f,value:i.get(l,!0)}]:["input",{name:l,id:f,type:"number",min:a,max:u,value:i.get(l,!0)}],mt]]),e}),{"#":[["td",{style:"font-weight: bold; vertical-align: bottom;"},[n("anchored-at")+bt]]]}),["td",[["label",[n("field")+mt,["select",{name:o("anchorfield")+(r+1),size:"1"},t.map((({fieldAliasOrName:e})=>i.get(o("anchorfield")+(r+1),!0)===e?["option",{selected:!0},[e]]:["option",[e]]))]]]]]]]]]]]]].forEach((e=>{e&&e.length&&a.push(["tr",e])}))},main({l:e,namespace:t,heading:n,languageI18n:r,langs:o,fieldInfo:i,localizeParamNames:a,serializeParamsAsURL:s,paramsSetter:u,replaceHash:c,getFieldAliasOrNames:l,hideFormattingSection:f,$p:p,lParam:d,lElement:h,lDirectional:v,lIndexedParam:g,fieldMatchesLocale:y,content:m,preferencesPlugin:b}){const w=p.get("work"),_=({type:e})=>s({...wt(),type:e});Ve("div",{class:"focus"},[["div",{style:"float: left;"},[["button",{$on:{click(){const e=De("#preferences");e.hidden=!e.hidden}}},[e("Preferences")]],St.workDisplay.getPreferences({paramsSetter:u,replaceHash:c,getFieldAliasOrNames:l,work:w,langs:o,languageI18n:r,l:e,localizeParamNames:a,namespace:t,hideFormattingSection:f,preferencesPlugin:b})]],["h2",[n]],["br"],["form",{id:"browse",$custom:{$submit(){const e=_({type:"saveSettings"}).replace(/^[^#]*#/,"");console.log("history thisParams",e),history.replaceState(e,document.title,location.href);const t=_({type:"result"});location.href=t}},$on:{keydown(e){const{target:t}=e;"Enter"===e.key&&"textarea"!==t.localName.toLowerCase()&&this.$submit()},submit(e){e.preventDefault(),this.$submit()}},name:d("browse")},[["table",{align:"center"},m],["br"],["div",{style:"margin-left: 20px"},[["br"],["br"],["table",{border:"1",align:"center",cellpadding:"5"},[["tr",{valign:"top"},[["td",[St.workDisplay.columnsTable({lDirectional:v,fieldInfo:i,$p:p,lElement:h,lIndexedParam:g,l:e,fieldMatchesLocale:y}),h("save-settings-URL","input","value",{type:"button",$on:{click(){const e=_({type:"saveSettings"});De("#settings-URL").value=e}}}),["input",{id:"settings-URL"}],["br"],["button",{$on:{async click(e){e.preventDefault();const t=u({...wt(),workName:w,type:"startEndResult"}),n=c(t)+`&work=${w}&${w}-startEnd1=%s`;try{await navigator.clipboard.writeText(n)}catch(e){}}}},[e("Copy_shortcut_URL")]]]],St.workDisplay.advancedFormatting({lDirectional:v,lParam:d,l:e,lOption:(t,n)=>["option",n,[e(t)]],lElement:h,$p:p,hideFormattingSection:f})]]]]]],["p",{align:"center"},[h("submitgo","input","value",{type:"submit"})]]]]],De("#main"))}},xt={caption:({heading:e,ranges:t})=>e+" "+t,startSeparator:({l:e})=>e("colon"),innerBrowseFieldSeparator:({l:e})=>e("comma-space"),ranges:({l:e,startRange:t,endVals:n,rangeNames:r})=>t+"-"+n.join(St.resultsDisplayServerOrClient.startSeparator({l:e}))+" ("+r+")",fieldValueAlias:({key:e,value:t})=>t+" ("+e+")",interlinearSegment:({lang:e,dir:t,html:n})=>`<span${e?` lang="${e}"`:""}${t?` dir="${t}"`:""}>${n}</span>`,interlinearTitle:({l:e,val:t})=>`<span class="interlintitle">${t}</span>${e("colon-space")}`,styles({$p:e,$pRaw:t,$pRawEsc:n,$pEscArbitrary:r,escapeCSS:o,tableWithFixedHeaderAndFooter:i,checkedFieldIndexes:a,hasCaption:s}){const u=e.has("color",!0)&&"#"!==e.get("color",!0)?r("color"):n("colorName"),c=e.has("bgcolor",!0)&&"#"!==e.get("bgcolor",!0)?r("bgcolor"):n("bgcolorName"),l=1+(0+(s?2:0)),f=l+1+"em",p="0.5em",d=`100% - ${f} - 2em - ${p}`;return["style",[(i?`\nhtml, body, #main, #main > div {\n height: 100%; /* Needed to ensure descendent heights retain 100%; could be avoided if didn't want percent on table height */\n overflow-y: hidden; /* Not sure why we're getting extra here, but... */\n}\n.anchor-table-header {\n background-color: ${c||"white"}; /* Header background (not just for div text inside header, but for whole header area) */\n overflow-x: hidden; /* Not sure why we're getting extra here, but... */\n position: relative; /* Ensures we are still flowing, but provides anchor for absolutely positioned thead below (absolute positioning positions relative to nearest non-static ancestor; clear demo at https://www.w3schools.com/cssref/playit.asp?filename=playcss_position&preval=fixed ) */\n padding-top: ${f}; /* Provides space for the header (and caption) (the one that is absolutely positioned below relative to here) */\n height: 100%; /* Percent of the whole screen taken by the table */\n}\n.anchor-table-body {\n overflow-y: auto; /* Provides scrollbars when text fills up beyond the height */\n height: ${`calc(${d})`}; /* If < 100%, the header anchor background color will seep below table */\n}\n\n.caption, .thead .th, .tfoot .th {\n line-height: 0; /* th div will have own line-height; reducing here avoids fattening it by an inner div */\n color: transparent; /* Hides the non-div duplicated header text */\n white-space: nowrap; /* Ensures column header text uses up full width without overlap (esp. wrap no longer seems to work); this must be applied outside of the div */\n border: none; /* We don't want a border for this invisible section */\n}\ndiv.inner-caption, .thead .th div.th-inner, .tfoot .th div.th-inner { /* divs are used as th is supposedly problematic */\n position: absolute; /* Puts relative to nearest non-static ancestor (our relative header anchor) */\n color: initial; /* Header must have an explicit color or it will get transparent container color */\n line-height: normal; /* Revert ancestor line height of 0 */\n}\n.thead .th div.th-inner {\n top: ${l}em; /* Ensures our header stays fixed at top outside of normal flow of table */\n}\ndiv.inner-caption {\n top: 1em;\n}\n.tfoot .th div.th-inner { /* divs are used as th is supposedly problematic */\n top: ${`calc(${d} + ${p})`}; /* Ensures our header stays fixed at top outside of normal flow of table */\n}\n.zupa div.zupa1 {\n margin: 0 auto !important;\n width: 0 !important;\n}\n.zupa div.th-inner, .zupa div.inner-caption {\n width: 100%;\n margin-left: -50%;\n text-align: center;\n}\n`:"")+("y"===t("caption")?i?".caption div.inner-caption, ":".caption, ":"")+("y"===t("header")?i?"":".thead .th, ":"")+("y"===t("footer")?i?"":".tfoot .th, ":"")+".tbody td"+` {\n vertical-align: top;\n font-style: ${n("fontstyle")};\n font-variant: ${n("fontvariant")};\n font-weight: ${r("fontweight")};\n ${r("fontsize")?`font-size: ${r("fontsize")};`:""}\n font-family: ${r("fontSeq")};\n\n font-stretch: ${n("fontstretch")};\n letter-spacing: ${r("letterspacing")};\n line-height: ${r("lineheight")};\n ${u?`color: ${o(u)};`:""}\n ${c?`background-color: ${o(c)};`:""}\n}\n${o(r("pagecss")||"")}\n`+a.map(((e,n)=>("y"===t("header")?i?`.thead .th:nth-child(${n+1}) div.th-inner, `:`.thead .th:nth-child(${n+1}), `:"")+("y"===t("footer")?i?`.tfoot .th:nth-child(${n+1}) div.th-inner, `:`.tfoot .th:nth-child(${n+1}), `:"")+`.tbody td:nth-child(${n+1}) `+`{\n ${r("css"+(e+1))}\n}\n`)).join("")+(r("interlintitle_css")?`\n /* http://salzerdesign.com/test/fixedTable.html */\n .interlintitle {\n ${o(r("interlintitle_css"))}\n }\n `:"")+(c?`\nbody {\n background-color: ${c};\n}\n`:"")]]},main({tableData:e,$p:t,$pRaw:n,$pRawEsc:r,$pEscArbitrary:o,escapeCSS:i,escapeHTML:a,l:s,localizedFieldNames:u,fieldLangs:c,fieldDirs:l,caption:f,hasCaption:p,showInterlinTitles:d,determineEnd:h,getCanonicalID:v,canonicalBrowseFieldSetName:g,getCellValue:y,checkedAndInterlinearFieldInfo:m,showEmptyInterlinear:b,showTitleOnSingleInterlinear:w,interlinearSeparator:_="<br /><br />"}){const x={table:[["table",{class:"table",border:n("border")||"0"}],["tr",{class:"tr"}],["td"],["th",{class:"th"}],["caption",{class:"caption"}],["thead",{class:"thead"}],["tbody",{class:"tbody"}],["tfoot",{class:"tfoot"}]],div:[["div",{class:"table",style:"display: table;"}],["div",{class:"tr",style:"display: table-row;"}],["div",{class:"td",style:"display: table-cell;"}],["div",{class:"th",style:"display: table-cell;"}],["div",{class:"caption",style:"display: table-caption;"}],["div",{class:"thead",style:"display: table-header-group;"}],["div",{class:"tbody",style:"display: table-row-group;"}],["div",{class:"tfoot",style:"display: table-footer-group;"}]],"json-array":"json","json-object":"json"},S=t.get("outputmode",!0);switch(S){case"json-object":case"json-array":throw new Error("JSON object support is currently not available")}const j=x[Object.hasOwn(x,S)&&S?S:"table"],[E,k,O,A,F,I,D,P]=j,[N,T,C]=m,$="yes"===n("headerfooterfixed"),L=(e,t)=>((e=JSON.parse(JSON.stringify(e))).push(t),e),R=([e,t],n)=>[e,{...t,...n}],U={start:!1,end:!1},M=[],z=(e,t)=>{if(!b){if(!t){const t=(new DOMParser).parseFromString(e,"text/html").body;[...t.querySelectorAll("br")].forEach((e=>{e.remove()})),e=t.innerHTML}if(!e.trim())return!0}};return e.some(((e,t)=>{const n=h({tr:e,foundState:U});if("boolean"==typeof n)return n;const r=v({tr:e});return M.push(L(R(k,{dataset:{row:n,"canonical-type":g,"canonical-id":r}}),T.map(((n,r)=>{const o=C[r],i=o,{tdVal:a,htmlEscaped:f}=y({tr:e,idx:n}),p=i&&o.map((t=>{const{tdVal:n,htmlEscaped:r}=y({tr:e,idx:t});console.log("showEmptyInterlinear",b,r);return z(n,r)?"":i?St.resultsDisplayServerOrClient.interlinearSegment({lang:c[t],dir:l[t],html:(d?St.resultsDisplayServerOrClient.interlinearTitle({l:s,val:u[t]}):"")+n}):n})).filter((e=>""!==e));return R(O,{id:"row"+(t+1)+"col"+(r+1),lang:c[n],dir:l[n],dataset:{col:u[n]},innerHTML:(i&&!z(a,f)&&(w||p?.length)?St.resultsDisplayServerOrClient.interlinearSegment({lang:c[n],html:(d?St.resultsDisplayServerOrClient.interlinearTitle({l:s,val:u[n]}):"")+a}):a)+(o&&p&&p.length?_+p.join(_):"")})})))),!1})),["div",[St.resultsDisplayServerOrClient.styles({$p:t,$pRaw:n,$pRawEsc:r,$pEscArbitrary:o,escapeCSS:i,tableWithFixedHeaderAndFooter:$,checkedFieldIndexes:T,hasCaption:p}),(B=[L(E,[f?L(F,[f,$?["div",{class:"zupa1"},[["div",{class:"inner-caption"},[["span",[f]]]]]]:""]):"","0"!==n("header")?L(I,[L(k,N.map(((e,t)=>{const n=C[t];return e=a(e)+(n?s("comma-space")+n.map((e=>u[e])).join(s("comma-space")):""),L(A,[e,$?["div",{class:"zupa1"},[["div",{class:"th-inner"},[["span",[e]]]]]]:""])})))]):"",n("footer")&&"0"!==n("footer")?L(P,[L(k,N.map(((e,t)=>{const n=C[t];return e=a(e)+(n?s("comma-space")+n.map((e=>u[e])).join(s("comma-space")):""),L(A,[e,$?["div",{class:"zupa1"},[["div",{class:"th-inner"},[["span",[e]]]]]]:""])})))]):"",L(D,M)])],$?["div",{class:"table-responsive anchor-table-header zupa"},[["div",{class:"table-responsive anchor-table-body"},B]]]:["div",{class:"table-responsive"},B])]];var B}};const St={languageSelect:vt,workSelect:function({groups:e,workI18n:t,getNextAlias:n,$p:r,followParams:o}){const i=Ve("form",{id:"workSelect",class:"focus",$on:{submit(e){e.preventDefault()}}},e.map(((e,i)=>["div",[i>0?["br","br","br"]:"",["div",[t(e.directions.localeKey)]],["br"],["select",{class:"file",name:"work"+i,dataset:{name:e.name.localeKey},$on:{change(e){const t=e.target.value;o("#workSelect",(()=>{r.set("work",t)}))}}},[["option",{value:""},["--"]],...e.files.map((({name:r})=>["option",{value:t(["workNames",e.id,r])},[n()]]))]]]])),De("#main"));return history.state&&"object"==typeof history.state&&xe(document.querySelector("#workSelect"),history.state),i},workDisplay:_t,resultsDisplayServerOrClient:xt,resultsDisplayClient:{anchorRowCol:({anchorRowCol:e})=>De("#"+e),anchors:({escapedRow:e,escapedCol:t})=>De('tr[data-row="'+e+'"]'+(t?'> td[data-col="'+t+'"]':"")),main(e){let t;try{t=St.resultsDisplayServerOrClient.main(e)}catch(e){const t=e;return void("JSON support is currently not available"===t.message?Qe.alert(t.message):console.error(t))}Ve(...t,De("#main"))}},defaultBody(){for(;Ge.hasChildNodes();)Ge.firstChild?.remove();return Ve("div",{id:"main",role:"main"},Ge)},permissions:{versionChange(){De("#versionChange")?.showModal()},addLogEntry({text:e}){const t=De("#installationLogContainer");try{t.showModal();De("#dialogContainer").hidden=!1}catch(e){}De("#installationLog").append(e+"\n")},exitDialogs(){const e=De("#dialogContainer");e&&(e.hidden=!0)},dbError({type:e,escapedErrorMessage:t}){e&&Ve("span",[e," ",t],De("#dbError")),De("#dbError").showModal()},errorRegistering(e){e&&Ve("span",[e],De("#errorRegistering")),De("#errorRegistering").showModal()},browserNotGrantingPersistence(){De("#browserNotGrantingPersistence").showModal()},main({siteI18n:e,ok:t,refuse:n,close:r,closeBrowserNotGranting:o}){const i=Ve("dialog",{style:"text-align: center; height: 100%",id:"installationLogContainer",class:"focus"},[["p",[e("wait-installing")]],["div",{style:"height: 80%; overflow: auto;"},[["pre",{id:"installationLog"},[]]]]]);let a="";t&&n&&r&&(a=Ve("dialog",{id:"willRequestStoragePermissions",$on:{close:r}},[["section",[e("will-request-storage-permissions")]],["br"],["div",{class:"focus"},[["button",{$on:{click:t}},[e("OK")]],["br"],["br"],["button",{$on:{click:n}},[e("refuse-request-storage-permissions")]]]]]));const s=Ve("dialog",{id:"errorRegistering"},[["section",[e("errorRegistering")]]]);let u="";o&&(u=Ve("dialog",{id:"browserNotGrantingPersistence"},[["section",[e("browser-not-granting-persistence")]],["br"],["div",{class:"focus"},[["button",{$on:{click:o}},[e("OK")]]]]]));const c=Ve("dialog",{id:"versionChange"},[["section",[e("versionChange")]]]),l=Ve("dialog",{id:"dbError"},[["section",[e("dbError")]]]);return Ve("div",{id:"dialogContainer",style:"height: 100%"},[i,a,u,s,c,l],De("#main")),[i,a,u,s,c,l]}}};function jt(e,t){if(t||!this.localizeParamNames)return e;const n=/\d+(-\d+)?$/,r=e.match(n);if(!this.l10n)throw new Error("l10n is not defined");return r?this.l10n(["params","indexed",e.replace(n,"")])+r[0]:this.l10n(["params",e])}class Et{constructor({l10n:e,params:t}={}){this.l10n=e,this.localizeParamNames=!1,t||(t=location.hash.slice(1)),"string"==typeof t&&(t=new URLSearchParams(t)),this.params=t}get(e,t){return this.params.get(jt.call(this,e,t))}getAll(e,t){return this.params.getAll(jt.call(this,e,t))}has(e,t){return this.params.has(jt.call(this,e,t))}delete(e,t){return this.params.delete(jt.call(this,e,t))}set(e,t,n){return this.params.set(jt.call(this,e,n),t)}append(e,t,n){return this.params.append(jt.call(this,e,n),t)}toString(){return this.params.toString()}}const kt=e=>location.href.replace(/#.*$/,"")+"#"+e.toString(),Ot=function({l:e,lParam:t,$p:n}){return function({form:r,random:o={checked:!1},checkboxes:i,type:a,fieldAliasOrNames:s=[],workName:u}){const c=new URLSearchParams(n.params),l=me(r,{hash:!0,empty:!0});function f(){let e=1,t=1;for(;c.has(`${u}-start${e}-${t}`);){for(;c.has(`${u}-start${e}-${t}`);)c.delete(`${u}-start${e}-${t}`),c.delete(`${u}-end${e}-${t}`),c.delete(`${u}-anchor${e}-${t}`),t++;t=1,e++}}switch(Object.keys(l).forEach((e=>{c.set(e,l[e])})),c.delete(t("rand")),c.set(t("rand"),o.checked?e("yes"):e("no")),i.forEach((t=>{c.delete(t.name),t.name&&c.set(t.name,t.checked?e("yes"):e("no"))})),a){case"saveSettings":c.delete(t("rand"));break;case"shortcutResult":{c.delete(t("rand"));let n=1;for(;c.has(`anchorfield${n}`);)c.delete(`anchorfield${n}`),n++;for(f(),n=1;c.has(`field${n}`);)c.delete(`field${n}`),c.delete(`checked${n}`),c.delete(`interlin${n}`),c.delete(`css${n}`),n++;s.forEach(((t,n)=>{c.set(`field${n+1}`,t),c.set(`checked${n+1}`,e("yes")),c.set(`interlin${n+1}`,""),c.set(`css${n+1}`,"")})),c.delete("work")}case"startEndResult":case"randomResult":case"result":"startEndResult"===a&&f(),("randomResult"===a||o.checked)&&(c.delete(t("rand")),c.set(t("rand"),e("yes"))),c.set(t("result"),e("yes"));break;default:console.error("Unexpected type",a)}return c}};async function At({l:e,languageParam:t,lang:n,preferredLocale:r,languages:o,fallbackLanguages:i,$p:a}){const{preferencesPlugin:s}=this,u=this.langData.languages,c=localStorage.getItem(this.namespace+"-localizeParamNames"),f=a.localizeParamNames=a.has("i18n",!0)?"1"===a.get("i18n",!0):"true"===c||"false"!==c&&this.localizeParamNames,p=localStorage.getItem(this.namespace+"-hideFormattingSection"),d=a.has("formatting",!0)?"0"===a.get("formatting",!0):"true"===p||"false"!==p&&this.hideFormattingSection;try{const{workI18n:c,fileData:p,metadataObj:h,...v}=await this.getWorkData({lang:n,fallbackLanguages:i,preferredLocale:r,languages:o,work:a.get("work")});document.title=c("browserfile-workdisplay",{work:p?nt(n,h,"alias"):""}),await async function({workI18n:c,metadataObj:p,getFieldAliasOrName:h,schemaItems:v,fieldInfo:g,metadata:y,pluginsForWork:m,groupsToWorks:b}){const w=f?t=>e(["params",t]):e=>e,_=f?t=>e(["params","indexed",t]):e=>e,x=(t,n)=>e(t,n),S=y.getFieldMatchesLocale({namespace:this.namespace,preferredLocale:r,schemaItems:v,pluginsForWork:m}),j=[];this.getBrowseFieldData({metadataObj:p,schemaItems:v,getFieldAliasOrName:h,callback({browseFields:e,i:t}){St.workDisplay.addBrowseFields({browseFields:e,fieldInfo:g,lDirectional:x,i:t,lIndexedParam:_,$p:a,content:j})}});const E=function(e){const t=Ot(e);return function(e){const n=t(e);return kt(n)}}({l:e,lParam:w,$p:a}),k=Ot({l:e,lParam:w,$p:a}),{groups:O}=await l(this.files),A=nt(n,p,"heading"),F=(()=>{const e=Promise.all(b.map((async({name:e,workNames:t,shortcuts:a})=>({groupName:e,worksToFields:await Promise.all(t.map((async(e,t)=>({workName:e,shortcut:a[t],fieldAliasOrNames:(await this.getWorkData({lang:n,fallbackLanguages:i,preferredLocale:r,languages:o,work:e}))?.fieldInfo?.map((({fieldAliasOrName:e})=>e))}))))}))));return async()=>e})(),I=new Intl.DisplayNames([...n,...i],{type:"language",languageDisplay:"standard"});St.workDisplay.main({languageParam:t,workI18n:c,l:e,namespace:this.namespace,groups:O,heading:A,languageI18n:e=>I.of(e),langs:u,fieldInfo:g,localizeParamNames:f,serializeParamsAsURL:E,paramsSetter:k,replaceHash:kt,getFieldAliasOrNames:F,hideFormattingSection:d,$p:a,metadataObj:p,lParam:w,lElement:(t,n,r,o,i=[])=>(o[r]=e(t),[n,o,i]),lDirectional:x,lIndexedParam:_,fieldMatchesLocale:S,preferredLocale:r,schemaItems:v,content:j,preferencesPlugin:s})}.call(this,{workI18n:c,metadataObj:h,...v})}catch(e){const t=e;console.log("err",t),Qe.alert(t)}}const Ft=/([\.\*\+\^\$\[\]\\\(\)\|\{\}\,\-\:\?])/g,It=/^([a-zA-Z]{2,3}|[a-zA-Z]{5,8})(-[a-zA-Z]{4})?(-(?:[a-zA-Z]{2}|\d{3}))?(-(?:[a-zA-Z\d]{5,8}|\d[a-zA-Z\d]{3}))?$/;class Dt{constructor(e){if("string"!=typeof e)throw new TypeError("A string argument is expected");if(!It.test(e))throw new RangeError("A proper locale must be provided");this._locale=e}static _escapeRegExpPattern(e){return"string"!=typeof e?e:e.replace(Ft,"\\$1")}static _toLowerCase(e,t){return"string"!=typeof e?t&&e:e.toLowerCase()}static _toUpperCase(e,t){return"string"!=typeof e?t&&e:e.toUpperCase()}static _trim(e,t,n){const r=[];let o;const i=function(e){r.push("^"+e+"+|"+e+"+$")};if("boolean"==typeof t&&(n=t,t=null),"string"!=typeof e)return n?e:void 0;if(Array.isArray(t)&&t.map((e=>{const t=this._escapeRegExpPattern(e);i(t)})),"string"==typeof t){const e=this._escapeRegExpPattern(t);i(e)}t||i("\\s");const a="("+r.join("|")+")";for(o=new RegExp(a,"g");e.match(o);)e=e.replace(o,"");return e}static _parseLocale(e){if("string"!=typeof e)return;const t=It.exec(e);let n,r,o;if(!e||!t)return;const i=this._trim(t[2],["-","_"]),a=this._trim(t[3],["-","_"]);n=this._toLowerCase(t[1]),r=this._toLowerCase(i)||r,o=this._toUpperCase(a)||o;return{lang:n,script:r,countryCode:o}}_isRtlLang(){const{lang:e,script:t}=Dt._parseLocale(this._locale);return t?Dt._RTL_SCRIPTS.indexOf(t)>=0:Dt._BIDI_RTL_LANGS.indexOf(e)>=0}getTextInfo(){return{direction:this._isRtlLang()?"rtl":"ltr"}}}Dt._RTL_SCRIPTS=["adlm","arab","armi","avst","chrs","cprt","elym","hatr","hebr","hung","khar","lydi","mand","mani","mend","merc","mero","narb","nbat","nkoo","orkh","ougr","palm","phli","phlp","phnx","prti","rohg","samr","sarb","sogd","sogo","syrc","thaa","yezi"],Dt._BIDI_RTL_LANGS=["ae","aeb","ajt","apc","apd","ar","ara","arb","arc","arq","ars","ary","arz","ave","avl","bal","bcc","bej","bft","bgn","bqi","brh","cja","ckb","cld","dcc","dgl","div","drw","dv","fa","fas","fia","fub","gbz","gjk","gju","glk","grc","gwc","gwt","haz","he","heb","hnd","hno","iw","ji","kas","kby","khw","ks","kvx","kxp","kzh","lad","lah","lki","lrc","luz","mde","mfa","mki","mvy","myz","mzn","nqo","oru","ota","otk","oui","pal","pbu","per","pes","phl","phn","pnb","pra","prd","prs","ps","pus","rhg","rmt","scl","sd","sdh","shu","skr","smp","snd","sog","swb","syr","tnf","trw","ug","uig","ur","urd","wni","xco","xld","xmn","xmr","xna","xpr","xsa","ydd","yi","yid","zdj"];const Pt=e=>{const{direction:t}=new Dt(e).getTextInfo();return t},Nt=/^.* \((.*?)\)$/,Tt=e=>"string"==typeof e?e.replace(Nt,"$1"):e,Ct=async function(e){const t=await navigator.storage.persisted(),n=this.skipIndexedDB||!t||!navigator.serviceWorker.controller,r=localStorage.getItem(this.namespace+"-localizeParamNames"),{fieldInfo:o,$p:i,browseFieldSets:a,applicableBrowseFieldSet:s,lang:u,metadataObj:c,fileData:l,fieldValueAliasMapPreferred:f,workI18n:p,lIndexedParam:d,lParamRaw:h,templateArgs:v}=await $t.call(this,{...e,skipIndexedDB:n,prefI18n:r});document.title=p("browserfile-resultsdisplay",{work:l?nt(u,c,"alias"):""}),St.resultsDisplayClient.main(v),(({applicableBrowseFieldSet:e,fieldValueAliasMapPreferred:t,lParamRaw:n,lIndexedParam:r,max:o,$p:i})=>{const a=e.map((e=>e.fieldSchemaIndex)),s=i.get("work");let u;const c=n("anchorrowcol");if(c&&(u=St.resultsDisplayClient.anchorRowCol({anchorRowCol:c})),!u){const e=[];let n="";for(let u,c=1;!u&&!e.length;c++)for(let l=1;;l++){const f=s+"-anchor"+c+"-"+l,p=i.get(f,!0);if(!p){(c===o||e.length)&&(u=!0);break}n=i.get(r("anchorfield")+c,!0);const d=a[l-1],h=Tt(p),v=t[d]&&t[d][h];e.push(v||p)}if(e.length){const t=e=>(e||"").replaceAll(/["\\]/g,String.raw`\$&`),r=t(e.join("-")),o=n?t(n):void 0;u=St.resultsDisplayClient.anchors({escapedRow:r,escapedCol:o})}}u&&u.scrollIntoView()})({applicableBrowseFieldSet:s,fieldValueAliasMapPreferred:f,lIndexedParam:d,lParamRaw:h,$p:e.$p,max:a.length}),o.forEach((({plugin:e,applicableField:t,meta:n,j:r})=>{e&&e.done&&e.done({$p:i,applicableField:t,meta:n,j:r,thisObj:this})}))},$t=async function({l:e,lang:t,fallbackLanguages:n,locales:r,$p:o,skipIndexedDB:i,noIndexedDB:a,prefI18n:s,files:u,allowPlugins:c,langData:l,basePath:f="",dynamicBasePath:p=""}){const d=new et({langData:l}),h=({schemaItems:e,fieldInfo:n,metadataObj:r,getFieldAliasOrName:o,usePreferAlias:i})=>n.map((({field:n,plugin:a})=>{if(a)return;const{preferAlias:s,fieldValueAliasMap:u}=ot({field:n,schemaItems:e,metadataObj:r,getFieldAliasOrName:o,lang:t});return i?u?(Object.entries(u).forEach((([e,t])=>{Array.isArray(t)?u[e]=t.map((t=>St.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:t}))):t&&"object"==typeof t?"string"==typeof s?u[e]=St.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:t[s]}):Object.entries(t).forEach((([t,n])=>{u[e][t]=St.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:n})})):u[e]=St.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:t})})),!1!==s?u:void 0):void 0:!1!==s?u:void 0})),v=(e,t)=>{let n;const i=o.get(e,!0);return function e(t){return Array.isArray(t)?t.some(e):Object.values(t).some(((r,o)=>"string"!=typeof r?e(r):r===i&&(n=Object.keys(t)[o],!0)))}(r),n||t||console.log("Bad param/value",e,"::",i),n},g=ht,{fileData:y,workI18n:m,getFieldAliasOrName:b,schemaObj:w,metadataObj:_,pluginsForWork:x}=await lt({files:u||this.files,allowPlugins:"boolean"==typeof c?c:this.allowPlugins,lang:t,fallbackLanguages:n,work:o.get("work"),basePath:f});console.log("pluginsForWork",x);const S=nt(t,_,"heading"),j=w.items.items,E=[],k=[],O=[];it({metadataObj:_,schemaItems:j,getFieldAliasOrName:b,lang:t,callback({setName:e,browseFields:t,presort:n}){E.push(e),k.push(n),O.push(t)}});const A=j.map((({title:e,format:t})=>({field:e,fieldAliasOrName:b(e)||e,escapeColumn:"html"!==t,fieldLang:_.fields[e].lang}))),[F]=t,I=new at({metadataObj:_});if(x){console.log("pluginsForWork",x);const{lang:e}=this;x.iterateMappings((({pluginName:t,pluginLang:n,onByDefaultDefault:r,placement:o,applicableFields:i,meta:a})=>{o="end"===o?Number.POSITIVE_INFINITY:o;const s=({applicableField:i,targetLanguage:s,onByDefault:u,metaApplicableField:c}={})=>{const l=x.getPluginObject(t)||{},f=I.getFieldLang(i);l.getTargetLanguage&&(s=l.getTargetLanguage({applicableField:i,targetLanguage:s,pluginLang:n,applicableFieldLang:f})),"{locale}"===s&&(s=F);const p=nt(e,_,["fieldnames",i]),h=l.getFieldAliasOrName?l.getFieldAliasOrName({locales:e,workI18n:m,targetLanguage:s,applicableField:i,applicableFieldI18N:p,meta:a,metaApplicableField:c,targetLanguageI18N:d.getLanguageFromCode(s)}):d.getFieldNameFromPluginNameAndLocales({pluginName:t,workI18n:m,targetLanguage:s,applicableFieldI18N:p,meta:a,metaApplicableField:c});A.splice(o,0,{plugin:l,meta:a,placement:o,fieldAliasOrName:h,escapeColumn:!1!==l.escapeColumn,onByDefault:"boolean"==typeof u?u:r||!1,applicableField:i,metaApplicableField:c,fieldLang:s})};x.processTargetLanguages(i,s)||s()}))}const D=A.map((e=>e.fieldAliasOrName)),P=A.map((e=>e.escapeColumn)),N=A.map((({fieldLang:e})=>e!==F?e:null)),T=h({schemaItems:j,fieldInfo:A,metadataObj:_,getFieldAliasOrName:b,usePreferAlias:!1}),C=h({schemaItems:j,fieldInfo:A,metadataObj:_,getFieldAliasOrName:b,usePreferAlias:!0}),$=o.localizeParamNames=o.has("i18n",!0)?"1"===o.get("i18n",!0):"true"===s||"false"!==s&&this.localizeParamNames,L=$?t=>e(["params",t]):e=>e,R=$?t=>e(["params","indexed",t]):e=>e,U=$?(e,t="")=>o.get(L(e)+t,!0):(e,t="")=>o.get(e+t,!0),M=$?(e,t="")=>o.get(o.get("work")+"-"+R(e)+t,!0):(e,t="")=>o.get(o.get("work")+"-"+e+t,!0),z=O.findIndex(((e,t)=>M("startEnd",String(t+1))));if(-1!==z){const e="-",t=":",n=(M("startEnd",String(z+1))||"").trim(),[r,i]=n.split(e);if(void 0!==i){const e=r.split(t),n=i.split(t),a=e.length-n.length;a>0?n.unshift(...e.slice(0,a)):a<0&&e.push(...Array.from({length:-a}).fill("1")),console.log("startPartVals",e),console.log("endPartVals",n),e.forEach(((e,t)=>{const r=n[t];o.set(`${o.get("work")}-start${z+1}-${t+1}`,e,!0),o.set(`${o.get("work")}-end${z+1}-${t+1}`,r,!0)}))}}const B=O.findIndex(((e,t)=>M("start",t+1+"-1"))),q=O[B],W=E[B],V=q.map((e=>e.fieldName)),H=O[0],J=E[0],K=H.map((e=>e.fieldName)),G=q.map((e=>e.fieldSchema.type)),Z=e=>V.map(((t,n)=>o.get(o.get("work")+"-"+e+(B+1)+"-"+(n+1),!0))),X=Z("start"),Y=Z("end"),[Q,ee]=(({starts:t,ends:n,applicableBrowseFieldNames:r,heading:o})=>{let i;const a="0"!==v("caption");if(a){const a=St.resultsDisplayServerOrClient.startSeparator({l:e}),s=St.resultsDisplayServerOrClient.innerBrowseFieldSeparator({l:e}),u=(()=>{const o=[],i=t.reduce(((e,t,r)=>{const i=e+t;return t===n[r]?i+(r>0?s:" "):(o.push(n[r]),i+a)}),"").slice(0,-a.length),u=r.join(s);return ht(St.resultsDisplayServerOrClient.ranges({l:e,startRange:i,endVals:o,rangeNames:u}))})();i=St.resultsDisplayServerOrClient.caption({heading:o,ranges:u})}return[a,i]})({starts:X,ends:Y,applicableBrowseFieldNames:V,heading:S}),te="1"===v("interlintitle");console.log("rand","yes"===U("rand"));const ne=(e,t)=>{let n;if(/^\d+$/.test(e)||Nt.test(e))n=Tt(e);else{const{rawFieldValueAliasMap:r}=q[t];let o;if(r){const t=Object.entries(r);Array.isArray(t[0][1])?t.some((([t,n])=>!!n.includes(e)&&(o=t,!0))):t.some((([t,n])=>!!Object.values(n).includes(e)&&(o=t,!0)))}n=void 0===o?e:o}return"integer"===G[t]?Number.parseInt(n):n},re=y.name,oe=X.map(ne),ie=Y.map(ne);let ae,se=!1;if(i||a){const e=k[B];if(this.noDynamic){const{resolved:t}=await tt.resolveRefs(y.file);ae=t.data,(({presort:e,tableData:t,applicableBrowseFieldNames:n,localizedFieldNames:r})=>{e&&t.sort(((e,t)=>{let o=0;return n.some((n=>{const i=r.indexOf(n),a=e[i]<t[i],s=e[i]>t[i];return o=s?1:-1,a||s})),o}))})({presort:e,tableData:ae,applicableBrowseFieldNames:V,localizedFieldNames:D})}else{const e=`${p}textbrowser?${o.toString()}`;ae=await(await fetch(e)).json(),se=!0}}else ae=await new Promise((e=>{const t=this.namespace+"-textbrowser-cache-data";indexedDB.open(t).onsuccess=t=>{const n=t.target.result,r="files-to-cache-"+re;n.transaction(r).objectStore(r).index("browseFields-"+W).getAll(IDBKeyRange.bound(oe,ie)).addEventListener("success",(t=>{const n=t.target.result.map((e=>e.value));e(n)}))}}));!se&&x&&(A.forEach((({plugin:e,placement:t})=>{e&&ae.forEach((e=>{e.splice(t??0,0,null)}))})),A.forEach((({plugin:e,applicableField:t,fieldLang:n,meta:r,metaApplicableField:i},a)=>{if(!e)return;const s=A.findIndex((({field:e})=>e===t));ae.forEach(((u,c)=>{const l=u[s];u[a]=e.getCellData&&e.getCellData({tr:u,tableData:ae,i:c,j:a,applicableField:t,fieldInfo:A,applicableFieldIdx:s,applicableFieldText:l,fieldLang:n,getLangDir:Pt,meta:r,metaApplicableField:i,$p:o,thisObj:this})||l})),console.log("applicableFieldIdx",s)})));const ue=Pt(F),ce=N.map((e=>{if(!e)return null;const t=Pt(e);return t!==ue?t:null})),le={tableData:ae,$p:o,$pRaw:v,$pRawEsc:e=>ht(v(e)),$pEscArbitrary:e=>ht(o.get(e,!0)),escapeQuotedCSS:e=>e.replaceAll("\\","\\\\").replaceAll('"',String.raw`\"`),escapeCSS:g,escapeHTML:ht,l:e,localizedFieldNames:D,fieldLangs:N,fieldDirs:ce,caption:ee,hasCaption:Q,showInterlinTitles:te,showEmptyInterlinear:this.showEmptyInterlinear,showTitleOnSingleInterlinear:this.showTitleOnSingleInterlinear,determineEnd:(({fieldValueAliasMap:e,fieldValueAliasMapPreferred:t,localizedFieldNames:n,applicableBrowseFieldNames:r,startsRaw:o,endsRaw:i})=>({tr:a,foundState:s})=>{const u=[],c=r.map((r=>{const o=n.indexOf(r);return void 0!==e[o]&&null!==e[o]?u.push(t[o]?.[a[o]]):u.push(a[o]),a[o]}));if(!s.start){if(o.some(((e,t)=>e!==c[t])))return!1;s.start=!0}if(i.every(((e,t)=>e===c[t])))s.end=!0;else if(s.end)return!0;return u.join("-")})({applicableBrowseFieldNames:V,fieldValueAliasMap:T,fieldValueAliasMapPreferred:C,localizedFieldNames:D,startsRaw:oe,endsRaw:ie}),canonicalBrowseFieldSetName:J,getCanonicalID:(({fieldValueAliasMap:e,fieldValueAliasMapPreferred:t,localizedFieldNames:n,canonicalBrowseFieldNames:r})=>({tr:o})=>r.map((r=>{const i=n.indexOf(r);return void 0!==e[i]&&null!==e[i]?t[i][o[i]]:o[i]})).join("-"))({canonicalBrowseFieldNames:K,fieldValueAliasMap:T,fieldValueAliasMapPreferred:C,localizedFieldNames:D}),getCellValue:(({fieldValueAliasMapPreferred:t,escapeColumnIndexes:n})=>({tr:r,idx:o})=>{let i=null!=t[o]?t[o][r[o]]:r[o];return i&&"object"==typeof i&&(i=Object.values(i)),Array.isArray(i)&&(i=i.join(e("comma-space"))),!n[o]&&this.trustFormatHTML||"string"!=typeof i?{tdVal:i}:{tdVal:ht(i),htmlEscaped:!0}})({fieldValueAliasMapPreferred:C,escapeColumnIndexes:P}),checkedAndInterlinearFieldInfo:(({localizedFieldNames:t})=>{let n,r,i=1,a=[];do{n=o.get("field"+i,!0),r=o.get("checked"+i,!0),i++,!n||r!==e("yes")&&null!==r||a.push(n)}while(n);a=a.filter((e=>t.includes(e)));const s=a.map((e=>t.indexOf(e))),u=s.map((e=>{const t=o.get("interlin"+(e+1),!0);return t&&t.split(/\s*,\s*/).map((e=>Number.parseInt(e)-1)).filter((e=>!Number.isNaN(e)))}));return[a,s,u]})({localizedFieldNames:D}),interlinearSeparator:this.interlinearSeparator};return{fieldInfo:A,$p:o,applicableBrowseFieldSet:q,fieldValueAliasMapPreferred:C,workI18n:m,lIndexedParam:R,lParamRaw:U,browseFieldSets:O,lang:t,metadataObj:_,fileData:y,templateArgs:le}};async function Lt(){try{St.permissions.addLogEntry({text:"Worker registration: Beginning..."});if(!await navigator.storage.persist())return void St.permissions.browserNotGrantingPersistence();await dt({serviceWorkerPath:this.serviceWorkerPath,logger:St.permissions})}catch(e){if(console.log("err",e),e&&"object"==typeof e&&"errorType"in e&&"versionChange"===e.errorType)return void St.permissions.versionChange();St.permissions.errorRegistering(ht(e?.message))}}async function Rt(e,t){return await new Promise((e=>{const n=St.permissions.main({siteI18n:t,ok:async()=>{const e=await Notification.requestPermission();r.close(e)},refuse:()=>{r.close()},close:async()=>{const t=()=>{localStorage.setItem(this.namespace+"-refused","true")};try{if(!r.returnValue)return void t()}catch(e){const t=e;console.log("err",t),St.permissions.errorRegistering(ht(t&&t.message))}switch(r.returnValue){case"denied":case"default":return void e();case"granted":if(navigator.serviceWorker.controller)return void e();await Lt.call(this);break;default:console.error("Unexpected returnValue",r.returnValue)}},closeBrowserNotGranting:()=>{o.close()}}),r=n[1],o=n[2];r.showModal()}))}class Ut{constructor(e){this.site=e.site||"site.json";const t=e.stylesheets||["@builtin"],n=t.indexOf("@builtin");var r,o;-1!==n&&t.splice(n,1,new URL(new URL("assets/index-D_XVedS3.css",import.meta.url).href).href),this.stylesheets=t,this.siteData={"localization-strings":{}},this.langData={languages:[],"localization-strings":{}},this.lang=[],this.userJSON="",this.languages="",this.serviceWorkerPath="",this.files="",this.namespace="",o=e,(r=this).userJSON=o.userJSON||"resources/user.json",r.languages=o.languages||new URL(new URL("assets/languages-DWwAAJMo.json",import.meta.url).href).href,r.serviceWorkerPath=o.serviceWorkerPath||`sw.js?pathToUserJSON=${encodeURIComponent(r.userJSON)}&stylesheets=${encodeURIComponent(JSON.stringify(r.stylesheets||[]))}`,r.files=o.files||"files.json",r.namespace=o.namespace||"textbrowser",this.allowPlugins=e.allowPlugins,this.dynamicBasePath=e.dynamicBasePath,this.trustFormatHTML=e.trustFormatHTML,this.requestPersistentStorage=e.requestPersistentStorage,this.localizeParamNames=void 0===e.localizeParamNames||e.localizeParamNames,this.hideFormattingSection=Boolean(e.hideFormattingSection),this.preferencesPlugin=e.preferencesPlugin,this.interlinearSeparator=e.interlinearSeparator,this.showEmptyInterlinear=e.showEmptyInterlinear,this.showTitleOnSingleInterlinear=e.showTitleOnSingleInterlinear,this.noDynamic=e.noDynamic,this.skipIndexedDB=e.skipIndexedDB}async init(){this._stylesheetElements=await ce(this.stylesheets);try{const e=await l([this.languages,this.site]);this.langData=e[0],this.siteData=e[1];const t=this.paramChange();return globalThis.addEventListener("hashchange",(()=>this.paramChange())),t}catch(e){const t=e;console.log("err",t),Qe.alert(t)}}getWorkData(e){try{return lt.call(this,{...e,files:this.files,allowPlugins:this.allowPlugins})}catch(e){console.log("err",e),Qe.alert("catch:"+e)}}getDirectionForLanguageCode(e){const t=this.langData.languages,n=t.find((t=>t.code===e));return n&&n.direction||t.find((t=>t.code.startsWith(e+"-")))}getFieldNameAndValueAliases(e){return ot({...e,lang:this.lang})}getBrowseFieldData(e){return it({...e,lang:this.lang})}async paramChange(){St.defaultBody();const e=this.$p="string"==typeof history.state?new Et({params:history.state}):new Et,t=(t,n)=>{const r=document.querySelector(t),o=location.href.replace(/#.*$/,"")+"#"+e.toString();history.replaceState(me(r,{hash:!0,empty:!0}),document.title,o),n(),location.hash="#"+e.toString()},n=new et({langData:this.langData}),{lang:r,langs:o,languageParam:i,fallbackLanguages:a}=n.getLanguageInfo({$p:e});this.lang=r;const[s]=r,u=this.getDirectionForLanguageCode(s);document.documentElement.lang=s,document.dir=u;const c=this.siteData["localization-strings"],f=await ue({messageStyle:"plainNested",locales:r,defaultLocales:a,async localeStringFinder({locales:e,defaultLocales:t}={}){const n=[...e,...t].find((e=>e in c));return{locale:n,strings:{head:{},body:c[n]}}}});document.title=f("browser-title");const p="true"===localStorage.getItem(this.namespace+"-refused"),d=await navigator.storage.persisted(),h=await navigator.serviceWorker.getRegistration(this.serviceWorkerPath),v=e.get("result"),g=async()=>{if(v)return;!(p||navigator.serviceWorker.controller&&d)&&(d?(St.permissions.main({siteI18n:f}),await Lt.call(this)):await Rt.call(this,o,f),St.permissions.exitDialogs())};if(h){const e=h.installing||h.waiting||h.active;if(!e)return console.error("Unexpected error: worker registration received without a worker."),void await g();St.permissions.main({siteI18n:f});setInterval((()=>{h.update()}),36e5),console.log("worker.state",e.state);const t=async()=>{try{return pt({r:h,logger:St.permissions})}catch(e){return console.log("err",e),Qe.alert("\n There was an unexpected error activating the new version;\n please save any unfinished work, close this tab, and try\n opening this site again.\n\n Please contact a service administrator if the problem\n persists (Error type: worker activation).\n ")}};switch(e.state){case"installing":t(),ft({r:h});break;case"installed":await t();break;case"activating":return await Qe.alert("\n Please wait for a short while as we work to update to a new version.\n "),t(),void navigator.serviceWorker.onmessage({data:"finishActivate"});case"activated":ft({r:h});break;case"redundant":return void await t();default:console.log("Unexpected worker.state",e.state)}}else await g();if(St.permissions.exitDialogs(),!i)return document.title=f("languages-title"),void St.languageSelect.main({langs:o,languages:n,followParams:t,$p:e});const y=await async function({$p:e,lang:t,langs:n,langData:r,fallbackLanguages:o,basePath:i=""}){const a=await ue({messageStyle:"plainNested",locales:t,defaultLocales:o,localeResolver:(e,t)=>i+r.localeFileBasePath+(n.find((e=>e.code===t))?.locale?.$ref??"")});return e.l10n||(e.l10n=a),a}({$p:e,lang:r,langs:o,langData:this.langData,fallbackLanguages:a});if((()=>{this.l10n=y,e.l10n=y;return e.get("work")?!v&&(this.workDisplay({l:y,lang:r,preferredLocale:s,fallbackLanguages:a,languageParam:i,$p:e,languages:n}),!0):(async function({files:e,lang:t,fallbackLanguages:n,$p:r,followParams:o}){try{const i=await l(e),a=i["localization-strings"],s=await l(i.groups.reduce(((e,t)=>{const n=(i.metadataBaseDirectory||"")+(t.metadataBaseDirectory||"")+"/";return t.files.reduce(((e,t)=>[...e,n+t.metadataFile]),e)}),[])),u=await ue({messageStyle:"plainNested",locales:t,defaultLocales:n,async localeStringFinder({locales:e,defaultLocales:t}={}){const n=[...e,...t].find((e=>e in a));return{locale:n,strings:{head:{},body:a[n]}}}});document.title=u("browserfile-workselect");const c=s[Symbol.iterator](),f=()=>{const e=c.next().value;return nt(t,e,"alias")};St.workSelect({groups:i.groups,workI18n:u,getNextAlias:f,$p:r,followParams:o})}catch(e){const t=e;console.log("Error",t),Qe.alert(t)}}({files:this.files,lang:r,fallbackLanguages:a,$p:e,followParams:t}),!0)})())return;return await(async()=>{const t=p||!navigator.serviceWorker.controller;return await this.resultsDisplayClient({langData:this.langData,l:y,lang:r,fallbackLanguages:a,locales:y.strings,$p:e,basePath:"",noIndexedDB:t,dynamicBasePath:this.dynamicBasePath,files:this.files,allowPlugins:this.allowPlugins})})()}workDisplay=At;resultsDisplayClient=Ct}export{Ut as default};
13
+ */(function(){var a="Expected a function",s="__lodash_placeholder__",u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",l="[object Array]",f="[object Boolean]",p="[object Date]",d="[object Error]",h="[object Function]",v="[object GeneratorFunction]",g="[object Map]",y="[object Number]",m="[object Object]",b="[object RegExp]",w="[object Set]",_="[object String]",x="[object Symbol]",S="[object WeakMap]",j="[object ArrayBuffer]",E="[object DataView]",k="[object Float32Array]",O="[object Float64Array]",A="[object Int8Array]",F="[object Int16Array]",I="[object Int32Array]",D="[object Uint8Array]",N="[object Uint16Array]",P="[object Uint32Array]",T=/\b__p \+= '';/g,C=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,R=/[&<>"']/g,M=RegExp(L.source),U=RegExp(R.source),z=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,H=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,J=/[\\^$.*+?()[\]{}|]/g,K=RegExp(J.source),G=/^\s+|\s+$/g,Z=/^\s+/,X=/\s+$/,Y=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Q=/\{\n\/\* \[wrapped with (.+)\] \*/,ee=/,? & /,te=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ne=/\\(\\)?/g,re=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,oe=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,ae=/^0b[01]+$/i,se=/^\[object .+?Constructor\]$/,ue=/^0o[0-7]+$/i,ce=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fe=/($^)/,pe=/['\n\r\u2028\u2029\\]/g,de="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",he="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ve="["+he+"]",ge="["+de+"]",ye="\\d+",me="[a-z\\xdf-\\xf6\\xf8-\\xff]",be="[^\\ud800-\\udfff"+he+ye+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",we="\\ud83c[\\udffb-\\udfff]",_e="[^\\ud800-\\udfff]",xe="(?:\\ud83c[\\udde6-\\uddff]){2}",Se="[\\ud800-\\udbff][\\udc00-\\udfff]",je="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ee="(?:"+me+"|"+be+")",ke="(?:"+je+"|"+be+")",Oe="(?:"+ge+"|"+we+")?",Ae="[\\ufe0e\\ufe0f]?"+Oe+"(?:\\u200d(?:"+[_e,xe,Se].join("|")+")[\\ufe0e\\ufe0f]?"+Oe+")*",Fe="(?:"+["[\\u2700-\\u27bf]",xe,Se].join("|")+")"+Ae,Ie="(?:"+[_e+ge+"?",ge,xe,Se,"[\\ud800-\\udfff]"].join("|")+")",De=RegExp("['’]","g"),Ne=RegExp(ge,"g"),Pe=RegExp(we+"(?="+we+")|"+Ie+Ae,"g"),Te=RegExp([je+"?"+me+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ve,je,"$"].join("|")+")",ke+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ve,je+Ee,"$"].join("|")+")",je+"?"+Ee+"+(?:['’](?:d|ll|m|re|s|t|ve))?",je+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ye,Fe].join("|"),"g"),Ce=RegExp("[\\u200d\\ud800-\\udfff"+de+"\\ufe0e\\ufe0f]"),$e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Le=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Re=-1,Me={};Me[k]=Me[O]=Me[A]=Me[F]=Me[I]=Me[D]=Me["[object Uint8ClampedArray]"]=Me[N]=Me[P]=!0,Me[c]=Me[l]=Me[j]=Me[f]=Me[E]=Me[p]=Me[d]=Me[h]=Me[g]=Me[y]=Me[m]=Me[b]=Me[w]=Me[_]=Me[S]=!1;var Ue={};Ue[c]=Ue[l]=Ue[j]=Ue[E]=Ue[f]=Ue[p]=Ue[k]=Ue[O]=Ue[A]=Ue[F]=Ue[I]=Ue[g]=Ue[y]=Ue[m]=Ue[b]=Ue[w]=Ue[_]=Ue[x]=Ue[D]=Ue["[object Uint8ClampedArray]"]=Ue[N]=Ue[P]=!0,Ue[d]=Ue[h]=Ue[S]=!1;var ze={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,qe=parseInt,We="object"==(void 0===e?"undefined":i(e))&&e&&e.Object===Object&&e,Ve="object"==("undefined"==typeof self?"undefined":i(self))&&self&&self.Object===Object&&self,He=We||Ve||Function("return this")(),Je="object"==i(t)&&t&&!t.nodeType&&t,Ke=Je&&"object"==i(r)&&r&&!r.nodeType&&r,Ge=Ke&&Ke.exports===Je,Ze=Ge&&We.process,Xe=function(){try{return Ke&&Ke.require&&Ke.require("util").types||Ze&&Ze.binding&&Ze.binding("util")}catch(e){}}(),Ye=Xe&&Xe.isArrayBuffer,Qe=Xe&&Xe.isDate,et=Xe&&Xe.isMap,tt=Xe&&Xe.isRegExp,nt=Xe&&Xe.isSet,rt=Xe&&Xe.isTypedArray;function ot(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function it(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function at(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function st(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ut(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ct(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function lt(e,t){return!(null==e||!e.length)&&wt(e,t,0)>-1}function ft(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function pt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function dt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function ht(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function vt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function gt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var yt=jt("length");function mt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function bt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function wt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):bt(e,xt,n)}function _t(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function xt(e){return e!=e}function St(e,t){var n=null==e?0:e.length;return n?Ot(e,t)/n:NaN}function jt(e){return function(t){return null==t?void 0:t[e]}}function Et(e){return function(t){return null==e?void 0:e[t]}}function kt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Ot(e,t){for(var n,r=-1,o=e.length;++r<o;){var i=t(e[r]);void 0!==i&&(n=void 0===n?i:n+i)}return n}function At(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ft(e){return function(t){return e(t)}}function It(e,t){return pt(t,(function(t){return e[t]}))}function Dt(e,t){return e.has(t)}function Nt(e,t){for(var n=-1,r=e.length;++n<r&&wt(t,e[n],0)>-1;);return n}function Pt(e,t){for(var n=e.length;n--&&wt(t,e[n],0)>-1;);return n}var Tt=Et({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ct=Et({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function $t(e){return"\\"+ze[e]}function Lt(e){return Ce.test(e)}function Rt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Mt(e,t){return function(n){return e(t(n))}}function Ut(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,i[o++]=n)}return i}function zt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Bt(e){return Lt(e)?function(e){for(var t=Pe.lastIndex=0;Pe.test(e);)++t;return t}(e):yt(e)}function qt(e){return Lt(e)?function(e){return e.match(Pe)||[]}(e):function(e){return e.split("")}(e)}var Wt=Et({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Vt=function e(t){var n,r=(t=null==t?He:Vt.defaults(He.Object(),t,Vt.pick(He,Le))).Array,o=t.Date,de=t.Error,he=t.Function,ve=t.Math,ge=t.Object,ye=t.RegExp,me=t.String,be=t.TypeError,we=r.prototype,_e=he.prototype,xe=ge.prototype,Se=t["__core-js_shared__"],je=_e.toString,Ee=xe.hasOwnProperty,ke=0,Oe=(n=/[^.]+$/.exec(Se&&Se.keys&&Se.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ae=xe.toString,Fe=je.call(ge),Ie=He._,Pe=ye("^"+je.call(Ee).replace(J,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ce=Ge?t.Buffer:void 0,ze=t.Symbol,We=t.Uint8Array,Ve=Ce?Ce.allocUnsafe:void 0,Je=Mt(ge.getPrototypeOf,ge),Ke=ge.create,Ze=xe.propertyIsEnumerable,Xe=we.splice,yt=ze?ze.isConcatSpreadable:void 0,Et=ze?ze.iterator:void 0,Ht=ze?ze.toStringTag:void 0,Jt=function(){try{var e=Yo(ge,"defineProperty");return e({},"",{}),e}catch(e){}}(),Kt=t.clearTimeout!==He.clearTimeout&&t.clearTimeout,Gt=o&&o.now!==He.Date.now&&o.now,Zt=t.setTimeout!==He.setTimeout&&t.setTimeout,Xt=ve.ceil,Yt=ve.floor,Qt=ge.getOwnPropertySymbols,en=Ce?Ce.isBuffer:void 0,tn=t.isFinite,nn=we.join,rn=Mt(ge.keys,ge),on=ve.max,an=ve.min,sn=o.now,un=t.parseInt,cn=ve.random,ln=we.reverse,fn=Yo(t,"DataView"),pn=Yo(t,"Map"),dn=Yo(t,"Promise"),hn=Yo(t,"Set"),vn=Yo(t,"WeakMap"),gn=Yo(ge,"create"),yn=vn&&new vn,mn={},bn=ji(fn),wn=ji(pn),_n=ji(dn),xn=ji(hn),Sn=ji(vn),jn=ze?ze.prototype:void 0,En=jn?jn.valueOf:void 0,kn=jn?jn.toString:void 0;function On(e){if(za(e)&&!Ia(e)&&!(e instanceof Dn)){if(e instanceof In)return e;if(Ee.call(e,"__wrapped__"))return Ei(e)}return new In(e)}var An=function(){function e(){}return function(t){if(!Ua(t))return{};if(Ke)return Ke(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Fn(){}function In(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Dn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Nn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Tn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Cn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Tn;++t<n;)this.add(e[t])}function $n(e){var t=this.__data__=new Pn(e);this.size=t.size}function Ln(e,t){var n=Ia(e),r=!n&&Fa(e),o=!n&&!r&&Ta(e),i=!n&&!r&&!o&&Ga(e),a=n||r||o||i,s=a?At(e.length,me):[],u=s.length;for(var c in e)!t&&!Ee.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ii(c,u))||s.push(c);return s}function Rn(e){var t=e.length;return t?e[Tr(0,t-1)]:void 0}function Mn(e,t){return _i(go(e),Kn(t,0,e.length))}function Un(e){return _i(go(e))}function zn(e,t,n){(void 0===n||ka(e[t],n))&&(void 0!==n||t in e)||Hn(e,t,n)}function Bn(e,t,n){var r=e[t];Ee.call(e,t)&&ka(r,n)&&(void 0!==n||t in e)||Hn(e,t,n)}function qn(e,t){for(var n=e.length;n--;)if(ka(e[n][0],t))return n;return-1}function Wn(e,t,n,r){return Qn(e,(function(e,o,i){t(r,e,n(e),i)})),r}function Vn(e,t){return e&&yo(t,ys(t),e)}function Hn(e,t,n){"__proto__"==t&&Jt?Jt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Jn(e,t){for(var n=-1,o=t.length,i=r(o),a=null==e;++n<o;)i[n]=a?void 0:ps(e,t[n]);return i}function Kn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Gn(e,t,n,r,o,i){var a,s=1&t,u=2&t,l=4&t;if(n&&(a=o?n(e,r,o,i):n(e)),void 0!==a)return a;if(!Ua(e))return e;var d=Ia(e);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ee.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return go(e,a)}else{var S=ti(e),T=S==h||S==v;if(Ta(e))return co(e,s);if(S==m||S==c||T&&!o){if(a=u||T?{}:ri(e),!s)return u?function(e,t){return yo(e,ei(e),t)}(e,function(e,t){return e&&yo(t,ms(t),e)}(a,e)):function(e,t){return yo(e,Qo(e),t)}(e,Vn(a,e))}else{if(!Ue[S])return o?e:{};a=function(e,t,n){var r,o=e.constructor;switch(t){case j:return lo(e);case f:case p:return new o(+e);case E:return function(e,t){var n=t?lo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case k:case O:case A:case F:case I:case D:case"[object Uint8ClampedArray]":case N:case P:return fo(e,n);case g:return new o;case y:case _:return new o(e);case b:return function(e){var t=new e.constructor(e.source,oe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case w:return new o;case x:return r=e,En?ge(En.call(r)):{}}}(e,S,s)}}i||(i=new $n);var C=i.get(e);if(C)return C;i.set(e,a),Ha(e)?e.forEach((function(r){a.add(Gn(r,t,n,r,e,i))})):Ba(e)&&e.forEach((function(r,o){a.set(o,Gn(r,t,n,o,e,i))}));var $=d?void 0:(l?u?Vo:Wo:u?ms:ys)(e);return at($||e,(function(r,o){$&&(r=e[o=r]),Bn(a,o,Gn(r,t,n,o,e,i))})),a}function Zn(e,t,n){var r=n.length;if(null==e)return!r;for(e=ge(e);r--;){var o=n[r],i=t[o],a=e[o];if(void 0===a&&!(o in e)||!i(a))return!1}return!0}function Xn(e,t,n){if("function"!=typeof e)throw new be(a);return yi((function(){e.apply(void 0,n)}),t)}function Yn(e,t,n,r){var o=-1,i=lt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=pt(t,Ft(n))),r?(i=ft,a=!1):t.length>=200&&(i=Dt,a=!1,t=new Cn(t));e:for(;++o<s;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else i(t,f,r)||u.push(l)}return u}On.templateSettings={escape:z,evaluate:B,interpolate:q,variable:"",imports:{_:On}},On.prototype=Fn.prototype,On.prototype.constructor=On,In.prototype=An(Fn.prototype),In.prototype.constructor=In,Dn.prototype=An(Fn.prototype),Dn.prototype.constructor=Dn,Nn.prototype.clear=function(){this.__data__=gn?gn(null):{},this.size=0},Nn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Nn.prototype.get=function(e){var t=this.__data__;if(gn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ee.call(t,e)?t[e]:void 0},Nn.prototype.has=function(e){var t=this.__data__;return gn?void 0!==t[e]:Ee.call(t,e)},Nn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gn&&void 0===t?"__lodash_hash_undefined__":t,this},Pn.prototype.clear=function(){this.__data__=[],this.size=0},Pn.prototype.delete=function(e){var t=this.__data__,n=qn(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Pn.prototype.get=function(e){var t=this.__data__,n=qn(t,e);return n<0?void 0:t[n][1]},Pn.prototype.has=function(e){return qn(this.__data__,e)>-1},Pn.prototype.set=function(e,t){var n=this.__data__,r=qn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Tn.prototype.clear=function(){this.size=0,this.__data__={hash:new Nn,map:new(pn||Pn),string:new Nn}},Tn.prototype.delete=function(e){var t=Zo(this,e).delete(e);return this.size-=t?1:0,t},Tn.prototype.get=function(e){return Zo(this,e).get(e)},Tn.prototype.has=function(e){return Zo(this,e).has(e)},Tn.prototype.set=function(e,t){var n=Zo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Cn.prototype.add=Cn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Cn.prototype.has=function(e){return this.__data__.has(e)},$n.prototype.clear=function(){this.__data__=new Pn,this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},$n.prototype.get=function(e){return this.__data__.get(e)},$n.prototype.has=function(e){return this.__data__.has(e)},$n.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Pn){var r=n.__data__;if(!pn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Tn(r)}return n.set(e,t),this.size=n.size,this};var Qn=wo(sr),er=wo(ur,!0);function tr(e,t){var n=!0;return Qn(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function nr(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],a=t(i);if(null!=a&&(void 0===s?a==a&&!Ka(a):n(a,s)))var s=a,u=i}return u}function rr(e,t){var n=[];return Qn(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function or(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=oi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?or(s,t-1,n,r,o):dt(o,s):r||(o[o.length]=s)}return o}var ir=_o(),ar=_o(!0);function sr(e,t){return e&&ir(e,t,ys)}function ur(e,t){return e&&ar(e,t,ys)}function cr(e,t){return ct(t,(function(t){return La(e[t])}))}function lr(e,t){for(var n=0,r=(t=io(t,e)).length;null!=e&&n<r;)e=e[Si(t[n++])];return n&&n==r?e:void 0}function fr(e,t,n){var r=t(e);return Ia(e)?r:dt(r,n(e))}function pr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ht&&Ht in ge(e)?function(e){var t=Ee.call(e,Ht),n=e[Ht];try{e[Ht]=void 0;var r=!0}catch(e){}var o=Ae.call(e);return r&&(t?e[Ht]=n:delete e[Ht]),o}(e):function(e){return Ae.call(e)}(e)}function dr(e,t){return e>t}function hr(e,t){return null!=e&&Ee.call(e,t)}function vr(e,t){return null!=e&&t in ge(e)}function gr(e,t,n){for(var o=n?ft:lt,i=e[0].length,a=e.length,s=a,u=r(a),c=1/0,l=[];s--;){var f=e[s];s&&t&&(f=pt(f,Ft(t))),c=an(f.length,c),u[s]=!n&&(t||i>=120&&f.length>=120)?new Cn(s&&f):void 0}f=e[0];var p=-1,d=u[0];e:for(;++p<i&&l.length<c;){var h=f[p],v=t?t(h):h;if(h=n||0!==h?h:0,!(d?Dt(d,v):o(l,v,n))){for(s=a;--s;){var g=u[s];if(!(g?Dt(g,v):o(e[s],v,n)))continue e}d&&d.push(v),l.push(h)}}return l}function yr(e,t,n){var r=null==(e=hi(e,t=io(t,e)))?e:e[Si($i(t))];return null==r?void 0:ot(r,e,n)}function mr(e){return za(e)&&pr(e)==c}function br(e,t,n,r,o){return e===t||(null==e||null==t||!za(e)&&!za(t)?e!=e&&t!=t:function(e,t,n,r,o,i){var a=Ia(e),s=Ia(t),u=a?l:ti(e),h=s?l:ti(t),v=(u=u==c?m:u)==m,S=(h=h==c?m:h)==m,k=u==h;if(k&&Ta(e)){if(!Ta(t))return!1;a=!0,v=!1}if(k&&!v)return i||(i=new $n),a||Ga(e)?Bo(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case j:return!(e.byteLength!=t.byteLength||!i(new We(e),new We(t)));case f:case p:case y:return ka(+e,+t);case d:return e.name==t.name&&e.message==t.message;case b:case _:return e==t+"";case g:var s=Rt;case w:var u=1&r;if(s||(s=zt),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=Bo(s(e),s(t),r,o,i,a);return a.delete(e),l;case x:if(En)return En.call(e)==En.call(t)}return!1}(e,t,u,n,r,o,i);if(!(1&n)){var O=v&&Ee.call(e,"__wrapped__"),A=S&&Ee.call(t,"__wrapped__");if(O||A){var F=O?e.value():e,I=A?t.value():t;return i||(i=new $n),o(F,I,n,r,i)}}return!!k&&(i||(i=new $n),function(e,t,n,r,o,i){var a=1&n,s=Wo(e),u=s.length;if(u!=Wo(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:Ee.call(t,l)))return!1}var f=i.get(e);if(f&&i.get(t))return f==t;var p=!0;i.set(e,t),i.set(t,e);for(var d=a;++c<u;){var h=e[l=s[c]],v=t[l];if(r)var g=a?r(v,h,l,t,e,i):r(h,v,l,e,t,i);if(!(void 0===g?h===v||o(h,v,n,r,i):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var y=e.constructor,m=t.constructor;y!=m&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m)&&(p=!1)}return i.delete(e),i.delete(t),p}(e,t,n,r,o,i))}(e,t,n,r,br,o))}function wr(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=ge(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var u=(s=n[o])[0],c=e[u],l=s[1];if(a&&s[2]){if(void 0===c&&!(u in e))return!1}else{var f=new $n;if(r)var p=r(c,l,u,e,t,f);if(!(void 0===p?br(l,c,3,r,f):p))return!1}}return!0}function _r(e){return!(!Ua(e)||(t=e,Oe&&Oe in t))&&(La(e)?Pe:se).test(ji(e));var t}function xr(e){return"function"==typeof e?e:null==e?qs:"object"==i(e)?Ia(e)?Or(e[0],e[1]):kr(e):Ys(e)}function Sr(e){if(!li(e))return rn(e);var t=[];for(var n in ge(e))Ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(e,t){return e<t}function Er(e,t){var n=-1,o=Na(e)?r(e.length):[];return Qn(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function kr(e){var t=Xo(e);return 1==t.length&&t[0][2]?pi(t[0][0],t[0][1]):function(n){return n===e||wr(n,e,t)}}function Or(e,t){return si(e)&&fi(t)?pi(Si(e),t):function(n){var r=ps(n,e);return void 0===r&&r===t?ds(n,e):br(t,r,3)}}function Ar(e,t,n,r,o){e!==t&&ir(t,(function(i,a){if(o||(o=new $n),Ua(i))!function(e,t,n,r,o,i,a){var s=vi(e,n),u=vi(t,n),c=a.get(u);if(c)zn(e,n,c);else{var l=i?i(s,u,n+"",e,t,a):void 0,f=void 0===l;if(f){var p=Ia(u),d=!p&&Ta(u),h=!p&&!d&&Ga(u);l=u,p||d||h?Ia(s)?l=s:Pa(s)?l=go(s):d?(f=!1,l=co(u,!0)):h?(f=!1,l=fo(u,!0)):l=[]:Wa(u)||Fa(u)?(l=s,Fa(s)?l=rs(s):Ua(s)&&!La(s)||(l=ri(u))):f=!1}f&&(a.set(u,l),o(l,u,r,i,a),a.delete(u)),zn(e,n,l)}}(e,t,a,n,Ar,r,o);else{var s=r?r(vi(e,a),i,a+"",e,t,o):void 0;void 0===s&&(s=i),zn(e,a,s)}}),ms)}function Fr(e,t){var n=e.length;if(n)return ii(t+=t<0?n:0,n)?e[t]:void 0}function Ir(e,t,n){var r=-1;return t=pt(t.length?t:[qs],Ft(Go())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Er(e,(function(e,n,o){return{criteria:pt(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var u=po(o[r],i[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Dr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=lr(e,a);n(s,a)&&Mr(i,io(a,e),s)}return i}function Nr(e,t,n,r){var o=r?_t:wt,i=-1,a=t.length,s=e;for(e===t&&(t=go(t)),n&&(s=pt(e,Ft(n)));++i<a;)for(var u=0,c=t[i],l=n?n(c):c;(u=o(s,l,u,r))>-1;)s!==e&&Xe.call(s,u,1),Xe.call(e,u,1);return e}function Pr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;ii(o)?Xe.call(e,o,1):Xr(e,o)}}return e}function Tr(e,t){return e+Yt(cn()*(t-e+1))}function Cr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Yt(t/2))&&(e+=e)}while(t);return n}function $r(e,t){return mi(di(e,t,qs),e+"")}function Lr(e){return Rn(ks(e))}function Rr(e,t){var n=ks(e);return _i(n,Kn(t,0,n.length))}function Mr(e,t,n,r){if(!Ua(e))return e;for(var o=-1,i=(t=io(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var u=Si(t[o]),c=n;if(o!=a){var l=s[u];void 0===(c=r?r(l,u,s):void 0)&&(c=Ua(l)?l:ii(t[o+1])?[]:{})}Bn(s,u,c),s=s[u]}return e}var Ur=yn?function(e,t){return yn.set(e,t),e}:qs,zr=Jt?function(e,t){return Jt(e,"toString",{configurable:!0,enumerable:!1,value:Us(t),writable:!0})}:qs;function Br(e){return _i(ks(e))}function qr(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function Wr(e,t){var n;return Qn(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function Vr(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!Ka(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return Hr(e,t,qs,n)}function Hr(e,t,n,r){t=n(t);for(var o=0,i=null==e?0:e.length,a=t!=t,s=null===t,u=Ka(t),c=void 0===t;o<i;){var l=Yt((o+i)/2),f=n(e[l]),p=void 0!==f,d=null===f,h=f==f,v=Ka(f);if(a)var g=r||h;else g=c?h&&(r||p):s?h&&p&&(r||!d):u?h&&p&&!d&&(r||!v):!d&&!v&&(r?f<=t:f<t);g?o=l+1:i=l}return an(i,4294967294)}function Jr(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!ka(s,u)){var u=s;i[o++]=0===a?0:a}}return i}function Kr(e){return"number"==typeof e?e:Ka(e)?NaN:+e}function Gr(e){if("string"==typeof e)return e;if(Ia(e))return pt(e,Gr)+"";if(Ka(e))return kn?kn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Zr(e,t,n){var r=-1,o=lt,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=ft;else if(i>=200){var c=t?null:$o(e);if(c)return zt(c);a=!1,o=Dt,u=new Cn}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function Xr(e,t){return null==(e=hi(e,t=io(t,e)))||delete e[Si($i(t))]}function Yr(e,t,n,r){return Mr(e,t,n(lr(e,t)),r)}function Qr(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?qr(e,r?0:i,r?i+1:o):qr(e,r?i+1:0,r?o:i)}function eo(e,t){var n=e;return n instanceof Dn&&(n=n.value()),ht(t,(function(e,t){return t.func.apply(t.thisArg,dt([e],t.args))}),n)}function to(e,t,n){var o=e.length;if(o<2)return o?Zr(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var s=e[i],u=-1;++u<o;)u!=i&&(a[i]=Yn(a[i]||s,e[u],t,n));return Zr(or(a,1),t,n)}function no(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;){var s=r<i?t[r]:void 0;n(a,e[r],s)}return a}function ro(e){return Pa(e)?e:[]}function oo(e){return"function"==typeof e?e:qs}function io(e,t){return Ia(e)?e:si(e,t)?[e]:xi(os(e))}var ao=$r;function so(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:qr(e,t,n)}var uo=Kt||function(e){return He.clearTimeout(e)};function co(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function lo(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function fo(e,t){var n=t?lo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function po(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=Ka(e),a=void 0!==t,s=null===t,u=t==t,c=Ka(t);if(!s&&!c&&!i&&e>t||i&&a&&u&&!s&&!c||r&&a&&u||!n&&u||!o)return 1;if(!r&&!i&&!c&&e<t||c&&n&&o&&!r&&!i||s&&n&&o||!a&&o||!u)return-1}return 0}function ho(e,t,n,o){for(var i=-1,a=e.length,s=n.length,u=-1,c=t.length,l=on(a-s,0),f=r(c+l),p=!o;++u<c;)f[u]=t[u];for(;++i<s;)(p||i<a)&&(f[n[i]]=e[i]);for(;l--;)f[u++]=e[i++];return f}function vo(e,t,n,o){for(var i=-1,a=e.length,s=-1,u=n.length,c=-1,l=t.length,f=on(a-u,0),p=r(f+l),d=!o;++i<f;)p[i]=e[i];for(var h=i;++c<l;)p[h+c]=t[c];for(;++s<u;)(d||i<a)&&(p[h+n[s]]=e[i++]);return p}function go(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function yo(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],u=r?r(n[s],e[s],s,n,e):void 0;void 0===u&&(u=e[s]),o?Hn(n,s,u):Bn(n,s,u)}return n}function mo(e,t){return function(n,r){var o=Ia(n)?it:Wn,i=t?t():{};return o(n,e,Go(r,2),i)}}function bo(e){return $r((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&ai(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=ge(t);++r<o;){var s=n[r];s&&e(t,s,r,i)}return t}))}function wo(e,t){return function(n,r){if(null==n)return n;if(!Na(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=ge(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function _o(e){return function(t,n,r){for(var o=-1,i=ge(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}function xo(e){return function(t){var n=Lt(t=os(t))?qt(t):void 0,r=n?n[0]:t.charAt(0),o=n?so(n,1).join(""):t.slice(1);return r[e]()+o}}function So(e){return function(t){return ht(Ls(Fs(t).replace(De,"")),e,"")}}function jo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=An(e.prototype),r=e.apply(n,t);return Ua(r)?r:n}}function Eo(e){return function(t,n,r){var o=ge(t);if(!Na(t)){var i=Go(n,3);t=ys(t),n=function(e){return i(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[i?t[a]:a]:void 0}}function ko(e){return qo((function(t){var n=t.length,r=n,o=In.prototype.thru;for(e&&t.reverse();r--;){var i=t[r];if("function"!=typeof i)throw new be(a);if(o&&!s&&"wrapper"==Jo(i))var s=new In([],!0)}for(r=s?r:n;++r<n;){var u=Jo(i=t[r]),c="wrapper"==u?Ho(i):void 0;s=c&&ui(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?s[Jo(c[0])].apply(s,c[3]):1==i.length&&ui(i)?s[u]():s.thru(i)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&Ia(r))return s.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function Oo(e,t,n,o,i,a,s,u,c,l){var f=128&t,p=1&t,d=2&t,h=24&t,v=512&t,g=d?void 0:jo(e);return function y(){for(var m=arguments.length,b=r(m),w=m;w--;)b[w]=arguments[w];if(h)var _=Ko(y),x=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,_);if(o&&(b=ho(b,o,i,h)),a&&(b=vo(b,a,s,h)),m-=x,h&&m<l){var S=Ut(b,_);return To(e,t,Oo,y.placeholder,n,b,S,u,c,l-m)}var j=p?n:this,E=d?j[e]:e;return m=b.length,u?b=function(e,t){for(var n=e.length,r=an(t.length,n),o=go(e);r--;){var i=t[r];e[r]=ii(i,n)?o[i]:void 0}return e}(b,u):v&&m>1&&b.reverse(),f&&c<m&&(b.length=c),this&&this!==He&&this instanceof y&&(E=g||jo(E)),E.apply(j,b)}}function Ao(e,t){return function(n,r){return function(e,t,n,r){return sr(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Fo(e,t){return function(n,r){var o;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(o=n),void 0!==r){if(void 0===o)return r;"string"==typeof n||"string"==typeof r?(n=Gr(n),r=Gr(r)):(n=Kr(n),r=Kr(r)),o=e(n,r)}return o}}function Io(e){return qo((function(t){return t=pt(t,Ft(Go())),$r((function(n){var r=this;return e(t,(function(e){return ot(e,r,n)}))}))}))}function Do(e,t){var n=(t=void 0===t?" ":Gr(t)).length;if(n<2)return n?Cr(t,e):t;var r=Cr(t,Xt(e/Bt(t)));return Lt(t)?so(qt(r),0,e).join(""):r.slice(0,e)}function No(e){return function(t,n,o){return o&&"number"!=typeof o&&ai(t,n,o)&&(n=o=void 0),t=Qa(t),void 0===n?(n=t,t=0):n=Qa(n),function(e,t,n,o){for(var i=-1,a=on(Xt((t-e)/(n||1)),0),s=r(a);a--;)s[o?a:++i]=e,e+=n;return s}(t,n,o=void 0===o?t<n?1:-1:Qa(o),e)}}function Po(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ns(t),n=ns(n)),e(t,n)}}function To(e,t,n,r,o,i,a,s,u,c){var l=8&t;t|=l?32:64,4&(t&=~(l?64:32))||(t&=-4);var f=[e,t,o,l?i:void 0,l?a:void 0,l?void 0:i,l?void 0:a,s,u,c],p=n.apply(void 0,f);return ui(e)&&gi(p,f),p.placeholder=r,bi(p,e,t)}function Co(e){var t=ve[e];return function(e,n){if(e=ns(e),(n=null==n?0:an(es(n),292))&&tn(e)){var r=(os(e)+"e").split("e");return+((r=(os(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var $o=hn&&1/zt(new hn([,-0]))[1]==1/0?function(e){return new hn(e)}:Ks;function Lo(e){return function(t){var n=ti(t);return n==g?Rt(t):n==w?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return pt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ro(e,t,n,o,i,u,c,l){var f=2&t;if(!f&&"function"!=typeof e)throw new be(a);var p=o?o.length:0;if(p||(t&=-97,o=i=void 0),c=void 0===c?c:on(es(c),0),l=void 0===l?l:es(l),p-=i?i.length:0,64&t){var d=o,h=i;o=i=void 0}var v=f?void 0:Ho(e),g=[e,t,n,o,i,d,h,u,c,l];if(v&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?ho(c,u,t[4]):u,e[4]=c?Ut(e[3],s):t[4]}(u=t[5])&&(c=e[5],e[5]=c?vo(c,u,t[6]):u,e[6]=c?Ut(e[5],s):t[6]),(u=t[7])&&(e[7]=u),128&r&&(e[8]=null==e[8]?t[8]:an(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(g,v),e=g[0],t=g[1],n=g[2],o=g[3],i=g[4],!(l=g[9]=void 0===g[9]?f?0:e.length:on(g[9]-p,0))&&24&t&&(t&=-25),t&&1!=t)y=8==t||16==t?function(e,t,n){var o=jo(e);return function i(){for(var a=arguments.length,s=r(a),u=a,c=Ko(i);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:Ut(s,c);return(a-=l.length)<n?To(e,t,Oo,i.placeholder,void 0,s,l,void 0,void 0,n-a):ot(this&&this!==He&&this instanceof i?o:e,this,s)}}(e,t,l):32!=t&&33!=t||i.length?Oo.apply(void 0,g):function(e,t,n,o){var i=1&t,a=jo(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=o.length,f=r(l+u),p=this&&this!==He&&this instanceof t?a:e;++c<l;)f[c]=o[c];for(;u--;)f[c++]=arguments[++s];return ot(p,i?n:this,f)}}(e,t,n,o);else var y=function(e,t,n){var r=1&t,o=jo(e);return function t(){return(this&&this!==He&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return bi((v?Ur:gi)(y,g),e,t)}function Mo(e,t,n,r){return void 0===e||ka(e,xe[n])&&!Ee.call(r,n)?t:e}function Uo(e,t,n,r,o,i){return Ua(e)&&Ua(t)&&(i.set(t,e),Ar(e,t,void 0,Uo,i),i.delete(t)),e}function zo(e){return Wa(e)?void 0:e}function Bo(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e);if(c&&i.get(t))return c==t;var l=-1,f=!0,p=2&n?new Cn:void 0;for(i.set(e,t),i.set(t,e);++l<s;){var d=e[l],h=t[l];if(r)var v=a?r(h,d,l,t,e,i):r(d,h,l,e,t,i);if(void 0!==v){if(v)continue;f=!1;break}if(p){if(!gt(t,(function(e,t){if(!Dt(p,t)&&(d===e||o(d,e,n,r,i)))return p.push(t)}))){f=!1;break}}else if(d!==h&&!o(d,h,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f}function qo(e){return mi(di(e,void 0,Di),e+"")}function Wo(e){return fr(e,ys,Qo)}function Vo(e){return fr(e,ms,ei)}var Ho=yn?function(e){return yn.get(e)}:Ks;function Jo(e){for(var t=e.name+"",n=mn[t],r=Ee.call(mn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function Ko(e){return(Ee.call(On,"placeholder")?On:e).placeholder}function Go(){var e=On.iteratee||Ws;return e=e===Ws?xr:e,arguments.length?e(arguments[0],arguments[1]):e}function Zo(e,t){var n,r,o=e.__data__;return("string"==(r=i(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Xo(e){for(var t=ys(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,fi(o)]}return t}function Yo(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return _r(n)?n:void 0}var Qo=Qt?function(e){return null==e?[]:(e=ge(e),ct(Qt(e),(function(t){return Ze.call(e,t)})))}:tu,ei=Qt?function(e){for(var t=[];e;)dt(t,Qo(e)),e=Je(e);return t}:tu,ti=pr;function ni(e,t,n){for(var r=-1,o=(t=io(t,e)).length,i=!1;++r<o;){var a=Si(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Ma(o)&&ii(a,o)&&(Ia(e)||Fa(e))}function ri(e){return"function"!=typeof e.constructor||li(e)?{}:An(Je(e))}function oi(e){return Ia(e)||Fa(e)||!!(yt&&e&&e[yt])}function ii(e,t){var n=i(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ce.test(e))&&e>-1&&e%1==0&&e<t}function ai(e,t,n){if(!Ua(n))return!1;var r=i(t);return!!("number"==r?Na(n)&&ii(t,n.length):"string"==r&&t in n)&&ka(n[t],e)}function si(e,t){if(Ia(e))return!1;var n=i(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ka(e))||V.test(e)||!W.test(e)||null!=t&&e in ge(t)}function ui(e){var t=Jo(e),n=On[t];if("function"!=typeof n||!(t in Dn.prototype))return!1;if(e===n)return!0;var r=Ho(n);return!!r&&e===r[0]}(fn&&ti(new fn(new ArrayBuffer(1)))!=E||pn&&ti(new pn)!=g||dn&&"[object Promise]"!=ti(dn.resolve())||hn&&ti(new hn)!=w||vn&&ti(new vn)!=S)&&(ti=function(e){var t=pr(e),n=t==m?e.constructor:void 0,r=n?ji(n):"";if(r)switch(r){case bn:return E;case wn:return g;case _n:return"[object Promise]";case xn:return w;case Sn:return S}return t});var ci=Se?La:nu;function li(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xe)}function fi(e){return e==e&&!Ua(e)}function pi(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in ge(n))}}function di(e,t,n){return t=on(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=on(o.length-t,0),s=r(a);++i<a;)s[i]=o[t+i];i=-1;for(var u=r(t+1);++i<t;)u[i]=o[i];return u[t]=n(s),ot(e,this,u)}}function hi(e,t){return t.length<2?e:lr(e,qr(t,0,-1))}function vi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var gi=wi(Ur),yi=Zt||function(e,t){return He.setTimeout(e,t)},mi=wi(zr);function bi(e,t,n){var r=t+"";return mi(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Y,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return at(u,(function(n){var r="_."+n[0];t&n[1]&&!lt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(Q);return t?t[1].split(ee):[]}(r),n)))}function wi(e){var t=0,n=0;return function(){var r=sn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function _i(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n<t;){var i=Tr(n,o),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}var xi=function(e){var t=wa((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(H,(function(e,n,r,o){t.push(r?o.replace(ne,"$1"):n||e)})),t}),(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}();function Si(e){if("string"==typeof e||Ka(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ji(e){if(null!=e){try{return je.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ei(e){if(e instanceof Dn)return e.clone();var t=new In(e.__wrapped__,e.__chain__);return t.__actions__=go(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var ki=$r((function(e,t){return Pa(e)?Yn(e,or(t,1,Pa,!0)):[]})),Oi=$r((function(e,t){var n=$i(t);return Pa(n)&&(n=void 0),Pa(e)?Yn(e,or(t,1,Pa,!0),Go(n,2)):[]})),Ai=$r((function(e,t){var n=$i(t);return Pa(n)&&(n=void 0),Pa(e)?Yn(e,or(t,1,Pa,!0),void 0,n):[]}));function Fi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:es(n);return o<0&&(o=on(r+o,0)),bt(e,Go(t,3),o)}function Ii(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return void 0!==n&&(o=es(n),o=n<0?on(r+o,0):an(o,r-1)),bt(e,Go(t,3),o,!0)}function Di(e){return null!=e&&e.length?or(e,1):[]}function Ni(e){return e&&e.length?e[0]:void 0}var Pi=$r((function(e){var t=pt(e,ro);return t.length&&t[0]===e[0]?gr(t):[]})),Ti=$r((function(e){var t=$i(e),n=pt(e,ro);return t===$i(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?gr(n,Go(t,2)):[]})),Ci=$r((function(e){var t=$i(e),n=pt(e,ro);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?gr(n,void 0,t):[]}));function $i(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Li=$r(Ri);function Ri(e,t){return e&&e.length&&t&&t.length?Nr(e,t):e}var Mi=qo((function(e,t){var n=null==e?0:e.length,r=Jn(e,t);return Pr(e,pt(t,(function(e){return ii(e,n)?+e:e})).sort(po)),r}));function Ui(e){return null==e?e:ln.call(e)}var zi=$r((function(e){return Zr(or(e,1,Pa,!0))})),Bi=$r((function(e){var t=$i(e);return Pa(t)&&(t=void 0),Zr(or(e,1,Pa,!0),Go(t,2))})),qi=$r((function(e){var t=$i(e);return t="function"==typeof t?t:void 0,Zr(or(e,1,Pa,!0),void 0,t)}));function Wi(e){if(!e||!e.length)return[];var t=0;return e=ct(e,(function(e){if(Pa(e))return t=on(e.length,t),!0})),At(t,(function(t){return pt(e,jt(t))}))}function Vi(e,t){if(!e||!e.length)return[];var n=Wi(e);return null==t?n:pt(n,(function(e){return ot(t,void 0,e)}))}var Hi=$r((function(e,t){return Pa(e)?Yn(e,t):[]})),Ji=$r((function(e){return to(ct(e,Pa))})),Ki=$r((function(e){var t=$i(e);return Pa(t)&&(t=void 0),to(ct(e,Pa),Go(t,2))})),Gi=$r((function(e){var t=$i(e);return t="function"==typeof t?t:void 0,to(ct(e,Pa),void 0,t)})),Zi=$r(Wi),Xi=$r((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Vi(e,n)}));function Yi(e){var t=On(e);return t.__chain__=!0,t}function Qi(e,t){return t(e)}var ea=qo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Jn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Dn&&ii(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:Qi,args:[o],thisArg:void 0}),new In(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(o)})),ta=mo((function(e,t,n){Ee.call(e,n)?++e[n]:Hn(e,n,1)})),na=Eo(Fi),ra=Eo(Ii);function oa(e,t){return(Ia(e)?at:Qn)(e,Go(t,3))}function ia(e,t){return(Ia(e)?st:er)(e,Go(t,3))}var aa=mo((function(e,t,n){Ee.call(e,n)?e[n].push(t):Hn(e,n,[t])})),sa=$r((function(e,t,n){var o=-1,i="function"==typeof t,a=Na(e)?r(e.length):[];return Qn(e,(function(e){a[++o]=i?ot(t,e,n):yr(e,t,n)})),a})),ua=mo((function(e,t,n){Hn(e,n,t)}));function ca(e,t){return(Ia(e)?pt:Er)(e,Go(t,3))}var la=mo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),fa=$r((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ai(e,t[0],t[1])?t=[]:n>2&&ai(t[0],t[1],t[2])&&(t=[t[0]]),Ir(e,or(t,1),[])})),pa=Gt||function(){return He.Date.now()};function da(e,t,n){return t=n?void 0:t,Ro(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function ha(e,t){var n;if("function"!=typeof t)throw new be(a);return e=es(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var va=$r((function(e,t,n){var r=1;if(n.length){var o=Ut(n,Ko(va));r|=32}return Ro(e,r,t,n,o)})),ga=$r((function(e,t,n){var r=3;if(n.length){var o=Ut(n,Ko(ga));r|=32}return Ro(t,r,e,n,o)}));function ya(e,t,n){var r,o,i,s,u,c,l=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new be(a);function h(t){var n=r,i=o;return r=o=void 0,l=t,s=e.apply(i,n)}function v(e){var n=e-c;return void 0===c||n>=t||n<0||p&&e-l>=i}function g(){var e=pa();if(v(e))return y(e);u=yi(g,function(e){var n=t-(e-c);return p?an(n,i-(e-l)):n}(e))}function y(e){return u=void 0,d&&r?h(e):(r=o=void 0,s)}function m(){var e=pa(),n=v(e);if(r=arguments,o=this,c=e,n){if(void 0===u)return function(e){return l=e,u=yi(g,t),f?h(e):s}(c);if(p)return uo(u),u=yi(g,t),h(c)}return void 0===u&&(u=yi(g,t)),s}return t=ns(t)||0,Ua(n)&&(f=!!n.leading,i=(p="maxWait"in n)?on(ns(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d),m.cancel=function(){void 0!==u&&uo(u),l=0,r=c=o=u=void 0},m.flush=function(){return void 0===u?s:y(pa())},m}var ma=$r((function(e,t){return Xn(e,1,t)})),ba=$r((function(e,t,n){return Xn(e,ns(t)||0,n)}));function wa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new be(a);var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(wa.Cache||Tn),n}function _a(e){if("function"!=typeof e)throw new be(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}wa.Cache=Tn;var xa=ao((function(e,t){var n=(t=1==t.length&&Ia(t[0])?pt(t[0],Ft(Go())):pt(or(t,1),Ft(Go()))).length;return $r((function(r){for(var o=-1,i=an(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return ot(e,this,r)}))})),Sa=$r((function(e,t){return Ro(e,32,void 0,t,Ut(t,Ko(Sa)))})),ja=$r((function(e,t){return Ro(e,64,void 0,t,Ut(t,Ko(ja)))})),Ea=qo((function(e,t){return Ro(e,256,void 0,void 0,void 0,t)}));function ka(e,t){return e===t||e!=e&&t!=t}var Oa=Po(dr),Aa=Po((function(e,t){return e>=t})),Fa=mr(function(){return arguments}())?mr:function(e){return za(e)&&Ee.call(e,"callee")&&!Ze.call(e,"callee")},Ia=r.isArray,Da=Ye?Ft(Ye):function(e){return za(e)&&pr(e)==j};function Na(e){return null!=e&&Ma(e.length)&&!La(e)}function Pa(e){return za(e)&&Na(e)}var Ta=en||nu,Ca=Qe?Ft(Qe):function(e){return za(e)&&pr(e)==p};function $a(e){if(!za(e))return!1;var t=pr(e);return t==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Wa(e)}function La(e){if(!Ua(e))return!1;var t=pr(e);return t==h||t==v||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ra(e){return"number"==typeof e&&e==es(e)}function Ma(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ua(e){var t=i(e);return null!=e&&("object"==t||"function"==t)}function za(e){return null!=e&&"object"==i(e)}var Ba=et?Ft(et):function(e){return za(e)&&ti(e)==g};function qa(e){return"number"==typeof e||za(e)&&pr(e)==y}function Wa(e){if(!za(e)||pr(e)!=m)return!1;var t=Je(e);if(null===t)return!0;var n=Ee.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&je.call(n)==Fe}var Va=tt?Ft(tt):function(e){return za(e)&&pr(e)==b},Ha=nt?Ft(nt):function(e){return za(e)&&ti(e)==w};function Ja(e){return"string"==typeof e||!Ia(e)&&za(e)&&pr(e)==_}function Ka(e){return"symbol"==i(e)||za(e)&&pr(e)==x}var Ga=rt?Ft(rt):function(e){return za(e)&&Ma(e.length)&&!!Me[pr(e)]},Za=Po(jr),Xa=Po((function(e,t){return e<=t}));function Ya(e){if(!e)return[];if(Na(e))return Ja(e)?qt(e):go(e);if(Et&&e[Et])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Et]());var t=ti(e);return(t==g?Rt:t==w?zt:ks)(e)}function Qa(e){return e?(e=ns(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function es(e){var t=Qa(e),n=t%1;return t==t?n?t-n:t:0}function ts(e){return e?Kn(es(e),0,4294967295):0}function ns(e){if("number"==typeof e)return e;if(Ka(e))return NaN;if(Ua(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ua(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(G,"");var n=ae.test(e);return n||ue.test(e)?qe(e.slice(2),n?2:8):ie.test(e)?NaN:+e}function rs(e){return yo(e,ms(e))}function os(e){return null==e?"":Gr(e)}var is=bo((function(e,t){if(li(t)||Na(t))yo(t,ys(t),e);else for(var n in t)Ee.call(t,n)&&Bn(e,n,t[n])})),as=bo((function(e,t){yo(t,ms(t),e)})),ss=bo((function(e,t,n,r){yo(t,ms(t),e,r)})),us=bo((function(e,t,n,r){yo(t,ys(t),e,r)})),cs=qo(Jn),ls=$r((function(e,t){e=ge(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&ai(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],a=ms(i),s=-1,u=a.length;++s<u;){var c=a[s],l=e[c];(void 0===l||ka(l,xe[c])&&!Ee.call(e,c))&&(e[c]=i[c])}return e})),fs=$r((function(e){return e.push(void 0,Uo),ot(ws,void 0,e)}));function ps(e,t,n){var r=null==e?void 0:lr(e,t);return void 0===r?n:r}function ds(e,t){return null!=e&&ni(e,t,vr)}var hs=Ao((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ae.call(t)),e[t]=n}),Us(qs)),vs=Ao((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ae.call(t)),Ee.call(e,t)?e[t].push(n):e[t]=[n]}),Go),gs=$r(yr);function ys(e){return Na(e)?Ln(e):Sr(e)}function ms(e){return Na(e)?Ln(e,!0):function(e){if(!Ua(e))return function(e){var t=[];if(null!=e)for(var n in ge(e))t.push(n);return t}(e);var t=li(e),n=[];for(var r in e)("constructor"!=r||!t&&Ee.call(e,r))&&n.push(r);return n}(e)}var bs=bo((function(e,t,n){Ar(e,t,n)})),ws=bo((function(e,t,n,r){Ar(e,t,n,r)})),_s=qo((function(e,t){var n={};if(null==e)return n;var r=!1;t=pt(t,(function(t){return t=io(t,e),r||(r=t.length>1),t})),yo(e,Vo(e),n),r&&(n=Gn(n,7,zo));for(var o=t.length;o--;)Xr(n,t[o]);return n})),xs=qo((function(e,t){return null==e?{}:function(e,t){return Dr(e,t,(function(t,n){return ds(e,n)}))}(e,t)}));function Ss(e,t){if(null==e)return{};var n=pt(Vo(e),(function(e){return[e]}));return t=Go(t),Dr(e,n,(function(e,n){return t(e,n[0])}))}var js=Lo(ys),Es=Lo(ms);function ks(e){return null==e?[]:It(e,ys(e))}var Os=So((function(e,t,n){return t=t.toLowerCase(),e+(n?As(t):t)}));function As(e){return $s(os(e).toLowerCase())}function Fs(e){return(e=os(e))&&e.replace(le,Tt).replace(Ne,"")}var Is=So((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ds=So((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ns=xo("toLowerCase"),Ps=So((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ts=So((function(e,t,n){return e+(n?" ":"")+$s(t)})),Cs=So((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),$s=xo("toUpperCase");function Ls(e,t,n){return e=os(e),void 0===(t=n?void 0:t)?function(e){return $e.test(e)}(e)?function(e){return e.match(Te)||[]}(e):function(e){return e.match(te)||[]}(e):e.match(t)||[]}var Rs=$r((function(e,t){try{return ot(e,void 0,t)}catch(e){return $a(e)?e:new de(e)}})),Ms=qo((function(e,t){return at(t,(function(t){t=Si(t),Hn(e,t,va(e[t],e))})),e}));function Us(e){return function(){return e}}var zs=ko(),Bs=ko(!0);function qs(e){return e}function Ws(e){return xr("function"==typeof e?e:Gn(e,1))}var Vs=$r((function(e,t){return function(n){return yr(n,e,t)}})),Hs=$r((function(e,t){return function(n){return yr(e,n,t)}}));function Js(e,t,n){var r=ys(t),o=cr(t,r);null!=n||Ua(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=cr(t,ys(t)));var i=!(Ua(n)&&"chain"in n&&!n.chain),a=La(e);return at(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=go(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,dt([this.value()],arguments))})})),e}function Ks(){}var Gs=Io(pt),Zs=Io(ut),Xs=Io(gt);function Ys(e){return si(e)?jt(Si(e)):function(e){return function(t){return lr(t,e)}}(e)}var Qs=No(),eu=No(!0);function tu(){return[]}function nu(){return!1}var ru,ou=Fo((function(e,t){return e+t}),0),iu=Co("ceil"),au=Fo((function(e,t){return e/t}),1),su=Co("floor"),uu=Fo((function(e,t){return e*t}),1),cu=Co("round"),lu=Fo((function(e,t){return e-t}),0);return On.after=function(e,t){if("function"!=typeof t)throw new be(a);return e=es(e),function(){if(--e<1)return t.apply(this,arguments)}},On.ary=da,On.assign=is,On.assignIn=as,On.assignInWith=ss,On.assignWith=us,On.at=cs,On.before=ha,On.bind=va,On.bindAll=Ms,On.bindKey=ga,On.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ia(e)?e:[e]},On.chain=Yi,On.chunk=function(e,t,n){t=(n?ai(e,t,n):void 0===t)?1:on(es(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=r(Xt(o/t));i<o;)s[a++]=qr(e,i,i+=t);return s},On.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},On.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return dt(Ia(n)?go(n):[n],or(t,1))},On.cond=function(e){var t=null==e?0:e.length,n=Go();return e=t?pt(e,(function(e){if("function"!=typeof e[1])throw new be(a);return[n(e[0]),e[1]]})):[],$r((function(n){for(var r=-1;++r<t;){var o=e[r];if(ot(o[0],this,n))return ot(o[1],this,n)}}))},On.conforms=function(e){return function(e){var t=ys(e);return function(n){return Zn(n,e,t)}}(Gn(e,1))},On.constant=Us,On.countBy=ta,On.create=function(e,t){var n=An(e);return null==t?n:Vn(n,t)},On.curry=function e(t,n,r){var o=Ro(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=e.placeholder,o},On.curryRight=function e(t,n,r){var o=Ro(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=e.placeholder,o},On.debounce=ya,On.defaults=ls,On.defaultsDeep=fs,On.defer=ma,On.delay=ba,On.difference=ki,On.differenceBy=Oi,On.differenceWith=Ai,On.drop=function(e,t,n){var r=null==e?0:e.length;return r?qr(e,(t=n||void 0===t?1:es(t))<0?0:t,r):[]},On.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?qr(e,0,(t=r-(t=n||void 0===t?1:es(t)))<0?0:t):[]},On.dropRightWhile=function(e,t){return e&&e.length?Qr(e,Go(t,3),!0,!0):[]},On.dropWhile=function(e,t){return e&&e.length?Qr(e,Go(t,3),!0):[]},On.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&ai(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=es(n))<0&&(n=-n>o?0:o+n),(r=void 0===r||r>o?o:es(r))<0&&(r+=o),r=n>r?0:ts(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},On.filter=function(e,t){return(Ia(e)?ct:rr)(e,Go(t,3))},On.flatMap=function(e,t){return or(ca(e,t),1)},On.flatMapDeep=function(e,t){return or(ca(e,t),1/0)},On.flatMapDepth=function(e,t,n){return n=void 0===n?1:es(n),or(ca(e,t),n)},On.flatten=Di,On.flattenDeep=function(e){return null!=e&&e.length?or(e,1/0):[]},On.flattenDepth=function(e,t){return null!=e&&e.length?or(e,t=void 0===t?1:es(t)):[]},On.flip=function(e){return Ro(e,512)},On.flow=zs,On.flowRight=Bs,On.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},On.functions=function(e){return null==e?[]:cr(e,ys(e))},On.functionsIn=function(e){return null==e?[]:cr(e,ms(e))},On.groupBy=aa,On.initial=function(e){return null!=e&&e.length?qr(e,0,-1):[]},On.intersection=Pi,On.intersectionBy=Ti,On.intersectionWith=Ci,On.invert=hs,On.invertBy=vs,On.invokeMap=sa,On.iteratee=Ws,On.keyBy=ua,On.keys=ys,On.keysIn=ms,On.map=ca,On.mapKeys=function(e,t){var n={};return t=Go(t,3),sr(e,(function(e,r,o){Hn(n,t(e,r,o),e)})),n},On.mapValues=function(e,t){var n={};return t=Go(t,3),sr(e,(function(e,r,o){Hn(n,r,t(e,r,o))})),n},On.matches=function(e){return kr(Gn(e,1))},On.matchesProperty=function(e,t){return Or(e,Gn(t,1))},On.memoize=wa,On.merge=bs,On.mergeWith=ws,On.method=Vs,On.methodOf=Hs,On.mixin=Js,On.negate=_a,On.nthArg=function(e){return e=es(e),$r((function(t){return Fr(t,e)}))},On.omit=_s,On.omitBy=function(e,t){return Ss(e,_a(Go(t)))},On.once=function(e){return ha(2,e)},On.orderBy=function(e,t,n,r){return null==e?[]:(Ia(t)||(t=null==t?[]:[t]),Ia(n=r?void 0:n)||(n=null==n?[]:[n]),Ir(e,t,n))},On.over=Gs,On.overArgs=xa,On.overEvery=Zs,On.overSome=Xs,On.partial=Sa,On.partialRight=ja,On.partition=la,On.pick=xs,On.pickBy=Ss,On.property=Ys,On.propertyOf=function(e){return function(t){return null==e?void 0:lr(e,t)}},On.pull=Li,On.pullAll=Ri,On.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Nr(e,t,Go(n,2)):e},On.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Nr(e,t,void 0,n):e},On.pullAt=Mi,On.range=Qs,On.rangeRight=eu,On.rearg=Ea,On.reject=function(e,t){return(Ia(e)?ct:rr)(e,_a(Go(t,3)))},On.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Go(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Pr(e,o),n},On.rest=function(e,t){if("function"!=typeof e)throw new be(a);return $r(e,t=void 0===t?t:es(t))},On.reverse=Ui,On.sampleSize=function(e,t,n){return t=(n?ai(e,t,n):void 0===t)?1:es(t),(Ia(e)?Mn:Rr)(e,t)},On.set=function(e,t,n){return null==e?e:Mr(e,t,n)},On.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Mr(e,t,n,r)},On.shuffle=function(e){return(Ia(e)?Un:Br)(e)},On.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&ai(e,t,n)?(t=0,n=r):(t=null==t?0:es(t),n=void 0===n?r:es(n)),qr(e,t,n)):[]},On.sortBy=fa,On.sortedUniq=function(e){return e&&e.length?Jr(e):[]},On.sortedUniqBy=function(e,t){return e&&e.length?Jr(e,Go(t,2)):[]},On.split=function(e,t,n){return n&&"number"!=typeof n&&ai(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=os(e))&&("string"==typeof t||null!=t&&!Va(t))&&!(t=Gr(t))&&Lt(e)?so(qt(e),0,n):e.split(t,n):[]},On.spread=function(e,t){if("function"!=typeof e)throw new be(a);return t=null==t?0:on(es(t),0),$r((function(n){var r=n[t],o=so(n,0,t);return r&&dt(o,r),ot(e,this,o)}))},On.tail=function(e){var t=null==e?0:e.length;return t?qr(e,1,t):[]},On.take=function(e,t,n){return e&&e.length?qr(e,0,(t=n||void 0===t?1:es(t))<0?0:t):[]},On.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?qr(e,(t=r-(t=n||void 0===t?1:es(t)))<0?0:t,r):[]},On.takeRightWhile=function(e,t){return e&&e.length?Qr(e,Go(t,3),!1,!0):[]},On.takeWhile=function(e,t){return e&&e.length?Qr(e,Go(t,3)):[]},On.tap=function(e,t){return t(e),e},On.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new be(a);return Ua(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ya(e,t,{leading:r,maxWait:t,trailing:o})},On.thru=Qi,On.toArray=Ya,On.toPairs=js,On.toPairsIn=Es,On.toPath=function(e){return Ia(e)?pt(e,Si):Ka(e)?[e]:go(xi(os(e)))},On.toPlainObject=rs,On.transform=function(e,t,n){var r=Ia(e),o=r||Ta(e)||Ga(e);if(t=Go(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Ua(e)&&La(i)?An(Je(e)):{}}return(o?at:sr)(e,(function(e,r,o){return t(n,e,r,o)})),n},On.unary=function(e){return da(e,1)},On.union=zi,On.unionBy=Bi,On.unionWith=qi,On.uniq=function(e){return e&&e.length?Zr(e):[]},On.uniqBy=function(e,t){return e&&e.length?Zr(e,Go(t,2)):[]},On.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Zr(e,void 0,t):[]},On.unset=function(e,t){return null==e||Xr(e,t)},On.unzip=Wi,On.unzipWith=Vi,On.update=function(e,t,n){return null==e?e:Yr(e,t,oo(n))},On.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Yr(e,t,oo(n),r)},On.values=ks,On.valuesIn=function(e){return null==e?[]:It(e,ms(e))},On.without=Hi,On.words=Ls,On.wrap=function(e,t){return Sa(oo(t),e)},On.xor=Ji,On.xorBy=Ki,On.xorWith=Gi,On.zip=Zi,On.zipObject=function(e,t){return no(e||[],t||[],Bn)},On.zipObjectDeep=function(e,t){return no(e||[],t||[],Mr)},On.zipWith=Xi,On.entries=js,On.entriesIn=Es,On.extend=as,On.extendWith=ss,Js(On,On),On.add=ou,On.attempt=Rs,On.camelCase=Os,On.capitalize=As,On.ceil=iu,On.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=ns(n))==n?n:0),void 0!==t&&(t=(t=ns(t))==t?t:0),Kn(ns(e),t,n)},On.clone=function(e){return Gn(e,4)},On.cloneDeep=function(e){return Gn(e,5)},On.cloneDeepWith=function(e,t){return Gn(e,5,t="function"==typeof t?t:void 0)},On.cloneWith=function(e,t){return Gn(e,4,t="function"==typeof t?t:void 0)},On.conformsTo=function(e,t){return null==t||Zn(e,t,ys(t))},On.deburr=Fs,On.defaultTo=function(e,t){return null==e||e!=e?t:e},On.divide=au,On.endsWith=function(e,t,n){e=os(e),t=Gr(t);var r=e.length,o=n=void 0===n?r:Kn(es(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},On.eq=ka,On.escape=function(e){return(e=os(e))&&U.test(e)?e.replace(R,Ct):e},On.escapeRegExp=function(e){return(e=os(e))&&K.test(e)?e.replace(J,"\\$&"):e},On.every=function(e,t,n){var r=Ia(e)?ut:tr;return n&&ai(e,t,n)&&(t=void 0),r(e,Go(t,3))},On.find=na,On.findIndex=Fi,On.findKey=function(e,t){return mt(e,Go(t,3),sr)},On.findLast=ra,On.findLastIndex=Ii,On.findLastKey=function(e,t){return mt(e,Go(t,3),ur)},On.floor=su,On.forEach=oa,On.forEachRight=ia,On.forIn=function(e,t){return null==e?e:ir(e,Go(t,3),ms)},On.forInRight=function(e,t){return null==e?e:ar(e,Go(t,3),ms)},On.forOwn=function(e,t){return e&&sr(e,Go(t,3))},On.forOwnRight=function(e,t){return e&&ur(e,Go(t,3))},On.get=ps,On.gt=Oa,On.gte=Aa,On.has=function(e,t){return null!=e&&ni(e,t,hr)},On.hasIn=ds,On.head=Ni,On.identity=qs,On.includes=function(e,t,n,r){e=Na(e)?e:ks(e),n=n&&!r?es(n):0;var o=e.length;return n<0&&(n=on(o+n,0)),Ja(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&wt(e,t,n)>-1},On.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:es(n);return o<0&&(o=on(r+o,0)),wt(e,t,o)},On.inRange=function(e,t,n){return t=Qa(t),void 0===n?(n=t,t=0):n=Qa(n),function(e,t,n){return e>=an(t,n)&&e<on(t,n)}(e=ns(e),t,n)},On.invoke=gs,On.isArguments=Fa,On.isArray=Ia,On.isArrayBuffer=Da,On.isArrayLike=Na,On.isArrayLikeObject=Pa,On.isBoolean=function(e){return!0===e||!1===e||za(e)&&pr(e)==f},On.isBuffer=Ta,On.isDate=Ca,On.isElement=function(e){return za(e)&&1===e.nodeType&&!Wa(e)},On.isEmpty=function(e){if(null==e)return!0;if(Na(e)&&(Ia(e)||"string"==typeof e||"function"==typeof e.splice||Ta(e)||Ga(e)||Fa(e)))return!e.length;var t=ti(e);if(t==g||t==w)return!e.size;if(li(e))return!Sr(e).length;for(var n in e)if(Ee.call(e,n))return!1;return!0},On.isEqual=function(e,t){return br(e,t)},On.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?br(e,t,void 0,n):!!r},On.isError=$a,On.isFinite=function(e){return"number"==typeof e&&tn(e)},On.isFunction=La,On.isInteger=Ra,On.isLength=Ma,On.isMap=Ba,On.isMatch=function(e,t){return e===t||wr(e,t,Xo(t))},On.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,wr(e,t,Xo(t),n)},On.isNaN=function(e){return qa(e)&&e!=+e},On.isNative=function(e){if(ci(e))throw new de("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return _r(e)},On.isNil=function(e){return null==e},On.isNull=function(e){return null===e},On.isNumber=qa,On.isObject=Ua,On.isObjectLike=za,On.isPlainObject=Wa,On.isRegExp=Va,On.isSafeInteger=function(e){return Ra(e)&&e>=-9007199254740991&&e<=9007199254740991},On.isSet=Ha,On.isString=Ja,On.isSymbol=Ka,On.isTypedArray=Ga,On.isUndefined=function(e){return void 0===e},On.isWeakMap=function(e){return za(e)&&ti(e)==S},On.isWeakSet=function(e){return za(e)&&"[object WeakSet]"==pr(e)},On.join=function(e,t){return null==e?"":nn.call(e,t)},On.kebabCase=Is,On.last=$i,On.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=es(n))<0?on(r+o,0):an(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):bt(e,xt,o,!0)},On.lowerCase=Ds,On.lowerFirst=Ns,On.lt=Za,On.lte=Xa,On.max=function(e){return e&&e.length?nr(e,qs,dr):void 0},On.maxBy=function(e,t){return e&&e.length?nr(e,Go(t,2),dr):void 0},On.mean=function(e){return St(e,qs)},On.meanBy=function(e,t){return St(e,Go(t,2))},On.min=function(e){return e&&e.length?nr(e,qs,jr):void 0},On.minBy=function(e,t){return e&&e.length?nr(e,Go(t,2),jr):void 0},On.stubArray=tu,On.stubFalse=nu,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return!0},On.multiply=uu,On.nth=function(e,t){return e&&e.length?Fr(e,es(t)):void 0},On.noConflict=function(){return He._===this&&(He._=Ie),this},On.noop=Ks,On.now=pa,On.pad=function(e,t,n){e=os(e);var r=(t=es(t))?Bt(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Do(Yt(o),n)+e+Do(Xt(o),n)},On.padEnd=function(e,t,n){e=os(e);var r=(t=es(t))?Bt(e):0;return t&&r<t?e+Do(t-r,n):e},On.padStart=function(e,t,n){e=os(e);var r=(t=es(t))?Bt(e):0;return t&&r<t?Do(t-r,n)+e:e},On.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),un(os(e).replace(Z,""),t||0)},On.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ai(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=Qa(e),void 0===t?(t=e,e=0):t=Qa(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=cn();return an(e+o*(t-e+Be("1e-"+((o+"").length-1))),t)}return Tr(e,t)},On.reduce=function(e,t,n){var r=Ia(e)?ht:kt,o=arguments.length<3;return r(e,Go(t,4),n,o,Qn)},On.reduceRight=function(e,t,n){var r=Ia(e)?vt:kt,o=arguments.length<3;return r(e,Go(t,4),n,o,er)},On.repeat=function(e,t,n){return t=(n?ai(e,t,n):void 0===t)?1:es(t),Cr(os(e),t)},On.replace=function(){var e=arguments,t=os(e[0]);return e.length<3?t:t.replace(e[1],e[2])},On.result=function(e,t,n){var r=-1,o=(t=io(t,e)).length;for(o||(o=1,e=void 0);++r<o;){var i=null==e?void 0:e[Si(t[r])];void 0===i&&(r=o,i=n),e=La(i)?i.call(e):i}return e},On.round=cu,On.runInContext=e,On.sample=function(e){return(Ia(e)?Rn:Lr)(e)},On.size=function(e){if(null==e)return 0;if(Na(e))return Ja(e)?Bt(e):e.length;var t=ti(e);return t==g||t==w?e.size:Sr(e).length},On.snakeCase=Ps,On.some=function(e,t,n){var r=Ia(e)?gt:Wr;return n&&ai(e,t,n)&&(t=void 0),r(e,Go(t,3))},On.sortedIndex=function(e,t){return Vr(e,t)},On.sortedIndexBy=function(e,t,n){return Hr(e,t,Go(n,2))},On.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Vr(e,t);if(r<n&&ka(e[r],t))return r}return-1},On.sortedLastIndex=function(e,t){return Vr(e,t,!0)},On.sortedLastIndexBy=function(e,t,n){return Hr(e,t,Go(n,2),!0)},On.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Vr(e,t,!0)-1;if(ka(e[n],t))return n}return-1},On.startCase=Ts,On.startsWith=function(e,t,n){return e=os(e),n=null==n?0:Kn(es(n),0,e.length),t=Gr(t),e.slice(n,n+t.length)==t},On.subtract=lu,On.sum=function(e){return e&&e.length?Ot(e,qs):0},On.sumBy=function(e,t){return e&&e.length?Ot(e,Go(t,2)):0},On.template=function(e,t,n){var r=On.templateSettings;n&&ai(e,t,n)&&(t=void 0),e=os(e),t=ss({},t,r,Mo);var o,i,a=ss({},t.imports,r.imports,Mo),s=ys(a),u=It(a,s),c=0,l=t.interpolate||fe,f="__p += '",p=ye((t.escape||fe).source+"|"+l.source+"|"+(l===q?re:fe).source+"|"+(t.evaluate||fe).source+"|$","g"),d="//# sourceURL="+(Ee.call(t,"sourceURL")?(t.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++Re+"]")+"\n";e.replace(p,(function(t,n,r,a,s,u){return r||(r=a),f+=e.slice(c,u).replace(pe,$t),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(i=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),f+="';\n";var h=Ee.call(t,"variable")&&t.variable;h||(f="with (obj) {\n"+f+"\n}\n"),f=(i?f.replace(T,""):f).replace(C,"$1").replace($,"$1;"),f="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=Rs((function(){return he(s,d+"return "+f).apply(void 0,u)}));if(v.source=f,$a(v))throw v;return v},On.times=function(e,t){if((e=es(e))<1||e>9007199254740991)return[];var n=4294967295,r=an(e,4294967295);e-=4294967295;for(var o=At(r,t=Go(t));++n<e;)t(n);return o},On.toFinite=Qa,On.toInteger=es,On.toLength=ts,On.toLower=function(e){return os(e).toLowerCase()},On.toNumber=ns,On.toSafeInteger=function(e){return e?Kn(es(e),-9007199254740991,9007199254740991):0===e?e:0},On.toString=os,On.toUpper=function(e){return os(e).toUpperCase()},On.trim=function(e,t,n){if((e=os(e))&&(n||void 0===t))return e.replace(G,"");if(!e||!(t=Gr(t)))return e;var r=qt(e),o=qt(t);return so(r,Nt(r,o),Pt(r,o)+1).join("")},On.trimEnd=function(e,t,n){if((e=os(e))&&(n||void 0===t))return e.replace(X,"");if(!e||!(t=Gr(t)))return e;var r=qt(e);return so(r,0,Pt(r,qt(t))+1).join("")},On.trimStart=function(e,t,n){if((e=os(e))&&(n||void 0===t))return e.replace(Z,"");if(!e||!(t=Gr(t)))return e;var r=qt(e);return so(r,Nt(r,qt(t))).join("")},On.truncate=function(e,t){var n=30,r="...";if(Ua(t)){var o="separator"in t?t.separator:o;n="length"in t?es(t.length):n,r="omission"in t?Gr(t.omission):r}var i=(e=os(e)).length;if(Lt(e)){var a=qt(e);i=a.length}if(n>=i)return e;var s=n-Bt(r);if(s<1)return r;var u=a?so(a,0,s).join(""):e.slice(0,s);if(void 0===o)return u+r;if(a&&(s+=u.length-s),Va(o)){if(e.slice(s).search(o)){var c,l=u;for(o.global||(o=ye(o.source,os(oe.exec(o))+"g")),o.lastIndex=0;c=o.exec(l);)var f=c.index;u=u.slice(0,void 0===f?s:f)}}else if(e.indexOf(Gr(o),s)!=s){var p=u.lastIndexOf(o);p>-1&&(u=u.slice(0,p))}return u+r},On.unescape=function(e){return(e=os(e))&&M.test(e)?e.replace(L,Wt):e},On.uniqueId=function(e){var t=++ke;return os(e)+t},On.upperCase=Cs,On.upperFirst=$s,On.each=oa,On.eachRight=ia,On.first=Ni,Js(On,(ru={},sr(On,(function(e,t){Ee.call(On.prototype,t)||(ru[t]=e)})),ru),{chain:!1}),On.VERSION="4.17.15",at(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){On[e].placeholder=On})),at(["drop","take"],(function(e,t){Dn.prototype[e]=function(n){n=void 0===n?1:on(es(n),0);var r=this.__filtered__&&!t?new Dn(this):this.clone();return r.__filtered__?r.__takeCount__=an(n,r.__takeCount__):r.__views__.push({size:an(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Dn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),at(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Dn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Go(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),at(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Dn.prototype[e]=function(){return this[n](1).value()[0]}})),at(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Dn.prototype[e]=function(){return this.__filtered__?new Dn(this):this[n](1)}})),Dn.prototype.compact=function(){return this.filter(qs)},Dn.prototype.find=function(e){return this.filter(e).head()},Dn.prototype.findLast=function(e){return this.reverse().find(e)},Dn.prototype.invokeMap=$r((function(e,t){return"function"==typeof e?new Dn(this):this.map((function(n){return yr(n,e,t)}))})),Dn.prototype.reject=function(e){return this.filter(_a(Go(e)))},Dn.prototype.slice=function(e,t){e=es(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Dn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=es(t))<0?n.dropRight(-t):n.take(t-e)),n)},Dn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Dn.prototype.toArray=function(){return this.take(4294967295)},sr(Dn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=On[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(On.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof Dn,u=a[0],c=s||Ia(t),l=function(e){var t=o.apply(On,dt([e],a));return r&&f?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(s=c=!1);var f=this.__chain__,p=!!this.__actions__.length,d=i&&!f,h=s&&!p;if(!i&&c){t=h?t:new Dn(this);var v=e.apply(t,a);return v.__actions__.push({func:Qi,args:[l],thisArg:void 0}),new In(v,f)}return d&&h?e.apply(this,a):(v=this.thru(l),d?r?v.value()[0]:v.value():v)})})),at(["pop","push","shift","sort","splice","unshift"],(function(e){var t=we[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);On.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ia(o)?o:[],e)}return this[n]((function(n){return t.apply(Ia(n)?n:[],e)}))}})),sr(Dn.prototype,(function(e,t){var n=On[t];if(n){var r=n.name+"";Ee.call(mn,r)||(mn[r]=[]),mn[r].push({name:t,func:n})}})),mn[Oo(void 0,2).name]=[{name:"wrapper",func:void 0}],Dn.prototype.clone=function(){var e=new Dn(this.__wrapped__);return e.__actions__=go(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=go(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=go(this.__views__),e},Dn.prototype.reverse=function(){if(this.__filtered__){var e=new Dn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Dn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ia(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=an(t,e+a);break;case"takeRight":e=on(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,d=an(u,this.__takeCount__);if(!n||!r&&o==u&&d==u)return eo(e,this.__actions__);var h=[];e:for(;u--&&p<d;){for(var v=-1,g=e[c+=t];++v<f;){var y=l[v],m=y.iteratee,b=y.type,w=m(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}h[p++]=g}return h},On.prototype.at=ea,On.prototype.chain=function(){return Yi(this)},On.prototype.commit=function(){return new In(this.value(),this.__chain__)},On.prototype.next=function(){void 0===this.__values__&&(this.__values__=Ya(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},On.prototype.plant=function(e){for(var t,n=this;n instanceof Fn;){var r=Ei(n);r.__index__=0,r.__values__=void 0,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},On.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Dn){var t=e;return this.__actions__.length&&(t=new Dn(this)),(t=t.reverse()).__actions__.push({func:Qi,args:[Ui],thisArg:void 0}),new In(t,this.__chain__)}return this.thru(Ui)},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return eo(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Et&&(On.prototype[Et]=function(){return this}),On}();"object"==i(n(46))&&n(46)?(He._=Vt,void 0===(o=function(){return Vt}.call(t,n,t,r))||(r.exports=o)):Ke?((Ke.exports=Vt)._=Vt,Je._=Vt):He._=Vt}).call(this)}).call(this,n(11),n(14)(e))},function(e,t,n){var r=n(87);e.exports={Graph:r.Graph,json:n(213),alg:n(214),version:r.version}},function(e,t,n){e.exports={Graph:n(28),version:n(212)}},function(e,t,n){var r=n(89);e.exports=function(e){return r(e,4)}},function(e,t,n){var r=n(29),o=n(33),i=n(49),a=n(118),s=n(124),u=n(127),c=n(128),l=n(129),f=n(130),p=n(59),d=n(131),h=n(10),v=n(135),g=n(136),y=n(141),m=n(0),b=n(12),w=n(142),_=n(5),x=n(144),S=n(6),j={};j["[object Arguments]"]=j["[object Array]"]=j["[object ArrayBuffer]"]=j["[object DataView]"]=j["[object Boolean]"]=j["[object Date]"]=j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Map]"]=j["[object Number]"]=j["[object Object]"]=j["[object RegExp]"]=j["[object Set]"]=j["[object String]"]=j["[object Symbol]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j["[object Error]"]=j["[object Function]"]=j["[object WeakMap]"]=!1,e.exports=function e(t,n,E,k,O,A){var F,I=1&n,D=2&n,N=4&n;if(E&&(F=O?E(t,k,O,A):E(t)),void 0!==F)return F;if(!_(t))return t;var P=m(t);if(P){if(F=v(t),!I)return c(t,F)}else{var T=h(t),C="[object Function]"==T||"[object GeneratorFunction]"==T;if(b(t))return u(t,I);if("[object Object]"==T||"[object Arguments]"==T||C&&!O){if(F=D||C?{}:y(t),!I)return D?f(t,s(F,t)):l(t,a(F,t))}else{if(!j[T])return O?t:{};F=g(t,T,I)}}A||(A=new r);var $=A.get(t);if($)return $;A.set(t,F),x(t)?t.forEach((function(r){F.add(e(r,n,E,r,t,A))})):w(t)&&t.forEach((function(r,o){F.set(o,e(r,n,E,o,t,A))}));var L=N?D?d:p:D?keysIn:S,R=P?void 0:L(t);return o(R||t,(function(r,o){R&&(r=t[o=r]),i(F,o,e(r,n,E,o,t,A))})),F}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(16),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},function(e,t,n){var r=n(16);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(16);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(16);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(15);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(15),o=n(31),i=n(32);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(17),o=n(103),i=n(5),a=n(48),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?p:s).test(a(e))}},function(e,t,n){var r=n(9),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(104),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(2)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(107),o=n(15),i=n(31);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(108),o=n(109),i=n(110),a=n(111),s=n(112);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(18);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(18),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(18),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(18);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(19);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){var t=n(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(19);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(19);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(19);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(20),o=n(6);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(8),o=n(3);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(8),o=n(34),i=n(3),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},function(e,t,n){var r=n(54)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(20),o=n(55);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(5),o=n(23),i=n(126),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(2),i="object"==r(t)&&t&&!t.nodeType&&t,a=i&&"object"==r(e)&&e&&!e.nodeType&&e,s=a&&a.exports===i?o.Buffer:void 0,u=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(14)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(20),o=n(38);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(20),o=n(58);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(60),o=n(58),i=n(55);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(4)(n(2),"DataView");e.exports=r},function(e,t,n){var r=n(4)(n(2),"Promise");e.exports=r},function(e,t,n){var r=n(4)(n(2),"WeakMap");e.exports=r},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(41),o=n(137),i=n(138),a=n(139),s=n(140);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return o(e,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 s(e,n);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return i(e);case"[object Symbol]":return a(e)}}},function(e,t,n){var r=n(41);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(9),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},function(e,t,n){var r=n(41);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(63),o=n(40),i=n(23);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},function(e,t,n){var r=n(143),o=n(35),i=n(36),a=i&&i.isMap,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(10),o=n(3);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(145),o=n(35),i=n(36),a=i&&i.isSet,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(10),o=n(3);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},function(e,t,n){e.exports=n(147)},function(e,t,n){var r=n(33),o=n(24),i=n(151),a=n(0);e.exports=function(e,t){return(a(e)?r:o)(e,i(t))}},function(e,t,n){var r=n(149)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}},function(e,t,n){var r=n(7);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a<i)&&!1!==o(s[a],a,s););return n}}},function(e,t,n){var r=n(25);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t,n){var r=n(56),o=n(153),i=n(26),a=n(0);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},function(e,t,n){var r=n(24);e.exports=function(e,t){var n=[];return r(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}},function(e,t,n){var r=n(155),o=n(163),i=n(71);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(29),o=n(66);e.exports=function(e,t,n,i){var a=n.length,s=a,u=!i;if(null==e)return!s;for(e=Object(e);a--;){var c=n[a];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var l=(c=n[a])[0],f=e[l],p=c[1];if(u&&c[2]){if(void 0===f&&!(l in e))return!1}else{var d=new r;if(i)var h=i(f,p,l,e,t,d);if(!(void 0===h?o(p,f,3,i,d):h))return!1}}return!0}},function(e,t,n){var r=n(29),o=n(67),i=n(160),a=n(162),s=n(10),u=n(0),c=n(12),l=n(22),f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,d,h,v){var g=u(e),y=u(t),m=g?"[object Array]":s(e),b=y?"[object Array]":s(t),w=(m="[object Arguments]"==m?f:m)==f,_=(b="[object Arguments]"==b?f:b)==f,x=m==b;if(x&&c(e)){if(!c(t))return!1;g=!0,w=!1}if(x&&!w)return v||(v=new r),g||l(e)?o(e,t,n,d,h,v):i(e,t,m,n,d,h,v);if(!(1&n)){var S=w&&p.call(e,"__wrapped__"),j=_&&p.call(t,"__wrapped__");if(S||j){var E=S?e.value():e,k=j?t.value():t;return v||(v=new r),h(E,k,n,d,v)}}return!!x&&(v||(v=new r),a(e,t,n,d,h,v))}},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t,n){var r=n(9),o=n(62),i=n(30),a=n(67),s=n(161),u=n(42),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var h=1&r;if(d||(d=u),e.size!=t.size&&!h)return!1;var v=p.get(e);if(v)return v==t;r|=2,p.set(e,t);var g=a(d(e),d(t),r,c,f,p);return p.delete(e),g;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t,n){var r=n(59),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,s){var u=1&n,c=r(e),l=c.length;if(l!=r(t).length&&!u)return!1;for(var f=l;f--;){var p=c[f];if(!(u?p in t:o.call(t,p)))return!1}var d=s.get(e);if(d&&s.get(t))return d==t;var h=!0;s.set(e,t),s.set(t,e);for(var v=u;++f<l;){var g=e[p=c[f]],y=t[p];if(i)var m=u?i(y,g,p,t,e,s):i(g,y,p,e,t,s);if(!(void 0===m?g===y||a(g,y,n,i,s):m)){h=!1;break}v||(v="constructor"==p)}if(h&&!v){var b=e.constructor,w=t.constructor;b!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(h=!1)}return s.delete(e),s.delete(t),h}},function(e,t,n){var r=n(70),o=n(6);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},function(e,t,n){var r=n(66),o=n(165),i=n(171),a=n(43),s=n(70),u=n(71),c=n(27);e.exports=function(e,t){return a(e)&&s(t)?u(c(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},function(e,t,n){var r=n(72);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=n(167),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=a},function(e,t,n){var r=n(168);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(32);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},function(e,t,n){var r=n(170);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(9),o=n(45),i=n(0),a=n(44),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(172),o=n(74);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(75),o=n(174),i=n(43),a=n(27);e.exports=function(e){return i(e)?r(a(e)):o(e)}},function(e,t,n){var r=n(72);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(176),o=n(74);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e,t){return null!=e&&n.call(e,t)}},function(e,t,n){var r=n(37),o=n(10),i=n(21),a=n(0),s=n(7),u=n(12),c=n(23),l=n(22),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},function(e,t){e.exports=function(e){return void 0===e}},function(e,t,n){var r=n(45),o=n(26),i=n(180),a=n(0);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){var r=n(24),o=n(7);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}},function(e,t,n){var r=n(182),o=n(24),i=n(26),a=n(183),s=n(0);e.exports=function(e,t,n){var u=s(e)?r:a,c=arguments.length<3;return u(e,i(t,4),n,c,o)}},function(e,t){e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}},function(e,t){e.exports=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}},function(e,t,n){var r=n(37),o=n(10),i=n(7),a=n(185),s=n(186);e.exports=function(e){if(null==e)return 0;if(i(e))return a(e)?s(e):e.length;var t=o(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},function(e,t,n){var r=n(8),o=n(0),i=n(3);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(187),o=n(188),i=n(189);e.exports=function(e){return o(e)?i(e):r(e)}},function(e,t,n){var r=n(75)("length");e.exports=r},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t){var n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+n+"|"+r+")?",u="[\\ufe0e\\ufe0f]?"+s+"(?:\\u200d(?:"+[o,i,a].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*",c="(?:"+[o+n+"?",n,i,a,"[\\ud800-\\udfff]"].join("|")+")",l=RegExp(r+"(?="+r+")|"+c+u,"g");e.exports=function(e){for(var t=l.lastIndex=0;l.test(e);)++t;return t}},function(e,t,n){var r=n(33),o=n(63),i=n(65),a=n(26),s=n(40),u=n(0),c=n(12),l=n(17),f=n(5),p=n(22);e.exports=function(e,t,n){var d=u(e),h=d||c(e)||p(e);if(t=a(t,4),null==n){var v=e&&e.constructor;n=h?d?new v:[]:f(e)&&l(v)?o(s(e)):{}}return(h?r:i)(e,(function(e,r,o){return t(n,e,r,o)})),n}},function(e,t,n){var r=n(192),o=n(194),i=n(200),a=n(209),s=o((function(e){return i(r(e,1,a,!0))}));e.exports=s},function(e,t,n){var r=n(39),o=n(193);e.exports=function e(t,n,i,a,s){var u=-1,c=t.length;for(i||(i=o),s||(s=[]);++u<c;){var l=t[u];n>0&&i(l)?n>1?e(l,n-1,i,a,s):r(s,l):a||(s[s.length]=l)}return s}},function(e,t,n){var r=n(9),o=n(21),i=n(0),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},function(e,t,n){var r=n(25),o=n(195),i=n(197);e.exports=function(e,t){return i(o(e,t,r),e+"")}},function(e,t,n){var r=n(196),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),u=Array(s);++a<s;)u[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];return c[t]=n(u),r(e,this,c)}}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(198),o=n(199)(r);e.exports=o},function(e,t,n){var r=n(64),o=n(51),i=n(25),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=a},function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(68),o=n(201),i=n(206),a=n(69),s=n(207),u=n(42);e.exports=function(e,t,n){var c=-1,l=o,f=e.length,p=!0,d=[],h=d;if(n)p=!1,l=i;else if(f>=200){var v=t?null:s(e);if(v)return u(v);p=!1,l=a,h=new r}else h=t?[]:d;e:for(;++c<f;){var g=e[c],y=t?t(g):g;if(g=n||0!==g?g:0,p&&y==y){for(var m=h.length;m--;)if(h[m]===y)continue e;t&&h.push(y),d.push(g)}else l(h,y,n)||(h!==d&&h.push(y),d.push(g))}return d}},function(e,t,n){var r=n(202);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},function(e,t,n){var r=n(203),o=n(204),i=n(205);e.exports=function(e,t,n){return t==t?i(e,t,n):r(e,o,n)}},function(e,t){e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}},function(e,t){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}},function(e,t,n){var r=n(61),o=n(208),i=n(42),a=r&&1/i(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=a},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(7),o=n(3);e.exports=function(e){return o(e)&&r(e)}},function(e,t,n){var r=n(211),o=n(6);e.exports=function(e){return null==e?[]:r(e,o(e))}},function(e,t,n){var r=n(45);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},function(e,t){e.exports="2.1.8"},function(e,t,n){var r=n(1),o=n(28);function i(e){return r.map(e.nodes(),(function(t){var n=e.node(t),o=e.parent(t),i={v:t};return r.isUndefined(n)||(i.value=n),r.isUndefined(o)||(i.parent=o),i}))}function a(e){return r.map(e.edges(),(function(t){var n=e.edge(t),o={v:t.v,w:t.w};return r.isUndefined(t.name)||(o.name=t.name),r.isUndefined(n)||(o.value=n),o}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:a(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t},read:function(e){var t=new o(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}}},function(e,t,n){e.exports={components:n(215),dijkstra:n(76),dijkstraAll:n(216),findCycles:n(217),floydWarshall:n(218),isAcyclic:n(219),postorder:n(220),preorder:n(221),prim:n(222),tarjan:n(78),topsort:n(79)}},function(e,t,n){var r=n(1);e.exports=function(e){var t,n={},o=[];function i(o){r.has(n,o)||(n[o]=!0,t.push(o),r.each(e.successors(o),i),r.each(e.predecessors(o),i))}return r.each(e.nodes(),(function(e){t=[],i(e),t.length&&o.push(t)})),o}},function(e,t,n){var r=n(76),o=n(1);e.exports=function(e,t,n){return o.transform(e.nodes(),(function(o,i){o[i]=r(e,i,t,n)}),{})}},function(e,t,n){var r=n(1),o=n(78);e.exports=function(e){return r.filter(o(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}},function(e,t,n){var r=n(1);e.exports=function(e,t,n){return function(e,t,n){var r={},o=e.nodes();return o.forEach((function(e){r[e]={},r[e][e]={distance:0},o.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var t=r[e];o.forEach((function(n){var i=r[n];o.forEach((function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)}))}))})),r}(e,t||o,n||function(t){return e.outEdges(t)})};var o=r.constant(1)},function(e,t,n){var r=n(79);e.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}},function(e,t,n){var r=n(80);e.exports=function(e,t){return r(e,t,"post")}},function(e,t,n){var r=n(80);e.exports=function(e,t){return r(e,t,"pre")}},function(e,t,n){var r=n(1),o=n(28),i=n(77);e.exports=function(e,t){var n,a=new o,s={},u=new i;function c(e){var r=e.v===n?e.w:e.v,o=u.priority(r);if(void 0!==o){var i=t(e);i<o&&(s[r]=n,u.decrease(r,i))}}if(0===e.nodeCount())return a;r.each(e.nodes(),(function(e){u.add(e,Number.POSITIVE_INFINITY),a.setNode(e)})),u.decrease(e.nodes()[0],0);for(var l=!1;u.size()>0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(n).forEach(c)}return a}},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var t="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,o="/"===a.charAt(0))}return(o?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!o).join("/"))||"."},t.normalize=function(e){var i=t.isAbsolute(e),a="/"===o(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!i).join("/"))||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var o=r(e.split("/")),i=r(n.split("/")),a=Math.min(o.length,i.length),s=a,u=0;u<a;u++)if(o[u]!==i[u]){s=u;break}var c=[];for(u=s;u<o.length;u++)c.push("..");return(c=c.concat(i.slice(s))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,o=!0,i=e.length-1;i>=1;--i)if(47===(t=e.charCodeAt(i))){if(!o){r=i;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){n=t+1;break}}else-1===r&&(o=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,o=!0,i=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(o=!1,r=a+1),46===s?-1===t?t=a:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){n=a+1;break}}return-1===t||-1===r||0===i||1===i&&t===r-1&&t===n+1?"":e.slice(t,r)};var o="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(13))},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o={file:n(225),http:n(81),https:n(81)},i="object"===("undefined"==typeof window?"undefined":r(window))||"function"==typeof importScripts?o.http:o.file;"undefined"==typeof Promise&&n(83),e.exports.load=function(e,t){var n=Promise.resolve();return void 0===t&&(t={}),(n=n.then((function(){if(void 0===e)throw new TypeError("location is required");if("string"!=typeof e)throw new TypeError("location must be a string");if(void 0!==t){if("object"!==r(t))throw new TypeError("options must be an object");if(void 0!==t.processContent&&"function"!=typeof t.processContent)throw new TypeError("options.processContent must be a function")}}))).then((function(){return new Promise((function(n,r){(function(e){var t=function(e){return void 0!==e&&(e=-1===e.indexOf("://")?"":e.split("://")[0]),e}(e),n=o[t];if(void 0===n){if(""!==t)throw new Error("Unsupported scheme: "+t);n=i}return n})(e).load(e,t||{},(function(e,t){e?r(e):n(t)}))}))})).then((function(n){return t.processContent?new Promise((function(o,i){"object"!==r(n)&&(n={text:n}),n.location=e,t.processContent(n,(function(e,t){e?i(e):o(t)}))})):"object"===r(n)?n.text:n}))}},function(e,t,n){var r=new TypeError("The 'file' scheme is not supported in the browser");e.exports.getBase=function(){throw r},e.exports.load=function(){var e=arguments[arguments.length-1];if("function"!=typeof e)throw r;e(r)}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o;"undefined"!=typeof window?o=window:"undefined"!=typeof self?o=self:(console.warn("Using browser-only version of superagent in non-browser environment"),o=this);var i=n(227),a=n(228),s=n(82),u=n(229),c=n(231);function l(){}var f=t=e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1==arguments.length?new t.Request("GET",e):new t.Request(e,n)};t.Request=m,f.getXHR=function(){if(!(!o.XMLHttpRequest||o.location&&"file:"==o.location.protocol&&o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only version of superagent could not find XHR")};var p="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function d(e){if(!s(e))return e;var t=[];for(var n in e)h(t,n,e[n]);return t.join("&")}function h(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach((function(n){h(e,t,n)}));else if(s(n))for(var r in n)h(e,t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function v(e){for(var t,n,r={},o=e.split("&"),i=0,a=o.length;i<a;++i)-1==(n=(t=o[i]).indexOf("="))?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function g(e){return/[\/+]json($|[^-\w])/.test(e)}function y(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.header=this.headers=function(e){for(var t,n,r,o,i=e.split(/\r?\n/),a={},s=0,u=i.length;s<u;++s)-1!==(t=(n=i[s]).indexOf(":"))&&(r=n.slice(0,t).toLowerCase(),o=p(n.slice(t+1)),a[r]=o);return a}(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function m(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,r=null;try{r=new y(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",r);try{n._isResponseOK(r)||(e=new Error(r.statusText||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=r,e.status=r.status,n.callback(e,r)):n.callback(null,r)}))}function b(e,t,n){var r=f("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}f.serializeObject=d,f.parseString=v,f.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},f.serialize={"application/x-www-form-urlencoded":d,"application/json":JSON.stringify},f.parse={"application/x-www-form-urlencoded":v,"application/json":JSON.parse},u(y.prototype),y.prototype._parseBody=function(e){var t=f.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&g(this.type)&&(t=f.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},y.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",o=new Error(r);return o.status=this.status,o.method=t,o.url=n,o},f.Response=y,i(m.prototype),a(m.prototype),m.prototype.type=function(e){return this.set("Content-Type",f.types[e]||e),this},m.prototype.accept=function(e){return this.set("Accept",f.types[e]||e),this},m.prototype.auth=function(e,t,n){1===arguments.length&&(t=""),"object"===r(t)&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});return this._auth(e,t,n,(function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")}))},m.prototype.query=function(e){return"string"!=typeof e&&(e=d(e)),e&&this._query.push(e),this},m.prototype.attach=function(e,t,n){if(t){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},m.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},m.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},m.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},m.prototype.buffer=m.prototype.ca=m.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},m.prototype.pipe=m.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},m.prototype._isHost=function(e){return e&&"object"===r(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},m.prototype.end=function(e){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||l,this._finalizeQueryString(),this._end()},m.prototype._end=function(){var e=this,t=this.xhr=f.getXHR(),n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.onprogress=r.bind(null,"download"),t.upload&&(t.upload.onprogress=r.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||f.serialize[o?o.split(";")[0]:""];!i&&g(o)&&(i=f.serialize["application/json"]),i&&(n=i(n))}for(var a in this.header)null!=this.header[a]&&this.header.hasOwnProperty(a)&&t.setRequestHeader(a,this.header[a]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0!==n?n:null),this},f.agent=function(){return new c},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){c.prototype[e.toLowerCase()]=function(t,n){var r=new f.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}})),c.prototype.del=c.prototype.delete,f.get=function(e,t,n){var r=f("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},f.head=function(e,t,n){var r=f("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},f.options=function(e,t,n){var r=f("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},f.del=b,f.delete=b,f.patch=function(e,t,n){var r=f("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},f.post=function(e,t,n){var r=f("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},f.put=function(e,t,n){var r=f("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var r=0,o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t);return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(82);function i(e){if(e)return function(e){for(var t in i.prototype)e[t]=i.prototype[t];return e}(e)}e.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},i.prototype.parse=function(e){return this._parser=e,this},i.prototype.responseType=function(e){return this._responseType=e,this},i.prototype.serialize=function(e){return this._serializer=e,this},i.prototype.timeout=function(e){if(!e||"object"!==r(e))return this._timeout=e,this._responseTimeout=0,this;for(var t in e)switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;default:console.warn("Unknown timeout option",t)}return this},i.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var a=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];i.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~a.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},i.prototype.then=function(e,t){if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){n.end((function(n,r){n?t(n):e(r)}))}))}return this._fullfilledPromise.then(e,t)},i.prototype.catch=function(e){return this.then(void 0,e)},i.prototype.use=function(e){return e(this),this},i.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},i.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},i.prototype.get=function(e){return this._header[e.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(e,t){if(o(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},i.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},i.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),o(e)){for(var n in e)this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)this.field(e,t[r]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic "+r(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},i.prototype.withCredentials=function(e){return null==e&&(e=!0),this._withCredentials=e,this},i.prototype.redirects=function(e){return this._maxRedirects=e,this},i.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(e){var t=o(e),n=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&o(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},i.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},i.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.substring(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,t)+"?"+n.join("&")}}},i.prototype._appendQueryString=function(){console.trace("Unsupported")},i.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error(e+t+"ms exceeded");r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.abort(),this.callback(r)}},i.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},function(e,t,n){var r=n(230);function o(e){if(e)return function(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}(e)}e.exports=o,o.prototype.get=function(e){return this.header[e.toLowerCase()]},o.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=r.type(t);var n=r.params(t);for(var o in n)this[o]=n[o];this.links={};try{e.link&&(this.links=r.parseLinks(e.link))}catch(e){}},o.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.created=201==e,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e,this.unprocessableEntity=422==e}},function(e,t,n){t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce((function(e,t){var n=t.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(e[r]=o),e}),{})},t.parseLinks=function(e){return e.split(/ *, */).reduce((function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e}),{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach((function(e){n.prototype[e]=function(){return this._defaults.push({fn:e,arguments:arguments}),this}})),n.prototype._setDefaults=function(e){this._defaults.forEach((function(t){e[t.fn].apply(e,t.arguments)}))},e.exports=n},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(233),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(e,t,n){(function(e,t){!function(e,n){if(!e.setImmediate){var r,o,i,a,s,u=1,c={},l=!1,f=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(h,0,e)},p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return c[u]=o,r(u),u++},p.clearImmediate=d}function d(e){delete c[e]}function h(e){if(l)setTimeout(h,0,e);else{var t=c[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{d(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(11),n(13))},function(e,t,n){t.decode=t.parse=n(235),t.encode=t.stringify=n(236)},function(e,t,n){function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var f,p,d,h,v=e[l].replace(s,"%20"),g=v.indexOf(n);g>=0?(f=v.substr(0,g),p=v.substr(g+1)):(f=v,p=""),d=decodeURIComponent(f),h=decodeURIComponent(p),r(a,d)?o(a[d])?a[d].push(h):a[d]=[a[d],h]:a[d]=h}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=function(e){switch(r(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,u){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"===r(e)?a(s(e),(function(r){var s=encodeURIComponent(o(r))+n;return i(e[r])?a(e[r],(function(e){return s+encodeURIComponent(o(e))})).join(t):s+encodeURIComponent(o(e[r]))})).join(t):u?encodeURIComponent(o(u))+n+encodeURIComponent(o(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){e.exports=function(e){var t=/^\\\\\?\\/.test(e),n=/[^\u0000-\u0080]+/.test(e);return t||n?e:e.replace(/\\/g,"/")}},function(e,t,n){var r,o,i,a;function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
14
+ /** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */a=function(e){function t(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length>1){t[0]=t[0].slice(0,-1);for(var r=t.length-1,o=1;o<r;++o)t[o]=t[o].slice(1,-1);return t[r]=t[r].slice(1),t.join("")}return t[0]}function n(e){return"(?:"+e+")"}function r(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function i(e){var r=t("[0-9]","[A-Fa-f]"),o=n(n("%[EFef]"+r+"%"+r+r+"%"+r+r)+"|"+n("%[89A-Fa-f]"+r+"%"+r+r)+"|"+n("%"+r+r)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",a=t("[\\:\\/\\?\\#\\[\\]\\@]",i),s=e?"[\\uE000-\\uF8FF]":"[]",u=t("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");n("[A-Za-z]"+t("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),n(n(o+"|"+t(u,i,"[\\:]"))+"*");var c=n(n("25[0-5]")+"|"+n("2[0-4][0-9]")+"|"+n("1[0-9][0-9]")+"|"+n("0?[1-9][0-9]")+"|0?0?[0-9]"),l=n(c+"\\."+c+"\\."+c+"\\."+c),f=n(r+"{1,4}"),p=n(n(f+"\\:"+f)+"|"+l),d=n(n(f+"\\:")+"{6}"+p),h=n("\\:\\:"+n(f+"\\:")+"{5}"+p),v=n(n(f)+"?\\:\\:"+n(f+"\\:")+"{4}"+p),g=n(n(n(f+"\\:")+"{0,1}"+f)+"?\\:\\:"+n(f+"\\:")+"{3}"+p),y=n(n(n(f+"\\:")+"{0,2}"+f)+"?\\:\\:"+n(f+"\\:")+"{2}"+p),m=n(n(n(f+"\\:")+"{0,3}"+f)+"?\\:\\:"+f+"\\:"+p),b=n(n(n(f+"\\:")+"{0,4}"+f)+"?\\:\\:"+p),w=n(n(n(f+"\\:")+"{0,5}"+f)+"?\\:\\:"+f),_=n(n(n(f+"\\:")+"{0,6}"+f)+"?\\:\\:"),x=n([d,h,v,g,y,m,b,w,_].join("|")),S=n(n(u+"|"+o)+"+");n("[vV]"+r+"+\\."+t(u,i,"[\\:]")+"+"),n(n(o+"|"+t(u,i))+"*");var j=n(o+"|"+t(u,i,"[\\:\\@]"));return n(n(o+"|"+t(u,i,"[\\@]"))+"+"),n(n(j+"|"+t("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(t("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",u,i),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",u,i),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",u,i),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",u,i),"g"),NOT_QUERY:new RegExp(t("[^\\%]",u,i,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",u,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",u,i),"g"),UNRESERVED:new RegExp(u,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",u,a),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+l+")$"),IPV6ADDRESS:new RegExp("^\\[?("+x+")"+n(n("\\%25|\\%(?!"+r+"{2})")+"("+S+")")+"?\\]?$")}}var a=i(!1),s=i(!0),u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,l=/^xn--/,f=/[^\0-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,v=String.fromCharCode;function g(e){throw new RangeError(d[e])}function y(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]);var o=function(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}((e=e.replace(p,".")).split("."),t).join(".");return r+o}var m=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},b=function(e,t,n){var r=0;for(e=n?h(e/700):e>>1,e+=h(e/t);e>455;r+=36)e=h(e/35);return h(r+36*e/(e+38))},w=function(e){return y(e,(function(e){return f.test(e)?"xn--"+function(e){var t=[],n=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){var i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&o)<<10)+(1023&i)+65536):(t.push(o),n--)}else t.push(o)}return t}(e)).length,r=128,o=0,i=72,a=!0,s=!1,u=void 0;try{for(var l,f=e[Symbol.iterator]();!(a=(l=f.next()).done);a=!0){var p=l.value;p<128&&t.push(v(p))}}catch(e){s=!0,u=e}finally{try{!a&&f.return&&f.return()}finally{if(s)throw u}}var d=t.length,y=d;for(d&&t.push("-");y<n;){var w=c,_=!0,x=!1,S=void 0;try{for(var j,E=e[Symbol.iterator]();!(_=(j=E.next()).done);_=!0){var k=j.value;k>=r&&k<w&&(w=k)}}catch(e){x=!0,S=e}finally{try{!_&&E.return&&E.return()}finally{if(x)throw S}}var O=y+1;w-r>h((c-o)/O)&&g("overflow"),o+=(w-r)*O,r=w;var A=!0,F=!1,I=void 0;try{for(var D,N=e[Symbol.iterator]();!(A=(D=N.next()).done);A=!0){var P=D.value;if(P<r&&++o>c&&g("overflow"),P==r){for(var T=o,C=36;;C+=36){var $=C<=i?1:C>=i+26?26:C-i;if(T<$)break;var L=T-$,R=36-$;t.push(v(m($+L%R,0))),T=h(L/R)}t.push(v(m(T,0))),i=b(o,O,y==d),o=0,++y}}}catch(e){F=!0,I=e}finally{try{!A&&N.return&&N.return()}finally{if(F)throw I}}++o,++r}return t.join("")}(e):e}))},_=function(e){return y(e,(function(e){return l.test(e)?function(e){var t,n=[],r=e.length,o=0,i=128,a=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var u=0;u<s;++u)e.charCodeAt(u)>=128&&g("not-basic"),n.push(e.charCodeAt(u));for(var l=s>0?s+1:0;l<r;){for(var f=o,p=1,d=36;;d+=36){l>=r&&g("invalid-input");var v=(t=e.charCodeAt(l++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36;(v>=36||v>h((c-o)/p))&&g("overflow"),o+=v*p;var y=d<=a?1:d>=a+26?26:d-a;if(v<y)break;var m=36-y;p>h(c/m)&&g("overflow"),p*=m}var w=n.length+1;a=b(o-f,w,0==f),h(o/w)>c-i&&g("overflow"),i+=h(o/w),o%=w,n.splice(o++,0,i)}return String.fromCodePoint.apply(String,n)}(e.slice(4).toLowerCase()):e}))},x={};function S(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function j(e){for(var t="",n=0,r=e.length;n<r;){var o=parseInt(e.substr(n+1,2),16);if(o<128)t+=String.fromCharCode(o),n+=3;else if(o>=194&&o<224){if(r-n>=6){var i=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&o)<<6|63&i)}else t+=e.substr(n,6);n+=6}else if(o>=224){if(r-n>=9){var a=parseInt(e.substr(n+4,2),16),s=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&a)<<6|63&s)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function E(e,t){function n(e){var n=j(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,S).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,S).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,S).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,S).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,S).replace(t.PCT_ENCODED,o)),e}function k(e){return e.replace(/^0*(.*)/,"$1")||"0"}function O(e,t){var n=e.match(t.IPV4ADDRESS)||[],r=u(n,2)[1];return r?r.split(".").map(k).join("."):e}function A(e,t){var n=e.match(t.IPV6ADDRESS)||[],r=u(n,3),o=r[1],i=r[2];if(o){for(var a=o.toLowerCase().split("::").reverse(),s=u(a,2),c=s[0],l=s[1],f=l?l.split(":").map(k):[],p=c.split(":").map(k),d=t.IPV4ADDRESS.test(p[p.length-1]),h=d?7:8,v=p.length-h,g=Array(h),y=0;y<h;++y)g[y]=f[y]||p[v+y]||"";d&&(g[h-1]=O(g[h-1],t));var m=g.reduce((function(e,t,n){if(!t||"0"===t){var r=e[e.length-1];r&&r.index+r.length===n?r.length++:e.push({index:n,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],b=void 0;if(m&&m.length>1){var w=g.slice(0,m.index),_=g.slice(m.index+m.length);b=w.join(":")+"::"+_.join(":")}else b=g.join(":");return i&&(b+="%"+i),b}return e}var F=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,I=void 0==="".match(/(){0}/)[1];function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=!1!==t.iri?s:a;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(F);if(o){I?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||void 0,n.userinfo=-1!==e.indexOf("@")?o[3]:void 0,n.host=-1!==e.indexOf("//")?o[4]:void 0,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:void 0,n.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),n.host&&(n.host=A(O(n.host,r),r)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var i=x[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||i&&i.unicodeSupport)E(n,r);else{if(n.host&&(t.domainHost||i&&i.domainHost))try{n.host=w(n.host.replace(r.PCT_ENCODED,j).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}E(n,a)}i&&i.parse&&i.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}var N=/^\.\.?\//,P=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,C=/^\/?(?:.|\n)*?(?=\/|$)/;function $(e){for(var t=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(P))e=e.replace(P,"/");else if(e.match(T))e=e.replace(T,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(C);if(!n)throw new Error("Unexpected dot segment condition");var r=n[0];e=e.slice(r.length),t.push(r)}return t.join("")}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?s:a,r=[],o=x[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?_(e.host):w(e.host.replace(n.PCT_ENCODED,j).toLowerCase())}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}E(e,n),"suffix"!==t.reference&&e.scheme&&(r.push(e.scheme),r.push(":"));var i=function(e,t){var n=!1!==t.iri?s:a,r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push(A(O(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"}))),"number"==typeof e.port&&(r.push(":"),r.push(e.port.toString(10))),r.length?r.join(""):void 0}(e,t);if(void 0!==i&&("suffix"!==t.reference&&r.push("//"),r.push(i),e.path&&"/"!==e.path.charAt(0)&&r.push("/")),void 0!==e.path){var u=e.path;t.absolutePath||o&&o.absolutePath||(u=$(u)),void 0===i&&(u=u.replace(/^\/\//,"/%2F")),r.push(u)}return void 0!==e.query&&(r.push("?"),r.push(e.query)),void 0!==e.fragment&&(r.push("#"),r.push(e.fragment)),r.join("")}function R(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={};return arguments[3]||(e=D(L(e,n),n),t=D(L(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=$(t.path||""),r.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=$(t.path||""),r.query=t.query):(t.path?("/"===t.path.charAt(0)?r.path=$(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path:r.path="/"+t.path,r.path=$(r.path)),r.query=t.query):(r.path=e.path,void 0!==t.query?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}function M(e,t){return e&&e.toString().replace(t&&t.iri?s.PCT_ENCODED:a.PCT_ENCODED,j)}var U={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},z={scheme:"https",domainHost:U.domainHost,parse:U.parse,serialize:U.serialize},B={},q="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",W="[0-9A-Fa-f]",V=n(n("%[EFef][0-9A-Fa-f]%"+W+W+"%"+W+W)+"|"+n("%[89A-Fa-f][0-9A-Fa-f]%"+W+W)+"|"+n("%"+W+W)),H=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),J=new RegExp(q,"g"),K=new RegExp(V,"g"),G=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',H),"g"),Z=new RegExp(t("[^]",q,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),X=Z;function Y(e){var t=j(e);return t.match(J)?t:e}var Q={scheme:"mailto",parse:function(e,t){var n=e,r=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var o=!1,i={},a=n.query.split("&"),s=0,u=a.length;s<u;++s){var c=a[s].split("=");switch(c[0]){case"to":for(var l=c[1].split(","),f=0,p=l.length;f<p;++f)r.push(l[f]);break;case"subject":n.subject=M(c[1],t);break;case"body":n.body=M(c[1],t);break;default:o=!0,i[M(c[0],t)]=M(c[1],t)}}o&&(n.headers=i)}n.query=void 0;for(var d=0,h=r.length;d<h;++d){var v=r[d].split("@");if(v[0]=M(v[0]),t.unicodeSupport)v[1]=M(v[1],t).toLowerCase();else try{v[1]=w(M(v[1],t).toLowerCase())}catch(e){n.error=n.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}r[d]=v.join("@")}return n},serialize:function(e,t){var n,r=e,i=null!=(n=e.to)?n instanceof Array?n:"number"!=typeof n.length||n.split||n.setInterval||n.call?[n]:Array.prototype.slice.call(n):[];if(i){for(var a=0,s=i.length;a<s;++a){var u=String(i[a]),c=u.lastIndexOf("@"),l=u.slice(0,c).replace(K,Y).replace(K,o).replace(G,S),f=u.slice(c+1);try{f=t.iri?_(f):w(M(f,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}i[a]=l+"@"+f}r.path=i.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var d=[];for(var h in p)p[h]!==B[h]&&d.push(h.replace(K,Y).replace(K,o).replace(Z,S)+"="+p[h].replace(K,Y).replace(K,o).replace(X,S));return d.length&&(r.query=d.join("&")),r}},ee=/^([^\:]+)\:(.*)/,te={scheme:"urn",parse:function(e,t){var n=e.path&&e.path.match(ee),r=e;if(n){var o=t.scheme||r.scheme||"urn",i=n[1].toLowerCase(),a=n[2],s=o+":"+(t.nid||i),u=x[s];r.nid=i,r.nss=a,r.path=void 0,u&&(r=u.parse(r,t))}else r.error=r.error||"URN can not be parsed.";return r},serialize:function(e,t){var n=t.scheme||e.scheme||"urn",r=e.nid,o=n+":"+(t.nid||r),i=x[o];i&&(e=i.serialize(e,t));var a=e,s=e.nss;return a.path=(r||t.nid)+":"+s,a}},ne=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,re={scheme:"urn:uuid",parse:function(e,t){var n=e;return n.uuid=n.nss,n.nss=void 0,t.tolerant||n.uuid&&n.uuid.match(ne)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e,t){var n=e;return n.nss=(e.uuid||"").toLowerCase(),n}};x[U.scheme]=U,x[z.scheme]=z,x[Q.scheme]=Q,x[te.scheme]=te,x[re.scheme]=re,e.SCHEMES=x,e.pctEncChar=S,e.pctDecChars=j,e.parse=D,e.removeDotSegments=$,e.serialize=L,e.resolveComponents=R,e.resolve=function(e,t,n){var r=function(e,t){var n={scheme:"null"};if(t)for(var r in t)n[r]=t[r];return n}(0,n);return L(R(D(e,r),D(t,r),r,!0),r)},e.normalize=function(e,t){return"string"==typeof e?e=L(D(e,t),t):"object"===r(e)&&(e=D(L(e,t),t)),e},e.equal=function(e,t,n){return"string"==typeof e?e=L(D(e,n),n):"object"===r(e)&&(e=L(e,n)),"string"==typeof t?t=L(D(t,n),n):"object"===r(t)&&(t=L(t,n)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?s.ESCAPE:a.ESCAPE,S)},e.unescapeComponent=M,Object.defineProperty(e,"__esModule",{value:!0})},"object"===s(t)&&void 0!==e?a(t):(o=[t],void 0===(i="function"==typeof(r=a)?r.apply(t,o):r)||(e.exports=i))}]);const de=function(e,t,n,r){let o;n="string"==typeof n?[n]:n;for(const i of e){const e=[...n];let a=t["localization-strings"][i];for(;a&&e.length;)a=a[e.shift()];if(o=r||"string"==typeof a?a:void 0,o)break}return o},he=async(e,t,n)=>{const r=new URL(n||globalThis.location.href.replace(/(index\.html)?#.*$/,""));return r.search="",r.pathname=e,r.hash=t?"#/"+t:"",(await pe.resolveRefsAt(r.toString(),{loaderOptions:{processContent(e,t){t(void 0,JSON.parse(e.text||e.body.toString()))}}})).resolved},ve=function({field:e,schemaItems:t,metadataObj:n,getFieldAliasOrName:r,lang:o}){const i=t.findIndex((t=>t.title===e)),a=t[i],s=n.fields[e],u={aliases:null,fieldValueAliasMap:null,rawFieldValueAliasMap:null,fieldName:r(e),fieldSchema:a,fieldSchemaIndex:i,preferAlias:s.prefer_alias,lang:s.lang};let c=s&&s["fieldvalue-aliases"];return c&&(c.localeKey&&(c=de(o,n,c.localeKey.split("/"),!0)),u.rawFieldValueAliasMap=JSON.parse(JSON.stringify(c)),u.aliases=[],a.enum&&a.enum.length?a.enum.forEach((t=>{u.aliases.push(de(o,n,["fieldvalue",e,t],!0)),t in c&&"string"==typeof c[t]&&u.aliases.push(...c[t])})):Object.entries(c).forEach((([e,t])=>{Array.isArray(t)||(t=Object.values(t)),u.aliases.push(...t.filter((e=>t.every((t=>t===e||!t.toLowerCase().startsWith(e.toLowerCase()))))).map((t=>t+" ("+e+")")))})),u.fieldValueAliasMap=JSON.parse(JSON.stringify(c))),u},ge=function({metadataObj:e,schemaItems:t,getFieldAliasOrName:n,lang:r,callback:o}){e.table.browse_fields.forEach(((i,a)=>{"string"==typeof i&&(i={set:[i]}),i.name||(i.name=i.set.join(","));const s=i.name,u=i.set,{presort:c}=i,l=u.map((o=>ve({lang:r,field:o,schemaItems:t,metadataObj:e,getFieldAliasOrName:n})));o({setName:s,browseFields:l,i:a,presort:c})}))};class ye{constructor({metadataObj:e}){this.metadataObj=e}getFieldLang(e){const{metadataObj:t}=this,n=t&&t.fields;return n&&n[e]&&n[e].lang}getFieldMatchesLocale({namespace:e,preferredLocale:t,schemaItems:n,pluginsForWork:r}){const{metadataObj:o}=this;return i=>{const a=(({namespace:e,preferredLocale:t})=>{const n=localStorage.getItem(e+"-langCodes"),r=n&&JSON.parse(n)||[t],o=[];return r.forEach((e=>{const t=e.replace(/-.*$/,"");t===e?o.push(e):o.push(e,t)})),o})({namespace:e,preferredLocale:t});if(r.isPluginField({namespace:e,field:i})){let[,,n]=r.getPluginFieldParts({namespace:e,field:i});return"{locale}"===n&&(n=t),!n||a.includes(n)}const s=this.getFieldLang(i),u=o&&o["localization-strings"];return u&&Object.keys(u).some((e=>{const t=u[e]&&u[e].fieldvalue;return t&&t[i]}))||s&&a.includes(s)||n.some((e=>e.title===i&&"string"!==e.type))}}}const me=e=>e.replaceAll("^","^^").replaceAll("-","^0"),be=e=>e?e.replaceAll(/(\^+)0/g,((e,t)=>t.length%2?t.slice(1)+"-":e)).replaceAll("^^","^"):e;class we{constructor({pluginsInWork:e,pluginFieldMappings:t,pluginObjects:n}){this.pluginsInWork=e,this.pluginFieldMappings=t,this.pluginObjects=n}getPluginObject(e){const t=this.pluginsInWork.findIndex((([t])=>t===e));return this.pluginObjects[t]}iterateMappings(e){this.pluginFieldMappings.forEach((({placement:t,"applicable-fields":n},r)=>{const[o,{onByDefault:i,lang:a,meta:s}]=this.pluginsInWork[r],u=this.getPluginObject(o);e({plugin:u,placement:t,applicableFields:n,pluginName:o,pluginLang:a,onByDefaultDefault:i,meta:s})}))}processTargetLanguages(e,t){return!!e&&(Object.entries(e).forEach((([e,{targetLanguage:n,onByDefault:r,meta:o}])=>{Array.isArray(n)?n.forEach((n=>{t({applicableField:e,targetLanguage:n,onByDefault:r,metaApplicableField:o})})):t({applicableField:e,targetLanguage:n,onByDefault:r,metaApplicableField:o})})),!0)}isPluginField({namespace:e,field:t}){return t.startsWith(`${e}-plugin-`)}getPluginFieldParts({namespace:e,field:t}){let n,r,o;return(t=t.replace(`${e}-plugin-`,"")).includes("-")?[n,r,o]=t.split("-"):n=t,[n,r,o].map(be)}}const _e=async function({lang:e,fallbackLanguages:t,work:r,files:o,allowPlugins:i,basePath:a,languages:s,preferredLocale:u}){const c=await n.getJSON(o),l=c?.["localization-strings"],f=await ee({messageStyle:"plainNested",locales:e,defaultLocales:t,async localeStringFinder({locales:e,defaultLocales:t}={}){const n=[...e,...t].find((e=>e in l));return{locale:n,strings:{head:{},body:l[n]}}}});let p;const d=c.groups.find((e=>(p=e.files.find((t=>r===f(["workNames",e.id,t.name]))),Boolean(p)))),h=c.groups.map((e=>({name:f(e.name.localeKey),workNames:e.files.map((t=>f(["workNames",e.id,t.name]))),shortcuts:e.files.map((e=>e.shortcut))}))),v=function(e,t,n){const r=(e.baseDirectory||"")+(t.baseDirectory||"")+"/",o=(e.schemaBaseDirectory||"")+(t.schemaBaseDirectory||"")+"/",i=(e.metadataBaseDirectory||"")+(t.metadataBaseDirectory||"")+"/";return{file:r+n.file.$ref,schemaFile:n.schemaFile?o+n.schemaFile:"",metadataFile:n.metadataFile?i+n.metadataFile:""}}(c,d,p),{file:g}=v;let y,m,{schemaFile:b,metadataFile:w}=v,_="",x="";b||(b=g,_="schema"),w||(w=g,x="metadata");let S,j=[],E=[];if(i){const e=c["plugin-field-mapping"][d.id][p.name];e&&(S=Object.keys(e),m=Object.entries(c.plugins).filter((([e])=>S.includes(e))),E=m.map((([t])=>e[t])),j=m.map((([,e])=>e.path)),y=m)}const k=await he(w,x,a),O=function(t){const n=k.fields&&k.fields[t];let r,o;return n&&(o=n.alias),o?"string"==typeof o?r=o:(o=o.localeKey,r=de(e,k,o.split("/"))):(r=n.name,"object"==typeof r&&(r=r.localeKey,r=de(e,k,r.split("/")))),r},A=E,F="undefined"==typeof process?location.href.slice(0,location.href.lastIndexOf("/")+1):process.cwd()+"/",I=await Promise.all([he(b,_,a),y?Promise.all(j.map((async e=>await import(F+e)))):null]),D=I[0],N=I[1],P=N?new we({pluginsInWork:m,pluginFieldMappings:A,pluginObjects:N}):null,T=D.items.items,C=T.map((({title:e})=>({field:e,fieldAliasOrName:O(e)||e}))),$=new ye({metadataObj:k});if(s&&P){console.log("pluginsForWork",P);const{lang:e,namespace:t}=this;P.iterateMappings((({pluginName:n,pluginLang:r,onByDefaultDefault:o,placement:i,applicableFields:a,meta:c})=>{const l=({applicableField:a,targetLanguage:l,onByDefault:p,metaApplicableField:d}={})=>{const h=P.getPluginObject(n)||{},v=$.getFieldLang(a);h.getTargetLanguage&&(l=h.getTargetLanguage({applicableField:a,targetLanguage:l,pluginLang:r,applicableFieldLang:v}));const g=(({pluginName:e,applicableField:t,targetLanguage:n})=>me(e)+(t?"-"+me(t):"-")+(n?"-"+me(n):""))({pluginName:n,applicableField:a,targetLanguage:l||r||v});"{locale}"===l&&(l=u);const y=de(e,k,["fieldnames",a]),m=h.getFieldAliasOrName?h.getFieldAliasOrName({locales:e,workI18n:f,targetLanguage:l,applicableField:a,applicableFieldI18N:y,meta:c,metaApplicableField:d,targetLanguageI18N:s.getLanguageFromCode(l)}):s.getFieldNameFromPluginNameAndLocales({pluginName:n,workI18n:f,targetLanguage:l,applicableFieldI18N:y,meta:c,metaApplicableField:d});C.splice("end"===i?Number.POSITIVE_INFINITY:i,0,{field:`${t}-plugin-${g}`,fieldAliasOrName:m,onByDefault:"boolean"==typeof p?p:o||!1,applicableField:a,metaApplicableField:d,fieldLang:l})};P.processTargetLanguages(a,l)||l()}))}return{fileData:p,workI18n:f,getFieldAliasOrName:O,metadataObj:k,schemaObj:D,schemaItems:T,fieldInfo:C,pluginsForWork:P,groupsToWorks:h,metadata:$}},xe=({r:e})=>{e.addEventListener("updatefound",(t=>{console.log("update found",t);const n=e.installing;n.addEventListener("statechange",(async()=>{const{state:e}=n;switch(e){case"installing":console.log("Installing new worker");break;case"installed":console.log("Installation status",e),await le.alert("\nA new version of this offlinable app has been downloaded.\n\nIf you have work to complete in this tab, you can dismiss\nthis dialog now and continue working with the old version.\n\nHowever, when you are finished, you should close this tab\nand any other old tabs for this site in order to be able to\nbegin using the new version.\n");break;case"redundant":console.log("Installation status",e),await le.alert("\nThere was an error during installation (to allow offline/speeded\ncache use).\n\nIf you have work to complete in this tab, you can dismiss\nthis dialog now and continue working with the old version.\n\nHowever, when you are finished, you may wish to close this tab\nand any other old tabs for this site in order to try again\nfor offline installation.\n");break;case"activating":console.log("Activating new worker");break;case"activated":console.log("Activated new worker");break;default:throw new Error(`Unknown worker update state: ${e}`)}}))}))},Se=async({r:e,logger:t})=>new Promise((async()=>{navigator.serviceWorker.addEventListener("message",(({data:n})=>{const{message:r,type:o,name:i,errorType:a}=n;switch(console.log("msg1",r,e),o){case"log":return void t.addLogEntry({text:r});case"beginInstall":return void t.addLogEntry({text:"Install: Begun..."});case"finishedInstall":return void t.addLogEntry({text:"Install: Finished..."});case"beginActivate":return t.addLogEntry({text:"Activate: Caching finished"}),void t.addLogEntry({text:"Activate: Begin database resources storage..."});case"finishedActivate":return t.addLogEntry({text:"Activate: Finished..."}),void location.reload();case"error":t.addLogEntry({text:r+("dbError"===a?`Database error ${i}`:"")+"; trying again..."});break;default:console.error("Unexpected type",o)}}));const n=e.installing||e.waiting||e.active;n&&"redundant"===n.state?(await le.alert('\nThere was likely an error installing. Click "ok" to try again.\n(Error code: Service worker is redundant)\n'),location.reload()):e.installing?console.log("INSTALLING"):e.waiting&&await le.alert("\nAn update is in progress. After finishing any work\nyou have in them, please close this and any other existing tabs\nrunning this web application and then open the site again.\nPlease note it may take some time to install and may not show\nany indication it is installing.\n",{ok:!1})})),je=async({serviceWorkerPath:e,logger:t})=>{let n;console.log("--ready to register service worker",e);try{n=await navigator.serviceWorker.register(e,{type:"module"})}catch(t){return console.log("serviceWorkerPath",e),void await le.alert("\nThere was an error during registration (for offline ability).\nPlease refresh the page if you wish to reattempt.\n")}return t.addLogEntry({text:"Worker registration: Complete"}),Se({r:n,logger:t})},Ee=e=>e?e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;"):"";var ke={main({langs:e,languages:t,followParams:n,$p:r}){se.jml("form",{class:"focus",id:"languageSelectionContainer",$on:{submit(e){e.preventDefault()}}},[["select",{name:"lang",size:e.length,$on:{click({target:{parentNode:{selectedOptions:e}}}){n("#languageSelectionContainer",(()=>{r.set("lang",e[0].value,!0)}))}}},e.map((({code:e})=>["option",{value:e},[t.getLanguageFromCode(e)]]))]],se.$("#main")),history.state&&"object"==typeof history.state&&oe.deserialize(document.querySelector("#languageSelectionContainer"),history.state)}};const Oe=["aqua","black","blue","fuchsia","gray","green","lime","maroon","navy","olive","purple","red","silver","teal","white","yellow"],Ae=["Helvetica, sans-serif","Verdana, sans-serif","Gill Sans, sans-serif","Avantgarde, sans-serif","Helvetica Narrow, sans-serif","sans-serif","Times, serif","Times New Roman, serif","Palatino, serif","Bookman, serif","New Century Schoolbook, serif","serif","Andale Mono, monospace","Courier New, monospace","Courier, monospace","Lucidatypewriter, monospace","Fixed, monospace","monospace","Comic Sans, Comic Sans MS, cursive","Zapf Chancery, cursive","Coronetscript, cursive","Florence, cursive","Parkavenue, cursive","cursive","Impact, fantasy","Arnoldboecklin, fantasy","Oldtown, fantasy","Blippo, fantasy","Brushstroke, fantasy","fantasy"],Fe=se.nbsp.repeat(2),Ie=se.nbsp.repeat(3),De=()=>({form:se.$("form#browse"),random:se.$("#rand")||{checked:!1},checkboxes:se.$$("input[type=checkbox]")});var Ne={bdo:({fallbackDirection:e,message:t})=>["div",{style:"display: inline; direction: "+e},[t]],columnsTable:({lDirectional:e,fieldInfo:t,$p:n,lElement:r,lIndexedParam:o,l:i,fieldMatchesLocale:a})=>["table",{border:"1",cellpadding:"5",align:"center"},[["tr",[["th",[e("fieldno")]],["th",{align:"left",width:"20"},[e("field_enabled")]],["th",[e("field_title")]],["th",[e("fieldinterlin")]],["th",[e("fieldcss")]]]],...t.map(((e,a)=>{const s=a+1,u="checked"+s,c="field"+s,l=n.get(c);return["tr",[["td",[String(s)]],r("check-columns-to-browse","td","title",{},[r("yes","input","value",{class:"fieldSelector",id:u,name:o("checked")+s,checked:n.get(u)!==i("no")&&(n.has(u)||!1!==e.onByDefault),type:"checkbox"})]),r("check-sequence","td","title",{},[["select",{name:o("field")+s,id:c,size:"1"},t.map((({field:e,fieldAliasOrName:t},r)=>["option",{dataset:{name:e},value:t,selected:l&&l===t||r===a&&!n.has(c)},[t]]))]]),["td",[r("interlinear-tips","input","title",{name:o("interlin")+s,value:n.get("interlin"+s)})]],["td",[["input",{name:o("css")+s,value:n.get("css"+s)}]]]]]})),["tr",[["td",{colspan:3},[r("check_all","input","value",{type:"button",$on:{click(){se.$$(".fieldSelector").forEach((e=>{e.checked=!0}))}}}),r("uncheck_all","input","value",{type:"button",$on:{click(){se.$$(".fieldSelector").forEach((e=>{e.checked=!1}))}}}),r("checkmark_locale_fields_only","input","value",{type:"button",$on:{click(){t.forEach(((e,t)=>{const n=t+1,r=se.$("#field"+n).selectedOptions[0].dataset.name;se.$("#checked"+n).checked=a(r)}))}}})]]]]]],advancedFormatting:({lDirectional:e,lParam:t,l:n,lOption:r,lElement:o,$p:i,hideFormattingSection:a})=>["td",{id:"advancedformatting",style:{display:a?"none":"block"}},[["h3",[e("advancedformatting")]],["label",[e("textcolor"),Fe,["select",{name:t("colorName")},Oe.map(((e,t)=>{const o={value:n(["param_values","colors",e]),selected:null};return(i.get("colorName")===n(["param_values","colors",e])||1===t&&!i.has("colorName"))&&(o.selected="selected"),r(["param_values","colors",e],o)}))]]],["label",[se.nbsp,e("or_entercolor"),Fe,["input",{name:t("color"),type:"text",value:i.get("color")||"#",size:"7",maxlength:"7"}]]],["br"],["br"],["label",[e("backgroundcolor"),Fe,["select",{name:t("bgcolorName")},Oe.map(((e,t)=>{const o={value:n(["param_values","colors",e]),selected:null};return(i.get("bgcolorName")===n(["param_values","colors",e])||14===t&&!i.has("bgcolorName"))&&(o.selected="selected"),r(["param_values","colors",e],o)}))]]],["label",[se.nbsp,e("or_entercolor"),Fe,["input",{name:t("bgcolor"),type:"text",value:i.get("bgcolor")||"#",size:"7",maxlength:"7"}]]],["br"],["br"],["label",[e("text_font"),Fe,["select",{name:t("fontSeq"),dir:"ltr"},Ae.map(((e,t)=>{const n={value:e,selected:null};return(i.get("fontSeq")===e||7===t&&!i.has("fontSeq"))&&(n.selected="selected"),["option",n,[e]]}))]]],["br"],["br"],["label",[e("font_style"),Fe,["select",{name:t("fontstyle")},["italic","normal","oblique"].map(((e,t)=>{const o={value:n(["param_values","fontstyle",e]),selected:null};return(i.get("fontstyle")===n(["param_values","fontstyle",e])||1===t&&!i.has("fontstyle"))&&(o.selected="selected"),r(["param_values","fontstyle",e],o)}))]]],["br"],["div",[e("font_variant"),Ie,["label",[["input",{name:t("fontvariant"),type:"radio",value:n(["param_values","fontvariant","normal"]),checked:i.get("fontvariant")!==e(["param_values","fontvariant","small-caps"])}],e(["param_values","fontvariant","normal"]),se.nbsp]],["label",[["input",{name:t("fontvariant"),type:"radio",value:n(["param_values","fontvariant","small-caps"]),checked:i.get("fontvariant")===e(["param_values","fontvariant","small-caps"])}],e(["param_values","fontvariant","small-caps"]),se.nbsp]]]],["br"],["label",[e("font_weight")," (normal, bold, 100-900, etc.):",Fe,["input",{name:t("fontweight"),type:"text",value:i.has("fontweight")?i.get("fontweight"):"normal",size:"7",maxlength:"12"}]]],["br"],["label",[e("font_size")," (14pt, 14px, small, 75%, etc.):",Fe,["input",{name:t("fontsize"),type:"text",value:i.get("fontsize"),size:"7",maxlength:"12"}]]],["br"],["label",{dir:"ltr"},[e("font_stretch"),se.nbsp,["select",{name:t("fontstretch")},["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"].map((t=>{const n={value:e(["param_values","font-stretch",t]),selected:null};return(i.get("fontstretch")===t||!i.has("fontstretch")&&"normal"===t)&&(n.selected="selected"),["option",n,[e(["param_values","font-stretch",t])]]}))]]],["br"],["br"],["label",[e("letter_spacing")," (normal, .9em, -.05cm): ",["input",{name:t("letterspacing"),type:"text",value:i.has("letterspacing")?i.get("letterspacing"):"normal",size:"7",maxlength:"12"}]]],["br"],["label",[e("line_height")," (normal, 1.5, 22px, 150%): ",["input",{name:t("lineheight"),type:"text",value:i.has("lineheight")?i.get("lineheight"):"normal",size:"7",maxlength:"12"}]]],["br"],["br"],o("tableformatting_tips","h3","title",{},[e("tableformatting")]),["div",[e("header_wstyles"),Fe,...[["yes",e(["param_values","y"])],["no",e(["param_values","n"])],["none",e(["param_values","0"])]].map((([n,r],o,a)=>["label",[["input",{name:t("header"),type:"radio",value:r,checked:i.get("header")===r||!i.has("header")&&1===o}],e(n),o===a.length-1?"":Ie]]))]],["div",[e("footer_wstyles"),Fe,...[["yes",e(["param_values","y"])],["no",e(["param_values","n"])],["none",e(["param_values","0"])]].map((([n,r],o,a)=>["label",[["input",{name:t("footer"),type:"radio",value:r,checked:i.get("footer")===r||!i.has("footer")&&2===o}],e(n),o===a.length-1?"":Ie]]))]],["label",[["input",{name:t("headerfooterfixed"),type:"checkbox",value:n("yes"),checked:i.get("headerfooterfixed")===n("yes")}],Fe,e("headerfooterfixed-wishtoscroll")]],["br"],["div",[e("caption_wstyles"),Fe,...[["yes",e(["param_values","y"])],["no",e(["param_values","n"])],["none",e(["param_values","0"])]].map((([n,r],o,a)=>["label",[["input",{name:t("caption"),type:"radio",value:r,checked:i.get("caption")===r||!i.has("caption")&&2===o}],e(n),o===a.length-1?"":Ie]]))]],["br"],["div",[e("table_wborder"),Fe,["label",[["input",{name:t("border"),type:"radio",value:"1",checked:"0"!==i.get("border")}],e("yes"),Ie]],["label",[["input",{name:t("border"),type:"radio",value:"0",checked:"0"===i.get("border")}],e("no")]]]],["div",[e("interlin_repeat_field_names"),Fe,["label",[["input",{name:t("interlintitle"),type:"radio",value:"1",checked:"0"!==i.get("interlintitle")}],e("yes"),Ie]],["label",[["input",{name:t("interlintitle"),type:"radio",value:"0",checked:"0"===i.get("interlintitle")}],e("no")]]]],["label",[e("interlintitle_css"),Fe,["input",{name:t("interlintitle_css"),type:"text",value:i.get("interlintitle_css")||"",size:"12"}]]],["br"],["br"],o("pageformatting_tips","h3","title",{},[e("pageformatting")]),["label",[e("page_css"),Fe,["textarea",{name:t("pagecss"),title:n("page_css_tips"),value:i.get("pagecss")}]]],["br"],o("outputmode_tips","label","title",{},[e("outputmode"),Fe,["select",{name:t("outputmode")},["table","div"].map((e=>{const t={value:e,selected:null};return i.get("outputmode")===e&&(t.selected="selected"),r(["param_values","outputmode",e],t)}))]])]],addRandomFormFields({lParam:e,lDirectional:t,l:n,lElement:r,$p:o,serializeParamsAsURL:i,content:a}){[[["td",{colspan:12,align:"center"},[["br"],t("or"),["br"],["br"]]]],[["td",{colspan:12,align:"center"},[["label",[t("rnd"),Ie,["input",{id:"rand",name:e("rand"),type:"checkbox",value:n("yes"),checked:o.get("rand")===n("yes")}]]],Ie,["label",[t("verses-context"),se.nbsp,["input",{name:e("context"),type:"number",min:1,size:4,value:o.get("context")}]]],Ie,r("view-random-URL","input","value",{type:"button",$on:{click(){const e=i({...De(),type:"randomResult"});se.$("#randomURL").value=e}}}),["input",{id:"randomURL",type:"text"}]]]]].forEach((e=>{e&&e.length&&a.push(["tr",e])}))},getPreferences:({paramsSetter:e,replaceHash:t,getFieldAliasOrNames:n,work:r,langs:o,languageI18n:i,l:a,localizeParamNames:s,namespace:u,hideFormattingSection:c,preferencesPlugin:l})=>["div",{style:{textAlign:"left"},id:"preferences",hidden:"true"},[["div",{style:"margin-top: 10px;"},[["label",[a("localizeParamNames"),["input",{id:"localizeParamNames",type:"checkbox",checked:s,$on:{change(e){const t=e.target.checked;localStorage.setItem(u+"-localizeParamNames",String(t))}}}]]]]],["div",[["label",[a("Hide formatting section"),["input",{id:"hideFormattingSection",type:"checkbox",checked:c,$on:{change(e){const t=e.target.checked;se.$("#advancedformatting").style.display=t?"none":"block",localStorage.setItem(u+"-hideFormattingSection",String(t))}}}]]]]],["div",[["label",{for:"prefLangs"},[a("Preferred language(s)")]],["br"],["select",{id:"prefLangs",multiple:"multiple",size:o.length,$on:{change(e){const t=e.target.selectedOptions;localStorage.setItem(u+"-langCodes",JSON.stringify([...t].map((e=>e.value))))}}},o.map((e=>{let t=localStorage.getItem(u+"-langCodes");t=t&&JSON.parse(t);const n={value:e.code,selected:null};return t&&t.includes(e.code)&&(n.selected="selected"),["option",n,[i(e.code)]]}))]]],l?l({$:se.$,l:a,jml:se.jml,paramsSetter:e,getDataForSerializingParamsAsURL:De,work:r,replaceHash:t,getFieldAliasOrNames:n}):""]],addBrowseFields({browseFields:e,fieldInfo:t,lDirectional:n,i:r,lIndexedParam:o,$p:i,content:a}){const s=i.get("work");[r>0?[["td",{colspan:12,align:"center"},[["br"],n("or"),["br"],["br"]]]]:"",[...(()=>{const t=t=>e.reduce(((e,{fieldName:n,aliases:a,fieldSchema:{minimum:u,maximum:c}},l)=>{const f=s+"-"+o(t)+(r+1)+"-"+(l+1),p=f;return e["#"].push(["td",[["label",{for:f},[n]]]],["td",[a?["datalist",{id:"dl-"+p},a.map((e=>["option",[e]]))]:"",a?["input",{name:f,id:p,class:"browseField",list:"dl-"+p,value:i.get(f,!0),$on:"start"===t?{change(e){se.$$("input.browseField").forEach((t=>{t.id.includes(r+1+"-"+(l+1))&&(t.value=e.target.value)}))}}:void 0}]:["input",{name:f,id:p,type:"number",min:u,max:c,value:i.get(f,!0)}],Ie]]),e}),{"#":[]});return[t("start"),["td",[["b",[n("to")]],Ie]],t("end")]})(),["td",[e.length>1?n("versesendingdataoptional"):""]]],[["td",{colspan:4*e.length+2+1,align:"center"},[["table",[["tr",[e.reduce(((e,{fieldName:t,aliases:n,fieldSchema:{minimum:a,maximum:u}},c)=>{const l=s+"-"+o("anchor")+(r+1)+"-"+(c+1),f=l;return e["#"].push(["td",[["label",{for:l},[t]]]],["td",[n?["datalist",{id:"dl-"+f},n.map((e=>["option",[e]]))]:"",n?["input",{name:l,id:f,class:"browseField",list:"dl-"+f,value:i.get(l,!0)}]:["input",{name:l,id:f,type:"number",min:a,max:u,value:i.get(l,!0)}],Fe]]),e}),{"#":[["td",{style:"font-weight: bold; vertical-align: bottom;"},[n("anchored-at")+Ie]]]}),["td",[["label",[n("field")+Fe,["select",{name:o("anchorfield")+(r+1),size:"1"},t.map((({fieldAliasOrName:e})=>i.get(o("anchorfield")+(r+1),!0)===e?["option",{selected:!0},[e]]:["option",[e]]))]]]]]]]]]]]]].forEach((e=>{e&&e.length&&a.push(["tr",e])}))},main({l:e,namespace:t,heading:n,languageI18n:r,langs:o,fieldInfo:i,localizeParamNames:a,serializeParamsAsURL:s,paramsSetter:u,replaceHash:c,getFieldAliasOrNames:l,hideFormattingSection:f,$p:p,lParam:d,lElement:h,lDirectional:v,lIndexedParam:g,fieldMatchesLocale:y,content:m,preferencesPlugin:b}){const w=p.get("work"),_=({type:e})=>s({...De(),type:e});se.jml("div",{class:"focus"},[["div",{style:"float: left;"},[["button",{$on:{click(){const e=se.$("#preferences");e.hidden=!e.hidden}}},[e("Preferences")]],Te.workDisplay.getPreferences({paramsSetter:u,replaceHash:c,getFieldAliasOrNames:l,work:w,langs:o,languageI18n:r,l:e,localizeParamNames:a,namespace:t,hideFormattingSection:f,preferencesPlugin:b})]],["h2",[n]],["br"],["form",{id:"browse",$custom:{$submit(){const e=_({type:"saveSettings"}).replace(/^[^#]*#/,"");console.log("history thisParams",e),history.replaceState(e,document.title,location.href);const t=_({type:"result"});location.href=t}},$on:{keydown(e){const{target:t}=e;"Enter"===e.key&&"textarea"!==t.localName.toLowerCase()&&this.$submit()},submit(e){e.preventDefault(),this.$submit()}},name:d("browse")},[["table",{align:"center"},m],["br"],["div",{style:"margin-left: 20px"},[["br"],["br"],["table",{border:"1",align:"center",cellpadding:"5"},[["tr",{valign:"top"},[["td",[Te.workDisplay.columnsTable({lDirectional:v,fieldInfo:i,$p:p,lElement:h,lIndexedParam:g,l:e,fieldMatchesLocale:y}),h("save-settings-URL","input","value",{type:"button",$on:{click(){const e=_({type:"saveSettings"});se.$("#settings-URL").value=e}}}),["input",{id:"settings-URL"}],["br"],["button",{$on:{async click(e){e.preventDefault();const t=u({...De(),workName:w,type:"startEndResult"}),n=c(t)+`&work=${w}&${w}-startEnd1=%s`;try{await navigator.clipboard.writeText(n)}catch(e){}}}},[e("Copy_shortcut_URL")]]]],Te.workDisplay.advancedFormatting({lDirectional:v,lParam:d,l:e,lOption:(t,n)=>["option",n,[e(t)]],lElement:h,$p:p,hideFormattingSection:f})]]]]]],["p",{align:"center"},[h("submitgo","input","value",{type:"submit"})]]]]],se.$("#main"))}},Pe={caption:({heading:e,ranges:t})=>e+" "+t,startSeparator:({l:e})=>e("colon"),innerBrowseFieldSeparator:({l:e})=>e("comma-space"),ranges:({l:e,startRange:t,endVals:n,rangeNames:r})=>t+"-"+n.join(Te.resultsDisplayServerOrClient.startSeparator({l:e}))+" ("+r+")",fieldValueAlias:({key:e,value:t})=>t+" ("+e+")",interlinearSegment:({lang:e,dir:t,html:n})=>`<span${e?` lang="${e}"`:""}${t?` dir="${t}"`:""}>${n}</span>`,interlinearTitle:({l:e,val:t})=>`<span class="interlintitle">${t}</span>${e("colon-space")}`,styles({$p:e,$pRaw:t,$pRawEsc:n,$pEscArbitrary:r,escapeCSS:o,tableWithFixedHeaderAndFooter:i,checkedFieldIndexes:a,hasCaption:s}){const u=e.has("color",!0)&&"#"!==e.get("color",!0)?r("color"):n("colorName"),c=e.has("bgcolor",!0)&&"#"!==e.get("bgcolor",!0)?r("bgcolor"):n("bgcolorName"),l=1+(0+(s?2:0)),f=l+1+"em",p="0.5em",d=`100% - ${f} - 2em - ${p}`;return["style",[(i?`\nhtml, body, #main, #main > div {\n height: 100%; /* Needed to ensure descendent heights retain 100%; could be avoided if didn't want percent on table height */\n overflow-y: hidden; /* Not sure why we're getting extra here, but... */\n}\n.anchor-table-header {\n background-color: ${c||"white"}; /* Header background (not just for div text inside header, but for whole header area) */\n overflow-x: hidden; /* Not sure why we're getting extra here, but... */\n position: relative; /* Ensures we are still flowing, but provides anchor for absolutely positioned thead below (absolute positioning positions relative to nearest non-static ancestor; clear demo at https://www.w3schools.com/cssref/playit.asp?filename=playcss_position&preval=fixed ) */\n padding-top: ${f}; /* Provides space for the header (and caption) (the one that is absolutely positioned below relative to here) */\n height: 100%; /* Percent of the whole screen taken by the table */\n}\n.anchor-table-body {\n overflow-y: auto; /* Provides scrollbars when text fills up beyond the height */\n height: ${`calc(${d})`}; /* If < 100%, the header anchor background color will seep below table */\n}\n\n.caption, .thead .th, .tfoot .th {\n line-height: 0; /* th div will have own line-height; reducing here avoids fattening it by an inner div */\n color: transparent; /* Hides the non-div duplicated header text */\n white-space: nowrap; /* Ensures column header text uses up full width without overlap (esp. wrap no longer seems to work); this must be applied outside of the div */\n border: none; /* We don't want a border for this invisible section */\n}\ndiv.inner-caption, .thead .th div.th-inner, .tfoot .th div.th-inner { /* divs are used as th is supposedly problematic */\n position: absolute; /* Puts relative to nearest non-static ancestor (our relative header anchor) */\n color: initial; /* Header must have an explicit color or it will get transparent container color */\n line-height: normal; /* Revert ancestor line height of 0 */\n}\n.thead .th div.th-inner {\n top: ${l}em; /* Ensures our header stays fixed at top outside of normal flow of table */\n}\ndiv.inner-caption {\n top: 1em;\n}\n.tfoot .th div.th-inner { /* divs are used as th is supposedly problematic */\n top: ${`calc(${d} + ${p})`}; /* Ensures our header stays fixed at top outside of normal flow of table */\n}\n.zupa div.zupa1 {\n margin: 0 auto !important;\n width: 0 !important;\n}\n.zupa div.th-inner, .zupa div.inner-caption {\n width: 100%;\n margin-left: -50%;\n text-align: center;\n}\n`:"")+("y"===t("caption")?i?".caption div.inner-caption, ":".caption, ":"")+("y"===t("header")?i?"":".thead .th, ":"")+("y"===t("footer")?i?"":".tfoot .th, ":"")+".tbody td"+` {\n vertical-align: top;\n font-style: ${n("fontstyle")};\n font-variant: ${n("fontvariant")};\n font-weight: ${r("fontweight")};\n ${r("fontsize")?`font-size: ${r("fontsize")};`:""}\n font-family: ${r("fontSeq")};\n\n font-stretch: ${n("fontstretch")};\n letter-spacing: ${r("letterspacing")};\n line-height: ${r("lineheight")};\n ${u?`color: ${o(u)};`:""}\n ${c?`background-color: ${o(c)};`:""}\n}\n${o(r("pagecss")||"")}\n`+a.map(((e,n)=>("y"===t("header")?i?`.thead .th:nth-child(${n+1}) div.th-inner, `:`.thead .th:nth-child(${n+1}), `:"")+("y"===t("footer")?i?`.tfoot .th:nth-child(${n+1}) div.th-inner, `:`.tfoot .th:nth-child(${n+1}), `:"")+`.tbody td:nth-child(${n+1}) `+`{\n ${r("css"+(e+1))}\n}\n`)).join("")+(r("interlintitle_css")?`\n /* http://salzerdesign.com/test/fixedTable.html */\n .interlintitle {\n ${o(r("interlintitle_css"))}\n }\n `:"")+(c?`\nbody {\n background-color: ${c};\n}\n`:"")]]},main({tableData:e,$p:t,$pRaw:n,$pRawEsc:r,$pEscArbitrary:o,escapeCSS:i,escapeHTML:a,l:s,localizedFieldNames:u,fieldLangs:c,fieldDirs:l,caption:f,hasCaption:p,showInterlinTitles:d,determineEnd:h,getCanonicalID:v,canonicalBrowseFieldSetName:g,getCellValue:y,checkedAndInterlinearFieldInfo:m,showEmptyInterlinear:b,showTitleOnSingleInterlinear:w,interlinearSeparator:_="<br /><br />"}){const x={table:[["table",{class:"table",border:n("border")||"0"}],["tr",{class:"tr"}],["td"],["th",{class:"th"}],["caption",{class:"caption"}],["thead",{class:"thead"}],["tbody",{class:"tbody"}],["tfoot",{class:"tfoot"}]],div:[["div",{class:"table",style:"display: table;"}],["div",{class:"tr",style:"display: table-row;"}],["div",{class:"td",style:"display: table-cell;"}],["div",{class:"th",style:"display: table-cell;"}],["div",{class:"caption",style:"display: table-caption;"}],["div",{class:"thead",style:"display: table-header-group;"}],["div",{class:"tbody",style:"display: table-row-group;"}],["div",{class:"tfoot",style:"display: table-footer-group;"}]],"json-array":"json","json-object":"json"},S=t.get("outputmode",!0);switch(S){case"json-object":case"json-array":throw new Error("JSON object support is currently not available")}const j=x[Object.hasOwn(x,S)&&S?S:"table"],[E,k,O,A,F,I,D,N]=j,[P,T,C]=m,$="yes"===n("headerfooterfixed"),L=(e,t)=>((e=JSON.parse(JSON.stringify(e))).push(t),e),R=([e,t],n)=>[e,{...t,...n}],M={start:!1,end:!1},U=[],z=(e,t)=>{if(!b){if(!t){const t=(new DOMParser).parseFromString(e,"text/html").body;[...t.querySelectorAll("br")].forEach((e=>{e.remove()})),e=t.innerHTML}if(!e.trim())return!0}};return e.some(((e,t)=>{const n=h({tr:e,foundState:M});if("boolean"==typeof n)return n;const r=v({tr:e});return U.push(L(R(k,{dataset:{row:n,"canonical-type":g,"canonical-id":r}}),T.map(((n,r)=>{const o=C[r],i=o,{tdVal:a,htmlEscaped:f}=y({tr:e,idx:n}),p=i&&o.map((t=>{const{tdVal:n,htmlEscaped:r}=y({tr:e,idx:t});console.log("showEmptyInterlinear",b,r);return z(n,r)?"":i?Te.resultsDisplayServerOrClient.interlinearSegment({lang:c[t],dir:l[t],html:(d?Te.resultsDisplayServerOrClient.interlinearTitle({l:s,val:u[t]}):"")+n}):n})).filter((e=>""!==e));return R(O,{id:"row"+(t+1)+"col"+(r+1),lang:c[n],dir:l[n],dataset:{col:u[n]},innerHTML:(i&&!z(a,f)&&(w||p?.length)?Te.resultsDisplayServerOrClient.interlinearSegment({lang:c[n],html:(d?Te.resultsDisplayServerOrClient.interlinearTitle({l:s,val:u[n]}):"")+a}):a)+(o&&p&&p.length?_+p.join(_):"")})})))),!1})),["div",[Te.resultsDisplayServerOrClient.styles({$p:t,$pRaw:n,$pRawEsc:r,$pEscArbitrary:o,escapeCSS:i,tableWithFixedHeaderAndFooter:$,checkedFieldIndexes:T,hasCaption:p}),(B=[L(E,[f?L(F,[f,$?["div",{class:"zupa1"},[["div",{class:"inner-caption"},[["span",[f]]]]]]:""]):"","0"!==n("header")?L(I,[L(k,P.map(((e,t)=>{const n=C[t];return e=a(e)+(n?s("comma-space")+n.map((e=>u[e])).join(s("comma-space")):""),L(A,[e,$?["div",{class:"zupa1"},[["div",{class:"th-inner"},[["span",[e]]]]]]:""])})))]):"",n("footer")&&"0"!==n("footer")?L(N,[L(k,P.map(((e,t)=>{const n=C[t];return e=a(e)+(n?s("comma-space")+n.map((e=>u[e])).join(s("comma-space")):""),L(A,[e,$?["div",{class:"zupa1"},[["div",{class:"th-inner"},[["span",[e]]]]]]:""])})))]):"",L(D,U)])],$?["div",{class:"table-responsive anchor-table-header zupa"},[["div",{class:"table-responsive anchor-table-body"},B]]]:["div",{class:"table-responsive"},B])]];var B}};const Te={languageSelect:ke,workSelect:function({groups:e,workI18n:t,getNextAlias:n,$p:r,followParams:o}){const i=se.jml("form",{id:"workSelect",class:"focus",$on:{submit(e){e.preventDefault()}}},e.map(((e,i)=>["div",[i>0?["br","br","br"]:"",["div",[t(e.directions.localeKey)]],["br"],["select",{class:"file",name:"work"+i,dataset:{name:e.name.localeKey},$on:{change(e){const t=e.target.value;o("#workSelect",(()=>{r.set("work",t)}))}}},[["option",{value:""},["--"]],...e.files.map((({name:r})=>["option",{value:t(["workNames",e.id,r])},[n()]]))]]]])),se.$("#main"));return history.state&&"object"==typeof history.state&&oe.deserialize(document.querySelector("#workSelect"),history.state),i},workDisplay:Ne,resultsDisplayServerOrClient:Pe,resultsDisplayClient:{anchorRowCol:({anchorRowCol:e})=>se.$("#"+e),anchors({escapedRow:e,escapedCol:t}){const n='tr[data-row="'+e+'"]'+(t?'> td[data-col="'+t+'"]':"");return se.$(n)},main(e){let t;try{t=Te.resultsDisplayServerOrClient.main(e)}catch(e){const t=e;return void("JSON support is currently not available"===t.message?le.alert(t.message):console.error(t))}se.jml(...t,se.$("#main"))}},defaultBody(){for(;se.body.hasChildNodes();)se.body.firstChild?.remove();return se.jml("div",{id:"main",role:"main"},se.body)},permissions:{versionChange(){se.$("#versionChange")?.showModal()},addLogEntry({text:e}){const t=se.$("#installationLogContainer");try{t.showModal();se.$("#dialogContainer").hidden=!1}catch(e){}se.$("#installationLog").append(e+"\n")},exitDialogs(){const e=se.$("#dialogContainer");e&&(e.hidden=!0)},dbError({type:e,escapedErrorMessage:t}){e&&se.jml("span",[e," ",t],se.$("#dbError")),se.$("#dbError").showModal()},errorRegistering(e){e&&se.jml("span",[e],se.$("#errorRegistering")),se.$("#errorRegistering").showModal()},browserNotGrantingPersistence(){se.$("#browserNotGrantingPersistence").showModal()},main({siteI18n:e,ok:t,refuse:n,close:r,closeBrowserNotGranting:o}){const i=se.jml("dialog",{style:"text-align: center; height: 100%",id:"installationLogContainer",class:"focus"},[["p",[e("wait-installing")]],["div",{style:"height: 80%; overflow: auto;"},[["pre",{id:"installationLog"},[]]]]]);let a="";t&&n&&r&&(a=se.jml("dialog",{id:"willRequestStoragePermissions",$on:{close:r}},[["section",[e("will-request-storage-permissions")]],["br"],["div",{class:"focus"},[["button",{$on:{click:t}},[e("OK")]],["br"],["br"],["button",{$on:{click:n}},[e("refuse-request-storage-permissions")]]]]]));const s=se.jml("dialog",{id:"errorRegistering"},[["section",[e("errorRegistering")]]]);let u="";o&&(u=se.jml("dialog",{id:"browserNotGrantingPersistence"},[["section",[e("browser-not-granting-persistence")]],["br"],["div",{class:"focus"},[["button",{$on:{click:o}},[e("OK")]]]]]));const c=se.jml("dialog",{id:"versionChange"},[["section",[e("versionChange")]]]),l=se.jml("dialog",{id:"dbError"},[["section",[e("dbError")]]]);return se.jml("div",{id:"dialogContainer",style:"height: 100%"},[i,a,u,s,c,l],se.$("#main")),[i,a,u,s,c,l]}}};function Ce(e,t){if(t||!this.localizeParamNames)return e;const n=/\d+(-\d+)?$/,r=e.match(n);if(!this.l10n)throw new Error("l10n is not defined");return r?this.l10n(["params","indexed",e.replace(n,"")])+r[0]:this.l10n(["params",e])}class $e{constructor({l10n:e,params:t}={}){this.l10n=e,this.localizeParamNames=!1,t||(t=location.hash.slice(1)),"string"==typeof t&&(t=new URLSearchParams(t)),this.params=t}get(e,t){return this.params.get(Ce.call(this,e,t))}getAll(e,t){return this.params.getAll(Ce.call(this,e,t))}has(e,t){return this.params.has(Ce.call(this,e,t))}delete(e,t){return this.params.delete(Ce.call(this,e,t))}set(e,t,n){return this.params.set(Ce.call(this,e,n),t)}append(e,t,n){return this.params.append(Ce.call(this,e,n),t)}toString(){return this.params.toString()}}const Le=e=>location.href.replace(/#.*$/,"")+"#"+e.toString(),Re=function({l:e,lParam:t,$p:n}){return function({form:r,random:o={checked:!1},checkboxes:i,type:a,fieldAliasOrNames:s=[],workName:u}){const c=new URLSearchParams(n.params),l=oe.serialize(r,{hash:!0,empty:!0});function f(){let e=1,t=1;for(;c.has(`${u}-start${e}-${t}`);){for(;c.has(`${u}-start${e}-${t}`);)c.delete(`${u}-start${e}-${t}`),c.delete(`${u}-end${e}-${t}`),c.delete(`${u}-anchor${e}-${t}`),t++;t=1,e++}}switch(Object.keys(l).forEach((e=>{c.set(e,l[e])})),c.delete(t("rand")),c.set(t("rand"),o.checked?e("yes"):e("no")),i.forEach((t=>{c.delete(t.name),t.name&&c.set(t.name,t.checked?e("yes"):e("no"))})),a){case"saveSettings":c.delete(t("rand"));break;case"shortcutResult":{c.delete(t("rand"));let n=1;for(;c.has(`anchorfield${n}`);)c.delete(`anchorfield${n}`),n++;for(f(),n=1;c.has(`field${n}`);)c.delete(`field${n}`),c.delete(`checked${n}`),c.delete(`interlin${n}`),c.delete(`css${n}`),n++;s.forEach(((t,n)=>{c.set(`field${n+1}`,t),c.set(`checked${n+1}`,e("yes")),c.set(`interlin${n+1}`,""),c.set(`css${n+1}`,"")})),c.delete("work")}case"startEndResult":case"randomResult":case"result":"startEndResult"===a&&f(),("randomResult"===a||o.checked)&&(c.delete(t("rand")),c.set(t("rand"),e("yes"))),c.set(t("result"),e("yes"));break;default:console.error("Unexpected type",a)}return c}};async function Me({l:e,languageParam:t,lang:r,preferredLocale:o,languages:i,fallbackLanguages:a,$p:s}){const{preferencesPlugin:u}=this,c=this.langData.languages,l=localStorage.getItem(this.namespace+"-localizeParamNames"),f=s.localizeParamNames=s.has("i18n",!0)?"1"===s.get("i18n",!0):"true"===l||"false"!==l&&this.localizeParamNames,p=localStorage.getItem(this.namespace+"-hideFormattingSection"),d=s.has("formatting",!0)?"0"===s.get("formatting",!0):"true"===p||"false"!==p&&this.hideFormattingSection;try{const{workI18n:l,fileData:p,metadataObj:h,...v}=await this.getWorkData({lang:r,fallbackLanguages:a,preferredLocale:o,languages:i,work:s.get("work")});document.title=l("browserfile-workdisplay",{work:p?de(r,h,"alias"):""}),await async function({workI18n:l,metadataObj:p,getFieldAliasOrName:h,schemaItems:v,fieldInfo:g,metadata:y,pluginsForWork:m,groupsToWorks:b}){const w=f?t=>e(["params",t]):e=>e,_=f?t=>e(["params","indexed",t]):e=>e,x=(t,n)=>e(t,n),S=y.getFieldMatchesLocale({namespace:this.namespace,preferredLocale:o,schemaItems:v,pluginsForWork:m}),j=[];this.getBrowseFieldData({metadataObj:p,schemaItems:v,getFieldAliasOrName:h,callback({browseFields:e,i:t}){Te.workDisplay.addBrowseFields({browseFields:e,fieldInfo:g,lDirectional:x,i:t,lIndexedParam:_,$p:s,content:j})}});const E=function(e){const t=Re(e);return function(e){const n=t(e);return Le(n)}}({l:e,lParam:w,$p:s}),k=Re({l:e,lParam:w,$p:s}),{groups:O}=await n.getJSON(this.files),A=de(r,p,"heading"),F=(()=>{const e=Promise.all(b.map((async({name:e,workNames:t,shortcuts:n})=>({groupName:e,worksToFields:await Promise.all(t.map((async(e,t)=>({workName:e,shortcut:n[t],fieldAliasOrNames:(await this.getWorkData({lang:r,fallbackLanguages:a,preferredLocale:o,languages:i,work:e}))?.fieldInfo?.map((({fieldAliasOrName:e})=>e))}))))}))));return async()=>e})(),I=new Intl.DisplayNames([...r,...a],{type:"language",languageDisplay:"standard"});Te.workDisplay.main({languageParam:t,workI18n:l,l:e,namespace:this.namespace,groups:O,heading:A,languageI18n:e=>I.of(e),langs:c,fieldInfo:g,localizeParamNames:f,serializeParamsAsURL:E,paramsSetter:k,replaceHash:Le,getFieldAliasOrNames:F,hideFormattingSection:d,$p:s,metadataObj:p,lParam:w,lElement:(t,n,r,o,i=[])=>(o[r]=e(t),[n,o,i]),lDirectional:x,lIndexedParam:_,fieldMatchesLocale:S,preferredLocale:o,schemaItems:v,content:j,preferencesPlugin:u})}.call(this,{workI18n:l,metadataObj:h,...v})}catch(e){const t=e;console.log("err",t),le.alert(t)}}const Ue=/([\.\*\+\^\$\[\]\\\(\)\|\{\}\,\-\:\?])/g,ze=/^([a-zA-Z]{2,3}|[a-zA-Z]{5,8})(-[a-zA-Z]{4})?(-(?:[a-zA-Z]{2}|\d{3}))?(-(?:[a-zA-Z\d]{5,8}|\d[a-zA-Z\d]{3}))?$/;class Be{constructor(e){if("string"!=typeof e)throw new TypeError("A string argument is expected");if(!ze.test(e))throw new RangeError("A proper locale must be provided");this._locale=e}static _escapeRegExpPattern(e){return"string"!=typeof e?e:e.replace(Ue,"\\$1")}static _toLowerCase(e,t){return"string"!=typeof e?t&&e:e.toLowerCase()}static _toUpperCase(e,t){return"string"!=typeof e?t&&e:e.toUpperCase()}static _trim(e,t,n){const r=[];let o;const i=function(e){r.push("^"+e+"+|"+e+"+$")};if("boolean"==typeof t&&(n=t,t=null),"string"!=typeof e)return n?e:void 0;if(Array.isArray(t)&&t.map((e=>{const t=this._escapeRegExpPattern(e);i(t)})),"string"==typeof t){const e=this._escapeRegExpPattern(t);i(e)}t||i("\\s");const a="("+r.join("|")+")";for(o=new RegExp(a,"g");e.match(o);)e=e.replace(o,"");return e}static _parseLocale(e){if("string"!=typeof e)return;const t=ze.exec(e);let n,r,o;if(!e||!t)return;const i=this._trim(t[2],["-","_"]),a=this._trim(t[3],["-","_"]);n=this._toLowerCase(t[1]),r=this._toLowerCase(i)||r,o=this._toUpperCase(a)||o;return{lang:n,script:r,countryCode:o}}_isRtlLang(){const{lang:e,script:t}=Be._parseLocale(this._locale);return t?Be._RTL_SCRIPTS.indexOf(t)>=0:Be._BIDI_RTL_LANGS.indexOf(e)>=0}getTextInfo(){return{direction:this._isRtlLang()?"rtl":"ltr"}}}Be._RTL_SCRIPTS=["adlm","arab","armi","avst","chrs","cprt","elym","hatr","hebr","hung","khar","lydi","mand","mani","mend","merc","mero","narb","nbat","nkoo","orkh","ougr","palm","phli","phlp","phnx","prti","rohg","samr","sarb","sogd","sogo","syrc","thaa","yezi"],Be._BIDI_RTL_LANGS=["ae","aeb","ajt","apc","apd","ar","ara","arb","arc","arq","ars","ary","arz","ave","avl","bal","bcc","bej","bft","bgn","bqi","brh","cja","ckb","cld","dcc","dgl","div","drw","dv","fa","fas","fia","fub","gbz","gjk","gju","glk","grc","gwc","gwt","haz","he","heb","hnd","hno","iw","ji","kas","kby","khw","ks","kvx","kxp","kzh","lad","lah","lki","lrc","luz","mde","mfa","mki","mvy","myz","mzn","nqo","oru","ota","otk","oui","pal","pbu","per","pes","phl","phn","pnb","pra","prd","prs","ps","pus","rhg","rmt","scl","sd","sdh","shu","skr","smp","snd","sog","swb","syr","tnf","trw","ug","uig","ur","urd","wni","xco","xld","xmn","xmr","xna","xpr","xsa","ydd","yi","yid","zdj"];const qe=e=>{const{direction:t}=new Be(e).getTextInfo();return t},We=/^.* \((.*?)\)$/,Ve=e=>"string"==typeof e?e.replace(We,"$1"):e,He=async function(e){const t=await navigator.storage.persisted(),n=this.skipIndexedDB||!t||!navigator.serviceWorker.controller,r=localStorage.getItem(this.namespace+"-localizeParamNames"),{fieldInfo:o,$p:i,browseFieldSets:a,applicableBrowseFieldSet:s,lang:u,metadataObj:c,fileData:l,fieldValueAliasMapPreferred:f,workI18n:p,lIndexedParam:d,lParamRaw:h,templateArgs:v}=await Je.call(this,{...e,skipIndexedDB:n,prefI18n:r});document.title=p("browserfile-resultsdisplay",{work:l?de(u,c,"alias"):""}),Te.resultsDisplayClient.main(v),(({applicableBrowseFieldSet:e,fieldValueAliasMapPreferred:t,lParamRaw:n,lIndexedParam:r,max:o,$p:i})=>{const a=e.map((e=>e.fieldSchemaIndex)),s=i.get("work");let u;const c=n("anchorrowcol");if(c&&(u=Te.resultsDisplayClient.anchorRowCol({anchorRowCol:c})),!u){const e=[];let n="";for(let u,c=1;!u&&!e.length;c++)for(let l=1;;l++){const f=s+"-anchor"+c+"-"+l,p=i.get(f,!0);if(!p){(c===o||e.length)&&(u=!0);break}n=i.get(r("anchorfield")+c,!0);const d=a[l-1],h=Ve(p),v=t[d]&&t[d][h];e.push(v||p)}if(e.length){const t=e=>(e||"").replaceAll(/["\\]/g,String.raw`\$&`),r=t(e.join("-")),o=n?t(n):void 0;u=Te.resultsDisplayClient.anchors({escapedRow:r,escapedCol:o})}}u&&u.scrollIntoView()})({applicableBrowseFieldSet:s,fieldValueAliasMapPreferred:f,lIndexedParam:d,lParamRaw:h,$p:e.$p,max:a.length}),o.forEach((({plugin:e,applicableField:t,meta:n,j:r})=>{e&&e.done&&e.done({$p:i,applicableField:t,meta:n,j:r,thisObj:this})}))},Je=async function({l:e,lang:t,fallbackLanguages:n,locales:r,$p:o,skipIndexedDB:i,noIndexedDB:a,prefI18n:s,files:u,allowPlugins:c,langData:l,basePath:f="",dynamicBasePath:p=""}){const d=new fe({langData:l}),h=({schemaItems:e,fieldInfo:n,metadataObj:r,getFieldAliasOrName:o,usePreferAlias:i})=>n.map((({field:n,plugin:a})=>{if(a)return;const{preferAlias:s,fieldValueAliasMap:u}=ve({field:n,schemaItems:e,metadataObj:r,getFieldAliasOrName:o,lang:t});return i?u?(Object.entries(u).forEach((([e,t])=>{Array.isArray(t)?u[e]=t.map((t=>Te.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:t}))):t&&"object"==typeof t?"string"==typeof s?u[e]=Te.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:t[s]}):Object.entries(t).forEach((([t,n])=>{u[e][t]=Te.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:n})})):u[e]=Te.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:t})})),!1!==s?u:void 0):void 0:!1!==s?u:void 0})),v=(e,t)=>{let n;const i=o.get(e,!0);return function e(t){return Array.isArray(t)?t.some(e):Object.values(t).some(((r,o)=>"string"!=typeof r?e(r):r===i&&(n=Object.keys(t)[o],!0)))}(r),n||t||console.log("Bad param/value",e,"::",i),n},g=Ee,{fileData:y,workI18n:m,getFieldAliasOrName:b,schemaObj:w,metadataObj:_,pluginsForWork:x}=await _e({files:u||this.files,allowPlugins:"boolean"==typeof c?c:this.allowPlugins,lang:t,fallbackLanguages:n,work:o.get("work"),basePath:f});console.log("pluginsForWork",x);const S=de(t,_,"heading"),j=w.items.items,E=[],k=[],O=[];ge({metadataObj:_,schemaItems:j,getFieldAliasOrName:b,lang:t,callback({setName:e,browseFields:t,presort:n}){E.push(e),k.push(n),O.push(t)}});const A=j.map((({title:e,format:t})=>({field:e,fieldAliasOrName:b(e)||e,escapeColumn:"html"!==t,fieldLang:_.fields[e].lang}))),[F]=t,I=new ye({metadataObj:_});if(x){console.log("pluginsForWork",x);const{lang:e}=this;x.iterateMappings((({pluginName:t,pluginLang:n,onByDefaultDefault:r,placement:o,applicableFields:i,meta:a})=>{o="end"===o?Number.POSITIVE_INFINITY:o;const s=({applicableField:i,targetLanguage:s,onByDefault:u,metaApplicableField:c}={})=>{const l=x.getPluginObject(t)||{},f=I.getFieldLang(i);l.getTargetLanguage&&(s=l.getTargetLanguage({applicableField:i,targetLanguage:s,pluginLang:n,applicableFieldLang:f})),"{locale}"===s&&(s=F);const p=de(e,_,["fieldnames",i]),h=l.getFieldAliasOrName?l.getFieldAliasOrName({locales:e,workI18n:m,targetLanguage:s,applicableField:i,applicableFieldI18N:p,meta:a,metaApplicableField:c,targetLanguageI18N:d.getLanguageFromCode(s)}):d.getFieldNameFromPluginNameAndLocales({pluginName:t,workI18n:m,targetLanguage:s,applicableFieldI18N:p,meta:a,metaApplicableField:c});A.splice(o,0,{plugin:l,meta:a,placement:o,fieldAliasOrName:h,escapeColumn:!1!==l.escapeColumn,onByDefault:"boolean"==typeof u?u:r||!1,applicableField:i,metaApplicableField:c,fieldLang:s})};x.processTargetLanguages(i,s)||s()}))}const D=A.map((e=>e.fieldAliasOrName)),N=A.map((e=>e.escapeColumn)),P=A.map((({fieldLang:e})=>e!==F?e:null)),T=h({schemaItems:j,fieldInfo:A,metadataObj:_,getFieldAliasOrName:b,usePreferAlias:!1}),C=h({schemaItems:j,fieldInfo:A,metadataObj:_,getFieldAliasOrName:b,usePreferAlias:!0}),$=o.localizeParamNames=o.has("i18n",!0)?"1"===o.get("i18n",!0):"true"===s||"false"!==s&&this.localizeParamNames,L=$?t=>e(["params",t]):e=>e,R=$?t=>e(["params","indexed",t]):e=>e,M=$?(e,t="")=>o.get(L(e)+t,!0):(e,t="")=>o.get(e+t,!0),U=$?(e,t="")=>o.get(o.get("work")+"-"+R(e)+t,!0):(e,t="")=>o.get(o.get("work")+"-"+e+t,!0),z=O.findIndex(((e,t)=>U("startEnd",String(t+1))));if(-1!==z){const e="-",t=":",n=(U("startEnd",String(z+1))||"").trim(),[r,i]=n.split(e);if(void 0!==i){const e=r.split(t),n=i.split(t),a=e.length-n.length;a>0?n.unshift(...e.slice(0,a)):a<0&&e.push(...Array.from({length:-a}).fill("1")),console.log("startPartVals",e),console.log("endPartVals",n),e.forEach(((e,t)=>{const r=n[t];o.set(`${o.get("work")}-start${z+1}-${t+1}`,e,!0),o.set(`${o.get("work")}-end${z+1}-${t+1}`,r,!0)}))}}const B=O.findIndex(((e,t)=>U("start",t+1+"-1"))),q=O[B],W=E[B],V=q.map((e=>e.fieldName)),H=O[0],J=E[0],K=H.map((e=>e.fieldName)),G=q.map((e=>e.fieldSchema.type)),Z=e=>V.map(((t,n)=>o.get(o.get("work")+"-"+e+(B+1)+"-"+(n+1),!0))),X=Z("start"),Y=Z("end"),[Q,ee]=(({starts:t,ends:n,applicableBrowseFieldNames:r,heading:o})=>{let i;const a="0"!==v("caption");if(a){const a=Te.resultsDisplayServerOrClient.startSeparator({l:e}),s=Te.resultsDisplayServerOrClient.innerBrowseFieldSeparator({l:e}),u=(()=>{const o=[],i=t.reduce(((e,t,r)=>{const i=e+t;return t===n[r]?i+(r>0?s:" "):(o.push(n[r]),i+a)}),"").slice(0,-a.length),u=r.join(s);return Ee(Te.resultsDisplayServerOrClient.ranges({l:e,startRange:i,endVals:o,rangeNames:u}))})();i=Te.resultsDisplayServerOrClient.caption({heading:o,ranges:u})}return[a,i]})({starts:X,ends:Y,applicableBrowseFieldNames:V,heading:S}),te="1"===v("interlintitle");console.log("rand","yes"===M("rand"));const ne=(e,t)=>{let n;if(/^\d+$/.test(e)||We.test(e))n=Ve(e);else{const{rawFieldValueAliasMap:r}=q[t];let o;if(r){const t=Object.entries(r);Array.isArray(t[0][1])?t.some((([t,n])=>!!n.includes(e)&&(o=t,!0))):t.some((([t,n])=>!!Object.values(n).includes(e)&&(o=t,!0)))}n=void 0===o?e:o}return"integer"===G[t]?Number.parseInt(n):n},re=y.name,oe=X.map(ne),ie=Y.map(ne);let ae,se=!1;if(i||a){const e=k[B];if(this.noDynamic){const{resolved:t}=await pe.resolveRefs(y.file);ae=t.data,(({presort:e,tableData:t,applicableBrowseFieldNames:n,localizedFieldNames:r})=>{e&&t.sort(((e,t)=>{let o=0;return n.some((n=>{const i=r.indexOf(n),a=e[i]<t[i],s=e[i]>t[i];return o=s?1:-1,a||s})),o}))})({presort:e,tableData:ae,applicableBrowseFieldNames:V,localizedFieldNames:D})}else{const e=`${p}textbrowser?${o.toString()}`;ae=await(await fetch(e)).json(),se=!0}}else ae=await new Promise((e=>{const t=this.namespace+"-textbrowser-cache-data";indexedDB.open(t).onsuccess=t=>{const n=t.target.result,r="files-to-cache-"+re;n.transaction(r).objectStore(r).index("browseFields-"+W).getAll(IDBKeyRange.bound(oe,ie)).addEventListener("success",(t=>{const n=t.target.result.map((e=>e.value));e(n)}))}}));!se&&x&&(A.forEach((({plugin:e,placement:t})=>{e&&ae.forEach((e=>{e.splice(t??0,0,null)}))})),A.forEach((({plugin:e,applicableField:t,fieldLang:n,meta:r,metaApplicableField:i},a)=>{if(!e)return;const s=A.findIndex((({field:e})=>e===t));ae.forEach(((u,c)=>{const l=u[s];u[a]=e.getCellData&&e.getCellData({tr:u,tableData:ae,i:c,j:a,applicableField:t,fieldInfo:A,applicableFieldIdx:s,applicableFieldText:l,fieldLang:n,getLangDir:qe,meta:r,metaApplicableField:i,$p:o,thisObj:this})||l})),console.log("applicableFieldIdx",s)})));const ue=qe(F),ce=P.map((e=>{if(!e)return null;const t=qe(e);return t!==ue?t:null})),le={tableData:ae,$p:o,$pRaw:v,$pRawEsc:e=>Ee(v(e)),$pEscArbitrary:e=>Ee(o.get(e,!0)),escapeQuotedCSS:e=>e.replaceAll("\\","\\\\").replaceAll('"',String.raw`\"`),escapeCSS:g,escapeHTML:Ee,l:e,localizedFieldNames:D,fieldLangs:P,fieldDirs:ce,caption:ee,hasCaption:Q,showInterlinTitles:te,showEmptyInterlinear:this.showEmptyInterlinear,showTitleOnSingleInterlinear:this.showTitleOnSingleInterlinear,determineEnd:(({fieldValueAliasMap:e,fieldValueAliasMapPreferred:t,localizedFieldNames:n,applicableBrowseFieldNames:r,startsRaw:o,endsRaw:i})=>({tr:a,foundState:s})=>{const u=[],c=r.map((r=>{const o=n.indexOf(r);return void 0!==e[o]&&null!==e[o]?u.push(t[o]?.[a[o]]):u.push(a[o]),a[o]}));if(!s.start){if(o.some(((e,t)=>e!==c[t])))return!1;s.start=!0}if(i.every(((e,t)=>e===c[t])))s.end=!0;else if(s.end)return!0;return u.join("-")})({applicableBrowseFieldNames:V,fieldValueAliasMap:T,fieldValueAliasMapPreferred:C,localizedFieldNames:D,startsRaw:oe,endsRaw:ie}),canonicalBrowseFieldSetName:J,getCanonicalID:(({fieldValueAliasMap:e,fieldValueAliasMapPreferred:t,localizedFieldNames:n,canonicalBrowseFieldNames:r})=>({tr:o})=>r.map((r=>{const i=n.indexOf(r);return void 0!==e[i]&&null!==e[i]?t[i][o[i]]:o[i]})).join("-"))({canonicalBrowseFieldNames:K,fieldValueAliasMap:T,fieldValueAliasMapPreferred:C,localizedFieldNames:D}),getCellValue:(({fieldValueAliasMapPreferred:t,escapeColumnIndexes:n})=>({tr:r,idx:o})=>{let i=null!=t[o]?t[o][r[o]]:r[o];return i&&"object"==typeof i&&(i=Object.values(i)),Array.isArray(i)&&(i=i.join(e("comma-space"))),!n[o]&&this.trustFormatHTML||"string"!=typeof i?{tdVal:i}:{tdVal:Ee(i),htmlEscaped:!0}})({fieldValueAliasMapPreferred:C,escapeColumnIndexes:N}),checkedAndInterlinearFieldInfo:(({localizedFieldNames:t})=>{let n,r,i=1,a=[];do{n=o.get("field"+i,!0),r=o.get("checked"+i,!0),i++,!n||r!==e("yes")&&null!==r||a.push(n)}while(n);a=a.filter((e=>t.includes(e)));const s=a.map((e=>t.indexOf(e))),u=s.map((e=>{const t=o.get("interlin"+(e+1),!0);return t&&t.split(/\s*,\s*/).map((e=>Number.parseInt(e)-1)).filter((e=>!Number.isNaN(e)))}));return[a,s,u]})({localizedFieldNames:D}),interlinearSeparator:this.interlinearSeparator};return{fieldInfo:A,$p:o,applicableBrowseFieldSet:q,fieldValueAliasMapPreferred:C,workI18n:m,lIndexedParam:R,lParamRaw:M,browseFieldSets:O,lang:t,metadataObj:_,fileData:y,templateArgs:le}};async function Ke(){try{Te.permissions.addLogEntry({text:"Worker registration: Beginning..."});if(!await navigator.storage.persist())return void Te.permissions.browserNotGrantingPersistence();await je({serviceWorkerPath:this.serviceWorkerPath,logger:Te.permissions})}catch(e){if(console.log("err",e),e&&"object"==typeof e&&"errorType"in e&&"versionChange"===e.errorType)return void Te.permissions.versionChange();Te.permissions.errorRegistering(Ee(e?.message))}}async function Ge(e,t){return await new Promise((e=>{const n=Te.permissions.main({siteI18n:t,ok:async()=>{const e=await Notification.requestPermission();r.close(e)},refuse:()=>{r.close()},close:async()=>{const t=()=>{localStorage.setItem(this.namespace+"-refused","true")};try{if(!r.returnValue)return void t()}catch(e){const t=e;console.log("err",t),Te.permissions.errorRegistering(Ee(t&&t.message))}switch(r.returnValue){case"denied":case"default":return void e();case"granted":if(navigator.serviceWorker.controller)return void e();await Ke.call(this);break;default:console.error("Unexpected returnValue",r.returnValue)}},closeBrowserNotGranting:()=>{o.close()}}),r=n[1],o=n[2];r.showModal()}))}class Ze{constructor(e){this.site=e.site||"site.json";const t=e.stylesheets||["@builtin"],n=t.indexOf("@builtin");var r,o;-1!==n&&t.splice(n,1,new URL(new URL("assets/index-D_XVedS3.css",import.meta.url).href).href),this.stylesheets=t,this.siteData={"localization-strings":{}},this.langData={languages:[],"localization-strings":{}},this.lang=[],this.userJSON="",this.languages="",this.serviceWorkerPath="",this.files="",this.namespace="",o=e,(r=this).userJSON=o.userJSON||"resources/user.json",r.languages=o.languages||new URL(new URL("assets/languages-DWwAAJMo.json",import.meta.url).href).href,r.serviceWorkerPath=o.serviceWorkerPath||`sw.js?pathToUserJSON=${encodeURIComponent(r.userJSON)}&stylesheets=${encodeURIComponent(JSON.stringify(r.stylesheets||[]))}`,r.files=o.files||"files.json",r.namespace=o.namespace||"textbrowser",this.allowPlugins=e.allowPlugins,this.dynamicBasePath=e.dynamicBasePath,this.trustFormatHTML=e.trustFormatHTML,this.requestPersistentStorage=e.requestPersistentStorage,this.localizeParamNames=void 0===e.localizeParamNames||e.localizeParamNames,this.hideFormattingSection=Boolean(e.hideFormattingSection),this.preferencesPlugin=e.preferencesPlugin,this.interlinearSeparator=e.interlinearSeparator,this.showEmptyInterlinear=e.showEmptyInterlinear,this.showTitleOnSingleInterlinear=e.showTitleOnSingleInterlinear,this.noDynamic=e.noDynamic,this.skipIndexedDB=e.skipIndexedDB}async init(){this._stylesheetElements=await te(this.stylesheets);try{const e=await n.getJSON([this.languages,this.site]);this.langData=e[0],this.siteData=e[1];const t=this.paramChange();return globalThis.addEventListener("hashchange",(()=>this.paramChange())),t}catch(e){const t=e;console.log("err",t),le.alert(t)}}getWorkData(e){try{return _e.call(this,{...e,files:this.files,allowPlugins:this.allowPlugins})}catch(e){console.log("err",e),le.alert("catch:"+e)}}getDirectionForLanguageCode(e){const t=this.langData.languages,n=t.find((t=>t.code===e));return n&&n.direction||t.find((t=>t.code.startsWith(e+"-")))}getFieldNameAndValueAliases(e){return ve({...e,lang:this.lang})}getBrowseFieldData(e){return ge({...e,lang:this.lang})}async paramChange(){Te.defaultBody();const e=this.$p="string"==typeof history.state?new $e({params:history.state}):new $e,t=(t,n)=>{const r=document.querySelector(t),o=location.href.replace(/#.*$/,"")+"#"+e.toString();history.replaceState(oe.serialize(r,{hash:!0,empty:!0}),document.title,o),n(),location.hash="#"+e.toString()},r=new fe({langData:this.langData}),{lang:o,langs:i,languageParam:a,fallbackLanguages:s}=r.getLanguageInfo({$p:e});this.lang=o;const[u]=o,c=this.getDirectionForLanguageCode(u);document.documentElement.lang=u,document.dir=c;const l=this.siteData["localization-strings"],f=await ee({messageStyle:"plainNested",locales:o,defaultLocales:s,async localeStringFinder({locales:e,defaultLocales:t}={}){const n=[...e,...t].find((e=>e in l));return{locale:n,strings:{head:{},body:l[n]}}}});document.title=f("browser-title");const p="true"===localStorage.getItem(this.namespace+"-refused"),d=await navigator.storage.persisted(),h=await navigator.serviceWorker.getRegistration(this.serviceWorkerPath),v=e.get("result"),g=async()=>{if(v)return;!(p||navigator.serviceWorker.controller&&d)&&(d?(Te.permissions.main({siteI18n:f}),await Ke.call(this)):await Ge.call(this,i,f),Te.permissions.exitDialogs())};if(h){const e=h.installing||h.waiting||h.active;if(!e)return console.error("Unexpected error: worker registration received without a worker."),void await g();Te.permissions.main({siteI18n:f});setInterval((()=>{h.update()}),36e5),console.log("worker.state",e.state);const t=async()=>{try{return Se({r:h,logger:Te.permissions})}catch(e){return console.log("err",e),le.alert("\n There was an unexpected error activating the new version;\n please save any unfinished work, close this tab, and try\n opening this site again.\n\n Please contact a service administrator if the problem\n persists (Error type: worker activation).\n ")}};switch(e.state){case"installing":t(),xe({r:h});break;case"installed":await t();break;case"activating":return await le.alert("\n Please wait for a short while as we work to update to a new version.\n "),t(),void navigator.serviceWorker.onmessage({data:"finishActivate"});case"activated":xe({r:h});break;case"redundant":return void await t();default:console.log("Unexpected worker.state",e.state)}}else await g();if(Te.permissions.exitDialogs(),!a)return document.title=f("languages-title"),void Te.languageSelect.main({langs:i,languages:r,followParams:t,$p:e});const y=await async function({$p:e,lang:t,langs:n,langData:r,fallbackLanguages:o,basePath:i=""}){const a=await ee({messageStyle:"plainNested",locales:t,defaultLocales:o,localeResolver:(e,t)=>i+r.localeFileBasePath+(n.find((e=>e.code===t))?.locale?.$ref??"")});return e.l10n||(e.l10n=a),a}({$p:e,lang:o,langs:i,langData:this.langData,fallbackLanguages:s});if((()=>{this.l10n=y,e.l10n=y;return e.get("work")?!v&&(this.workDisplay({l:y,lang:o,preferredLocale:u,fallbackLanguages:s,languageParam:a,$p:e,languages:r}),!0):(async function({files:e,lang:t,fallbackLanguages:r,$p:o,followParams:i}){try{const a=await n.getJSON(e),s=a["localization-strings"],u=await n.getJSON(a.groups.reduce(((e,t)=>{const n=(a.metadataBaseDirectory||"")+(t.metadataBaseDirectory||"")+"/";return t.files.reduce(((e,t)=>[...e,n+t.metadataFile]),e)}),[])),c=await ee({messageStyle:"plainNested",locales:t,defaultLocales:r,async localeStringFinder({locales:e,defaultLocales:t}={}){const n=[...e,...t].find((e=>e in s));return{locale:n,strings:{head:{},body:s[n]}}}});document.title=c("browserfile-workselect");const l=u[Symbol.iterator](),f=()=>{const e=l.next().value;return de(t,e,"alias")};Te.workSelect({groups:a.groups,workI18n:c,getNextAlias:f,$p:o,followParams:i})}catch(e){const t=e;console.log("Error",t),le.alert(t)}}({files:this.files,lang:o,fallbackLanguages:s,$p:e,followParams:t}),!0)})())return;return await(async()=>{const t=p||!navigator.serviceWorker.controller;return await this.resultsDisplayClient({langData:this.langData,l:y,lang:o,fallbackLanguages:s,locales:y.strings,$p:e,basePath:"",noIndexedDB:t,dynamicBasePath:this.dynamicBasePath,files:this.files,allowPlugins:this.allowPlugins})})()}workDisplay=Me;resultsDisplayClient=He}export{Ze as default};